aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorjohans <johans@FreeBSD.org>2014-04-21 21:05:13 +0800
committerjohans <johans@FreeBSD.org>2014-04-21 21:05:13 +0800
commitbf9953de7b5b724959d54e20ded85337b50c3bac (patch)
tree7807bb6537579294ef35149335d391fac3150511 /lang
parent358a0ac10b086f9ec9d6cb06b7b79e4ca03218e6 (diff)
downloadfreebsd-ports-gnome-bf9953de7b5b724959d54e20ded85337b50c3bac.tar.gz
freebsd-ports-gnome-bf9953de7b5b724959d54e20ded85337b50c3bac.tar.zst
freebsd-ports-gnome-bf9953de7b5b724959d54e20ded85337b50c3bac.zip
- Update to CDuce 0.6.0 (works with modern ocaml)
- Minor cleanups
Diffstat (limited to 'lang')
-rw-r--r--lang/cduce/Makefile85
-rw-r--r--lang/cduce/distinfo4
-rw-r--r--lang/cduce/files/patch-Makefile.distrib32
3 files changed, 59 insertions, 62 deletions
diff --git a/lang/cduce/Makefile b/lang/cduce/Makefile
index 8c6e4528bab6..bee689ff1abd 100644
--- a/lang/cduce/Makefile
+++ b/lang/cduce/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= cduce
-PORTVERSION= 0.5.5
-PORTREVISION= 1
+PORTVERSION= 0.6.0
CATEGORIES= lang
MASTER_SITES= http://www.cduce.org/download/ \
ftp://ftp.stack.nl/pub/users/johans/cduce/
@@ -11,81 +10,47 @@ MASTER_SITES= http://www.cduce.org/download/ \
MAINTAINER= johans@FreeBSD.org
COMMENT= Efficient XML centric functional programming language
-BROKEN= Fails to build
-
-LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre
+LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
BUILD_DEPENDS= ${SITELIBDIR}/ulex/ulexing.a:${PORTSDIR}/devel/ocaml-ulex \
${SITELIBDIR}/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre \
${SITELIBDIR}/netstring/netstring.a:${PORTSDIR}/www/ocaml-net
-USE_OCAML= true
+USE_OCAML= true
USE_OCAML_FINDLIB= true
USE_OCAML_LDCONFIG= true
-OPTIONS_DEFINE= OCURL OCAML_EXPAT MLIFACE
-OPTIONS_DEFAULT=MLIFACE
+OPTIONS_DEFINE= OCURL MLIFACE
+OPTIONS_DEFAULT= MLIFACE PXP
+OPTIONS_SINGLE= XML
+OPTIONS_SINGLE_XML= EXPAT PXP
+OPTIONS_SUB= yes
OCURL_DESC= Enable url support via ftp/ocaml-ocurl
-OCAML_EXPAT_DESC= Enable support for the Expat XML parser
+OCURL_BUILD_DEPENDS= ${SITELIBDIR}/curl/curl.cmi:${PORTSDIR}/ftp/ocaml-ocurl
+OCURL_CONFIGURE_WITH= curl
+EXPAT_DESC= Enable support for the Expat XML parser
+EXPAT_CONFIGURE_WITH= expat
+EXPAT_BUILD_DEPENDS= ${SITELIBDIR}/expat/expat.cmi:${PORTSDIR}/textproc/ocaml-expat
+PXP_DESC= Enable support for the PXP XML parser
+PXP_CONFIGURE_WITH= pxp
+PXP_BUILD_DEPENDS= ${SITELIBDIR}/pxp-engine/pxp_engine.cma:${PORTSDIR}/textproc/ocaml-pxp
MLIFACE_DESC= Enable building OCaml/CDuce interface
+MLIFACE_BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/lang/ocaml:patch
+MLIFACE_CONFIGURE_ON= --mliface=`cd ${PORTSDIR}/lang/ocaml; ${MAKE} -V WRKSRC`
-USE_GMAKE= yes
-ALL_TARGET= all
-INSTALL_TARGET= install_bin install_lib
+USES= gmake
+ALL_TARGET= all doc
+INSTALL_TARGET= install_bin install_lib install_doc
HAS_CONFIGURE= yes
-CONFIGURE_ARGS= --prefix=${PREFIX} --with-ocamlopt --without-cgi --without-netclient --without-pxp_wlex --docdir=${DOCSDIR}
+CONFIGURE_ARGS= --prefix=${PREFIX} --with-ocamlopt --without-cgi --without-netclient --with-curl --without-pxp_wlex --docdir=${DOCSDIR}
SITELIBDIR= ${LOCALBASE}/${OCAML_SITELIBDIR}
-
-MAN1= cduce.1 cduce_mktop.1 dtd2cduce.1
-
-PLIST_FILES= bin/cduce
-
-NO_STAGE= yes
-.include <bsd.port.options.mk>
-
-# Support for url via ftp/ocaml-ocurl
-.if ${PORT_OPTIONS:MOCURL}
-BUILD_DEPENDS+= ${SITELIBDIR}/curl/curl.cmi:${PORTSDIR}/ftp/ocaml-ocurl
-.else
-CONFIGURE_ARGS+= --without-curl
-.endif
-
-# Support for the PXP XML parser
-.if ${PORT_OPTIONS:MOCAML_EXPAT}
-CONFIGURE_ARGS+= --with-expat --without-pxp
-BUILD_DEPENDS+= ${SITELIBDIR}/expat/expat.cmi:${PORTSDIR}/textproc/ocaml-expat
-.else
-CONFIGURE_ARGS+= --without-expat --with-pxp
-BUILD_DEPENDS+= ${SITELIBDIR}/pxp-engine/pxp_engine.cma:${PORTSDIR}/textproc/ocaml-pxp
-.endif
-
-# Support for OCaml/CDuce interface
-.if ${PORT_OPTIONS:MMLIFACE}
-PLIST_FILES+= bin/cduce_mktop
-BUILD_DEPENDS+= ${NONEXISTENT}:${PORTSDIR}/lang/ocaml:patch
-CONFIGURE_ARGS+= --mliface=`cd ${PORTSDIR}/lang/ocaml; ${MAKE} -V WRKSRC`
-.endif
-
-.if ${PORT_OPTIONS:MDOCS}
-ALL_TARGET+= doc
-INSTALL_TARGET+= install_doc
-PORTDOCS= *
-.endif
+MAKE_JOBS_UNSAFE=yes
post-patch:
${REINPLACE_CMD} 's/-linkpkg/& -thread/' \
${WRKSRC}/Makefile ${WRKSRC}/configure.ml
post-install:
-.if ${PORT_OPTIONS:MOCAML_EXPAT}
- @${ECHO_CMD} "****************************************************************"
- @${ECHO_CMD} "* You choose Expat as XML parser, you may encounter some error *"
- @${ECHO_CMD} "* when loading XML files with external DTD. *"
- @${ECHO_CMD} "****************************************************************"
-.endif
-.if empty(PORT_OPTIONS:MDOCS)
-. for i in ${MAN1}
- ${INSTALL_MAN} ${WRKSRC}/doc/${i} ${MANPREFIX}/man/man${i:E}/
-. endfor
-.endif
+ ${INSTALL_MAN} ${WRKSRC}/doc/*.1 ${STAGEDIR}${MANPREFIX}/man/man1/
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cduce
.include <bsd.port.mk>
diff --git a/lang/cduce/distinfo b/lang/cduce/distinfo
index b53cb3e97a33..358e01a21b99 100644
--- a/lang/cduce/distinfo
+++ b/lang/cduce/distinfo
@@ -1,2 +1,2 @@
-SHA256 (cduce-0.5.5.tar.gz) = 4ed53a0ff196f490729d0146b474546f5115fd3cff2627f52670cfcc619b0157
-SIZE (cduce-0.5.5.tar.gz) = 596666
+SHA256 (cduce-0.6.0.tar.gz) = 28291cceaa219782f0f4cd4c9634a25bc4238e09bdb0e193b8b207ed7eb650bc
+SIZE (cduce-0.6.0.tar.gz) = 815440
diff --git a/lang/cduce/files/patch-Makefile.distrib b/lang/cduce/files/patch-Makefile.distrib
new file mode 100644
index 000000000000..8d8dd9bddfdb
--- /dev/null
+++ b/lang/cduce/files/patch-Makefile.distrib
@@ -0,0 +1,32 @@
+--- Makefile.distrib.orig 2014-04-21 14:44:45.000000000 +0200
++++ Makefile.distrib 2014-04-21 14:45:32.000000000 +0200
+@@ -106,8 +106,8 @@ install: all install_bin install_lib ins
+
+ install_bin:
+ @echo "Install binaries"
+- $(HIDE)mkdir -p $(BINDIR)
+- $(HIDE)$(INSTALL) -m755 $(INSTALL_BINARIES) $(BINDIR)/
++ $(HIDE)mkdir -p $(DESTDIR)$(BINDIR)
++ $(HIDE)$(INSTALL) -m755 $(INSTALL_BINARIES) $(DESTDIR)$(BINDIR)/
+
+
+ install_lib:
+@@ -339,12 +339,12 @@ web/xhtml.cdo: cduce web/xhtml.cd
+ ./cduce -I web/ --compile web/xhtml.cd
+
+ install_doc: doc
+- $(HIDE)mkdir -p $(MANDIR)/man1
+- $(HIDE)(cd doc; $(MAKE) install INSTALL="$(INSTALL)" MANDIR=$(MANDIR) HIDE=$(HIDE))
+- mkdir -p $(DOCDIR)/img
+- cp web/doc/*.html $(DOCDIR)/
+- cp CHANGES INSTALL INSTALL.WIN32 README AUTHORS LICENSE $(DOCDIR)/
+- cp web/img/left.gif web/img/right.gif $(DOCDIR)/img
++ $(HIDE)mkdir -p $(DESTDIR)$(MANDIR)/man1
++ $(HIDE)(cd doc; $(MAKE) install INSTALL="$(INSTALL)" MANDIR=$(DESTDIR)$(MANDIR) HIDE=$(HIDE))
++ mkdir -p $(DESTDIR)$(DOCDIR)/img
++ cp web/doc/*.html $(DESTDIR)$(DOCDIR)/
++ cp CHANGES INSTALL INSTALL.WIN32 README AUTHORS LICENSE $(DESTDIR)$(DOCDIR)/
++ cp web/img/left.gif web/img/right.gif $(DESTDIR)$(DOCDIR)/img
+
+
+ ### Pack OCaml modules for the CDuce/OCaml interface