Friday, July 05, 2024

Re: Update sysutils/opam to 2.2.0

OCaml opam still desperately needs an update.

Here is an updated diff including the changes requested by sthen@ and
fixing some more regression tests.

This will in the future also help upgrading dune, findlib, cppo, etc.,
because opam won't depend on a special version of them anymore.

OK?

Christopher



Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/opam/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- Makefile 24 Apr 2024 17:10:39 -0000 1.28
+++ Makefile 5 Jul 2024 21:30:28 -0000
@@ -2,10 +2,10 @@ COMMENT = OCaml source-based package ma

CATEGORIES = sysutils devel

-V = 2.0.10
+V = 2.2.0
PKGNAME = opam-${V}
DISTNAME = opam-full-${V}
-REVISION = 1
+DISTFILES = ${DISTNAME}-2${EXTRACT_SUFX} #remove on next update

SITES = https://github.com/ocaml/opam/releases/download/${V}/

@@ -18,12 +18,10 @@ PERMIT_PACKAGE = Yes

WANTLIB = ${COMPILER_LIBCXX} c m

+COMPILER = base-clang ports-gcc
+
BUILD_DEPENDS = lang/ocaml \
- sysutils/findlib \
- devel/dune \
- devel/ocaml-cppo \
- archivers/bzip2 \
- net/curl
+ archivers/bzip2

RUN_DEPENDS = archivers/unzip \
archivers/bzip2 \
@@ -32,11 +30,18 @@ RUN_DEPENDS = archivers/unzip \
devel/gmake \
net/curl

+TEST_DEPENDS = textproc/gdiff \
+ archivers/gtar \
+ net/wget
+
USE_GMAKE = Yes

CONFIGURE_ENV += CFLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS}"
-CONFIGURE_STYLE = gnu
+CONFIGURE_STYLE = gnu autoreconf no-autoheader
+CONFIGURE_ARGS = --with-vendored-deps
+AUTOCONF_VERSION = 2.69
+AUTOMAKE_VERSION = 1.16

