Index | Thread | Search

From:
Sebastien Marie <semarie@kapouay.eu.org>
Subject:
Re: [PATCH] sysutils/opam: update to 2.4.0
To:
Kate <kit-ty-kate@exn.st>, ports@openbsd.org
Cc:
Christopher Zimmermann <chrisz@openbsd.org>
Date:
Fri, 18 Jul 2025 19:52:58 +0200

Download raw body.

Thread
Hi,

Cc actual maintainer.

Thanks for your diff, but it is only partial. I refreshed the patches
(one patch removed as included in version 2.4), and updated the PLIST.

Also, some questions/remarks inlined, and I also included an updated
diff at the bottom.

Kate <kit-ty-kate@exn.st> writes:

> Hi,
>
> here is a patch updating the opam package to its latest version.
> This version does not depend on GNU Patch anymore.
> Changelog: https://opam.ocaml.org/blog/opam-2-4-0/
>

> --- a/sysutils/opam/Makefile
> +++ b/sysutils/opam/Makefile
> @@ -40,11 +39,11 @@ USE_GMAKE =		Yes
>  CONFIGURE_ENV +=	CFLAGS="${CFLAGS}" \
>  			LDFLAGS="${LDFLAGS}"
>  CONFIGURE_STYLE =	gnu autoreconf no-autoheader
> -CONFIGURE_ARGS =	--with-vendored-deps
> +CONFIGURE_ARGS =	--with-vendored-deps --with-mccs

what is the value of enabling mccs ?

additionally it seems to depend on c++ compiler, so more configuration
on the port might be need (COMPILER variable for example).

>  AUTOCONF_VERSION =	2.69
>  AUTOMAKE_VERSION =	1.16
>  
> -ALL_TARGET =		lib-ext all
> +ALL_TARGET =		all

lib-ext is optional now, so it is fine to remove it. the default value
of ALL_TARGET is all, so the variable could be unset.

>  INSTALL_TARGET =	install

at side node, install is also the default value of INSTALL_TARGET.

>  TEST_TARGET =		tests
>  

> diff --git a/sysutils/opam/opam.port.mk b/sysutils/opam/opam.port.mk
> index babefa32934..20f36ef7885 100644
> --- a/sysutils/opam/opam.port.mk
> +++ b/sysutils/opam/opam.port.mk

I would not change opam.port.mk for now. the --cli=2.3 specify how opam
should behave (like opmam-2.3), and opam-2.4 is expected to know that.

more tests will be need to change it to 2.4.

> @@ -11,13 +11,13 @@ MODOPAM_WITH_TEST ?=	No
>  
>  # Add sysutils/opam to BUILD_DEPENDS, and net/rsync to copying local repositories.
>  .if ${MODOPAM_BUILDDEP:L} == "yes"
> -BUILD_DEPENDS +=	sysutils/opam>=2.3 \
> +BUILD_DEPENDS +=	sysutils/opam>=2.4 \
>  			net/rsync
>  .endif
>  
>  # Default location of opam binary (provided by sysutils/opam).
>  # Uses --cli=2.3 to stick with 2.3 options even if opam is upgraded.
> -MODOPAM_OPAM_BIN ?=	${LOCALBASE}/bin/opam --cli=2.3
> +MODOPAM_OPAM_BIN ?=	${LOCALBASE}/bin/opam --cli=2.4
>  
>  # Default path for OPAMROOT.
>  MODOPAM_OPAMROOT ?=	${WRKDIR}/modopam-opamroot

Thanks
-- 
Sebastien Marie

Commit ID: f676a59858a66055e0b676d6bb600f42d024998b
Change ID: txzorlpvqnnkylprzqknnqtklzsntkxn
Author   : Sebastien Marie <semarie@kapouay.eu.org> (2025-07-18 17:31:36)
Committer: Sebastien Marie <semarie@kapouay.eu.org> (2025-07-18 17:48:57)

    sysutils/opam: update to 2.4.0

diff --git a/sysutils/opam/Makefile b/sysutils/opam/Makefile
index b4909f95b9..0e6778ac9a 100644
--- a/sysutils/opam/Makefile
+++ b/sysutils/opam/Makefile
@@ -4,7 +4,7 @@
 
 CATEGORIES =		sysutils devel
 
