# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EDARCS_REPOSITORY="http://darcs.debian.org/darcs/scheme2c/scheme2c/" inherit eutils darcs DESCRIPTION="The Scheme->C compiler, R4RS compliant" HOMEPAGE="http://alioth.debian.org/projects/scheme2c/" SRC_URI="" LICENSE="MIT" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="X doc" DEPEND="dev-libs/libsigsegv doc? ( virtual/ghostscript ) X? ( x11-libs/libX11 )" RDEPEND="${DEPEND}" src_compile() { if use doc; then pushd doc make embedded.pdf index.pdf intro.pdf smithnotes.pdf popd fi if use x86; then make forLINUX pushd LINUX elif use amd64; then make forAMD64 pushd AMD64 else die "Unknown keywords" fi touch scrt/*.c touch scsc/*.c make all || die "Failed to compile" if use X; then make -C cdecl || die "cdecl couldn't build" make -C xlib -B sizeof.cdecl || die "cdecl couldn't run" make -C xlib all || die "xlib bindings failed to build" fi popd } src_install() { if use x86; then pushd LINUX elif use amd64; then pushd AMD64 fi insinto /usr/$(get_libdir)/scheme2c doins scrt/libsc.a doins scrt/predef.sc doins scrt/objects.h doins scrt/options.h dobin scrt/sci scsc/scc scsc/sccomp if use X; then doins xlib/scxl.a dobin xlib/scixl fi popd cp doc/scc.l doc/scc.1 cp doc/sci.l doc/sci.1 doman doc/scc.1 doc/sci.1 if use doc; then dodoc doc/*.pdf fi if use x; then cp -p xlib/doc.txt xlib.txt fi dodoc CHANGES README doc/*.txt dosed "s:.*sccomp:sccomp:g" /usr/bin/scc dosed "s:-LIBDIR.*t:-LIBDIR /usr/$(get_libdir)/scheme2c/ \ -I/usr/$(get_libdir)/scheme2c/:g" /usr/bin/scc dosed "s:-scmh 40:-scmh 1000 -sch 10:g" /usr/bin/scc }