diff options
-rw-r--r-- | lang/Makefile | 1 | ||||
-rw-r--r-- | lang/cduce/Makefile | 104 | ||||
-rw-r--r-- | lang/cduce/distinfo | 2 | ||||
-rw-r--r-- | lang/cduce/files/patch-Makefile | 17 | ||||
-rw-r--r-- | lang/cduce/pkg-descr | 17 | ||||
-rw-r--r-- | lang/cduce/pkg-install | 9 |
6 files changed, 150 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile index aa7811917e02..e18a09133a32 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -17,6 +17,7 @@ SUBDIR += bwbasic SUBDIR += caml-light SUBDIR += ccscript + SUBDIR += cduce SUBDIR += chameleon SUBDIR += chicken SUBDIR += cim diff --git a/lang/cduce/Makefile b/lang/cduce/Makefile new file mode 100644 index 000000000000..72f580e7067b --- /dev/null +++ b/lang/cduce/Makefile @@ -0,0 +1,104 @@ +# New ports collection makefile for: cduce +# Date created: Jun 9, 2005 +# Whom: Marwan Burelle <marwan.burelle@lri.fr> +# +# $FreeBSD$ + +PORTNAME= cduce +PORTVERSION= 0.3.2 +CATEGORIES= lang +MASTER_SITES= http://www.cduce.org/download/ + +MAINTAINER= marwan.burelle@lri.fr +COMMENT= An efficient XML centric functionnal programming language + +LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre-utf8 +BUILD_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml \ + ocamlfind:${PORTSDIR}/devel/ocaml-findlib \ + ${LOCALBASE}/lib/ocaml/site-lib/ulex/ulexing.a:${PORTSDIR}/devel/ocaml-ulex \ + ${LOCALBASE}/lib/ocaml/site-lib/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre \ + ${LOCALBASE}/lib/ocaml/site-lib/netstring/netstring.a:${PORTSDIR}/www/ocaml-net + +# Support for url via ftp/ocaml-ocurl +.if !defined(WITHOUT_OCURL) +BUILD_DEPENDS+= ${LOCALBASE}/lib/ocaml/site-lib/curl/curl.cmi:${PORTSDIR}/ftp/ocaml-ocurl +.endif + +# Support for the PXP XML parser +.if defined(WITH_OCAML_EXPAT) +BUILD_DEPENDS+=${LOCALBASE}/lib/ocaml/site-lib/expat/expat.cmi:${PORTSDIR}/textproc/ocaml-expat +.else +BUILD_DEPENDS+=${LOCALBASE}/lib/ocaml/site-lib/pxp-engine/pxp_engine.cma:${PORTSDIR}/textproc/ocaml-pxp +.endif + +# Configure : use ocamlopt and don't look for netclient or pxp_wlex +HAS_CONFIGURE= yes +CONFIGURE_ARGS= --prefix=${PREFIX} --with-ocamlopt --without-netclient --without-pxp_wlex + +# Be sure to not build ocurl support if WITHOUT_OCURL is defined, +# even if ocurl is present. +.if defined(WITHOUT_OCURL) +CONFIGURE_ARGS+= --without-curl +.endif + +# Be sure to build with PXP or expat but not both. +.if defined(WITH_OCAML_EXPAT) +CONFIGURE_ARGS+= --with-expat --without-pxp +.else +CONFIGURE_ARGS+= --without-expat --with-pxp +.endif + +# Support for OCaml/CDuce interface +.if !defined(WITHOUT_MLIFACE) +CONFIGURE_ARGS+= --mliface=${LOCALBASE}/lib/ocaml/compiler-lib +.endif + +USE_GMAKE= yes + +ALL_TARGET= all + +INSTALL_TARGET= install + +MAKE_ENV= OCAMLFIND_DESTDIR="${PREFIX}/lib/ocaml/site-lib" + +.if !defined(NOPORTDOCS) +CONFIGURE_ARGS+= --docdir=${PREFIX}/share/doc/${PORTNAME} +ALL_TARGET+= doc +INSTALL_TARGET+= install_doc +PORTDOCS= * +.endif + +MAN1= cduce.1 cdo2ml.1 cduce_mktop.1 + +PKGDEINSTALL= ${PKGINSTALL} +FINDLIB_PKGNAME=${PORTNAME} + +PLIST_FILES= bin/cduce + +.if !defined(WITHOUT_MLIFACE) +PLIST_FILES+= bin/cdo2ml bin/mlcduce_wrapper bin/cduce_mktop +.endif + +post-install: + @${FIND} ${PREFIX}/lib/ocaml/site-lib/${FINDLIB_PKGNAME} -type f | \ + ${SED} "s,^${PREFIX}/,," >> ${TMPPLIST} + @${ECHO_CMD} "@dirrm lib/ocaml/site-lib/${FINDLIB_PKGNAME}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ocamlfind remove ${FINDLIB_PKGNAME} 2>/dev/null || true" >> ${TMPPLIST} + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL +.if defined(WITH_OCAML_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 + +pre-everything:: + @${ECHO} "" + @${ECHO} "You may define the following build options:" + @${ECHO} "" + @${ECHO} " WITHOUT_CURL Disable url support via ftp/ocaml-ocurl (=> no url support)" + @${ECHO} " WITH_OCAML_EXPAT Enable support for the Expat XML parser." + @${ECHO} " WITHOUT_MLIFACE Disable building OCaml/CDuce interface." + @${ECHO} "" + +.include <bsd.port.mk> diff --git a/lang/cduce/distinfo b/lang/cduce/distinfo new file mode 100644 index 000000000000..da2fefe9b99d --- /dev/null +++ b/lang/cduce/distinfo @@ -0,0 +1,2 @@ +MD5 (cduce-0.3.2.tar.gz) = 3714dc8231fd3f09ef87360d6d2f4987 +SIZE (cduce-0.3.2.tar.gz) = 312818 diff --git a/lang/cduce/files/patch-Makefile b/lang/cduce/files/patch-Makefile new file mode 100644 index 000000000000..80579a74faa8 --- /dev/null +++ b/lang/cduce/files/patch-Makefile @@ -0,0 +1,17 @@ +--- Makefile.orig Wed Apr 13 15:03:57 2005 ++++ Makefile Wed Apr 13 15:06:03 2005 +@@ -87,13 +87,12 @@ + $(HIDE)$(MAKE) NATIVE=false $@ + endif + +-install: all install_bin install_lib install_doc ++install: all install_bin install_lib + + install_bin: + @echo "Install binaries" + $(HIDE)mkdir -p $(BINDIR) + $(HIDE)$(INSTALL) -m755 $(INSTALL_BINARIES) $(BINDIR)/ +- + + install_lib: + @echo "Build META" diff --git a/lang/cduce/pkg-descr b/lang/cduce/pkg-descr new file mode 100644 index 000000000000..bf19e0c1d6d7 --- /dev/null +++ b/lang/cduce/pkg-descr @@ -0,0 +1,17 @@ +CDuce is modern programming language, adapted to the manipulation of +XML documents. With a syntax inspired from ML, it comes with many +interesting features such as higher order, overloaded functions and +powerful regular expressions patterns. It also provides an embeded XML +query language, using the traditional SELECT FROM WHERE form. + +This project is a spin-off of a research effort split amongst two CNRS +labs (the Languages group of ENS in Paris and the Databases group of +LRI in Orsay), and one INRIA project (the Cristal project). Please see +the CDuce team page for a list of researchers contributing to this +research effort. Some technical papers present the theoretical +foundations of the language. + +WWW: http://www.cduce.org + +- Burelle Marwan +marwan.burelle@lri.fr diff --git a/lang/cduce/pkg-install b/lang/cduce/pkg-install new file mode 100644 index 000000000000..ac1187f3fe70 --- /dev/null +++ b/lang/cduce/pkg-install @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ "$2" = "POST-INSTALL" ]; then + echo "${PKG_PREFIX}/lib/ocaml/site-lib/cduce" >> ${PKG_PREFIX}/lib/ocaml/ld.conf +elif [ "$2" = "DEINSTALL" ]; then + mv ${PKG_PREFIX}/lib/ocaml/ld.conf ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp + grep -v cduce ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp > ${PKG_PREFIX}/lib/ocaml/ld.conf + rm -f ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp +fi |