Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opam: update to 2.3.0 #27076

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions ocaml/opam/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0
PortGroup github 1.0
PortGroup legacysupport 1.1

github.setup ocaml opam 2.2.0
# faccessat
legacysupport.newest_darwin_requires_legacy 13

github.setup ocaml opam 2.3.0

name opam
revision 0
Expand All @@ -19,14 +23,11 @@ long_description OPAM is a source-based package manager for OCaml.\
development workflow.

github.tarball_from releases
# At the next update, remove the "-2"
distname opam-full-${version}-2
# At the next update, remove setting "worksrcdir" because it won't be needed.
worksrcdir opam-full-${version}
distname opam-full-${version}

checksums rmd160 4a24738dd460d1ab52edd529de86169dbe46a9b6 \
sha256 459ed64e6643f05c677563a000e3baa05c76ce528064e9cb9ce6db49fff37c97 \
size 12775907
checksums rmd160 af863ac8afccbdd3e825e3fe1fffcdf66d128993 \
sha256 506ba76865dc315b67df9aa89e7abd5c1a897a7f0a92d7b2694974fdc532b346 \
size 12860518

depends_build port:ocaml
# Opam upgrade uses patch to update the package repository,
Expand Down Expand Up @@ -62,9 +63,20 @@ if {[string match *gcc* ${configure.compiler}]} {
--without-mccs
}

if {${os.platform} eq "darwin" && ${os.major} < 11} {
# Matching ocaml 1.1 PG setting.
# See: https://github.com/ocaml/dune/issues/8941
build.env-append \
platform darwin {
if {${os.major} < 14} {
patchfiles-append \
patch-link-legacysupport.diff

post-patch {
reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/src/core/dune
}
}

if {${os.major} < 11} {
# Matching ocaml 1.1 PG setting.
# See: https://github.com/ocaml/dune/issues/8941
build.env-append \
DUNE_CONFIG__COPY_FILE=portable
}
}
13 changes: 13 additions & 0 deletions ocaml/opam/files/patch-link-legacysupport.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- src/core/dune 2024-11-13 21:31:03.000000000 +0800
+++ src/core/dune 2024-12-15 04:08:08.000000000 +0800
@@ -13,8 +13,10 @@
(names opam_stubs)
(flags :standard
-DUNICODE -D_UNICODE -DCAML_NAME_SPACE
+ -I@PREFIX@/include/LegacySupport
(:include c-flags.sexp)))
(c_library_flags (:standard
+ -lMacportsLegacySupport
(:include c-libraries.sexp)))
(wrapped false))