From bfaf49912ef36489231cf199d760ec85a7b66215 Mon Sep 17 00:00:00 2001 From: omni Date: Sun, 28 Feb 2021 23:26:49 +0000 Subject: [PATCH] testing/ocamlclean: upgrade to 2.2 add archs supported by ocaml 4.12.0 --- testing/ocamlclean/APKBUILD | 17 +++++++++-------- testing/ocamlclean/bump-magic.patch | 15 +++++++++++++++ testing/ocamlclean/deprecated-pervasives.patch | 15 +++++++++++++++ 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 testing/ocamlclean/bump-magic.patch create mode 100644 testing/ocamlclean/deprecated-pervasives.patch diff --git a/testing/ocamlclean/APKBUILD b/testing/ocamlclean/APKBUILD index cf58a6cd923..20dbe565865 100644 --- a/testing/ocamlclean/APKBUILD +++ b/testing/ocamlclean/APKBUILD @@ -1,21 +1,21 @@ # Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=ocamlclean -pkgver=2.1 +pkgver=2.2 pkgrel=0 pkgdesc="OCaml Bytecode Cleaner" url="http://www.algo-prog.info/ocapic/web/index.php?id=OCAPIC:OCamlClean" -arch="all !x86 !armhf !armv7 !s390x !mips !mips64" # limited by ocaml aport +arch="all !mips !mips64" # limited by ocaml aport license="CECILL-2.0" makedepends="bash ocaml ocamlbuild" subpackages="$pkgname-doc" +options="!check" # no test suite # backup: https://github.com/bvaugon/ocamlclean -source="$pkgname-$pkgver.tar.bz2::http://www.algo-prog.info/ocapic/web/lib/exe/fetch.php?media=ocapic:$pkgname-$pkgver.tar.bz2" -builddir="$srcdir/$pkgname-$pkgver" +source="$pkgname-$pkgver.tar.bz2::http://www.algo-prog.info/ocapic/web/lib/exe/fetch.php?media=ocapic:ocamlclean-$pkgver.tar.bz2 + bump-magic.patch + deprecated-pervasives.patch" build() { - cd "$builddir" - ./configure \ -prefix "$pkgdir/usr" \ -mandir "$pkgdir/usr/share/man" @@ -23,8 +23,9 @@ build() { } package() { - cd "$builddir" make install } -sha512sums="6554f452c48c853fed4587456c582f31a47d947772975ba17e5a4cbb566fa61ed996dee23ec83fe360c7bcf65cc9f8544c78491769e8546b05dbada53b4cf73d ocamlclean-2.1.tar.bz2" +sha512sums="7bf2686818ce9085efde9a300eaedbb0ef2f9dbf6e80608ac9eaaf847537d11cd09083ad8bb993bf07f1f388b5420e6888732bb1d72642e0293e63070a2b9431 ocamlclean-2.2.tar.bz2 +ce063231ad2f12f214721b5a82d0b5db205d1657bc91d2cca6be9dedc5e3d4db00c933168721286f865560428b6a0fc40e807748924578c1969623c027d0fbf8 bump-magic.patch +3294f8c5f47d70fb17f4c6a2cfdec097b34181b9114afaced2d4e3f6f6eecdbca573232472e83531b8db6c98ffc578c2f8f634c2833c9d3f23d547759fb64aad deprecated-pervasives.patch" diff --git a/testing/ocamlclean/bump-magic.patch b/testing/ocamlclean/bump-magic.patch new file mode 100644 index 00000000000..8c3fea21dff --- /dev/null +++ b/testing/ocamlclean/bump-magic.patch @@ -0,0 +1,15 @@ +Bump magic_str to that of Ocaml 4.12 + +https://github.com/ocaml/ocaml/blob/trunk/utils/HACKING.adoc +https://github.com/ocaml/ocaml/blob/4.12/utils/config.mlp +--- a/src/index.ml ++++ b/src/index.ml +@@ -15,7 +15,7 @@ type section = Code | Dlpt | Dlls | Prim + + type t = (section * int * int) list + +-let magic_str = "Caml1999X023" ++let magic_str = "Caml1999X029" + + let parse ic = + let magic_size = String.length magic_str in diff --git a/testing/ocamlclean/deprecated-pervasives.patch b/testing/ocamlclean/deprecated-pervasives.patch new file mode 100644 index 00000000000..8d8efcf1b47 --- /dev/null +++ b/testing/ocamlclean/deprecated-pervasives.patch @@ -0,0 +1,15 @@ +Error (alert deprecated): module Stdlib.Pervasives +Use Stdlib instead. + +https://github.com/bvaugon/ocamlclean/pull/1 +--- a/src/step1.ml ++++ b/src/step1.ml +@@ -91,7 +91,7 @@ let prepare_code old_code cleanables ign + f (succ indg) adds cleans + | None -> f (succ indg) adds cleans + else +- (List.sort Pervasives.compare adds, cleans) ++ (List.sort Stdlib.compare adds, cleans) + in + let adds, cleans = f 0 [] [] in + let old_code_size = Array.length old_code in