1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-19 03:52:17 +00:00
freebsd-ports/www/xshttpd/Makefile
Rong-En Fan 741aa71483 Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.
Specifically, newer autoconf (> 2.13) has different semantic of the
configure target. In short, one should use --build=CONFIGURE_TARGET
instead of CONFIGURE_TARGET directly. Otherwise, you will get a warning
and the old semantic may be removed in later autoconf releases.

To workaround this issue, many ports hack the CONFIGURE_TARGET variable
so that it contains the ``--build='' prefix.

To solve this issue, under the fact that some ports still have
configure script generated by the old autoconf, we use runtime detection
in the do-configure target so that the proper argument can be used.

Changes to Mk/*:
 - Add runtime detection magic in bsd.port.mk
 - Remove CONFIGURE_TARGET hack in various bsd.*.mk
 - USE_GNOME=gnometarget is now an no-op

Changes to individual ports, other than removing the CONFIGURE_TARGET hack:

= pkg-plist changed (due to the ugly CONFIGURE_TARGET prefix in * executables)
  - comms/gnuradio
  - science/abinit
  - science/elmer-fem
  - science/elmer-matc
  - science/elmer-meshgen2d
  - science/elmerfront
  - science/elmerpost

= use x86_64 as ARCH
  - devel/g-wrap

= other changes
  - print/magicfilter
    GNU_CONFIGURE -> HAS_CONFIGURE since it's not generated by autoconf

Total # of ports modified:  1,027
Total # of ports affected: ~7,000 (set GNU_CONFIGURE to yes)

PR:		126524 (obsoletes 52917)
Submitted by:	rafan
Tested on:	two pointyhat 7-amd64 exp runs (by pav)
Approved by:	portmgr (pav)
2008-08-21 06:18:49 +00:00

115 lines
2.8 KiB
Makefile

# New ports collection makefile for: xshttpd
# Date created: 29 June 2005
# Whom: Ed Schouten <ed@fxq.nl>
#
# $FreeBSD$
#
PORTNAME= xshttpd
DISTVERSION= 3.5g05
CATEGORIES= www ipv6
MASTER_SITES= ftp://ftp.stack.nl/pub/xs-httpd/release/ \
ftp://mud.stack.nl/pub/xs-httpd/release/
DISTNAME= ${PORTNAME}-${DISTVERSION:S/.//}
MAINTAINER= johans@stack.nl
COMMENT= A webserver with CGI as own user and SSL suport
RUN_DEPENDS= run-mailcap:${PORTSDIR}/misc/mime-support \
ppmtogif:${PORTSDIR}/graphics/netpbm
CONFLICTS+= xshttpd-devel-[0-9]*
MAN1= clearxs.1 gfxcount.1 httpd.1 httpdc.1 imagemap.1 \
readxs.1 xschpass.1 xsindex.1 xspasswd.1
MAN5= httpd.conf.5 xsauth.5 xsconf.5 xsscripts.5 xsredir.5
MAN7= httpd_cgi.7 httpd_ssi.7
USE_BZIP2= yes
USE_RC_SUBR= xshttpd.sh
GNU_CONFIGURE= yes
OPTIONS= SSL "Enable https support" On \
PCRE "Enable pcre rewriting support" On \
LDAP "Enable ldap support" Off \
CURL "Enable curl (proxy) support" Off \
M4_CONFIG "Enable m4 configuration preprocessor" Off \
PERSISTENT_PERL "Enable persistent perl interpreter" Off
PORTDOCS= README COPYING ChangeLog
.include <bsd.port.pre.mk>
# By default XS-HTTPD stores its data in ${PREFIX}/lib/httpd
WWWDIR?= ${PREFIX}/www/${PORTNAME}
CONFIGURE_ARGS+=--with-rootdir=${WWWDIR}
.if !defined(WITHOUT_SSL)
.include <${PORTSDIR}/Mk/bsd.openssl.mk>
#USE_OPENSSL= yes
CONFIGURE_ARGS+=--with-ssl
.else
CONFIGURE_ARGS+=--without-ssl
.endif
.if defined(WITH_LDAP)
USE_OPENLDAP= yes
CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
.else
CONFIGURE_ARGS+=--without-ldap
.endif
.if defined(WITH_M4_CONFIG)
CONFIGURE_ARGS+=--with-preprocessor
.else
CONFIGURE_ARGS+=--without-preprocessor
.endif
.if defined(WITH_PERSISTENT_PERL)
USE_PERL5= yes
CONFIGURE_ARGS+=--with-perl
.else
CONFIGURE_ARGS+=--without-perl
.endif
.if defined(WITH_PCRE)
LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
CONFIGURE_ARGS+=--with-pcre=yes
.else
CONFIGURE_ARGS+=--with-pcre=no
.endif
.if defined(WITH_CURL)
LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
CONFIGURE_ARGS+=--with-curl=yes
.else
CONFIGURE_ARGS+=--with-curl=no
.endif
post-patch:
.for i in man/httpd.1 man/httpd.conf.5 config/httpd.conf.sample \
contrib/SSL-Makefile contrib/logrotate.sh
@${REINPLACE_CMD} \
-e 's|/wwwsys|${WWWDIR}|g' \
-e 's|/usr/local/lib/httpd|${WWWDIR}|g' \
-e 's|nobody|${WWWOWN}|g' \
-e 's|nogroup|${WWWGRP}|g' \
${WRKSRC}/$i
.endfor
@${REINPLACE_CMD} \
-e 's|\(MIME_TYPES\).*|\1 "${LOCALBASE}/etc/mime.types"|' \
${WRKSRC}/src/confuser.h
@${REINPLACE_CMD} -e 's|mime.types ||g' \
${WRKSRC}/config/Makefile.in
@${REINPLACE_CMD} -e '/^install-data-am/s|install-docDATA||' \
${WRKSRC}/Makefile.in
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
. for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
. endfor
.endif
.include <bsd.port.post.mk>