pkgsrc-Changes-HG archive

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

[pkgsrc/pkgsrc-2018Q3]: pkgsrc/lang/ocaml Pullup ticket #5851 - requested by gdt



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b351d4f0386f
branches:  pkgsrc-2018Q3
changeset: 334104:b351d4f0386f
user:      spz <spz%pkgsrc.org@localhost>
date:      Thu Oct 25 05:51:28 2018 +0000

description:
Pullup ticket #5851 - requested by gdt
lang/ocaml: build fix

Revisions pulled up:
- lang/ocaml/Makefile                                           1.121
- lang/ocaml/PLIST                                              1.49

-------------------------------------------------------------------
   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

diffstat:

 lang/ocaml/Makefile |  14 ++++++++++++--
 lang/ocaml/PLIST    |  14 +++++++-------
 2 files changed, 19 insertions(+), 9 deletions(-)

diffs (93 lines):

diff -r de0e815d6649 -r b351d4f0386f lang/ocaml/Makefile
--- a/lang/ocaml/Makefile       Sat Oct 20 16:32:43 2018 +0000
+++ b/lang/ocaml/Makefile       Thu Oct 25 05:51:28 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.120 2018/07/19 12:16:38 jaapb Exp $
+# $NetBSD: Makefile,v 1.120.2.1 2018/10/25 05:51:28 spz 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 de0e815d6649 -r b351d4f0386f lang/ocaml/PLIST
--- a/lang/ocaml/PLIST  Sat Oct 20 16:32:43 2018 +0000
+++ b/lang/ocaml/PLIST  Thu Oct 25 05:51:28 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.48.2.1 2018/10/25 05:51:28 spz 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