]> Pileus Git - ~andy/sunrise/commitdiff
dev-lang/scheme2c: Ebuild for bug 233197
authorAndrei Barbu (andrei) <andrei@0xab.com>
Wed, 18 Feb 2009 06:52:54 +0000 (06:52 +0000)
committerAndrei Barbu (andrei) <andrei@0xab.com>
Wed, 18 Feb 2009 06:52:54 +0000 (06:52 +0000)
svn path=/sunrise/; revision=7945

dev-lang/scheme2c/ChangeLog [new file with mode: 0644]
dev-lang/scheme2c/Manifest [new file with mode: 0644]
dev-lang/scheme2c/metadata.xml [new file with mode: 0644]
dev-lang/scheme2c/scheme2c-9999.ebuild [new file with mode: 0644]

diff --git a/dev-lang/scheme2c/ChangeLog b/dev-lang/scheme2c/ChangeLog
new file mode 100644 (file)
index 0000000..439f096
--- /dev/null
@@ -0,0 +1,8 @@
+# ChangeLog for dev-lang/scheme2c
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+  18 Feb 2009; Andrei Barbu (andrei) <andrei@0xab.com>
+  +scheme2c-9999.ebuild, +metadata.xml:
+  Ebuild for bug 233197
+
diff --git a/dev-lang/scheme2c/Manifest b/dev-lang/scheme2c/Manifest
new file mode 100644 (file)
index 0000000..067d812
--- /dev/null
@@ -0,0 +1,3 @@
+EBUILD scheme2c-9999.ebuild 2418 RMD160 193936037711d8f47bc97e53cf6a71b37cd6e097 SHA1 876a5725db986ccbb0fc1a484c8e1cb8c8859b25 SHA256 2478739b1326ebe50d1eb1989fa31b0b9fd24c2d370864386c9780be8f9a07bd
+MISC ChangeLog 238 RMD160 c794f1ad7f69fd9c1ebdf2e4c9a9eeb63329c778 SHA1 af0495cc8b3b3f98130ae8f631b51b13768d5079 SHA256 718d5a66b46f3941b3ce7496580e59815fa1875eb6930e62d633a998dcf19faa
+MISC metadata.xml 434 RMD160 588a436fe0d7c5f40db2ae585f164d551fb9167b SHA1 40d7755165a620f9ca5cdcae9418a727d82a2abc SHA256 792c8e9f680c1b83bda05d672b3eb338dfbd4f0c14ef0eefa3e317b4a6836fc0
diff --git a/dev-lang/scheme2c/metadata.xml b/dev-lang/scheme2c/metadata.xml
new file mode 100644 (file)
index 0000000..0e6fe55
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<longdescription>
+  The Scheme->C compiler transforms R4RS Scheme to C, allowing either
+  stand-alone Scheme programs or mixture of compiled/interpreted
+  Scheme and other languages. Includes macros, records, foreign
+  function calls, interface to Xlib, call/cc, interpreter.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/scheme2c/scheme2c-9999.ebuild b/dev-lang/scheme2c/scheme2c-9999.ebuild
new file mode 100644 (file)
index 0000000..129419a
--- /dev/null
@@ -0,0 +1,95 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EDARCS_REPOSITORY="http://darcs.debian.org/darcs/${PN}/${PN}/"
+
+inherit eutils darcs multilib
+
+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
+               emake -C doc/ embedded.pdf index.pdf intro.pdf smithnotes.pdf || \
+                       die "Failed to build documents"
+       fi
+
+       if use x86; then
+               emake forLINUX || die "Failed to set up Linux build"
+               pushd LINUX
+       elif use amd64; then
+               emake forAMD64 || die "Failed to set up AMD64 build"
+               pushd AMD64
+       else
+               die "Unimplemented architecture"
+       fi
+
+       # Due to insanity in the build system we have to touch these to
+       # guarantee that everything will always get built
+       touch scrt/*.c
+       touch scsc/*.c
+
+       # emake does the wrong thing here, so we have to use make
+       emake -j1 all || die "Failed to compile"
+
+       if use X; then
+               emake -C cdecl || die "cdecl couldn't build"
+               emake -C xlib -B sizeof.cdecl || die "cdecl couldn't run"
+               emake -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
+       else
+               die "Unimplemented architecture"
+       fi
+
+       insinto /usr/$(get_libdir)/${PN}
+
+# Only a small subset of files from scrt is required
+       doins scrt/libsc.a scrt/predef.sc scrt/objects.h scrt/options.h ||  \
+               die "Failed to install scrt files"
+
+       dobin scrt/sci scsc/{scc,sccomp} || die "Failed to install binaries"
+
+       if use X; then
+               doins xlib/scxl.a || die "Failed to install X11 bindings"
+               dobin xlib/scixl || die "Failed to install X11-aware interpreter"
+               newdoc xlib/doc.txt xlib.txt || die "Failed to install X documentation"
+       fi
+
+       popd
+
+       cp doc/scc.l doc/scc.1
+       cp doc/sci.l doc/sci.1
+       doman doc/{scc,sci}.1 || die "Failed to install man pages"
+
+       if use doc; then
+               dodoc doc/*.pdf || die "Failed to install pdf documentation"
+       fi
+
+       dodoc CHANGES README || die "Failed to install documentation"
+
+       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
+}