Bug 291256 - devel/ocaml-opam: update to 2.5.0
Summary: devel/ocaml-opam: update to 2.5.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yusuf Yaman
URL: https://github.com/ocaml/opam/release...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-27 23:04 UTC by kit-ty-kate
Modified: 2026-04-08 13:50 UTC (History)
4 users (show)

See Also:
vvd: maintainer-feedback+


Attachments
0001-devel-ocaml-opam-update-to-2.5.0.patch (1.19 KB, patch)
2025-11-27 23:04 UTC, kit-ty-kate
no flags Details | Diff
0001-devel-ocaml-opam-update-to-2.5.0.patch (1.19 KB, patch)
2026-01-20 13:03 UTC, kit-ty-kate
hannes: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kit-ty-kate 2025-11-27 23:04:38 UTC
Created attachment 265676 [details]
0001-devel-ocaml-opam-update-to-2.5.0.patch
Comment 1 Hannes Mehnert 2026-01-20 11:30:12 UTC
Sorry for the late reply.

The patch does only change the DISTVERSION, the distinfo needs to be changed as well.
Comment 2 kit-ty-kate 2026-01-20 13:03:24 UTC
Created attachment 267325 [details]
0001-devel-ocaml-opam-update-to-2.5.0.patch
Comment 3 Hannes Mehnert 2026-03-06 10:48:01 UTC
This looks good to me, thanks. Sorry for the delay.
Comment 4 Yusuf Yaman freebsd_committer freebsd_triage 2026-03-10 15:42:01 UTC
Hi,

Thank you for your submission.

For me, the patch in files/patch-Makefile fails to apply cleanly.

$ make patch
===>  License LGPL21 accepted by the user
===>   ocaml-opam-2.5.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by ocaml-opam-2.5.0 for building
===>  Extracting for ocaml-opam-2.5.0
=> SHA256 Checksum OK for opam-full-2.5.0.tar.gz.
===>  Patching for ocaml-opam-2.5.0
===>  Applying FreeBSD patches for ocaml-opam-2.5.0 from /home/yusuf/doc/git/ports/devel/ocaml-opam/files
1 out of 1 hunks failed--saving rejects to Makefile.rej
===>  FAILED Applying FreeBSD patch-Makefile
===> FAILED to apply cleanly FreeBSD patch(es)  patch-Makefile
*** Error code 1

Stop.
make[1]: stopped in /home/yusuf/doc/git/ports/devel/ocaml-opam
*** Error code 1

Stop.
make: stopped in /home/yusuf/doc/git/ports/devel/ocaml-opam
Comment 5 Yusuf Yaman freebsd_committer freebsd_triage 2026-03-13 10:09:33 UTC
The files/patch-Makefile can work with a slight adjustment.

diff --git a/devel/ocaml-opam/files/patch-Makefile b/devel/ocaml-opam/files/patch-Makefile
index 9e275c51ad28..116aa3533dd9 100644
--- a/devel/ocaml-opam/files/patch-Makefile
+++ b/devel/ocaml-opam/files/patch-Makefile
@@ -1,11 +1,11 @@
---- Makefile.orig      2023-05-27 12:33:21 UTC
+--- Makefile.orig      2025-11-25 15:04:46 UTC
 +++ Makefile
-@@ -258,7 +258,7 @@
+@@ -282,7 +282,7 @@ compiler:

  .PHONY: compiler cold
  compiler:
--      env MAKE=$(MAKE) BOOTSTRAP_EXTRA_OPTS= BOOTSTRAP_TARGETS=world.opt BOOTSTRAP_ROOT=.. BOOTSTRAP_DIR=bootstrap ./shell/bootstrap-ocaml.sh $(OCAML_PORT)
-+      env CC="$(CC)" MAKE=$(MAKE) BOOTSTRAP_EXTRA_OPTS= BOOTSTRAP_TARGETS=world.opt BOOTSTRAP_ROOT=.. BOOTSTRAP_DIR=bootstrap ./shell/bootstrap-ocaml.sh $(OCAML_PORT)
+-      env MAKE=$(MAKE) BOOTSTRAP_EXTRA_OPTS= BOOTSTRAP_TARGETS=world.opt BOOTSTRAP_ROOT=.. BOOTSTRAP_DIR=bootstrap MAKEFLAGS= MAKEOVERRIDES= ./shell/bootstrap-ocaml.sh $(OCAML_PORT)
++      env CC="$(CC)" MAKE=$(MAKE) BOOTSTRAP_EXTRA_OPTS= BOOTSTRAP_TARGETS=world.opt BOOTSTRAP_ROOT=.. BOOTSTRAP_DIR=bootstrap MAKEFLAGS= MAKEOVERRIDES= ./shell/bootstrap-ocaml.sh $(OCAML_PORT)

  src_ext/secondary/ocaml/bin/ocaml:
