summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <spyderous@gentoo.org>2003-10-20 07:13:14 +0000
committerDonnie Berkholz <spyderous@gentoo.org>2003-10-20 07:13:14 +0000
commita12adab07a92867e86bb39266c4b3ec6ddd6f61e (patch)
tree4748589168aea848215a51d7da486d70145ddcab /eclass/xfree.eclass
parentfixing Manifest (diff)
downloadgentoo-2-a12adab07a92867e86bb39266c4b3ec6ddd6f61e.tar.gz
gentoo-2-a12adab07a92867e86bb39266c4b3ec6ddd6f61e.tar.bz2
gentoo-2-a12adab07a92867e86bb39266c4b3ec6ddd6f61e.zip
Generalizing strip_bins to take arguments.
Diffstat (limited to 'eclass/xfree.eclass')
-rw-r--r--eclass/xfree.eclass32
1 files changed, 9 insertions, 23 deletions
diff --git a/eclass/xfree.eclass b/eclass/xfree.eclass
index 2e67d05f6836..e39fe64b2012 100644
--- a/eclass/xfree.eclass
+++ b/eclass/xfree.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/xfree.eclass,v 1.10 2003/10/20 06:43:35 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/xfree.eclass,v 1.11 2003/10/20 07:13:14 spyderous Exp $
#
# Author: Seemant Kulleen <seemant@gentoo.org>
#
@@ -13,7 +13,7 @@
ECLASS=xfree
INHERITED="${INHERITED} ${ECLASS}"
-EXPORT_FUNCTIONS vcards is_kernel strip_bins strip_bins_x11r6
+EXPORT_FUNCTIONS vcards is_kernel strip_bins
vcards() {
has "$1" ${VIDEO_CARDS} && return 0
@@ -62,26 +62,11 @@ is_kernel() {
}
# For stripping binaries, but not drivers or modules.
-strip_bins_x11r6() {
- einfo "Stripping binaries..."
- # This bit I got from Redhat ... strip binaries and drivers ..
- # NOTE: We do NOT want to strip the drivers, modules or DRI modules!
- for x in $(find ${D}/ -type f -perm +0111 -exec file {} \; | \
- grep -v ' shared object,' | \
- sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p')
- do
- if [ -f ${x} ]
- then
- # Dont do the modules ...
- if [ "${x/\usr\/X11R6\/lib\/modules}" = "${x}" ]
- then
- echo "`echo ${x} | sed -e "s|${D}||"`"
- strip ${x} || :
- fi
- fi
- done
-}
-
+# examples:
+# /lib/modules for kernel modules:
+# $1=\/lib\/modules
+# /usr/X11R6/lib/modules for xfree modules:
+# $1=\/usr\/X11R6\/lib\/modules
strip_bins() {
einfo "Stripping binaries..."
# This bit I got from Redhat ... strip binaries and drivers ..
@@ -93,7 +78,8 @@ strip_bins() {
if [ -f ${x} ]
then
# Dont do the modules ...
- if [ "${x/\/lib\/modules}" = "${x}" ]
+ # need the 'eval echo \' to resolve 2-level variables
+ if [ "`eval echo \${x/${1}}`" = "${x}" ]
then
echo "`echo ${x} | sed -e "s|${D}||"`"
strip ${x} || :