summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-04-07 10:04:55 +0000
committerMike Frysinger <vapier@gentoo.org>2007-04-07 10:04:55 +0000
commit407f9f9a79731b9e9930ae2ba0c356c79b11e6f4 (patch)
tree0cd11108be80fc28b47e9cd1711b4568b9d1a9a2 /sys-apps
parentmips stable (diff)
downloadgentoo-2-407f9f9a79731b9e9930ae2ba0c356c79b11e6f4.tar.gz
gentoo-2-407f9f9a79731b9e9930ae2ba0c356c79b11e6f4.tar.bz2
gentoo-2-407f9f9a79731b9e9930ae2ba0c356c79b11e6f4.zip
Workaround from upstream for crappy regex handling in newer glibcs #173368.
(Portage version: 2.1.2.3)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/file/ChangeLog8
-rw-r--r--sys-apps/file/file-4.20-r1.ebuild65
-rw-r--r--sys-apps/file/files/digest-file-4.20-r16
-rw-r--r--sys-apps/file/files/file-4.20-disable-regex.patch16
4 files changed, 94 insertions, 1 deletions
diff --git a/sys-apps/file/ChangeLog b/sys-apps/file/ChangeLog
index 697812d1b2e9..ab2c588677f4 100644
--- a/sys-apps/file/ChangeLog
+++ b/sys-apps/file/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/file
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.135 2007/03/25 18:04:11 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.136 2007/04/07 10:04:55 vapier Exp $
+
+*file-4.20-r1 (07 Apr 2007)
+
+ 07 Apr 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/file-4.20-disable-regex.patch, +file-4.20-r1.ebuild:
+ Workaround from upstream for crappy regex handling in newer glibcs #173368.
25 Mar 2007; Mike Frysinger <vapier@gentoo.org> file-4.20.ebuild:
Grab patch from upstream for non-portable regex flag #172146.
diff --git a/sys-apps/file/file-4.20-r1.ebuild b/sys-apps/file/file-4.20-r1.ebuild
new file mode 100644
index 000000000000..2e2b7f75b949
--- /dev/null
+++ b/sys-apps/file/file-4.20-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-4.20-r1.ebuild,v 1.1 2007/04/07 10:04:55 vapier Exp $
+
+inherit eutils distutils libtool flag-o-matic
+
+DESCRIPTION="identify a file's format by scanning binary data for patterns"
+HOMEPAGE="ftp://ftp.astron.com/pub/file/"
+SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz
+ ftp://ftp.gw.com/mirrors/pub/unix/file/${P}.tar.gz
+ ftp://ftp.gw.com/mirrors/pub/unix/file/patch-4.20-REG_STARTEND"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
+IUSE="python"
+RESTRICT="mirror" #171924
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd "${S}"/src
+ epatch "${DISTDIR}"/patch-4.20-REG_STARTEND
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-4.15-libtool.patch #99593
+ epatch "${FILESDIR}"/${PN}-4.19-init-file.patch #163948
+ epatch "${FILESDIR}"/${PN}-4.20-disable-regex.patch #173368
+ sed -i -e 's:__unused:file_gcc_unused:' src/file.[ch] #171178
+
+ elibtoolize
+ epunt_cxx
+
+ # make sure python links against the current libmagic #54401
+ sed -i "/library_dirs/s:'\.\./src':'../src/.libs':" python/setup.py
+
+ # dont let python README kill main README #60043
+ mv python/README{,.python}
+}
+
+src_compile() {
+ # file uses things like strndup() and wcwidth()
+ append-flags -D_GNU_SOURCE
+
+ econf --datadir=/usr/share/misc || die
+ emake || die "emake failed"
+
+ use python && cd python && distutils_src_compile
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc ChangeLog MAINT README
+
+ use python && cd python && distutils_src_install
+}
+
+pkg_postinst() {
+ use python && distutils_pkg_postinst
+}
+
+pkg_postrm() {
+ use python && distutils_pkg_postrm
+}
diff --git a/sys-apps/file/files/digest-file-4.20-r1 b/sys-apps/file/files/digest-file-4.20-r1
new file mode 100644
index 000000000000..8ecf19e146e2
--- /dev/null
+++ b/sys-apps/file/files/digest-file-4.20-r1
@@ -0,0 +1,6 @@
+MD5 402bdb26356791bd5d277099adacc006 file-4.20.tar.gz 548393
+RMD160 ff4f1a677a6377df3d7925ab4e36fec71dd3ebe7 file-4.20.tar.gz 548393
+SHA256 c0810fb3ddb6cb73c9ff045965e542af6e3eaa7f2995b3037181766d26d5e6e7 file-4.20.tar.gz 548393
+MD5 119b5fd6c60eede06ef909aa13fd65d2 patch-4.20-REG_STARTEND 1119
+RMD160 30ca934188bafe6fbe3967c1aee980bd7710b0b1 patch-4.20-REG_STARTEND 1119
+SHA256 add836395ad07c2b60697eb5f9b24a2dbf26746c7b4b18330afe4ca147b759e2 patch-4.20-REG_STARTEND 1119
diff --git a/sys-apps/file/files/file-4.20-disable-regex.patch b/sys-apps/file/files/file-4.20-disable-regex.patch
new file mode 100644
index 000000000000..61ff5501c26e
--- /dev/null
+++ b/sys-apps/file/files/file-4.20-disable-regex.patch
@@ -0,0 +1,16 @@
+http://mx.gw.com/pipermail/file/2007/000172.html
+http://bugs.gentoo.org/173368
+
+--- magic/Magdir/msdos
++++ magic/Magdir/msdos
+@@ -14,8 +14,8 @@
+
+ # OS/2 batch files are REXX. the second regex is a bit generic, oh well
+ # the matched commands seem to be common in REXX and uncommon elsewhere
+-100 regex/c =^\\s*call\\s+rxfuncadd.*sysloadfu OS/2 REXX batch file text
+-100 regex/c =^\\s*say\ ['"] OS/2 REXX batch file text
++# 100 regex/c =^\\s*call\\s+rxfuncadd.*sysloadfu OS/2 REXX batch file text
++# 100 regex/c =^\\s*say\ ['"] OS/2 REXX batch file text
+
+ 0 leshort 0x14c MS Windows COFF Intel 80386 object file
+ #>4 ledate x stamp %s