-       env MAKE=$(MAKE) BOOTSTRAP_EXTRA_OPTS="--disable-ocamldoc --disable-debug-runtime --disable-debugger" BOOTSTRAP_TARGETS="world opt" BOOTSTRAP_ROOT=../.. BOOTSTRAP_DIR=src_ext/secondary ./shell/bootstrap-ocaml.sh $(OCAML_PORT)
+       env MAKE=$(MAKE) BOOTSTRAP_EXTRA_OPTS="--disable-ocamldoc --disable-debug-runtime --disable-debugger" BOOTSTRAP_TARGETS="world opt" BOOTSTRAP_ROOT=../.. BOOTSTRAP_DIR=src_ext/secondary MAKEFLAGS= MAKEOVERRIDES= ./shell/bootstrap-ocaml.sh $(OCAML_PORT)
Comment 6 Yusuf Yaman freebsd_committer freebsd_triage 2026-03-28 23:35:45 UTC
The patch inside files/ fails to apply due to a change in upstream Makefile, it can be adjusted slightly prior to committing.
Comment 7 Yusuf Yaman freebsd_committer freebsd_triage 2026-04-07 10:49:37 UTC
> RUN_DEPENDS=    curl:ftp/curl \
>                gmake:devel/gmake
> 
> USES=           gmake

Do we need to add gmake to RUN_DEPENDS?
Comment 8 Sergey A. Osokin freebsd_committer freebsd_triage 2026-04-07 14:20:10 UTC
(In reply to Yusuf Yaman from comment #7)

Hi Yusuf,

Is there any specific reasons to add gmake as a dependency for running the port?
In case yes, please add it.

Thank you.
Comment 9 kit-ty-kate 2026-04-08 10:13:19 UTC
gmake isn't a """strictly""" required runtime dependency, however without it opam will fail to build its first compiler thus requiring the users themselves to troubleshoot this and to install gmake by hand anyway.

Until OCaml itself stops requiring GNU Make to compiler, opam becomes a binary first package manager, or opam becomes a truely generic package manager, i think it make sense to keep gmake as a runtime dependency.
Comment 10 commit-hook freebsd_committer freebsd_triage 2026-04-08 13:48:50 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a1bbde07f7e4065a92ab5f06a2041f2ab4b6757a

commit a1bbde07f7e4065a92ab5f06a2041f2ab4b6757a
Author:     Kate <kit-ty-kate@exn.st>
AuthorDate: 2025-11-27 23:03:16 +0000
Commit:     Yusuf Yaman <nxjoseph@FreeBSD.org>
CommitDate: 2026-04-08 13:48:20 +0000

    devel/ocaml-opam: Update 2.4.1 => 2.5.0

    Changelog:
    https://github.com/ocaml/opam/blob/2.5.0/CHANGES

    PR:             291256
    Reported by:    Kate <kit-ty-kate@exn.st>
    Approved by:    Hannes Mehnert <hannes@mehnert.org> (maintainer)
    Approved by:    vvd (co-mentor)

 devel/ocaml-opam/Makefile             |  2 +-
 devel/ocaml-opam/distinfo             |  6 +++---
 devel/ocaml-opam/files/patch-Makefile | 10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)
Comment 11 Yusuf Yaman freebsd_committer freebsd_triage 2026-04-08 13:50:48 UTC
(In reply to kit-ty-kate from comment #9)
I see, it makes sense. Thanks.

Committed, thanks.