--- /usr/portage/dev-scheme/guile/guile-1.8.8-r1.ebuild 2013-04-25 01:01:14.000000000 +0200 +++ dev-scheme/guile/guile-1.8.8-r1.ebuild 2014-01-26 18:50:07.002339596 +0100 @@ -2,8 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-scheme/guile/guile-1.8.8-r1.ebuild,v 1.16 2013/04/24 22:53:08 pchrist Exp $ -EAPI=3 -inherit eutils autotools flag-o-matic elisp-common +EAPI=4 +inherit eutils autotools-multilib flag-o-matic elisp-common DESCRIPTION="Scheme interpreter" HOMEPAGE="http://www.gnu.org/software/guile/" @@ -15,12 +15,16 @@ 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}" +MULTILIB_WRAPPED_HEADERS=( + usr/include/libguile/scmconfig.h +) + # Guile seems to contain some slotting support, /usr/share/guile/ is slotted, # but there are lots of collisions. Most in /usr/share/libguile. Therefore # I'm slotting this in the same slot as guile-1.6* for now. @@ -36,14 +40,16 @@ -e "/AM_PROG_CC_STDC/d" \ -i guile-readline/configure.in eautoreconf + + multilib_copy_sources } -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 \ + myconf=( --disable-error-on-warning \ --disable-static \ --enable-posix \ @@ -51,7 +57,6 @@ $(use_enable regex) \ $(use deprecated || use_enable discouraged) \ $(use_enable deprecated) \ - $(use_enable emacs elisp) \ $(use_enable nls) \ --disable-rpath \ $(use_enable debug-freelist) \ @@ -60,23 +65,40 @@ $(use_with threads) \ --with-modules \ EMACS=no + ) + + if multilib_build_binaries; then + myconf+=( $(use_enable emacs elisp) ) + else + myconf+=( --disable-elisp ) + fi + + econf \ + ${myconf[@]} } -src_compile() { - emake || die "make failed" +multilib_src_compile() { + emake # Above we have disabled the build system's Emacs support; # for USE=emacs we compile (and install) the files manually - if use emacs; then - cd emacs + if multilib_build_binaries && use emacs; then + cd "${S}"/emacs elisp-compile *.el || die fi } -src_install() { - einstall || die "install failed" +multilib_src_install() { + einstall libdir="${D}/usr/$(get_libdir)" || die - dodoc AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS || die + if multilib_build_binaries && use emacs; then + elisp-install ${PN} "${S}"/emacs/*.{el,elc} || die + elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el" || die + fi +} + +multilib_src_install_all() { + dodoc AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS # texmacs needs this, closing bug #23493 dodir /etc/env.d @@ -84,11 +106,6 @@ # necessary for registering slib, see bug 206896 keepdir /usr/share/guile/site - - if use emacs; then - elisp-install ${PN} emacs/*.{el,elc} || die - elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el" || die - fi } pkg_postinst() {