aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory M. Tuner <gmt@be-evil.net>2014-02-27 10:39:41 -0800
committerGregory M. Tuner <gmt@be-evil.net>2014-02-27 10:41:44 -0800
commitbbfd11653df7cc4ccc20d68d07ddfa9dd0fa0e5d (patch)
tree0c250bc79dfa6fd85a3f653cee7b6c93828d6c49 /dev-libs
parentsys-devel/flex: revbump (diff)
downloadgmt-bbfd11653df7cc4ccc20d68d07ddfa9dd0fa0e5d.tar.gz
gmt-bbfd11653df7cc4ccc20d68d07ddfa9dd0fa0e5d.tar.bz2
gmt-bbfd11653df7cc4ccc20d68d07ddfa9dd0fa0e5d.zip
dev-libs/gobject-introspection: make 1.38.0-r1 work like 1.36.0-r2
Originally this was slated to be based on the multilib-python ebuilds; however since those are still WIP with big changes ahead, I've instead duplicated the ugly hacks from 1.36.0-r2 in 1.38.0-r1. Signed-off-by: Gregory M. Tuner <gmt@be-evil.net> s
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/gobject-introspection/Manifest2
-rw-r--r--dev-libs/gobject-introspection/gobject-introspection-1.38.0-r1.ebuild118
2 files changed, 86 insertions, 34 deletions
diff --git a/dev-libs/gobject-introspection/Manifest b/dev-libs/gobject-introspection/Manifest
index 3c25d48..529ee77 100644
--- a/dev-libs/gobject-introspection/Manifest
+++ b/dev-libs/gobject-introspection/Manifest
@@ -3,6 +3,6 @@ AUX gobject-introspection-1.36.0-detect-clang.patch 1084 SHA256 880db25f54711ff9
DIST gobject-introspection-1.36.0.tar.xz 1201108 SHA256 e3e76d9d428e7534761bf8cdf75338865a4b0872e8052bef51792744608b6383 SHA512 5c6d17851ac7d1372abdc6a9ced44d1c2313b098e6fdfbe7cba78bff66032923fccddb58913753f46e1d7fea09536bb057ea2ff7203d5f4f7540badd830eaa83 WHIRLPOOL 1f31a314a9056f2f452e59808ba143f5e387f1c7c82ddb0e3f20295592850995f602a2a82b36602b7089cddb192896d918db02190e411710d8806dbdebc77f4c
DIST gobject-introspection-1.38.0.tar.xz 1226324 SHA256 3575e5d353c17a567fdf7ffaaa7aebe9347b5b0eee8e69d612ba56a9def67d73 SHA512 2eeafbb09484988c8489757232233aa9bf5cefecf7f80ed940867cf721e271644f7e94d8ae3b18717340ba3af1c208701c4766b1113af03972311517fda10e8f WHIRLPOOL 7dbab4e983095a12d6711236cd198473a326b100c67958693edf4a236cab6a922234b0e809d171fac1a2c860e29f7775f74a70589c1e1a124c137769ddd540e0
EBUILD gobject-introspection-1.36.0-r2.ebuild 4950 SHA256 05a26b707192016a916b84cdf40bae304fb152b5e5d4bb06b8df2b2f48b4bd62 SHA512 77470223f17351ad1dac63c9a3c0a9e26b55b2414ecb8b72b435f1ae9971786dd96293f6f5aed414b8de433b4847f739ba3ef89e275d82888afc6f24c4df028b WHIRLPOOL aaa4d70fe79b5521894279fc06cc32ee1e1cd87a92450c0653a1480518359b0c152158b76eaf5c0f6ab7051180420b5ed75d7ab39d61103f6ac66f7d69f02c4f
-EBUILD gobject-introspection-1.38.0-r1.ebuild 3157 SHA256 0a727826714acce6085e624b467e383f4b897abcc654267dba39fd39e51e119e SHA512 60f6bf39a7925ea0fafce7c325143db334b237d69507b3dc15403c6dc6f035467c89f96ac48360ea9a21d85f04f90f426cddba47c7546d3cd50ae2c7123ec877 WHIRLPOOL e96802d46de790c1bbdca4f57e47d89f376d445102d0ed374664e075544337e8aed33d0061aa0dba5bc862c2943ff5a3273c7fbfad3e1e5a21cdb7ada06e7dc2
+EBUILD gobject-introspection-1.38.0-r1.ebuild 4813 SHA256 635aa6b79d4bd0714ad54f14f8ce23c57a0acc4fc337ff74b2d7963efc4e748d SHA512 e163e1aef348e4179a3d7594475cbd0d3d0dd817e01381a13ce03042bb12da6e83f802d19cc8b70fc00ff6cc4049b6d67c147eaae960e1f4abf4a514d9d9a60d WHIRLPOOL bff0d4ab94b3a01896e1256de1191b2b5af70bbe1c46bdee6a30c75a0fbdc12f43c4542e9abcc8ddc7524de5b2686d23bdb442e160141044938c4a6e8ed20080
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.38.0-r1.ebuild b/dev-libs/gobject-introspection/gobject-introspection-1.38.0-r1.ebuild
index 5c27852..e508196 100644
--- a/dev-libs/gobject-introspection/gobject-introspection-1.38.0-r1.ebuild
+++ b/dev-libs/gobject-introspection/gobject-introspection-1.38.0-r1.ebuild
@@ -5,10 +5,9 @@
EAPI="5"
GCONF_DEBUG="no"
PYTHON_COMPAT=( python2_7 )
-PYTHON_MULTILIB_SINGLE_MODE=simple
PYTHON_REQ_USE="xml"
-inherit python-multilib-single-r1 gtk-doc toolchain-funcs gnome2-multilib
+inherit python-single-r1 gtk-doc toolchain-funcs gnome2-multilib
DESCRIPTION="Introspection infrastructure for generating gobject library bindings for various languages"
HOMEPAGE="http://live.gnome.org/GObjectIntrospection/"
@@ -17,7 +16,7 @@ LICENSE="LGPL-2+ GPL-2+"
SLOT="0"
IUSE="cairo doctool test"
REQUIRED_USE="
- ${PYTHON_MULTILIB_REQUIRED_USE}
+ ${PYTHON_REQUIRED_USE}
test? ( cairo )
"
KEYWORDS="~amd64"
@@ -28,7 +27,7 @@ RDEPEND="
doctool? ( dev-python/mako )
virtual/libffi:=[${MULTILIB_USEDEP}]
!<dev-lang/vala-0.20.0
- ${PYTHON_MULTILIB_DEPS}
+ ${PYTHON_DEPS}
"
# Wants real bison, not virtual/yacc
DEPEND="${RDEPEND}
@@ -40,6 +39,10 @@ DEPEND="${RDEPEND}
# PDEPEND to avoid circular dependencies, bug #391213
PDEPEND="cairo? ( x11-libs/cairo[glib,${MULTILIB_USEDEP}] )"
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
src_configure() {
if ! has_version "x11-libs/cairo[glib,${MULTILIB_USEDEP}]"; then
# Bug #391213: enable cairo-gobject support even if it's not installed
@@ -61,38 +64,77 @@ abi_src_configure() {
G2CONF+=( "CC=${CC:-$(tc-getCC)}" )
}
+###############################################################
+# 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
-ehook gnome2-multilib-per-abi-pre_src_configure py_pre
-ehook gnome2-multilib-per-abi-pre_src_compile py_pre
-ehook gnome2-multilib-per-abi-pre_src_install py_pre
-ehook gnome2-multilib-per-abi-pre_src_test py_pre
-py_pre() {
- SAVE_PATH=${PATH}
- SAVE_PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
- SAVE_CFLAGS=${CFLAGS}
- SAVE_CXXFLAGS=${CXXFLAGS}
- saveepython() { _saved_epython=${EPYTHON} ; }
- local _saved_epython=
- EPYTHON= python_multilib_single_with_abi_python saveepython
- einfo "for ABI ${ABI} using pyabi=${_saved_epython}"
- python_export ${_saved_epython} PYTHON PYTHON PYTHON_CFLAGS
- export CFLAGS="${CFLAGS} ${PYTHON_CFLAGS}"
- export CXXFLAGS="${CXXFLAGS} ${PYTHON_CXXFLAGS}"
- python_wrapper_setup
- return 0
+ gnome2-multilib_src_compile
}
-ehook gnome2-multilib-per-abi-post_src_configure py_post
-ehook gnome2-multilib-per-abi-post_src_compile py_post
-ehook gnome2-multilib-per-abi-post_src_install py_post
-ehook gnome2-multilib-per-abi-post_src_test py_post
-py_post() {
- export PATH=${SAVE_PATH}
- export PKG_CONFIG_PATH=${SAVE_PKG_CONFIG_PATH}
- export EPYTHON=
- export PYTHON=
- export CFLAGS=${SAVE_CFLAGS}
- export CXXFLAGS=${SAVE_CXXFLAGS}
+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() {
@@ -103,4 +145,14 @@ src_install() {
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"
}