Skip to content

Commit

Permalink
lang/ocaml: Fix build on aarch64
Browse files Browse the repository at this point in the history
SYSTEM_ARCH has to be set to arm64
The raw_spacetime_lib is only built on aarch64

Approved by:	portmgr (build fix blanket)
  • Loading branch information
MikaelUrankar committed Jul 28, 2023
1 parent 1c54dce commit 7638e6a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lang/ocaml/Makefile
Expand Up @@ -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
Expand All @@ -74,6 +74,12 @@ DOCS_DISTFILES= ${DISTNAME:R}-refman-html.tar.gz:docs \

.include <bsd.port.pre.mk>

.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}"
Expand Down
10 changes: 10 additions & 0 deletions lang/ocaml/pkg-plist
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7638e6a

Please sign in to comment.