From swell.k@gmail.com  Mon Nov 15 16:25:32 2010
Return-Path: <swell.k@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 76F24106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Nov 2010 16:25:32 +0000 (UTC)
	(envelope-from swell.k@gmail.com)
Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54])
	by mx1.freebsd.org (Postfix) with ESMTP id ED8EC8FC1B
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Nov 2010 16:25:31 +0000 (UTC)
Received: by fxm19 with SMTP id 19so4073611fxm.13
        for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Nov 2010 08:25:30 -0800 (PST)
Received: by 10.223.113.78 with SMTP id z14mr4827028fap.50.1289838330835;
        Mon, 15 Nov 2010 08:25:30 -0800 (PST)
Received: from localhost ([217.114.211.20])
        by mx.google.com with ESMTPS id g22sm269657faa.41.2010.11.15.08.25.28
        (version=SSLv3 cipher=RC4-MD5);
        Mon, 15 Nov 2010 08:25:29 -0800 (PST)
Message-Id: <86aalaa710.fsf@gmail.com>
Date: Mon, 15 Nov 2010 19:25:15 +0300
From: Anonymous <swell.k@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] devel/nspr: respect STRIP & owner for top dirs

>Number:         152266
>Category:       ports
>Synopsis:       [patch] devel/nspr: respect STRIP & owner for top dirs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 15 16:30:12 UTC 2010
>Closed-Date:    Sun Nov 21 18:17:17 UTC 2010
>Last-Modified:  Sun Nov 21 18:20:05 UTC 2010
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
>Description:
- respect STRIP, user may intentionally want to have non-debug builds
  unstripped or may want to combine -g[0-3] with -O[0-4]
- reset ownership to the user installing even for top dirs,
  i.e. PREFIX/include and PREFIX/lib
>How-To-Repeat:
$ make install STRIP= # normal -O2 build (no strip)
$ make install DEBUG_FLAGS=-ggdb # debug build with optimization (no strip)

$ make install
$ ls -lF $LOCALBASE | fgrep -v root
total 241
drwxr-xr-x+  83 holo  holo    179 Nov 15 19:13 include/
drwxr-xr-x+  64 holo  holo   1096 Nov 15 19:13 lib/
>Fix:
--- a.diff begins here ---
Index: devel/nspr/Makefile
===================================================================
RCS file: /a/.cvsup/ports/devel/nspr/Makefile,v
retrieving revision 1.40
diff -u -p -r1.40 Makefile
--- devel/nspr/Makefile	28 Jul 2010 21:32:08 -0000	1.40
+++ devel/nspr/Makefile	15 Nov 2010 16:12:44 -0000
@@ -43,21 +43,20 @@ post-patch:
 do-install:
 	${MKDIR} ${PREFIX}/include/nspr
 	${TAR} -C ${WRKSRC}/dist/include --dereference -cf - . | \
-		${TAR} -C ${PREFIX}/include -xf -
-	${FIND} ${PREFIX}/include/nspr | \
-	    	${XARGS} ${CHOWN} ${SHAREOWN}:${SHAREGRP}
+		${TAR} -C ${PREFIX}/include -xof -
 	${FIND} ${PREFIX}/include/nspr -type d | \
 	    	${XARGS} ${CHMOD} 0755
 	${FIND} ${PREFIX}/include/nspr -type f | \
 	    	${XARGS} ${CHMOD} ${SHAREMODE}
 	${TAR} -C ${WRKSRC}/dist/lib --dereference -cf - . | \
-		${TAR} -C ${PREFIX}/lib -xf -
+		${TAR} -C ${PREFIX}/lib -xof -
 	${INSTALL_SCRIPT} ${WRKSRC}/config/nspr-config ${PREFIX}/bin
 	${MKDIR} ${PREFIX}/libdata/pkgconfig
 	${INSTALL_DATA} ${WRKSRC}/config/nspr.pc ${PREFIX}/libdata/pkgconfig
 .for lib in ${LIBS}
+.if defined(STRIP) && ${STRIP} != ""
 	${STRIP_CMD} ${PREFIX}/lib/${lib}
-	${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/lib/${lib}
+.endif
 	${CHMOD} ${BINMODE} ${PREFIX}/lib/${lib}
 	${LN} -sf ${lib} ${PREFIX}/lib/${lib:R}
 .endfor
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Nov 15 16:30:27 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152266 
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Sun Nov 21 18:17:07 UTC 2010 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152266 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/152266: commit references a PR
Date: Sun, 21 Nov 2010 18:17:09 +0000 (UTC)

 marcus      2010-11-21 18:17:03 UTC
 
   FreeBSD ports repository
 
   Modified files:
     devel/nspr           Makefile 
   Log:
   * Respect STRIP to allow for debugging builds
   * Reset ownership to the user installing even for top dirs
   
   PR:             152266
   Submitted by:   Anonymous <swell.k@gmail.com>
   
   Revision  Changes    Path
   1.41      +4 -5      ports/devel/nspr/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
