# HG changeset patch # User Christophe Lincoln # Date 1395790122 -3600 # Node ID 696015c40e5477873b4c52af32ec558ef7b0c167 # Parent 4833ae27d00f3ed93a0f69017b1db9ae520e8acc ARM: try to cross compile GTK on Tank diff -r 4833ae27d00f -r 696015c40e54 gtk+/receipt --- a/gtk+/receipt Wed Mar 26 00:26:09 2014 +0100 +++ b/gtk+/receipt Wed Mar 26 00:28:42 2014 +0100 @@ -11,27 +11,39 @@ WEB_SITE="http://www.gtk.org/" WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION:0:4}/$TARBALL" CONFIG_FILES="/etc/gtk-2.0/gtk.immodules" -CROSS="bug: /bin/bash: no: command not found" +HOST_ARCH="i486 arm" +CROSS_BUGS="/bin/bash: no: command not found" DEPENDS="glibc-base expat libxcb xcb-util zlib glib cairo pango atk libpng \ jpeg tiff gdk-pixbuf fontconfig freetype pixman libgio xorg-libX11 xorg-libXau \ xorg-libXcomposite xorg-libXcursor xorg-libXdamage xorg-libXdmcp xorg-libXext \ xorg-libXfixes xorg-libXinerama xorg-libXrender xorg-libXrandr" -BUILD_DEPENDS="bash pkg-config xorg-xextproto cups-dev libcomerr3 cups dbus-dev \ -gobject-introspection gobject-introspection-dev libffi-dev perl atk-dev \ -pango-dev cairo-dev gdk-pixbuf-dev libxml2-dev" +BUILD_DEPENDS="bash pkg-config xorg-xextproto cups-dev libcomerr3 \ +dbus-dev gobject-introspection-dev libffi-dev perl atk-dev pango-dev \ +cairo-dev gdk-pixbuf-dev libxml2-dev" + +# Handle cross compilation. +case "$ARCH" in + arm*) + BUILD_DEPENDS="atk-dev pango-dev gdk-pixbuf-dev dbus-dev dbus-glib-dev \ +xorg-inputproto" + ARCH_ARGS="--enable-introspection=no --disable-glibtest --disable-cups \ +--disable-papi --with-gdktarget=x11 --with-xinput --enable-display-migration \ +gio_can_sniff=yes" + export LDFLAGS=-L/cross/$ARCH/sysroot/usr/lib + export CPPFLAGS=-I/cross/$ARCH/sysroot/usr/include ;; +esac # Rules to configure and make the package. compile_rules() { - cd $src ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --with-html-dir=/usr/share/doc \ - --build=$HOST_SYSTEM --host=$HOST_SYSTEM + $CONFIGURE_ARGS $ARCH_ARGS && # https://bugzilla.gnome.org/show_bug.cgi?id=655517 - sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool && make $MAKEFLAGS && make DESTDIR=$DESTDIR install }