[20885] trunk/dports/devel
source_changes at macosforge.org
source_changes at macosforge.org
Thu Dec 7 13:42:36 PST 2006
Revision: 20885
http://trac.macosforge.org/projects/macports/changeset/20885
Author: jmpp at macports.org
Date: 2006-12-07 13:42:36 -0800 (Thu, 07 Dec 2006)
Log Message:
-----------
Committing Portfile and patchfile for caml-findlib, contributed by Kevin Ballard (taken from the caml-findlib.tar.bz2
attachment as requested). Closes #10958
Added Paths:
-----------
trunk/dports/devel/caml-findlib/
trunk/dports/devel/caml-findlib/Portfile
trunk/dports/devel/caml-findlib/files/
trunk/dports/devel/caml-findlib/files/patch-Makefile
Added: trunk/dports/devel/caml-findlib/Portfile
===================================================================
--- trunk/dports/devel/caml-findlib/Portfile (rev 0)
+++ trunk/dports/devel/caml-findlib/Portfile 2006-12-07 21:42:36 UTC (rev 20885)
@@ -0,0 +1,103 @@
+PortSystem 1.0
+name caml-findlib
+version 1.1.2pl1
+revision 0
+distfiles findlib-${version}.tar.gz
+worksrcdir findlib-${version}
+categories devel
+maintainers kevin at sb.org
+description Objective Caml library management system
+long_description The findlib library provides a scheme to manage reusable \
+ software components (packages), and includes tools that support \
+ this scheme. Packages are collections of OCaml modules for which \
+ metainformation can be stored. The packages are kept in the filesystem \
+ hierarchy, but with strict directory structure. The library contains \
+ functions to look the directory up that stores a package, to query \
+ metainformation about a package, and to retrieve dependency information \
+ about multiple packages. There is also a tool that allows the user to \
+ enter queries on the command-line. In order to simplify compilation and \
+ linkage, there are new frontends of the various OCaml compilers that \
+ can directly deal with packages.
+homepage http://www.ocaml-programming.de/programming/findlib.html
+platforms darwin
+master_sites http://www.ocaml-programming.de/packages/
+extract.suffix .tar.gz
+build.target all opt
+checksums sha1 ccd8b9d6249b5a4097040d32b90048b11054f461 \
+ md5 df4c9176e9d5b8a6d37668d108fae923
+
+patchfiles patch-Makefile
+
+depends_lib port:ocaml
+
+configure.args -bindir ${prefix}/bin \
+ -mandir ${prefix}/share/man \
+ -sitelib ${prefix}/lib/ocaml/site-lib
+
+configure.pre_args ""
+
+destroot.destdir prefix=${destroot}
+
+post-destroot {
+ # `ocamlfind printconf destdir` returns nothing if the dir isn't in place
+ # but we know it's the same as our site-lib dir
+ set ocamlfind_destdir [file normalize ${prefix}/lib/ocaml/site-lib/stublibs]
+ file mkdir ${destroot}${ocamlfind_destdir}
+ # make a turd file so the directory doesn't get pruned when installing
+ # I suppose I don't actually know if it prunes before or after this phase
+ # but better to be safe than sorry
+ close [open ${destroot}${ocamlfind_destdir}/.turd_${portname} w]
+}
+
+post-activate {
+ # Add our stublibs dir path to ld.conf
+ set ocamlfind_destdir [file normalize ${prefix}/lib/ocaml/site-lib/stublibs]
+ set ldconfpath [exec ${destroot}${prefix}/bin/ocamlfind printconf ldconf]
+ # ld.conf should exist since ocaml is installed, but lets just be safe anyway
+ if {[file exists $ldconfpath]} then {
+ # make sure ld.conf doesn't already have this line, so if the user installs,
+ # uninstalls, then installs again, we won't duplicate it
+ set has_line 0
+ set ldconf [open $ldconfpath r+]
+ while {[gets $ldconf line] != -1 && !$has_line} {
+ if {[string equal $line $ocamlfind_destdir]} then {
+ set has_line 1
+ }
+ }
+ if {!$has_line} {
+ ui_msg "## Adding line `${ocamlfind_destdir}' to file ${ldconfpath}"
+ ui_msg "## Be sure to remove this line if you uninstall ${portname}"
+ puts $ldconf $ocamlfind_destdir
+ }
+ close $ldconf
+ } else {
+ ui_warn "File ${ldconfpath} doesn't seem to be installed."
+ ui_warn "Is ocaml installed properly?"
+ }
+}
+
+# pre-deactivate doesn't actually exist
+# which annoys me, because it means I can't remove the line I added to ld.conf
+#pre-deactivate {
+# # remove our stublibs dir path from ld.conf
+# set ocamlfind_destdir [file normalize ${prefix}/lib/ocaml/site-lib/stublibs]
+# set ldconfpath ${destroot}[exec ${destroot}${prefix}/bin/ocamlfind printconf ldconf]
+# set ldconfoutpath [file dirname $ldconfpath]/.[file tail $ldconfpath]~
+# if {[file exists $ldconfpath]} then {
+# set ldconf [open $ldconfpath r]
+# set ldconfout [open $ldconfoutpath w]
+# while {[gets $ldconf line] != -1} {
+# if {![string equal $line $ocamlfind_destdir]} {
+# puts $ldconfout $line
+# }
+# }
+# close $ldconfout
+# close $ldconf
+# file rename -force $ldconfoutpath $ldconfpath
+# }
+#}
+
+variant toolbox {
+ configure.args-append -with-toolbox
+ depends_lib bin:lablgtk:lablgtk
+}
\ No newline at end of file
Added: trunk/dports/devel/caml-findlib/files/patch-Makefile
===================================================================
--- trunk/dports/devel/caml-findlib/files/patch-Makefile (rev 0)
+++ trunk/dports/devel/caml-findlib/files/patch-Makefile 2006-12-07 21:42:36 UTC (rev 20885)
@@ -0,0 +1,11 @@
+--- Makefile.orig 2006-12-06 17:38:50.000000000 -0500
++++ Makefile 2006-12-06 17:39:00.000000000 -0500
+@@ -22,7 +22,7 @@
+ $(MAKE) install-meta
+ cd src/findlib; $(MAKE) install-num-top
+ $(MAKE) install-config
+- cp tools/safe_camlp4 $(OCAMLFIND_BIN)
++ cp tools/safe_camlp4 $(prefix)$(OCAMLFIND_BIN)
+
+ uninstall:
+ $(MAKE) uninstall-doc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20061207/b9301d0a/attachment.html
More information about the macports-changes
mailing list