1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- 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
This commit is contained in:
Alexey Dokuchaev 2014-08-08 12:14:16 +00:00
parent b01c64d843
commit 9fca5611dd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=364352
2 changed files with 66 additions and 23 deletions

View File

@ -12,38 +12,40 @@ MAINTAINER= danfe@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>

View File

@ -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: