summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-03 15:20:25 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-03 15:20:25 +0000
commitddce6977e7142b3045390d40fb2c2bf5ebe9bd7b (patch)
treef6fc4afd8036339677f948626355952fe0da8516 /sys-apps
parentold (diff)
downloadgentoo-2-ddce6977e7142b3045390d40fb2c2bf5ebe9bd7b.tar.gz
gentoo-2-ddce6977e7142b3045390d40fb2c2bf5ebe9bd7b.tar.bz2
gentoo-2-ddce6977e7142b3045390d40fb2c2bf5ebe9bd7b.zip
Fix up building with NLS disabled #191111 by Jason S. and fix locale dir setting #190895 by Benno Schulenberg.
(Portage version: 2.1.3.7)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/util-linux/ChangeLog9
-rw-r--r--sys-apps/util-linux/files/digest-util-linux-2.13-r13
-rw-r--r--sys-apps/util-linux/files/util-linux-2.13-locale.patch121
-rw-r--r--sys-apps/util-linux/util-linux-2.13-r1.ebuild77
4 files changed, 209 insertions, 1 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog
index e6e43cad0cfa..bd66ee5bb9fc 100644
--- a/sys-apps/util-linux/ChangeLog
+++ b/sys-apps/util-linux/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/util-linux
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.199 2007/08/28 00:23:27 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.200 2007/09/03 15:20:25 vapier Exp $
+
+*util-linux-2.13-r1 (03 Sep 2007)
+
+ 03 Sep 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/util-linux-2.13-locale.patch, +util-linux-2.13-r1.ebuild:
+ Fix up building with NLS disabled #191111 by Jason S. and fix locale dir
+ setting #190895 by Benno Schulenberg.
*util-linux-2.13 (28 Aug 2007)
diff --git a/sys-apps/util-linux/files/digest-util-linux-2.13-r1 b/sys-apps/util-linux/files/digest-util-linux-2.13-r1
new file mode 100644
index 000000000000..a2e47b157d36
--- /dev/null
+++ b/sys-apps/util-linux/files/digest-util-linux-2.13-r1
@@ -0,0 +1,3 @@
+MD5 2175a6e64ba0cf8ff05402eaee33e4b0 util-linux-ng-2.13.tar.bz2 2702618
+RMD160 499b1c5c2060b23d8bf504122a22122af99eb7fa util-linux-ng-2.13.tar.bz2 2702618
+SHA256 002412e93d8e85b1796fdbe65bbb0a4d193d0317a7155fda4270667e08bdfbfc util-linux-ng-2.13.tar.bz2 2702618
diff --git a/sys-apps/util-linux/files/util-linux-2.13-locale.patch b/sys-apps/util-linux/files/util-linux-2.13-locale.patch
new file mode 100644
index 000000000000..feb46f98af3a
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.13-locale.patch
@@ -0,0 +1,121 @@
+http://bugs.gentoo.org/191111
+http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/614
+
+Move all locale/nls related includes to nls.h and make sure they are only
+pulled in when ENABLE_NLS. When !ENABLE_NLS, don't include any locale/nls
+related headers and stub out setlocale() as well.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/nls.h | 5 ++++-
+ misc-utils/cal.c | 1 -
+ misc-utils/look.c | 1 -
+ misc-utils/write.c | 1 -
+ text-utils/colrm.c | 2 +-
+ text-utils/more.c | 1 -
+ text-utils/pg.c | 2 --
+ 7 files changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/include/nls.h b/include/nls.h
+index f571ca5..e9f7927 100644
+--- a/include/nls.h
++++ b/include/nls.h
+@@ -9,6 +9,8 @@ int main(int argc, char *argv[]);
+
+ #ifdef ENABLE_NLS
+ # include <libintl.h>
++# include <locale.h>
++# include <nl_types.h>
+ # define _(Text) gettext (Text)
+ # ifdef gettext_noop
+ # define N_(String) gettext_noop (String)
+@@ -16,9 +18,10 @@ int main(int argc, char *argv[]);
+ # define N_(String) (String)
+ # endif
+ #else
+-# include <locale.h>
+ # undef bindtextdomain
+ # define bindtextdomain(Domain, Directory) /* empty */
++# undef setlocale
++# define setlocale(Category, Locale) /* empty */
+ # undef textdomain
+ # define textdomain(Domain) /* empty */
+ # define _(Text) (Text)
+diff --git a/misc-utils/cal.c b/misc-utils/cal.c
+index f5ede93..77333d8 100644
+--- a/misc-utils/cal.c
++++ b/misc-utils/cal.c
+@@ -63,7 +63,6 @@
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
+-#include <locale.h>
+ #include "errs.h"
+ #include "nls.h"
+
+diff --git a/misc-utils/look.c b/misc-utils/look.c
+index 5c7e30c..9e25596 100644
+--- a/misc-utils/look.c
++++ b/misc-utils/look.c
+@@ -59,7 +59,6 @@
+ #include <strings.h>
+ #include <ctype.h>
+ #include <getopt.h>
+-#include <locale.h>
+ #include "pathnames.h"
+ #include "nls.h"
+
+diff --git a/misc-utils/write.c b/misc-utils/write.c
+index b3c96d1..46b8f0a 100644
+--- a/misc-utils/write.c
++++ b/misc-utils/write.c
+@@ -54,7 +54,6 @@
+ #include <pwd.h>
+ #include <string.h>
+ #include <stdlib.h>
+-#include <locale.h>
+ #include <signal.h>
+ #include <sys/param.h>
+ #include <sys/signal.h>
+diff --git a/text-utils/colrm.c b/text-utils/colrm.c
+index 5e18a6f..e8b1ea4 100644
+--- a/text-utils/colrm.c
++++ b/text-utils/colrm.c
+@@ -40,8 +40,8 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <locale.h>
+
++#include "nls.h"
+ #include "widechar.h"
+
+ /*
+diff --git a/text-utils/more.c b/text-utils/more.c
+index 19c4417..5dcae7b 100644
+--- a/text-utils/more.c
++++ b/text-utils/more.c
+@@ -55,7 +55,6 @@
+ #include <sys/file.h>
+ #include <sys/wait.h>
+ #include <a.out.h>
+-#include <locale.h>
+ #include "xstrncpy.h"
+ #include "nls.h"
+ #include "widechar.h"
+diff --git a/text-utils/pg.c b/text-utils/pg.c
+index 10bdd15..3e1b25e 100644
+--- a/text-utils/pg.c
++++ b/text-utils/pg.c
+@@ -49,8 +49,6 @@
+ #include <unistd.h>
+ #include <signal.h>
+ #include <setjmp.h>
+-#include <locale.h>
+-#include <nl_types.h>
+ #include <libgen.h>
+
+ #ifdef HAVE_NCURSES_H
+--
+1.5.3.rc7
+
diff --git a/sys-apps/util-linux/util-linux-2.13-r1.ebuild b/sys-apps/util-linux/util-linux-2.13-r1.ebuild
new file mode 100644
index 000000000000..d92ba29868df
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.13-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.13-r1.ebuild,v 1.1 2007/09/03 15:20:25 vapier Exp $
+
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git"
+inherit eutils
+[[ ${PV} == "9999" ]] && inherit git
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-ng-${MY_PV}
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux-ng/"
+if [[ ${PV} == "9999" ]] ; then
+ SRC_URI=""
+else
+ SRC_URI="http://www.kernel.org/pub/linux/utils/util-linux-ng/v${PV:0:4}/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="nls old-linux selinux"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ >=sys-libs/ncurses-5.2-r2
+ >=sys-fs/e2fsprogs-1.34
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/os-headers"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git_src_unpack
+ cd "${S}"
+ ./autogen.sh || die
+ else
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-locale.patch #191111
+ fi
+}
+
+src_compile() {
+ export localedir="/usr/share/locale" #190895
+ econf \
+ --with-fsprobe=blkid \
+ $(use_enable nls) \
+ --enable-agetty \
+ --enable-cramfs \
+ $(use_enable old-linux elvtune) \
+ --disable-init \
+ --disable-kill \
+ --disable-last \
+ --disable-mesg \
+ --enable-partx \
+ --enable-raw \
+ --enable-rdev \
+ --enable-rename \
+ --disable-reset \
+ --disable-login-utils \
+ --enable-schedutils \
+ --disable-wall \
+ --enable-write \
+ --without-pam \
+ $(use_with selinux) \
+ || die "configure failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "install failed"
+ dodoc AUTHORS NEWS README* TODO docs/*
+}