[96033] trunk/dports/devel
mww at macports.org
mww at macports.org
Sun Jul 29 06:04:48 PDT 2012
Revision: 96033
https://trac.macports.org/changeset/96033
Author: mww at macports.org
Date: 2012-07-29 06:04:47 -0700 (Sun, 29 Jul 2012)
Log Message:
-----------
ocaml3-findlib: new port -- clone ocaml-findlib for ocaml3
Added Paths:
-----------
trunk/dports/devel/ocaml3-findlib/
trunk/dports/devel/ocaml3-findlib/Portfile
trunk/dports/devel/ocaml3-findlib/files/camlp4find
Removed Paths:
-------------
trunk/dports/devel/ocaml3-findlib/Portfile
Deleted: trunk/dports/devel/ocaml3-findlib/Portfile
===================================================================
--- trunk/dports/devel/ocaml-findlib/Portfile 2012-07-02 08:39:58 UTC (rev 94908)
+++ trunk/dports/devel/ocaml3-findlib/Portfile 2012-07-29 13:04:47 UTC (rev 96033)
@@ -1,108 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-
-name ocaml-findlib
-version 1.3.2
-revision 2
-distname findlib-${version}
-categories devel ml
-maintainers mww openmaintainer
-platforms darwin
-license MIT
-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://projects.camlcity.org/projects/findlib.html
-master_sites http://download.camlcity.org/download/
-checksums rmd160 74045383f9e1f46c56dd2596199f8f7071705960 \
- sha256 056450c2449aee2a61335cfa1d96f2fb1a14ad50bcd99d7ddf9308307ba90bc3
-
-livecheck.type regex
-livecheck.regex "findlib-(.*?).tar.gz"
-
-depends_lib port:ocaml
-
-patchfiles patch-site-lib-src-camlp4.310-META.in.diff
-
-configure.args -bindir ${prefix}/bin \
- -mandir ${prefix}/share/man \
- -sitelib ${prefix}/lib/ocaml/site-lib
-
-configure.pre_args ""
-
-use_parallel_build no
-build.target all opt
-
-destroot.destdir prefix=${destroot}
-
-universal_variant no
-
-# `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]
-destroot.keepdirs ${destroot}${ocamlfind_destdir}
-post-destroot {
- file mkdir ${destroot}${ocamlfind_destdir}
-}
-
-post-activate {
- # Add our stublibs dir path to ld.conf
- set ldconfpath [exec ${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} {
- if {${registry.format} == "receipt_flat"} {
- ui_msg "## Adding line `${ocamlfind_destdir}' to file ${ldconfpath}"
- ui_msg "## Be sure to remove this line if you uninstall ${name}"
- }
- 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 {
- # remove our stublibs dir path from ld.conf
- set ocamlfind_destdir [file normalize ${prefix}/lib/ocaml/site-lib/stublibs]
- set ldconfpath [exec ${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 description {build the toolbox wizard, requires labltk} {
- configure.args-append -with-toolbox
- depends_lib bin:lablgtk:lablgtk
-}
Copied: trunk/dports/devel/ocaml3-findlib/Portfile (from rev 95084, trunk/dports/devel/ocaml-findlib/Portfile)
===================================================================
--- trunk/dports/devel/ocaml3-findlib/Portfile (rev 0)
+++ trunk/dports/devel/ocaml3-findlib/Portfile 2012-07-29 13:04:47 UTC (rev 96033)
@@ -0,0 +1,112 @@
+# $Id$
+
+PortSystem 1.0
+
+name ocaml3-findlib
+version 1.3.2
+distname findlib-${version}
+categories devel ml
+maintainers mww openmaintainer
+platforms darwin
+license MIT
+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://projects.camlcity.org/projects/findlib.html
+master_sites http://download.camlcity.org/download/
+checksums rmd160 74045383f9e1f46c56dd2596199f8f7071705960 \
+ sha256 056450c2449aee2a61335cfa1d96f2fb1a14ad50bcd99d7ddf9308307ba90bc3
+
+livecheck.type regex
+livecheck.regex "findlib-(.*?).tar.gz"
+
+depends_lib port:ocaml3
+
+patchfiles patch-site-lib-src-camlp4.310-META.in.diff
+
+configure.env-append PATH=${prefix}/libexec/ocaml3:$env(PATH)
+configure.args -bindir ${prefix}/libexec/ocaml3 \
+ -mandir ${prefix}/share/man \
+ -sitelib ${prefix}/lib/ocaml3/site-lib \
+ -config ${prefix}/etc/ocaml3/findlib.conf
+
+configure.pre_args ""
+
+use_parallel_build no
+build.env-append PATH=${prefix}/libexec/ocaml3:$env(PATH)
+build.target all opt
+
+destroot.destdir prefix=${destroot}
+
+universal_variant no
+
+# `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 ${prefix}/lib/ocaml3/site-lib/stublibs
+destroot.keepdirs ${destroot}${ocamlfind_destdir}
+post-destroot {
+ xinstall -m 755 -d ${destroot}${ocamlfind_destdir}
+ xinstall -m 755 ${filespath}/camlp4find ${destroot}${prefix}/libexec/ocaml3/camlp4find
+ delete ${destroot}${prefix}/share/man
+}
+
+post-activate {
+ # Add our stublibs dir path to ld.conf
+ set ldconfpath [exec ${prefix}/libexec/ocaml3/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} {
+ if {${registry.format} == "receipt_flat"} {
+ ui_msg "## Adding line `${ocamlfind_destdir}' to file ${ldconfpath}"
+ ui_msg "## Be sure to remove this line if you uninstall ${name}"
+ }
+ 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 {
+ # remove our stublibs dir path from ld.conf
+ set ocamlfind_destdir [file normalize ${prefix}/lib/ocaml3/site-lib/stublibs]
+ set ldconfpath [exec ${prefix}/libexec/ocaml3/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 description {build the toolbox wizard, requires labltk} {
+ configure.args-append -with-toolbox
+ depends_lib bin:lablgtk:lablgtk
+}
Copied: trunk/dports/devel/ocaml3-findlib/files/camlp4find (from rev 95032, trunk/dports/devel/ocaml-findlib/files/camlp4find)
===================================================================
--- trunk/dports/devel/ocaml3-findlib/files/camlp4find (rev 0)
+++ trunk/dports/devel/ocaml3-findlib/files/camlp4find 2012-07-29 13:04:47 UTC (rev 96033)
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# A camlp4o/ocamlfind combo
+# Public Domain. Use at your own risk.
+# Please report bugs and fixes to Martin Jambon <martin_jambon at emailuser.net>
+# Thanks to Gerd Stolpmann
+
+src=''
+pkg=''
+syntax='camlp4o'
+libfiles=''
+
+usage(){
+ echo 'camlp4find is a preprocessing command which can be used instead
+of camlp4o or camlp4r in order to use ocamlfind packages.
+
+Usage: camlp4find [camlp4o|camlp4r] [packages] [files to parse]
+ camlp4find -echo
+ camlp4find -help
+
+A "file to parse" can be specified as follows:
+ somefile.ml
+ somefile.mli
+ -impl anyfile
+ -intf anyfile
+
+-echo displays the command which should be executed and exits
+
+-help displays this message
+
+Example:
+
+The following command assumes that the packages pa_tryfinally, pa_openin
+and micmatch_pcre are installed. pr_o.cmo is the standard module which
+will generate a human-readable output for the preprocessed OCaml code.
+The file to process does not end in .ml, so we have to use the -impl
+option exactly like with camlp4o:
+
+ camlp4find pa_tryfinally pa_openin micmatch_pcre pr_o.cmo -impl somefile.mml
+' 1>&2
+ exit 2
+}
+
+while : ; do
+ case "$1" in
+ "") break;;
+ camlp4o) syntax=camlp4o;;
+ camlp4r) syntax=camlp4r;;
+ -impl) shift; src="$src -impl $1";;
+ -intf) shift; src="$src -intf $1";;
+ *.ml) src="$src $1";;
+ *.cmo|*.cma) libfiles="$libfiles $1";;
+ -echo) echo=true;;
+ -*) usage;;
+ *) pkg="$pkg $1";;
+ esac
+ shift
+done
+
+i_options=`ocamlfind query -predicates "syntax,preprocessor,$syntax" \
+$pkg -i-format`
+a_options=`ocamlfind query -predicates "syntax,preprocessor,$syntax" \
+$pkg -a-format`
+
+cmd="$syntax $i_options $a_options -I +camlp4 $libfiles $src"
+if [ -z "$echo" ]
+then exec $cmd
+else echo $cmd
+fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120729/0c2d7e07/attachment.html>
More information about the macports-changes
mailing list