dev-scheme/guile: remove unused line
[gentoo.git] / dev-scheme / guile / guile-1.8.8-r3.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit eutils autotools flag-o-matic elisp-common
7
8 DESCRIPTION="Scheme interpreter"
9 HOMEPAGE="https://www.gnu.org/software/guile/"
10 SRC_URI="mirror://gnu/guile/${P}.tar.gz"
11
12 LICENSE="LGPL-2.1"
13 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
14 IUSE="debug debug-freelist debug-malloc +deprecated discouraged emacs networking nls readline +regex +threads"
15
16 RESTRICT="!regex? ( test )"
17
18 RDEPEND="
19         >=dev-libs/gmp-4.1:0=
20         dev-libs/libltdl:0=
21         sys-devel/gettext
22         sys-libs/ncurses:0=
23         emacs? ( virtual/emacs )
24         readline? ( sys-libs/readline:0= )"
25 DEPEND="${RDEPEND}
26         sys-apps/texinfo
27         sys-devel/libtool"
28
29 # Guile seems to contain some slotting support, /usr/share/guile/ is slotted,
30 # but there are lots of collisions. Most in /usr/share/libguile. Therefore
31 # I'm slotting this in the same slot as guile-1.6* for now.
32 SLOT="12/8"
33 MAJOR="1.8"
34
35 src_prepare() {
36         epatch "${FILESDIR}/${P}-fix_guile-config.patch" \
37                 "${FILESDIR}/${P}-gcc46.patch" \
38                 "${FILESDIR}/${P}-gcc5.patch" \
39                 "${FILESDIR}/${P}-makeinfo-5.patch" \
40                 "${FILESDIR}/${P}-gtexinfo-5.patch" \
41                 "${FILESDIR}/${P}-readline.patch" \
42                 "${FILESDIR}/${P}-tinfo.patch" \
43                 "${FILESDIR}/${P}-sandbox.patch" \
44                 "${FILESDIR}/${P}-mkdir-mask.patch"
45
46         sed \
47                 -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g" \
48                 -e "/AM_PROG_CC_STDC/d" \
49                 -i guile-readline/configure.in || die
50
51         epatch_user
52
53         mv "${S}"/configure.{in,ac} || die
54         mv "${S}"/guile-readline/configure.{in,ac} || die
55
56         eautoreconf
57 }
58
59 src_configure() {
60         # see bug #178499
61         filter-flags -ftree-vectorize
62
63         #will fail for me if posix is disabled or without modules -- hkBst
64         econf \
65                 --disable-error-on-warning \
66                 --disable-static \
67                 --enable-posix \
68                 $(use_enable networking) \
69                 $(use_enable readline) \
70                 $(use_enable regex) \
71                 $(use deprecated || use_enable discouraged) \
72                 $(use_enable deprecated) \
73                 $(use_enable emacs elisp) \
74                 $(use_enable nls) \
75                 --disable-rpath \
76                 $(use_enable debug-freelist) \
77                 $(use_enable debug-malloc) \
78                 $(use_enable debug guile-debug) \
79                 $(use_with threads) \
80                 --with-modules \
81                 EMACS=no
82 }
83
84 src_compile()  {
85         emake
86
87         # Above we have disabled the build system's Emacs support;
88         # for USE=emacs we compile (and install) the files manually
89         if use emacs; then
90                 cd emacs || die
91                 elisp-compile *.el || die
92         fi
93 }
94
95 src_install() {
96         emake DESTDIR="${D}" install
97
98         dodoc AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS
99
100         # texmacs needs this, closing bug #23493
101         dodir /etc/env.d
102         echo "GUILE_LOAD_PATH=\"${EPREFIX}/usr/share/guile/${MAJOR}\"" > "${ED}"/etc/env.d/50guile || die
103
104         # necessary for registering slib, see bug 206896
105         keepdir /usr/share/guile/site
106
107         if use emacs; then
108                 elisp-install ${PN} emacs/*.{el,elc} || die
109                 elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el" || die
110         fi
111 }
112
113 pkg_postinst() {
114         use emacs && elisp-site-regen
115 }
116
117 pkg_postrm() {
118         use emacs && elisp-site-regen
119 }