summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-02-07 04:50:30 +0000
committerMike Frysinger <vapier@gentoo.org>2007-02-07 04:50:30 +0000
commit2c0ad376f8d8663975a2ff10e2bab71158d237f1 (patch)
treebfdc77217a939b7ae3fa899312e39d078872342a /sys-apps
parentarm/ia64/s390/sh stable (diff)
downloadgentoo-2-2c0ad376f8d8663975a2ff10e2bab71158d237f1.tar.gz
gentoo-2-2c0ad376f8d8663975a2ff10e2bab71158d237f1.tar.bz2
gentoo-2-2c0ad376f8d8663975a2ff10e2bab71158d237f1.zip
Patch by Jeff Hansen to initialize the file member #163948. Also fix up wcwidth prototype.
(Portage version: 2.1.2-r8)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/file/ChangeLog12
-rw-r--r--sys-apps/file/file-4.19-r1.ebuild57
-rw-r--r--sys-apps/file/files/digest-file-4.19-r13
-rw-r--r--sys-apps/file/files/file-4.19-init-file.patch21
-rw-r--r--sys-apps/file/files/file-4.19-wcwidth.patch13
5 files changed, 104 insertions, 2 deletions
diff --git a/sys-apps/file/ChangeLog b/sys-apps/file/ChangeLog
index 6541b4c9df4f..d325b1270f4c 100644
--- a/sys-apps/file/ChangeLog
+++ b/sys-apps/file/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-apps/file
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.117 2006/12/22 20:11:28 eroyf Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.118 2007/02/07 04:50:30 vapier Exp $
+
+*file-4.19-r1 (07 Feb 2007)
+
+ 07 Feb 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/file-4.19-init-file.patch, +files/file-4.19-wcwidth.patch,
+ +file-4.19-r1.ebuild:
+ Patch by Jeff Hansen to initialize the file member #163948. Also fix up
+ wcwidth prototype.
22 Dec 2006; Alexander H. Færøy <eroyf@gentoo.org> file-4.18.ebuild:
Stable on MIPS; bug #144624
diff --git a/sys-apps/file/file-4.19-r1.ebuild b/sys-apps/file/file-4.19-r1.ebuild
new file mode 100644
index 000000000000..f75ee7f23bd6
--- /dev/null
+++ b/sys-apps/file/file-4.19-r1.ebuild
@@ -0,0 +1,57 @@
+# 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.19-r1.ebuild,v 1.1 2007/02/07 04:50:30 vapier Exp $
+
+inherit eutils distutils libtool
+
+DESCRIPTION="identify a file's format by scanning binary data for patterns"
+HOMEPAGE="ftp://ftp.astron.com/pub/file/"
+SRC_URI="ftp://ftp.gw.com/mirrors/pub/unix/file/${P}.tar.gz
+ ftp://ftp.astron.com/pub/file/${P}.tar.gz"
+
+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"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-4.15-libtool.patch #99593
+ epatch "${FILESDIR}"/${PN}-4.19-init-file.patch #163948
+ epatch "${FILESDIR}"/${PN}-4.19-wcwidth.patch
+
+ 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() {
+ 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.19-r1 b/sys-apps/file/files/digest-file-4.19-r1
new file mode 100644
index 000000000000..f8bba151d757
--- /dev/null
+++ b/sys-apps/file/files/digest-file-4.19-r1
@@ -0,0 +1,3 @@
+MD5 a61ef3aa8339d5987148089afde25f60 file-4.19.tar.gz 546805
+RMD160 d8dbf2686eaef5bb1cb9467198acd3a4c5735ca7 file-4.19.tar.gz 546805
+SHA256 697250abdbcaf850728791a475a917d84287f7e2d67bab90021775db600c4d85 file-4.19.tar.gz 546805
diff --git a/sys-apps/file/files/file-4.19-init-file.patch b/sys-apps/file/files/file-4.19-init-file.patch
new file mode 100644
index 000000000000..96c9e68a4261
--- /dev/null
+++ b/sys-apps/file/files/file-4.19-init-file.patch
@@ -0,0 +1,21 @@
+When a new struct magic_set is created as the handle to the calling application
+(in magic_open), the "file" char * is not NULLified. This causes unexplained
+segfaults in other apps that don't properly have their magic.mgc file created,
+i.e. in app-arch/rpm-4.4.6-r3. The file pointer is some random value, so when
+file_magwarn tries to report a missing magic.mgc file, for example, it tries to
+print ms->file, which is NULL, and the segfault occurs.
+
+Fix by Jeff Hansen.
+
+http://bugs.gentoo.org/163948
+
+--- src/magic.c
++++ src/magic.c
+@@ -110,6 +110,7 @@ magic_open(int flags)
+ ms->haderr = 0;
+ ms->error = -1;
+ ms->mlist = NULL;
++ ms->file = NULL;
+ return ms;
+ free3:
+ free(ms->o.pbuf);
diff --git a/sys-apps/file/files/file-4.19-wcwidth.patch b/sys-apps/file/files/file-4.19-wcwidth.patch
new file mode 100644
index 000000000000..9b10c811ef07
--- /dev/null
+++ b/sys-apps/file/files/file-4.19-wcwidth.patch
@@ -0,0 +1,13 @@
+make sure we get the wcwidth() prototype
+
+--- src/file.c
++++ src/file.c
+@@ -29,6 +29,8 @@
+ * file - find type of a file or files - main program.
+ */
+
++#define _XOPEN_SOURCE
++
+ #include "file.h"
+ #include "magic.h"
+