aboutsummaryrefslogtreecommitdiff
path: root/www/hiawatha/Makefile
diff options
context:
space:
mode:
authorCarlo Strub <cs@FreeBSD.org>2012-05-30 22:09:26 +0000
committerCarlo Strub <cs@FreeBSD.org>2012-05-30 22:09:26 +0000
commit925b212b59ea7cd11c47b3a27bc67aff253bfeb8 (patch)
tree433fdce6141db806ff5195680c3ee6364b543c50 /www/hiawatha/Makefile
parent61026624c8e3d64033bc4fb054f4f100a221fdeb (diff)
downloadports-925b212b59ea7cd11c47b3a27bc67aff253bfeb8.tar.gz
ports-925b212b59ea7cd11c47b3a27bc67aff253bfeb8.zip
- Update to 8.3.2
- Switch to CMAKE - Fix paths in man pages - Hiawatha now uses own PolarSSL library Reviewed by: Hugo Leisink <hugo@hiawatha-webserver.org> (author of hiawatha)
Notes
Notes: svn path=/head/; revision=297838
Diffstat (limited to 'www/hiawatha/Makefile')
-rw-r--r--www/hiawatha/Makefile116
1 files changed, 67 insertions, 49 deletions
diff --git a/www/hiawatha/Makefile b/www/hiawatha/Makefile
index f53a02927c90..8624c5a7027f 100644
--- a/www/hiawatha/Makefile
+++ b/www/hiawatha/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= hiawatha
-PORTVERSION= 7.8.2
+PORTVERSION= 8.3.2
CATEGORIES= www
MASTER_SITES= http://www.hiawatha-webserver.org/files/ \
http://www.c-s.li/ports/
@@ -16,96 +16,114 @@ COMMENT= An advanced and secure webserver for Unix
LICENSE= GPLv2
-PORTDOCS= AUTHORS COPYING ChangeLog INSTALL
-PORTEXAMPLES= hiawatha mkcert newroot php-fcgi
-CONFIG_FILES= hiawatha.conf mimetype.conf cgi-wrapper.conf php-fcgi.conf
-MAN1= cgi-wrapper.1 hiawatha.1 newroot.1 php-fcgi.1 ssi-cgi.1 wigwam.1
+PORTDOCS= AUTHORS ChangeLog INSTALL
+CONFIG_FILES= hiawatha.conf mimetype.conf cgi-wrapper.conf php-fcgi.conf \
+ toolkit.conf index.xslt
-USE_RC_SUBR= hiawatha php-fcgi
+MAN1= cgi-wrapper.1 hiawatha.1 php-fcgi.1 ssi-cgi.1 wigwam.1
+
+MAKE_JOBS_SAFE= yes
SUB_FILES= pkg-message
+USE_CMAKE= yes
+USE_LDCONFIG= yes
+USE_RC_SUBR= hiawatha php-fcgi
WANT_GNOME= yes
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --localstatedir=/var webrootdir=${WWWDIR}
-
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-
-OPTIONS= COMMAND "Enable the Hiawatha CommandChannel" Off \
- CACHE "Internal file caching support" On \
- IPV6 "Enable IPv6 Support" On \
- LARGEFILE "Support for large files" On \
- MONITOR "Enable Hiawatha Monitor" On \
- SSL "Support for Secure Sockets Layer (SSL)" On \
- TOOLKIT "Enable URL Toolkit" On \
- XSLT "XSLT support" On
+CMAKE_ARGS+= -DCMAKE_INSTALL_BINDIR=${PREFIX}/bin \
+ -DCMAKE_INSTALL_SBINDIR=${PREFIX}/sbin \
+ -DCMAKE_INSTALL_SYSCONFDIR=${ETCDIR} \
+ -DCMAKE_INSTALL_LIBDIR=${PREFIX}/lib \
+ -DCONFIG_DIR=${ETCDIR} \
+ -DWEBROOT_DIR=${WWWDIR} \
+ -DCMAKE_INSTALL_MANDIR=${PREFIX}/man \
+ -DLOG_DIR=/var/log/hiawatha \
+ -DPID_DIR=/var/run
+
+OPTIONS= CACHE "Enable cache support" On \
+ CHROOT "Enable chroot support" Off \
+ COMMAND "Enable the Hiawatha CommandChannel" Off \
+ DEBUG "Enable debug information (for development only)" Off \
+ IPV6 "Enable IPv6 support" On \
+ MONITOR "Enable Hiawatha Monitor" Off \
+ RPROXY "Enable Reverse Proxy" On \
+ SSL "Enable SSL support" On \
+ TOOLKIT "Enable the URL toolkit" On \
+ XSLT "Enable XSLT support" On
PLIST_SUB+= ECHO_MSG=${ECHO_MSG}
.include <bsd.port.pre.mk>
+.if !defined(WITH_CACHE)
+CMAKE_ARGS+= -DENABLE_CACHE=off
+.endif
+
+.if defined(WITH_CHROOT)
+CMAKE_ARGS+= -DENABLE_CHROOT=on
+.endif
+
.if defined(WITH_COMMAND)
-CONFIGURE_ARGS+= --enable-command
-.else
-CONFIGURE_ARGS+= --disable-command
+CMAKE_ARGS+= -DENABLE_COMMAND=on
.endif
-.if !defined(WITH_CACHE)
-CONFIGURE_ARGS+= --disable-cache
+.if defined(WITH_DEBUG)
+CMAKE_ARGS+= -DENABLE_DEBUG=on
.endif
.if !defined(WITH_IPV6)
-CONFIGURE_ARGS+= --disable-ipv6
+CMAKE_ARGS+= -DENABLE_IPV6=off
+.endif
+
+.if defined(WITH_MONITOR)
+CMAKE_ARGS+= -DENABLE_MONITOR=on
.endif
-.if !defined(WITH_LARGEFILE)
-CONFIGURE_ARGS+= --disable-largefile
+.if !defined(WITH_RPROXY)
+CMAKE_ARGS+= -DENABLE_RPROXY=off
.endif
.if !defined(WITH_SSL)
-CONFIGURE_ARGS+= --disable-ssl
+CMAKE_ARGS+= -DENABLE_SSL=off
.endif
.if !defined(WITH_TOOLKIT)
-CONFIGURE_ARGS+= --disable-toolkit
+CMAKE_ARGS+= -DENABLE_TOOLKIT=off
.endif
-.if !defined(WITH_XSLT)
-CONFIGURE_ARGS+= --disable-xslt
-.else
+.if defined(WITH_XSLT)
+CMAKE_ARGS+= -DENABLE_XSLT=on
USE_GNOME+= libxslt
-CPPFLAGS+= -I${LOCALBASE}/include/libxml2
.endif
-.if !defined(WITH_MONITOR)
-CONFIGURE_ARGS+= --disable-monitor
-.else
-CONFIGURE_ARGS+= --enable-xslt
-USE_GNOME+= libxslt
-CPPFLAGS+= -I${LOCALBASE}/include/libxml2
-.endif
+post-patch:
+ @${REINPLACE_CMD} -e 's|/usr|${PREFIX}|g' \
+ ${WRKSRC}/man/hiawatha.1.in ${WRKSRC}/man/cgi-wrapper.1.in \
+ ${WRKSRC}/man/php-fcgi.1.in ${WRKSRC}/config/cgi-wrapper.conf \
+ ${WRKSRC}/config/hiawatha.conf.in ${WRKSRC}/config/php-fcgi.conf.in
+
+ @${REINPLACE_CMD} -e 's|/etc/hiawatha|${ETCDIR}|g' \
+ ${WRKSRC}/man/hiawatha.1.in ${WRKSRC}/man/cgi-wrapper.1.in \
+ ${WRKSRC}/man/php-fcgi.1.in
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
.endif
-.if !defined(NOPORTEXAMPLES)
- @${MKDIR} ${EXAMPLESDIR}
- @${INSTALL_DATA} ${PORTEXAMPLES:S,^,${WRKSRC}/extra/,} ${EXAMPLESDIR}/
-.endif
+
.for FILE in ${CONFIG_FILES}
- @${INSTALL_DATA} ${WRKSRC}/etc/hiawatha/${FILE} ${PREFIX}/etc/hiawatha/${FILE}.sample
+ @${INSTALL_DATA} ${WRKSRC}/config/${FILE} ${PREFIX}/etc/hiawatha/${FILE}.sample
@if [ ! -f ${PREFIX}/etc/hiawatha/${FILE} ]; then \
- ${CP} -p ${WRKSRC}/etc/hiawatha/${FILE} ${PREFIX}/etc/hiawatha/${FILE} ; \
+ ${CP} -p ${WRKSRC}/config/${FILE} ${PREFIX}/etc/hiawatha/${FILE} ; \
fi
.endfor
+
@if [ ! -d ${WWWDIR} ]; then \
@${MKDIR} ${WWWDIR} ; \
fi
- @${CP} ${WRKSRC}/doc/index.html ${WWWDIR}/index.hiawatha.html
+ @${CP} ${WRKSRC}/extra/index.html ${WWWDIR}/index.hiawatha.html
@if [ ! -f ${WWWDIR}/index.html ] ; then \
- ${CP} ${WRKSRC}/doc/index.html ${WWWDIR}/ ; \
+ ${CP} ${WRKSRC}/extra/index.html ${WWWDIR}/ ; \
fi
@${CAT} ${PKGMESSAGE}