Created attachment 320012 [details] Build log $ emerge --info Portage 2.1.11.9 (!/opt/hec-pg/portage/hec-profiles/profiles/products/hec-mx53-debug/stage4, gcc-4.6.3, glibc-2.15-r2, 3.5.0-gentoo i686) ================================================================= System uname: Linux-3.5.0-gentoo-i686-Intel-R-_Core-TM-2_Quad_CPU_Q8300_@_2.50GHz-with-gentoo-2.1 Timestamp of tree: Mon, 23 Jul 2012 00:45:01 +0000 distcc 3.1 i686-pc-linux-gnu [disabled] ccache version 3.1.7 [enabled] app-shells/bash: 4.2_p37 dev-lang/python: 2.6.7-r2, 2.7.3-r2, 3.1.5, 3.2.3-r1 dev-util/ccache: 3.1.7 dev-util/cmake: 2.8.8-r3 dev-util/pkgconfig: 0.27 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.10.5 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.2 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.5.3-r2, 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers) sys-libs/glibc: 2.15-r2 Repositories: gentoo hec-pg_cross-toolchain hec ACCEPT_KEYWORDS="arm" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -pipe -Wl,-O3 -Wl,--as-needed -Wl,--hash-style=gnu -fno-strict-aliasing" CHOST="arm-linux-gnueabi" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CTARGET="arm-linux-gnueabi" CXXFLAGS="-O3 -pipe -Wl,-O3 -Wl,--as-needed -Wl,--hash-style=gnu -fno-strict-aliasing" DISTDIR="/var/lib/portage/distfiles" EMERGE_DEFAULT_OPTS="--keep-going y --deep" FCFLAGS="" FEATURES="assume-digests binpkg-logs buildpkg ccache compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles news nodoc noinfo parallel-fetch parallel-install parse-eapi-ebuild-head protect-owned sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" INSTALL_MASK="/usr/share/man" LANG="en_US.UTF-8" LDFLAGS="" MAKEOPTS="-j8" PKGDIR="/opt/hec-pg/portage/packages/hec-mx53/debug" PORTAGE_CONFIGROOT="/opt/hec-mx53/debug/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/var/lib/portage/gentoo" PORTDIR_OVERLAY="/var/lib/portage/cross-toolchain /var/lib/portage/hec" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X arm drm egl elibc_glibc gles2 gtk3 jpeg kernel_linux minimal neon nocxx nptl opengl openvg pulseaudio systemd udev unicode userland_GNU xa xcb xinerama zlib" BOARDS="loco" INPUT_DEVICES="evdev keyboard mouse tslib" PYTHON_TARGETS="python2_7 python3_1" SOC="mx53" VIDEO_CARDS="fbdev mx53" USE_PYTHON="2.7 3.1" Unset: CPPFLAGS, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 320014 [details] ghostscript-gpl-9.05-r3.ebuild
Created attachment 320016 [details, diff] Remove BIGENDIAN check if cross-compiling Check environment variable LCMS_BIGENDIAN instead of checking it when chross-compiling.
Comment on attachment 320014 [details] ghostscript-gpl-9.05-r3.ebuild --- ghostscript-gpl-9.05-r2.ebuild 2012-06-05 15:44:54.000000000 +0200 +++ - 2012-08-02 13:57:41.681642528 +0200 @@ -4,7 +4,7 @@ EAPI=3 -inherit autotools eutils multilib versionator flag-o-matic +inherit autotools eutils multilib versionator flag-o-matic toolchain-funcs DESCRIPTION="Ghostscript is an interpreter for the PostScript language and for PDF" HOMEPAGE="http://ghostscript.com/" @@ -90,7 +90,7 @@ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" EPATCH_SOURCE="${WORKDIR}/patches/" epatch - + if ! use bindist && use djvu ; then unpack gsdjvu-${GSDJVU_PV}.tar.gz cp gsdjvu-${GSDJVU_PV}/gsdjvu "${S}" @@ -122,6 +122,8 @@ cd "${S}" eautoreconf + + epatch "${FILESDIR}/${P}-bigendian.patch" cd "${S}/ijs" eautoreconf @@ -141,6 +143,14 @@ do FONTPATH="$FONTPATH${FONTPATH:+:}$path" done + + if tc-is-cross-compiler; then + einfo Generating native tools... + CC=$(tc-getBUILD_CC) CFLAGS= ./configure + emake -j1 ./obj/aux/echogs ./obj/aux/genarch ./obj/aux/genconf \ + ./obj/aux/gendev ./obj/aux/genht ./obj/aux/mkromfs || die + mv obj native-obj + fi econf \ --enable-dynamic \ @@ -175,6 +185,15 @@ } src_compile() { + if tc-is-cross-compiler; then + emake -j1 ./obj/aux/echogs ./obj/aux/genarch ./obj/aux/genconf + mv -f native-obj/aux/{echogs,genarch,genconf} obj/aux + emake -j1 ./obj/aux/mkromfs ./obj/aux/genht ./obj/aux/gendev + mv -f native-obj/aux/{mkromfs,genht,gendev} obj/aux + + cp -a obj soobj + fi + emake -j1 so all || die "emake failed" cd "${S}/ijs"
I don't know how to modify configure.ac or configure.in, so I modified configure directly instead. If you known how to do it, you are welcome to replace my patch.
i fixed the endian check: http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49a99600e96a5db897428d37c7ba88b3120cb596