pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/xpmicons For some reason, Interix "find ... -exec"...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b95db2df52a3
branches:  trunk
changeset: 521381:b95db2df52a3
user:      tv <tv%pkgsrc.org@localhost>
date:      Fri Nov 10 16:49:58 2006 +0000

description:
For some reason, Interix "find ... -exec" leaks a little bit of memory,
which on large trees involving thousands of -exec's, makes find turn
into a humongous process.  It's faster on most systems to use other
methods anyway, so use xargs where practical, or pipe to a
"while read f; do ..." loop and let the shell do what it was meant
to do -- run programs.

diffstat:

 x11/xpmicons/Makefile |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r ac0485d2edfa -r b95db2df52a3 x11/xpmicons/Makefile
--- a/x11/xpmicons/Makefile     Fri Nov 10 16:30:08 2006 +0000
+++ b/x11/xpmicons/Makefile     Fri Nov 10 16:49:58 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2006/10/24 16:20:43 joerg Exp $
+# $NetBSD: Makefile,v 1.15 2006/11/10 16:49:58 tv Exp $
 
 DISTNAME=      xpmicons-1.0
 PKGREVISION=   4
@@ -31,10 +31,12 @@
 .endif
 
 post-extract:
-       find ${WRKSRC} -type d -name .xvpics -exec rm -rf {} \; -prune
+       find ${WRKSRC} -type d -name .xvpics -print | ${XARGS} rm -rf
 
 do-install:
-       find ${WRKSRC} -name \*.xpm -exec ${INSTALL_DATA} {} ${PREFIX}/include/X11/pixmaps \;
-       find ${WRKSRC} -name \*.xbm -exec ${INSTALL_DATA} {} ${PREFIX}/include/X11/bitmaps \;
+       find ${WRKSRC} -name \*.xpm -print | \
+               while read f; do ${INSTALL_DATA} $$f ${PREFIX}/include/X11/pixmaps; done
+       find ${WRKSRC} -name \*.xbm -print | \
+               while read f; do ${INSTALL_DATA} $$f ${PREFIX}/include/X11/bitmaps; done
 
 .include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index