<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/6d3230f54f35881b5225fa466b92ddeabb8c2a01">https://github.com/macports/macports-ports/commit/6d3230f54f35881b5225fa466b92ddeabb8c2a01</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 6d3230f54f3 ocaml: fix build for PPC
</span>6d3230f54f3 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 6d3230f54f35881b5225fa466b92ddeabb8c2a01
</span>Author: Sergey Fedorov <vital.had@gmail.com>
AuthorDate: Sat May 14 21:51:22 2022 +0800
<span style='display:block; white-space:pre;color:#404040;'> ocaml: fix build for PPC
</span>---
lang/ocaml/Portfile | 19 +++++---
lang/ocaml/files/patch-configure-darwin-ppc.diff | 60 ++++++++++++++++++++++++
2 files changed, 73 insertions(+), 6 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/ocaml/Portfile b/lang/ocaml/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 50ab3df34c9..aadb432bcd5 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/ocaml/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/ocaml/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -14,12 +14,12 @@ PortGroup compiler_blacklist_versions 1.0
</span> name ocaml
epoch 1
version 4.12.1
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> set major_vers [join [lrange [split ${version} .] 0 1] .]
platforms darwin
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Note that i386 on Mac is truly no longer supported by upstream
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note that ppc, ppc64 and i386 on Mac are no longer supported by upstream
</span> # We may have to remove support at some point.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-supported_archs i386 x86_64 arm64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+supported_archs i386 x86_64 arm64 ppc ppc64
</span> maintainers {pmetzger @pmetzger} openmaintainer
categories lang ocaml
license LGPL
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -47,18 +47,21 @@ compiler.blacklist gcc-4.0 *gcc-4.2 {clang < 400}
</span> # debug problems with these patches.
if {${os.major} < 11} {
# need to add strnlen patch as not in library
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append patch-strnlen-socketaddr.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-strnlen-socketaddr.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-configure-darwin-ppc.diff
</span>
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${build_arch} eq "i386" || ${build_arch} eq "x86_64"} {
</span> # compiler selection pulls in clang-3.4 on 10.6 and less
# and this compiler is needed for this port to run once installed
# so force this compiler and require it at runtime
compiler.whitelist macports-clang-3.4
depends_run-append port:clang-3.4
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
# Note: the port maintainer has no access to an i386 host, and cannot
# debug problems on one.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {${build_arch} eq "i386"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${build_arch} eq "i386" || ${build_arch} eq "ppc"} {
</span> patchfiles-append patch-configure-darwin32.diff
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -77,7 +80,11 @@ configure.env-append \
</span> configure.pre_args --prefix=${prefix} --mandir=${prefix}/share/man
# Building.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-build.target world.opt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.target world
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.target world.opt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
post-destroot {
xinstall -d ${destroot}${docdir}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/ocaml/files/patch-configure-darwin-ppc.diff b/lang/ocaml/files/patch-configure-darwin-ppc.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..091616b3c52
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/ocaml/files/patch-configure-darwin-ppc.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,60 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- configure.orig 2021-09-24 21:06:54.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ configure 2022-05-23 22:55:50.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -13732,6 +13732,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ natdynlink=true ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ x86_64-*-darwin*) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ natdynlink=true ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ powerpc*-*-darwin*) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ natdynlink=true ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ s390x*-*-linux*) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ natdynlink=true ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ powerpc*-*-linux*) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -13937,6 +13939,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arch=arm64; system=macosx ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ x86_64-*-darwin*) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arch=amd64; system=macosx ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ powerpc*-*-darwin*) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arch=power; if $arch64; then :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ model=ppc64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ model=ppc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi; system=rhapsody ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ x86_64-*-mingw32) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arch=amd64; system=mingw64 ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ aarch64-*-linux*) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -14071,6 +14079,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case "$arch,$CC,$system,$model" in #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ amd64,gcc*,macosx,*) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PACKLD_FLAGS=' -arch x86_64' ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ power,*gcc*,rhapsody,ppc) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PACKLD_FLAGS=' -arch ppc' ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ power,*gcc*,rhapsody,ppc64) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PACKLD_FLAGS=' -arch ppc64' ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ power,gcc*,elf,ppc) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PACKLD_FLAGS=' -m elf32ppclinux' ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ power,gcc*,elf,ppc64) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -14241,6 +14253,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_as="${toolpref}as -arch x86_64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_aspp="${toolpref}gcc -arch x86_64 -c" ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ esac ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ power,rhapsody) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case $model in #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ppc64) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default_as="$default_as -m64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default_aspp="$default_as -m64 -c" ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ppc) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default_as="$default_as"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default_aspp="$default_as -m32 -c" ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++esac ;; #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ amd64,solaris) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case $ocaml_cv_cc_vendor in #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sunc-*) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -15923,7 +15944,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $as_echo_n "checking whether stack overflows can be detected... " >&6; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case $arch,$system in #(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- i386,linux_elf|amd64,linux|amd64,macosx \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ i386,linux_elf|amd64,linux|amd64,macosx|power,rhapsody \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ |amd64,openbsd|i386,bsd_elf) :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $as_echo "#define HAS_STACK_OVERFLOW_DETECTION 1" >>confdefs.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>