summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Silbersack <silby@FreeBSD.org>2004-02-01 04:51:54 +0000
committerMike Silbersack <silby@FreeBSD.org>2004-02-01 04:51:54 +0000
commit833ddce82868187d97d381c0f379065a04b61373 (patch)
tree34ad68a8d567362b4451a8f3d986df04cd954124
parent- Update to 0.16.4 (diff)
Enable sendfile support by default for 5.2+ systems, as we now have alc's
improved sendfile and the ability to watch usage via netstat -m.
Notes
Notes: svn path=/head/; revision=99670
Diffstat (limited to '')
-rw-r--r--www/thttpd/Makefile7
-rw-r--r--www/thttpd/files/extra-patch-config.h9
2 files changed, 15 insertions, 1 deletions
diff --git a/www/thttpd/Makefile b/www/thttpd/Makefile
index fc73dccec789..3684378442cc 100644
--- a/www/thttpd/Makefile
+++ b/www/thttpd/Makefile
@@ -25,6 +25,8 @@ USE_REINPLACE= yes
MAN1= makeweb.1 htpasswd.1
MAN8= thttpd.8 redirect.8 ssi.8 syslogtocern.8
+.include <bsd.port.pre.mk>
+
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/thttpd ${PREFIX}/sbin/
@${INSTALL_MAN} ${WRKSRC}/thttpd.8 ${PREFIX}/man/man8
@@ -73,6 +75,9 @@ post-install:
@${CAT} ${PKGMESSAGE}
post-configure: config-message
+.if ${OSVERSION} > 502101
+ @cd ${WRKSRC} && patch < ${PATCHDIR}/extra-patch-config.h
+.endif
post-build: config-message
@@ -84,4 +89,4 @@ config-message:
@${ECHO} ""
@${ECHO} "====================================================================="
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/www/thttpd/files/extra-patch-config.h b/www/thttpd/files/extra-patch-config.h
new file mode 100644
index 000000000000..4eda85b272b0
--- /dev/null
+++ b/www/thttpd/files/extra-patch-config.h
@@ -0,0 +1,9 @@
+--- config.h.old Sat Jan 31 22:17:25 2004
++++ config.h Sat Jan 31 22:17:38 2004
+@@ -380,4 +380,6 @@
+ */
+ #define MIN_WOULDBLOCK_DELAY 100L
+
++#define USE_SENDFILE
++
+ #endif /* _CONFIG_H_ */