Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 15112 Details for
Bug 9988
setting LANG variable
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Alternate for patch for ebuild.sh
ebuild.sh.patch_new2 (text/plain), 4.52 KB, created by
Jason A. Mobarak (RETIRED)
on 2003-07-27 22:54:55 UTC
(
hide
)
Description:
Alternate for patch for ebuild.sh
Filename:
MIME Type:
Creator:
Jason A. Mobarak (RETIRED)
Created:
2003-07-27 22:54:55 UTC
Size:
4.52 KB
patch
obsolete
>--- /usr/sbin/ebuild.sh 2003-07-25 22:42:46.000000000 -0700 >+++ ebuild.sh 2003-07-27 23:45:56.000000000 -0700 >@@ -1,7 +1,7 @@ > #!/bin/bash > # Copyright 1999-2003 Gentoo Technologies, Inc. > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /home/cvsroot/gentoo-src/portage/bin/ebuild.sh,v 1.133 2003/07/02 03:23:36 carpaski Exp $ >+# $Header: /CVS/ebuild_lang_patch/ebuild.sh,v 1.2 2003/07/28 01:35:04 jmob Exp $ > > if [ "$*" != "depend" ] && [ "$*" != "clean" ]; then > if [ -f ${T}/successful ]; then >@@ -92,6 +92,93 @@ > return 1 > } > >+lang() { >+ local x >+ for x in ${USE_LANG}; do >+ if [ "${x}" == "${1}" ]; then >+ tty --quiet < /dev/stdout || echo "${x}" >+ return 0 >+ fi >+ done >+ return 1 >+} >+ >+primary_lang() { >+ # only first of USE_LANG >+ if [ "${USE_LANG%% *}" == "${1}" ]; then >+ tty --quiet < /dev/stdout || echo "${USE_LANG%% *}" >+ return 0 >+ fi >+ return 1 >+} >+ >+remove_man_files() { >+ >+ local language >+ local directory >+ >+ for MANDIR in ${MANDIR//:/ }; do >+ if [ -d "${D}$MANDIR" ]; then >+ for directory in ${D}/${MANDIR}/*; do >+ language=${directory##*/} # basename >+ if [ "${language:0:3}" != "man" ]; then >+ # check if language is in passed args and if so leave it alone >+ ! has ${language:0:2} $@ || rm -rf $directory >+ fi >+ done >+ fi >+ done >+} >+ >+remove_locale_files() { >+ >+ local directory >+ local language >+ >+ LOCALEDIR=${D}/usr/share/locale >+ if [ -d ${LOCALEDIR} ]; then >+ for directory in ${LOCALDIR}/*; do >+ language=${x##*/} #basename >+ if [ "${language}" != "C" ] ; then >+ # check if language is in passed args and if so leave it alone >+ ! has ${language:0:2} || rm -rf $directory >+ fi >+ done >+ fi >+} >+ >+remove_unnecessary_language_files() { >+ >+ # Blanket language file removing -- attempts to remove all language files not specified >+ # in USE_LANG. The USE_LANG variable must be set or USE must contain '-nls'. With USE containing >+ # '-nls' everything except english will be removed. USE_LANG can be *equal* to "+*" in order for >+ # _no language files to be remove_. In addition to the USE_LANG variable being set USE must >+ # contain '+nls'. >+ >+ # If the user has nls disabled attempt to remove everything but english >+ if has '-nls' $USE; then >+ USE_LANG="en" >+ fi >+ >+ if has '+nls' $USE; then >+ continue >+ else >+ return >+ fi >+ >+ # If USE_LANG doesn't exist there's nothing for us to do >+ if [ -z "${USE_LANG}" ]; then >+ return >+ fi >+ >+ if [ "$USE_LANG" = "+*" ]; then >+ continue >+ else >+ remove_man_files $USE_LANG >+ remove_locale_files $USE_LANG >+ fi >+} >+ > has() { > local x > >@@ -309,15 +396,15 @@ > EXTRA_ECONF="--build=${CBUILD} ${EXTRA_ECONF}" > fi > ./configure \ >- --prefix=/usr \ >- --host=${CHOST} \ >- --mandir=/usr/share/man \ >- --infodir=/usr/share/info \ >- --datadir=/usr/share \ >- --sysconfdir=/etc \ >- --localstatedir=/var/lib \ >+ --prefix=/usr \ >+ --host=${CHOST} \ >+ --mandir=/usr/share/man \ >+ --infodir=/usr/share/info \ >+ --datadir=/usr/share \ >+ --sysconfdir=/etc \ >+ --localstatedir=/var/lib \ > ${EXTRA_ECONF} \ >- "$@" || die "econf failed" >+ "$@" || die "econf failed" > else > die "no configure script found" > fi >@@ -327,20 +414,20 @@ > if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then > if [ ! -z "${PORTAGE_DEBUG}" ]; then > make -n prefix=${D}/usr \ >- datadir=${D}/usr/share \ >- infodir=${D}/usr/share/info \ >- localstatedir=${D}/var/lib \ >- mandir=${D}/usr/share/man \ >- sysconfdir=${D}/etc \ >- "$@" install >+ datadir=${D}/usr/share \ >+ infodir=${D}/usr/share/info \ >+ localstatedir=${D}/var/lib \ >+ mandir=${D}/usr/share/man \ >+ sysconfdir=${D}/etc \ >+ "$@" install > fi > make prefix=${D}/usr \ >- datadir=${D}/usr/share \ >- infodir=${D}/usr/share/info \ >- localstatedir=${D}/var/lib \ >- mandir=${D}/usr/share/man \ >- sysconfdir=${D}/etc \ >- "$@" install || die "einstall failed" >+ datadir=${D}/usr/share \ >+ infodir=${D}/usr/share/info \ >+ localstatedir=${D}/var/lib \ >+ mandir=${D}/usr/share/man \ >+ sysconfdir=${D}/etc \ >+ "$@" install || die "einstall failed" > else > die "no Makefile found" > fi >@@ -561,7 +648,7 @@ > #if we have a debug build, let's not strip anything > if has nostrip $FEATURES $RESTRICT && [ "$x" == "-s" ]; then > continue >- else >+ else > INSOPTIONS="$INSOPTIONS $x" > fi > done >@@ -758,6 +845,10 @@ > export PWORKDIR="$WORKDIR" > src_install > #|| abort_install "fail" >+ >+ #remove unnesseary man/locale files >+ remove_unnecessary_language_files >+ > prepall > cd ${D} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 9988
:
14532
|
14533
|
14534
|
14579
|
15111
|
15112
|
15136
|
15143
|
15148
|
15168
|
15169
|
42448