aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory M. Tuner <gmt@be-evil.net>2013-12-21 22:23:50 -0800
committerGregory M. Tuner <gmt@be-evil.net>2013-12-21 22:44:31 -0800
commit0067f2fbf95e1c73824624333698f9566c718a8b (patch)
tree1511735a9a7483eeb425db6581d120484e273fd8 /dev-libs/gobject-introspection
parentdev-libs/cairo: multilib-utize (diff)
downloadgmt-0067f2fbf95e1c73824624333698f9566c718a8b.tar.gz
gmt-0067f2fbf95e1c73824624333698f9566c718a8b.tar.bz2
gmt-0067f2fbf95e1c73824624333698f9566c718a8b.zip
dev-libs/gobject-introspection: multilib-utize
Note: a very unsightly hack was required to work around the lack of a non-best-abi python we can rely on. A 2-dimensional multilib/python ABI-expand matrix might be required to fix this without extensive patching to upstream build code. Someone more familiar with gobject-introspection's build infrastructure might have better ideas than I, though... heck, I don't even know what that scanner thingy does. Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'dev-libs/gobject-introspection')
-rw-r--r--dev-libs/gobject-introspection/Manifest2
-rw-r--r--dev-libs/gobject-introspection/gobject-introspection-1.36.0-r2.ebuild103
2 files changed, 94 insertions, 11 deletions
diff --git a/dev-libs/gobject-introspection/Manifest b/dev-libs/gobject-introspection/Manifest
index 6320233..7d1b8f8 100644
--- a/dev-libs/gobject-introspection/Manifest
+++ b/dev-libs/gobject-introspection/Manifest
@@ -1,6 +1,6 @@
AUX gobject-introspection-1.34.2-better-traceback.patch 1431 SHA256 921870ef1182bb6d358eaecd479f73bf22404ccd9b4d2ee27005f8aa0960a865 SHA512 48acab361c2e6a938eb88c4c2ea3cdd83dd1eb165d489b3fa54967d748a36842a4f89833a71c73ed79e4ee85e0e9aeb05fb1eac82470cc1664ba9dc0eedb8037 WHIRLPOOL af33c96fa943b6e36269963b603652bb0e6ca9702a57a384dbbef59f7b7516084bc6a2334f41d415460a7d8796c0908f9e24285cfbdde705b4430db0bb747831
AUX gobject-introspection-1.36.0-detect-clang.patch 1084 SHA256 880db25f54711ff942c18f70ed58d466a59c7b434b1d1a876df3610286e31eb4 SHA512 61d4bb54be5567e69ddc9e9fffd8cfebb71bf7991eb9df21dcb49c10d392e385b84dd2538627c45b12b81f6bb3f6eac60c6ccbfe84132d97cf0c43eabadfe3ef WHIRLPOOL cf95d470d8a7b7d698b56db26fc451e462ad37970c0d275a48b23c9f83c5c3f899cc5bfc24a3da90f1f2bcfcca2f421a7ecf541a066ae824319011d1f16a38d2
DIST gobject-introspection-1.36.0.tar.xz 1201108 SHA256 e3e76d9d428e7534761bf8cdf75338865a4b0872e8052bef51792744608b6383 SHA512 5c6d17851ac7d1372abdc6a9ced44d1c2313b098e6fdfbe7cba78bff66032923fccddb58913753f46e1d7fea09536bb057ea2ff7203d5f4f7540badd830eaa83 WHIRLPOOL 1f31a314a9056f2f452e59808ba143f5e387f1c7c82ddb0e3f20295592850995f602a2a82b36602b7089cddb192896d918db02190e411710d8806dbdebc77f4c
-EBUILD gobject-introspection-1.36.0-r2.ebuild 2281 SHA256 1b3d7428427079831d95651128337a89e66280d8bcaa1bf7e28a6f4c9eaad75c SHA512 76ceb69387423ed45ff43d315947e76e4cf022bc6155a0d073ce2b75547016aeb11b6c619b5c0fa5c106a46d2a4647f3f08502418d4248707f5c1d49a951cb72 WHIRLPOOL 3796502b228ec22f1dcb7af9500fe2cdee7070d7d1100f1849dcaf472ba3d4684a1366cc91161e03b07d43e51e717769fefe490af450b0031e8acfac122b419b
+EBUILD gobject-introspection-1.36.0-r2.ebuild 4950 SHA256 05a26b707192016a916b84cdf40bae304fb152b5e5d4bb06b8df2b2f48b4bd62 SHA512 77470223f17351ad1dac63c9a3c0a9e26b55b2414ecb8b72b435f1ae9971786dd96293f6f5aed414b8de433b4847f739ba3ef89e275d82888afc6f24c4df028b WHIRLPOOL aaa4d70fe79b5521894279fc06cc32ee1e1cd87a92450c0653a1480518359b0c152158b76eaf5c0f6ab7051180420b5ed75d7ab39d61103f6ac66f7d69f02c4f
MISC ChangeLog 18380 SHA256 fe5a681c806c3b29b26885c57de33583c025433bc1f088b5a1ec1b0e19962842 SHA512 1f183fbc32e40bb49f2e09f7f22f12cad1630d32678f371ea4fb1e97c5b89112977e9b50fefcf49a2bb3246d248102712a3d104391c4607b3790af80cd76e2e3 WHIRLPOOL 42f8e18b75005d7654cf812e9552891ce00d43df2396c95138e2391caeb86d1bdc4a47f32a7450f33028351a2b3df7d6e8f38c8e93bc4b24b5d6269b39f4c1ed
MISC metadata.xml 276 SHA256 64896ff5d165a9a750f5e13dfb6ae8ab203c9c5ecf1fe95f5828dca418652cb3 SHA512 69c30c46828ec7f02fde73973d64e48042242a42f7c354fe37297df0653552eed04fac21cabbe385efa9e0d348f70e718afdf328ebdcd203a109761b4b89f99e WHIRLPOOL c527df37fc6657961892dd27b52b8597a54f11f9da01e3acbe7cad6ebaaa6d41364e49bb1635ab5c5e354a8a56e11eae49eff1f394be934cda9322204de4e282
diff --git a/dev-libs/gobject-introspection/gobject-introspection-1.36.0-r2.ebuild b/dev-libs/gobject-introspection/gobject-introspection-1.36.0-r2.ebuild
index 286b861..9899819 100644
--- a/dev-libs/gobject-introspection/gobject-introspection-1.36.0-r2.ebuild
+++ b/dev-libs/gobject-introspection/gobject-introspection-1.36.0-r2.ebuild
@@ -7,14 +7,14 @@ GCONF_DEBUG="no"
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="xml"
-inherit eutils gnome2 python-single-r1 toolchain-funcs
+inherit eutils python-single-r1 toolchain-funcs gnome2-multilib
DESCRIPTION="Introspection infrastructure for generating gobject library bindings for various languages"
HOMEPAGE="http://live.gnome.org/GObjectIntrospection/"
LICENSE="LGPL-2+ GPL-2+"
SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="-* ~amd64"
IUSE="cairo doctool test"
REQUIRED_USE="
@@ -24,9 +24,9 @@ REQUIRED_USE="
RDEPEND="
>=dev-libs/gobject-introspection-common-${PV}
- >=dev-libs/glib-2.36:2
+ >=dev-libs/glib-2.36:2[${MULTILIB_USEDEP}]
doctool? ( dev-python/mako )
- virtual/libffi:=
+ virtual/libffi:=[${MULTILIB_USEDEP}]
!<dev-lang/vala-0.20.0
${PYTHON_DEPS}
"
@@ -38,7 +38,7 @@ DEPEND="${RDEPEND}
virtual/pkgconfig
"
# PDEPEND to avoid circular dependencies, bug #391213
-PDEPEND="cairo? ( x11-libs/cairo[glib] )"
+PDEPEND="cairo? ( x11-libs/cairo[glib,${MULTILIB_USEDEP}] )"
pkg_setup() {
python-single-r1_pkg_setup
@@ -51,13 +51,12 @@ src_prepare() {
# To prevent crosscompiling problems, bug #414105
CC=$(tc-getCC)
- DOCS="AUTHORS CONTRIBUTORS ChangeLog NEWS README TODO"
- gnome2_src_prepare
+ gnome2-multilib_src_prepare
# avoid GNU-isms
sed -i -e 's/\(if test .* \)==/\1=/' configure || die
- if ! has_version "x11-libs/cairo[glib]"; then
+ if ! has_version "x11-libs/cairo[glib,${MULTILIB_USEDEP}]"; then
# Bug #391213: enable cairo-gobject support even if it's not installed
# We only PDEPEND on cairo to avoid circular dependencies
export CAIRO_LIBS="-lcairo -lcairo-gobject"
@@ -66,18 +65,102 @@ src_prepare() {
}
src_configure(){
- gnome2_src_configure \
+ gnome2-multilib_src_configure \
--disable-static \
YACC=$(type -p yacc) \
$(use_with cairo) \
$(use_enable doctool)
}
+###############################################################
+# DANGER WILL ROBINSON!!! OBSCENELY INELEGANT HACK AHEAD
+#
+# this is tricky. the scanner needs to build for the best
+# abi, only, or else all hell breaks loose (python trouble).
+# So, we very gingerly pre-build those executables, and
+# unceremoneously wedge them into the non-best-abi build-trees,
+# right where they would have gone, had we allowed the makefile
+# to generate them (if it was able to, which it isn't).
+#
+
+goi_giscanner_build_native() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake g-ir-scanner
+ # FIXME: use platform independent suffix for library here
+ [[ -x g-ir-scanner ]] || die "Dude, where's my scanner?"
+ local stuff
+ find . \( -name '*.so' -o -name '*.la' -o -name '*.o' -o -name 'g-ir-scanner' -o -name '*.lo' -o -name '*.lai' \) \
+ -print | sed "s:^:$(pwd) :" > "${T}"/its_for_scanning_things_ldo
+ popd > /dev/null || die
+}
+
+goi_giscanner_inject() {
+ multilib_is_best_abi && return 0
+ pushd "${BUILD_DIR}" > /dev/null || die
+ einfo "injecting scanner (darkly) from \"${DEFAULT_ABI}\" into \"${ABI}\""
+ [[ -f "${T}"/its_for_scanning_things_ldo ]] || die
+ local d f dn
+ cat "${T}"/its_for_scanning_things_ldo | while read d f ; do
+ [[ -d "${d}" ]] || die "bad source \"${d}\""
+ [[ -f "${d}/${f}" ]] || die "bad file \"${d}/${f}\""
+ dn=$(dirname "${f}")
+ [[ ${dn} == . ]] || mkdir -p "${dn}"
+ # hard link
+ ln -Pv ${d}/${f} ./${f} || die
+ done
+ popd > /dev/null || die
+}
+
+#
+# n.b.: I'm aware that the above was pretty damn evil.
+# By all means, let's find some better way to do it!
+# It is likely that some vastly better way exists. In
+# the meanwhile, the above seems to work.
+# -gmt
+###############################################################
+
+src_compile() {
+ multilib_for_best_abi goi_giscanner_build_native
+ multilib_parallel_foreach_abi goi_giscanner_inject
+
+ gnome2-multilib_src_compile
+}
+
+src_test() {
+ multilib_foreach_abi run_in_build_dir abi_src_test
+}
+
+abi_src_test() {
+ # there seems to be an oot-build bug for tests/warn:
+ local mysrcdir="${S}"/tests/warn
+ local mydestdir="${BUILD_DIR}"/tests/warn
+ ebegin "OOT bug workaround for abi ${ABI}: copying *.h from \"${mysrcdir}\" into \"${mydestdir}\"..."
+ for f in "${mysrcdir}"/*.h ; do
+ [[ -f "${f}" ]] && { cp -f "${f}" "${mydestdir}" || die ; }
+ done
+ eend
+
+ emake check \
+ && einfo "ABI \"${ABI}\" ran the test suite without incident" \
+ || { eerror "at least one test for ABI \"${ABI}\" failed" ; die ; }
+}
+
src_install() {
- gnome2_src_install
+ gnome2-multilib_src_install
+
+ dodoc AUTHORS CONTRIBUTORS ChangeLog NEWS README TODO
# Prevent collision with gobject-introspection-common
rm -v "${ED}"usr/share/aclocal/introspection.m4 \
"${ED}"usr/share/gobject-introspection-1.0/Makefile.introspection || die
rmdir "${ED}"usr/share/aclocal || die
+
+ # prevent installation of 64-bit giscanner hacks
+ multilib_foreach_abi zap_scanner_if_not_best_abi
+}
+
+zap_scanner_if_not_best_abi() {
+ multilib_is_best_abi && return
+ einfo "zapping scanner files for abi ${ABI}"
+ rm -rf "${ED}"usr/lib32/gobject-introspection/giscanner || die "failed to zap scanner files"
}