-V =			2.3.0
+V =			2.4.0
 PKGNAME =		opam-${V}
 DISTNAME =		opam-full-${V}
 
@@ -27,7 +27,6 @@
 RUN_DEPENDS =		archivers/unzip \
 			archivers/bzip2 \
 			archivers/gtar \
-			devel/gpatch \
 			devel/gmake \
 			net/curl
 
@@ -40,12 +39,11 @@
 CONFIGURE_ENV +=	CFLAGS="${CFLAGS}" \
 			LDFLAGS="${LDFLAGS}"
 CONFIGURE_STYLE =	gnu autoreconf no-autoheader
-CONFIGURE_ARGS =	--with-vendored-deps
+CONFIGURE_ARGS =	--with-vendored-deps \
+			--with-mccs
 AUTOCONF_VERSION =	2.69
 AUTOMAKE_VERSION =	1.16
 
-ALL_TARGET =		lib-ext all
-INSTALL_TARGET =	install
 TEST_TARGET =		tests
 
 docdir =		${PREFIX}/share/doc/opam
diff --git a/sysutils/opam/distinfo b/sysutils/opam/distinfo
index f382994fba..a3c0368aa2 100644
--- a/sysutils/opam/distinfo
+++ b/sysutils/opam/distinfo
@@ -1,2 +1,2 @@
-SHA256 (opam-full-2.3.0.tar.gz) = UGunaGXcMVtn35qonnq9XBqJen8KkteyaUl0/cUys0Y=
-SIZE (opam-full-2.3.0.tar.gz) = 12860518
+SHA256 (opam-full-2.4.0.tar.gz) = EZ9B77EZLa019Ef78cYgL/wzEQXpSdKYCnXfjLLJMoI=
+SIZE (opam-full-2.4.0.tar.gz) = 14294005
diff --git a/sysutils/opam/patches/patch-configure_ac b/sysutils/opam/patches/patch-configure_ac
index d7506a85d7..09b8ec28b4 100644
--- a/sysutils/opam/patches/patch-configure_ac
+++ b/sysutils/opam/patches/patch-configure_ac
@@ -3,7 +3,7 @@
 Index: configure.ac
 --- configure.ac.orig
 +++ configure.ac
-@@ -252,7 +252,6 @@ AS_IF([test "x${enable_certificate_check}" = "xno"], [
+@@ -280,7 +280,6 @@ AS_IF([test "x${enable_certificate_check}" = "xno"], [
  
  AC_CHECK_PROGS(FETCH,[curl wget],no)
  
diff --git a/sysutils/opam/patches/patch-src_state_opamSysInteract_ml b/sysutils/opam/patches/patch-src_state_opamSysInteract_ml
deleted file mode 100644
index 9cb15a60d2..0000000000
--- a/sysutils/opam/patches/patch-src_state_opamSysInteract_ml
+++ /dev/null
@@ -1,14 +0,0 @@
-backport https://github.com/ocaml/opam/pull/6362
-
-Index: src/state/opamSysInteract.ml
---- src/state/opamSysInteract.ml.orig
-+++ src/state/opamSysInteract.ml
-@@ -972,7 +972,7 @@ let packages_status ?(env=OpamVariable.Map.empty) conf
-     compute_sets sys_installed
-   | Openbsd ->
-     let sys_installed =
--      run_query_command "pkg_info" ["-mqP"]
-+      run_query_command "pkg_info" ["-qP"]
-       |> package_set_of_pkgpath
-     in
-     compute_sets sys_installed
diff --git a/sysutils/opam/pkg/PLIST b/sysutils/opam/pkg/PLIST
index 1434f63529..04d455bbb2 100644
--- a/sysutils/opam/pkg/PLIST
+++ b/sysutils/opam/pkg/PLIST
@@ -5,12 +5,14 @@
 @man man/man1/opam-admin-add-hashes.1
 @man man/man1/opam-admin-cache.1
 @man man/man1/opam-admin-check.1
+@man man/man1/opam-admin-compare-versions.1
 @man man/man1/opam-admin-filter.1
 @man man/man1/opam-admin-help.1
 @man man/man1/opam-admin-index.1
 @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-migrate-extrafiles.1
 @man man/man1/opam-admin-update-extrafiles.1
 @man man/man1/opam-admin-upgrade.1
 @man man/man1/opam-admin.1
@@ -51,7 +53,6 @@
 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