ports/71285: [PATCH] textproc/ocaml-yaxi: unbreak, it's fetchable again
Stefan Walter
sw at gegenunendlich.de
Thu Sep 2 20:59:49 UTC 2004
Volker Stolz, 02.09.04, 17:15h CEST:
> Indeed. But can you please take a look at:
> ===> Building for ocaml-yaxi-0.5.2
> cd src && gmake
> date: illegal option -- R
> usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
> [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
> gmake[1]: Entering directory `/usr/ports/textproc/ocaml-yaxi/work/yaxi-0.5.2/src'
> sed -e s/COMPDATE/""/ yaxi.ml.in > yaxi.ml.in.tmp
> sed -e s/VERSION/0.5.2/ yaxi.ml.in.tmp > yaxi.ml
> ...
Great; it looks like this port was broken from the beginning. Sorry for
not testing it, the CVS log didn't indicate problems with anything but
the fetching, and I don't use it. I just noticed it's fetchable again.
The attached patch fixes all problems I have encountered (I hope):
- update to 0.5.3, which fixes a build error
- patch src/Makefile, which fixes another build error (FreeBSD's date(1)
doesn't have a '-R' option)
- really honor $PREFIX
- actually run the pkg-install script when installing via port, too
(note: I don't know if that's necessary at all. 'man ocamlfind' says
that it's necessary only for packages with .so or .dll files to be
added to ocaml's ld.conf, but maybe there was a reason for doing that
here, too. I guess it doesn't hurt.)
Also note that I merely tested compilation and installation of port and
package on a 5-CURRENT system. I have no experience with ocaml at all,
so I didn't check if the package itself works properly.
Regards,
Stefan
-------------- next part --------------
diff -urN ocaml-yaxi.old/Makefile ocaml-yaxi/Makefile
--- ocaml-yaxi.old/Makefile Thu Sep 2 21:40:27 2004
+++ ocaml-yaxi/Makefile Thu Sep 2 22:24:50 2004
@@ -7,7 +7,7 @@
#
PORTNAME= yaxi
-PORTVERSION= 0.5.2
+PORTVERSION= 0.5.3
CATEGORIES= textproc
MASTER_SITES= http://mattam.ath.cx/progs/yaxi/releases/
PKGNAMEPREFIX= ocaml-
@@ -33,7 +33,12 @@
PKGDEINSTALL= ${PKGINSTALL}
+pre-install:
+ ${MKDIR} ${PREFIX}/lib/ocaml/site-lib
+
post-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} \
+ ${SH} ${PKGDIR}/pkg-install ${PKGNAME} POST-INSTALL
@${FIND} ${PREFIX}/lib/ocaml/site-lib/${PORTNAME} -type f | \
${SED} "s,^${PREFIX}/,," >> ${TMPPLIST}
@${ECHO_CMD} "@dirrm lib/ocaml/site-lib/${PORTNAME}" >> ${TMPPLIST}
diff -urN ocaml-yaxi.old/distinfo ocaml-yaxi/distinfo
--- ocaml-yaxi.old/distinfo Thu Sep 2 21:40:27 2004
+++ ocaml-yaxi/distinfo Thu Sep 2 21:41:09 2004
@@ -1,2 +1,2 @@
-MD5 (yaxi-0.5.2.tar.gz) = ea17a507207057e3489cf987a9a80b10
-SIZE (yaxi-0.5.2.tar.gz) = 69067
+MD5 (yaxi-0.5.3.tar.gz) = e22f743b9b67605a53ef8f9b587c3bd5
+SIZE (yaxi-0.5.3.tar.gz) = 66430
diff -urN ocaml-yaxi.old/files/patch-Makefile ocaml-yaxi/files/patch-Makefile
--- ocaml-yaxi.old/files/patch-Makefile Thu Sep 2 21:40:27 2004
+++ ocaml-yaxi/files/patch-Makefile Thu Sep 2 22:01:41 2004
@@ -1,19 +1,22 @@
---- Makefile.orig Thu Mar 18 09:56:55 2004
-+++ Makefile Thu Mar 18 09:57:50 2004
-@@ -3,7 +3,7 @@
+--- Makefile.orig Sun May 2 13:39:22 2004
++++ Makefile Thu Sep 2 22:01:14 2004
+@@ -3,7 +3,8 @@
export VERSION
# Where the binaries will go (yaxsltproc)
-BIN_DESTDIR = ${DESTDIR}/usr/bin/
+BIN_DESTDIR = ${PREFIX}/bin
++PKG_DESTDIR = ${PREFIX}/lib/ocaml/site-lib
DIST_FILES = Makefile OCamlMakefile AUTHORS README COPYING ChangeLog META.in TODO \
examples/Makefile examples/*.ml examples/*.x*l
-@@ -41,7 +41,7 @@
+@@ -40,8 +41,8 @@
+ rm -f META.tmp
install: all META
- ocamlfind install yaxi META src/*.mli src/*.cm* src/*.a
+- ocamlfind install yaxi META src/*.mli src/*.cm* src/*.a
- install -D src/yaxsltproc ${BIN_DESTDIR}/yaxsltproc
++ ocamlfind install -destdir ${PKG_DESTDIR} yaxi META src/*.mli src/*.cm* src/*.a
+ ${BSD_INSTALL_PROGRAM} src/yaxsltproc ${BIN_DESTDIR}/yaxsltproc
dist: clean
diff -urN ocaml-yaxi.old/files/patch-src_Makefile ocaml-yaxi/files/patch-src_Makefile
--- ocaml-yaxi.old/files/patch-src_Makefile Thu Jan 1 01:00:00 1970
+++ ocaml-yaxi/files/patch-src_Makefile Thu Sep 2 21:48:58 2004
@@ -0,0 +1,11 @@
+--- src/Makefile.old Thu Sep 2 21:48:00 2004
++++ src/Makefile Thu Sep 2 21:48:10 2004
+@@ -44,7 +44,7 @@
+ ocamlfind ocamlmktop -package netstring,ulex,camlp4 -syntax camlp4o -I +camlp4 -linkpkg -o yaxi.top yaxi.cma
+
+ yaxi.ml: yaxi.ml.in
+- sed -e s/COMPDATE/"$(shell date -R)"/ yaxi.ml.in > yaxi.ml.in.tmp
++ sed -e s/COMPDATE/"$(shell date)"/ yaxi.ml.in > yaxi.ml.in.tmp
+ sed -e s/VERSION/${VERSION}/ yaxi.ml.in.tmp > yaxi.ml
+ @rm -f yaxi.ml.in.tmp
+
More information about the freebsd-ports-bugs
mailing list