aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory M. Tuner <gmt@be-evil.net>2014-01-26 05:54:32 -0800
committerGregory M. Tuner <gmt@be-evil.net>2014-01-26 06:23:57 -0800
commit01fc7153606ec671fb6eb6820e1d9f4d009b3d1c (patch)
tree6a744723fa4f166661ddcf550f7fcee1e9f6f957 /dev-scheme
parentdev-scheme/guile: clone upstream (diff)
downloadgmt-01fc7153606ec671fb6eb6820e1d9f4d009b3d1c.tar.gz
gmt-01fc7153606ec671fb6eb6820e1d9f4d009b3d1c.tar.bz2
gmt-01fc7153606ec671fb6eb6820e1d9f4d009b3d1c.zip
dev-scheme/guile: multilib-utize
A nontrivial multilib-utization. First, I have made a couple of non-multilib-related fixes: * pass serial-tests to AM_INIT_AUTOMAKE, since otherwise, eautoreconf completely breaks src_test * don't actually fail when tests fail, since, even though we've fixed the tests to run, several tests still don't pass and fixing the mess looks nontrivial. Clearly, there is more work to be done here. Multilib-utization-related changes: * During src_install, building out of tree changes things somehow so that the Makefile tries to remove the file /usr/bin/build-guile, during the installation of the guile-config target. Formerly (before multilib-utization), it would try to remove ${ED}/usr/bin/build-guile, which, although unnecesary and kind of ugly, was a noop. Somehow, building out of tree changes a variable used to no-longer include $(DESTDIR). In practice, there probably is no /usr/bin/build-guile. If there were one, it might or might not be the out-of-date file that the Makefile wants to remove. Anyhow, I didn't worry about that, but just took measures to ensure the Makefile target will not attempt to remove the file. * Hacks up generated non-best-ABI makefiles so as not to peform the rather lengthy doc generation process. Unfortunately this required a bit more sed hackery than I usually like to implement in an ebuild, but this was mostly due to trying to implement the hacks in a manner likely to be fairly stable in the face of future changes. * We can't @wrap guile-config as it is an identical guile script on all targets. @wrapping /usr/bin/guile would work but I am pretty keen not to @wrap core development- toolchain elements like that. So what I did was the following: o no-@-wrap /usr/bin/guile so that we get guile-{ABI} executables in /usr/bin along-side the best-abi /usr/bin/guile with no 'funny-business' o hack-up the shebang in the per-abi /usr/bin/guile-config executables to refer to the corresponding /usr/bin/guile-${ABI} -- however, this is only done when more than one ABI is being built (otherwise, the executable wrappers have no effect, and therefore, there would be no /usr/bin/guile-${ABI}. o @-wrap /usr/bin/guile-config (which now has the desired effect since the shebangs of the abi-specific wrapped /usr/bin/guile-config-${ABI} executables refer to the correspondig /usr/bin/guile-${ABI}. This is still not exactly wonderful for at least three reasons: first, it creates a binary wrapper which in turn executes shebang-ified script executables -- sooner or later, somebody will probably find some case for which there is no OS support for that; second, it's fairly obscure and confusing; third, if anyone tries to run the script directly from the interpreter instead of relying on the shebangs and the intrinsic binary loading machinery to get their result, this will break (this third concern is the most plausible source of problems, I suspect). A far better solution would be to add scripted code to check for the MULTILIB_BUILD_ABI variable and act accordingly based on its value. I used to know scheme but that was many years ago and I'm frankly sick of screwing around with this ebuild. If anybody is found to attempt to load guile-config, then we could just hack up those programs to load the correct multilib wrapper directly, in their respective ebuilds, if we are still to lazy to implement a multilib-build-aware guile-config in scheme. A last-resort would be to @wrap the guile executable; hopefully that won't be required. Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'dev-scheme')
-rw-r--r--dev-scheme/guile/Manifest4
-rw-r--r--dev-scheme/guile/files/guile-1.8.8-at-least-_try_-to-test.patch24
-rw-r--r--dev-scheme/guile/files/guile-1.8.8-dont-delete-my-binaries-please.patch17
-rw-r--r--dev-scheme/guile/guile-1.8.8-r2.ebuild69
4 files changed, 100 insertions, 14 deletions
diff --git a/dev-scheme/guile/Manifest b/dev-scheme/guile/Manifest
index 203e35a..0e622f9 100644
--- a/dev-scheme/guile/Manifest
+++ b/dev-scheme/guile/Manifest
@@ -1,8 +1,10 @@
AUX 50guile-gentoo.el 38 SHA256 f34ea07a3270a25cce3430e4781df47d9903052c9f3a4ea24efb64b1e63bd115 SHA512 5c00bcabe2d7cc03013dc7a54b2c653940c08098ca5646d7c73624cb1ca04376ae9dcf88a7166b1925c69f0c5d192d90f6bd790fdef8ed8c3b0f9d163c987da5 WHIRLPOOL cc5e2fd5081f5fb0018e1fa461c0802c7c90891accc55c02c2935dd3d413c5f8941e918af9341040526b037be4c34dab26008dfca91c153c11fca41338f77c14
+AUX guile-1.8.8-at-least-_try_-to-test.patch 1071 SHA256 8477a1d671211a5b6edf2a3c965e18c610cfca9085325a8cee4c02470a8b27d8 SHA512 0c87e4768b9c069f260a1350304ee518147b203fa0772827e662600b3bdac1cd25d6ee48a1e43acb620f7af09407da0f4f9610322be2859b801c3a481b3c0fa9 WHIRLPOOL 0ea368a057bca0dd4b78dd0dcfd61e2379f7a89da3360d7794fa4d2e4ad908e09244d393fa4c7166b2e07e62cf92f00d80b05a9ecce9efd92a1c0c575bb443d5
+AUX guile-1.8.8-dont-delete-my-binaries-please.patch 868 SHA256 338dee7d1fc6ab688d51e17cad213c9e9961d9b06995b206e3369ae0e37ede44 SHA512 7802d802b5e090e687b5a9576ed7f3c5e3e156b8344635076aadb71dc647b267bd37a03f7947371451f96fea283fb8fbc089886f0f9e39ca5851759d9de8a69d WHIRLPOOL c6a7c455d139c4e927b581091c29cf76c39484d19b06ca8c9c829b4754b13167d4eaf0da08a7d777254ccde3dcb81be8c93025aa820a06c4ed487134056914d0
AUX guile-1.8.8-fix_guile-config.patch 494 SHA256 08e4d837a663fc27b037e64f8dd89d89ababb3ed13f1e7845109a0f901f3b0c4 SHA512 3ef2bcb31d5b80dfa2f23b8802b98af713230e59aafe773ca3fd847fbdc7759ebb2d19cead1b6b362a6fa504dfff0c2036d5359aa82b601d664eb2a49a98c970 WHIRLPOOL f6ccd01b09a7aab46fab36464ab49539c9dddb954cc2d1ed709074175273df306d8527bae0d3d83f212903693af00fdf087533611ea416036b1c557ebc0fd283
AUX guile-1.8.8-gcc46.patch 1004 SHA256 9f11b3095ed4aa622a58e3a0805e49f56c258e81c9813c5053cea980cd93948b SHA512 0ace93548dde387c344e13f083d79227cd09506e0cf58ac0892f25c43bfcefe9071e83912b921fba120262884fa92aaabe4d07f8337d89b6da73f0f2c077dcfa WHIRLPOOL cf2ff22da564656387c7a42985d8c4fd004ff411739e1a081f71931c458287bf1166079f5a39b842f7e8b988e62e24e04d541e125340f0256c62b23de602d80b
AUX guile-1.8.8-makeinfo-5.patch 2361 SHA256 f1bfbe27280f6105735a2b4f0cf7883a9a825d4df756b74663112612b7a72438 SHA512 a69ed6cf2fd87c6f3d61cc914eed960fcdebaa151778b1ecf04f1774e6dddf07d17bf90fb3243a08e8c231e391843201d0ba26debedef33199d8dd75f8cbcd09 WHIRLPOOL c392c00f99d68cba17db8f14c68dc153f9cf146a3a6e197c4101959e93eb634a451cf8cdf957216f1c24fafcebf377a93e81682d5c0692506a0dd4c7ac00fa48
DIST guile-1.8.8.tar.gz 3956654 SHA256 c3471fed2e72e5b04ad133bbaaf16369e8360283679bcf19800bc1b381024050 SHA512 ede6feb90cd419d8763feb8c5169275490a653919573c4dfced025b74cf591072b3a10ffb9a3f6ee3fe7b0a0956ffcf434e0859b421455c8349cea56bf427db0 WHIRLPOOL 104810030b5dae16805595a5b398e5a7e600771b64b08d5ff686036e2f273dcec3829a16e4cdb1dbb9db5813f2e225476f83e0535a789bc570fc2fc15a76dbe2
-EBUILD guile-1.8.8-r2.ebuild 2888 SHA256 97c81edf625c3b7e9b5f1fcc3b72e02ab5b1f93ace58e390fb91be419f6b1eb6 SHA512 4f86c9de48cd44ad26111b8d52e76cde1e60c48fde6911c2e7a610a3534827168be81b81ae6d2a21848b0e878067e9b13821c06c067d6035929ad32716d9cf14 WHIRLPOOL d8d5df887e81aa0ddb0304ec609a3480bb7b3f43fdefb6e9ef77468bae96d4590d965f6c3b1c8fed164c3f13f692b8cdb0f1449a3379e8e59cdcf7c5fcf76739
+EBUILD guile-1.8.8-r2.ebuild 4156 SHA256 f4a03d70ac63bd2c534d4e1f38bedf9e1caa4ab7b1f81845176a87f7d05e3ae1 SHA512 8450fb76a7a1f2416e300e68251a780c68e9150b940f159037e55b6f5beffc3bb12f77dd97b83f820b3aa0e78c1fa315b8e4136094aa4b21204cb78310914549 WHIRLPOOL f2aed6aee8649d47a01d77e060353de4b3549a9abd80e79f38b28b2d888f1e9797fb92a6e796ac41df0ae17ac0a1d70404348539d2b32b97906cce0e610491d6
MISC ChangeLog 25895 SHA256 dc64395d8087d56da4d74bc0ddcd8561bb45949037fa0c654b0bbab62d687047 SHA512 70b6387e51c23f9d9d066ada9eb01210c2b84ff4edae2d1963c1bef4c4ab505c5efeccefde6f8115dee029431ec04b9625f25f437fb29e75a254cc99e817d8c7 WHIRLPOOL a59fce79b05f8dd3286e0dd656c676ce9a94be1cf243ec176410352d514fe73a9285e1159100a53ed5a6a6395c7494732bee11d67554ccbf1f0834c19e1e07e7
MISC metadata.xml 939 SHA256 bec92c2558ecc371364a598a582a19b43dff9a809fe732d150e9b209b76f17ca SHA512 ca2dd2db48025f250b4ddaeea40a6119c00bdbc7c6d8167f274fffa9155ae64083a3ccb1cff272abd3cdfc108f555f9f04beb10532ce7174db50ce96d0a4f1eb WHIRLPOOL 75f94d8db3b573829322c06a6a388775cb9b6302624c345f492a650b6ac644d2a48021b16b436786e138eb8753f9ed3354df4e5944bd92f2a3b7b4819ff91155
diff --git a/dev-scheme/guile/files/guile-1.8.8-at-least-_try_-to-test.patch b/dev-scheme/guile/files/guile-1.8.8-at-least-_try_-to-test.patch
new file mode 100644
index 0000000..030e29a
--- /dev/null
+++ b/dev-scheme/guile/files/guile-1.8.8-at-least-_try_-to-test.patch
@@ -0,0 +1,24 @@
+diff -urpN guile-1.8.8.orig/configure.in guile-1.8.8/configure.in
+--- guile-1.8.8.orig/configure.in 2010-12-13 09:24:39.000000000 -0800
++++ guile-1.8.8/configure.in 2014-01-26 05:27:30.297278176 -0800
+@@ -41,7 +41,7 @@ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_SRCDIR(GUILE-VERSION)
+
+-AM_INIT_AUTOMAKE([gnu no-define check-news -Wall -Wno-override])
++AM_INIT_AUTOMAKE([gnu no-define check-news -Wall -Wno-override serial-tests])
+
+ AC_COPYRIGHT(GUILE_CONFIGURE_COPYRIGHT)
+ AC_CONFIG_SRCDIR([GUILE-VERSION])
+diff -urpN guile-1.8.8.orig/guile-readline/configure.in guile-1.8.8/guile-readline/configure.in
+--- guile-1.8.8.orig/guile-readline/configure.in 2010-12-13 09:24:39.000000000 -0800
++++ guile-1.8.8/guile-readline/configure.in 2014-01-26 05:27:46.198519564 -0800
+@@ -10,7 +10,7 @@ AC_INIT(guile-readline,
+ AC_CONFIG_AUX_DIR([.])
+ AC_CONFIG_SRCDIR(readline.c)
+ AM_CONFIG_HEADER([guile-readline-config.h])
+-AM_INIT_AUTOMAKE([foreign no-define])
++AM_INIT_AUTOMAKE([foreign no-define serial-tests])
+
+ . $srcdir/../GUILE-VERSION
+
diff --git a/dev-scheme/guile/files/guile-1.8.8-dont-delete-my-binaries-please.patch b/dev-scheme/guile/files/guile-1.8.8-dont-delete-my-binaries-please.patch
new file mode 100644
index 0000000..6d4f6f4
--- /dev/null
+++ b/dev-scheme/guile/files/guile-1.8.8-dont-delete-my-binaries-please.patch
@@ -0,0 +1,17 @@
+In-tree this comes out to $(DESTDIR)$(bindir). Out of tree, for some reason,
+it's just $(bindir). Anyhow, the issue is moot on Gentoo, or even if not, it's
+never guile-config/Makefile's job to solve it.
+
+-gmt
+
+diff -urpN guile-1.8.8.orig/guile-config/Makefile.am guile-1.8.8/guile-config/Makefile.am
+--- guile-1.8.8.orig/guile-config/Makefile.am 2010-12-13 09:24:39.000000000 -0800
++++ guile-1.8.8/guile-config/Makefile.am 2013-09-30 17:04:50.140720067 -0700
+@@ -43,4 +43,5 @@ guile-config: guile-config.in ${top_buil
+ ## Get rid of any copies of the configuration script under the old
+ ## name, so people don't end up running ancient copies of it.
+ install-exec-local:
+- rm -f ${bindir}/build-guile
++ echo "Hey, wouldn't it be funny if I were to do run this command right now:" ; \
++ echo "\"rm -f ${bindir}/build-guile\"? Haha, that'd be insanely presumptuous."
+
diff --git a/dev-scheme/guile/guile-1.8.8-r2.ebuild b/dev-scheme/guile/guile-1.8.8-r2.ebuild
index 7590427..4706440 100644
--- a/dev-scheme/guile/guile-1.8.8-r2.ebuild
+++ b/dev-scheme/guile/guile-1.8.8-r2.ebuild
@@ -2,22 +2,22 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-EAPI=3
-inherit eutils autotools flag-o-matic elisp-common
+EAPI=5
+inherit eutils autotools flag-o-matic elisp-common multilib-minimal
DESCRIPTION="Scheme interpreter"
HOMEPAGE="http://www.gnu.org/software/guile/"
SRC_URI="mirror://gnu/guile/${P}.tar.gz"
LICENSE="LGPL-2.1"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="~amd64"
IUSE="networking +regex discouraged +deprecated emacs nls debug-freelist debug-malloc debug +threads"
RESTRICT="!regex? ( test )"
DEPEND="
- >=dev-libs/gmp-4.1
- >=sys-devel/libtool-1.5.6
- sys-devel/gettext
+ >=dev-libs/gmp-4.1[${MULTILIB_USEDEP}]
+ >=sys-devel/libtool-1.5.6[${MULTILIB_USEDEP}]
+ sys-devel/gettext[${MULTILIB_USEDEP}]
emacs? ( virtual/emacs )"
RDEPEND="${DEPEND}"
@@ -27,10 +27,22 @@ RDEPEND="${DEPEND}"
SLOT="12"
MAJOR="1.8"
+MULTILIB_WRAPPED_HEADERS=(/usr/include/libguile/scmconfig.h)
+MULTILIB_WRAPPED_EXECUTABLES=(@/usr/bin/guile-config /usr/bin/guile)
+
+pkg_setup() {
+ declare -a abis=( $(multilib_get_enabled_abis) )
+ if [[ ${#abis[@]} -gt 1 ]] ; then
+ multiple_abis=yes
+ fi
+}
+
src_prepare() {
epatch "${FILESDIR}/${P}-fix_guile-config.patch" \
"${FILESDIR}/${P}-gcc46.patch" \
- "${FILESDIR}/${P}-makeinfo-5.patch"
+ "${FILESDIR}/${P}-makeinfo-5.patch" \
+ "${FILESDIR}/${P}-dont-delete-my-binaries-please.patch" \
+ "${FILESDIR}/${P}-at-least-_try_-to-test.patch" # <- still wont pass but... gx86 bug
sed \
-e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g" \
-e "/AM_PROG_CC_STDC/d" \
@@ -38,12 +50,12 @@ src_prepare() {
eautoreconf
}
-src_configure() {
+multilib_src_configure() {
# see bug #178499
filter-flags -ftree-vectorize
#will fail for me if posix is disabled or without modules -- hkBst
- econf \
+ ECONF_SOURCE="${S}" econf \
--disable-error-on-warning \
--disable-static \
--enable-posix \
@@ -60,10 +72,19 @@ src_configure() {
$(use_with threads) \
--with-modules \
EMACS=no
+
+ # prevent doc building for non-best abis
+ if ! multilib_is_best_abi; then
+ sed -e '/^SUBDIRS/,/^[^[:space:]]/ s/\([[:space:]]\)\(doc\|examples\)\([[:space:]]\|$\)/\1/g' \
+ -i Makefile || die
+ sed -e 's|^\(schemelib_DATA[[:space:]]*=\).*$|\1|' \
+ -e '/^[^[:space:]]*\.\(texi\|txt\|doc\):\([[:space:]]\|$\)/,/^\([^[:space:]]\|$\)/ s/^/# (doc) &/' \
+ -i libguile/Makefile || die
+ fi
}
-src_compile() {
- emake || die "make failed"
+multilib_src_compile() {
+ default
# Above we have disabled the build system's Emacs support;
# for USE=emacs we compile (and install) the files manually
@@ -73,9 +94,31 @@ src_compile() {
fi
}
-src_install() {
- einstall || die "install failed"
+src_test() {
+ failed_abis=()
+ multilib-minimal_src_test
+ if (( ${#failed_abis[@]} )); then
+ eerror
+ eerror "NOTE: The following ABIs failed testing: ${failed_abis[*]}"
+ eerror "Since these are known not to work, proceeding anyhow."
+ eerror
+ fi
+}
+
+multilib_src_test() {
+ nonfatal emake check || failed_abis+=("${ABI}")
+}
+
+multilib_src_install() {
+ default
+ if [[ ${multiple_abis} ]] ; then
+ # fix shebang in guile-config to run wrapped guile
+ sed -e "1s|bin/guile|bin/guile-${MULTILIB_BUILD_ABI}|" \
+ -i "${ED}"/usr/bin/guile-config || die
+ fi
+}
+multilib_src_install_all() {
dodoc AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS || die
# texmacs needs this, closing bug #23493