aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan van Selst <johans@FreeBSD.org>2014-02-23 12:07:45 +0000
committerJohan van Selst <johans@FreeBSD.org>2014-02-23 12:07:45 +0000
commit7a660f28cd0d465b2ae2e80eb66e33afd5eacaf7 (patch)
treefbe4f02754e283ef6f8ff9e7284ad7ef9a1bcfb2
parent67d013f8867628aab4eb9461e7a85d0fb4844dbf (diff)
downloadports-7a660f28cd0d465b2ae2e80eb66e33afd5eacaf7.tar.gz
ports-7a660f28cd0d465b2ae2e80eb66e33afd5eacaf7.zip
Notes
-rw-r--r--devel/ocaml-findlib/Makefile58
-rw-r--r--devel/ocaml-findlib/files/patch-Makefile54
-rw-r--r--devel/ocaml-findlib/files/patch-src_findlib-toolbox_Makefile11
-rw-r--r--devel/ocaml-findlib/files/patch-src_findlib_Makefile41
-rw-r--r--devel/ocaml-findlib/pkg-plist12
5 files changed, 118 insertions, 58 deletions
diff --git a/devel/ocaml-findlib/Makefile b/devel/ocaml-findlib/Makefile
index 5ba8fba3b7f3..6045434331d5 100644
--- a/devel/ocaml-findlib/Makefile
+++ b/devel/ocaml-findlib/Makefile
@@ -10,67 +10,33 @@ PKGNAMEPREFIX= ocaml-
MAINTAINER= johans@FreeBSD.org
COMMENT= OCaml package manager
-BUILD_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml
-RUN_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml
-
-MAKE_JOBS_UNSAFE= yes
-
+USE_OCAML= yes
HAS_CONFIGURE= yes
-USE_GMAKE= yes
+USES= gmake
ALL_TARGET= all opt
CONFIGURE_ARGS= -bindir "${PREFIX}/bin" -mandir "${PREFIX}/man" \
- -sitelib "${PREFIX}/lib/ocaml/site-lib" \
+ -sitelib "${PREFIX}/${OCAML_SITELIBDIR}" \
-config "${PREFIX}/etc/findlib.conf"
OPTIONS_DEFINE= TOOLBOX
OPTIONS_DEFAULT=TOOLBOX
+OPTIONS_SUB= yes
TOOLBOX_DESC= Include toolbox interface (requires OCaml with TK)
+TOOLBOX_CONFIGURE_ON= -with-toolbox
-DOCSDIR= ${PREFIX}/share/doc/ocaml/${PORTNAME}
-
-PATTERN= [[:space:]]*(do|then)?[[:space:]]*)cp([[:space:]]
+MAKE_JOBS_UNSAFE= yes
-MAN1= ocamlfind.1
-MAN5= META.5 findlib.conf.5 site-lib.5
+DOCSDIR= ${PREFIX}/share/doc/ocaml/${PORTNAME}
-NO_STAGE= yes
post-patch:
- @${REINPLACE_CMD} -E \
- -e 's,(${PATTERN}+.*INSTALLDIR),\1\$${BSD_INSTALL_DATA} \3,' \
- -e 's,(${PATTERN}+.*FIND_BIN),\1\$${BSD_INSTALL_SCRIPT} \3,' \
- -e 's,(${PATTERN}+.*LIBBIN),\1\$${BSD_INSTALL_SCRIPT} \3,' \
- -e 's,(${PATTERN}+.*FIND_CONF),\1\$${BSD_INSTALL_DATA} \3,' \
- -e 's,(${PATTERN}+.*SITELIB),\1\$${BSD_INSTALL_DATA} \3,' \
- ${WRKSRC}/Makefile ${WRKSRC}/src/findlib/Makefile \
- ${WRKSRC}/src/findlib-toolbox/Makefile
- @${REINPLACE_CMD} \
- -e 's,path="@SITELIB@,&:${PREFIX}/lib/ocaml,' \
+ @${REINPLACE_CMD} -e 's,path="@SITELIB@,&:${PREFIX}/${OCAML_LIBDIR},' \
${WRKSRC}/findlib.conf.in
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MTOOLBOX} && \
- exists(${LOCALBASE}/bin/ocaml) && \
- !exists(${LOCALBASE}/lib/ocaml/labltk)
-IGNORE= either build OCaml with TK support or disable TOOLBOX
-.endif
-
-.if ${PORT_OPTIONS:MTOOLBOX}
-CONFIGURE_ARGS+=-with-toolbox
-PLIST_SUB+= TK=""
-.else
-PLIST_SUB+= TK="@comment "
-.endif
-
post-install:
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DOCSDIR} \
- "! -regex .*ref-man.*")
-.endif
-.if ${PORT_OPTIONS:MTOOLBOX}
- @${CHMOD} +x ${PREFIX}/lib/ocaml/site-lib/findlib/make_wizard
-.endif
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR} \
+ "! -regex .*ref-man.*"
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ocamlfind
.include <bsd.port.mk>
diff --git a/devel/ocaml-findlib/files/patch-Makefile b/devel/ocaml-findlib/files/patch-Makefile
new file mode 100644
index 000000000000..3a3fb8de7ad7
--- /dev/null
+++ b/devel/ocaml-findlib/files/patch-Makefile
@@ -0,0 +1,54 @@
+--- Makefile.orig 2013-06-11 09:27:39.000000000 +0200
++++ Makefile 2014-02-23 12:02:08.000000000 +0100
+@@ -17,13 +17,13 @@ opt:
+ for p in $(PARTS); do ( cd src/$$p; $(MAKE) opt ); done
+
+ install:
+- mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
+- mkdir -p "$(prefix)$(OCAMLFIND_MAN)"
++ mkdir -p "$(DESTDIR)$(prefix)$(OCAMLFIND_BIN)"
++ mkdir -p "$(DESTDIR)$(prefix)$(OCAMLFIND_MAN)"
+ for p in $(PARTS); do ( cd src/$$p; $(MAKE) install ); done
+ $(MAKE) install-meta
+ cd src/findlib; $(MAKE) install-num-top
+ $(MAKE) install-config
+- cp tools/safe_camlp4 "$(prefix)$(OCAMLFIND_BIN)"
++ ${BSD_INSTALL_SCRIPT} tools/safe_camlp4 "$(DESTDIR)$(prefix)$(OCAMLFIND_BIN)"
+ $(MAKE) install-doc
+
+ uninstall:
+@@ -69,9 +69,9 @@ findlib.conf: findlib.conf.in
+
+ .PHONY: install-doc
+ install-doc:
+- mkdir -p $(prefix)$(OCAMLFIND_MAN)/man1 $(prefix)$(OCAMLFIND_MAN)/man3 $(prefix)$(OCAMLFIND_MAN)/man5
+- -cp doc/ref-man/ocamlfind.1 $(prefix)$(OCAMLFIND_MAN)/man1
+- -cp doc/ref-man/META.5 doc/ref-man/site-lib.5 doc/ref-man/findlib.conf.5 $(prefix)$(OCAMLFIND_MAN)/man5
++ mkdir -p $(DESTDIR)$(prefix)$(OCAMLFIND_MAN)/man1 $(DESTDIR)$(prefix)$(OCAMLFIND_MAN)/man3 $(DESTDIR)$(prefix)$(OCAMLFIND_MAN)/man5
++ -cp doc/ref-man/ocamlfind.1 $(DESTDIR)$(prefix)$(OCAMLFIND_MAN)/man1
++ -cp doc/ref-man/META.5 doc/ref-man/site-lib.5 doc/ref-man/findlib.conf.5 $(DESTDIR)$(prefix)$(OCAMLFIND_MAN)/man5
+
+ .PHONY: uninstall-doc
+ uninstall-doc:
+@@ -84,7 +84,7 @@ uninstall-doc:
+
+ .PHONY: install-meta
+ install-meta:
+- for x in `ls site-lib-src`; do if [ "$$x" != "CVS" -a -f "site-lib-src/$$x/META" ]; then mkdir -p "$(prefix)$(OCAML_SITELIB)/$$x"; cp site-lib-src/$$x/META "$(prefix)$(OCAML_SITELIB)/$$x"; fi; done
++ for x in `ls site-lib-src`; do if [ "$$x" != "CVS" -a -f "site-lib-src/$$x/META" ]; then mkdir -p "$(DESTDIR)$(prefix)$(OCAML_SITELIB)/$$x"; ${BSD_INSTALL_DATA} site-lib-src/$$x/META "$(DESTDIR)$(prefix)$(OCAML_SITELIB)/$$x"; fi; done
+
+ .PHONY: uninstall-meta
+ uninstall-meta:
+@@ -92,9 +92,9 @@ uninstall-meta:
+
+ .PHONY: install-config
+ install-config:
+- mkdir -p "`dirname \"$(prefix)$(OCAMLFIND_CONF)\"`"
+- @if [ -f "$(prefix)$(OCAMLFIND_CONF)" ]; then echo "!!! Keeping old $(prefix)$(OCAMLFIND_CONF) !!!"; fi
+- test -f "$(prefix)$(OCAMLFIND_CONF)" || cp findlib.conf "$(prefix)$(OCAMLFIND_CONF)"
++ mkdir -p "`dirname \"$(DESTDIR)$(prefix)$(OCAMLFIND_CONF)\"`"
++ @if [ -f "$(DESTDIR)$(prefix)$(OCAMLFIND_CONF)" ]; then echo "!!! Keeping old $(DESTDIR)$(prefix)$(OCAMLFIND_CONF) !!!"; fi
++ test -f "$(DESTDIR)$(prefix)$(OCAMLFIND_CONF)" || ${BSD_INSTALL_DATA} findlib.conf "$(DESTDIR)$(prefix)$(OCAMLFIND_CONF)"
+
+ .PHONY: uninstall-config
+ uninstall-config:
diff --git a/devel/ocaml-findlib/files/patch-src_findlib-toolbox_Makefile b/devel/ocaml-findlib/files/patch-src_findlib-toolbox_Makefile
new file mode 100644
index 000000000000..ede32667e6fa
--- /dev/null
+++ b/devel/ocaml-findlib/files/patch-src_findlib-toolbox_Makefile
@@ -0,0 +1,11 @@
+--- src/findlib-toolbox/Makefile.orig 2013-06-11 09:27:39.000000000 +0200
++++ src/findlib-toolbox/Makefile 2014-02-23 12:02:16.000000000 +0100
+@@ -13,7 +13,7 @@ make_wizard$(EXEC_SUFFIX): make_wizard.m
+ findlib.cma make_wizard.ml
+
+ install:
+- cp make_wizard$(EXEC_SUFFIX) make_wizard.pattern $(prefix)$(OCAML_SITELIB)/findlib
++ ${BSD_INSTALL_DATA} make_wizard$(EXEC_SUFFIX) make_wizard.pattern $(DESTDIR)$(prefix)$(OCAML_SITELIB)/findlib
+
+ # uninstall: Nothing to do, because the removal of the findlib core also
+ # deinstalls the make_wizard
diff --git a/devel/ocaml-findlib/files/patch-src_findlib_Makefile b/devel/ocaml-findlib/files/patch-src_findlib_Makefile
index fef99f8164ce..01bd885d36f1 100644
--- a/devel/ocaml-findlib/files/patch-src_findlib_Makefile
+++ b/devel/ocaml-findlib/files/patch-src_findlib_Makefile
@@ -1,19 +1,42 @@
---- src/findlib/Makefile.orig 2009-09-10 22:05:21.000000000 +0200
-+++ src/findlib/Makefile 2009-09-11 09:24:04.000000000 +0200
-@@ -17,6 +17,7 @@ OCAMLDEP = ocamldep
+--- src/findlib/Makefile.orig 2013-06-11 09:27:39.000000000 +0200
++++ src/findlib/Makefile 2014-02-23 12:02:38.000000000 +0100
+@@ -19,6 +19,7 @@ OCAMLDEP = ocamldep
OCAMLLEX = ocamllex
- CAMLP4O = camlp4 pa_o.cmo pa_op.cmo pr_o.cmo --
+ #CAMLP4O = camlp4 pa_o.cmo pa_op.cmo pr_o.cmo --
#CAMLP4O = camlp4 pa_o.cmo pa_op.cmo pr_dump.cmo --
+OCAML_LIBBIN=${PREFIX}/lib/ocaml
OBJECTS = findlib_config.cmo fl_split.cmo fl_metatoken.cmo fl_meta.cmo \
-@@ -80,7 +81,7 @@ clean:
+@@ -84,23 +85,23 @@ clean:
+ #rm -f ocaml_args.ml
+
install: all
- mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
- mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
+- mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
+- mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
- test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)"
-+ test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_LIBBIN)"
++ mkdir -p "$(DESTDIR)$(prefix)$(OCAML_SITELIB)/$(NAME)"
++ mkdir -p "$(DESTDIR)$(prefix)$(OCAMLFIND_BIN)"
++ test $(INSTALL_TOPFIND) -eq 0 || ${BSD_INSTALL_SCRIPT} topfind "$(DESTDIR)$(prefix)$(OCAML_LIBBIN)"
files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a META` && \
- cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
+- cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
++ ${BSD_INSTALL_DATA} $$files "$(DESTDIR)$(prefix)$(OCAML_SITELIB)/$(NAME)"
f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
+- cp $$f "$(prefix)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)"
++ ${BSD_INSTALL_SCRIPT} $$f "$(DESTDIR)$(prefix)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)"
+ # the following "if" block is only needed for 4.00beta2
+ if [ $(OCAML_REMOVE_DIRECTORY) -eq 0 -a -f "$(OCAML_CORE_STDLIB)/compiler-libs/topdirs.cmi" ]; then \
+ cd "$(OCAML_CORE_STDLIB)/compiler-libs/"; \
+- cp topdirs.cmi toploop.cmi "$(prefix)$(OCAML_SITELIB)/$(NAME)/"; \
++ ${BSD_INSTALL_DATA} topdirs.cmi toploop.cmi "$(DESTDIR)$(prefix)$(OCAML_SITELIB)/$(NAME)/"; \
+ fi
+
+ install-num-top:
+- mkdir -p "$(prefix)$(OCAML_SITELIB)/num-top"
++ mkdir -p "$(DESTDIR)$(prefix)$(OCAML_SITELIB)/num-top"
+ cp num_top.cma num_top.cmi num_top_printers.cmi \
+- "$(prefix)$(OCAML_SITELIB)/num-top"
++ "$(DESTDIR)$(prefix)$(OCAML_SITELIB)/num-top"
+
+ # Note: uninstall-num-top is part of the removal of the META files.
+
diff --git a/devel/ocaml-findlib/pkg-plist b/devel/ocaml-findlib/pkg-plist
index 509d6c48b9ed..b5f6fbf15c78 100644
--- a/devel/ocaml-findlib/pkg-plist
+++ b/devel/ocaml-findlib/pkg-plist
@@ -18,12 +18,14 @@ lib/ocaml/site-lib/findlib/fl_metascanner.mli
lib/ocaml/site-lib/findlib/fl_metatoken.cmi
lib/ocaml/site-lib/findlib/fl_package_base.cmi
lib/ocaml/site-lib/findlib/fl_package_base.mli
-%%TK%%lib/ocaml/site-lib/findlib/make_wizard
-%%TK%%lib/ocaml/site-lib/findlib/make_wizard.pattern
+@mode 755
+%%TOOLBOX%%lib/ocaml/site-lib/findlib/make_wizard
+@mode
+%%TOOLBOX%%lib/ocaml/site-lib/findlib/make_wizard.pattern
lib/ocaml/site-lib/findlib/topfind.cmi
lib/ocaml/site-lib/findlib/topfind.mli
lib/ocaml/site-lib/graphics/META
-%%TK%%lib/ocaml/site-lib/labltk/META
+%%TOOLBOX%%lib/ocaml/site-lib/labltk/META
lib/ocaml/site-lib/num-top/META
lib/ocaml/site-lib/num-top/num_top.cma
lib/ocaml/site-lib/num-top/num_top.cmi
@@ -35,6 +37,10 @@ lib/ocaml/site-lib/str/META
lib/ocaml/site-lib/threads/META
lib/ocaml/site-lib/unix/META
lib/ocaml/topfind
+man/man1/ocamlfind.1.gz
+man/man5/META.5.gz
+man/man5/findlib.conf.5.gz
+man/man5/site-lib.5.gz
%%PORTDOCS%%%%DOCSDIR%%/DOCINFO
%%PORTDOCS%%%%DOCSDIR%%/Makefile
%%PORTDOCS%%%%DOCSDIR%%/QUICKSTART