ports/152266: [patch] devel/nspr: respect STRIP & owner for top dirs
Anonymous
swell.k at gmail.com
Mon Nov 15 16:30:13 UTC 2010
>Number: 152266
>Category: ports
>Synopsis: [patch] devel/nspr: respect STRIP & owner for top dirs
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 15 16:30:12 UTC 2010
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list