aboutsummaryrefslogtreecommitdiffstats
path: root/www/yaws
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2009-02-10 05:32:23 +0800
committerolgeni <olgeni@FreeBSD.org>2009-02-10 05:32:23 +0800
commit65b3e9fca1a436116ff603e5cd9818fd4c34d68e (patch)
tree4c460e86b6a695887388fb6a4a499bc5b7db0aa0 /www/yaws
parent881ce331526b1301566846371ba07fd7052feb69 (diff)
downloadfreebsd-ports-gnome-65b3e9fca1a436116ff603e5cd9818fd4c34d68e.tar.gz
freebsd-ports-gnome-65b3e9fca1a436116ff603e5cd9818fd4c34d68e.tar.zst
freebsd-ports-gnome-65b3e9fca1a436116ff603e5cd9818fd4c34d68e.zip
Optionally allow users to disable the native sendfile(2) interface.
This is needed if you are cross-compiling to win32 and need yaws to be a pure Erlang application.
Diffstat (limited to 'www/yaws')
-rw-r--r--www/yaws/Makefile13
-rw-r--r--www/yaws/pkg-plist2
2 files changed, 14 insertions, 1 deletions
diff --git a/www/yaws/Makefile b/www/yaws/Makefile
index 78fa6fb83844..95a15af39111 100644
--- a/www/yaws/Makefile
+++ b/www/yaws/Makefile
@@ -26,10 +26,18 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
MAN1= yaws.1
MAN5= yaws.conf.5 yaws_api.5 yaws_soap_lib.5
+OPTIONS= SENDFILE "Use native sendfile(2) interface" on
+
APPDIR=${PREFIX}/lib/erlang/lib/yaws-${PORTVERSION}
.include <bsd.port.pre.mk>
+.if defined(WITH_SENDFILE)
+PLIST_SUB+= WITH_SENDFILE=""
+.else
+PLIST_SUB+= WITH_SENDFILE="@comment "
+.endif
+
post-extract:
@${FIND} ${WRKSRC} -name .empty | ${XARGS} ${RM}
@@ -38,6 +46,11 @@ post-patch:
${WRKSRC}/man/yaws_api.5 ${WRKSRC}/man/yaws.conf.5 \
${WRKSRC}/src/yaws_config.erl ${WRKSRC}/scripts/yaws.template
@${FIND} ${WRKSRC} -name \*.orig -or -name \*.bak | ${XARGS} ${RM}
+.if defined(WITH_SENDFILE)
+ @${REINPLACE_CMD} -e 's|@HAVE_SENDFILE@|true|g' ${WRKSRC}/include.mk.in
+.else
+ @${REINPLACE_CMD} -e 's|@HAVE_SENDFILE@|false|g' ${WRKSRC}/include.mk.in
+.endif
do-install:
@${INSTALL_SCRIPT} ${WRKSRC}/bin/yaws ${PREFIX}/bin
diff --git a/www/yaws/pkg-plist b/www/yaws/pkg-plist
index 278645a33435..40e27d577bb0 100644
--- a/www/yaws/pkg-plist
+++ b/www/yaws/pkg-plist
@@ -47,7 +47,7 @@ etc/yaws.conf.sample
%%LIB32DIR%%/erlang/lib/yaws-%%VERSION%%/priv/envelope.xsd
%%LIB32DIR%%/erlang/lib/yaws-%%VERSION%%/priv/epam
%%LIB32DIR%%/erlang/lib/yaws-%%VERSION%%/priv/lib/setuid_drv.so
-%%LIB32DIR%%/erlang/lib/yaws-%%VERSION%%/priv/lib/yaws_sendfile_drv.so
+%%WITH_SENDFILE%%%%LIB32DIR%%/erlang/lib/yaws-%%VERSION%%/priv/lib/yaws_sendfile_drv.so
%%LIB32DIR%%/erlang/lib/yaws-%%VERSION%%/priv/mime.types
%%LIB32DIR%%/erlang/lib/yaws-%%VERSION%%/priv/soap.xsd
%%LIB32DIR%%/erlang/lib/yaws-%%VERSION%%/priv/wsdl.xsd