Mon Apr 20 02:36:05 2015 UTC ()
Add PRINT_PLIST_AWK code to put ${OCAML_SITELIB} into generated PLIST.

OK'ed by jaapb@ in private mail.


(hiramatsu)
diff -r1.3 -r1.4 pkgsrc/mk/ocaml.mk

cvs diff -r1.3 -r1.4 pkgsrc/mk/Attic/ocaml.mk (expand / switch to unified diff)

--- pkgsrc/mk/Attic/ocaml.mk 2014/10/27 11:58:36 1.3
+++ pkgsrc/mk/Attic/ocaml.mk 2015/04/20 02:36:05 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: ocaml.mk,v 1.3 2014/10/27 11:58:36 jaapb Exp $ 1# $NetBSD: ocaml.mk,v 1.4 2015/04/20 02:36:05 hiramatsu Exp $
2# 2#
3# This Makefile fragment handles the common variables used by OCaml packages. 3# This Makefile fragment handles the common variables used by OCaml packages.
4# 4#
5# Build def variables: 5# Build def variables:
6# OCAML_USE_OPT_COMPILER  6# OCAML_USE_OPT_COMPILER
7# if set to yes, will enable optimised (native code) compilation 7# if set to yes, will enable optimised (native code) compilation
8# default value: depends on architecture 8# default value: depends on architecture
9# 9#
10# PLIST variable: 10# PLIST variable:
11# PLIST.ocaml-opt for files only installed when using the optimised compiler 11# PLIST.ocaml-opt for files only installed when using the optimised compiler
12# Set based on OCAML_USE_OPT_COMPILER 12# Set based on OCAML_USE_OPT_COMPILER
13#  13#
14# Package-settable variables: 14# Package-settable variables:
@@ -75,26 +75,30 @@ CONFIGURE_ARGS+= --prefix "${PREFIX}" @@ -75,26 +75,30 @@ CONFIGURE_ARGS+= --prefix "${PREFIX}"
75# Force use of native code compiler according to setting 75# Force use of native code compiler according to setting
76.if ${OCAML_USE_OPT_COMPILER} == "yes" 76.if ${OCAML_USE_OPT_COMPILER} == "yes"
77CONFIGURE_ARGS+= --override is_native true 77CONFIGURE_ARGS+= --override is_native true
78.else 78.else
79CONFIGURE_ARGS+= --override is_native false 79CONFIGURE_ARGS+= --override is_native false
80.endif 80.endif
81.endif 81.endif
82 82
83# Value for OCAML_SITELIBDIR 83# Value for OCAML_SITELIBDIR
84OCAML_SITELIBDIR= lib/ocaml/site-lib 84OCAML_SITELIBDIR= lib/ocaml/site-lib
85MAKE_ENV+= OCAML_SITELIBDIR="${OCAML_SITELIBDIR}" 85MAKE_ENV+= OCAML_SITELIBDIR="${OCAML_SITELIBDIR}"
86PLIST_SUBST+= OCAML_SITELIB="${OCAML_SITELIBDIR}" 86PLIST_SUBST+= OCAML_SITELIB="${OCAML_SITELIBDIR}"
87 87
 88PRINT_PLIST_AWK+= { gsub(/${OCAML_SITELIBDIR:S|/|\\/|g}/, \
 89 "$${OCAML_SITELIB}"); \
 90 print; next; }
 91
88.if ${OCAML_USE_FINDLIB} == "yes" 92.if ${OCAML_USE_FINDLIB} == "yes"
89.include "../../devel/ocaml-findlib/buildlink3.mk" 93.include "../../devel/ocaml-findlib/buildlink3.mk"
90INSTALLATION_DIRS+= ${OCAML_SITELIBDIR} 94INSTALLATION_DIRS+= ${OCAML_SITELIBDIR}
91.endif 95.endif
92 96
93# 97#
94# Compiler stuff 98# Compiler stuff
95# 99#
96 100
97# Things that get installed with the opt compiler 101# Things that get installed with the opt compiler
98PLIST_VARS+= ocaml-opt 102PLIST_VARS+= ocaml-opt
99 103
100.if ${OCAML_USE_OPT_COMPILER} == "yes" 104.if ${OCAML_USE_OPT_COMPILER} == "yes"