pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/ocaml



Module Name:    pkgsrc
Committed By:   gdt
Date:           Tue Oct 16 00:19:40 UTC 2018

Modified Files:
        pkgsrc/lang/ocaml: Makefile PLIST

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 pkgsrc/lang/ocaml/Makefile
cvs rdiff -u -r1.48 -r1.49 pkgsrc/lang/ocaml/PLIST

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/ocaml/Makefile
diff -u pkgsrc/lang/ocaml/Makefile:1.120 pkgsrc/lang/ocaml/Makefile:1.121
--- pkgsrc/lang/ocaml/Makefile:1.120    Thu Jul 19 12:16:38 2018
+++ pkgsrc/lang/ocaml/Makefile  Tue Oct 16 00:19:40 2018
@@ -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_TOOLS+=           bash
 
 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-nat= yes
 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 @@ EXTRA_RT_LIBS.*=
 
 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

Index: pkgsrc/lang/ocaml/PLIST
diff -u pkgsrc/lang/ocaml/PLIST:1.48 pkgsrc/lang/ocaml/PLIST:1.49
--- pkgsrc/lang/ocaml/PLIST:1.48        Tue Sep 25 11:39:12 2018
+++ pkgsrc/lang/ocaml/PLIST     Tue Oct 16 00:19:40 2018
@@ -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 @@ bin/ocamlprof.byte
 ${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.a
 ${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/stublibs/dllvmthreads.so
 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