In file included from coders/art.c:36:0: ./magick/studio.h:54:36: error: missing binary operator before token ".0" This is because of MAGICK_TARGET_CPU being set to $host_cpu, which on an hppa2.0-unknown-linux-gnu target means the dot is included. We could filter it out with a simple configure patch. A configure.ac patch is included as well, but then aclocal complains that it wants sys-devel/autoconf-2.69. --- graphicsmagick-1.3.17.ebuild 15 Oct 2012 06:03:16 -0000 1.1 +++ graphicsmagick-1.3.17.ebuild 16 Oct 2012 17:26:35 -0000 @@ -3,7 +3,7 @@ # $Header: /var/cvsroot/gentoo-x86/media-gfx/graphicsmagick/graphicsmagick-1.3.17.ebuild,v 1.1 2012/10/15 06:03:16 radhermit Exp $ EAPI=5 -inherit toolchain-funcs +inherit eutils toolchain-funcs MY_P=${P/graphicsm/GraphicsM} @@ -44,6 +44,10 @@ S=${WORKDIR}/${MY_P} +src_prepare() { + epatch "${FILESDIR}"/${P}-hppa.patch +} + src_configure() { local depth=8 use q16 && depth=16 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,7 @@ dnl Compute the canonical host (run-time) system type variable AC_CANONICAL_HOST -MAGICK_TARGET_CPU=$host_cpu +MAGICK_TARGET_CPU=${host_cpu/./} AC_SUBST(MAGICK_TARGET_CPU) AC_DEFINE_UNQUOTED(MAGICK_TARGET_CPU,$MAGICK_TARGET_CPU,[Target Host CPU]) --- a/configure +++ b/configure @@ -3221,7 +3221,7 @@ -MAGICK_TARGET_CPU=$host_cpu +MAGICK_TARGET_CPU=${host_cpu/./} cat >>confdefs.h <<_ACEOF
${var/replace} is a bash extension, so that won't cut it looking at the code that actually uses MAGICK_TARGET_CPU, i see it is crap. it is expanded in exactly one place (which you quoted): magick/studio.h:#if defined(MAGICK_TARGET_CPU) && (MAGICK_TARGET_CPU == powerpc) replace it with a simple: #ifdef __powerpc__
Created attachment 326716 [details, diff] files/graphicsmagick-1.3.17-ppc.patch (In reply to comment #1) > ${var/replace} is a bash extension, so that won't cut it It isn't the only use of a bash extension in configure{,.ac}, I think. > replace it with a simple: > #ifdef __powerpc__
Comment on attachment 326716 [details, diff] files/graphicsmagick-1.3.17-ppc.patch >-MAGICK_TARGET_CPU=$host_cpu >-AC_SUBST(MAGICK_TARGET_CPU) you'll need to keep these two lines. the makefile uses them when invoking rpm related code. not relevant to us, but upstream might get upset if you broke it :).
I have applied the (shortened) patch to 1.3.18 for bug #477606. Would anyone like to push this upstream?
The ppc patch in tree was pushed upstream here: http://hg.code.sf.net/p/graphicsmagick/code/rev/20f96db7e5a1