Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 429442 - app-text/ghostscript-gpl - disable endian check when cross-compiling
Summary: app-text/ghostscript-gpl - disable endian check when cross-compiling
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Printing Team
URL: http://bugs.ghostscript.com/show_bug....
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-08-02 07:16 UTC by DaboD
Modified: 2016-01-08 02:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (app-text:ghostscript-gpl-9.05-r2:20120802-071426.log,12.83 KB, text/plain)
2012-08-02 07:16 UTC, DaboD
Details
ghostscript-gpl-9.05-r3.ebuild (ghostscript-gpl-9.05-r3.ebuild,7.09 KB, text/plain)
2012-08-02 07:18 UTC, DaboD
Details
Remove BIGENDIAN check if cross-compiling (ghostscript-gpl-9.05-bigendian.patch,546 bytes, patch)
2012-08-02 07:20 UTC, DaboD
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DaboD 2012-08-02 07:16:34 UTC
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
Comment 1 DaboD 2012-08-02 07:18:12 UTC
Created attachment 320014 [details]
ghostscript-gpl-9.05-r3.ebuild
Comment 2 DaboD 2012-08-02 07:20:15 UTC
Created attachment 320016 [details, diff]
Remove BIGENDIAN check if cross-compiling

Check environment variable LCMS_BIGENDIAN instead of checking it when chross-compiling.
Comment 3 Jeroen Roovers gentoo-dev 2012-08-02 11:57:52 UTC
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"
Comment 4 DaboD 2012-08-02 13:07:09 UTC
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.