Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2013 20:28:31 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r326930 - in head/www/nostromo: . files
Message-ID:  <201309102028.r8AKSVdA082815@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Tue Sep 10 20:28:30 2013
New Revision: 326930
URL: http://svnweb.freebsd.org/changeset/ports/326930

Log:
  - Fix build with clang
  - Handle configuration file correctly
  - Make installation directory relative to PREFIX, so it can be
    adjusted dynamically in the plist
  - Trim Makefile headers
  
  PR:		ports/181493
  Submitted by:	Me
  Approved by:	Maintainer timeout

Added:
  head/www/nostromo/files/patch-src-libmy-strb64d.c   (contents, props changed)
Modified:
  head/www/nostromo/Makefile   (contents, props changed)
  head/www/nostromo/pkg-plist   (contents, props changed)

Modified: head/www/nostromo/Makefile
==============================================================================
--- head/www/nostromo/Makefile	Tue Sep 10 20:17:11 2013	(r326929)
+++ head/www/nostromo/Makefile	Tue Sep 10 20:28:30 2013	(r326930)
@@ -1,12 +1,9 @@
-# New ports collection makefile for:	nostromo
-# Date created:		20 Mar 2011
-# Whom:			Adrian Steinmann <ast@marabu.ch>
-#
+# Created by: Adrian Steinmann <ast@marabu.ch>
 # $FreeBSD$
-#
 
 PORTNAME=	nostromo
 PORTVERSION=	1.9.5
+PORTREVISION=	1
 CATEGORIES=	www ipv6
 MASTER_SITES=	http://www.nazgul.ch/dev/
 
@@ -15,7 +12,7 @@ COMMENT=	A fast, secure HTTP/1.1 CGI/1.1
 
 LICENSE=	BSD
 
-NOSTROMO_DIR?=		${PREFIX}/nostromo
+NOSTROMO_DIR?=		nostromo
 NOSTROMO_LOGDIR?=	${NOSTROMO_DIR}/logs
 NOSTROMO_LOGDIR_PERMS?=	0775
 
@@ -24,6 +21,7 @@ USE_RC_SUBR=	nostromo
 MAN8=		nhttpd.8
 
 MAKE_ENV?=	MAKEOBJDIR=. PREFIX=${PREFIX} NOSTROMO_DIR=${NOSTROMO_DIR}
+PLIST_SUB+=	NOSTROMODIR="${NOSTROMO_DIR}" NOSTROMOLOGDIR="${NOSTROMO_LOGDIR}"
 
 post-extract:
 	@${REINPLACE_CMD} -e "s@/var/nostromo@${NOSTROMO_DIR}@g" \
@@ -37,19 +35,22 @@ do-install:
 	@${INSTALL_SCRIPT} ${WRKSRC}/src/nhttpd/nhttpd ${PREFIX}/sbin
 	@${INSTALL_SCRIPT} ${WRKSRC}/src/tools/crypt ${PREFIX}/sbin
 	@${INSTALL_MAN} ${WRKSRC}/src/nhttpd/nhttpd.8 ${PREFIX}/man/man8
-	@${MKDIR} ${NOSTROMO_DIR}
-	@${MKDIR} ${NOSTROMO_DIR}/conf
-	@${MKDIR} -m ${NOSTROMO_LOGDIR_PERMS} -p ${NOSTROMO_LOGDIR}
-	@${INSTALL_DATA} ${WRKSRC}/conf/mimes ${NOSTROMO_DIR}/conf
-	@${INSTALL_DATA} ${WRKSRC}/conf/nhttpd.conf-dist ${NOSTROMO_DIR}/conf
-	@${MKDIR} ${NOSTROMO_DIR}/htdocs
-	@${INSTALL_DATA} ${WRKSRC}/htdocs/index.html ${NOSTROMO_DIR}/htdocs
-	@${INSTALL_DATA} ${WRKSRC}/htdocs/nostromo.gif ${NOSTROMO_DIR}/htdocs
-	@${MKDIR} ${NOSTROMO_DIR}/htdocs/cgi-bin
+	@${MKDIR} ${PREFIX}/${NOSTROMO_DIR}
+	@${MKDIR} ${PREFIX}/${NOSTROMO_DIR}/conf
+	@${MKDIR} -m ${NOSTROMO_LOGDIR_PERMS} -p ${PREFIX}/${NOSTROMO_LOGDIR}
+	@${INSTALL_DATA} ${WRKSRC}/conf/mimes ${PREFIX}/${NOSTROMO_DIR}/conf
+	@${INSTALL_DATA} ${WRKSRC}/conf/nhttpd.conf-dist ${PREFIX}/${NOSTROMO_DIR}/conf
+	if [ ! -f ${PREFIX}/${NOSTROMO_DIR}/conf/nhttpd.conf ]; then \
+		${CP} -p ${PREFIX}/${NOSTROMO_DIR}/conf/nhttpd.conf-dist ${PREFIX}/${NOSTROMO_DIR}/conf/nhttpd.conf ; \
+	fi
+	@${MKDIR} ${PREFIX}/${NOSTROMO_DIR}/htdocs
+	@${INSTALL_DATA} ${WRKSRC}/htdocs/index.html ${PREFIX}/${NOSTROMO_DIR}/htdocs
+	@${INSTALL_DATA} ${WRKSRC}/htdocs/nostromo.gif ${PREFIX}/${NOSTROMO_DIR}/htdocs
+	@${MKDIR} ${PREFIX}/${NOSTROMO_DIR}/htdocs/cgi-bin
 	@${INSTALL_SCRIPT} ${WRKSRC}/htdocs/cgi-bin/printenv \
