summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-09-22 02:09:06 +0000
committerMike Frysinger <vapier@gentoo.org>2011-09-22 02:09:06 +0000
commit1b832cea1f3359e67ac11e1b0da0662186b40403 (patch)
treec2b21c6bd60d0b7a261dd15e24e858b99f11bf30 /media-gfx/imagemagick
parentadd ~x86 keyword (diff)
downloadgentoo-2-1b832cea1f3359e67ac11e1b0da0662186b40403.tar.gz
gentoo-2-1b832cea1f3359e67ac11e1b0da0662186b40403.tar.bz2
gentoo-2-1b832cea1f3359e67ac11e1b0da0662186b40403.zip
Fix LFS detection when cross-compiling #383963#1 by Tim Harder.
(Portage version: 2.2.0_alpha58/cvs/Linux x86_64)
Diffstat (limited to 'media-gfx/imagemagick')
-rw-r--r--media-gfx/imagemagick/ChangeLog6
-rw-r--r--media-gfx/imagemagick/files/imagemagick-6.7.2.6-lfs.patch38
-rw-r--r--media-gfx/imagemagick/imagemagick-6.7.2.6.ebuild9
3 files changed, 50 insertions, 3 deletions
diff --git a/media-gfx/imagemagick/ChangeLog b/media-gfx/imagemagick/ChangeLog
index b185b0c6269b..ed6383b1c5bd 100644
--- a/media-gfx/imagemagick/ChangeLog
+++ b/media-gfx/imagemagick/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-gfx/imagemagick
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/imagemagick/ChangeLog,v 1.442 2011/09/14 13:10:26 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/imagemagick/ChangeLog,v 1.443 2011/09/22 02:09:05 vapier Exp $
+
+ 22 Sep 2011; Mike Frysinger <vapier@gentoo.org> imagemagick-6.7.2.6.ebuild,
+ +files/imagemagick-6.7.2.6-lfs.patch:
+ Fix LFS detection when cross-compiling #383963#1 by Tim Harder.
*imagemagick-6.7.2.6 (14 Sep 2011)
diff --git a/media-gfx/imagemagick/files/imagemagick-6.7.2.6-lfs.patch b/media-gfx/imagemagick/files/imagemagick-6.7.2.6-lfs.patch
new file mode 100644
index 000000000000..68877c0c5498
--- /dev/null
+++ b/media-gfx/imagemagick/files/imagemagick-6.7.2.6-lfs.patch
@@ -0,0 +1,38 @@
+the AC_SYS_LARGEFILE macro sets up ac_cv_sys_file_offset_bits, and when
+it uses a value of "no", it means "does not need special lfs behavior".
+so let's not second guess the behavior of it by running our own little
+bit of code which breaks cross-compiling. instead, only try the run
+test if we get back "unknown".
+
+sent upstream already. they said they'd integrate it in the next release.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -434,9 +434,11 @@
+ AC_FUNC_FSEEKO
+ LFS_CPPFLAGS=''
+ if test "$enable_largefile" != no; then
+- if test "$ac_cv_sys_file_offset_bits" != 'no'; then
+- LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
+- else
++ case $ac_cv_sys_file_offset_bits in
++ no)
++ # nothing to do here as the host supports LFS fine
++ ;;
++ unknown)
+ AC_MSG_CHECKING([for native large file support])
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
+ main () {
+@@ -445,7 +447,11 @@
+ [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+- fi
++ ;;
++ *)
++ LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
++ ;;
++ esac
+ if test "$ac_cv_sys_large_files" != 'no'; then
+ LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
+ fi
diff --git a/media-gfx/imagemagick/imagemagick-6.7.2.6.ebuild b/media-gfx/imagemagick/imagemagick-6.7.2.6.ebuild
index 42b82dda6f2a..8be4683976b7 100644
--- a/media-gfx/imagemagick/imagemagick-6.7.2.6.ebuild
+++ b/media-gfx/imagemagick/imagemagick-6.7.2.6.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/imagemagick/imagemagick-6.7.2.6.ebuild,v 1.1 2011/09/14 13:10:26 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/imagemagick/imagemagick-6.7.2.6.ebuild,v 1.2 2011/09/22 02:09:05 vapier Exp $
EAPI=4
-inherit multilib toolchain-funcs versionator
+inherit multilib toolchain-funcs versionator eutils autotools
MY_P=ImageMagick-$(replace_version_separator 3 '-')
@@ -63,6 +63,11 @@ RESTRICT="perl? ( userpriv )"
DOCS=( AUTHORS.txt ChangeLog NEWS.txt README.txt )
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-lfs.patch
+ eautoreconf
+}
+
src_configure() {
local depth=16
use q8 && depth=8