pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/ocaml ocaml: Adjust PLIST for old MacOS
details: https://anonhg.NetBSD.org/pkgsrc/rev/7aac1c0e75b6
branches: trunk
changeset: 386348:7aac1c0e75b6
user: gdt <gdt%pkgsrc.org@localhost>
date: Tue Oct 16 00:19:40 2018 +0000
description:
ocaml: Adjust PLIST for old MacOS
MacOS before 10.13 lacks the POSIX-required clock_gettime(), and fails
to build some "instrumented runtime" files. Conditionalize the PLIST
and avoid expecting these on older MacOS.
Based almost entirely on a patch from Ryo Kogule on tech-pkg@, with
minor munging by me.
diffstat:
lang/ocaml/Makefile | 14 ++++++++++++--
lang/ocaml/PLIST | 14 +++++++-------
2 files changed, 19 insertions(+), 9 deletions(-)
diffs (93 lines):
diff -r 1f6233b63bda -r 7aac1c0e75b6 lang/ocaml/Makefile
--- a/lang/ocaml/Makefile Mon Oct 15 17:53:23 2018 +0000
+++ b/lang/ocaml/Makefile Tue Oct 16 00:19:40 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.120 2018/07/19 12:16:38 jaapb Exp $
+# $NetBSD: Makefile,v 1.121 2018/10/16 00:19:40 gdt Exp $
.include "Makefile.common"
@@ -12,7 +12,8 @@
USE_GCC_RUNTIME= yes
-PLIST_VARS+= ocaml-stub ocaml-prof ocaml-opt ocaml-nat ocaml-spacetime
+PLIST_VARS+= ocaml-stub ocaml-prof ocaml-opt ocaml-nat ocaml-spacetime \
+ instrumented_runtime
.include "options.mk"
###
@@ -61,6 +62,13 @@
PLIST.ocaml-spacetime= yes
.endif
+# clock_gettime(2), required by POSIX, is necessary for the
+# instrumented_runtime feature.
+# It is missing on macOS before 10.12.
+.if ${OPSYS} != "Darwin" || ${OS_VERSION:R:R} >= 16
+PLIST.instrumented_runtime=yes
+.endif
+
# This is needed because ${WRKSRC}/build/partial-install.sh uses
# $PWD as part of its script. However, with /bin/sh on SunOS
# (cd work/foo-1.0 && echo $PWD) will show that the value of PWD is
@@ -80,8 +88,10 @@
PRINT_PLIST_AWK+= { gsub(/lib\/ocaml\/${PKGMANDIR:S|/|\\/|}/, "lib/ocaml/$${PKGMANDIR}"); }
+.if defined(PLIST.instrumented_runtime)
REPLACE_BASH+= tools/ocaml-instr-graph
REPLACE_AWK+= tools/ocaml-instr-report
+.endif
do-test:
cd ${WRKSRC}/testsuite && ${MAKE_PROGRAM} all
diff -r 1f6233b63bda -r 7aac1c0e75b6 lang/ocaml/PLIST
--- a/lang/ocaml/PLIST Mon Oct 15 17:53:23 2018 +0000
+++ b/lang/ocaml/PLIST Tue Oct 16 00:19:40 2018 +0000
@@ -1,7 +1,7 @@
-@comment $NetBSD: PLIST,v 1.48 2018/09/25 11:39:12 jperkin Exp $
+@comment $NetBSD: PLIST,v 1.49 2018/10/16 00:19:40 gdt Exp $
bin/ocaml
-bin/ocaml-instr-graph
-bin/ocaml-instr-report
+${PLIST.instrumented_runtime}bin/ocaml-instr-graph
+${PLIST.instrumented_runtime}bin/ocaml-instr-report
bin/ocamlc
bin/ocamlc.byte
${PLIST.ocaml-opt}bin/ocamlc.opt
@@ -38,7 +38,7 @@
${PLIST.ocaml-opt}bin/ocamlprof.opt
bin/ocamlrun
bin/ocamlrund
-bin/ocamlruni
+${PLIST.instrumented_runtime}bin/ocamlruni
bin/ocamlyacc
lib/ocaml/Makefile.config
lib/ocaml/VERSION
@@ -1300,14 +1300,14 @@
${PLIST.ocaml-opt}lib/ocaml/libasmrun_pic.a
${PLIST.ocaml-opt}lib/ocaml/libasmrun_shared.so
${PLIST.ocaml-opt}lib/ocaml/libasmrund.a
-${PLIST.ocaml-opt}lib/ocaml/libasmruni.a
+${PLIST.instrumented_runtime}${PLIST.ocaml-opt}lib/ocaml/libasmruni.a
${PLIST.ocaml-prof}${PLIST.ocaml-opt}lib/ocaml/libasmrunp.a
${PLIST.ocaml-opt}lib/ocaml/libbigarray.a
${PLIST.ocaml-opt}lib/ocaml/libcamlrun.a
${PLIST.ocaml-opt}lib/ocaml/libcamlrun_pic.a
${PLIST.ocaml-opt}lib/ocaml/libcamlrun_shared.so
${PLIST.ocaml-opt}lib/ocaml/libcamlrund.a
-${PLIST.ocaml-opt}lib/ocaml/libcamlruni.a
+${PLIST.instrumented_runtime}${PLIST.ocaml-opt}lib/ocaml/libcamlruni.a
${PLIST.ocaml-opt}lib/ocaml/libcamlstr.a
${PLIST.ocaml-spacetime}${PLIST.ocaml-opt}lib/ocaml/libraw_spacetime_lib.a
${PLIST.ocaml-opt}lib/ocaml/libthreads.a
@@ -2047,7 +2047,7 @@
lib/ocaml/sys.ml
lib/ocaml/sys.mli
lib/ocaml/target_camlheaderd
-lib/ocaml/target_camlheaderi
+${PLIST.instrumented_runtime}lib/ocaml/target_camlheaderi
lib/ocaml/thread.mli
lib/ocaml/threadUnix.mli
lib/ocaml/threads/condition.cmi
Home |
Main Index |
Thread Index |
Old Index