svn commit: r364352 - in head/www/thttpd: . files
Alexey Dokuchaev
danfe at FreeBSD.org
Fri Aug 8 12:14:17 UTC 2014
Author: danfe
Date: Fri Aug 8 12:14:16 2014
New Revision: 364352
URL: http://svnweb.freebsd.org/changeset/ports/364352
QAT: https://qat.redports.org/buildarchive/r364352/
Log:
- Try to fix parallel builds (-jX) by using GNU make(1)
- Convert sendfile(2) support into an OPTION (keep it on)
- Rearrange things in Makefile a bit while I'm here
Modified:
head/www/thttpd/Makefile
head/www/thttpd/files/patch-Makefile.in
Modified: head/www/thttpd/Makefile
==============================================================================
--- head/www/thttpd/Makefile Fri Aug 8 10:51:03 2014 (r364351)
+++ head/www/thttpd/Makefile Fri Aug 8 12:14:16 2014 (r364352)
@@ -12,38 +12,40 @@ MAINTAINER= danfe at FreeBSD.org
COMMENT= Tiny/turbo/throttling HTTP server
GNU_CONFIGURE= yes
-MAKE_JOBS_UNSAFE= yes
-
+USES= gmake # parallel builds (-jX) are broken with BSD make(1)
USE_RC_SUBR= thttpd
SUB_FILES= pkg-message thttpd.conf.sample
SUB_LIST= WWWOWN=${WWWOWN}
+OPTIONS_DEFINE= SENDFILE
+OPTIONS_DEFAULT= SENDFILE
+SENDFILE_DESC= Use sendfile(2) to serve files
+
+SENDFILE_EXTRA_PATCHES= ${FILESDIR}/extra-patch-config.h
+
post-patch:
.for f in extras/htpasswd.1 extras/htpasswd.c thttpd.8 extras/Makefile.in
- @${REINPLACE_CMD} -e \
- 's|htpasswd|thttpdpasswd|g;s|\.thttpdpasswd|.htpasswd|g' ${WRKSRC}/${f}
+ @${REINPLACE_CMD} -e '/\.htpasswd/!s|htpasswd|thttpdpasswd|g' \
+ ${WRKSRC}/${f}
.endfor
- ${MV} ${WRKSRC}/extras/htpasswd.1 ${WRKSRC}/extras/thttpdpasswd.1
- ${MV} ${WRKSRC}/extras/htpasswd.c ${WRKSRC}/extras/thttpdpasswd.c
-
-post-configure:
- @(cd ${WRKSRC} && ${PATCH} < ${PATCHDIR}/extra-patch-config.h)
+ @${MV} ${WRKSRC}/extras/htpasswd.1 ${WRKSRC}/extras/thttpdpasswd.1
+ @${MV} ${WRKSRC}/extras/htpasswd.c ${WRKSRC}/extras/thttpdpasswd.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/thttpd ${STAGEDIR}${PREFIX}/sbin
- ${INSTALL_MAN} ${WRKSRC}/thttpd.8 ${STAGEDIR}${PREFIX}/man/man8
- @${MKDIR} ${STAGEDIR}${PREFIX}/www/data ${STAGEDIR}${PREFIX}/www/cgi-bin
- ${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/redirect ${STAGEDIR}${PREFIX}/www/cgi-bin
- ${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/ssi ${STAGEDIR}${PREFIX}/www/cgi-bin
- ${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/phf ${STAGEDIR}${PREFIX}/www/cgi-bin
- ${INSTALL_MAN} ${WRKSRC}/cgi-src/redirect.8 ${STAGEDIR}${PREFIX}/man/man8
- ${INSTALL_MAN} ${WRKSRC}/cgi-src/ssi.8 ${STAGEDIR}${PREFIX}/man/man8
- ${INSTALL_PROGRAM} ${WRKSRC}/extras/makeweb ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/extras/thttpdpasswd ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_SCRIPT} ${WRKSRC}/extras/syslogtocern ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/extras/makeweb.1 ${STAGEDIR}${PREFIX}/man/man1
- ${INSTALL_MAN} ${WRKSRC}/extras/thttpdpasswd.1 ${STAGEDIR}${PREFIX}/man/man1
- ${INSTALL_MAN} ${WRKSRC}/extras/syslogtocern.8 ${STAGEDIR}${PREFIX}/man/man8
+ ${INSTALL_PROGRAM} ${WRKSRC}/extras/makeweb \
+ ${WRKSRC}/extras/thttpdpasswd ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/extras/syslogtocern \
+ ${STAGEDIR}${PREFIX}/bin
+ @${MKDIR} ${STAGEDIR}${PREFIX}/www/data \
+ ${STAGEDIR}${PREFIX}/www/cgi-bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/redirect ${WRKSRC}/cgi-src/ssi \
+ ${WRKSRC}/cgi-src/phf ${STAGEDIR}${PREFIX}/www/cgi-bin
+ ${INSTALL_MAN} ${WRKSRC}/extras/makeweb.1 \
+ ${WRKSRC}/extras/thttpdpasswd.1 ${STAGEDIR}${PREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/thttpd.8 ${WRKSRC}/cgi-src/redirect.8 \
+ ${WRKSRC}/cgi-src/ssi.8 ${WRKSRC}/extras/syslogtocern.8 \
+ ${STAGEDIR}${PREFIX}/man/man8
${INSTALL_DATA} ${WRKDIR}/thttpd.conf.sample ${STAGEDIR}${PREFIX}/etc
.include <bsd.port.mk>
Modified: head/www/thttpd/files/patch-Makefile.in
==============================================================================
--- head/www/thttpd/files/patch-Makefile.in Fri Aug 8 10:51:03 2014 (r364351)
+++ head/www/thttpd/files/patch-Makefile.in Fri Aug 8 12:14:16 2014 (r364352)
@@ -1,6 +1,6 @@
--- Makefile.in.orig Tue Apr 24 19:21:06 2001
+++ Makefile.in Tue Apr 24 19:21:33 2001
-@@ -47,7 +47,7 @@
+@@ -47,7 +47,7 @@ CGIBINDIR = $(WEBDIR)/cgi-bin
# You shouldn't need to edit anything below here.
CC = @CC@
@@ -9,3 +9,44 @@
DEFS = @DEFS@
INCLS = -I.
CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
+@@ -96,9 +96,7 @@ mime_types.h: mime_types.txt
+
+ subdirs:
+ for i in $(SUBDIRS) ; do ( \
+- cd $$i ; \
+- pwd ; \
+- $(MAKE) $(MFLAGS) \
++ $(MAKE) -C $$i $(MFLAGS) \
+ WEBDIR=$(WEBDIR) \
+ CGIBINDIR=$(CGIBINDIR) \
+ MANDIR=$(MANDIR) \
+@@ -118,9 +116,7 @@ install-man:
+
+ installsubdirs:
+ for i in $(SUBDIRS) ; do ( \
+- cd $$i ; \
+- pwd ; \
+- $(MAKE) $(MFLAGS) \
++ $(MAKE) -C $$i $(MFLAGS) \
+ WEBDIR=$(WEBDIR) \
+ CGIBINDIR=$(CGIBINDIR) \
+ MANDIR=$(MANDIR) \
+@@ -137,16 +133,12 @@ distclean: distcleansubdirs
+
+ cleansubdirs:
+ for i in $(SUBDIRS) ; do ( \
+- cd $$i ; \
+- pwd ; \
+- $(MAKE) $(MFLAGS) clean \
++ $(MAKE) -C $$i $(MFLAGS) clean \
+ ) ; done
+
+ distcleansubdirs:
+ for i in $(SUBDIRS) ; do ( \
+- cd $$i ; \
+- pwd ; \
+- $(MAKE) $(MFLAGS) distclean \
++ $(MAKE) -C $$i $(MFLAGS) distclean \
+ ) ; done
+
+ tags:
More information about the svn-ports-all
mailing list