diff options
author | Johan van Selst <johans@FreeBSD.org> | 2011-05-05 07:51:39 +0000 |
---|---|---|
committer | Johan van Selst <johans@FreeBSD.org> | 2011-05-05 07:51:39 +0000 |
commit | 81c292c0a234e1fc98b487608cf7b3611d6da3d7 (patch) | |
tree | 88e2fc1fa1ea17f7a877486ca196809ffeb97768 /www/ocaml-net/Makefile | |
parent | eda1d76024fddee4a63fd84c8eeb21036c73c8e4 (diff) |
Notes
Diffstat (limited to 'www/ocaml-net/Makefile')
-rw-r--r-- | www/ocaml-net/Makefile | 79 |
1 files changed, 71 insertions, 8 deletions
diff --git a/www/ocaml-net/Makefile b/www/ocaml-net/Makefile index 828199ec3b1f..b9368f07afc7 100644 --- a/www/ocaml-net/Makefile +++ b/www/ocaml-net/Makefile @@ -7,6 +7,7 @@ PORTNAME= net PORTVERSION= 3.2.1 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://download.camlcity.org/download/ PKGNAMEPREFIX= ocaml- @@ -15,14 +16,17 @@ DISTNAME= ocaml${PORTNAME}-${PORTVERSION} MAINTAINER= johans@FreeBSD.org COMMENT= OCaml modules for Internet applications -BUILD_DEPENDS= ${SA_DIR}/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre -RUN_DEPENDS= ${SA_DIR}/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre +BUILD_DEPENDS= ${SA_DIR}/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre \ + camlp5:${PORTSDIR}/devel/ocaml-camlp5 +RUN_DEPENDS= ${BUILD_DEPENDS} CONFLICTS= ocaml-equeue-2* ocaml-netclient-0* USE_GMAKE= yes USE_OCAML= yes USE_OCAML_FINDLIB= yes +USE_OCAML_LDCONFIG= yes +USE_OCAML_PLIST= yes HAS_CONFIGURE= yes ALL_TARGET= all opt @@ -41,16 +45,75 @@ PORTEXAMPLES= * .endif OCAML_PKGDIRS= netsys netshm equeue shell netstring rpc-generator \ - rpc pop smtp netclient netcgi1 netcgi2 cgi netplex \ + rpc pop smtp netclient netcgi2 cgi netplex \ netcgi2-plex netcamlbox netmulticore +OCAML_LDLIBS= ${OCAML_PKGDIRS:S/^/${OCAML_SITELIBDIR}\//} -post-install: +OPTIONS= SSL "Enable SSL support" ON \ + NETHTTPD "Enable the integrated HTTP daemon" OFF \ + AUTH_DH "Enable Diffie-Hellman authorization support" OFF \ + GTK "Enable GTK support" OFF \ + GTK2 "Enable GTK2 support" OFF \ + APACHE "Enable Apache mod connector (experimental)" OFF + +.include <bsd.port.options.mk> + +.if defined(WITHOUT_SSL) +CONFIGURE_ARGS+= -disable-ssl +.else +CONFIGURE_ARGS+= -enable-ssl +BUILD_DEPENDS+= ${SA_DIR}/ssl/ssl.a:${PORTSDIR}/security/ocaml-ssl +RUN_DEPENDS+= ${SA_DIR}/ssl/ssl.a:${PORTSDIR}/security/ocaml-ssl +OCAML_PKGDIRS+= equeue-ssl rpc-ssl +.endif -.for pkg in ${OCAML_PKGDIRS} - @${FIND} ${PREFIX}/lib/ocaml/site-lib/${pkg} -type f | \ - ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} -.endfor +.if defined(WITH_NETHTTPD) +CONFIGURE_ARGS+= -with-nethttpd +OCAML_PKGDIRS+= nethttpd nethttpd-for-netcgi2 +.else +CONFIGURE_ARGS+= -without-nethttpd +.endif + +.if defined(WITH_AUTH_DH) +CONFIGURE_ARGS+= -with-rpc-auth-dh +BUILD_DEPENDS+= ${SA_DIR}/cryptgps/cryptgps.a:${PORTSDIR}/security/ocaml-cryptgps +RUN_DEPENDS+= ${SA_DIR}/cryptgps/cryptgps.a:${PORTSDIR}/security/ocaml-cryptgps +OCAML_PKGDIRS+= rpc-auth-dh +.else +CONFIGURE_ARGS+= -without-rpc-auth-dh +.endif +.if defined(WITH_GTK) +CONFIGURE_ARGS+= -enable-gtk +BUILD_DEPENDS+= lablgtk:${PORTSDIR}/x11-toolkits/ocaml-lablgtk +RUN_DEPENDS+= lablgtk:${PORTSDIR}/x11-toolkits/ocaml-lablgtk +OCAML_PKGDIRS+= equeue-gtk1 +.else +CONFIGURE_ARGS+= -disable-gtk +.endif + +.if defined(WITH_GTK2) +CONFIGURE_ARGS+= -enable-gtk2 +BUILD_DEPENDS+= lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2 +RUN_DEPENDS+= lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2 +OCAML_PKGDIRS+= equeue-gtk2 +.else +CONFIGURE_ARGS+= -disable-gtk2 +.endif + +.if defined(WITH_APACHE) +USE_APACHE= 1.3+ +CONFIGURE_ARGS+= -enable-apache -apxs ${APXS} -apache ${HTTPD} +OCAML_PKGDIRS+= netcgi_apache +.else +CONFIGURE_ARGS+= -disable-apache +.endif + +post-patch: + ${REINPLACE_CMD} -e '/\.libs/d' \ + ${WRKSRC}/src/netcgi2-apache/Makefile.def + +post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR}/ @(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${DOCSDIR}/) |