summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-09-16 20:52:51 +0000
committerMike Frysinger <vapier@gentoo.org>2011-09-16 20:52:51 +0000
commit972e24ba7f12cf513b4debaf9611e799f62a7eba (patch)
tree1df59204795bcc23b76e4bc2454a80aa5107b9d7 /sys-apps/file
parentversion bump (diff)
downloadgentoo-2-972e24ba7f12cf513b4debaf9611e799f62a7eba.tar.gz
gentoo-2-972e24ba7f12cf513b4debaf9611e799f62a7eba.tar.bz2
gentoo-2-972e24ba7f12cf513b4debaf9611e799f62a7eba.zip
Version bump.
(Portage version: 2.2.0_alpha58/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/file')
-rw-r--r--sys-apps/file/ChangeLog8
-rw-r--r--sys-apps/file/file-5.09.ebuild98
-rw-r--r--sys-apps/file/files/file-5.09-cdf-arraycount.patch26
3 files changed, 131 insertions, 1 deletions
diff --git a/sys-apps/file/ChangeLog b/sys-apps/file/ChangeLog
index c5da6d269947..dce9c7d2167e 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.207 2011/08/09 13:37:04 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.208 2011/09/16 20:52:51 vapier Exp $
+
+*file-5.09 (16 Sep 2011)
+
+ 16 Sep 2011; Mike Frysinger <vapier@gentoo.org> +file-5.09.ebuild,
+ +files/file-5.09-cdf-arraycount.patch:
+ Version bump.
09 Aug 2011; Kacper Kowalik <xarthisius@gentoo.org> file-5.07-r3.ebuild:
ppc/ppc64 stable wrt #377723
diff --git a/sys-apps/file/file-5.09.ebuild b/sys-apps/file/file-5.09.ebuild
new file mode 100644
index 000000000000..5e02b78940ae
--- /dev/null
+++ b/sys-apps/file/file-5.09.ebuild
@@ -0,0 +1,98 @@
+# 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.09.ebuild,v 1.1 2011/09/16 20:52:51 vapier 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="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="python static-libs zlib"
+
+RDEPEND="zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}"
+
+PYTHON_MODNAME="magic.py"
+
+src_prepare() {
+ elibtoolize
+
+ epatch "${FILESDIR}"/${P}-cdf-arraycount.patch
+
+ # dont let python README kill main README #60043
+ mv python/README{,.python}
+}
+
+usex() { use $1 && echo ${2:-yes} || echo ${3:-no} ; }
+
+wd() { echo ${WORKDIR}/build-${CHOST}; }
+do_configure() {
+ ECONF_SOURCE=${S}
+
+ mkdir "$(wd)"
+ pushd "$(wd)" >/dev/null
+
+ econf "$@"
+
+ popd >/dev/null
+}
+src_configure() {
+ # file uses things like strndup() and wcwidth()
+ append-flags -D_GNU_SOURCE
+
+ # when cross-compiling, we need to build up our own file
+ # because people often don't keep matching host/target
+ # file versions #362941
+ if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
+ ac_cv_header_zlib_h=no \
+ ac_cv_lib_z_gzopen=no \
+ CHOST=${CBUILD} \
+ CFLAGS=${BUILD_CFLAGS} \
+ CXXFLAGS=${BUILD_CXXFLAGS} \
+ CPPFLAGS=${BUILD_CPPFLAGS} \
+ LDFLAGS="${BUILD_LDFLAGS} -static" \
+ do_configure --disable-shared
+ fi
+
+ export ac_cv_header_zlib_h=$(usex zlib) ac_cv_lib_z_gzopen=$(usex zlib)
+ do_configure $(use_enable static-libs static)
+}
+
+do_make() {
+ emake -C "$(wd)" "$@" || die
+}
+src_compile() {
+ if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
+ CHOST=${CBUILD} do_make -C src file
+ PATH=$(CHOST=${CBUILD} wd)/src:${PATH}
+ fi
+ do_make
+
+ use python && cd python && distutils_src_compile
+}
+
+src_install() {
+ do_make 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.09-cdf-arraycount.patch b/sys-apps/file/files/file-5.09-cdf-arraycount.patch
new file mode 100644
index 000000000000..f1815c09684b
--- /dev/null
+++ b/sys-apps/file/files/file-5.09-cdf-arraycount.patch
@@ -0,0 +1,26 @@
+http://mx.gw.com/pipermail/file/2011/000856.html
+
+--- a/src/cdf.c
++++ b/src/cdf.c
+@@ -57,10 +57,6 @@
+
+ #include "cdf.h"
+
+-#ifndef __arraycount
+-#define __arraycount(a) (sizeof(a) / sizeof(a[0]))
+-#endif
+-
+ #ifdef CDF_DEBUG
+ #define DPRINTF(a) printf a, fflush(stdout)
+ #else
+--- a/src/cdf.h
++++ b/src/cdf.h
+@@ -317,5 +317,8 @@
+ void cdf_dump_summary_info(const cdf_header_t *, const cdf_stream_t *);
+ #endif
+
++#ifndef __arraycount
++#define __arraycount(a) (sizeof(a) / sizeof(a[0]))
++#endif
+
+ #endif /* _H_CDF_ */