1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 EDARCS_REPOSITORY="http://darcs.debian.org/darcs/${PN}/${PN}/"
7 inherit eutils darcs multilib
9 DESCRIPTION="The Scheme->C compiler, R4RS compliant"
10 HOMEPAGE="http://alioth.debian.org/projects/scheme2c/"
15 KEYWORDS="" #only x32 and amd64 are tested and supported
18 DEPEND="dev-libs/libsigsegv
19 doc? ( app-text/ghostscript-gpl )
20 X? ( x11-libs/libX11 )"
25 emake -C doc/ embedded.pdf index.pdf intro.pdf smithnotes.pdf || \
26 die "Failed to build documents"
30 emake forLINUX || die "Failed to set up Linux build"
33 emake forAMD64 || die "Failed to set up AMD64 build"
36 die "Unimplemented architecture"
39 # Due to insanity in the build system we have to touch these to
40 # guarantee that everything will always get built
44 emake -j1 all || die "Failed to compile"
47 emake -C cdecl || die "cdecl couldn't build"
48 emake -C xlib -B sizeof.cdecl || die "cdecl couldn't run"
49 emake -C xlib all || die "xlib bindings failed to build"
59 die "Unimplemented architecture"
62 insinto /usr/$(get_libdir)/${PN}
64 # Only a small subset of files from scrt is required
65 doins scrt/libsc.a scrt/predef.sc scrt/objects.h scrt/options.h || \
66 die "Failed to install scrt files"
68 dobin scrt/sci scsc/{scc,sccomp} || die "Failed to install binaries"
71 doins xlib/scxl.a || die "Failed to install X11 bindings"
72 dobin xlib/scixl || die "Failed to install X11-aware interpreter"
73 newdoc xlib/doc.txt xlib.txt || die "Failed to install X documentation"
78 cp doc/scc.l doc/scc.1 || die
79 cp doc/sci.l doc/sci.1 || die
80 doman doc/{scc,sci}.1 || die "Failed to install man pages"
83 dodoc doc/*.pdf || die "Failed to install pdf documentation"
86 dodoc CHANGES README || die "Failed to install documentation"
88 dosed "s:.*sccomp:sccomp:g" /usr/bin/scc || die
89 dosed "s:-LIBDIR.*t:-LIBDIR /usr/$(get_libdir)/scheme2c/ \
90 -I/usr/$(get_libdir)/scheme2c/:g" /usr/bin/scc || die
91 dosed "s:-scmh 40:-scmh 1000 -sch 10:g" /usr/bin/scc || die