diff options
author | danfe <danfe@FreeBSD.org> | 2016-07-02 13:54:12 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2016-07-02 13:54:12 +0800 |
commit | f19e247164b83ca45484471600b5e38a4ec1b504 (patch) | |
tree | 6a8796656f7b3aaba4df795dbe6c91f2a0e0b502 /www | |
parent | 078c3341c65e68691389b587f471432e7316b7a2 (diff) | |
download | freebsd-ports-gnome-f19e247164b83ca45484471600b5e38a4ec1b504.tar.gz freebsd-ports-gnome-f19e247164b83ca45484471600b5e38a4ec1b504.tar.zst freebsd-ports-gnome-f19e247164b83ca45484471600b5e38a4ec1b504.zip |
- Make thttpd's collecting of internal stats and printing them to system
log every hour optional, because apparently some users do not want it
- Convert to option helper targets (post-patch-FOO-off) while here, which
allows us to remove `.include <bsd.port.options.mk>'
PR: 200884
Diffstat (limited to 'www')
-rw-r--r-- | www/thttpd/Makefile | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/www/thttpd/Makefile b/www/thttpd/Makefile index 119e8f112947..ce4a4f0b6696 100644 --- a/www/thttpd/Makefile +++ b/www/thttpd/Makefile @@ -19,20 +19,19 @@ SUB_FILES= pkg-message thttpd.conf.sample SUB_LIST= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} CPE_VENDOR= acme -OPTIONS_DEFINE= SENDFILE IPREAL INDEXES HTACCESS -OPTIONS_DEFAULT= SENDFILE IPREAL +OPTIONS_DEFINE= SENDFILE IPREAL INDEXES HTACCESS STATS +OPTIONS_DEFAULT= SENDFILE IPREAL STATS SENDFILE_DESC= Use sendfile(2) to serve files IPREAL_DESC= Respect (pass on) "X-Forwarded-For" header INDEXES_DESC= Generate index pages for directories HTACCESS_DESC= IP-based authorization (.htaccess) support +STATS_DESC= Collect internal stats and print to system log SENDFILE_EXTRA_PATCHES= ${FILESDIR}/extra-patch-config.h IPREAL_EXTRA_PATCHES= ${FILESDIR}/extra-patch-ip_real HTACCESS_EXTRA_PATCHES= ${FILESDIR}/extra-patch-htaccess -.include <bsd.port.options.mk> - post-patch: # To avoid conflict with other ports that also install htpasswd(1) .for f in extras/htpasswd.1 extras/htpasswd.c thttpd.8 @@ -40,10 +39,14 @@ post-patch: .endfor @${REINPLACE_CMD} -e 's|/var/www|${WWWDIR}|' \ ${WRKSRC}/extras/makeweb.1 -.if ! ${PORT_OPTIONS:MINDEXES} + +post-patch-INDEXES-off: @${REINPLACE_CMD} -e '/GENERATE_INDEXES/s|.*|/* & */|' \ ${WRKSRC}/config.h -.endif + +post-patch-STATS-off: + @${REINPLACE_CMD} -e '/STATS_TIME/s|.*|/* & */|' \ + ${WRKSRC}/config.h post-install: ${INSTALL_DATA} ${WRKDIR}/thttpd.conf.sample ${STAGEDIR}${PREFIX}/etc |