diff options
author | uebayasi <uebayasi> | 2011-06-15 05:25:46 +0000 |
---|---|---|
committer | uebayasi <uebayasi> | 2011-06-15 05:25:46 +0000 |
commit | 21df7b0f9a579838aa9968c12d8a4489c51f365f (patch) | |
tree | 9b49f8845646a0b708f4ddde352e20692a966794 /devel | |
parent | 0da5d750ea946581df6eb233cddc9a66899a9907 (diff) | |
download | pkgsrc-21df7b0f9a579838aa9968c12d8a4489c51f365f.tar.gz |
Check-point ocamlfind buildlink3.mk; overwrite "ocamlfind install" command
to ease ${DESTDIR} support.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/ocaml-findlib/buildlink3.mk | 34 | ||||
-rw-r--r-- | devel/ocaml-findlib/files/ocamlfind.sh | 26 |
2 files changed, 60 insertions, 0 deletions
diff --git a/devel/ocaml-findlib/buildlink3.mk b/devel/ocaml-findlib/buildlink3.mk new file mode 100644 index 00000000000..eb447c07044 --- /dev/null +++ b/devel/ocaml-findlib/buildlink3.mk @@ -0,0 +1,34 @@ +# $NetBSD: buildlink3.mk,v 1.3 2011/06/15 05:25:46 uebayasi Exp $ + +BUILDLINK_TREE+= ocaml-findlib + +.if !defined(OCAML_FINDLIB_BUILDLINK3_MK) +OCAML_FINDLIB_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.ocaml-findlib+=ocaml-findlib>=1.2 +BUILDLINK_ABI_DEPENDS.ocaml-findlib+=ocaml-findlib>=1.2 +BUILDLINK_PKGSRCDIR.ocaml-findlib?= ../../devel/ocaml-findlib + +BUILDLINK_TARGETS+= ocaml-findlib-wrappers ocaml-findlib-ldconf + +.PHONY: ocaml-findlib-wrappers +ocaml-findlib-wrappers: + ${RUN} \ + ${SED} -e 's|@SH@|'${SH:Q}'|g' \ + -e 's|@OCAML_FINDLIB_PREFIX@|${BUILDLINK_PREFIX.ocaml-findlib}|g' \ + -e 's|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g' \ + < ${.CURDIR}/../../devel/ocaml-findlib/files/ocamlfind.sh \ + > ${BUILDLINK_DIR}/bin/ocamlfind; \ + ${CHMOD} +x ${BUILDLINK_DIR}/bin/ocamlfind + +.PHONY: ocaml-findlib-ldconf +ocaml-findlib-ldconf: + ${RUN} \ + ${CP} ${BUILDLINK_PREFIX.ocaml}/lib/ocaml/ld.conf \ + ${BUILDLINK_DIR}/lib/ocaml + +.endif # OCAML_FINDLIB_BUILDLINK3_MK + +INSTALLATION_DIRS+= lib/ocaml/site-lib + +BUILDLINK_TREE+= -ocaml-findlib diff --git a/devel/ocaml-findlib/files/ocamlfind.sh b/devel/ocaml-findlib/files/ocamlfind.sh new file mode 100644 index 00000000000..65d749e4c1d --- /dev/null +++ b/devel/ocaml-findlib/files/ocamlfind.sh @@ -0,0 +1,26 @@ +#!@SH@ + +# $NetBSD: ocamlfind.sh,v 1.1 2011/06/15 05:25:47 uebayasi Exp $ + +args="$@" +case "$args" in +*install*) + install_args= + case "$args" in + *-destdir*) ;; + *) + install_args="${install_args} -destdir ${DESTDIR}@OCAML_FINDLIB_PREFIX@/lib/ocaml/site-lib" + ;; + esac + case "$args" in + *-ldconf*) ;; + *) + install_args="${install_args} -ldconf @BUILDLINK_DIR@/lib/ocaml/ld.conf" + ;; + esac + args="${args%%install*}install ${install_args}${args##*install}" + ;; +*) ;; +esac + +exec "@OCAML_FINDLIB_PREFIX@/bin/`basename $0`" ${args} |