[38693] trunk/dports/devel/caml-csv

landonf at macports.org landonf at macports.org
Mon Jul 28 17:43:05 PDT 2008


Revision: 38693
          http://trac.macosforge.org/projects/macports/changeset/38693
Author:   landonf at macports.org
Date:     2008-07-28 17:43:04 -0700 (Mon, 28 Jul 2008)
Log Message:
-----------
Use the findlib patch from FreeBSD (who in turn borrowed it from RedHat)

Modified Paths:
--------------
    trunk/dports/devel/caml-csv/Portfile

Added Paths:
-----------
    trunk/dports/devel/caml-csv/files/patch-Makefile

Removed Paths:
-------------
    trunk/dports/devel/caml-csv/files/META.in

Modified: trunk/dports/devel/caml-csv/Portfile
===================================================================
--- trunk/dports/devel/caml-csv/Portfile	2008-07-29 00:35:56 UTC (rev 38692)
+++ trunk/dports/devel/caml-csv/Portfile	2008-07-29 00:43:04 UTC (rev 38693)
@@ -2,6 +2,7 @@
 
 PortSystem          1.0
 name                caml-csv
+revision            1
 version             1.1.6
 maintainers         landonf openmaintainer
 description         CSV file parser for OCaml.
@@ -21,19 +22,18 @@
 checksums           md5 a91851438f9540b1a445087a4d409507 \
                     sha1 3cd88f87c19639b9c75c67d9ffb729ad37f9d9d2 \
                     rmd160 4d4d8234a58e302c0adf6e17f7e85e4880f932f4
+patchfiles          patch-Makefile
 
 use_configure       no
 
 post-patch {
-    file copy ${filespath}/META.in ${worksrcpath}/META
-    reinplace s|@VERSION@|${version}|g ${worksrcpath}/META
+    set ocaml_site_path [exec ocamlfind printconf destdir]
+    reinplace s|@OCAML_SITE_PATH@|${ocaml_site_path}|g ${worksrcpath}/Makefile
 }
 
-destroot {
+pre-destroot {
     set ocaml_site_path [exec ocamlfind printconf destdir]
     file mkdir ${destroot}/${ocaml_site_path}
-
-    system "cd ${worksrcpath} && ${prefix}/bin/ocamlfind install -destdir ${destroot}/${ocaml_site_path} csv META csv.mli csv.cma csv.cmxa"
 }
 
 depends_lib         port:ocaml \

Deleted: trunk/dports/devel/caml-csv/files/META.in
===================================================================
--- trunk/dports/devel/caml-csv/files/META.in	2008-07-29 00:35:56 UTC (rev 38692)
+++ trunk/dports/devel/caml-csv/files/META.in	2008-07-29 00:43:04 UTC (rev 38693)
@@ -1,7 +0,0 @@
-name="csv"
-version="@VERSION@"
-description="CSV library"
-requires=""
-archive(byte)="csv.cma"
-archive(native)="csv.cmxa"
-

Added: trunk/dports/devel/caml-csv/files/patch-Makefile
===================================================================
--- trunk/dports/devel/caml-csv/files/patch-Makefile	                        (rev 0)
+++ trunk/dports/devel/caml-csv/files/patch-Makefile	2008-07-29 00:43:04 UTC (rev 38693)
@@ -0,0 +1,39 @@
+--- Makefile.orig	2007-12-17 17:56:16.458954606 -0500
++++ Makefile	2007-12-17 17:54:34.177261751 -0500
+@@ -5,11 +5,11 @@
+ # To enable support for Extlib, also uncomment 'open ExtList' at the top
+ # of file csv.ml.
+ 
+-OCAMLCINCS	:=
+-#OCAMLCINCS	:= -package extlib
++#OCAMLCINCS	:=
++OCAMLCINCS	:= -package extlib
+ OCAMLCFLAGS	:= -g
+-OCAMLCLIBS	:=
+-#OCAMLCLIBS	:= -linkpkg
++#OCAMLCLIBS	:=
++OCAMLCLIBS	:= -linkpkg
+ 
+ OCAMLOPTINCS	:= $(OCAMLCINCS)
+ OCAMLOPTFLAGS	:=
+@@ -23,6 +23,20 @@
+ 
+ all: csv.cma csv.cmxa example csvtool
+ 
++## The install and META targets were borrowed from Richard W.M. Jones' RPM patch
++install: all META
++	ocamlfind install -destdir ${DESTDIR}/@OCAML_SITE_PATH@ csv META *.mli $(wildcard *.a) csv.cmi $(wildcard csv.cmx) *.cma $(wildcard *.cmxa)
++#	install csvtool ${DESTDIR}${BINDIR}
++
++META:
++	rm -f $@
++	echo 'version="${VERSION}"' >> $@
++	echo 'description="CSV library"' >> $@
++	echo 'archive(byte)="csv.cma"' >> $@
++	echo 'archive(native)="csv.cmxa"' >> $@
++	echo 'requires="extlib"' >> $@
++
++
+ csv.cma: $(OBJS)
+ 	ocamlfind ocamlc $(OCAMLCINCS) $(OCAMLCFLAGS) -a -o $@ $^
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080728/8cf089ad/attachment-0001.html 


More information about the macports-changes mailing list