From 7638e6aabb64ffecd7e41704a580237cf6095446 Mon Sep 17 00:00:00 2001 From: Mikael Urankar Date: Fri, 28 Jul 2023 09:04:38 +0200 Subject: [PATCH] lang/ocaml: Fix build on aarch64 SYSTEM_ARCH has to be set to arm64 The raw_spacetime_lib is only built on aarch64 Approved by: portmgr (build fix blanket) --- lang/ocaml/Makefile | 8 +++++++- lang/ocaml/pkg-plist | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile index 93eb441d046e..d63fb1677eea 100644 --- a/lang/ocaml/Makefile +++ b/lang/ocaml/Makefile @@ -48,7 +48,7 @@ CONFIGURE_ARGS= --prefix="${PREFIX}" CONFIGURE_ENV= LDFLAGS="${LDFLAGS}" \ ASPP="${CC} -c" \ PARTIALLD="${LD} -r" -MAKE_ENV= SYSTEM_ARCH="${ARCH:C/powerpc.*/power/}" +MAKE_ENV= SYSTEM_ARCH="${ARCH:C/aarch64/arm64/:C/powerpc.*/power/}" OPTIONS_DEFINE= X11 THREADS DOCS EXAMPLES OPTIONS_DEFAULT=X11 THREADS @@ -74,6 +74,12 @@ DOCS_DISTFILES= ${DISTNAME:R}-refman-html.tar.gz:docs \ .include +.if ${ARCH} == aarch64 +PLIST_SUB+= RAWSPACETIMELIB=" " +.else +PLIST_SUB+= RAWSPACETIMELIB="@comment " +.endif + .if ${ARCH} == armv6 || ${ARCH} == armv7 CONFIGURE_ENV+= AS="${AS} ${ASFLAGS} -meabi=5" \ CC="${CC}" diff --git a/lang/ocaml/pkg-plist b/lang/ocaml/pkg-plist index 279c64a18e83..a1a148c53974 100644 --- a/lang/ocaml/pkg-plist +++ b/lang/ocaml/pkg-plist @@ -1440,6 +1440,7 @@ lib/ocaml/libcamlrund.a lib/ocaml/libcamlruni.a lib/ocaml/libcamlstr.a %%X11%%lib/ocaml/libgraphics.a +%%RAWSPACETIMELIB%%lib/ocaml/libraw_spacetime_lib.a %%THREADS%%lib/ocaml/libthreads.a %%THREADS%%lib/ocaml/libthreadsnat.a lib/ocaml/libunix.a @@ -1581,6 +1582,14 @@ lib/ocaml/queue.ml lib/ocaml/queue.mli lib/ocaml/random.ml lib/ocaml/random.mli +%%RAWSPACETIMELIB%%lib/ocaml/raw_spacetime_lib.a +%%RAWSPACETIMELIB%%lib/ocaml/raw_spacetime_lib.cma +%%RAWSPACETIMELIB%%lib/ocaml/raw_spacetime_lib.cmi +%%RAWSPACETIMELIB%%lib/ocaml/raw_spacetime_lib.cmti +%%RAWSPACETIMELIB%%lib/ocaml/raw_spacetime_lib.cmx +%%RAWSPACETIMELIB%%lib/ocaml/raw_spacetime_lib.cmxa +%%RAWSPACETIMELIB%%lib/ocaml/raw_spacetime_lib.cmxs +%%RAWSPACETIMELIB%%lib/ocaml/raw_spacetime_lib.mli lib/ocaml/result.ml lib/ocaml/result.mli lib/ocaml/scanf.ml @@ -1957,6 +1966,7 @@ lib/ocaml/stringLabels.ml lib/ocaml/stringLabels.mli lib/ocaml/stublibs/dllcamlstr.so %%X11%%lib/ocaml/stublibs/dllgraphics.so +%%RAWSPACETIMELIB%%lib/ocaml/stublibs/dllraw_spacetime_lib.so %%THREADS%%lib/ocaml/stublibs/dllthreads.so lib/ocaml/stublibs/dllunix.so lib/ocaml/stublibs/dllvmthreads.so