diff options
author | Daniel Peukert | 2020-01-17 15:04:26 +0100 |
---|---|---|
committer | Daniel Peukert | 2020-01-17 15:04:26 +0100 |
commit | 5d07a8c2654326cfaa8a9d5b035766749efedaab (patch) | |
tree | b2a1e28132595e170988984cd1ce233883457302 | |
download | aur-5d07a8c2654326cfaa8a9d5b035766749efedaab.tar.gz |
Added ocaml-dtoa
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .editorconfig | 8 | ||||
-rw-r--r-- | .gitignore | 14 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | fix-ounit-name.diff | 12 | ||||
-rw-r--r-- | fix-tests.diff | 51 |
6 files changed, 157 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c36efb28ca20 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = ocaml-dtoa + pkgdesc = double-to-ascii ocaml implementation + pkgver = 0.3.2 + pkgrel = 1 + url = https://github.com/flowtype/ocaml-dtoa + arch = x86_64 + arch = i686 + license = MIT + checkdepends = ocaml-ounit + makedepends = dune + makedepends = ocaml-findlib + depends = ocaml + options = !strip + source = ocaml-dtoa-0.3.2-1.tar.gz::https://github.com/flowtype/ocaml-dtoa/archive/v0.3.2.tar.gz + source = fix-ounit-name.diff + source = fix-tests.diff + sha256sums = 967bdcf83f67491a27a3e0c31bb55696f4f89a00be9aa0b3a248c7ef14374afd + sha256sums = 9b26ee783aeba8c8a2f299e2fd061d06ebceac61cbe13becd2debb93b61aa4e4 + sha256sums = fc4ab96c8be38e7a2440ad80b474631829d48ae4a25c16a886997304d44da4b1 + +pkgname = ocaml-dtoa diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000000..a467ee9a97a6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +tab_width = 4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..82b3c183d5d4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# from https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore +*.tar +*.tar.* +*.rpm +*.jar +*.exe +*.msi +*.zip +*.tgz +*.log +*.log.* +*.sig + +*/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8770f7cab29b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Daniel Peukert <dan.peukert@gmail.com> +_projectname='dtoa' +pkgname="ocaml-$_projectname" +pkgver='0.3.2' +pkgrel='1' +pkgdesc='double-to-ascii ocaml implementation' +arch=('x86_64' 'i686') +url="https://github.com/flowtype/$pkgname" +license=('MIT') +depends=('ocaml') +makedepends=('dune' 'ocaml-findlib') +checkdepends=('ocaml-ounit') +options=('!strip') +source=( + "$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/v$pkgver.tar.gz" + 'fix-ounit-name.diff' + 'fix-tests.diff' +) +sha256sums=('967bdcf83f67491a27a3e0c31bb55696f4f89a00be9aa0b3a248c7ef14374afd' + '9b26ee783aeba8c8a2f299e2fd061d06ebceac61cbe13becd2debb93b61aa4e4' + 'fc4ab96c8be38e7a2440ad80b474631829d48ae4a25c16a886997304d44da4b1') + +_sourcedirectory="$pkgname-$pkgver" + +prepare() { + cd "$srcdir/$_sourcedirectory" + patch --forward -p1 < "$srcdir/fix-ounit-name.diff" + patch --forward -p1 < "$srcdir/fix-tests.diff" +} + +build() { + cd "$srcdir/$_sourcedirectory" + dune build +} + +check() { + cd "$srcdir/$_sourcedirectory" + dune runtest +} + +package() { + cd "$srcdir/$_sourcedirectory" + DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir 'lib/ocaml' + + install -dm755 "$pkgdir/usr/share/doc/$pkgname" + mv "$pkgdir/usr/doc/$_projectname/"* "$pkgdir/usr/share/doc/$pkgname/" + rm -r "$pkgdir/usr/doc/" + + install -dm755 "$pkgdir/usr/share/licenses/$pkgname" + ln -sf "/usr/share/doc/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/fix-ounit-name.diff b/fix-ounit-name.diff new file mode 100644 index 000000000000..5233a48ad750 --- /dev/null +++ b/fix-ounit-name.diff @@ -0,0 +1,12 @@ +diff --git a/test/dune b/test/dune +index 6a4b3b9..64327be 100644 +--- a/test/dune ++++ b/test/dune +@@ -1,6 +1,6 @@ + (executable + (name test) +- (libraries dtoa oUnit)) ++ (libraries dtoa ounit2)) + + (alias + (name runtest) diff --git a/fix-tests.diff b/fix-tests.diff new file mode 100644 index 000000000000..045e6c0ade42 --- /dev/null +++ b/fix-tests.diff @@ -0,0 +1,51 @@ +diff --git a/test/ecma_test.ml b/test/ecma_test.ml +index 7e27652..de62c95 100644 +--- a/test/ecma_test.ml ++++ b/test/ecma_test.ml +@@ -50,9 +50,9 @@ let tests = "ecma_string_of_float" >::: [ + + eq "5e-324" (ecma_string_of_float 5e-324); + eq "1.7976931348623157e+308" (ecma_string_of_float 1.7976931348623157e308); +- eq "NaN" (ecma_string_of_float Pervasives.nan); +- eq "Infinity" (ecma_string_of_float Pervasives.infinity); +- eq "-Infinity" (ecma_string_of_float Pervasives.neg_infinity); ++ eq "NaN" (ecma_string_of_float Stdlib.nan); ++ eq "Infinity" (ecma_string_of_float Stdlib.infinity); ++ eq "-Infinity" (ecma_string_of_float Stdlib.neg_infinity); + + (* grisu3 fails, uses bignum *) + eq "0.000035689" (ecma_string_of_float 0.000035689); +diff --git a/test/g_fmt_test.ml b/test/g_fmt_test.ml +index 9d0ae95..201377c 100644 +--- a/test/g_fmt_test.ml ++++ b/test/g_fmt_test.ml +@@ -49,9 +49,9 @@ let tests = "g_fmt" >::: [ + + eq "5e-324" (g_fmt 5e-324); + eq "1.7976931348623157e+308" (g_fmt 1.7976931348623157e308); +- eq "NaN" (g_fmt Pervasives.nan); +- eq "Infinity" (g_fmt Pervasives.infinity); +- eq "-Infinity" (g_fmt Pervasives.neg_infinity); ++ eq "NaN" (g_fmt Stdlib.nan); ++ eq "Infinity" (g_fmt Stdlib.infinity); ++ eq "-Infinity" (g_fmt Stdlib.neg_infinity); + + (* grisu3 fails, uses bignum *) + eq "3.5689e-5" (g_fmt 0.000035689); +diff --git a/test/shortest_test.ml b/test/shortest_test.ml +index 0c7226a..2071bb0 100644 +--- a/test/shortest_test.ml ++++ b/test/shortest_test.ml +@@ -53,9 +53,9 @@ let tests = "shortest_string_of_float" >::: [ + + eq "5e-324" (shortest_string_of_float 5e-324); + eq "17976931348623157e292" (shortest_string_of_float 1.7976931348623157e308); +- eq "NaN" (shortest_string_of_float Pervasives.nan); +- eq "Infinity" (shortest_string_of_float Pervasives.infinity); +- eq "-Infinity" (shortest_string_of_float Pervasives.neg_infinity); ++ eq "NaN" (shortest_string_of_float Stdlib.nan); ++ eq "Infinity" (shortest_string_of_float Stdlib.infinity); ++ eq "-Infinity" (shortest_string_of_float Stdlib.neg_infinity); + + (* grisu3 fails, uses bignum *) + eq "35689e-9" (shortest_string_of_float 0.000035689); |