summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-04-21 06:24:18 +0000
committerMike Frysinger <vapier@gentoo.org>2012-04-21 06:24:18 +0000
commit9934d704db809a22759a5970e98c11faad3a590a (patch)
tree4bdd26949e192dc65a45b76375893f875c075a9b /sys-apps/util-linux
parentMissing Categories Utility and TextTools in xfce4-dict.desktop (as required b... (diff)
downloadgentoo-2-9934d704db809a22759a5970e98c11faad3a590a.tar.gz
gentoo-2-9934d704db809a22759a5970e98c11faad3a590a.tar.bz2
gentoo-2-9934d704db809a22759a5970e98c11faad3a590a.zip
Add support for older C libraries that do not support latest POSIX standard (%as flags) #406303 by Ed Wildgoose.
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/util-linux')
-rw-r--r--sys-apps/util-linux/ChangeLog9
-rw-r--r--sys-apps/util-linux/files/util-linux-2.20.1-no-printf-alloc.patch110
-rw-r--r--sys-apps/util-linux/files/util-linux-2.21.1-no-printf-alloc.patch107
-rw-r--r--sys-apps/util-linux/util-linux-2.20.1-r1.ebuild13
-rw-r--r--sys-apps/util-linux/util-linux-2.20.1-r2.ebuild13
-rw-r--r--sys-apps/util-linux/util-linux-2.21.1.ebuild13
-rw-r--r--sys-apps/util-linux/util-linux-9999.ebuild5
7 files changed, 254 insertions, 16 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog
index ddedb14b7f13..3b267ba45b53 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-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.378 2012/04/14 05:14:41 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.379 2012/04/21 06:24:18 vapier Exp $
+
+ 21 Apr 2012; Mike Frysinger <vapier@gentoo.org> util-linux-2.20.1-r1.ebuild,
+ util-linux-2.20.1-r2.ebuild, +files/util-linux-2.20.1-no-printf-alloc.patch,
+ util-linux-2.21.1.ebuild, +files/util-linux-2.21.1-no-printf-alloc.patch,
+ util-linux-9999.ebuild:
+ Add support for older C libraries that do not support latest POSIX standard
+ (%as flags) #406303 by Ed Wildgoose.
14 Apr 2012; Zac Medico <zmedico@gentoo.org> util-linux-2.21.1.ebuild,
util-linux-9999.ebuild:
diff --git a/sys-apps/util-linux/files/util-linux-2.20.1-no-printf-alloc.patch b/sys-apps/util-linux/files/util-linux-2.20.1-no-printf-alloc.patch
new file mode 100644
index 000000000000..a390344e0dcd
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.20.1-no-printf-alloc.patch
@@ -0,0 +1,110 @@
+for systems that don't support latest POSIX standard: %as
+
+https://bugs.gentoo.org/406303
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -489,10 +489,6 @@ as)
+ AC_DEFINE([HAVE_SCANF_AS_MODIFIER], [1], [scanf %as modifier]) ;;
+ *)
+ AC_MSG_RESULT([no])
+- if "x$build_libmount" = xyes; then
+- AC_MSG_WARN([%as or %ms for sscanf() not found; do not build libmount])
+- build_libmount=no
+- fi
+ esac
+
+
+--- a/libmount/src/tab_parse.c
++++ b/libmount/src/tab_parse.c
+@@ -22,6 +22,10 @@
+ #include "pathnames.h"
+ #include "strutils.h"
+
++#ifndef HAVE_SCANF_MS_MODIFIER
++# define UL_SCNsA "%s"
++#endif
++
+ static inline char *skip_spaces(char *s)
+ {
+ assert(s);
+@@ -61,16 +65,31 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, char *s)
+ int rc, n = 0, xrc;
+ char *src = NULL, *fstype = NULL, *optstr = NULL;
+
++#ifndef HAVE_SCANF_MS_MODIFIER
++ size_t len = strlen(s) + 1;
++ src = malloc(len);
++ fstype = malloc(len);
++ fs->target = malloc(len);
++ optstr = malloc(len);
++#endif
++
+ rc = sscanf(s, UL_SCNsA" " /* (1) source */
+ UL_SCNsA" " /* (2) target */
+ UL_SCNsA" " /* (3) FS type */
+ UL_SCNsA" " /* (4) options */
+ "%n", /* byte count */
+
++#ifdef HAVE_SCANF_MS_MODIFIER
+ &src,
+ &fs->target,
+ &fstype,
+ &optstr,
++#else
++ src,
++ fs->target,
++ fstype,
++ optstr,
++#endif
+ &n);
+ xrc = rc;
+
+@@ -136,6 +155,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
+ unsigned int maj, min;
+ char *fstype = NULL, *src = NULL, *p;
+
++#ifndef HAVE_SCANF_MS_MODIFIER
++ size_t len = strlen(s) + 1;
++ fs->root = malloc(len);
++ fs->target = malloc(len);
++ fs->vfs_optstr = malloc(len);
++ fstype = malloc(len);
++ src = malloc(len);
++#endif
++
+ rc = sscanf(s, "%u " /* (1) id */
+ "%u " /* (2) parent */
+ "%u:%u " /* (3) maj:min */
+@@ -147,9 +175,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
+ &fs->id,
+ &fs->parent,
+ &maj, &min,
++#ifdef HAVE_SCANF_MS_MODIFIER
+ &fs->root,
+ &fs->target,
+ &fs->vfs_optstr,
++#else
++ fs->root,
++ fs->target,
++ fs->vfs_optstr,
++#endif
+ &end);
+
+ if (rc >= 7 && end > 0)
+@@ -167,9 +201,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
+ UL_SCNsA" " /* (9) source */
+ UL_SCNsA, /* (10) fs options (fs specific) */
+
++#ifdef HAVE_SCANF_MS_MODIFIER
+ &fstype,
+ &src,
+ &fs->fs_optstr);
++#else
++ fstype,
++ src,
++ fs->fs_optstr);
++#endif
+
+ if (rc >= 10) {
+ fs->flags |= MNT_FS_KERNEL;
diff --git a/sys-apps/util-linux/files/util-linux-2.21.1-no-printf-alloc.patch b/sys-apps/util-linux/files/util-linux-2.21.1-no-printf-alloc.patch
new file mode 100644
index 000000000000..268c8e12e2d6
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.21.1-no-printf-alloc.patch
@@ -0,0 +1,107 @@
+for systems that don't support latest POSIX standard: %as
+
+https://bugs.gentoo.org/406303
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -688,7 +688,6 @@ AC_ARG_ENABLE([libmount],
+ UL_BUILD_INIT([libmount])
+ UL_REQUIRES_LINUX([libmount])
+ UL_REQUIRES_BUILD([libmount], [libblkid])
+-UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier])
+ AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$build_libmount" = xyes)
+
+ AC_SUBST([LIBMOUNT_VERSION])
+--- a/libmount/src/tab_parse.c
++++ b/libmount/src/tab_parse.c
+@@ -22,6 +22,10 @@
+ #include "pathnames.h"
+ #include "strutils.h"
+
++#ifndef HAVE_SCANF_MS_MODIFIER
++# define UL_SCNsA "%s"
++#endif
++
+ static inline char *skip_spaces(char *s)
+ {
+ assert(s);
+@@ -61,16 +65,31 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, char *s)
+ int rc, n = 0, xrc;
+ char *src = NULL, *fstype = NULL, *optstr = NULL;
+
++#ifndef HAVE_SCANF_MS_MODIFIER
++ size_t len = strlen(s) + 1;
++ src = malloc(len);
++ fstype = malloc(len);
++ fs->target = malloc(len);
++ optstr = malloc(len);
++#endif
++
+ rc = sscanf(s, UL_SCNsA" " /* (1) source */
+ UL_SCNsA" " /* (2) target */
+ UL_SCNsA" " /* (3) FS type */
+ UL_SCNsA" " /* (4) options */
+ "%n", /* byte count */
+
++#ifdef HAVE_SCANF_MS_MODIFIER
+ &src,
+ &fs->target,
+ &fstype,
+ &optstr,
++#else
++ src,
++ fs->target,
++ fstype,
++ optstr,
++#endif
+ &n);
+ xrc = rc;
+
+@@ -136,6 +155,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
+ unsigned int maj, min;
+ char *fstype = NULL, *src = NULL, *p;
+
++#ifndef HAVE_SCANF_MS_MODIFIER
++ size_t len = strlen(s) + 1;
++ fs->root = malloc(len);
++ fs->target = malloc(len);
++ fs->vfs_optstr = malloc(len);
++ fstype = malloc(len);
++ src = malloc(len);
++#endif
++
+ rc = sscanf(s, "%u " /* (1) id */
+ "%u " /* (2) parent */
+ "%u:%u " /* (3) maj:min */
+@@ -147,9 +175,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
+ &fs->id,
+ &fs->parent,
+ &maj, &min,
++#ifdef HAVE_SCANF_MS_MODIFIER
+ &fs->root,
+ &fs->target,
+ &fs->vfs_optstr,
++#else
++ fs->root,
++ fs->target,
++ fs->vfs_optstr,
++#endif
+ &end);
+
+ if (rc >= 7 && end > 0)
+@@ -167,9 +201,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
+ UL_SCNsA" " /* (9) source */
+ UL_SCNsA, /* (10) fs options (fs specific) */
+
++#ifdef HAVE_SCANF_MS_MODIFIER
+ &fstype,
+ &src,
+ &fs->fs_optstr);
++#else
++ fstype,
++ src,
++ fs->fs_optstr);
++#endif
+
+ if (rc >= 10) {
+ fs->flags |= MNT_FS_KERNEL;
diff --git a/sys-apps/util-linux/util-linux-2.20.1-r1.ebuild b/sys-apps/util-linux/util-linux-2.20.1-r1.ebuild
index 9bcec28ba5bd..b0fc3eea93fb 100644
--- a/sys-apps/util-linux/util-linux-2.20.1-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.20.1-r1.ebuild
@@ -1,11 +1,12 @@
# Copyright 1999-2012 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.20.1-r1.ebuild,v 1.6 2012/03/03 15:31:19 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.20.1-r1.ebuild,v 1.7 2012/04/21 06:24:18 vapier Exp $
EAPI="3"
EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-inherit eutils toolchain-funcs libtool flag-o-matic
+AUTOTOOLS_AUTO_DEPEND="no"
+inherit eutils toolchain-funcs libtool flag-o-matic autotools
[[ ${PV} == "9999" ]] && inherit git autotools
MY_PV=${PV/_/-}
@@ -36,7 +37,8 @@ RDEPEND="!sys-process/schedutils
ncurses? ( >=sys-libs/ncurses-5.2-r2 )
perl? ( dev-lang/perl )
selinux? ( sys-libs/libselinux )
- slang? ( sys-libs/slang )"
+ slang? ( sys-libs/slang )
+ uclibc? ( ${AUTOTOOLS_DEPEND} )"
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
virtual/os-headers"
@@ -49,7 +51,10 @@ src_prepare() {
else
use loop-aes && epatch "${WORKDIR}"/util-linux-*.diff
fi
- use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
+ if use uclibc ; then
+ epatch "${FILESDIR}"/${P}-no-printf-alloc.patch #406303
+ eautoreconf
+ fi
elibtoolize
}
diff --git a/sys-apps/util-linux/util-linux-2.20.1-r2.ebuild b/sys-apps/util-linux/util-linux-2.20.1-r2.ebuild
index 535d0de7db0f..adf1d2d79b19 100644
--- a/sys-apps/util-linux/util-linux-2.20.1-r2.ebuild
+++ b/sys-apps/util-linux/util-linux-2.20.1-r2.ebuild
@@ -1,11 +1,12 @@
# Copyright 1999-2012 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.20.1-r2.ebuild,v 1.1 2012/02/16 20:10:52 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.20.1-r2.ebuild,v 1.2 2012/04/21 06:24:18 vapier Exp $
EAPI="3"
EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-inherit eutils toolchain-funcs libtool flag-o-matic
+AUTOTOOLS_AUTO_DEPEND="no"
+inherit eutils toolchain-funcs libtool flag-o-matic autotools
[[ ${PV} == "9999" ]] && inherit git autotools
MY_PV=${PV/_/-}
@@ -36,7 +37,8 @@ RDEPEND="!sys-process/schedutils
ncurses? ( >=sys-libs/ncurses-5.2-r2 )
perl? ( dev-lang/perl )
selinux? ( sys-libs/libselinux )
- slang? ( sys-libs/slang )"
+ slang? ( sys-libs/slang )
+ uclibc? ( ${AUTOTOOLS_DEPEND} )"
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
virtual/os-headers"
@@ -51,7 +53,10 @@ src_prepare() {
fi
epatch "${FILESDIR}"/${P}-libmount-c++.patch #401057
epatch "${FILESDIR}"/${PN}-2.20.1-umount-fs-search.patch #403073
- use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
+ if use uclibc ; then
+ epatch "${FILESDIR}"/${P}-no-printf-alloc.patch #406303
+ eautoreconf
+ fi
elibtoolize
}
diff --git a/sys-apps/util-linux/util-linux-2.21.1.ebuild b/sys-apps/util-linux/util-linux-2.21.1.ebuild
index 74816c749d7b..6054e96d1423 100644
--- a/sys-apps/util-linux/util-linux-2.21.1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.21.1.ebuild
@@ -1,11 +1,12 @@
# Copyright 1999-2012 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.21.1.ebuild,v 1.4 2012/04/14 05:14:41 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.21.1.ebuild,v 1.5 2012/04/21 06:24:18 vapier Exp $
EAPI="3"
EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-inherit eutils toolchain-funcs libtool flag-o-matic
+AUTOTOOLS_AUTO_DEPEND="no"
+inherit eutils toolchain-funcs libtool flag-o-matic autotools
[[ ${PV} == "9999" ]] && inherit git-2 autotools
MY_PV=${PV/_/-}
@@ -36,7 +37,8 @@ RDEPEND="!sys-process/schedutils
ncurses? ( >=sys-libs/ncurses-5.2-r2 )
perl? ( dev-lang/perl )
selinux? ( sys-libs/libselinux )
- slang? ( sys-libs/slang )"
+ slang? ( sys-libs/slang )
+ uclibc? ( ${AUTOTOOLS_DEPEND} )"
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
virtual/os-headers"
@@ -49,7 +51,10 @@ src_prepare() {
else
use loop-aes && epatch "${WORKDIR}"/util-linux-*.diff
fi
- use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
+ if use uclibc ; then
+ epatch "${FILESDIR}"/${P}-no-printf-alloc.patch #406303
+ eautoreconf
+ fi
elibtoolize
}
diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild
index 4113d49b072d..7ea753a052e2 100644
--- a/sys-apps/util-linux/util-linux-9999.ebuild
+++ b/sys-apps/util-linux/util-linux-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-9999.ebuild,v 1.30 2012/04/14 05:14:41 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-9999.ebuild,v 1.31 2012/04/21 06:24:18 vapier Exp $
EAPI="3"
@@ -25,7 +25,7 @@ fi
LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain"
SLOT="0"
-IUSE="+cramfs crypt ddate loop-aes ncurses nls old-linux perl selinux slang static-libs uclibc unicode"
+IUSE="+cramfs crypt ddate loop-aes ncurses nls old-linux perl selinux slang static-libs unicode"
RDEPEND="!sys-process/schedutils
!sys-apps/setarch
@@ -50,7 +50,6 @@ src_prepare() {
else
use loop-aes && epatch "${WORKDIR}"/util-linux-*.diff
fi
- use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
elibtoolize
}