diff options
author | Sven 'sleipnir' Rebhan <odinshorse@googlemail.com> | 2009-07-10 10:00:44 +0000 |
---|---|---|
committer | Sven 'sleipnir' Rebhan <odinshorse@googlemail.com> | 2009-07-10 10:00:44 +0000 |
commit | 86803bc687c86d08614474c5ef1f62fbdbdf83bc (patch) | |
tree | fa4483d58e18f4b11386e4afbe93eddc94ec2021 /sys-apps | |
parent | Go back to file-4.23 as 5.* versions only handle version 7 magic files. (diff) | |
download | embedded-cross-86803bc687c86d08614474c5ef1f62fbdbdf83bc.tar.gz embedded-cross-86803bc687c86d08614474c5ef1f62fbdbdf83bc.tar.bz2 embedded-cross-86803bc687c86d08614474c5ef1f62fbdbdf83bc.zip |
Backport python fix for file-4.23.
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/file/file-4.23.ebuild | 59 | ||||
-rw-r--r-- | sys-apps/file/files/file-4.23-cross-python.patch | 13 |
2 files changed, 72 insertions, 0 deletions
diff --git a/sys-apps/file/file-4.23.ebuild b/sys-apps/file/file-4.23.ebuild new file mode 100644 index 0000000..5f9a5ee --- /dev/null +++ b/sys-apps/file/file-4.23.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-4.23.ebuild,v 1.7 2008/03/29 15:23:34 ranger 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" + +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 + + elibtoolize + epunt_cxx + + # make sure python links against the current libmagic #54401 + sed -i "/library_dirs/s:'\.\./src':'../src/.libs':" python/setup.py + epatch "${FILESDIR}/${P}-cross-python.patch" + + # 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/file-4.23-cross-python.patch b/sys-apps/file/files/file-4.23-cross-python.patch new file mode 100644 index 0000000..e0b6ee4 --- /dev/null +++ b/sys-apps/file/files/file-4.23-cross-python.patch @@ -0,0 +1,13 @@ +--- python/setup.py 2009-07-10 11:48:56.000000000 +0200 ++++ python/setup.py.new 2009-07-10 11:49:57.000000000 +0200 +@@ -3,8 +3,8 @@ + + magic_module = Extension('magic', + libraries = ['magic'], +- library_dirs = ['./','../','../src/.libs','/usr/lib/'], +- include_dirs = ['./','../','../src','/usr/include/'], ++ library_dirs = ['./','../','../src/.libs'], ++ include_dirs = ['./','../','../src'], + sources = ['py_magic.c']) + + setup (name = 'Magic file extensions', |