diff options
author | jmmv <jmmv@pkgsrc.org> | 2004-12-24 18:49:09 +0000 |
---|---|---|
committer | jmmv <jmmv@pkgsrc.org> | 2004-12-24 18:49:09 +0000 |
commit | ef29c0de9c31a50ae65c7b07c77ddabcb70e4326 (patch) | |
tree | 079f457b81dc4ed28c350c1275f4932a3fd31428 /lang/ocaml/buildlink3.mk | |
parent | c36bf303fcbb755694f2ab2bd674b4829689f292 (diff) | |
download | pkgsrc-ef29c0de9c31a50ae65c7b07c77ddabcb70e4326.tar.gz |
Looks like the rpath problem is a bit more serious than I initially thought
(it currently affects packages using X11, but I guess it will also cause
problems when using pkgviews, for example).
So, instead of fixing it on a package basis, create some wrappers in the
buildlink directory that parse CFLAGS and LDFLAGS contents and convert them
to ocaml flags (basically, prepend -ccopt to each of them).
Diffstat (limited to 'lang/ocaml/buildlink3.mk')
-rw-r--r-- | lang/ocaml/buildlink3.mk | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lang/ocaml/buildlink3.mk b/lang/ocaml/buildlink3.mk index fdd0ec61157..6ef5317f468 100644 --- a/lang/ocaml/buildlink3.mk +++ b/lang/ocaml/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.10 2004/12/24 17:16:04 jmmv Exp $ +# $NetBSD: buildlink3.mk,v 1.11 2004/12/24 18:49:09 jmmv Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ OCAML_BUILDLINK3_MK:= ${OCAML_BUILDLINK3_MK}+ @@ -23,6 +23,22 @@ INSTALL_UNSTRIPPED= yes PRINT_PLIST_AWK+= /^@dirrm lib\/ocaml$$/ \ { print "@comment in ocaml: " $$0; next } +BUILDLINK_TARGETS+= ocaml-wrappers +OCAML_WRAPPERS= ocaml ocamlc ocamlc.opt ocamlcp ocamlmklib ocamlmktop \ + ocamlopt ocamlopt.opt + +ocaml-wrappers: + ${_PKG_SILENT}${_PKG_DEBUG} \ + for w in ${OCAML_WRAPPERS}; do \ + ${SED} -e 's|@SH@|${SH}|g' \ + -e 's|@OCAML_PREFIX@|${BUILDLINK_PREFIX.ocaml}|g' \ + -e 's|@CFLAGS@|${CFLAGS}|g' \ + -e 's|@LDFLAGS@|${LDFLAGS}|g' \ + <${.CURDIR}/../../lang/ocaml/files/wrapper.sh \ + >${BUILDLINK_DIR}/bin/$$w; \ + ${CHMOD} +x ${BUILDLINK_DIR}/bin/$$w; \ + done + .endif # OCAML_BUILDLINK3_MK BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} |