diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 50 | ||||
-rw-r--r-- | glib-2.0_fix_for_x32.patch | 76 |
3 files changed, 149 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9f478548b60f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = libx32-glib2 + pkgdesc = Common C routines used by GTK+ 2.4 and other libs (x32 ABI) + pkgver = 2.32.4 + pkgrel = 1.1 + url = http://www.gtk.org/ + arch = x86_64 + license = LGPL + makedepends = gcc-multilib-x32 + makedepends = python2-x32 + depends = libx32-pcre + depends = libx32-zlib + depends = libx32-dbus-core + depends = libx32-libffi + depends = glib2 + options = !libtool + options = !docs + source = http://ftp.gnome.org/pub/GNOME/sources/glib/2.32/glib-2.32.4.tar.xz + source = glib-2.0_fix_for_x32.patch + sha256sums = a5d742a4fda22fb6975a8c0cfcd2499dd1c809b8afd4ef709bda4d11b167fae2 + sha256sums = a2018bad1f010c036fd6959d514046b5d6315f07aa6a2154f5e591e89ab48ea0 + +pkgname = libx32-glib2 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..48c7c12a8cbb --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,50 @@ +# $Id: PKGBUILD 78820 2012-10-25 06:47:28Z foutrelis $ +# Upstream Maintainer: Ionut Biru <ibiru@archlinux.org> +# Contributor: Pierre Schmitz <pierre@archlinux.de> +# Contributor: Mikko Seppälä <t-r-a-y@mbnet.fi> +# Maintainer: Fantix King <fantix.king at gmail.com> + +_pkgbasename=glib2 +pkgname=libx32-$_pkgbasename +pkgver=2.32.4 +pkgrel=1.1 +pkgdesc="Common C routines used by GTK+ 2.4 and other libs (x32 ABI)" +url="http://www.gtk.org/" +arch=('x86_64') +license=('LGPL') +depends=('libx32-pcre' 'libx32-zlib' 'libx32-dbus-core' libx32-libffi $_pkgbasename) +makedepends=('gcc-multilib-x32' python2-x32) +options=('!libtool' '!docs') +source=( +http://ftp.gnome.org/pub/GNOME/sources/glib/2.32/glib-${pkgver}.tar.xz +glib-2.0_fix_for_x32.patch +) +sha256sums=( +'a5d742a4fda22fb6975a8c0cfcd2499dd1c809b8afd4ef709bda4d11b167fae2' +'a2018bad1f010c036fd6959d514046b5d6315f07aa6a2154f5e591e89ab48ea0' +) + +build() { + export CC="gcc -mx32" + export CXX="g++ -mx32" + export PKG_CONFIG_PATH="/usr/libx32/pkgconfig" + + cd "${srcdir}/glib-${pkgver}" + + patch -p1 -i "${srcdir}/glib-2.0_fix_for_x32.patch" + + PYTHON=/opt/python2-x32/bin/python2.7 ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/libx32 \ + --enable-static --enable-shared --with-pcre=system --disable-fam + make +} + +package() { + cd "${srcdir}/glib-${pkgver}" + make DESTDIR="${pkgdir}" install + rm -rf "${pkgdir}"/{etc,usr/{share,include}} + + cd "${pkgdir}"/usr/bin + mv gio-querymodules gio-querymodules-x32 + rm -f gdbus glib* gobject-query gsettings gtester* + rm -rf "$pkgdir"/usr/{bin,libx32/gdbus-2.0} +} diff --git a/glib-2.0_fix_for_x32.patch b/glib-2.0_fix_for_x32.patch new file mode 100644 index 000000000000..70cbbbe915d6 --- /dev/null +++ b/glib-2.0_fix_for_x32.patch @@ -0,0 +1,76 @@ +UpstreamStatus: Pending + +Pass CC & CFLAGS vars so that tune parameters get used. +This fixes compilation with x32 toolchain. + +Received this patch from H.J. Lu <hjl.tools@gmail.com> +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13 + +Index: glib-2.30.0/glib/Makefile.am +=================================================================== +--- glib-2.30.0.orig/glib/Makefile.am ++++ glib-2.30.0/glib/Makefile.am +@@ -359,10 +359,10 @@ INSTALL_PROGS= + + if ENABLE_DTRACE + glib_probes.h: glib_probes.d Makefile +- $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp ++ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -C -h -s $< -o $@.tmp + @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp + glib_probes.o: glib_probes.d Makefile +- $(AM_V_GEN) $(DTRACE) -G -s $< -o $@ ++ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@ + BUILT_SOURCES += glib_probes.h glib_probes.o + CLEANFILES += glib_probes.h glib_probes.h.tmp + libglib_2_0_la_LIBADD += glib_probes.o +Index: glib-2.30.0/glib/Makefile.in +=================================================================== +--- glib-2.30.0.orig/glib/Makefile.in ++++ glib-2.30.0/glib/Makefile.in +@@ -1691,10 +1691,10 @@ uninstall-local: uninstall-ms-lib uninst + @OS_WIN32_AND_DLL_COMPILATION_FALSE@uninstall-def-file: + + @ENABLE_DTRACE_TRUE@glib_probes.h: glib_probes.d Makefile +-@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp ++@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) CC="$(CC)" CFLAGS="$(CFLAGS)" $(DTRACE) -C -h -s $< -o $@.tmp + @ENABLE_DTRACE_TRUE@ @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp + @ENABLE_DTRACE_TRUE@glib_probes.o: glib_probes.d Makefile +-@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) $(DTRACE) -G -s $< -o $@ ++@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) CC="$(CC)" CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@ + + gspawn-win32-helper-console.c: + echo '#define HELPER_CONSOLE' >$@ +Index: glib-2.30.0/gobject/Makefile.am +=================================================================== +--- glib-2.30.0.orig/gobject/Makefile.am ++++ glib-2.30.0/gobject/Makefile.am +@@ -141,10 +141,10 @@ gobject_c_sources = \ + + if ENABLE_DTRACE + gobject_probes.h: gobject_probes.d Makefile +- $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp ++ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -C -h -s $< -o $@.tmp + @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp + gobject_probes.o: gobject_probes.d Makefile +- $(AM_V_GEN) $(DTRACE) -G -s $< -o $@ ++ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@ + BUILT_SOURCES += gobject_probes.h gobject_probes.o + CLEANFILES += gobject_probes.h + libgobject_2_0_la_LIBADD += gobject_probes.o +Index: glib-2.30.0/gobject/Makefile.in +=================================================================== +--- glib-2.30.0.orig/gobject/Makefile.in ++++ glib-2.30.0/gobject/Makefile.in +@@ -1581,10 +1581,10 @@ uninstall-ms-lib: + @OS_WIN32_AND_DLL_COMPILATION_FALSE@uninstall-def-file: + + @ENABLE_DTRACE_TRUE@gobject_probes.h: gobject_probes.d Makefile +-@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp ++@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -C -h -s $< -o $@.tmp + @ENABLE_DTRACE_TRUE@ @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp + @ENABLE_DTRACE_TRUE@gobject_probes.o: gobject_probes.d Makefile +-@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) $(DTRACE) -G -s $< -o $@ ++@ENABLE_DTRACE_TRUE@ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@ + + # This is read by gobject-introspection/misc/ and gtk-doc + gobject-public-headers.txt: Makefile |