-		${NOSTROMO_DIR}/htdocs/cgi-bin
-	@${MKDIR} ${NOSTROMO_DIR}/icons
-	@${INSTALL_DATA} ${WRKSRC}/icons/dir.gif ${NOSTROMO_DIR}/icons
-	@${INSTALL_DATA} ${WRKSRC}/icons/file.gif ${NOSTROMO_DIR}/icons
+		${PREFIX}/${NOSTROMO_DIR}/htdocs/cgi-bin
+	@${MKDIR} ${PREFIX}/${NOSTROMO_DIR}/icons
+	@${INSTALL_DATA} ${WRKSRC}/icons/dir.gif ${PREFIX}/${NOSTROMO_DIR}/icons
+	@${INSTALL_DATA} ${WRKSRC}/icons/file.gif ${PREFIX}/${NOSTROMO_DIR}/icons
 
 .include <bsd.port.mk>

Added: head/www/nostromo/files/patch-src-libmy-strb64d.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/nostromo/files/patch-src-libmy-strb64d.c	Tue Sep 10 20:28:30 2013	(r326930)
@@ -0,0 +1,11 @@
+--- src/libmy/strb64d.c.orig	2005-06-04 10:30:04.000000000 +0200
++++ src/libmy/strb64d.c	2013-08-23 19:17:25.700331962 +0200
+@@ -54,7 +54,7 @@
+ 	dst[0] = '\0';
+ 
+ 	while (1) {
+-		for (i = 0, j = j; i < 4; i++, j++) {
++		for (i = 0; i < 4; i++, j++) {
+ 			if (src[j] == '\0')
+ 				goto quit;
+ 			ch = src[j];

Modified: head/www/nostromo/pkg-plist
==============================================================================
--- head/www/nostromo/pkg-plist	Tue Sep 10 20:17:11 2013	(r326929)
+++ head/www/nostromo/pkg-plist	Tue Sep 10 20:28:30 2013	(r326930)
@@ -1,15 +1,17 @@
 sbin/crypt
 sbin/nhttpd
-nostromo/conf/mimes
-nostromo/conf/nhttpd.conf-dist
-nostromo/htdocs/index.html
-nostromo/htdocs/nostromo.gif
-nostromo/htdocs/cgi-bin/printenv
-nostromo/icons/dir.gif
-nostromo/icons/file.gif
-@dirrmtry nostromo/conf
-@dirrmtry nostromo/htdocs/cgi-bin
-@dirrmtry nostromo/htdocs
-@dirrmtry nostromo/icons
-@dirrmtry nostromo/logs
-@dirrmtry nostromo
+%%NOSTROMODIR%%/conf/mimes
+@unexec if cmp -s %D/%%NOSTROMODIR%%/conf/nhttpd.conf-dist %D/%%NOSTROMODIR%%/conf/nhttpd.conf; then rm -f %D/%%NOSTROMODIR%%/conf/nhttpd.conf; fi
+%%NOSTROMODIR%%/conf/nhttpd.conf-dist
+@exec if [ ! -f %D/%%NOSTROMODIR%%/conf/nhttpd.conf ] ; then cp -p %D/%F %B/nhttpd.conf; fi
+%%NOSTROMODIR%%/htdocs/index.html
+%%NOSTROMODIR%%/htdocs/nostromo.gif
+%%NOSTROMODIR%%/htdocs/cgi-bin/printenv
+%%NOSTROMODIR%%/icons/dir.gif
+%%NOSTROMODIR%%/icons/file.gif
+@dirrmtry %%NOSTROMODIR%%/conf
+@dirrmtry %%NOSTROMODIR%%/htdocs/cgi-bin
+@dirrmtry %%NOSTROMODIR%%/htdocs
+@dirrmtry %%NOSTROMODIR%%/icons
+@dirrmtry %%NOSTROMODIR%%/logs
+@dirrmtry %%NOSTROMODIR%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309102028.r8AKSVdA082815>