diff options
author | spz <spz@pkgsrc.org> | 2018-10-25 05:51:28 +0000 |
---|---|---|
committer | spz <spz@pkgsrc.org> | 2018-10-25 05:51:28 +0000 |
commit | 410804fdf6d0b3ec343248415a291658482ba445 (patch) | |
tree | dfe5d6dfb5c062e49bdd2fa5c1cf5ff3506ddfa8 | |
parent | 64e4eca4a951c8287f2144335a27cc1ff7ea2864 (diff) | |
download | pkgsrc-410804fdf6d0b3ec343248415a291658482ba445.tar.gz |
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
-rw-r--r-- | lang/ocaml/Makefile | 14 | ||||
-rw-r--r-- | lang/ocaml/PLIST | 14 |
2 files changed, 19 insertions, 9 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile index b41e069207c..582f849ab0c 100644 --- a/lang/ocaml/Makefile +++ b/lang/ocaml/Makefile @@ -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_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 diff --git a/lang/ocaml/PLIST b/lang/ocaml/PLIST index 2b781557b83..e31fd2e1889 100644 --- a/lang/ocaml/PLIST +++ b/lang/ocaml/PLIST @@ -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 @@ 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 |