testing/ocamlclean: upgrade to 2.3

This commit is contained in:
rubicon 2022-05-13 16:16:03 +08:00 committed by alice
parent f665c06ab6
commit e43f37cd5a
4 changed files with 22 additions and 41 deletions

View File

@ -1,24 +1,23 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# 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
"

View File

@ -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

View File

@ -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

View File

@ -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 $< $@