From e43f37cd5a205fcc1e3ca388bd9444480a76e2ca Mon Sep 17 00:00:00 2001 From: rubicon <5662-rubicon@users.gitlab.alpinelinux.org> Date: Fri, 13 May 2022 16:16:03 +0800 Subject: [PATCH] testing/ocamlclean: upgrade to 2.3 --- testing/ocamlclean/APKBUILD | 22 +++++++++---------- testing/ocamlclean/bump-magic.patch | 15 ------------- .../ocamlclean/deprecated-pervasives.patch | 15 ------------- testing/ocamlclean/obytelib-dir.patch | 11 ++++++++++ 4 files changed, 22 insertions(+), 41 deletions(-) delete mode 100644 testing/ocamlclean/bump-magic.patch delete mode 100644 testing/ocamlclean/deprecated-pervasives.patch create mode 100644 testing/ocamlclean/obytelib-dir.patch diff --git a/testing/ocamlclean/APKBUILD b/testing/ocamlclean/APKBUILD index ca78dfd315f..8d6ee034f79 100644 --- a/testing/ocamlclean/APKBUILD +++ b/testing/ocamlclean/APKBUILD @@ -1,24 +1,23 @@ # Contributor: Jakub Jirutka # Maintainer: pkgname=ocamlclean -pkgver=2.2 +pkgver=2.3 pkgrel=0 pkgdesc="OCaml Bytecode Cleaner" url="http://www.algo-prog.info/ocapic/web/index.php?id=OCAPIC:OCamlClean" arch="all !riscv64" # limited by ocaml aport license="CECILL-2.0" -makedepends="bash ocaml ocamlbuild" +makedepends="bash ocaml ocamlbuild ocaml-obytelib" 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:ocamlclean-$pkgver.tar.bz2 - bump-magic.patch - deprecated-pervasives.patch" +source="$pkgname-$pkgver.tar.gz::https://github.com/bvaugon/ocamlclean/archive/$pkgver.tar.gz + obytelib-dir.patch + " build() { ./configure \ - -prefix "$pkgdir/usr" \ - -mandir "$pkgdir/usr/share/man" + -prefix "$pkgdir"/usr \ + -mandir "$pkgdir"/usr/share/man make } @@ -26,6 +25,7 @@ package() { make install } -sha512sums="7bf2686818ce9085efde9a300eaedbb0ef2f9dbf6e80608ac9eaaf847537d11cd09083ad8bb993bf07f1f388b5420e6888732bb1d72642e0293e63070a2b9431 ocamlclean-2.2.tar.bz2 -ce063231ad2f12f214721b5a82d0b5db205d1657bc91d2cca6be9dedc5e3d4db00c933168721286f865560428b6a0fc40e807748924578c1969623c027d0fbf8 bump-magic.patch -3294f8c5f47d70fb17f4c6a2cfdec097b34181b9114afaced2d4e3f6f6eecdbca573232472e83531b8db6c98ffc578c2f8f634c2833c9d3f23d547759fb64aad deprecated-pervasives.patch" +sha512sums=" +f8cfd1f55daea5f11d2ab3507b141358f1fba9313ba18d71ebfb83eef8ded567a20bee8eb10577fec92ee8e5a2fed34581f7bf7e42c672553b86de733c473641 ocamlclean-2.3.tar.gz +b6687df1d5a9b843b33344fa23c4ffd262f49b2e624c4ed3cd7448e57fa561ae1cd2c06580e96f1259bd240e3b95695d59868140c05537c5febd3c8b031563c3 obytelib-dir.patch +" diff --git a/testing/ocamlclean/bump-magic.patch b/testing/ocamlclean/bump-magic.patch deleted file mode 100644 index 8c3fea21dff..00000000000 --- a/testing/ocamlclean/bump-magic.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 8d8efcf1b47..00000000000 --- a/testing/ocamlclean/deprecated-pervasives.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 diff --git a/testing/ocamlclean/obytelib-dir.patch b/testing/ocamlclean/obytelib-dir.patch new file mode 100644 index 00000000000..7f14154ab85 --- /dev/null +++ b/testing/ocamlclean/obytelib-dir.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -21,7 +21,7 @@ + cp $< $@ + + _build/$(BUILD): $(SRCS) config.ml +- $(OCAMLBUILD) -cflags -I,+../obytelib,-g -lflags -I,+../obytelib,obytelib.cmxa $(BUILD) ++ $(OCAMLBUILD) -cflags -I,+obytelib,-g -lflags -I,+obytelib,obytelib.cmxa $(BUILD) + + config.ml: $(ETC)/config.ml + cp $< $@