diff options
author | jaapb <jaapb> | 2016-06-25 13:55:15 +0000 |
---|---|---|
committer | jaapb <jaapb> | 2016-06-25 13:55:15 +0000 |
commit | 7f71ce87f52de7284167823be18f76bade07c3ac (patch) | |
tree | 6f764146bab09b0e19981be283446cbbd49e9241 /devel | |
parent | 93a5b2ddc1942d9cef8ed1fffe054ae9e97e4651 (diff) | |
download | pkgsrc-7f71ce87f52de7284167823be18f76bade07c3ac.tar.gz |
- Removed ocaml-findlib-register, no longer needed;
- Updated INSTALL fragment to detect and add to ld.conf the autodetected
libraries that are part of the standard ocaml installation
Discussed on packages@ and OK'd by jperkin
Diffstat (limited to 'devel')
-rw-r--r-- | devel/ocaml-findlib/INSTALL | 22 | ||||
-rw-r--r-- | devel/ocaml-findlib/Makefile | 17 | ||||
-rw-r--r-- | devel/ocaml-findlib/PLIST | 3 | ||||
-rw-r--r-- | devel/ocaml-findlib/files/ocaml-findlib-register.sh | 23 |
4 files changed, 31 insertions, 34 deletions
diff --git a/devel/ocaml-findlib/INSTALL b/devel/ocaml-findlib/INSTALL new file mode 100644 index 00000000000..efc02a7cce9 --- /dev/null +++ b/devel/ocaml-findlib/INSTALL @@ -0,0 +1,22 @@ +#!@SH@ +# +# $NetBSD: INSTALL,v 1.1 2016/06/25 13:55:15 jaapb Exp $ + +GREP="@GREP@" +OCAML_FINDLIB_DIRS="@OCAML_FINDLIB_DIRS@" +OCAML_SITELIBDIR="@OCAML_SITELIBDIR@" +TOUCH="@TOUCH@" + +LDCONF="@PREFIX@/lib/ocaml/ld.conf" + +case "${STAGE}" in +POST-INSTALL) + ${TOUCH} "${LDCONF}.tmp" + for i in ${OCAML_FINDLIB_DIRS} + do + ${GREP} -F -v -- "${OCAML_SITELIBDIR}/$i" < "${LDCONF}" > "${LDCONF}.tmp" + ${ECHO} "@PREFIX@/${OCAML_SITELIBDIR}/$i" >> "${LDCONF}.tmp" + mv "${LDCONF}.tmp" "${LDCONF}" + done + ;; +esac diff --git a/devel/ocaml-findlib/Makefile b/devel/ocaml-findlib/Makefile index 827eb47cef4..ea413245333 100644 --- a/devel/ocaml-findlib/Makefile +++ b/devel/ocaml-findlib/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.28 2016/05/05 09:42:19 jaapb Exp $ +# $NetBSD: Makefile,v 1.29 2016/06/25 13:55:15 jaapb Exp $ DISTNAME= findlib-1.6.2 PKGNAME= ocaml-${DISTNAME} +PKGREVISION= 1 CATEGORIES= devel MASTER_SITES= http://download.camlcity.org/download/ @@ -10,12 +11,15 @@ HOMEPAGE= http://www.camlcity.org/ COMMENT= Library finder for OCaml LICENSE= mit +OCAML_FINDLIB_DIRS+= bigarray bytes compiler-libs dynlink findlib graphics \ + ocamldoc num-top num stdlib str threads unix + .include "../../mk/ocaml.mk" # Undeclared dependencies between different components MAKE_JOBS_SAFE= no -USE_TOOLS+= gmake m4 bash +USE_TOOLS+= gmake m4 bash fgrep:run sh:run USE_PKGLOCALEDIR= yes HAS_CONFIGURE= yes CONFIGURE_ARGS+= -bindir ${PREFIX}/bin @@ -35,7 +39,8 @@ INSTALLATION_DIRS= lib/ocaml libexec bin ${OCAML_SITELIBDIR} CONF_FILES= ${EGDIR}/ocamlfind.conf ${PKG_SYSCONFDIR}/ocamlfind.conf -USE_TOOLS+= fgrep:run sh:run +FILES_SUBST+= OCAML_FINDLIB_DIRS="${OCAML_FINDLIB_DIRS}" OCAML_SITELIBDIR="${OCAML_SITELIBDIR}" + SUBST_CLASSES+= ofr SUBST_STAGE.ofr= pre-configure SUBST_FILES.ofr= ocaml-findlib-register.sh @@ -48,12 +53,6 @@ SUBST_STAGE.pathes= post-install SUBST_FILES.pathes= ${DESTDIR}${PREFIX}/lib/ocaml/site-lib/findlib/Makefile.config SUBST_SED.pathes= -e 's,^\(OCAML_CORE_BIN=\).*,\1'${PREFIX:Q}/bin',' -post-extract: - ${CP} ${FILESDIR}/ocaml-findlib-register.sh ${WRKSRC} - -post-install: - ${INSTALL_SCRIPT} ${WRKSRC}/ocaml-findlib-register.sh ${DESTDIR}${PREFIX}/libexec/ocaml-findlib-register - do-test: ${RUN} cd ${WRKSRC}; ${SH} itest diff --git a/devel/ocaml-findlib/PLIST b/devel/ocaml-findlib/PLIST index c848044f9cd..bf458c74857 100644 --- a/devel/ocaml-findlib/PLIST +++ b/devel/ocaml-findlib/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.10 2016/05/05 09:42:19 jaapb Exp $ +@comment $NetBSD: PLIST,v 1.11 2016/06/25 13:55:15 jaapb Exp $ bin/ocamlfind ${OCAML_SITELIB}/bigarray/META ${OCAML_SITELIB}/bytes/META @@ -38,7 +38,6 @@ ${OCAML_SITELIB}/str/META ${OCAML_SITELIB}/threads/META ${OCAML_SITELIB}/unix/META lib/ocaml/topfind -libexec/ocaml-findlib-register @comment man/man1/ocamlfind.1 @comment man/man5/META.5 @comment man/man5/findlib.conf.5 diff --git a/devel/ocaml-findlib/files/ocaml-findlib-register.sh b/devel/ocaml-findlib/files/ocaml-findlib-register.sh deleted file mode 100644 index accf6dc2e3e..00000000000 --- a/devel/ocaml-findlib/files/ocaml-findlib-register.sh +++ /dev/null @@ -1,23 +0,0 @@ -#! @SH@ -set -eu - -ldconf="@PREFIX@/lib/ocaml/ld.conf" -fgrep="@FGREP@" - -usage() { - echo "usage: $0 <add|del> directory" 1>&2 - exit 1 -} - -test $# = 2 || usage - -action="$1" -dir="$2" - -test "$action" = "add" || test "$action" = "del" || usage - -$fgrep -v -- "$dir" < "${ldconf}" > "${ldconf}.tmp" -if test "$action" = "add"; then - printf "%s\\n" "$dir" >> "${ldconf}.tmp" -fi -mv -f "${ldconf}.tmp" "${ldconf}" |