summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2011-05-21 06:37:43 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2011-05-21 06:37:43 +0000
commit6316cd1200cb0a43362347937f53111607be4854 (patch)
treee3e514539f265d1220c6ae151e82e972266333fe /sys-apps
parentAdd perl-5.14.0 as provider (diff)
downloadgentoo-2-6316cd1200cb0a43362347937f53111607be4854.tar.gz
gentoo-2-6316cd1200cb0a43362347937f53111607be4854.tar.bz2
gentoo-2-6316cd1200cb0a43362347937f53111607be4854.zip
Fix zip detection wrt #367417 by Lubos Kolouch.
(Portage version: 2.2.0_alpha33/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/file/ChangeLog8
-rw-r--r--sys-apps/file/file-5.07-r1.ebuild61
-rw-r--r--sys-apps/file/files/file-5.07-zip-detect.patch17
3 files changed, 85 insertions, 1 deletions
diff --git a/sys-apps/file/ChangeLog b/sys-apps/file/ChangeLog
index fbd291bcfdd1..0b1f34640c26 100644
--- a/sys-apps/file/ChangeLog
+++ b/sys-apps/file/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/file
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.197 2011/05/11 03:43:09 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.198 2011/05/21 06:37:43 ssuominen Exp $
+
+*file-5.07-r1 (21 May 2011)
+
+ 21 May 2011; Samuli Suominen <ssuominen@gentoo.org> +file-5.07-r1.ebuild,
+ +files/file-5.07-zip-detect.patch:
+ Fix zip detection wrt #367417 by Lubos Kolouch.
*file-5.07 (11 May 2011)
diff --git a/sys-apps/file/file-5.07-r1.ebuild b/sys-apps/file/file-5.07-r1.ebuild
new file mode 100644
index 000000000000..7c74ff7e8d5b
--- /dev/null
+++ b/sys-apps/file/file-5.07-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-5.07-r1.ebuild,v 1.1 2011/05/21 06:37:43 ssuominen Exp $
+
+EAPI="2"
+PYTHON_DEPEND="python? *"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="*-jython"
+
+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"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="python static-libs"
+
+PYTHON_MODNAME="magic.py"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-zip-detect.patch
+
+ elibtoolize
+ epunt_cxx
+
+ # dont let python README kill main README #60043
+ mv python/README{,.python}
+}
+
+src_configure() {
+ # file uses things like strndup() and wcwidth()
+ append-flags -D_GNU_SOURCE
+
+ econf $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake || die
+
+ use python && cd python && distutils_src_compile
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc ChangeLog MAINT README
+
+ use python && cd python && distutils_src_install
+ use static-libs || rm -f "${D}"/usr/lib*/libmagic.la
+}
+
+pkg_postinst() {
+ use python && distutils_pkg_postinst
+}
+
+pkg_postrm() {
+ use python && distutils_pkg_postrm
+}
diff --git a/sys-apps/file/files/file-5.07-zip-detect.patch b/sys-apps/file/files/file-5.07-zip-detect.patch
new file mode 100644
index 000000000000..3ac09449d636
--- /dev/null
+++ b/sys-apps/file/files/file-5.07-zip-detect.patch
@@ -0,0 +1,17 @@
+http://bugs.gentoo.org/show_bug.cgi?id=367417
+http://github.com/glensc/file/commit/e990dc53f658cb67ec7b33c32e0bc24e65801792#magic/Magdir/archive
+http://projects.archlinux.org/svntogit/packages.git/plain/file/trunk/file-5.07-zip-detect.patch
+
+--- magic/Magdir/archive
++++ magic/Magdir/archive
+@@ -654,6 +654,10 @@
+ >>>>78 string -template Template
+ !:mime application/vnd.oasis.opendocument.image-template
+
++>26 byte x Zip archive data
++
++
++
+ # StarView Metafile
+ # From Pierre Ducroquet <pinaraf@pinaraf.info>
+ 0 string VCLMTF StarView MetaFile