ALL_TARGET = lib-ext all
INSTALL_TARGET = install
@@ -52,5 +57,9 @@ post-install:
${docdir}/
${INSTALL_DATA_DIR} ${docdir}/pages
${INSTALL_DATA} ${WRKSRC}/doc/pages/*.md ${docdir}/pages
+
+pre-test:
+ ln -fs ${LOCALBASE}/bin/gdiff ${WRKDIR}/bin/diff
+ ln -fs ${LOCALBASE}/bin/gtar ${WRKDIR}/bin/tar

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/opam/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo 16 Jan 2023 19:03:18 -0000 1.9
+++ distinfo 5 Jul 2024 21:30:28 -0000
@@ -1,2 +1,2 @@
-SHA256 (opam-full-2.0.10.tar.gz) = O1dAuOHBvGXc+KohxOjNgc1qv+G/UuosxDZ8P4nVvkA=
-SIZE (opam-full-2.0.10.tar.gz) = 8173617
+SHA256 (opam-full-2.2.0-2.tar.gz) = RZ7WTmZD8FxndWOgAOO6oFx2zlKAZOnLnObbSf/zfJc=
+SIZE (opam-full-2.2.0-2.tar.gz) = 12775907
Index: patches/patch-Makefile_config_in
===================================================================
RCS file: patches/patch-Makefile_config_in
diff -N patches/patch-Makefile_config_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_config_in 5 Jul 2024 21:30:28 -0000
@@ -0,0 +1,13 @@
+don't use system wide installed ocaml packages
+
+Index: Makefile.config.in
+--- Makefile.config.in.orig
++++ Makefile.config.in
+@@ -14,7 +14,6 @@ OCAMLFIND = @OCAMLFIND@
+ OCAML = @OCAML@
+ OCAMLC = @OCAMLC@
+ OCAMLOPT = @OCAMLOPT@
+-DUNE = @DUNE@
+ DUNE_SECONDARY = @DUNE_SECONDARY@
+ LN_S = @LN_S@
+
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac 5 Jul 2024 21:30:28 -0000
@@ -0,0 +1,13 @@
+don't use system wide installed ocaml packages
+
+Index: configure.ac
+--- configure.ac.orig
++++ configure.ac
+@@ -272,7 +272,6 @@ AS_IF([test "x${enable_certificate_check}" = "xno"], [
+
+ AC_CHECK_PROGS(FETCH,[curl wget],no)
+
+-AC_CHECK_TOOL(DUNE,dune)
+ AC_CHECK_TOOL(PATCH,patch)
+ AC_CHECK_TOOL(BUNZIP2,bunzip2)
+
Index: patches/patch-tests_reftests_archive_test
===================================================================
RCS file: patches/patch-tests_reftests_archive_test
diff -N patches/patch-tests_reftests_archive_test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_reftests_archive_test 5 Jul 2024 21:30:28 -0000
@@ -0,0 +1,12 @@
+Index: tests/reftests/archive.test
+--- tests/reftests/archive.test.orig
++++ tests/reftests/archive.test
+@@ -35,7 +35,7 @@ check () {
+ path=$1
+ if [ -L "$path" ] ; then
+ out="link,"
+- realpath=`realpath -mLP "$path"`
++ realpath=`realpath "$path"`
+ if [ "$realpath" = "$MD5_PATH" ]; then
+ out="$out to md5 archive"
+ elif [ "$realpath" = "$SHA256_PATH" ]; then
Index: patches/patch-tests_reftests_extrasource_test
===================================================================
RCS file: patches/patch-tests_reftests_extrasource_test
diff -N patches/patch-tests_reftests_extrasource_test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_reftests_extrasource_test 5 Jul 2024 21:30:28 -0000
@@ -0,0 +1,12 @@
+Index: tests/reftests/extrasource.test
+--- tests/reftests/extrasource.test.orig
++++ tests/reftests/extrasource.test
+@@ -34,7 +34,7 @@ check () {
+ path=$1
+ if [ -L "$path" ] ; then
+ out="link,"
+- realpath=`realpath -mLP "$path"`
++ realpath=`realpath "$path"`
+ if [ "$realpath" = "$MD5_PATH" ]; then
+ out="$out to md5 patch"
+ elif [ "$realpath" = "$SHA256_PATH" ]; then
Index: patches/patch-tests_reftests_legacy-git_test
===================================================================
RCS file: patches/patch-tests_reftests_legacy-git_test
diff -N patches/patch-tests_reftests_legacy-git_test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_reftests_legacy-git_test 5 Jul 2024 21:30:28 -0000
@@ -0,0 +1,12 @@
+Index: tests/reftests/legacy-git.test
+--- tests/reftests/legacy-git.test.orig
++++ tests/reftests/legacy-git.test
+@@ -19,7 +19,7 @@ ARCHIVE=$1; shift
+ if [ ! -e "packages/${ARCHIVE}" ]; then ( cd packages && tar czf ${ARCHIVE} ${ARCHIVE%.tar.gz}; ) fi
+ MD5=$(openssl md5 packages/${ARCHIVE} | cut -d' ' -f2)
+ echo 'src: "http://dev.null" checksum: "'$MD5'"' > REPO/packages/${PKG}/url
+-CACHEDIR=REPO/cache/md5/$(echo $MD5 |head -c2)
++CACHEDIR=REPO/cache/md5/$(echo $MD5 |cut -b -2)
+ mkdir -p $CACHEDIR
+ cp "packages/$ARCHIVE" "$CACHEDIR/$MD5"
+ ### : INIT :
Index: patches/patch-tests_reftests_legacy-local_test
===================================================================
RCS file: patches/patch-tests_reftests_legacy-local_test
diff -N patches/patch-tests_reftests_legacy-local_test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_reftests_legacy-local_test 5 Jul 2024 21:30:28 -0000
@@ -0,0 +1,12 @@
+Index: tests/reftests/legacy-local.test
+--- tests/reftests/legacy-local.test.orig
++++ tests/reftests/legacy-local.test
+@@ -7,7 +7,7 @@ ARCHIVE=$1; shift
+ if [ ! -e "packages/${ARCHIVE}" ]; then ( cd packages && tar czf ${ARCHIVE} ${ARCHIVE%.tar.gz}; ) fi
+ MD5=$(openssl md5 packages/${ARCHIVE} | cut -d' ' -f2)
+ echo 'src: "http://dev.null" checksum: "'$MD5'"' > REPO/packages/${PKG}/url
+-CACHEDIR=REPO/cache/md5/$(echo $MD5 |head -c2)
++CACHEDIR=REPO/cache/md5/$(echo $MD5 |cut -b -2)
+ mkdir -p $CACHEDIR
+ cp "packages/$ARCHIVE" "$CACHEDIR/$MD5"
+ ### : INIT :
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/sysutils/opam/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST 11 Mar 2022 19:57:44 -0000 1.3
+++ pkg/PLIST 5 Jul 2024 21:30:28 -0000
@@ -11,6 +11,7 @@
@man man/man1/opam-admin-lint.1
@man man/man1/opam-admin-list.1
@man man/man1/opam-admin-make.1
+@man man/man1/opam-admin-update-extrafiles.1
@man man/man1/opam-admin-upgrade.1
@man man/man1/opam-admin.1
@man man/man1/opam-clean.1
@@ -24,6 +25,8 @@
@man man/man1/opam-installer.1
@man man/man1/opam-lint.1
@man man/man1/opam-list.1
+@man man/man1/opam-lock.1
+@man man/man1/opam-option.1
@man man/man1/opam-pin.1
@man man/man1/opam-reinstall.1
@man man/man1/opam-remote.1
@@ -33,11 +36,13 @@
@man man/man1/opam-show.1
@man man/man1/opam-source.1
@man man/man1/opam-switch.1
+@man man/man1/opam-tree.1
@man man/man1/opam-uninstall.1
@man man/man1/opam-unpin.1
@man man/man1/opam-update.1
@man man/man1/opam-upgrade.1
@man man/man1/opam-var.1
+@man man/man1/opam-why.1
@man man/man1/opam.1
share/doc/opam/
share/doc/opam/CHANGES
@@ -46,6 +51,7 @@ share/doc/opam/depexts-plugins
share/doc/opam/depopts-and-features
share/doc/opam/pages/
share/doc/opam/pages/About.md
+share/doc/opam/pages/Distribution.md
share/doc/opam/pages/External_solvers.md
share/doc/opam/pages/FAQ.md
share/doc/opam/pages/Install.md

No comments:

Post a Comment