Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 2013 01:11:20 +0200 (CEST)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        ast@marabu.ch
Subject:   ports/181493: [PATCH] www/nostromo: Fix build with clang plust other fixes
Message-ID:  <3cMJJS1PLXz2nD@micro.madpilot.net>
Resent-Message-ID: <201308232320.r7NNK0gE088199@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         181493
>Category:       ports
>Synopsis:       [PATCH] www/nostromo: Fix build with clang plust other fixes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 23 23:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Guido Falsi
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
none
>Environment:
System: FreeBSD micro.madpilot.net 9.1-STABLE FreeBSD 9.1-STABLE #21 r252026: Thu Jun 20 16:27:06 CEST 2013 root@micro.madpilot.net:/usr/obj/usr/src/sys/MICRO amd64

>Description:

- 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

>How-To-Repeat:
>Fix:

Index: Makefile
===================================================================
--- Makefile	(revision 325273)
+++ Makefile	(working copy)
@@ -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 @@
 
 LICENSE=	BSD
 
-NOSTROMO_DIR?=		${PREFIX}/nostromo
+NOSTROMO_DIR?=		nostromo
 NOSTROMO_LOGDIR?=	${NOSTROMO_DIR}/logs
 NOSTROMO_LOGDIR_PERMS?=	0775
 
@@ -24,6 +21,7 @@
 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 @@
 	@${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>
Index: files/patch-src-libmy-strb64d.c
===================================================================
--- files/patch-src-libmy-strb64d.c	(revision 0)
+++ files/patch-src-libmy-strb64d.c	(working copy)
@@ -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];

Property changes on: files/patch-src-libmy-strb64d.c
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 325273)
+++ pkg-plist	(working copy)
@@ -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%%
>Release-Note:
>Audit-Trail:
>Unformatted:



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