--- util-linux-2.11z-r1.ebuild.orig 2003-04-21 23:11:37.000000000 -0700 +++ util-linux-2.11z-r1.ebuild 2003-04-21 23:11:50.000000000 -0700 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.11z-r1.ebuild,v 1.7 2003/03/24 03:11:55 method Exp $ -IUSE="crypt nls selinux" +IUSE="crypt nls selinux static" inherit eutils flag-o-matic @@ -20,22 +20,20 @@ LICENSE="GPL-2" DEPEND="virtual/glibc + >=sed-4.0.5 >=sys-libs/ncurses-5.2-r2 !selinux? ( sys-apps/pam-login ) selinux? ( sys-apps/shadow )" - RDEPEND="${DEPEND} dev-lang/perl nls? ( sys-devel/gettext )" - src_unpack() { unpack ${A} cd ${S} - if [ ! -z "`use crypt`" ] - then + if [ ! -z "`use crypt`" ] ; then epatch ${DISTDIR}/${CRYPT_PATCH_P}.patch.bz2 fi @@ -45,38 +43,31 @@ # Fix unreadable df output epatch ${FILESDIR}/no-symlink-resolve.patch - cp MCONFIG MCONFIG.orig - - sed -e "s:-pipe -O2 \$(CPUOPT) -fomit-frame-pointer:${CFLAGS}:" \ + sed -i \ + -e "s:-pipe -O2 \$(CPUOPT) -fomit-frame-pointer:${CFLAGS}:" \ -e "s:CPU=.*:CPU=${CHOST%%-*}:" \ -e "s:HAVE_PAM=no:HAVE_PAM=yes:" \ -e "s:HAVE_SLN=no:HAVE_SLN=yes:" \ -e "s:HAVE_TSORT=no:HAVE_TSORT=yes:" \ -e "s:usr/man:usr/share/man:" \ -e "s:usr/info:usr/share/info:" \ - MCONFIG.orig > MCONFIG + MCONFIG || die "MCONFIG sed" + + if [ -z "`use nls`" ] ; then + sed -i -e 's/DISABLE_NLS=no/DISABLE_NLS=yes/' MCONFIG || + die "MCONFIG nls sed" + fi } src_compile() { ./configure || die "config" - if [ -z "`use nls`" ] - then - cp defines.h defines.h.orig - grep -v "ENABLE_NLS" \ - defines.h.orig > defines.h - cp defines.h defines.h.orig - grep -v "HAVE_libintl_h" \ - defines.h.orig > defines.h - - cp Makefile Makefile.orig - sed -e "s:SUBDIRS=po \\\:SUBDIRS= \\\:g" \ - Makefile.orig > Makefile + if [ "`use static`" ] ; then + export LDFLAGS=-static fi - - emake LDFLAGS="" || die - cd sys-utils; makeinfo *.texi || die + emake || die "emake" + cd sys-utils && makeinfo *.texi || die "makeinfo" } src_install() { @@ -88,4 +79,3 @@ docinto examples dodoc example.files/* } -