summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-scheme
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-scheme')
-rw-r--r--dev-scheme/bigloo/Manifest4
-rw-r--r--dev-scheme/bigloo/bigloo-3.0c_p4.ebuild91
-rw-r--r--dev-scheme/bigloo/bigloo-3.4a_p3.ebuild218
-rw-r--r--dev-scheme/bigloo/bigloo-3.6a.ebuild208
-rw-r--r--dev-scheme/bigloo/files/50bigloo-gentoo.el3
-rw-r--r--dev-scheme/bigloo/files/bigloo-3.3a_p5-no_strip.patch32
-rw-r--r--dev-scheme/bigloo/files/bigloo-3.6a-fix_printf_format_warnings.patch237
-rw-r--r--dev-scheme/bigloo/metadata.xml36
-rw-r--r--dev-scheme/c-wrapper/Manifest1
-rw-r--r--dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild39
-rw-r--r--dev-scheme/c-wrapper/files/c-wrapper-system-libffi.diff33
-rw-r--r--dev-scheme/c-wrapper/metadata.xml7
-rw-r--r--dev-scheme/chicken/Manifest2
-rw-r--r--dev-scheme/chicken/chicken-4.8.0.3-r1.ebuild93
-rw-r--r--dev-scheme/chicken/files/50hen-gentoo.el5
-rw-r--r--dev-scheme/chicken/files/chicken-4.5.0-r0-ARCH-to-zARCH-hack.patch210
-rw-r--r--dev-scheme/chicken/files/chicken-4.7.3-parallel-build.patch74
-rw-r--r--dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-1874.patch25
-rw-r--r--dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2024.patch47
-rw-r--r--dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2075_1.patch161
-rw-r--r--dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2075_2.patch309
-rw-r--r--dev-scheme/chicken/files/chicken-4.8.0.3-parallel-build.patch74
-rw-r--r--dev-scheme/chicken/metadata.xml25
-rw-r--r--dev-scheme/elk/Manifest1
-rw-r--r--dev-scheme/elk/elk-3.99.8.ebuild31
-rw-r--r--dev-scheme/elk/metadata.xml12
-rw-r--r--dev-scheme/escm/Manifest1
-rw-r--r--dev-scheme/escm/escm-1.1.ebuild34
-rw-r--r--dev-scheme/escm/metadata.xml7
-rw-r--r--dev-scheme/gambit/Manifest7
-rw-r--r--dev-scheme/gambit/files/50gambit-gentoo.el10
-rw-r--r--dev-scheme/gambit/gambit-4.6.2.ebuild52
-rw-r--r--dev-scheme/gambit/gambit-4.6.3.ebuild52
-rw-r--r--dev-scheme/gambit/gambit-4.6.4.ebuild52
-rw-r--r--dev-scheme/gambit/gambit-4.6.5.ebuild52
-rw-r--r--dev-scheme/gambit/gambit-4.6.7.ebuild52
-rw-r--r--dev-scheme/gambit/gambit-4.6.9.ebuild52
-rw-r--r--dev-scheme/gambit/gambit-4.7.0.ebuild52
-rw-r--r--dev-scheme/gambit/metadata.xml5
-rw-r--r--dev-scheme/gauche-cdb/Manifest1
-rw-r--r--dev-scheme/gauche-cdb/files/gauche-cdb-0.3.1-gauche-package.diff133
-rw-r--r--dev-scheme/gauche-cdb/files/gauche-cdb-0.3.1-undefined-reference.diff22
-rw-r--r--dev-scheme/gauche-cdb/gauche-cdb-0.3.1-r1.ebuild29
-rw-r--r--dev-scheme/gauche-cdb/metadata.xml10
-rw-r--r--dev-scheme/gauche-gl/Manifest2
-rw-r--r--dev-scheme/gauche-gl/files/gauche-gl-0.6-simple.viewer.diff25
-rw-r--r--dev-scheme/gauche-gl/gauche-gl-0.5.1.ebuild48
-rw-r--r--dev-scheme/gauche-gl/gauche-gl-0.6.ebuild52
-rw-r--r--dev-scheme/gauche-gl/metadata.xml16
-rw-r--r--dev-scheme/gauche-gtk/Manifest1
-rw-r--r--dev-scheme/gauche-gtk/files/gauche-gtk-0.4.1-gtk+-2.8.diff23
-rw-r--r--dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff71
-rw-r--r--dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff11
-rw-r--r--dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff23
-rw-r--r--dev-scheme/gauche-gtk/gauche-gtk-0.6_pre1.ebuild81
-rw-r--r--dev-scheme/gauche-gtk/metadata.xml16
-rw-r--r--dev-scheme/gauche-kakasi/Manifest1
-rw-r--r--dev-scheme/gauche-kakasi/gauche-kakasi-0.1.ebuild34
-rw-r--r--dev-scheme/gauche-kakasi/metadata.xml10
-rw-r--r--dev-scheme/gauche-qdbm/Manifest1
-rw-r--r--dev-scheme/gauche-qdbm/files/gauche-qdbm-0.2-gauche-package.diff136
-rw-r--r--dev-scheme/gauche-qdbm/files/gauche-qdbm-0.2-undefined-reference.diff11
-rw-r--r--dev-scheme/gauche-qdbm/gauche-qdbm-0.2-r1.ebuild29
-rw-r--r--dev-scheme/gauche-qdbm/metadata.xml10
-rw-r--r--dev-scheme/gauche/Manifest2
-rw-r--r--dev-scheme/gauche/files/gauche-0.9.3.3-gauche.threads.diff120
-rw-r--r--dev-scheme/gauche/files/gauche-ext-ldflags.diff11
-rw-r--r--dev-scheme/gauche/files/gauche-gauche.m4.diff19
-rw-r--r--dev-scheme/gauche/files/gauche-rfc.tls.diff11
-rw-r--r--dev-scheme/gauche/files/gauche-rpath.diff10
-rw-r--r--dev-scheme/gauche/files/gauche-xz-info.diff31
-rw-r--r--dev-scheme/gauche/gauche-0.9.3.3.ebuild48
-rw-r--r--dev-scheme/gauche/gauche-0.9.4.ebuild47
-rw-r--r--dev-scheme/gauche/metadata.xml19
-rw-r--r--dev-scheme/goosh/Manifest1
-rw-r--r--dev-scheme/goosh/goosh-1.3.ebuild17
-rw-r--r--dev-scheme/goosh/metadata.xml5
-rw-r--r--dev-scheme/greg/Manifest1
-rw-r--r--dev-scheme/greg/files/2.0.0-notest.patch12
-rw-r--r--dev-scheme/greg/files/greg-2.0.0-test.patch12
-rw-r--r--dev-scheme/greg/greg-2.0.0-r1.ebuild30
-rw-r--r--dev-scheme/greg/greg-2.0.0.ebuild29
-rw-r--r--dev-scheme/greg/metadata.xml8
-rw-r--r--dev-scheme/guile-cairo/Manifest2
-rw-r--r--dev-scheme/guile-cairo/files/1.3.90-various-fixes-20070601.patch72
-rw-r--r--dev-scheme/guile-cairo/guile-cairo-1.4.0.ebuild29
-rw-r--r--dev-scheme/guile-cairo/guile-cairo-1.9.91.ebuild28
-rw-r--r--dev-scheme/guile-cairo/metadata.xml8
-rw-r--r--dev-scheme/guile-gnome-platform/Manifest2
-rw-r--r--dev-scheme/guile-gnome-platform/files/2.15.92-add-atk-overrides.patch12
-rw-r--r--dev-scheme/guile-gnome-platform/files/2.15.92-add-cairo-fix-from-bzr.patch91
-rw-r--r--dev-scheme/guile-gnome-platform/files/2.16.1-conflicting-types.patch34
-rw-r--r--dev-scheme/guile-gnome-platform/files/2.16.1-gcc45.patch11
-rw-r--r--dev-scheme/guile-gnome-platform/files/2.16.1-gdk-color.patch55
-rw-r--r--dev-scheme/guile-gnome-platform/files/2.16.1-glib-single-include.patch26
-rw-r--r--dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.1-r1.ebuild71
-rw-r--r--dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.1.ebuild60
-rw-r--r--dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.2.ebuild61
-rw-r--r--dev-scheme/guile-gnome-platform/metadata.xml5
-rw-r--r--dev-scheme/guile-gui/Manifest1
-rw-r--r--dev-scheme/guile-gui/guile-gui-0.2.ebuild19
-rw-r--r--dev-scheme/guile-gui/metadata.xml5
-rw-r--r--dev-scheme/guile-lib/Manifest1
-rw-r--r--dev-scheme/guile-lib/guile-lib-0.1.9.ebuild23
-rw-r--r--dev-scheme/guile-lib/metadata.xml8
-rw-r--r--dev-scheme/guile-www/Manifest2
-rw-r--r--dev-scheme/guile-www/files/guile-www-2.30-alive.test.patch74
-rw-r--r--dev-scheme/guile-www/files/guile-www-2.30-alive.test2.patch51
-rw-r--r--dev-scheme/guile-www/guile-www-2.34.ebuild23
-rw-r--r--dev-scheme/guile-www/guile-www-2.35.ebuild23
-rw-r--r--dev-scheme/guile-www/metadata.xml5
-rw-r--r--dev-scheme/guile/Manifest2
-rw-r--r--dev-scheme/guile/files/50guile-gentoo.el1
-rw-r--r--dev-scheme/guile/files/guile-1.8.8-fix_guile-config.patch14
-rw-r--r--dev-scheme/guile/files/guile-1.8.8-gcc46.patch39
-rw-r--r--dev-scheme/guile/files/guile-1.8.8-gtexinfo-5.patch15
-rw-r--r--dev-scheme/guile/files/guile-1.8.8-makeinfo-5.patch71
-rw-r--r--dev-scheme/guile/guile-1.8.8-r1.ebuild114
-rw-r--r--dev-scheme/guile/guile-2.0.0.ebuild101
-rw-r--r--dev-scheme/guile/metadata.xml18
-rw-r--r--dev-scheme/hop/Manifest1
-rw-r--r--dev-scheme/hop/files/hop.confd4
-rw-r--r--dev-scheme/hop/files/hop.initd45
-rw-r--r--dev-scheme/hop/hop-2.0.1.ebuild47
-rw-r--r--dev-scheme/hop/metadata.xml13
-rw-r--r--dev-scheme/ikarus/Manifest1
-rw-r--r--dev-scheme/ikarus/files/ikarus-0.0.3_p1870-cpu_has_sse2.patch12
-rw-r--r--dev-scheme/ikarus/files/ikarus-0.0.3_p1870-ikarus-enter.patch13
-rw-r--r--dev-scheme/ikarus/ikarus-0.0.3_p1870.ebuild64
-rw-r--r--dev-scheme/ikarus/metadata.xml15
-rw-r--r--dev-scheme/jscheme/Manifest1
-rw-r--r--dev-scheme/jscheme/jscheme-7.2.ebuild35
-rw-r--r--dev-scheme/jscheme/metadata.xml13
-rw-r--r--dev-scheme/kawa/Manifest4
-rw-r--r--dev-scheme/kawa/files/kawa-1.10.patch24
-rw-r--r--dev-scheme/kawa/files/kawa-1.14.patch24
-rw-r--r--dev-scheme/kawa/files/kawa-1.9.90.patch12
-rw-r--r--dev-scheme/kawa/kawa-1.10.ebuild110
-rw-r--r--dev-scheme/kawa/kawa-1.14.ebuild109
-rw-r--r--dev-scheme/kawa/metadata.xml27
-rw-r--r--dev-scheme/metadata.xml41
-rw-r--r--dev-scheme/net-http/Manifest1
-rw-r--r--dev-scheme/net-http/metadata.xml5
-rw-r--r--dev-scheme/net-http/net-http-0.3.1-r1.ebuild36
-rw-r--r--dev-scheme/net-http/net-http-0.3.1.ebuild26
-rw-r--r--dev-scheme/racket/Manifest9
-rw-r--r--dev-scheme/racket/metadata.xml33
-rw-r--r--dev-scheme/racket/racket-5.1.2.ebuild71
-rw-r--r--dev-scheme/racket/racket-5.2.1.ebuild71
-rw-r--r--dev-scheme/racket/racket-5.3.1.ebuild71
-rw-r--r--dev-scheme/racket/racket-5.3.2.ebuild71
-rw-r--r--dev-scheme/racket/racket-5.3.3.ebuild71
-rw-r--r--dev-scheme/racket/racket-5.3.4.ebuild72
-rw-r--r--dev-scheme/racket/racket-5.3.6.ebuild72
-rw-r--r--dev-scheme/racket/racket-6.0.1.ebuild70
-rw-r--r--dev-scheme/scheme48/Manifest2
-rw-r--r--dev-scheme/scheme48/files/50scheme48-gentoo.el10
-rw-r--r--dev-scheme/scheme48/files/scheme48-1.8-as-needed+fix_destdir.patch31
-rw-r--r--dev-scheme/scheme48/metadata.xml11
-rw-r--r--dev-scheme/scheme48/scheme48-1.8-r2.ebuild60
-rw-r--r--dev-scheme/scheme48/scheme48-1.9.2.ebuild68
-rw-r--r--dev-scheme/schemik/Manifest1
-rw-r--r--dev-scheme/schemik/files/schemik-1.2.40.0-asneeded.patch15
-rw-r--r--dev-scheme/schemik/metadata.xml15
-rw-r--r--dev-scheme/schemik/schemik-1.2.40.0.ebuild40
-rw-r--r--dev-scheme/schoca/Manifest1
-rw-r--r--dev-scheme/schoca/metadata.xml14
-rw-r--r--dev-scheme/schoca/schoca-0.3.0.ebuild47
-rw-r--r--dev-scheme/scm/Manifest1
-rw-r--r--dev-scheme/scm/files/scm-5.5.6-multiplefixes.patch81
-rw-r--r--dev-scheme/scm/metadata.xml30
-rw-r--r--dev-scheme/scm/scm-5.5.6.ebuild161
-rw-r--r--dev-scheme/scmxlate/Manifest1
-rw-r--r--dev-scheme/scmxlate/metadata.xml13
-rw-r--r--dev-scheme/scmxlate/scmxlate-20090410.ebuild25
-rw-r--r--dev-scheme/sigscheme/Manifest1
-rw-r--r--dev-scheme/sigscheme/metadata.xml14
-rw-r--r--dev-scheme/sigscheme/sigscheme-0.8.5.ebuild18
-rw-r--r--dev-scheme/slib/Manifest3
-rw-r--r--dev-scheme/slib/metadata.xml9
-rw-r--r--dev-scheme/slib/slib-3.1.5-r1.ebuild133
-rw-r--r--dev-scheme/slib/slib-3.2.1.ebuild130
-rw-r--r--dev-scheme/slib/slib-3.2.2.ebuild119
-rw-r--r--dev-scheme/stalin/Manifest1
-rw-r--r--dev-scheme/stalin/metadata.xml15
-rw-r--r--dev-scheme/stalin/stalin-0.11.ebuild75
-rw-r--r--dev-scheme/stklos/Manifest1
-rw-r--r--dev-scheme/stklos/metadata.xml16
-rw-r--r--dev-scheme/stklos/stklos-1.10.ebuild36
-rw-r--r--dev-scheme/termite/Manifest1
-rw-r--r--dev-scheme/termite/metadata.xml12
-rw-r--r--dev-scheme/termite/termite-0.15.ebuild33
-rw-r--r--dev-scheme/tinyscheme/Manifest1
-rw-r--r--dev-scheme/tinyscheme/files/tinyscheme-1.41-makefile.patch50
-rw-r--r--dev-scheme/tinyscheme/metadata.xml11
-rw-r--r--dev-scheme/tinyscheme/tinyscheme-1.41.ebuild63
-rw-r--r--dev-scheme/ypsilon/Manifest1
-rw-r--r--dev-scheme/ypsilon/files/ypsilon-0.9.6_p3-asneeded.patch11
-rw-r--r--dev-scheme/ypsilon/metadata.xml10
-rw-r--r--dev-scheme/ypsilon/ypsilon-0.9.6_p3.ebuild40
200 files changed, 7537 insertions, 0 deletions
diff --git a/dev-scheme/bigloo/Manifest b/dev-scheme/bigloo/Manifest
new file mode 100644
index 000000000000..8d6394ab930c
--- /dev/null
+++ b/dev-scheme/bigloo/Manifest
@@ -0,0 +1,4 @@
+DIST bigloo-3.4a-patchset-1.tbz2 3282 SHA256 44f3f62e39b344bdc4c6eb54f7e2003fedcadb23b6bf2a1a8b647f9799884b2a
+DIST bigloo3.0c-4.tar.gz 11776933 SHA256 047bb6b36c8ca51a2b261fdfba6b0637808d0d9923360633f695bcc3dd6b6c2b
+DIST bigloo3.4a-3.tar.gz 13631619 SHA256 c6bf16a60a16447444dc1e3eadf061d37f2796ebb75f3190415fb14aa06bc4bd
+DIST bigloo3.6a.tar.gz 14264922 SHA256 3c026d97d79b8d97d6104c1e63b8ef1b77380462262c5172d8ca66f932d45a54
diff --git a/dev-scheme/bigloo/bigloo-3.0c_p4.ebuild b/dev-scheme/bigloo/bigloo-3.0c_p4.ebuild
new file mode 100644
index 000000000000..f99563acf1f9
--- /dev/null
+++ b/dev-scheme/bigloo/bigloo-3.0c_p4.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit elisp-common multilib java-pkg-opt-2
+
+MY_P=${PN}${PV/_p/-}
+MY_P=${MY_P/_alpha/-alpha}
+MY_P=${MY_P/_beta/-beta}
+
+DESCRIPTION="Bigloo is a Scheme implementation"
+HOMEPAGE="http://www-sop.inria.fr/mimosa/fp/Bigloo/bigloo.html"
+SRC_URI="ftp://ftp-sop.inria.fr/mimosa/fp/Bigloo/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.5 )"
+
+RDEPEND="${DEPEND}
+ java? ( >=virtual/jre-1.5 )"
+
+S=${WORKDIR}/${MY_P%-*}
+
+SITEFILE="50bigloo-gentoo.el"
+
+IUSE="emacs java"
+# fullbee"
+
+src_prepare() {
+ sed -i -e 's/^cstrip="-s"/cstrip="no"/' \
+ -e 's/STRIP=$strip/STRIP=true/' \
+ configure || die
+}
+
+src_configure() {
+ # Bigloo doesn't use autoconf and consequently a lot of options used by econf give errors
+ # Manuel Serrano says: "Please, dont talk to me about autoconf. I simply dont want to hear about it..."
+ ./configure \
+ $(use java && echo "--jvm=yes --java=$(java-config --java) --javac=$(java-config --javac)") \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --libdir=/usr/$(get_libdir) \
+ --docdir=/usr/share/doc/${PF} \
+ --benchmark=yes \
+ --sharedbde=no \
+ --sharedcompiler=no \
+ --coflags="" || die "configure failed"
+
+# --bee=$(if use fullbee; then echo full; else echo partial; fi) \
+
+}
+
+src_compile() {
+ if use emacs; then
+ elisp-compile etc/*.el || die "elisp-compile failed"
+ fi
+
+ # parallel build is broken
+ emake -j1 || die "emake failed"
+}
+
+src_install () {
+# dodir /etc/env.d
+# echo "LDPATH=/usr/$(get_libdir)/bigloo/${PV}/" > ${D}/etc/env.d/25bigloo
+
+ # make the links created not point to DESTDIR, since that is only a temporary home
+ sed 's/ln -s $(DESTDIR)/ln -s /' -i Makefile.misc
+ emake -j1 DESTDIR="${D}" install || die "install failed"
+
+ if use emacs; then
+ elisp-install ${PN} etc/*.{el,elc} || die "elisp-install failed"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+# einfo "Compiling bee..."
+# emake compile-bee || die "compiling bee failed"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/bigloo/bigloo-3.4a_p3.ebuild b/dev-scheme/bigloo/bigloo-3.4a_p3.ebuild
new file mode 100644
index 000000000000..61318fae09a1
--- /dev/null
+++ b/dev-scheme/bigloo/bigloo-3.4a_p3.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit elisp-common multilib eutils flag-o-matic java-pkg-opt-2
+
+MY_P=${PN}${PV/_p/-}
+MY_P=${MY_P/_alpha*/-alpha}
+MY_P=${MY_P/_beta*/-beta}
+
+BGL_RELEASE=${PV/_*/}
+PATCHSET="1"
+
+DESCRIPTION="Bigloo is a Scheme implementation"
+HOMEPAGE="http://www-sop.inria.fr/indes/fp/Bigloo/bigloo.html"
+SRC_URI="ftp://ftp-sop.inria.fr/members/Cyprien.Nicolas/mirror/bigloo-${BGL_RELEASE}-patchset-${PATCHSET}.tbz2
+ ftp://ftp-sop.inria.fr/indes/fp/Bigloo/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="bglpkg calendar crypto debug doc emacs gmp gstreamer java mail multimedia packrat sqlite srfi1 srfi27 ssl text threads web"
+
+# bug 254916 for >=dev-libs/boehm-gc-7.1
+DEPEND=">=dev-libs/boehm-gc-7.1[threads?]
+ emacs? ( virtual/emacs )
+ gmp? ( dev-libs/gmp )
+ gstreamer? ( media-libs/gstreamer:0.10 media-libs/gst-plugins-base:0.10 )
+ java? ( >=virtual/jdk-1.5 app-arch/zip )
+ sqlite? ( dev-db/sqlite:3 )
+ ssl? ( dev-libs/openssl )
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P/-[ab]*/}
+
+SITEFILE="50bigloo-gentoo.el"
+
+pkg_setup() {
+ if use gstreamer; then
+ if ! use threads; then
+ die "USE Dependency: 'gstreamer' needs 'threads'. You may enable 'threads', or disable 'gstreamer'."
+ fi
+
+ if ! use multimedia; then
+ die "USE Dependency: 'gstreamer' needs 'multimedia'."
+ fi
+ fi
+
+ if use packrat && ! use srfi1; then
+ die "USE Dependency: 'packrat' needs 'srfi1'."
+ fi
+
+ if use srfi27; then
+ # 'dev-scheme/bigloo srfi27' should be added in arch/amd64/package.use.mask
+ if use amd64; then
+ ewarn "srfi27 is known to only work on 32-bit architectures." \
+ "The USE is ignored on amd64."
+ elif ! use gmp; then
+ die "USE Dependency: 'srfi27' needs 'gmp'."
+ fi
+ fi
+
+ if use bglpkg && ! (use sqlite && use web); then
+ die "USE Dependency: 'bglpkg' needs both 'sqlite' and 'web'."
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" epatch
+
+ # bglmem is not built according to the EFLAGS
+ # (which forces LDFLAGS, see emake below)
+ ebegin "Adding EFLAGS to BMEMFLAGS"
+ sed -i 's/BMEMFLAGS[^=]\+= /&$(EFLAGS) /' bde/bmem/Makefile
+ eend $?
+
+ # Removing bundled boehm-gc
+ rm -rf gc || die
+}
+
+src_configure() {
+ filter-flags -fomit-frame-pointer
+
+ local myconf=""
+
+ # Filter Zile emacs replacement. Bug #336717
+ if use emacs; then
+ myconf="--bee=full --emacs=${EMACS} --lispdir=${SITELISP}/${PN}"
+ else
+ myconf="--emacs=false"
+ fi
+
+ # dev-java/ibm-jdk-bin fails during configure, bug #331279
+ # api/crypto java tests show failures, I'm looking into it
+ if use java; then
+ sed -e "s/^\(jcflags=\)\(.*\)/\\1\"\\2 $(java-pkg_javac-args)\"/" \
+ -e 's/jcflags=$jcflags/jcflags="$jcflags"/'\
+ -i configure
+ myconf="${myconf}
+ --jvm=yes"
+ fi
+
+ # No pkglib/pkgcomp in IUSE, I don't see any need besides bglpkg
+ # One or the other could be added upon user request
+ if use bglpkg; then
+ myconf="${myconf}
+ --enable-bglpkg --enable-pkgcomp --enable-pkglib"
+ else
+ myconf="${myconf}
+ --disable-bglpkg --disable-pkgcomp --disable-pkglib"
+ fi
+
+ # srfi27 management
+ if use amd64; then
+ myconf="${myconf}
+ --disable-srfi27"
+ else
+ myconf="${myconf}
+ $(use_enable srfi27)"
+ fi
+
+ # Put every non quoted configure opt into myconf, for the einfo below
+ myconf="
+ --prefix=/usr
+ --libdir=/usr/$(get_libdir)
+ --benchmark=yes
+ --coflags=
+ --customgc=no
+ --sharedbde=no
+ --sharedcompiler=no
+ --strip=no
+ $(use debug && echo --debug)
+ ${myconf}
+ $(use_enable calendar)
+ $(use_enable crypto)
+ $(use_enable gmp)
+ $(use_enable gstreamer)
+ $(use_enable mail)
+ $(use_enable multimedia)
+ $(use_enable packrat)
+ $(use_enable sqlite)
+ $(use_enable srfi1)
+ $(use_enable ssl)
+ $(use_enable text)
+ $(use_enable threads)
+ $(use_enable web)
+"
+
+ einfo "Configuring bigloo with:" \
+ "--ldflags=\"${LDFLAGS}\" $(echo ${myconf} | sed 's/\n\t\t/ /g')"
+
+ # Bigloo doesn't use autoconf and consequently a lot of options used by econf give errors
+ # Manuel Serrano says: "Please, dont talk to me about autoconf. I simply dont want to hear about it..."
+ ./configure --ldflags="${LDFLAGS}" ${myconf} || die "configure failed"
+}
+
+src_compile() {
+ emake EFLAGS='-ldopt "$(LDFLAGS)"' || die "emake failed"
+
+ if use emacs; then
+ einfo "Compiling bee..."
+ emake -j1 compile-bee EFLAGS='-ldopt "$(LDFLAGS)"' || die "compiling bee failed"
+ fi
+}
+
+# default thinks that target doesn't exist
+src_test() {
+ emake -j1 test || die "emake test failed"
+}
+
+src_install() {
+ # Makefile:671:install: install-progs install-docs
+ emake DESTDIR="${D}" install-progs || die "install failed"
+
+ if use emacs; then
+ einfo "Installing bee..."
+ emake DESTDIR="${D}" install-bee || die "install-bee failed"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ else
+ # Fix EMACS*=false in Makefile.config
+ sed -i 's:^\(EMACS=\).*$:\1:' "${D}"/usr/$(get_libdir)/bigloo/${BGL_RELEASE}/Makefile.config \
+ || die "dosed EMACS failed"
+ sed -i 's:^\(EMACSBRAND=\).*$:\1:' "${D}"/usr/$(get_libdir)/bigloo/${BGL_RELEASE}/Makefile.config \
+ || die "dosed EMACSBRAND failed"
+ fi
+
+ dodoc ChangeLog README || die "dodoc failed"
+ newdoc LICENSE COPYING || die "newdoc failed"
+
+ cd "${S}/manuals"
+ if use doc; then
+ dohtml -r . || die "dohtml failed"
+ doinfo *.info* || die "doinfo failed"
+ fi
+
+ for man in *.man; do
+ newman ${man} ${man/.man/.1} || die "newman ${man} ${man/.man/.1} failed"
+ done
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ elog "In order to use the bee-mode, add"
+ elog " (require 'bmacs)"
+ elog "to your ~/.emacs file"
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/bigloo/bigloo-3.6a.ebuild b/dev-scheme/bigloo/bigloo-3.6a.ebuild
new file mode 100644
index 000000000000..73ecc24f6e3f
--- /dev/null
+++ b/dev-scheme/bigloo/bigloo-3.6a.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit elisp-common multilib eutils flag-o-matic java-pkg-opt-2
+
+MY_P=${PN}${PV/_p/-}
+MY_P=${MY_P/_alpha*/-alpha}
+MY_P=${MY_P/_beta*/-beta}
+
+BGL_RELEASE=${PV/_*/}
+
+DESCRIPTION="Bigloo is a Scheme implementation"
+HOMEPAGE="http://www-sop.inria.fr/indes/fp/Bigloo/bigloo.html"
+SRC_URI="ftp://ftp-sop.inria.fr/indes/fp/Bigloo/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="bglpkg calendar crypto debug doc emacs gmp java mail multimedia openpgp packrat sqlite srfi1 srfi27 ssl text threads web"
+REQUIRED_USE="
+ bglpkg? ( web )
+ openpgp? ( crypto )
+ packrat? ( srfi1 )
+ srfi27? ( x86? ( gmp ) )
+"
+
+# bug 254916 for >=dev-libs/boehm-gc-7.1
+DEPEND=">=dev-libs/boehm-gc-7.1[threads?]
+ emacs? ( virtual/emacs )
+ gmp? ( dev-libs/gmp )
+ java? ( >=virtual/jdk-1.5 app-arch/zip )
+ sqlite? ( dev-db/sqlite:3 )
+ ssl? ( dev-libs/openssl )
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P/-[ab]*/}
+
+SITEFILE="50bigloo-gentoo.el"
+
+pkg_pretend() {
+ if use srfi27 && use amd64; then
+ #TODO: 'dev-scheme/bigloo srfi27' in arch/amd64/package.use.mask?
+ ewarn "srfi27 is known to only work on 32-bit architectures." \
+ "This IUSE is ignored on amd64."
+ fi
+}
+
+src_prepare() {
+ # Removing bundled boehm-gc
+ rm -rf gc || die
+
+ # Fix some printf format warnings
+ epatch "${FILESDIR}/${PN}-${BGL_RELEASE}-fix_printf_format_warnings.patch"
+
+ # bug 354751: Fix '[a-z]' sed range for non ascii LC_COLLATE order
+ sed 's/a-z/[:alpha:]/' -i configure autoconf/* || die 'sed s/a-z/[:alpha:]/ failed'
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ filter-flags -fomit-frame-pointer
+
+ local myconf=""
+
+ # Filter Zile emacs replacement. Bug #336717
+ if use emacs; then
+ myconf="--bee=full --emacs=${EMACS} --lispdir=${SITELISP}/${PN}"
+ else
+ myconf="--emacs=false"
+ fi
+
+ # Add JCFLAGS to the configure script
+ # (api/{crypto,openpgp} jvm tests show failures)
+ if use java; then
+ sed -e "s/^\(jcflags=\)\(.*\)/\\1\"\\2 $(java-pkg_javac-args)\"/" \
+ -e 's/jcflags=$jcflags/jcflags="$jcflags"/'\
+ -i configure
+ myconf="${myconf}
+ --jvm=yes"
+ fi
+
+ # No pkglib/pkgcomp in IUSE, I don't see any need besides bglpkg
+ # One or the other could be added upon user request
+ if use bglpkg; then
+ myconf="${myconf}
+ --enable-bglpkg --enable-pkgcomp --enable-pkglib"
+ else
+ myconf="${myconf}
+ --disable-bglpkg --disable-pkgcomp --disable-pkglib"
+ fi
+
+ # srfi27 management
+ if use amd64; then
+ myconf="${myconf}
+ --disable-srfi27"
+ else
+ myconf="${myconf}
+ $(use_enable srfi27)"
+ fi
+
+ # Put every non quoted configure opt into myconf, for the einfo below
+ myconf="
+ --prefix=/usr
+ --libdir=/usr/$(get_libdir)
+ --benchmark=yes
+ --coflags=
+ --customgc=no
+ --sharedbde=no
+ --sharedcompiler=no
+ --strip=no
+ $(use debug && echo --debug)
+ ${myconf}
+ $(use_enable calendar)
+ $(use_enable crypto)
+ $(use_enable gmp)
+ --disable-gstreamer
+ $(use_enable mail)
+ $(use_enable multimedia)
+ $(use_enable openpgp)
+ $(use_enable packrat)
+ --disable-phone
+ $(use_enable sqlite)
+ $(use_enable srfi1)
+ $(use_enable ssl)
+ $(use_enable text)
+ $(use_enable threads)
+ $(use_enable web)
+"
+
+ einfo "Configuring bigloo with:" \
+ "--ldflags=\"${LDFLAGS}\" $(echo ${myconf} | sed 's/\n\t\t/ /g')"
+
+ # Bigloo doesn't use autoconf and consequently a lot of options used by econf give errors
+ # Manuel Serrano says: "Please, dont talk to me about autoconf. I simply dont want to hear about it..."
+ ./configure --ldflags="${LDFLAGS}" ${myconf} || die "configure failed"
+}
+
+src_compile() {
+ emake EFLAGS='-ldopt "$(LDFLAGS)"' || die "emake failed"
+
+ if use emacs; then
+ einfo "Compiling bee..."
+ emake compile-bee EFLAGS='-ldopt "$(LDFLAGS)"' || die "compiling bee failed"
+ fi
+}
+
+# default thinks that target doesn't exist
+src_test() {
+ emake -j1 test || die "emake test failed"
+}
+
+src_install() {
+ # Makefile:671:install: install-progs install-docs
+ emake DESTDIR="${D}" install-progs || die "install failed"
+
+ if use emacs; then
+ einfo "Installing bee..."
+ emake DESTDIR="${D}" install-bee || die "install-bee failed"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ else
+ # Fix EMACS*=false in Makefile.config
+ sed -i \
+ -e 's:^\(EMACS=\).*$:\1:' \
+ -e 's:^\(EMACSBRAND=\).*$:\1:' \
+ "${D}"/usr/$(get_libdir)/bigloo/${BGL_RELEASE}/Makefile.config \
+ || die "sed !emacs in Makefile.config failed"
+ fi
+
+ dodoc ChangeLog README || die "dodoc failed"
+
+ pushd "${S}/manuals" &>/dev/null
+ if use doc; then
+ dohtml -r . || die "dohtml failed"
+ doinfo *.info* || die "doinfo failed"
+ fi
+
+ for man in *.man; do
+ newman ${man} ${man/.man/.1} || die "newman ${man} ${man/.man/.1} failed"
+ done
+ popd &>/dev/null
+
+ # Remove created directories which remains empty
+ pushd "${D}/usr" &>/dev/null
+ rmdir -p doc/bigloo-${BGL_RELEASE} info man/man1 || die "rm empty dirs failed"
+ popd &>/dev/null
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ elog "In order to use the bee-mode, add"
+ elog " (require 'bmacs)"
+ elog "to your ~/.emacs file"
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/bigloo/files/50bigloo-gentoo.el b/dev-scheme/bigloo/files/50bigloo-gentoo.el
new file mode 100644
index 000000000000..576bdde482e3
--- /dev/null
+++ b/dev-scheme/bigloo/files/50bigloo-gentoo.el
@@ -0,0 +1,3 @@
+;;; dev-scheme/bigloo
+
+(add-to-list 'load-path "@SITELISP@")
diff --git a/dev-scheme/bigloo/files/bigloo-3.3a_p5-no_strip.patch b/dev-scheme/bigloo/files/bigloo-3.3a_p5-no_strip.patch
new file mode 100644
index 000000000000..7a3b1190551f
--- /dev/null
+++ b/dev-scheme/bigloo/files/bigloo-3.3a_p5-no_strip.patch
@@ -0,0 +1,32 @@
+diff -Naur bigloo3.3a.orig/configure bigloo3.3a/configure
+--- bigloo3.3a.orig/configure 2009-12-01 11:13:15.000000000 -0300
++++ bigloo3.3a/configure 2009-12-11 02:08:57.000000000 -0300
+@@ -62,7 +62,7 @@
+ featureflags=
+ coflags=-O3
+
+-cstrip="-s"
++cstrip=""
+ cpicflags="demanded" # Possible values for cpicflags are:
+ # - "no" not to use position independent code (recommended)
+ # - "demanded" auto configuration but with a preference to "no"
+@@ -78,7 +78,7 @@
+ ld=
+ ldlibs=-lc
+ ldcomplibs=-lc
+-strip= # left blank for autoconfiguration
++strip="" # left blank for autoconfiguration
+ longlong= # The C type to represent long long integers
+ havelonglong=
+ stringsplit="0"
+@@ -684,6 +684,10 @@
+ extralibs="";
+ cstrip="no";;
+
++ --strip=no)
++ cstrip="no";
++ strip="no";;
++
+ --pnet)
+ dotnetclrstyle=pnet;
+ dotnetcsccstyle=pnet;
diff --git a/dev-scheme/bigloo/files/bigloo-3.6a-fix_printf_format_warnings.patch b/dev-scheme/bigloo/files/bigloo-3.6a-fix_printf_format_warnings.patch
new file mode 100644
index 000000000000..d21541afc1e7
--- /dev/null
+++ b/dev-scheme/bigloo/files/bigloo-3.6a-fix_printf_format_warnings.patch
@@ -0,0 +1,237 @@
+Author: Jerry James <loganjerry <at> gmail.com>
+Title: Patch for removing printf "warning: format" in bigloo source code
+URL: http://article.gmane.org/gmane.lisp.scheme.bigloo/5112
+--- api/gstreamer/src/Clib/bglgst.c.orig 2011-01-24 06:30:52.000000000 -0700
++++ api/gstreamer/src/Clib/bglgst.c 2011-02-14 15:24:29.464185149 -0700
+@@ -93,12 +93,12 @@ bglgst_use_threadsp() {
+ /* bgl_gobject_boehm_alloc_init ... */
+ /*---------------------------------------------------------------------*/
+ static gpointer bgl_gst_alloc( gsize n ) {
+- fprintf( stderr, "GC_MALLOC n=%d\n", n );
++ fprintf( stderr, "GC_MALLOC n=%" G_GSIZE_FORMAT "\n", n );
+ return GC_MALLOC( n );
+ }
+
+ static gpointer bgl_gst_realloc( gpointer ptr, gsize n ) {
+- fprintf( stderr, "GC_REALLOC ptr=%p n=%d\n", ptr, n );
++ fprintf( stderr, "GC_REALLOC ptr=%p n=%" G_GSIZE_FORMAT "\n", ptr, n );
+ return GC_REALLOC( ptr, n );
+ }
+
+@@ -297,7 +297,7 @@ bgl_g_value_to_obj( const GValue *gval,
+ case G_TYPE_ENUM: {
+ long obj = g_value_get_enum( gval );
+
+- fprintf( stderr, "G_TYPE_ENUM not implemented yet %d (%s:%d)\n",
++ fprintf( stderr, "G_TYPE_ENUM not implemented yet %ld (%s:%d)\n",
+ obj, __FILE__, __LINE__ );
+
+ return BUNSPEC;
+--- runtime/Clib/capply.c.orig 2011-01-24 06:30:52.000000000 -0700
++++ runtime/Clib/capply.c 2011-02-14 15:04:59.255817644 -0700
+@@ -627,7 +627,7 @@ obj_t apply( obj_t function, obj_t args_
+ default: {
+ char msg[ 128 ];
+ sprintf( msg,
+- "too many arguments provided (%d) in apply (max 50)",
++ "too many arguments provided (%ld) in apply (max 50)",
+ -arity );
+
+ C_SYSTEM_FAILURE( BGL_ERROR, "apply", msg, function );
+@@ -1229,7 +1229,7 @@ obj_t apply( obj_t function, obj_t args_
+ default: {
+ char msg[ 128 ];
+ sprintf( msg,
+- "too many arguments provided (%d) in apply (max 50)",
++ "too many arguments provided (%ld) in apply (max 50)",
+ arity );
+
+ C_SYSTEM_FAILURE( BGL_ERROR, "apply", msg, function );
+--- runtime/Clib/cstring.c.orig 2011-01-24 06:30:52.000000000 -0700
++++ runtime/Clib/cstring.c 2011-02-14 15:04:18.391856999 -0700
+@@ -293,23 +293,23 @@ integer_to_string_padding( long x, long
+
+ case 8 :
+ if( x < 0 ) {
+- sprintf( fmt, "-%%0%dlo", padding - 1 );
++ sprintf( fmt, "-%%0%ldlo", padding - 1 );
+ } else {
+- sprintf( fmt, "%%0%dlo", padding );
++ sprintf( fmt, "%%0%ldlo", padding );
+ }
+ break;
+ case 16 :
+ if( x < 0 ) {
+- sprintf( fmt, "-%%0%dlx", padding - 1);
++ sprintf( fmt, "-%%0%ldlx", padding - 1);
+ } else {
+- sprintf( fmt, "%%0%dlx", padding );
++ sprintf( fmt, "%%0%ldlx", padding );
+ }
+ break;
+ default :
+ if( x < 0 ) {
+- sprintf( fmt, "-%%0%dld", padding - 1 );
++ sprintf( fmt, "-%%0%ldld", padding - 1 );
+ } else {
+- sprintf( fmt, "%%0%dld", padding );
++ sprintf( fmt, "%%0%ldld", padding );
+ }
+ break;
+ }
+--- runtime/Clib/cerror.c.orig 2011-01-24 06:30:52.000000000 -0700
++++ runtime/Clib/cerror.c 2011-02-14 15:03:19.097168636 -0700
+@@ -69,7 +69,7 @@ bgl_debug_typeof( obj_t obj ) {
+ obj_t
+ bgl_debug_header( obj_t obj ) {
+ fprintf( stderr, "obj=%p\n", obj );
+- fprintf( stderr, " TAG_MASK=%d ", (((long)obj) & TAG_MASK) );
++ fprintf( stderr, " TAG_MASK=%ld ", (((long)obj) & TAG_MASK) );
+ switch( (((long)obj) & TAG_MASK) ) {
+ case TAG_STRUCT: fprintf( stderr, "(TAG_STRUCT)\n" ); break;
+ case TAG_INT: fprintf( stderr, "(TAG_INT)\n" ); break;
+@@ -96,7 +96,7 @@ bgl_debug_header( obj_t obj ) {
+ }
+
+ if( POINTERP( obj ) ) {
+- fprintf( stderr, " TYPE=%d ", TYPE( obj ) );
++ fprintf( stderr, " TYPE=%ld ", TYPE( obj ) );
+ switch( TYPE( obj ) ) {
+ case 0: fprintf( stderr, "(PAIR_TYPE) " ); break;
+ case 1: fprintf( stderr, "(STRING_TYPE) " ); break;
+@@ -132,7 +132,7 @@ bgl_debug_header( obj_t obj ) {
+ else
+ fprintf( stderr, "(unknown type) " );
+ }
+- fprintf( stderr, "HEADER_SIZE=%d\n", HEADER_SIZE( CREF( obj )->header ) );
++ fprintf( stderr, "HEADER_SIZE=%ld\n", HEADER_SIZE( CREF( obj )->header ) );
+ }
+
+ return obj;
+--- runtime/Clib/ccontrol.c.orig 2011-01-24 06:30:52.000000000 -0700
++++ runtime/Clib/ccontrol.c 2011-02-14 15:07:40.999882828 -0700
+@@ -200,9 +200,9 @@ bgl_procedure_entry_to_string( obj_t pro
+ obj_t res = make_string_sans_fill( 17 );
+
+ if( VA_PROCEDUREP( proc ) ) {
+- sprintf( BSTRING_TO_STRING( res ), "%016x", PROCEDURE_VA_ENTRY( proc ) );
++ sprintf( BSTRING_TO_STRING( res ), "%016lx", (long)PROCEDURE_VA_ENTRY( proc ) );
+ } else {
+- sprintf( BSTRING_TO_STRING( res ), "%016x", PROCEDURE_ENTRY( proc ) );
++ sprintf( BSTRING_TO_STRING( res ), "%016lx", (long)PROCEDURE_ENTRY( proc ) );
+ }
+
+ return res;
+--- bde/bmem/lib/thread.c.orig 2011-01-24 06:30:51.000000000 -0700
++++ bde/bmem/lib/thread.c 2011-02-14 15:18:41.127937649 -0700
+@@ -50,9 +50,9 @@ bglthread_switch( void *this, void *next
+ void
+ thread_dump_statistics( FILE *f ) {
+ if( context_switches || scheduler_awake ) {
+- fprintf( f, " (thread (context-switches %d) (scheduler-awake %d))\n",
++ fprintf( f, " (thread (context-switches %ld) (scheduler-awake %ld))\n",
+ context_switches, scheduler_awake );
+- fprintf( stderr, "thread...(context switches=%d, scheduler awake=%d)\n",
++ fprintf( stderr, "thread...(context switches=%ld, scheduler awake=%ld)\n",
+ context_switches,
+ scheduler_awake );
+ }
+--- bde/bmem/lib/alloc.c.orig 2011-01-24 06:30:52.000000000 -0700
++++ bde/bmem/lib/alloc.c 2011-02-14 15:10:55.176083686 -0700
+@@ -109,7 +109,7 @@ alloc_dump_type( pa_pair_t *i, FILE *f )
+ /*---------------------------------------------------------------------*/
+ void
+ alloc_dump( fun_alloc_info_t *i, FILE *f ) {
+- fprintf( f, " (%d %d %d\n", i->gc_num,
++ fprintf( f, " (%lu %lu %lu\n", i->gc_num,
+ BMEMSIZE( i->dsize ), BMEMSIZE( i->isize ) );
+ fprintf( f, " (dtype" );
+ for_each( (void (*)(void *, void *))alloc_dump_type, i->dtypes, f );
+@@ -486,7 +486,7 @@ GC_malloc( size_t lb ) {
+
+ #if BMEMDEBUG
+ if( bmem_debug ) {
+- fprintf( stderr, "GC_malloc(%d): %s %d\n",
++ fprintf( stderr, "GC_malloc(%zu): %s %d\n",
+ lb, bgl_debug_trace_top_name(), get_alloc_type() );
+ }
+ #endif
+@@ -513,7 +513,7 @@ GC_realloc( obj_t old, size_t lb ) {
+
+ #if BMEMDEBUG
+ if( bmem_debug ) {
+- fprintf( stderr, "GC_realloc(%d): top=%s type=%d\n",
++ fprintf( stderr, "GC_realloc(%zu): top=%s type=%d\n",
+ lb, bgl_debug_trace_top_name(), get_alloc_type() );
+ }
+ #endif
+@@ -541,7 +541,7 @@ GC_malloc_atomic( size_t lb ) {
+
+ #if BMEMDEBUG
+ if( bmem_debug ) {
+- fprintf( stderr, "GC_malloc_atomic(%d): top=%s type=%d\n",
++ fprintf( stderr, "GC_malloc_atomic(%zu): top=%s type=%d\n",
+ lb, bgl_debug_trace_top_name(), get_alloc_type() );
+ }
+ #endif
+@@ -623,7 +623,7 @@ BGl_registerzd2classz12zc0zz__objectz00(
+ hash, def,
+ constructor, virt );
+
+- fprintf( stderr, "ok\n", cname );
++ fprintf( stderr, "ok\n" );
+
+ return class;
+ }
+--- bde/bmem/lib/symbol.c.orig 2011-01-24 06:30:51.000000000 -0700
++++ bde/bmem/lib/symbol.c 2011-02-14 15:13:47.727927175 -0700
+@@ -33,7 +33,7 @@ make_symbol( obj_t name ) {
+
+ #if BMEMDEBUG
+ if( bmem_debug > 1 ) {
+- fprintf( stderr, "make_symbol: %s %p\n", name, symbol );
++ fprintf( stderr, "make_symbol: %s %p\n", BSTRING_TO_STRING( name ), symbol );
+ }
+ #endif
+ symbol->symbol_t.header = MAKE_HEADER( SYMBOL_TYPE, SYMBOL_SIZE );
+--- bde/bmem/lib/trace.c.orig 2011-01-24 06:30:52.000000000 -0700
++++ bde/bmem/lib/trace.c 2011-02-14 15:17:49.472275324 -0700
+@@ -79,9 +79,9 @@ bgl_debug_trace_top() {
+ fprintf( stderr, " top->name=KEYWORD %p\n", top->name );
+ } else {
+ if( !POINTERP( top->name ) ) {
+- fprintf( stderr, " top->name=pas pointer %d\n", top->name );
++ fprintf( stderr, " top->name=pas pointer %p\n", top->name );
+ } else {
+- fprintf( stderr, " top->name=pointer %p\n", TYPE( top->name ) );
++ fprintf( stderr, " top->name=pointer %ld\n", TYPE( top->name ) );
+ }
+ }
+ }
+--- bde/bmem/lib/gchook.c.orig 2011-01-24 06:30:52.000000000 -0700
++++ bde/bmem/lib/gchook.c 2011-02-14 15:12:29.119566199 -0700
+@@ -45,13 +45,13 @@ GC_collect_hook( int heapsz, long livesz
+ gc_number++;
+
+ if( heapsz > (1024 * 1024) ) {
+- fprintf( stderr, "gc %3d: alloc size=%.2fMB, heap size=%.2fMB, live size=%.2fMB\n",
++ fprintf( stderr, "gc %3lu: alloc size=%.2fMB, heap size=%.2fMB, live size=%.2fMB\n",
+ gc_number,
+ ((double)gc_alloc_size / (1024. * 1024.)),
+ ((double)heapsz / (1024. * 1024.)),
+ ((double)livesz / (1024. * 1024.)) );
+ } else {
+- fprintf( stderr, "gc %3d: alloc size=%dKB, heap size=%dKB, live size=%ldKB\n",
++ fprintf( stderr, "gc %3lu: alloc size=%luKB, heap size=%dKB, live size=%ldKB\n",
+ gc_number,
+ gc_alloc_size / 1024,
+ heapsz / 1024,
+@@ -81,7 +81,7 @@ gc_alloc_size_add( int size ) {
+ /*---------------------------------------------------------------------*/
+ static void
+ GC_dump_gc( gc_info_t *i, FILE *f ) {
+- fprintf( f, " (%d %d %d %d)\n",
++ fprintf( f, " (%lu %lu %lu %lu)\n",
+ i->number,
+ BMEMSIZE( i->alloc_size ),
+ BMEMSIZE( i->heap_size ),
diff --git a/dev-scheme/bigloo/metadata.xml b/dev-scheme/bigloo/metadata.xml
new file mode 100644
index 000000000000..a1ecd8724a23
--- /dev/null
+++ b/dev-scheme/bigloo/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription>
+ Bigloo is a Scheme implementation devoted to one goal: enabling Scheme
+ based programming style where C(++) is usually required. Bigloo attempts
+ to make Scheme practical by offering features usually presented by
+ traditional programming languages but not offered by Scheme and functional
+ programming. Bigloo compiles Scheme modules. It delivers small and fast
+ stand alone binary executables. Bigloo enables full connections between
+ Scheme and C programs, between Scheme and Java programs, and between
+ Scheme and C# programs.
+ </longdescription>
+ <use>
+ <flag name="bglpkg">Build bglpkg binary, which can be use to access scmpkg servers (requires web)</flag>
+ <flag name="calendar">Build the embedded library for calendar programming</flag>
+ <flag name="crypto">Build the embedded cryptographic library</flag>
+ <flag name="debug">Enable extra debug codepaths</flag>
+ <flag name="doc">Install Bigloo Manual (HTML docs of Bigloo and r5rs)</flag>
+ <flag name="emacs">Build and install the Bigloo Developement Environment for Emacs (aka bee-mode)</flag>
+ <flag name="gmp">Adds support for <pkg>dev-libs/gmp</pkg> (GNU MP library)</flag>
+ <flag name="java">Enable the JVM backend for the Bigloo compiler</flag>
+ <flag name="mail">Mail library for email management (e.g. maildir and imap support)</flag>
+ <flag name="multimedia">Build multimedia library (e.g. for managing images). Needed for <pkg>dev-scheme/hop</pkg></flag>
+ <flag name="openpgp">Build OpenPGP support (requires crypto)</flag>
+ <flag name="packrat">Bigloo port of Tony Garnock-Jones' packrat parser (requires srfi1)</flag>
+ <flag name="sqlite">Use the system-wide <pkg>dev-db/sqlite</pkg></flag>
+ <flag name="srfi1">Build the srfi1 library: List library</flag>
+ <flag name="srfi27">Build the srfi27 library: Source of Random Bits (32bit-arch only, requires gmp)</flag>
+ <flag name="ssl">Adds support for SSL connections through <pkg>dev-libs/openssl</pkg></flag>
+ <flag name="threads">Enable thread support, it depends on <pkg>dev-libs/boehm-gc</pkg> built with threads use flag</flag>
+ <flag name="text">Library for dealing with text (e.g. BibTeX parser)</flag>
+ <flag name="web">Library for web programming (e.g. XML, CGI parsers). Needed for <pkg>dev-scheme/hop</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-scheme/c-wrapper/Manifest b/dev-scheme/c-wrapper/Manifest
new file mode 100644
index 000000000000..ca2a1f91df1a
--- /dev/null
+++ b/dev-scheme/c-wrapper/Manifest
@@ -0,0 +1 @@
+DIST c-wrapper-0.6.1.tgz 843981 SHA256 d0f4037c29c149f385c12d7aa07deb5db7549029657fb60ee286f5942329d92b SHA512 a03a4d57d112d2c23dac3716bae081e3e6f02dcef261bd8dd518ed8519b43e28f9e61a36f7584b2bcb1762112c128d0b698cda422cc0c9d1190cbf7502ea04b0 WHIRLPOOL 3bdc72f1889aa2f37d3ebf3c6aaa2ed8d2f9b25d51b67c3a7ed1dc74076c7d82ba46c8e3cc3e235d992661fa6bacd019dff380961f0ac51a6a16babf4c515453
diff --git a/dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild b/dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild
new file mode 100644
index 000000000000..fea5e7ab9e49
--- /dev/null
+++ b/dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils
+
+DESCRIPTION="Foreign function interface for C and Objective-C libraries"
+HOMEPAGE="http://www.koguro.net/prog/c-wrapper/"
+SRC_URI="http://www.koguro.net/prog/${PN}/${P}.tgz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="x86"
+IUSE="examples"
+
+RDEPEND="dev-scheme/gauche
+ virtual/libffi"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-system-libffi.diff
+ eautoreconf
+}
+
+src_test() {
+ emake -j1 -s check
+}
+
+src_install() {
+ default
+ dohtml doc/*
+
+ if use examples; then
+ docompress -x /usr/share/doc/${PF}/examples
+ dodoc -r examples
+ fi
+}
diff --git a/dev-scheme/c-wrapper/files/c-wrapper-system-libffi.diff b/dev-scheme/c-wrapper/files/c-wrapper-system-libffi.diff
new file mode 100644
index 000000000000..7ee9a4011ef3
--- /dev/null
+++ b/dev-scheme/c-wrapper/files/c-wrapper-system-libffi.diff
@@ -0,0 +1,33 @@
+--- c-wrapper-0.6.1.orig/configure.ac
++++ c-wrapper-0.6.1/configure.ac
+@@ -53,6 +53,7 @@
+
+ dnl Check for libraries
+ dnl Add your macro calls to check required libraries, if you have any.
++PKG_CHECK_MODULES([FFI], [libffi])
+
+ dnl Platform-dependent configuration.
+ AC_ARG_ENABLE(objc, [ --enable-objc turn on Objective-C support])
+--- c-wrapper-0.6.1.orig/src/Makefile.in
++++ c-wrapper-0.6.1/src/Makefile.in
+@@ -20,9 +20,9 @@
+ GAUCHE_PACKAGE = @GAUCHE_PACKAGE@
+ INSTALL = @GAUCHE_INSTALL@
+
+-CPPFLAGS = -I./libffi/include -DGAUCHE_API_0_8_8 @CPPFLAGS@
++CPPFLAGS = -DGAUCHE_API_0_8_8 @FFI_CFLAGS@ @CPPFLAGS@
+ LDFLAGS = @LDFLAGS@
+-LIBS = libffi/.libs/libffi.a @LIBS@
++LIBS = @FFI_LIBS@ @LIBS@
+
+ YACC = @YACC@
+
+@@ -38,7 +38,7 @@
+ SCMFILES =
+ HEADERS =
+
+-TARGET = libffi/.libs/libffi.a $(ARCHFILES)
++TARGET = $(ARCHFILES)
+ GENERATED = libffi
+ CONFIG_GENERATED = libffi/Makefile Makefile cwcompile
+
diff --git a/dev-scheme/c-wrapper/metadata.xml b/dev-scheme/c-wrapper/metadata.xml
new file mode 100644
index 000000000000..d4a08224d284
--- /dev/null
+++ b/dev-scheme/c-wrapper/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-scheme/chicken/Manifest b/dev-scheme/chicken/Manifest
new file mode 100644
index 000000000000..03cf7036c1ab
--- /dev/null
+++ b/dev-scheme/chicken/Manifest
@@ -0,0 +1,2 @@
+DIST chicken-4.8.0.3-cve-updates.tar.bz2 218025 SHA256 3e4de410766b09706be156d8460a39a8382365470f46f2da545a577a4f986502 SHA512 2ad05fbc414fe536d94a63e4d57c98c3bb19267f99e636c2039cd2c3984778fb7f7a0765c64ed6dbe4c438c14bdc94d1f83a626191e0cb817eeca5ea1e480132 WHIRLPOOL b0c7a0280ff08e1ca66a8155e3917f6b12c4e9d9b94f2b354046d3d4cbc598d5edb43c4a210d30fda59c9a4654e95adfe7b21a0aa84ab795e46b37128235ec1e
+DIST chicken-4.8.0.3.tar.gz 3959422 SHA256 6a1414e6f35586e47d7f4470eaf1779a4f73dec664b14bebf8763dd804b399c3 SHA512 8a716953fe7eeaea9039e90c5a2abad7fbe341a580176abe870c7b78bfdd11f1291d90bb9df43334b7f7ea484695ba59eba3558b9e360e5e9bd21fa106679197 WHIRLPOOL f55ca79a7df54dce9612b444a5a6a767b9b18cb9ba48a91bb5abab799d260e6c8aef83dade54d38013f41cc4d4b8bbdcda77513d75c91ab038289c6eabcca2fb
diff --git a/dev-scheme/chicken/chicken-4.8.0.3-r1.ebuild b/dev-scheme/chicken/chicken-4.8.0.3-r1.ebuild
new file mode 100644
index 000000000000..925f2fc8445e
--- /dev/null
+++ b/dev-scheme/chicken/chicken-4.8.0.3-r1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils multilib versionator
+
+MY_PV=$(get_version_component_range 1-3)
+DESCRIPTION="Chicken is a Scheme interpreter and native Scheme to C compiler"
+HOMEPAGE="http://www.call-cc.org/"
+SRC_URI="http://code.call-cc.org/releases/${MY_PV}/${P}.tar.gz
+ mirror://gentoo/${P}-cve-updates.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 x86"
+IUSE="emacs parallel-build doc"
+
+DEPEND="sys-apps/texinfo
+ emacs? ( virtual/emacs )"
+RDEPEND="emacs? ( virtual/emacs app-emacs/scheme-complete )"
+
+src_prepare() {
+ #these patch .scm source files
+ # bug 467966
+ epatch "${FILESDIR}"/${P}-CVE-2013-2024.patch
+ # bug 469392
+ epatch "${FILESDIR}"/${P}-CVE-2013-2075_1.patch \
+ "${FILESDIR}"/${P}-CVE-2013-2075_2.patch
+ # bug 462458
+ epatch "${FILESDIR}"/${P}-CVE-2013-1874.patch
+
+ # buildsystem tries to generate .c out of patched .scm files,
+ # which fails w/o installed chicken binary
+ # touch and add precompiled .c files
+ touch ../${P}-cve-updates/*
+ mv -v ../${P}-cve-updates/* .
+
+ if use "parallel-build"
+ then
+ epatch "${FILESDIR}"/${P}-parallel-build.patch
+ fi
+
+ #Because chicken's Upstream is in the habit of using variables that
+ #portage also uses :( eg. $ARCH and $A
+ sed 's,A\(\s?=\|)\),chicken&,' -i Makefile.cross-linux-mingw \
+ defaults.make rules.make \
+ || die "sed failed"
+
+ sed "s,ARCH,zARCH," -i Makefile.bsd Makefile.cross-linux-mingw \
+ Makefile.cygwin Makefile.haiku Makefile.linux Makefile.macosx \
+ Makefile.mingw Makefile.mingw-msys Makefile.solaris \
+ defaults.make rules.make \
+ || die "sed failed"
+
+ sed "s,\$(PREFIX)/lib,\$(PREFIX)/$(get_libdir)," -i defaults.make || die "sed failed"
+ sed "s,\$(DATADIR)/doc,\$(SHAREDIR)/doc/${P}," -i defaults.make || die "sed failed"
+}
+
+src_compile() {
+ OPTIONS="PLATFORM=linux PREFIX=/usr"
+ if use "parallel-build"
+ then
+ emake ${OPTIONS} C_COMPILER_OPTIMIZATION_OPTIONS="${CFLAGS}" \
+ LINKER_OPTIONS="${LDFLAGS}" \
+ HOSTSYSTEM="${CBUILD}" || die "emake failed"
+ else
+ emake -j1 ${OPTIONS} C_COMPILER_OPTIMIZATION_OPTIONS="${CFLAGS}" \
+ LINKER_OPTIONS="${LDFLAGS}" \
+ HOSTSYSTEM="${CBUILD}" || die "emake failed"
+ fi
+}
+
+# chicken's testsuite is not runnable before install
+# upstream has been notified of the issue
+RESTRICT=test
+
+src_install() {
+ # still can't run make in parallel for the install target
+ emake -j1 ${OPTIONS} DESTDIR="${D}" HOSTSYSTEM="${CBUILD}" \
+ LINKER_OPTIONS="${LDFLAGS}" \
+ install || die
+
+ rm "${D}"/usr/share/doc/${P}/LICENSE || die
+ dodoc NEWS || die
+
+ # remove HTML documentation if the user doesn't USE=doc
+ if ! use "doc"
+ then
+ rm -rf "${D}"/usr/share/doc/${P}/manual || die
+ fi
+}
diff --git a/dev-scheme/chicken/files/50hen-gentoo.el b/dev-scheme/chicken/files/50hen-gentoo.el
new file mode 100644
index 000000000000..712b287ded9f
--- /dev/null
+++ b/dev-scheme/chicken/files/50hen-gentoo.el
@@ -0,0 +1,5 @@
+
+;;; chicken site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'hen-mode "hen" "Major mode for Chicken Scheme source." t)
diff --git a/dev-scheme/chicken/files/chicken-4.5.0-r0-ARCH-to-zARCH-hack.patch b/dev-scheme/chicken/files/chicken-4.5.0-r0-ARCH-to-zARCH-hack.patch
new file mode 100644
index 000000000000..33527cd7f4cf
--- /dev/null
+++ b/dev-scheme/chicken/files/chicken-4.5.0-r0-ARCH-to-zARCH-hack.patch
@@ -0,0 +1,210 @@
+diff -ru a//defaults.make b//defaults.make
+--- a//defaults.make 2010-05-11 18:50:35.000000000 +0300
++++ b//defaults.make 2010-06-07 21:24:55.000000000 +0300
+@@ -31,7 +31,7 @@
+ STACKDIRECTION ?= 1
+ CROSS_CHICKEN ?= 0
+
+-ifeq ($(ARCH),x86-64)
++ifeq ($(zARCH),x86-64)
+ NURSERY ?= (256*1024)
+ else
+ NURSERY ?= (128*1024)
+@@ -272,10 +272,10 @@
+ POSIXFILE ?= posixunix
+ CHICKEN_CONFIG_H = chicken-config.h
+
+-ifneq ($(ARCH),)
++ifneq ($(zARCH),)
+ HACKED_APPLY ?= 1
+-APPLY_HACK_SRC ?= apply-hack.$(ARCH)$(ASM)
+-APPLY_HACK_OBJECT ?= apply-hack.$(ARCH)$(O)
++APPLY_HACK_SRC ?= apply-hack.$(zARCH)$(ASM)
++APPLY_HACK_OBJECT ?= apply-hack.$(zARCH)$(O)
+ endif
+
+ ifeq ($(HACKED_APPLY),)
+diff -ru a//Makefile.bsd b//Makefile.bsd
+--- a//Makefile.bsd 2010-05-11 18:50:34.000000000 +0300
++++ b//Makefile.bsd 2010-06-07 21:24:25.000000000 +0300
+@@ -33,7 +33,7 @@
+
+ # platform configuration
+
+-ARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
++zARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
+
+ # options
+
+diff -ru a//Makefile.cross-linux-mingw b//Makefile.cross-linux-mingw
+--- a//Makefile.cross-linux-mingw 2010-05-11 18:50:34.000000000 +0300
++++ b//Makefile.cross-linux-mingw 2010-06-07 21:23:02.000000000 +0300
+@@ -34,7 +34,7 @@
+ # platform configuration
+
+ DLLSINPATH = 1
+-ARCH ?= x86
++zARCH ?= x86
+ HACKED_APPLY = 1
+ WINDOWS = 1
+
+@@ -72,7 +72,7 @@
+
+ # special files
+
+-APPLY_HACK_OBJECT = apply-hack.$(ARCH)$(O)
++APPLY_HACK_OBJECT = apply-hack.$(zARCH)$(O)
+ POSIXFILE = posixwin
+
+ # select default and internal settings
+diff -ru a//Makefile.cygwin b//Makefile.cygwin
+--- a//Makefile.cygwin 2010-05-11 18:50:34.000000000 +0300
++++ b//Makefile.cygwin 2010-06-07 21:24:07.000000000 +0300
+@@ -33,7 +33,7 @@
+
+ # platform configuration
+
+-ARCH ?= x86
++zARCH ?= x86
+ HACKED_APPLY ?= 1
+ DLLSINPATH = 1
+
+@@ -76,7 +76,7 @@
+ # special files
+
+ CHICKEN_CONFIG_H = chicken-config.h
+-APPLY_HACK_OBJECT = apply-hack.$(ARCH)$(O)
++APPLY_HACK_OBJECT = apply-hack.$(zARCH)$(O)
+
+ # select default and internal settings
+
+diff -ru a//Makefile.linux b//Makefile.linux
+--- a//Makefile.linux 2010-05-11 18:50:34.000000000 +0300
++++ b//Makefile.linux 2010-06-07 21:25:31.000000000 +0300
+@@ -33,7 +33,7 @@
+
+ # platform configuration
+
+-ARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
++zARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
+
+ # options
+
+diff -ru a//Makefile.macosx b//Makefile.macosx
+--- a//Makefile.macosx 2010-05-11 18:50:34.000000000 +0300
++++ b//Makefile.macosx 2010-06-07 21:23:51.000000000 +0300
+@@ -33,7 +33,7 @@
+
+ # platform configuration
+
+-ARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
++zARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
+
+ # commands
+
+@@ -64,19 +64,19 @@
+ # special files
+
+ CHICKEN_CONFIG_H = chicken-config.h
+-APPLY_HACK_OBJECT = apply-hack.$(ARCH)$(O)
++APPLY_HACK_OBJECT = apply-hack.$(zARCH)$(O)
+ HACKED_APPLY ?= 1
+
+ # architectures
+
+-ifeq ($(ARCH),x86-64)
++ifeq ($(zARCH),x86-64)
+ C_COMPILER_OPTIONS += -m64
+ LINKER_OPTIONS += -m64
+ # Avoid bus error in install_name_tool
+ LINKER_LINK_SHARED_DLOADABLE_OPTIONS += -Wl,-headerpad -Wl,128
+ else
+
+-ifeq ($(ARCH),universal)
++ifeq ($(zARCH),universal)
+ C_COMPILER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
+ LINKER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
+ endif
+@@ -126,7 +126,7 @@
+ endif
+ cat chicken-defaults.h >>$@
+
+-ifeq ($(ARCH),universal)
++ifeq ($(zARCH),universal)
+ ifneq ($(HACKED_APPLY),)
+ # We undefine HACKED_APPLY in order to override rules.make
+ # with our own build rules.
+diff -ru a//Makefile.mingw b//Makefile.mingw
+--- a//Makefile.mingw 2010-05-11 18:50:34.000000000 +0300
++++ b//Makefile.mingw 2010-06-07 21:25:59.000000000 +0300
+@@ -36,12 +36,12 @@
+ # platform configuration
+
+ DLLSINPATH = 1
+-ARCH ?= x86
++zARCH ?= x86
+ WINDOWS = 1
+ WINDOWS_SHELL = 1
+ UNAME_SYS = MinGW
+
+-ifeq ($(ARCH),x86)
++ifeq ($(zARCH),x86)
+ HACKED_APPLY ?= 1
+ else
+ HACKED_APPLY =
+@@ -79,7 +79,7 @@
+ # special files
+
+ CHICKEN_CONFIG_H = chicken-config.h
+-APPLY_HACK_OBJECT = apply-hack.$(ARCH)$(O)
++APPLY_HACK_OBJECT = apply-hack.$(zARCH)$(O)
+ POSIXFILE = posixwin
+
+ # select default and internal settings
+diff -ru a//Makefile.mingw-msys b//Makefile.mingw-msys
+--- a//Makefile.mingw-msys 2010-05-11 18:50:34.000000000 +0300
++++ b//Makefile.mingw-msys 2010-06-07 21:26:33.000000000 +0300
+@@ -34,8 +34,8 @@
+ # platform configuration
+
+ DLLSINPATH = 1
+-ARCH ?= x86
+-ifeq ($(ARCH),x86)
++zARCH ?= x86
++ifeq ($(zARCH),x86)
+ HACKED_APPLY ?= 1
+ else
+ HACKED_APPLY =
+@@ -79,7 +79,7 @@
+ # special files
+
+ CHICKEN_CONFIG_H = chicken-config.h
+-APPLY_HACK_OBJECT = apply-hack.$(ARCH)$(O)
++APPLY_HACK_OBJECT = apply-hack.$(zARCH)$(O)
+ POSIXFILE = posixwin
+
+ # select default and internal settings
+diff -ru a//Makefile.solaris b//Makefile.solaris
+--- a//Makefile.solaris 2010-05-11 18:50:34.000000000 +0300
++++ b//Makefile.solaris 2010-06-07 21:25:45.000000000 +0300
+@@ -33,7 +33,7 @@
+
+ # platform configuration
+
+-ARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
++zARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
+
+ # options
+
+diff -ru a//rules.make b//rules.make
+--- a//rules.make 2010-05-11 18:50:36.000000000 +0300
++++ b//rules.make 2010-06-07 21:26:10.000000000 +0300
+@@ -453,7 +453,7 @@
+ # assembler objects
+
+ ifneq ($(HACKED_APPLY),)
+-$(APPLY_HACK_OBJECT): $(SRCDIR)apply-hack.$(ARCH)$(ASM)
++$(APPLY_HACK_OBJECT): $(SRCDIR)apply-hack.$(zARCH)$(ASM)
+ $(ASSEMBLER) $(ASSEMBLER_OPTIONS) $(ASSEMBLER_COMPILE_OPTION) $< $(ASSEMBLER_OUTPUT)
+ endif
+
diff --git a/dev-scheme/chicken/files/chicken-4.7.3-parallel-build.patch b/dev-scheme/chicken/files/chicken-4.7.3-parallel-build.patch
new file mode 100644
index 000000000000..6d9628701481
--- /dev/null
+++ b/dev-scheme/chicken/files/chicken-4.7.3-parallel-build.patch
@@ -0,0 +1,74 @@
+diff --git a/GNUmakefile b/GNUmakefile
+index 9bc40ca..c697f14 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -49,6 +49,9 @@ STANDARD_TARGETS \
+ fullcheck libs install-target install-dev bench
+
+ .PHONY: $(STANDARD_TARGETS) dist boot-chicken
++# Build this file's targets sequentially. This avoids executing overlapping
++# makes if the user specifies multiple targets.
++.NOTPARALLEL:
+
+ $(STANDARD_TARGETS):
+ $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) CONFIG=$(CONFIG) $@
+diff --git a/README b/README
+index 8d0d067..551b716 100644
+--- a/README
++++ b/README
+@@ -72,7 +72,7 @@
+ platforms.
+
+ Note that parallel builds (using the "-j" make(1) option) are
+- *not* supported.
++ also supported. Beware that parallel install will not work though.
+
+ If you invoke "make" later with different configuration parameters,
+ it is advisable to run:
+diff --git a/rules.make b/rules.make
+index 929b0a3..a8cb9b0 100644
+--- a/rules.make
++++ b/rules.make
+@@ -243,8 +243,8 @@ lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(A): $(APPLY_HACK_OBJECT) $(LIBCHIC
+
+ # import libraries and extensions
+
+-%.so: %.o
+- $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_DLOADABLE_OPTIONS) $^ $(LINKER_OUTPUT_OPTION) $@ \
++%.so: %.o $(PRIMARY_LIBCHICKEN)
++ $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_DLOADABLE_OPTIONS) $< $(LINKER_OUTPUT_OPTION) $@ \
+ $(LINKER_LIBRARY_PREFIX)$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(LINKER_LIBRARY_SUFFIX) \
+ $(LIBRARIES)
+
+@@ -578,9 +578,9 @@ chicken-profile.c: $(SRCDIR)chicken-profile.scm
+ $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
+ chicken-install.c: $(SRCDIR)chicken-install.scm setup-download.c setup-api.c
+ $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
+-chicken-uninstall.c: $(SRCDIR)chicken-uninstall.scm
++chicken-uninstall.c: $(SRCDIR)chicken-uninstall.scm setup-api.c
+ $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
+-chicken-status.c: $(SRCDIR)chicken-status.scm
++chicken-status.c: $(SRCDIR)chicken-status.scm setup-api.c
+ $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
+ csc.c: $(SRCDIR)csc.scm
+ $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
+@@ -671,14 +671,17 @@ bench: $(CHICKEN_SHARED_EXECUTABLE) $(CSI_SHARED_EXECUTABLE) $(CSC_PROGRAM)$(EXE
+ .PHONY: boot-chicken
+
+ boot-chicken:
++ $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) CONFIG= confclean
+ $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
+ SRCDIR=$(SRCDIR) CHICKEN=$(CHICKEN) PROGRAM_SUFFIX=-boot-stage1 STATICBUILD=1 \
+ C_COMPILER_OPTIMIZATION_OPTIONS= C_HACKED_APPLY= \
+- confclean chicken-boot-stage1$(EXE)
++ chicken-boot-stage1$(EXE)
++ $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) CONFIG= touchfiles
+ $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
+ SRCDIR=$(SRCDIR) CHICKEN=`pwd`/chicken-boot-stage1$(EXE) PROGRAM_SUFFIX=-boot \
+ STATICBUILD=1 C_COMPILER_OPTIMIZATION_OPTIONS= \
+- touchfiles chicken-boot$(EXE) confclean
++ chicken-boot$(EXE)
++ $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) CONFIG= confclean
+
+ .PHONY: touchfiles
+
diff --git a/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-1874.patch b/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-1874.patch
new file mode 100644
index 000000000000..599ae61d322f
--- /dev/null
+++ b/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-1874.patch
@@ -0,0 +1,25 @@
+From http://lists.nongnu.org/archive/html/chicken-hackers/2013-03/msg00074.html
+--- chicken-4.8.0.3/csi.scm
++++ chicken-4.8.0.3/csi.scm
+@@ -1019,13 +1019,11 @@ EOF
+ (cons (cadr p) (loop (cddr p)))) ) ]
+ [else '()] ) ) )
+ (define (loadinit)
+- (let ([fn (##sys#string-append "./" init-file)])
+- (if (file-exists? fn)
+- (load fn)
+- (let* ([prefix (chop-separator (or (get-environment-variable "HOME") "."))]
+- [fn (string-append prefix "/" init-file)] )
+- (when (file-exists? fn)
+- (load fn) ) ) ) ) )
++ (and-let* ((home (get-environment-variable "HOME"))
++ ((not (string=? home ""))))
++ (let ((fn (string-append (chop-separator home) "/" init-file)))
++ (when (file-exists? fn)
++ (load fn) ) ) ) )
+ (define (evalstring str #!optional (rec (lambda _ (void))))
+ (let ((in (open-input-string str)))
+ (do ([x (read in) (read in)])
+--
+1.7.12
+
diff --git a/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2024.patch b/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2024.patch
new file mode 100644
index 000000000000..d57a4bce970a
--- /dev/null
+++ b/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2024.patch
@@ -0,0 +1,47 @@
+From http://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=commit;h=58684f69572453acc6fed7326fa9df39be98760e
+--- chicken-4.8.0.3/setup-api.scm
++++ chicken-4.8.0.3/setup-api.scm
+@@ -239,7 +239,7 @@
+ (cond ((string=? prg "csc")
+ (string-intersperse
+ (cons*
+- (shellpath (find-program "csc"))
++ (find-program "csc")
+ "-feature" "compiling-extension"
+ (if (or (deployment-mode)
+ (and (feature? #:cross-chicken)
+--- chicken-4.8.0.3/utils.scm
++++ chicken-4.8.0.3/utils.scm
+@@ -59,20 +59,18 @@
+ ;;; Quote string for shell
+
+ (define (qs str #!optional (platform (build-platform)))
+- (case platform
+- ((mingw32)
+- (string-append "\"" str "\""))
+- (else
+- (if (zero? (string-length str))
+- "''"
+- (string-concatenate
+- (map (lambda (c)
+- (if (or (char-whitespace? c)
+- (memq c '(#\# #\" #\' #\` #\ #\~ #\& #\% #\$ #\! #\* #\;
+- #\< #\> #\\ #\( #\) #\[ #\] #\{ #\} #\?)))
+- (string #\\ c)
+- (string c)))
+- (string->list str)))))))
++ (let ((delim (if (eq? platform 'mingw32) #\" #\'))
++ (escaped (if (eq? platform 'mingw32) "\"\"" "'\\''")))
++ (string-append
++ (string delim)
++ (string-concatenate
++ (map (lambda (c)
++ (cond
++ ((char=? c delim) escaped)
++ ((char=? c #\nul) (error 'qs "NUL character can not be represented in shell string" str))
++ (else (string c))))
++ (string->list str)))
++ (string delim))))
+
+
+ ;;; Compile and load file
diff --git a/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2075_1.patch b/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2075_1.patch
new file mode 100644
index 000000000000..d3de47bb6ece
--- /dev/null
+++ b/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2075_1.patch
@@ -0,0 +1,161 @@
+From 9e2022652258e8a30e5cedbf0abc9cd85a0f6af7 Mon Sep 17 00:00:00 2001
+From: Peter Bex <peter.bex@xs4all.nl>
+Date: Thu, 18 Apr 2013 00:31:08 +0200
+Subject: [PATCH] Implement file-select in terms of POSIX poll() for UNIX
+
+Signed-off-by: felix <felix@call-with-current-continuation.org>
+---
+ posixunix.scm | 116 ++++++++++++++++++++++++++------------------------------
+ 1 files changed, 54 insertions(+), 62 deletions(-)
+
+diff --git a/posixunix.scm b/posixunix.scm
+index 15cb535..90e0176 100644
+--- a/posixunix.scm
++++ b/posixunix.scm
+@@ -67,6 +67,7 @@ static C_TLS int C_wait_status;
+ #endif
+
+ #include <sys/mman.h>
++#include <sys/poll.h>
+ #include <time.h>
+
+ #ifndef O_FSYNC
+@@ -136,7 +137,6 @@ static C_TLS struct {
+ static C_TLS int C_pipefds[ 2 ];
+ static C_TLS time_t C_secs;
+ static C_TLS struct tm C_tm;
+-static C_TLS fd_set C_fd_sets[ 2 ];
+ static C_TLS struct timeval C_timeval;
+ static C_TLS char C_hostbuf[ 256 ];
+ static C_TLS struct stat C_statbuf;
+@@ -303,13 +303,6 @@ static C_TLS sigset_t C_sigset;
+ #define C_fseek(p, n, w) C_mk_nbool(fseek(C_port_file(p), C_num_to_int(n), C_unfix(w)))
+ #define C_lseek(fd, o, w) C_fix(lseek(C_unfix(fd), C_unfix(o), C_unfix(w)))
+
+-#define C_zero_fd_set(i) FD_ZERO(&C_fd_sets[ i ])
+-#define C_set_fd_set(i, fd) FD_SET(fd, &C_fd_sets[ i ])
+-#define C_test_fd_set(i, fd) FD_ISSET(fd, &C_fd_sets[ i ])
+-#define C_C_select(m) C_fix(select(C_unfix(m), &C_fd_sets[ 0 ], &C_fd_sets[ 1 ], NULL, NULL))
+-#define C_C_select_t(m, t) (C_set_timeval(t, &C_timeval), \
+- C_fix(select(C_unfix(m), &C_fd_sets[ 0 ], &C_fd_sets[ 1 ], NULL, &C_timeval)))
+-
+ #define C_ctime(n) (C_secs = (n), ctime(&C_secs))
+
+ #if defined(__SVR4) || defined(C_MACOSX)
+@@ -656,60 +649,59 @@ EOF
+
+ ;;; I/O multiplexing:
+
+-(define file-select
+- (let ([fd_zero (foreign-lambda void "C_zero_fd_set" int)]
+- [fd_set (foreign-lambda void "C_set_fd_set" int int)]
+- [fd_test (foreign-lambda bool "C_test_fd_set" int int)] )
+- (lambda (fdsr fdsw . timeout)
+- (let ([fdmax 0]
+- [tm (if (pair? timeout) (car timeout) #f)] )
+- (fd_zero 0)
+- (fd_zero 1)
+- (cond [(not fdsr)]
+- [(fixnum? fdsr)
+- (set! fdmax fdsr)
+- (fd_set 0 fdsr) ]
+- [else
+- (##sys#check-list fdsr 'file-select)
+- (for-each
+- (lambda (fd)
+- (##sys#check-exact fd 'file-select)
+- (set! fdmax (##core#inline "C_i_fixnum_max" fdmax fd))
+- (fd_set 0 fd) )
+- fdsr) ] )
+- (cond [(not fdsw)]
+- [(fixnum? fdsw)
+- (set! fdmax fdsw)
+- (fd_set 1 fdsw) ]
+- [else
+- (##sys#check-list fdsw 'file-select)
+- (for-each
+- (lambda (fd)
+- (##sys#check-exact fd 'file-select)
+- (set! fdmax (##core#inline "C_i_fixnum_max" fdmax fd))
+- (fd_set 1 fd) )
+- fdsw) ] )
+- (let ([n (cond [tm
+- (##sys#check-number tm 'file-select)
+- (##core#inline "C_C_select_t" (fx+ fdmax 1) tm) ]
+- [else (##core#inline "C_C_select" (fx+ fdmax 1))] ) ] )
+- (cond [(fx< n 0)
+- (posix-error #:file-error 'file-select "failed" fdsr fdsw) ]
+- [(fx= n 0) (values (if (pair? fdsr) '() #f) (if (pair? fdsw) '() #f))]
+- [else
+- (values
+- (and fdsr
+- (if (fixnum? fdsr)
+- (fd_test 0 fdsr)
+- (let ([lstr '()])
+- (for-each (lambda (fd) (when (fd_test 0 fd) (set! lstr (cons fd lstr)))) fdsr)
+- lstr) ) )
+- (and fdsw
+- (if (fixnum? fdsw)
+- (fd_test 1 fdsw)
+- (let ([lstw '()])
+- (for-each (lambda (fd) (when (fd_test 1 fd) (set! lstw (cons fd lstw)))) fdsw)
+- lstw) ) ) ) ] ) ) ) ) ) )
++(define (file-select fdsr fdsw . timeout)
++ (let* ((tm (if (pair? timeout) (car timeout) #f))
++ (fdsrl (cond ((not fdsr) '())
++ ((fixnum? fdsr) (list fdsr))
++ (else (##sys#check-list fdsr 'file-select)
++ fdsr)))
++ (fdswl (cond ((not fdsw) '())
++ ((fixnum? fdsw) (list fdsw))
++ (else (##sys#check-list fdsw 'file-select)
++ fdsw)))
++ (nfdsr (##sys#length fdsrl))
++ (nfdsw (##sys#length fdswl))
++ (nfds (fx+ nfdsr nfdsw))
++ (fds-blob (##sys#make-blob
++ (fx* nfds (foreign-value "sizeof(struct pollfd)" int)))))
++ (when tm (##sys#check-number tm))
++ (do ((i 0 (fx+ i 1))
++ (fdsrl fdsrl (cdr fdsrl)))
++ ((null? fdsrl))
++ ((foreign-lambda* void ((int i) (int fd) (scheme-pointer p))
++ "struct pollfd *fds = p;"
++ "fds[i].fd = fd; fds[i].events = POLLIN;") i (car fdsrl) fds-blob))
++ (do ((i nfdsr (fx+ i 1))
++ (fdswl fdswl (cdr fdswl)))
++ ((null? fdswl))
++ ((foreign-lambda* void ((int i) (int fd) (scheme-pointer p))
++ "struct pollfd *fds = p;"
++ "fds[i].fd = fd; fds[i].events = POLLOUT;") i (car fdswl) fds-blob))
++ (let ((n ((foreign-lambda int "poll" scheme-pointer int int)
++ fds-blob nfds (if tm (inexact->exact (* (max 0 tm) 1000)) -1))))
++ (cond ((fx< n 0)
++ (posix-error #:file-error 'file-select "failed" fdsr fdsw) )
++ ((fx= n 0) (values (if (pair? fdsr) '() #f) (if (pair? fdsw) '() #f)))
++ (else
++ (let ((rl (let lp ((i 0) (res '()) (fds fdsrl))
++ (cond ((null? fds) (##sys#fast-reverse res))
++ (((foreign-lambda* bool ((int i) (scheme-pointer p))
++ "struct pollfd *fds = p;"
++ "C_return(fds[i].revents & (POLLIN|POLLERR|POLLHUP|POLLNVAL));")
++ i fds-blob)
++ (lp (fx+ i 1) (cons (car fds) res) (cdr fds)))
++ (else (lp (fx+ i 1) res (cdr fds))))))
++ (wl (let lp ((i nfdsr) (res '()) (fds fdswl))
++ (cond ((null? fds) (##sys#fast-reverse res))
++ (((foreign-lambda* bool ((int i) (scheme-pointer p))
++ "struct pollfd *fds = p;"
++ "C_return(fds[i].revents & (POLLOUT|POLLERR|POLLHUP|POLLNVAL));")
++ i fds-blob)
++ (lp (fx+ i 1) (cons (car fds) res) (cdr fds)))
++ (else (lp (fx+ i 1) res (cdr fds)))))))
++ (values
++ (and fdsr (if (fixnum? fdsr) (and (memq fdsr rl) fdsr) rl))
++ (and fdsw (if (fixnum? fdsw) (and (memq fdsw wl) fdsw) wl)))))))))
+
+
+ ;;; File attribute access:
+--
+1.7.2.1
+
diff --git a/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2075_2.patch b/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2075_2.patch
new file mode 100644
index 000000000000..b85ea7c8b259
--- /dev/null
+++ b/dev-scheme/chicken/files/chicken-4.8.0.3-CVE-2013-2075_2.patch
@@ -0,0 +1,309 @@
+From http://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=commitdiff;h=556108092774086b6c86c2e27daf3f740ffec091
+
+--- chicken-4.8.0.3/chicken.h
++++ chicken-4.8.0.3/chicken.h
+@@ -1668,6 +1668,7 @@
+ C_fctexport C_word C_fcall C_read_char(C_word port) C_regparm;
+ C_fctexport C_word C_fcall C_peek_char(C_word port) C_regparm;
+ C_fctexport C_word C_fcall C_execute_shell_command(C_word string) C_regparm;
++C_fctexport int C_fcall C_check_fd_ready(int fd) C_regparm;
+ C_fctexport C_word C_fcall C_char_ready_p(C_word port) C_regparm;
+ C_fctexport C_word C_fcall C_fudge(C_word fudge_factor) C_regparm;
+ C_fctexport void C_fcall C_raise_interrupt(int reason) C_regparm;
+--- chicken-4.8.0.3/posixunix.scm
++++ chicken-4.8.0.3/posixunix.scm
+@@ -493,16 +493,7 @@
+ "if(val == -1) C_return(0);"
+ "C_return(fcntl(fd, F_SETFL, val | O_NONBLOCK) != -1);" ) )
+
+-(define ##sys#file-select-one
+- (foreign-lambda* int ([int fd])
+- "fd_set in;"
+- "struct timeval tm;"
+- "FD_ZERO(&in);"
+- "FD_SET(fd, &in);"
+- "tm.tv_sec = tm.tv_usec = 0;"
+- "if(select(fd + 1, &in, NULL, NULL, &tm) == -1) C_return(-1);"
+- "else C_return(FD_ISSET(fd, &in) ? 1 : 0);" ) )
+-
++(define ##sys#file-select-one (foreign-lambda int "C_check_fd_ready" int) )
+
+ ;;; Lo-level I/O:
+
+--- chicken-4.8.0.3/runtime.c
++++ chicken-4.8.0.3/runtime.c
+@@ -60,6 +60,11 @@
+ # define EOVERFLOW 0
+ #endif
+
++/* TODO: Include sys/select.h? Windows doesn't seem to have it... */
++#ifdef HAVE_POSIX_POLL
++# include <poll.h>
++#endif
++
+ #if !defined(C_NONUNIX)
+
+ # include <sys/types.h>
+@@ -4036,20 +4041,39 @@
+ return C_fix(n);
+ }
+
++/*
++ * TODO: Implement something for Windows that supports selecting on
++ * arbitrary fds (there, select() only works on network sockets and
++ * poll() is not available at all).
++ */
++C_regparm int C_fcall C_check_fd_ready(int fd)
++{
++#ifdef HAVE_POSIX_POLL
++ struct pollfd ps;
++ ps.fd = fd;
++ ps.events = POLLIN;
++ return poll(&ps, 1, 0);
++#else
++ fd_set in;
++ struct timeval tm;
++ int rv;
++ FD_ZERO(&in);
++ FD_SET(fd, &in);
++ tm.tv_sec = tm.tv_usec = 0;
++ rv = select(fd + 1, &in, NULL, NULL, &tm);
++ if(rv > 0) { rv = FD_ISSET(fd, &in) ? 1 : 0; }
++ return rv;
++#endif
++}
+
+ C_regparm C_word C_fcall C_char_ready_p(C_word port)
+ {
+-#if !defined(C_NONUNIX)
+- fd_set fs;
+- struct timeval to;
+- int fd = C_fileno(C_port_file(port));
+-
+- FD_ZERO(&fs);
+- FD_SET(fd, &fs);
+- to.tv_sec = to.tv_usec = 0;
+- return C_mk_bool(C_select(fd + 1, &fs, NULL, NULL, &to) == 1);
+-#else
++#if defined(C_NONUNIX)
++ /* The best we can currently do on Windows... */
+ return C_SCHEME_TRUE;
++#else
++ int fd = C_fileno(C_port_file(port));
++ return C_mk_bool(C_check_fd_ready(fd) == 1);
+ #endif
+ }
+
+--- chicken-4.8.0.3/tcp.scm
++++ chicken-4.8.0.3/tcp.scm
+@@ -46,6 +46,7 @@
+ # define fcntl(a, b, c) 0
+ # define EWOULDBLOCK 0
+ # define EINPROGRESS 0
++# define EAGAIN 0
+ # define typecorrect_getsockopt(socket, level, optname, optval, optlen) \
+ getsockopt(socket, level, optname, (char *)optval, optlen)
+ #else
+@@ -111,6 +112,7 @@
+ (define ##net#recv (foreign-lambda int "recv" int scheme-pointer int int))
+ (define ##net#shutdown (foreign-lambda int "shutdown" int int))
+ (define ##net#connect (foreign-lambda int "connect" int scheme-pointer int))
++(define ##net#check-fd-ready (foreign-lambda int "C_check_fd_ready" int))
+
+ (define ##net#send
+ (foreign-lambda*
+@@ -177,30 +179,6 @@
+ if((se = getservbyname(serv, proto)) == NULL) C_return(0);
+ else C_return(ntohs(se->s_port));") )
+
+-(define ##net#select
+- (foreign-lambda* int ((int fd))
+- "fd_set in;
+- struct timeval tm;
+- int rv;
+- FD_ZERO(&in);
+- FD_SET(fd, &in);
+- tm.tv_sec = tm.tv_usec = 0;
+- rv = select(fd + 1, &in, NULL, NULL, &tm);
+- if(rv > 0) { rv = FD_ISSET(fd, &in) ? 1 : 0; }
+- C_return(rv);") )
+-
+-(define ##net#select-write
+- (foreign-lambda* int ((int fd))
+- "fd_set out;
+- struct timeval tm;
+- int rv;
+- FD_ZERO(&out);
+- FD_SET(fd, &out);
+- tm.tv_sec = tm.tv_usec = 0;
+- rv = select(fd + 1, NULL, &out, NULL, &tm);
+- if(rv > 0) { rv = FD_ISSET(fd, &out) ? 1 : 0; }
+- C_return(rv);") )
+-
+ (define ##net#gethostaddr
+ (foreign-lambda* bool ((scheme-pointer saddr) (c-string host) (unsigned-short port))
+ "struct hostent *he = gethostbyname(host);"
+@@ -212,13 +190,6 @@
+ "addr->sin_addr = *((struct in_addr *)he->h_addr);"
+ "C_return(1);") )
+
+-(define (yield)
+- (##sys#call-with-current-continuation
+- (lambda (return)
+- (let ((ct ##sys#current-thread))
+- (##sys#setslot ct 1 (lambda () (return (##core#undefined))))
+- (##sys#schedule) ) ) ) )
+-
+ (define ##net#parse-host
+ (let ((substring substring))
+ (lambda (host proto)
+@@ -343,7 +314,9 @@
+ (outbufsize (tbs))
+ (outbuf (and outbufsize (fx> outbufsize 0) ""))
+ (tmr (tcp-read-timeout))
++ (dlr (and tmr (+ (current-milliseconds) tmr)))
+ (tmw (tcp-write-timeout))
++ (dlw (and tmw (+ (current-milliseconds) tmw)))
+ (read-input
+ (lambda ()
+ (let loop ()
+@@ -351,12 +324,11 @@
+ (cond ((eq? -1 n)
+ (cond ((or (eq? errno _ewouldblock)
+ (eq? errno _eagain))
+- (when tmr
+- (##sys#thread-block-for-timeout!
+- ##sys#current-thread
+- (+ (current-milliseconds) tmr) ) )
++ (when dlr
++ (##sys#thread-block-for-timeout!
++ ##sys#current-thread dlr) )
+ (##sys#thread-block-for-i/o! ##sys#current-thread fd #:input)
+- (yield)
++ (##sys#thread-yield!)
+ (when (##sys#slot ##sys#current-thread 13)
+ (##sys#signal-hook
+ #:network-timeout-error
+@@ -386,7 +358,7 @@
+ c) ) )
+ (lambda ()
+ (or (fx< bufindex buflen)
+- (let ((f (##net#select fd)))
++ (let ((f (##net#check-fd-ready fd)))
+ (when (eq? f -1)
+ (##sys#update-errno)
+ (##sys#signal-hook
+@@ -469,12 +441,11 @@
+ (cond ((eq? -1 n)
+ (cond ((or (eq? errno _ewouldblock)
+ (eq? errno _eagain))
+- (when tmw
++ (when dlw
+ (##sys#thread-block-for-timeout!
+- ##sys#current-thread
+- (+ (current-milliseconds) tmw) ) )
+- (##sys#thread-block-for-i/o! ##sys#current-thread fd #:output)
+- (yield)
++ ##sys#current-thread dlw) )
++ (##sys#thread-block-for-i/o! ##sys#current-thread fd #:output)
++ (##sys#thread-yield!)
+ (when (##sys#slot ##sys#current-thread 13)
+ (##sys#signal-hook
+ #:network-timeout-error
+@@ -528,38 +499,29 @@
+
+ (define (tcp-accept tcpl)
+ (##sys#check-structure tcpl 'tcp-listener)
+- (let ((fd (##sys#slot tcpl 1))
+- (tma (tcp-accept-timeout)))
++ (let* ((fd (##sys#slot tcpl 1))
++ (tma (tcp-accept-timeout))
++ (dla (and tma (+ tma (current-milliseconds)))))
+ (let loop ()
+- (if (eq? 1 (##net#select fd))
+- (let ((fd (##net#accept fd #f #f)))
+- (cond ((not (eq? -1 fd)) (##net#io-ports fd))
+- ((eq? errno _eintr)
+- (##sys#dispatch-interrupt loop))
+- (else
+- (##sys#update-errno)
+- (##sys#signal-hook
+- #:network-error
+- 'tcp-accept
+- (##sys#string-append "could not accept from listener - " strerror)
+- tcpl))))
+- (begin
+- (when tma
+- (##sys#thread-block-for-timeout!
+- ##sys#current-thread
+- (+ (current-milliseconds) tma) ) )
+- (##sys#thread-block-for-i/o! ##sys#current-thread fd #:input)
+- (yield)
+- (when (##sys#slot ##sys#current-thread 13)
+- (##sys#signal-hook
+- #:network-timeout-error
+- 'tcp-accept
+- "accept operation timed out" tma fd) )
+- (loop) ) ) ) ) )
++ (when dla
++ (##sys#thread-block-for-timeout! ##sys#current-thread dla) )
++ (##sys#thread-block-for-i/o! ##sys#current-thread fd #:input)
++ (##sys#thread-yield!)
++ (if (##sys#slot ##sys#current-thread 13)
++ (##sys#signal-hook
++ #:network-timeout-error
++ 'tcp-accept
++ "accept operation timed out" tma fd) )
++ (let ((fd (##net#accept fd #f #f)))
++ (cond ((not (eq? -1 fd)) (##net#io-ports fd))
++ ((eq? errno _eintr)
++ (##sys#dispatch-interrupt loop))
++ (else
++ (network-error 'tcp-accept "could not accept from listener" tcpl)))) ) ) )
+
+ (define (tcp-accept-ready? tcpl)
+ (##sys#check-structure tcpl 'tcp-listener 'tcp-accept-ready?)
+- (let ((f (##net#select (##sys#slot tcpl 1))))
++ (let ((f (##net#check-fd-ready (##sys#slot tcpl 1))))
+ (when (eq? -1 f)
+ (##sys#update-errno)
+ (##sys#signal-hook
+@@ -578,8 +540,9 @@
+ (define general-strerror (foreign-lambda c-string "strerror" int))
+
+ (define (tcp-connect host . more)
+- (let ((port (optional more #f))
+- (tmc (tcp-connect-timeout)))
++ (let* ((port (optional more #f))
++ (tmc (tcp-connect-timeout))
++ (dlc (and tmc (+ (current-milliseconds) tmc))))
+ (##sys#check-string host)
+ (unless port
+ (set!-values (host port) (##net#parse-host host "tcp"))
+@@ -606,23 +569,9 @@
+ (let loop ()
+ (when (eq? -1 (##net#connect s addr _sockaddr_in_size))
+ (cond ((eq? errno _einprogress)
+- (let loop2 ()
+- (let ((f (##net#select-write s)))
+- (when (eq? f -1) (fail))
+- (unless (eq? f 1)
+- (when tmc
+- (##sys#thread-block-for-timeout!
+- ##sys#current-thread
+- (+ (current-milliseconds) tmc) ) )
+- (##sys#thread-block-for-i/o! ##sys#current-thread s #:all)
+- (yield)
+- (when (##sys#slot ##sys#current-thread 13)
+- (##net#close s)
+- (##sys#signal-hook
+- #:network-timeout-error
+- 'tcp-connect
+- "connect operation timed out" tmc s) )
+- (loop2) ) ) ))
++ (when dlc
++ (##sys#thread-block-for-timeout! ##sys#current-thread dlc))
++ (##sys#thread-block-for-i/o! ##sys#current-thread s #:all))
+ ((eq? errno _eintr)
+ (##sys#dispatch-interrupt loop))
+ (else (fail) ) )))
diff --git a/dev-scheme/chicken/files/chicken-4.8.0.3-parallel-build.patch b/dev-scheme/chicken/files/chicken-4.8.0.3-parallel-build.patch
new file mode 100644
index 000000000000..a42dd2ea4c14
--- /dev/null
+++ b/dev-scheme/chicken/files/chicken-4.8.0.3-parallel-build.patch
@@ -0,0 +1,74 @@
+diff --git a/GNUmakefile b/GNUmakefile
+index 9bc40ca..c697f14 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -49,6 +49,9 @@ STANDARD_TARGETS \
+ fullcheck libs install-target install-dev bench
+
+ .PHONY: $(STANDARD_TARGETS) dist boot-chicken
++# Build this file's targets sequentially. This avoids executing overlapping
++# makes if the user specifies multiple targets.
++.NOTPARALLEL:
+
+ $(STANDARD_TARGETS):
+ $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) CONFIG=$(CONFIG) $@
+diff --git a/README b/README
+index 8d0d067..551b716 100644
+--- a/README
++++ b/README
+@@ -72,7 +72,7 @@
+ platforms.
+
+ Note that parallel builds (using the "-j" make(1) option) are
+- *not* supported.
++ also supported. Beware that parallel install will not work though.
+
+ If you invoke "make" later with different configuration parameters,
+ it is advisable to run:
+diff --git a/rules.make b/rules.make
+index 929b0a3..a8cb9b0 100644
+--- a/rules.make
++++ b/rules.make
+@@ -243,8 +243,8 @@ lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(A): $(APPLY_HACK_OBJECT) $(LIBCHIC
+
+ # import libraries and extensions
+
+-%.so: %.o
+- $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_DLOADABLE_OPTIONS) $^ $(LINKER_OUTPUT_OPTION) $@ \
++%.so: %.o $(PRIMARY_LIBCHICKEN)
++ $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_DLOADABLE_OPTIONS) $< $(LINKER_OUTPUT_OPTION) $@ \
+ $(LINKER_LIBRARY_PREFIX)$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(LINKER_LIBRARY_SUFFIX) \
+ $(LIBRARIES)
+
+@@ -582,9 +582,9 @@ chicken-profile.c: $(SRCDIR)chicken-profile.scm
+ $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
+ chicken-install.c: $(SRCDIR)chicken-install.scm setup-download.c setup-api.c
+ $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
+-chicken-uninstall.c: $(SRCDIR)chicken-uninstall.scm
++chicken-uninstall.c: $(SRCDIR)chicken-uninstall.scm setup-api.c
+ $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
+-chicken-status.c: $(SRCDIR)chicken-status.scm
++chicken-status.c: $(SRCDIR)chicken-status.scm setup-api.c
+ $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
+ csc.c: $(SRCDIR)csc.scm
+ $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
+@@ -675,14 +675,17 @@ bench: $(CHICKEN_SHARED_EXECUTABLE) $(CSI_SHARED_EXECUTABLE) $(CSC_PROGRAM)$(EXE
+ .PHONY: boot-chicken
+
+ boot-chicken:
++ $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) CONFIG= confclean
+ $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
+ CHICKEN=$(CHICKEN) PROGRAM_SUFFIX=-boot-stage1 STATICBUILD=1 \
+ C_COMPILER_OPTIMIZATION_OPTIONS= C_HACKED_APPLY= BUILDING_CHICKEN_BOOT=1 \
+- confclean chicken-boot-stage1$(EXE)
++ chicken-boot-stage1$(EXE)
++ $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) CONFIG= touchfiles
+ $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
+ CHICKEN=.$(SEP)chicken-boot-stage1$(EXE) PROGRAM_SUFFIX=-boot \
+ STATICBUILD=1 C_COMPILER_OPTIMIZATION_OPTIONS= \
+- touchfiles chicken-boot$(EXE) confclean
++ chicken-boot$(EXE)
++ $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) CONFIG= confclean
+
+ .PHONY: touchfiles
+
diff --git a/dev-scheme/chicken/metadata.xml b/dev-scheme/chicken/metadata.xml
new file mode 100644
index 000000000000..cc5af33bd39b
--- /dev/null
+++ b/dev-scheme/chicken/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>scheme</herd>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>ewfalor@gmail.com</email>
+ <name>Erik Falor</name>
+</maintainer>
+<maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+</maintainer>
+<longdescription>
+CHICKEN is a compiler for the Scheme programming language. CHICKEN produces
+portable, efficient C, supports almost all of the current Scheme language
+standard, the Revised5 Report on the Algorithmic Language Scheme (R5RS ), and
+includes many enhancements and extensions. CHICKEN runs on MacOS X, Windows, and
+many Unix flavours.
+</longdescription>
+<use>
+ <flag name="parallel-build">Enable testing parallel build mode added in
+ 4.7.3 version. Can still be not working</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-scheme/elk/Manifest b/dev-scheme/elk/Manifest
new file mode 100644
index 000000000000..7ba640f33fc6
--- /dev/null
+++ b/dev-scheme/elk/Manifest
@@ -0,0 +1 @@
+DIST elk-3.99.8.tar.bz2 701206 SHA256 a148320c8d2c2b1277ad3572a9d8a9eb4db0473643caa35f098e28c9da14dc66 SHA512 dd966bf6063b4e04c0947e56381cc9456ea81cf4ec66d04e80cb79485d39414f0b713520278a62fa4630068f245f33b28b08b5fd4a7defd0bcb20bf2eba4ed49 WHIRLPOOL 3b8f6a26277ebe5c2e4ad2420b7e842b125bde1406120e89db5a25c770e70dd015a300289432e15e541d588fef451233c72ce7236a93cdf653430933c09a18bc
diff --git a/dev-scheme/elk/elk-3.99.8.ebuild b/dev-scheme/elk/elk-3.99.8.ebuild
new file mode 100644
index 000000000000..ca3d86f3c3a0
--- /dev/null
+++ b/dev-scheme/elk/elk-3.99.8.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Scheme implementation designed to be embeddable extension to C/C++ applications"
+HOMEPAGE="http://sam.zoy.org/elk"
+SRC_URI="http://sam.zoy.org/elk/${P}.tar.bz2"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+
+src_compile() {
+ # parallel build is broken
+ emake -j1 || die "Make failed!"
+}
+
+# tests are run automatically during make and fail with default src_test
+src_test() {
+ echo "Tests already run during compile"
+}
+
+src_install() {
+ # parallel install is broken
+ emake -j1 DESTDIR="${D}" install || die "Install failed"
+}
diff --git a/dev-scheme/elk/metadata.xml b/dev-scheme/elk/metadata.xml
new file mode 100644
index 000000000000..e0b1703b04fa
--- /dev/null
+++ b/dev-scheme/elk/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <maintainer>
+ <email>hkBst@gentoo.org</email>
+ <name>Marijn Schouten</name>
+ </maintainer>
+ <longdescription lang="en">
+Elk is an implementation of the Scheme programming language. In contrast to existing, stand-alone Scheme systems Elk has been designed specifically as an embeddable, reusable extension language subsystem for applications written in C or C++.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-scheme/escm/Manifest b/dev-scheme/escm/Manifest
new file mode 100644
index 000000000000..09a1644f0b32
--- /dev/null
+++ b/dev-scheme/escm/Manifest
@@ -0,0 +1 @@
+DIST escm-1.1.tar.gz 22344 SHA256 8e125d5b0a0ea9b170d135c54035993da85025070ac1249d5ebe17064eb66e91 SHA512 7df97d8b9e7c4b46b412e3dd24a2b0b3f4028d45b1940d12b09f0801c93ab1868ef5c239d8f1bfb18d5c86f473aa543d9b735eb1f05b4bb3e4b17177d2ed9102 WHIRLPOOL 50f43a5f2122c7c61ff84fa333ae1d5f68d7560a8559f8cfd1d9b53feedeb917f6127d15ebfec201a57ca596b5cda87f8089c55cb8b342b1fe09f434c3d573ee
diff --git a/dev-scheme/escm/escm-1.1.ebuild b/dev-scheme/escm/escm-1.1.ebuild
new file mode 100644
index 000000000000..9a200222e320
--- /dev/null
+++ b/dev-scheme/escm/escm-1.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="escm - Embedded Scheme Processor"
+HOMEPAGE="http://practical-scheme.net/vault/escm.html"
+SRC_URI="http://practical-scheme.net/vault/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+RDEPEND="|| (
+ dev-scheme/gauche
+ dev-scheme/guile
+ )"
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ sed -i -e "6s/scm, snow/scm gosh, gosh/" configure.in
+ eautoconf
+ tc-export CC
+}
+
+src_install() {
+ dobin escm
+ doman escm.1
+ dodoc ChangeLog escm.html
+}
diff --git a/dev-scheme/escm/metadata.xml b/dev-scheme/escm/metadata.xml
new file mode 100644
index 000000000000..d4a08224d284
--- /dev/null
+++ b/dev-scheme/escm/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-scheme/gambit/Manifest b/dev-scheme/gambit/Manifest
new file mode 100644
index 000000000000..9532c818602e
--- /dev/null
+++ b/dev-scheme/gambit/Manifest
@@ -0,0 +1,7 @@
+DIST gambc-v4_6_2.tgz 10463697 SHA256 2e6c2b9597050212376a2544c0e810da5ea26151b8c1e2894381c3664832e8e5 SHA512 53a27011a5a8831b784cdb347509f2e357d46aede01d50a249f90bd237c7aaf273a077b9d014a8c314eae8833d60a2e3a59546b51a03551778942a65d5962d2a WHIRLPOOL 6962d23ccf3c0831cb89b77bc02ac10f9dd3267d60b8c935fe8b9ce4f747d5aaf2ef5cfd494fd85ab175687124e7a152f3ebdf3eb2b42b0d5e94cff1d0786d3d
+DIST gambc-v4_6_3.tgz 10661300 SHA256 66cbc805484898bcadeab9921d8bcdb07d536dd401c57ff92edb461d7230ff81 SHA512 717c5bda1fadb8b3f9e44f3649bd0b16d88868ddfdc0672ddcc2112bda6c2fff250a7a6bd1dd3d26fa7e29afdf05001b8d2a49a8ae377d4c8bc4119fdec1dcb3 WHIRLPOOL 8cfd21a1e99b309685ac7a699665cadb13f767f038fe3c1898484e9caf8ca4983d4d809e771ec138ae1cfe53ec893891d2357087f2591ecc91cb5b8f265a06e3
+DIST gambc-v4_6_4.tgz 10694646 SHA256 6bbe7af0ca410a85716c27d29ded0cc207904e9d9d1a8012db50537d5dd1a5f9 SHA512 1364dd6ee52828899fe7ea99f2eaf66b7e2fbe9a9d81cfc774b2d823a342030b6642b209a2b2d90ae4d87e96c629111dfa243f3188c19ea00ff30f82ae2eab82 WHIRLPOOL b6f0e7276b22496a847e214d420589dd7a5fedba339aaddf56856e4618a81ae53b88d28de321f1c60ff4c6f9eff8c415a2fc8e2d40c875e980e60843157f6b98
+DIST gambc-v4_6_5.tgz 10699787 SHA256 54de513a78f0fb1841ef1411b8f2d64a2bd6810cee7554fe408b0ba79ff00910 SHA512 c665eb90065f5effed88426fb280d2adcf249eeea5a89ffcd49941f0daf9db74d0ebd36206151b1d43cc161ae93b7b4da04ccc036de86c3eac7a91505e8b263e WHIRLPOOL 33b6fd11df9bcc04ea6b0efe36992c35269e74a9fef9547a75d8fcf4c95b63618f996f8ccdab4ccb3446c343a8a44d9a22f14b9bbbc7375c05b1bcc70c16b6b4
+DIST gambc-v4_6_7.tgz 11080117 SHA256 8a27d78586f73eff2798dcef0b634559433042adc4124c0d878cfbbf4db4e336 SHA512 4784c07d10795715ef940ebe361ce2f18aae4415a530c86d41c8f23b56be54cb23e4f7f6307044120541aeccca371b8897ee3f1105ab02e34b8273e0c95511ac WHIRLPOOL 6ff8b7d65240c1bbb3a7a0d1b1b3e7ec10a09eb0291d47ae523409cd2f986e36148ce87897e60c6c302990ac0dd33ea1be0ffff2ca203e995a2d1b33f463fe59
+DIST gambc-v4_6_9.tgz 11073013 SHA256 5190f477eb91c60017b4ccff2fe72e6874431591a808ee3c4c1754aeef4324e9 SHA512 9bf9be9c65bdff3579e78df94284deda09d8cd1db7ed23f78b3acd4f5d5d5867208758ed57add1820906a21ed2d7880361c594afc28bce494057c7e090892d16 WHIRLPOOL d594dfff7355966d847d1720b5f1a5d57354da77c4c498542feebaf1c721bae5e8a85e56378ebc5068667bf2c541741f5e439ece97a2f943b5f5615f6d7319cd
+DIST gambc-v4_7_0.tgz 11074266 SHA256 2b03ecef89da2a53212dc3e6583ee4175d91a0752779e1758bcab5d09e9d1e63 SHA512 566d7131507fb493acd039d2fbeb40a6a2263372d05f6ed809b7ce8b28fa432b7c3e0054ee1f0c280ff43a0516596776ffa7914b6bbe40f1c66c5f5b909754ff WHIRLPOOL 836e93b6ba4e1d97d8155f390a995e79c6d34396f4694ecc70b6e463dab3d7aa3491e97789aa02d8b5edc26303bd7f3abec0f1aca8ac327ddbe9366deb68dbed
diff --git a/dev-scheme/gambit/files/50gambit-gentoo.el b/dev-scheme/gambit/files/50gambit-gentoo.el
new file mode 100644
index 000000000000..2e8e196ba04d
--- /dev/null
+++ b/dev-scheme/gambit/files/50gambit-gentoo.el
@@ -0,0 +1,10 @@
+
+;;; gambit site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'gambit-inferior-mode "gambit" "Hook Gambit mode into cmuscheme.")
+(autoload 'gambit-mode "gambit" "Hook Gambit mode into scheme.")
+
+;; (add-hook 'inferior-scheme-mode-hook (function gambit-inferior-mode))
+;; (add-hook 'scheme-mode-hook (function gambit-mode))
+;; (setq scheme-program-name "gsi -:t")
diff --git a/dev-scheme/gambit/gambit-4.6.2.ebuild b/dev-scheme/gambit/gambit-4.6.2.ebuild
new file mode 100644
index 000000000000..8213418c6bdf
--- /dev/null
+++ b/dev-scheme/gambit/gambit-4.6.2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils elisp-common
+
+MY_PN=gambc
+MY_PV=${PV//./_}
+MY_P=${MY_PN}-v${MY_PV}
+
+DESCRIPTION="Gambit-C is a native Scheme to C compiler and interpreter"
+HOMEPAGE="http://www.iro.umontreal.ca/~gambit/"
+SRC_URI="http://www.iro.umontreal.ca/~gambit/download/gambit/v${PV%.*}/source/${MY_P}.tgz"
+
+LICENSE="|| ( Apache-2.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND=""
+
+SITEFILE="50gambit-gentoo.el"
+
+S=${WORKDIR}/${MY_P} #-devel
+
+IUSE="emacs static"
+
+src_configure() {
+ econf $(use_enable !static shared) --docdir="${EPREFIX}"/usr/share/doc/${PF} --enable-single-host --disable-absolute-shared-libs
+}
+
+src_compile() {
+ emake bootstrap || die
+
+ if use emacs; then
+ elisp-compile misc/*.el || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/gambit/gambit-4.6.3.ebuild b/dev-scheme/gambit/gambit-4.6.3.ebuild
new file mode 100644
index 000000000000..8213418c6bdf
--- /dev/null
+++ b/dev-scheme/gambit/gambit-4.6.3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils elisp-common
+
+MY_PN=gambc
+MY_PV=${PV//./_}
+MY_P=${MY_PN}-v${MY_PV}
+
+DESCRIPTION="Gambit-C is a native Scheme to C compiler and interpreter"
+HOMEPAGE="http://www.iro.umontreal.ca/~gambit/"
+SRC_URI="http://www.iro.umontreal.ca/~gambit/download/gambit/v${PV%.*}/source/${MY_P}.tgz"
+
+LICENSE="|| ( Apache-2.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND=""
+
+SITEFILE="50gambit-gentoo.el"
+
+S=${WORKDIR}/${MY_P} #-devel
+
+IUSE="emacs static"
+
+src_configure() {
+ econf $(use_enable !static shared) --docdir="${EPREFIX}"/usr/share/doc/${PF} --enable-single-host --disable-absolute-shared-libs
+}
+
+src_compile() {
+ emake bootstrap || die
+
+ if use emacs; then
+ elisp-compile misc/*.el || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/gambit/gambit-4.6.4.ebuild b/dev-scheme/gambit/gambit-4.6.4.ebuild
new file mode 100644
index 000000000000..8213418c6bdf
--- /dev/null
+++ b/dev-scheme/gambit/gambit-4.6.4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils elisp-common
+
+MY_PN=gambc
+MY_PV=${PV//./_}
+MY_P=${MY_PN}-v${MY_PV}
+
+DESCRIPTION="Gambit-C is a native Scheme to C compiler and interpreter"
+HOMEPAGE="http://www.iro.umontreal.ca/~gambit/"
+SRC_URI="http://www.iro.umontreal.ca/~gambit/download/gambit/v${PV%.*}/source/${MY_P}.tgz"
+
+LICENSE="|| ( Apache-2.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND=""
+
+SITEFILE="50gambit-gentoo.el"
+
+S=${WORKDIR}/${MY_P} #-devel
+
+IUSE="emacs static"
+
+src_configure() {
+ econf $(use_enable !static shared) --docdir="${EPREFIX}"/usr/share/doc/${PF} --enable-single-host --disable-absolute-shared-libs
+}
+
+src_compile() {
+ emake bootstrap || die
+
+ if use emacs; then
+ elisp-compile misc/*.el || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/gambit/gambit-4.6.5.ebuild b/dev-scheme/gambit/gambit-4.6.5.ebuild
new file mode 100644
index 000000000000..8213418c6bdf
--- /dev/null
+++ b/dev-scheme/gambit/gambit-4.6.5.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils elisp-common
+
+MY_PN=gambc
+MY_PV=${PV//./_}
+MY_P=${MY_PN}-v${MY_PV}
+
+DESCRIPTION="Gambit-C is a native Scheme to C compiler and interpreter"
+HOMEPAGE="http://www.iro.umontreal.ca/~gambit/"
+SRC_URI="http://www.iro.umontreal.ca/~gambit/download/gambit/v${PV%.*}/source/${MY_P}.tgz"
+
+LICENSE="|| ( Apache-2.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND=""
+
+SITEFILE="50gambit-gentoo.el"
+
+S=${WORKDIR}/${MY_P} #-devel
+
+IUSE="emacs static"
+
+src_configure() {
+ econf $(use_enable !static shared) --docdir="${EPREFIX}"/usr/share/doc/${PF} --enable-single-host --disable-absolute-shared-libs
+}
+
+src_compile() {
+ emake bootstrap || die
+
+ if use emacs; then
+ elisp-compile misc/*.el || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/gambit/gambit-4.6.7.ebuild b/dev-scheme/gambit/gambit-4.6.7.ebuild
new file mode 100644
index 000000000000..8213418c6bdf
--- /dev/null
+++ b/dev-scheme/gambit/gambit-4.6.7.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils elisp-common
+
+MY_PN=gambc
+MY_PV=${PV//./_}
+MY_P=${MY_PN}-v${MY_PV}
+
+DESCRIPTION="Gambit-C is a native Scheme to C compiler and interpreter"
+HOMEPAGE="http://www.iro.umontreal.ca/~gambit/"
+SRC_URI="http://www.iro.umontreal.ca/~gambit/download/gambit/v${PV%.*}/source/${MY_P}.tgz"
+
+LICENSE="|| ( Apache-2.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND=""
+
+SITEFILE="50gambit-gentoo.el"
+
+S=${WORKDIR}/${MY_P} #-devel
+
+IUSE="emacs static"
+
+src_configure() {
+ econf $(use_enable !static shared) --docdir="${EPREFIX}"/usr/share/doc/${PF} --enable-single-host --disable-absolute-shared-libs
+}
+
+src_compile() {
+ emake bootstrap || die
+
+ if use emacs; then
+ elisp-compile misc/*.el || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/gambit/gambit-4.6.9.ebuild b/dev-scheme/gambit/gambit-4.6.9.ebuild
new file mode 100644
index 000000000000..8213418c6bdf
--- /dev/null
+++ b/dev-scheme/gambit/gambit-4.6.9.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils elisp-common
+
+MY_PN=gambc
+MY_PV=${PV//./_}
+MY_P=${MY_PN}-v${MY_PV}
+
+DESCRIPTION="Gambit-C is a native Scheme to C compiler and interpreter"
+HOMEPAGE="http://www.iro.umontreal.ca/~gambit/"
+SRC_URI="http://www.iro.umontreal.ca/~gambit/download/gambit/v${PV%.*}/source/${MY_P}.tgz"
+
+LICENSE="|| ( Apache-2.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND=""
+
+SITEFILE="50gambit-gentoo.el"
+
+S=${WORKDIR}/${MY_P} #-devel
+
+IUSE="emacs static"
+
+src_configure() {
+ econf $(use_enable !static shared) --docdir="${EPREFIX}"/usr/share/doc/${PF} --enable-single-host --disable-absolute-shared-libs
+}
+
+src_compile() {
+ emake bootstrap || die
+
+ if use emacs; then
+ elisp-compile misc/*.el || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/gambit/gambit-4.7.0.ebuild b/dev-scheme/gambit/gambit-4.7.0.ebuild
new file mode 100644
index 000000000000..8213418c6bdf
--- /dev/null
+++ b/dev-scheme/gambit/gambit-4.7.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils elisp-common
+
+MY_PN=gambc
+MY_PV=${PV//./_}
+MY_P=${MY_PN}-v${MY_PV}
+
+DESCRIPTION="Gambit-C is a native Scheme to C compiler and interpreter"
+HOMEPAGE="http://www.iro.umontreal.ca/~gambit/"
+SRC_URI="http://www.iro.umontreal.ca/~gambit/download/gambit/v${PV%.*}/source/${MY_P}.tgz"
+
+LICENSE="|| ( Apache-2.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND=""
+
+SITEFILE="50gambit-gentoo.el"
+
+S=${WORKDIR}/${MY_P} #-devel
+
+IUSE="emacs static"
+
+src_configure() {
+ econf $(use_enable !static shared) --docdir="${EPREFIX}"/usr/share/doc/${PF} --enable-single-host --disable-absolute-shared-libs
+}
+
+src_compile() {
+ emake bootstrap || die
+
+ if use emacs; then
+ elisp-compile misc/*.el || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/gambit/metadata.xml b/dev-scheme/gambit/metadata.xml
new file mode 100644
index 000000000000..6dc936ce2d1c
--- /dev/null
+++ b/dev-scheme/gambit/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>scheme</herd>
+</pkgmetadata>
diff --git a/dev-scheme/gauche-cdb/Manifest b/dev-scheme/gauche-cdb/Manifest
new file mode 100644
index 000000000000..a379d4cbbe47
--- /dev/null
+++ b/dev-scheme/gauche-cdb/Manifest
@@ -0,0 +1 @@
+DIST Gauche-cdb-0.3.1.tar.gz 72048 SHA256 2c050a10e0ab6ee67a6fcb8538bbe7ad7ab11b567b4bc15f921c3f13bbf8f842 SHA512 c02629de9e96c561da0a928e2817056da27951a5ad988b7d105cc24aedd6d103001bf9dd4ae28c1729d701850d937a3134361c2ad83a4e1e51d565a95e8f1a68 WHIRLPOOL f408df4e876c602cb105eb3befcb1073ea4c12b002c47c03b7f6ee8d3b5a01e28e529159ace2dd1e32cd5508d9ac70c785bc22b3ff23656c46d9ea5310263c0c
diff --git a/dev-scheme/gauche-cdb/files/gauche-cdb-0.3.1-gauche-package.diff b/dev-scheme/gauche-cdb/files/gauche-cdb-0.3.1-gauche-package.diff
new file mode 100644
index 000000000000..ae093062243d
--- /dev/null
+++ b/dev-scheme/gauche-cdb/files/gauche-cdb-0.3.1-gauche-package.diff
@@ -0,0 +1,133 @@
+--- Gauche-cdb-0.3.1.orig/Makefile.in
++++ Gauche-cdb-0.3.1/Makefile.in
+@@ -10,76 +10,57 @@
+ VPATH = $(srcdir)
+
+ # These may be overridden by make invocators
+-DESTDIR =
+-OPTFLAGS = @OPTFLAGS@
+-CC = @CC@
+-LIBS = @LIBS@
+-CFLAGS = @CFLAGS@
+-CPPFLAGS = @CPPFLAGS@ # AC_LIB_LINKFLAGS adds to this..
+-LDFLAGS = @LDFLAGS@
+-INSTALL = @INSTALL@
+-INSTALL_TYPE = @INSTALL_TYPE@
+-
+-# Set by configure
+-GOSH = @GOSH@
+-GAUCHE_CONFIG = @GAUCHE_CONFIG@
++DESTDIR =
++CPPFLAGS = @CPPFLAGS@ # AC_LIB_LINKFLAGS adds to this..
++GOSH = "@GOSH@"
++GAUCHE_CONFIG = "@GAUCHE_CONFIG@"
++GAUCHE_PACKAGE = "@GAUCHE_PACKAGE@"
++INSTALL = "@GAUCHE_INSTALL@"
++
++# Other parameters
++SOEXT = @SOEXT@
+ OBJEXT = @OBJEXT@
+-DSOEXT = @SOEXT@
++EXEEXT = @EXEEXT@
+
+-MODULE = cdb
++# Module-specific stuff
++PACKAGE = cdb
+
+-ARCHFILES = $(MODULE).$(DSOEXT)
+-SCMFILES = $(MODULE).scm
++ARCHFILES = $(PACKAGE).$(SOEXT)
++SCMFILES = $(PACKAGE).scm
+ HEADERS =
+
+ TARGET = $(ARCHFILES)
+-OBJS = $(MODULE)_head.$(OBJEXT) \
+- cdb.$(OBJEXT) \
+- $(MODULE)_tail.$(OBJEXT)
+-GENERATED = cdb.c $(MODULE)_head.c $(MODULE)_tail.c
++GENERATED =
+ CONFIG_GENERATED = Makefile config.cache config.log config.status \
+- configure.lineno autom4te*.cache
+-
+-HEADER_INSTALL_DIR = $(DESTDIR)/`$(GAUCHE_CONFIG) --$(INSTALL_TYPE)incdir`
+-SCM_INSTALL_DIR = $(DESTDIR)/`$(GAUCHE_CONFIG) --$(INSTALL_TYPE)libdir`/dbm
+-ARCH_INSTALL_DIR = $(DESTDIR)/`$(GAUCHE_CONFIG) --$(INSTALL_TYPE)archdir`
+-
+-all : $(TARGET)
+-
+-.SUFFIXES: .o .stub
++ configure.lineno autom4te*.cache @PACKAGE_NAME@.gpd
+
+-.c.o:
+- $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
++HEADER_INSTALL_DIR = "$(DESTDIR)`$(GAUCHE_CONFIG) --siteincdir`"
++SCM_INSTALL_DIR = "$(DESTDIR)`$(GAUCHE_CONFIG) --sitelibdir`"
++ARCH_INSTALL_DIR = "$(DESTDIR)`$(GAUCHE_CONFIG) --sitearchdir`"
+
+-.stub.c:
+- $(GOSH) genstub $<
++cdb_SRCS = cdb.stub
++cdb_LIBS = @LIBCDB@
+
+-$(MODULE).$(DSOEXT): $(OBJS)
+- $(CC) -Wl,-rpath -Wl,`gauche-config --sysarchdir` $(LDFLAGS) $(MODULE).$(DSOEXT) $(OBJS) $(LIBS) @LIBCDB@
++all : $(TARGET)
+
+-$(MODULE)_head.c $(MODULE)_tail.c :
+- $(GAUCHE_CONFIG) --fixup-extension $(MODULE)
++$(PACKAGE).$(SOEXT): $(cdb_SRCS)
++ $(GAUCHE_PACKAGE) compile --verbose \
++ --libs="$(cdb_LIBS)" --cppflags="$(CPPFLAGS)" \
++ $(PACKAGE) $(cdb_SRCS)
+
+ check : all
+ @rm -f test.log
+ $(GOSH) -I. test.scm > test.log
+
+ install : all
+- if test ! -z "$(HEADERS)"; then \
+- $(INSTALL) -d $(HEADER_INSTALL_DIR); \
+- $(INSTALL) -m 444 $(HEADERS) $(HEADER_INSTALL_DIR); \
+- fi
+- if test ! -z "$(SCMFILES)"; then \
+- $(INSTALL) -d $(SCM_INSTALL_DIR); \
+- $(INSTALL) -m 444 $(SCMFILES) $(SCM_INSTALL_DIR); \
+- fi
+- if test ! -z "$(ARCHFILES)"; then \
+- $(INSTALL) -d $(ARCH_INSTALL_DIR); \
+- $(INSTALL) -m 555 $(ARCHFILES) $(ARCH_INSTALL_DIR); \
+- fi
++ $(INSTALL) -m 444 -T $(HEADER_INSTALL_DIR) $(HEADERS)
++ $(INSTALL) -m 444 -T $(SCM_INSTALL_DIR)/dbm $(SCMFILES)
++ $(INSTALL) -m 555 -T $(ARCH_INSTALL_DIR) $(ARCHFILES)
++ $(INSTALL) -m 444 -T $(SCM_INSTALL_DIR)/.packages @PACKAGE_NAME@.gpd
+
+ clean :
+- rm -rf core $(TARGET) $(OBJS) $(GENERATED) *~ test.log so_locations
++ $(GAUCHE_PACKAGE) compile --clean $(PACKAGE) $(cdb_SRCS)
++ rm -rf core $(TARGET) $(GENERATED) *~ test.log so_locations
+
+ distclean : clean
+ rm -rf $(CONFIG_GENERATED)
+--- Gauche-cdb-0.3.1.orig/configure.ac
++++ Gauche-cdb-0.3.1/configure.ac
+@@ -4,18 +4,11 @@
+ AC_INIT(Gauche-cdb, 0.3.1)
+ AC_CONFIG_SRCDIR(cdb.stub)
+
+-AC_CANONICAL_SYSTEM
+-
+ AC_GAUCHE_INIT_EXT
+-AC_GAUCHE_INSTALL_TYPE(site)
+ AC_GAUCHE_CC
+-AC_GAUCHE_FLAGS
+-
+-AC_PROG_INSTALL
+
+ AC_LIB_LINKFLAGS(cdb)
+
+-AC_GAUCHE_FIX_LIBS
+-
++AC_GAUCHE_MAKE_GPD
+ echo $PACKAGE_VERSION > VERSION
+ AC_OUTPUT(Makefile)
diff --git a/dev-scheme/gauche-cdb/files/gauche-cdb-0.3.1-undefined-reference.diff b/dev-scheme/gauche-cdb/files/gauche-cdb-0.3.1-undefined-reference.diff
new file mode 100644
index 000000000000..b63a68ddbda2
--- /dev/null
+++ b/dev-scheme/gauche-cdb/files/gauche-cdb-0.3.1-undefined-reference.diff
@@ -0,0 +1,22 @@
+--- Gauche-cdb-0.3.1.orig/cdb.scm
++++ Gauche-cdb-0.3.1/cdb.scm
+@@ -60,7 +60,7 @@
+ (unless (slot-bound? self 'path)
+ (error "path must be set to open cdb database"))
+ (when (cdb-file-of self)
+- (errorf "cdb ~S already opened" cdb))
++ (errorf "cdb ~s already opened" (cdb-file-of self)))
+ (let ((path (slot-ref self 'path))
+ (rwmode (slot-ref self 'rw-mode)))
+ (case rwmode
+--- Gauche-cdb-0.3.1.orig/cdb.stub
++++ Gauche-cdb-0.3.1/cdb.stub
+@@ -69,7 +69,7 @@
+
+ static void cdb_finalize(ScmObj obj, void *data)
+ {
+- ScmCdb *cdb = SCM_CDB(cdb);
++ ScmCdb *cdb = SCM_CDB(obj);
+ switch (cdb->status) {
+ case OPEN_QUERY:
+ cdb_free(&cdb->cdb); close(cdb_fileno(&cdb->cdb));
diff --git a/dev-scheme/gauche-cdb/gauche-cdb-0.3.1-r1.ebuild b/dev-scheme/gauche-cdb/gauche-cdb-0.3.1-r1.ebuild
new file mode 100644
index 000000000000..ba55ab658594
--- /dev/null
+++ b/dev-scheme/gauche-cdb/gauche-cdb-0.3.1-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+MY_P="${P/g/G}"
+
+DESCRIPTION="CDB binding for Gauche"
+HOMEPAGE="http://sourceforge.jp/projects/gauche/"
+SRC_URI="mirror://sourceforge.jp/gauche/8407/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="ia64 x86"
+IUSE=""
+
+RDEPEND="dev-scheme/gauche
+ dev-db/tinycdb"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gauche-package.diff
+ epatch "${FILESDIR}"/${P}-undefined-reference.diff
+ eautoreconf
+}
diff --git a/dev-scheme/gauche-cdb/metadata.xml b/dev-scheme/gauche-cdb/metadata.xml
new file mode 100644
index 000000000000..825695838606
--- /dev/null
+++ b/dev-scheme/gauche-cdb/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge-jp">gauche</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/gauche-gl/Manifest b/dev-scheme/gauche-gl/Manifest
new file mode 100644
index 000000000000..ededbd07bbd6
--- /dev/null
+++ b/dev-scheme/gauche-gl/Manifest
@@ -0,0 +1,2 @@
+DIST Gauche-gl-0.5.1.tgz 1161233 SHA256 7f17f1d31afba83d374f31e49f025149dcec271b4d56279cd0f871b814176c68 SHA512 7b3834e46e4789f6dcd6a2e01b2d5cfc8fa29aa69c5969e8bb9d9e2af9fe4f82af23a5f13677f27e8ae7ba63855f833dfcdac6f285a0c56041d0eaef48c8a94b WHIRLPOOL ca0751304f2ec30793ca91c2f5e4c08e730621177ca852f263f3f92b4efa1d237fd8df2ce10a03184699dfab78b0274964e5fb2bc08bd8bf8ad8a6d77d8142e6
+DIST Gauche-gl-0.6.tgz 1369790 SHA256 cea07a8ff82056a980f6f626f43ab36dbf05ed8057f570bb3a4c6abf5ba6d297 SHA512 60f763ba832048f9932cabd2e8ce8595ba2a1f0b86f1212b1f6919d6b9b8ba33ed1076f119e53059ceac7f6e46a6ead3ba0e23cce81af3097355cd97b3b4b673 WHIRLPOOL d33dca7fc3641b1e50f13f14393fe4f5cf56364514b93a192c888ef68e49a34cd1fd7c98f40840aa2b51eca1c5cfeb6e1ccb177ff59369b2cab46f586cea8006
diff --git a/dev-scheme/gauche-gl/files/gauche-gl-0.6-simple.viewer.diff b/dev-scheme/gauche-gl/files/gauche-gl-0.6-simple.viewer.diff
new file mode 100644
index 000000000000..1f5cf8ecacf2
--- /dev/null
+++ b/dev-scheme/gauche-gl/files/gauche-gl-0.6-simple.viewer.diff
@@ -0,0 +1,25 @@
+From 723309ac3e7aa031e2ebd6c9b059d94e42006de3 Mon Sep 17 00:00:00 2001
+From: Shiro Kawai <shiro@acm.org>
+Date: Sat, 9 Aug 2014 22:19:04 -1000
+Subject: [PATCH] Fix incorrect macro definition
+
+---
+ lib/gl/simple/viewer.scm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gl/simple/viewer.scm b/lib/gl/simple/viewer.scm
+index 857b8d7..9a464ce 100644
+--- a/lib/gl/simple/viewer.scm
++++ b/lib/gl/simple/viewer.scm
+@@ -381,7 +381,7 @@
+ (match opts
+ [() (set! default3-var proc)]
+ [(':perspective) (set! default3-var proc)]
+- [(':orthographic) (set! default3-var proc)]
++ [(':orthographic) (set! default2-var proc)]
+ [(name)
+ (cond [(name->window name) => (^[win] (ref win'closure) 'key proc)]
+ [else
+--
+2.0.3
+
diff --git a/dev-scheme/gauche-gl/gauche-gl-0.5.1.ebuild b/dev-scheme/gauche-gl/gauche-gl-0.5.1.ebuild
new file mode 100644
index 000000000000..14215b85d0a2
--- /dev/null
+++ b/dev-scheme/gauche-gl/gauche-gl-0.5.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+MY_P="${P^g}"
+
+DESCRIPTION="OpenGL binding for Gauche"
+HOMEPAGE="http://practical-scheme.net/gauche/"
+SRC_URI="mirror://sourceforge/gauche/${MY_P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~ppc x86"
+IUSE="cg examples"
+
+RDEPEND=">=dev-scheme/gauche-0.9.2
+ virtual/opengl
+ media-libs/freeglut
+ cg? ( media-gfx/nvidia-cg-toolkit )"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ econf $(usex cg --enable-cg "")
+}
+
+src_install() {
+ default
+
+ if use examples; then
+ docompress -x /usr/share/doc/${PF}/examples
+ docinto examples
+ dodoc examples/*.scm
+ # install simple
+ dodoc -r examples/simple
+ # install glbook
+ dodoc -r examples/glbook
+ dodoc -r examples/images
+ # install slbook
+ dodoc -r examples/slbook
+ # install cg examples
+ use cg && dodoc -r examples/cg
+ fi
+}
diff --git a/dev-scheme/gauche-gl/gauche-gl-0.6.ebuild b/dev-scheme/gauche-gl/gauche-gl-0.6.ebuild
new file mode 100644
index 000000000000..45b7fe38815d
--- /dev/null
+++ b/dev-scheme/gauche-gl/gauche-gl-0.6.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+MY_P="${P^g}"
+
+DESCRIPTION="OpenGL binding for Gauche"
+HOMEPAGE="http://practical-scheme.net/gauche/"
+SRC_URI="mirror://sourceforge/gauche/${MY_P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="cg examples"
+
+RDEPEND=">=dev-scheme/gauche-0.9.4
+ virtual/opengl
+ media-libs/freeglut
+ cg? ( media-gfx/nvidia-cg-toolkit )"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-simple.viewer.diff
+}
+
+src_configure() {
+ econf $(usex cg --enable-cg "")
+}
+
+src_install() {
+ default
+
+ if use examples; then
+ docompress -x /usr/share/doc/${PF}/examples
+ docinto examples
+ dodoc examples/*.scm
+ # install simple
+ dodoc -r examples/simple
+ # install glbook
+ dodoc -r examples/glbook
+ dodoc -r examples/images
+ # install slbook
+ dodoc -r examples/slbook
+ # install cg examples
+ use cg && dodoc -r examples/cg
+ fi
+}
diff --git a/dev-scheme/gauche-gl/metadata.xml b/dev-scheme/gauche-gl/metadata.xml
new file mode 100644
index 000000000000..c8e8ddd9ad13
--- /dev/null
+++ b/dev-scheme/gauche-gl/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ OpenGL binding of Gauche
+ </longdescription>
+ <use>
+ <flag name="cg">Enable NVidia Cg binding</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gauche</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/gauche-gtk/Manifest b/dev-scheme/gauche-gtk/Manifest
new file mode 100644
index 000000000000..fdb3ea507b10
--- /dev/null
+++ b/dev-scheme/gauche-gtk/Manifest
@@ -0,0 +1 @@
+DIST Gauche-gtk-0.6_pre1.tar.gz 203261 SHA256 cfe38221217519d3e6fe9bca6168938abe4801ec1a79a73f2f1b441cdc47dc0b
diff --git a/dev-scheme/gauche-gtk/files/gauche-gtk-0.4.1-gtk+-2.8.diff b/dev-scheme/gauche-gtk/files/gauche-gtk-0.4.1-gtk+-2.8.diff
new file mode 100644
index 000000000000..9734da949518
--- /dev/null
+++ b/dev-scheme/gauche-gtk/files/gauche-gtk-0.4.1-gtk+-2.8.diff
@@ -0,0 +1,23 @@
+diff -urN Gauche-gtk-0.4.1.orig/src/gtktexttag.stub Gauche-gtk-0.4.1/src/gtktexttag.stub
+--- Gauche-gtk-0.4.1.orig/src/gtktexttag.stub 2004-06-27 12:59:26.000000000 +0900
++++ Gauche-gtk-0.4.1/src/gtktexttag.stub 2006-10-30 17:53:25.039657000 +0900
+@@ -36,7 +36,6 @@
+ (language-set :type <uint>)
+ (pad1 :type <uint>)
+ (pad2 :type <uint>)
+- (pad3 :type <uint>)
+ )
+ (allocator (c "Scm_GtkObjectAllocate"))
+ )
+diff -urN Gauche-gtk-0.4.1.orig/src/gtktoolbar.stub Gauche-gtk-0.4.1/src/gtktoolbar.stub
+--- Gauche-gtk-0.4.1.orig/src/gtktoolbar.stub 2004-06-27 12:59:26.000000000 +0900
++++ Gauche-gtk-0.4.1/src/gtktoolbar.stub 2006-10-30 18:16:32.889657000 +0900
+@@ -51,8 +51,6 @@
+ (tooltips :type <gtk-tooltips>)
+ (button-maxw :type <int>)
+ (button-maxh :type <int>)
+- (style-set-connection :type <uint>)
+- (icon-size-connection :type <uint>)
+ (style-set :type <uint>)
+ (icon-size-set :type <uint>)
+ )
diff --git a/dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff b/dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff
new file mode 100644
index 000000000000..be54ee550ba7
--- /dev/null
+++ b/dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff
@@ -0,0 +1,71 @@
+--- a/src/gtk-lib.hints
++++ b/src/gtk-lib.hints
+@@ -527,8 +527,10 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));"
+ (add-mixin! "Scm_GtkEditableClass" "Scm_GtkCellEditableClass"))
+
+ ;; we can't free the return value of gtk_entry_get_text.
+-(define-cproc gtk-entry-get-text (entry::<gtk-entry>)
+- "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_entry_get_text(entry)));")
++(define-cproc-fix gtk-entry-get-text
++ (fix-arguments! '(entry::<gtk-entry>))
++ (fix-body!
++ "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_entry_get_text(entry)));"))
+
+ ;;==================================================================
+ ;; gtkfilesel.h
+@@ -539,8 +541,10 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));"
+ ;; gtk_file_selection_get_filename returns mbstr encoded by the current
+ ;; locale. We canonicalize it to utf8. The Scheme glue code converts
+ ;; it to Gauche's internal encoding.
+-(define-cproc gtk-file-selection-get-filename (sel::<gtk-file-selection>)
+- "const gchar *fn_mb = gtk_file_selection_get_filename(sel);
++(define-cproc-fix gtk-file-selection-get-filename
++ (fix-arguments! '(sel::<gtk-file-selection>))
++ (fix-body!
++ "const gchar *fn_mb = gtk_file_selection_get_filename(sel);
+ gchar *fn_utf8 = g_filename_to_utf8(fn_mb, -1, NULL, NULL, NULL);
+ if (fn_utf8 == NULL) {
+ Scm_Error(\"got a filename including multibyte chars which can't be converted to UTF8: %s\", fn_mb);
+@@ -549,7 +553,7 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));"
+ SCM_RETURN(SCM_MAKE_STR_COPYING(fn_utf8));
+ #else
+ SCM_RETURN(Scm_MakeString(fn_utf8, -1, -1, SCM_MAKSTR_COPYING|SCM_MAKSTR_INCOMPLETE));
+-#endif")
++#endif"))
+
+ (define-cproc gtk-file-selection-get-selections (sel::<gtk-file-selection>)
+ "gchar **fns_mb = gtk_file_selection_get_selections(sel);
+@@ -609,10 +613,14 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));"
+ (input-file "gtklabel.h")
+
+ ;; Memory is owned by the widget so we don't need to free them.
+-(define-cproc gtk-label-get-text (label::<gtk-label>)
+- "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_text(label)));")
+-(define-cproc gtk-label-get-label (label::<gtk-label>)
+- "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_label(label)));")
++(define-cproc-fix gtk-label-get-text
++ (fix-arguments! '(label::<gtk-label>))
++ (fix-body!
++ "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_text(label)));"))
++(define-cproc-fix gtk-label-get-label
++ (fix-arguments! '(label::<gtk-label>))
++ (fix-body!
++ "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_label(label)));"))
+
+ (define-cproc-fix gtk-label-get-seleciton-bounds
+ (fix-arguments! '(label::<gtk-label>))
+@@ -1121,9 +1129,11 @@ return SCM_MAKE_STR_COPYING((char*)string);"))
+
+ (input-file "gtkprogressbar.h")
+
+-(define-cproc gtk-progress-bar-get-text (pbar::<gtk-progress-bar>)
+- "gchar *g = gtk_progress_bar_get_text(pbar);
+- SCM_RETURN(SCM_MAKE_STR_COPYING_SAFELY(g));")
++(define-cproc-fix gtk-progress-bar-get-text
++ (fix-arguments! '(pbar::<gtk-progress-bar>))
++ (fix-body!
++ "gchar *g = gtk_progress_bar_get_text(pbar);
++ SCM_RETURN(SCM_MAKE_STR_COPYING_SAFELY(g));"))
+
+ ;;==================================================================
+ ;; gtkradiobutton
diff --git a/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff b/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff
new file mode 100644
index 000000000000..081c83df1fe5
--- /dev/null
+++ b/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff
@@ -0,0 +1,11 @@
+--- a/lib/h2s/parse.scm
++++ b/lib/h2s/parse.scm
+@@ -329,6 +329,8 @@
+ (#/^\}\s*([\w_]+)/ (#f name) (make-enum name (reverse enums))) ; ----->
+ ;; empty line:
+ (#/^\s*$/ () (loop (read-line) enums))
++ ;; preprocessor directive:
++ (#/^\s*#\s*\w+/ () (loop (read-line) enums))
+ ;;
+ (test has-comment? (skip-comment line (cut loop <> enums) err-eof)) ; what if?: new_value, /* boring comment*/
+ (#/\s+([\w_]+),?/ (#f enum)
diff --git a/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff b/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff
new file mode 100644
index 000000000000..9e8bbcf6e72d
--- /dev/null
+++ b/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff
@@ -0,0 +1,23 @@
+--- a/src/h2s-gtk.scm
++++ b/src/h2s-gtk.scm
+@@ -50,6 +50,11 @@
+ (define pango-directory
+ (find-header-dir #`"pango-,|pango-version|/pango/pango.h"
+ *header-search-paths*))
++(define gdk-pixbuf-directory
++ (guard (e [(<error> e)
++ gtk-directory])
++ (find-header-dir #`"gdk-pixbuf-,|gtk-version|/gdk-pixbuf/gdk-pixbuf.h"
++ *header-search-paths* )))
+
+
+ (define (parse-gdk)
+@@ -64,7 +69,7 @@
+ (call-with-input-file "PANGOFILES" port->string-list)))
+
+ (define (parse-gdk-pixbuf)
+- (parse-headers #`",|gtk-directory|/gdk-pixbuf"
++ (parse-headers #`",|gdk-pixbuf-directory|/gdk-pixbuf"
+ (call-with-input-file "GDKPIXBUFFILES" port->string-list)))
+
+ ;; defaults for the gauche-gtk package:
diff --git a/dev-scheme/gauche-gtk/gauche-gtk-0.6_pre1.ebuild b/dev-scheme/gauche-gtk/gauche-gtk-0.6_pre1.ebuild
new file mode 100644
index 000000000000..f5fc57aba157
--- /dev/null
+++ b/dev-scheme/gauche-gtk/gauche-gtk-0.6_pre1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+MY_P="${P/g/G}"
+MY_PN="${PN/g/G}2"
+PV_COMMIT="598828842a339a44c32ab8c16f5f9a77f3c1c799"
+
+DESCRIPTION="GTK2 binding for Gauche"
+HOMEPAGE="http://practical-scheme.net/gauche/"
+SRC_URI="https://github.com/shirok/${MY_PN}/tarball/${PV_COMMIT} -> ${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~ppc x86"
+IUSE="examples glgd nls opengl"
+RESTRICT="test"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+RDEPEND="x11-libs/gtk+:2
+ dev-scheme/gauche
+ opengl? (
+ x11-libs/gtkglext
+ dev-scheme/gauche-gl
+ )"
+S="${WORKDIR}/shirok-${MY_PN}-${PV_COMMIT:0:7}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-h2s-gdk-pixbuf.diff
+ epatch "${FILESDIR}"/${PN}-gtk-lib.hints.diff
+ epatch "${FILESDIR}"/${PN}-h2s-cpp.diff
+ eautoconf
+}
+
+src_configure() {
+ local myconf
+ if use opengl; then
+ if use glgd; then
+ myconf="--enable-glgd"
+ if use nls; then
+ myconf="${myconf}-pango"
+ fi
+ else
+ myconf="--enable-gtkgl"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ emake stubs
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog README
+
+ if use examples; then
+ docompress -x /usr/share/doc/${PF}/examples
+ docinto examples
+ dodoc examples/*.scm
+ # install gtk-tutorial
+ docinto examples/gtk-tutorial
+ dodoc examples/gtk-tutorial/*
+ if use opengl; then
+ # install gtkglext
+ dodoc -r examples/gtkglext
+ if use glgd; then
+ # install glgd
+ dodoc -r examples/glgd
+ fi
+ fi
+ fi
+}
diff --git a/dev-scheme/gauche-gtk/metadata.xml b/dev-scheme/gauche-gtk/metadata.xml
new file mode 100644
index 000000000000..decd5434e1a4
--- /dev/null
+++ b/dev-scheme/gauche-gtk/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Gauche extension module to use GTK.
+ </longdescription>
+ <use>
+ <flag name="glgd">Enable GL graph draw</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">shirok/Gauche-gtk2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/gauche-kakasi/Manifest b/dev-scheme/gauche-kakasi/Manifest
new file mode 100644
index 000000000000..b04a55f65da2
--- /dev/null
+++ b/dev-scheme/gauche-kakasi/Manifest
@@ -0,0 +1 @@
+DIST Gauche-kakasi-0.1.tgz 56568 SHA256 4d73dbfb5fe52de2580e4833edab439e6a2c0f98b75cf81d9acb450e1b3ac9e3
diff --git a/dev-scheme/gauche-kakasi/gauche-kakasi-0.1.ebuild b/dev-scheme/gauche-kakasi/gauche-kakasi-0.1.ebuild
new file mode 100644
index 000000000000..c5c763f49009
--- /dev/null
+++ b/dev-scheme/gauche-kakasi/gauche-kakasi-0.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+IUSE=""
+
+MY_P="${P/g/G}"
+
+DESCRIPTION="Kakasi binding for Gauche"
+HOMEPAGE="http://gauche.sf.net/"
+SRC_URI="mirror://sourceforge/gauche/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+KEYWORDS="x86"
+SLOT="0"
+S="${WORKDIR}/${MY_P}"
+
+DEPEND=">=dev-scheme/gauche-0.8
+ >=app-i18n/kakasi-2.3.4"
+
+src_compile() {
+
+ econf || die
+ emake || die
+
+}
+
+src_install() {
+
+ make DESTDIR=${D} install || die
+
+ dodoc AUTHORS ChangeLog README*
+
+}
diff --git a/dev-scheme/gauche-kakasi/metadata.xml b/dev-scheme/gauche-kakasi/metadata.xml
new file mode 100644
index 000000000000..789f65c08f6b
--- /dev/null
+++ b/dev-scheme/gauche-kakasi/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">gauche</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/gauche-qdbm/Manifest b/dev-scheme/gauche-qdbm/Manifest
new file mode 100644
index 000000000000..656bf886bb59
--- /dev/null
+++ b/dev-scheme/gauche-qdbm/Manifest
@@ -0,0 +1 @@
+DIST Gauche-qdbm-0.2.tar.gz 73311 SHA256 457957e079c562151c4b82484e716b4749b77e64a5212ecc74db10e928426359 SHA512 9286d22f1ad32f213c34670ca0a3fef4d43da8d7e0bed019cd5891400eb7337cd3adfb7cc788350e1f1ab535b87af0fa0a6096d33fa73da6049888ce0006e821 WHIRLPOOL 0f201b3a624200cc37bd741c5f9f522428cf8793c87f6cdda6f874f99f3624554c4deaa0eb078da827ed39dee69f62613984d104da644abd611962d7a4e48fce
diff --git a/dev-scheme/gauche-qdbm/files/gauche-qdbm-0.2-gauche-package.diff b/dev-scheme/gauche-qdbm/files/gauche-qdbm-0.2-gauche-package.diff
new file mode 100644
index 000000000000..a4e305600423
--- /dev/null
+++ b/dev-scheme/gauche-qdbm/files/gauche-qdbm-0.2-gauche-package.diff
@@ -0,0 +1,136 @@
+--- Gauche-qdbm-0.2.orig/Makefile.in
++++ Gauche-qdbm-0.2/Makefile.in
+@@ -10,79 +10,57 @@
+ VPATH = $(srcdir)
+
+ # These may be overridden by make invocators
+-DESTDIR =
+-OPTFLAGS = @OPTFLAGS@
+-CC = @CC@
+-LIBS = @LIBS@
+-CFLAGS = @CFLAGS@
+-CPPFLAGS = @CPPFLAGS@ # AC_LIB_LINKFLAGS adds to this..
+-LDFLAGS = @LDFLAGS@
+-INSTALL = @INSTALL@
+-INSTALL_TYPE = @INSTALL_TYPE@
+-
+-# Set by configure
+-GOSH = @GOSH@
+-GAUCHE_CONFIG = @GAUCHE_CONFIG@
++DESTDIR =
++CPPFLAGS = @CPPFLAGS@ # AC_LIB_LINKFLAGS adds to this..
++GOSH = "@GOSH@"
++GAUCHE_CONFIG = "@GAUCHE_CONFIG@"
++GAUCHE_PACKAGE = "@GAUCHE_PACKAGE@"
++INSTALL = "@GAUCHE_INSTALL@"
++
++# Other parameters
++SOEXT = @SOEXT@
+ OBJEXT = @OBJEXT@
+-DSOEXT = @SOEXT@
++EXEEXT = @EXEEXT@
+
+-MODULE = qdbm
++# Module-specific stuff
++PACKAGE = qdbm
+
+-ARCHFILES = $(MODULE).$(DSOEXT)
+-SCMFILES = $(MODULE).scm
++ARCHFILES = $(PACKAGE).$(SOEXT)
++SCMFILES = $(PACKAGE).scm
+ HEADERS =
+
+ TARGET = $(ARCHFILES)
+-OBJS = $(MODULE)_head.$(OBJEXT) \
+- qdbm.$(OBJEXT) \
+- depot.$(OBJEXT) \
+- $(MODULE)_tail.$(OBJEXT)
+-GENERATED = depot.c $(MODULE)_head.c $(MODULE)_tail.c
++GENERATED =
+ CONFIG_GENERATED = Makefile config.cache config.log config.status \
+- configure.lineno autom4te*.cache
+-
+-HEADER_INSTALL_DIR = $(DESTDIR)/`$(GAUCHE_CONFIG) --$(INSTALL_TYPE)incdir`
+-SCM_INSTALL_DIR = $(DESTDIR)/`$(GAUCHE_CONFIG) --$(INSTALL_TYPE)libdir`/dbm
+-ARCH_INSTALL_DIR = $(DESTDIR)/`$(GAUCHE_CONFIG) --$(INSTALL_TYPE)archdir`
+-
+-all : $(TARGET)
++ configure.lineno autom4te*.cache @PACKAGE_NAME@.gpd
+
+-.SUFFIXES: .o .stub
++HEADER_INSTALL_DIR = "$(DESTDIR)`$(GAUCHE_CONFIG) --siteincdir`"
++SCM_INSTALL_DIR = "$(DESTDIR)`$(GAUCHE_CONFIG) --sitelibdir`"
++ARCH_INSTALL_DIR = "$(DESTDIR)`$(GAUCHE_CONFIG) --sitearchdir`"
+
+-.c.o:
+- $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
++qdbm_SRCS = qdbm.c depot.stub
++qdbm_LIBS = @LIBQDBM@
+
+-.stub.c:
+- $(GOSH) genstub $<
+-
+-depot.c : depot.stub
+-
+-$(MODULE).$(DSOEXT): $(OBJS)
+- $(CC) -Wl,-rpath -Wl,`gauche-config --sysarchdir` $(LDFLAGS) $(MODULE).$(DSOEXT) $(OBJS) $(LIBS) @LIBQDBM@
++all : $(TARGET)
+
+-$(MODULE)_head.c $(MODULE)_tail.c :
+- $(GAUCHE_CONFIG) --fixup-extension $(MODULE)
++$(PACKAGE).$(SOEXT): $(qdbm_SRCS)
++ $(GAUCHE_PACKAGE) compile --verbose \
++ --libs="$(qdbm_LIBS)" --cppflags="$(CPPFLAGS)" \
++ $(PACKAGE) $(qdbm_SRCS)
+
+ check : all
+ @rm -f test.log
+ $(GOSH) -I. test.scm > test.log
+
+ install : all
+- if test ! -z "$(HEADERS)"; then \
+- $(INSTALL) -d $(HEADER_INSTALL_DIR); \
+- $(INSTALL) -m 444 $(HEADERS) $(HEADER_INSTALL_DIR); \
+- fi
+- if test ! -z "$(SCMFILES)"; then \
+- $(INSTALL) -d $(SCM_INSTALL_DIR); \
+- $(INSTALL) -m 444 $(SCMFILES) $(SCM_INSTALL_DIR); \
+- fi
+- if test ! -z "$(ARCHFILES)"; then \
+- $(INSTALL) -d $(ARCH_INSTALL_DIR); \
+- $(INSTALL) -m 555 $(ARCHFILES) $(ARCH_INSTALL_DIR); \
+- fi
++ $(INSTALL) -m 444 -T $(HEADER_INSTALL_DIR) $(HEADERS)
++ $(INSTALL) -m 444 -T $(SCM_INSTALL_DIR)/dbm $(SCMFILES)
++ $(INSTALL) -m 555 -T $(ARCH_INSTALL_DIR) $(ARCHFILES)
++ $(INSTALL) -m 444 -T $(SCM_INSTALL_DIR)/.packages @PACKAGE_NAME@.gpd
+
+ clean :
+- rm -rf core $(TARGET) $(OBJS) $(GENERATED) *~ test.log so_locations
++ $(GAUCHE_PACKAGE) compile --clean $(PACKAGE) $(qdbm_SRCS)
++ rm -rf core $(TARGET) $(GENERATED) *~ test.log so_locations
+
+ distclean : clean
+ rm -rf $(CONFIG_GENERATED)
+--- Gauche-qdbm-0.2.orig/configure.ac
++++ Gauche-qdbm-0.2/configure.ac
+@@ -4,18 +4,11 @@
+ AC_INIT(Gauche-qdbm, 0.2)
+ AC_CONFIG_SRCDIR(qdbm.c)
+
+-AC_CANONICAL_SYSTEM
+-
+ AC_GAUCHE_INIT_EXT
+-AC_GAUCHE_INSTALL_TYPE(site)
+ AC_GAUCHE_CC
+-AC_GAUCHE_FLAGS
+-
+-AC_PROG_INSTALL
+
+ AC_LIB_LINKFLAGS(qdbm)
+
+-AC_GAUCHE_FIX_LIBS
+-
++AC_GAUCHE_MAKE_GPD
+ echo $PACKAGE_VERSION > VERSION
+ AC_OUTPUT(Makefile)
diff --git a/dev-scheme/gauche-qdbm/files/gauche-qdbm-0.2-undefined-reference.diff b/dev-scheme/gauche-qdbm/files/gauche-qdbm-0.2-undefined-reference.diff
new file mode 100644
index 000000000000..d6a6efb99b4f
--- /dev/null
+++ b/dev-scheme/gauche-qdbm/files/gauche-qdbm-0.2-undefined-reference.diff
@@ -0,0 +1,11 @@
+--- Gauche-qdbm-0.2.orig/qdbm.scm
++++ Gauche-qdbm-0.2/qdbm.scm
+@@ -72,7 +72,7 @@
+ (unless (slot-bound? self 'path)
+ (error "path must be set to open qdbm database"))
+ (when (qdbm-file-of self)
+- (errorf "qdbm ~S already opened" qdbm))
++ (errorf "qdbm ~s already opened" (qdbm-file-of self)))
+ (let* ((path (slot-ref self 'path))
+ (rwmode (slot-ref self 'rw-mode))
+ (omode (case rwmode
diff --git a/dev-scheme/gauche-qdbm/gauche-qdbm-0.2-r1.ebuild b/dev-scheme/gauche-qdbm/gauche-qdbm-0.2-r1.ebuild
new file mode 100644
index 000000000000..9ac0719a8b6d
--- /dev/null
+++ b/dev-scheme/gauche-qdbm/gauche-qdbm-0.2-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+MY_P="${P/g/G}"
+
+DESCRIPTION="QDBM binding for Gauche"
+HOMEPAGE="http://sourceforge.jp/projects/gauche/"
+SRC_URI="mirror://sourceforge.jp/gauche/6988/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~sparc x86"
+IUSE=""
+
+RDEPEND="dev-scheme/gauche
+ dev-db/qdbm"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gauche-package.diff
+ epatch "${FILESDIR}"/${P}-undefined-reference.diff
+ eautoreconf
+}
diff --git a/dev-scheme/gauche-qdbm/metadata.xml b/dev-scheme/gauche-qdbm/metadata.xml
new file mode 100644
index 000000000000..825695838606
--- /dev/null
+++ b/dev-scheme/gauche-qdbm/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge-jp">gauche</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/gauche/Manifest b/dev-scheme/gauche/Manifest
new file mode 100644
index 000000000000..678633dcfd99
--- /dev/null
+++ b/dev-scheme/gauche/Manifest
@@ -0,0 +1,2 @@
+DIST Gauche-0.9.3.3.tgz 5042189 SHA256 3d8b70075faa0f7a24f8d112cc102ee3e1066680cdd19d324d59f33fab79caac
+DIST Gauche-0.9.4.tgz 5601987 SHA256 7b18bcd70beaced1e004594be46c8cff95795318f6f5830dd2a8a700410fc149 SHA512 815e719d78950a31c238fd7879e09f40d6b3a83a3ebf9d5f7cd3cc7ada081e5f20fbc6b432900e3455bc59e5e60014bf77605b8c9c5f27def53f89284b9cfca3 WHIRLPOOL 354ef81913c6f617589590299f616a50dc1e1313e00d61f0918c9b6c20c0358878cd505f3fb02efa4615730380a6db6bd790e241871fde6cd6e11a662efb113c
diff --git a/dev-scheme/gauche/files/gauche-0.9.3.3-gauche.threads.diff b/dev-scheme/gauche/files/gauche-0.9.3.3-gauche.threads.diff
new file mode 100644
index 000000000000..a44ee75b8d1a
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9.3.3-gauche.threads.diff
@@ -0,0 +1,120 @@
+commit 60d82dd56c15a533562cf28111af5d3365d5d354
+Author: Shiro Kawai <shiro@acm.org>
+Date: Thu May 31 15:23:22 2012 -1000
+
+ Fixed thread-terminate! bug that SEGVs when applied on non-running threads
+
+--- a/ext/threads/test.scm
++++ b/ext/threads/test.scm
+@@ -100,6 +100,18 @@
+ (thread-terminate! t1)
+ (thread-join! t1))))
+
++;; this SEGVs on 0.9.3.3. test code from @cryks.
++(test* "thread termination before running" 'terminated
++ (let1 t1 (make-thread (^[] #f))
++ (thread-terminate! t1)
++ (thread-state t1)))
++
++(test* "thread termination while being stopped" 'terminated
++ (let1 t1 (thread-start! (make-thread (^[] (let loop () (loop)))))
++ (thread-stop! t1)
++ (thread-terminate! t1)
++ (thread-state t1)))
++
+ ;;---------------------------------------------------------------------
+ (test-section "thread and error")
+
+--- a/ext/threads/threads.c
++++ b/ext/threads/threads.c
+@@ -432,36 +432,41 @@ ScmObj Scm_ThreadTerminate(ScmVM *target)
+ }
+
+ (void)SCM_INTERNAL_MUTEX_LOCK(target->vmlock);
+- do {
+- /* This ensures only the first call of thread-terminate! on a thread
+- is in effect. */
+- if (target->canceller == NULL) {
+- target->canceller = vm;
+-
+- /* First try */
+- target->stopRequest = SCM_VM_REQUEST_TERMINATE;
+- target->attentionRequest = TRUE;
+- if (wait_for_termination(target)) break;
+-
+- /* Second try */
++ if (target->state == SCM_VM_RUNNABLE || target->state == SCM_VM_STOPPED) {
++ do {
++ /* This ensures only the first call of thread-terminate! on a
++ thread is in effect. */
++ if (target->canceller == NULL) {
++ target->canceller = vm;
++
++ /* First try */
++ target->stopRequest = SCM_VM_REQUEST_TERMINATE;
++ target->attentionRequest = TRUE;
++ if (wait_for_termination(target)) break;
++
++ /* Second try */
++ SCM_ASSERT(target->thread);
+ #if defined(GAUCHE_USE_PTHREADS)
+ # if defined(GAUCHE_PTHREAD_SIGNAL)
+- pthread_kill(target->thread, GAUCHE_PTHREAD_SIGNAL);
++ pthread_kill(target->thread, GAUCHE_PTHREAD_SIGNAL);
+ # endif /*defined(GAUCHE_PTHREAD_SIGNAL)*/
+ #elif defined(GAUCHE_USE_WTHREADS)
+- /* TODO: implement signal mechanism using an event */
++ /* TODO: implement signal mechanism using an event */
+ #endif /* defined(GAUCHE_USE_WTHREADS) */
+- if (wait_for_termination(target)) break;
++ if (wait_for_termination(target)) break;
+
+- /* Last resort */
+- thread_cleanup_inner(target);
++ /* Last resort */
++ thread_cleanup_inner(target);
+ #if defined(GAUCHE_USE_PTHREADS)
+- pthread_cancel(target->thread);
++ pthread_cancel(target->thread);
+ #elif defined(GAUCHE_USE_WTHREADS)
+- TerminateThread(target->thread, 0);
++ TerminateThread(target->thread, 0);
+ #endif
+- }
+- } while (0);
++ }
++ } while (0);
++ }
++ /* target either is terminated or hasn't been run */
++ target->state = SCM_VM_TERMINATED;
+ (void)SCM_INTERNAL_MUTEX_UNLOCK(target->vmlock);
+ return SCM_UNDEFINED;
+ }
+--- a/test/control.scm
++++ b/test/control.scm
+@@ -72,7 +72,7 @@
+ ;;
+
+ (cond-expand
+- [gauche.sys.pthreads
++ [gauche.sys.threads
+ (test-section "control.thread-pool")
+ (use control.thread-pool)
+ (test-module 'control.thread-pool)
+@@ -173,7 +173,15 @@
+ (let1 xjob (add-job! pool work)
+ (terminate-all! pool :force-timeout 0.05)
+ (job-status xjob))))
+- ]
++
++ ;; This SEGVs on 0.9.3.3 (test code by @cryks)
++ (test* "thread pool termination" 'terminated
++ (let ([t (thread-start! (make-thread (cut undefined)))]
++ [pool (make-thread-pool 10)])
++ (terminate-all! pool)
++ (thread-terminate! t)
++ (thread-state t)))
++ ] ; gauche.sys.pthreads
+ [else])
+
+ (test-end)
diff --git a/dev-scheme/gauche/files/gauche-ext-ldflags.diff b/dev-scheme/gauche/files/gauche-ext-ldflags.diff
new file mode 100644
index 000000000000..a9de4114d2bf
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-ext-ldflags.diff
@@ -0,0 +1,11 @@
+--- Gauche-0.9.1.orig/ext/Makefile.ext.in
++++ Gauche-0.9.1/ext/Makefile.ext.in
+@@ -22,7 +22,7 @@
+ LIBS = $(XLIBS) @LIBS@
+ CFLAGS = @CFLAGS@ @SHLIB_SO_CFLAGS@ $(XCFLAGS)
+ CPPFLAGS = @CPPFLAGS@ $(XCPPFLAGS)
+-LDFLAGS = $(LOCAL_LFLAGS) $(XLDFLAGS) @SHLIB_SO_LDFLAGS@
++LDFLAGS = $(LOCAL_LFLAGS) $(XLDFLAGS) @LDFLAGS@ @SHLIB_SO_LDFLAGS@
+
+ # These are set by configure
+ DEFS = @DEFS@
diff --git a/dev-scheme/gauche/files/gauche-gauche.m4.diff b/dev-scheme/gauche/files/gauche-gauche.m4.diff
new file mode 100644
index 000000000000..8c4d3180836a
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-gauche.m4.diff
@@ -0,0 +1,19 @@
+--- Gauche-0.9.4.orig/m4/gauche.m4
++++ Gauche-0.9.4/m4/gauche.m4
+@@ -103,15 +103,11 @@
+ i686-*) I686OPT="-DUSE_I686_PREFETCH";;
+ esac
+ case "$CC" in
+- gcc*) # some systems may have gcc-2.95, gcc-3, etc.
++ *gcc*) # some systems may have gcc-2.95, gcc-3, etc.
+ case "$target" in
+ *mingw*) ;;
+ *) GCCOPT="-fomit-frame-pointer";;
+ esac
+- case "$target" in
+- i586-*) GCCOPT="$GCCOPT -march=i586";;
+- i686-*) GCCOPT="$GCCOPT -march=i686";;
+- esac
+ ;;
+ esac
+ OPTFLAGS="$GCCOPT $I686OPT"
diff --git a/dev-scheme/gauche/files/gauche-rfc.tls.diff b/dev-scheme/gauche/files/gauche-rfc.tls.diff
new file mode 100644
index 000000000000..662ab433ef5f
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-rfc.tls.diff
@@ -0,0 +1,11 @@
+--- Gauche-0.9.3.2.orig/ext/tls/Makefile.in
++++ Gauche-0.9.3.2/ext/tls/Makefile.in
+@@ -77,6 +77,8 @@
+ @sed -e "s@\.\./ssl/@../../$(srcdir)/axTLS/ssl/@g" \
+ -e "s/system/safe_system/g" \
+ -e "s@openssl @sh ../../$(srcdir)/kick_openssl @g" \
++ -e "/do_reneg = 1;/i#if 0" \
++ -e "/do_reneg = 0;/a#endif" \
+ $(srcdir)/axTLS/ssl/test/ssltest.c >> $(SSLTEST_GENERATED)
+ @cat $(srcdir)/system-fix.c >> $(SSLTEST_GENERATED)
+
diff --git a/dev-scheme/gauche/files/gauche-rpath.diff b/dev-scheme/gauche/files/gauche-rpath.diff
new file mode 100644
index 000000000000..ca76cb831234
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-rpath.diff
@@ -0,0 +1,10 @@
+--- Gauche-0.9.1.orig/configure.ac
++++ Gauche-0.9.1/configure.ac
+@@ -709,7 +709,6 @@
+ fi
+ if test "$RPATH_FLAG" != ""; then
+ RPATH_TMP=$RPATH_FLAG'`pwd`'
+- RPATH_REAL=$RPATH_FLAG'$(LIB_INSTALL_DIR)'
+ fi
+ fi
+ AC_SUBST(RPATH_FLAG)
diff --git a/dev-scheme/gauche/files/gauche-xz-info.diff b/dev-scheme/gauche/files/gauche-xz-info.diff
new file mode 100644
index 000000000000..809879c4cbd8
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-xz-info.diff
@@ -0,0 +1,31 @@
+--- Gauche-0.9.1.orig/lib/gauche/interactive/info.scm
++++ Gauche-0.9.1/lib/gauche/interactive/info.scm
+@@ -84,7 +84,8 @@
+ :pred (lambda (p)
+ (or (file-is-readable? p)
+ (file-is-readable? #`",|p|.gz")
+- (file-is-readable? #`",|p|.bz2"))))
++ (file-is-readable? #`",|p|.bz2")
++ (file-is-readable? #`",|p|.xz"))))
+ (errorf "couldn't find info file ~s in paths: ~s" *info-file* paths))
+ ))
+
+--- Gauche-0.9.1.orig/lib/text/info.scm
++++ Gauche-0.9.1/lib/text/info.scm
+@@ -63,6 +63,7 @@
+ ;; Find gunzip location
+ (define gunzip (find-file-in-paths "gunzip"))
+ (define bzip2 (find-file-in-paths "bzip2"))
++(define xz (find-file-in-paths "xz"))
+
+ ;; Read an info file FILE, and returns a list of strings splitted by ^_ (#\x1f)
+ ;; If FILE is not found, look for compressed one.
+@@ -74,6 +75,8 @@
+ (with-input-from-process #`",gunzip -c ,file" thunk)]
+ [(and bzip2 (file-exists? #`",|file|.bz2"))
+ (with-input-from-process #`",bzip2 -c -d ,|file|.bz2" thunk)]
++ [(and xz (file-exists? #`",|file|.xz"))
++ (with-input-from-process #`",xz -c -d ,|file|.xz" thunk)]
+ [else (error "can't find info file" file)]))
+ (with-input-from-info
+ (lambda ()
diff --git a/dev-scheme/gauche/gauche-0.9.3.3.ebuild b/dev-scheme/gauche/gauche-0.9.3.3.ebuild
new file mode 100644
index 000000000000..ee0aa0df3978
--- /dev/null
+++ b/dev-scheme/gauche/gauche-0.9.3.3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils
+
+MY_P="${P^g}"
+
+DESCRIPTION="A Unix system friendly Scheme Interpreter"
+HOMEPAGE="http://practical-scheme.net/gauche/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="ipv6 test"
+
+RDEPEND="sys-libs/gdbm"
+DEPEND="${RDEPEND}
+ test? ( dev-libs/openssl )"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-rpath.diff
+ epatch "${FILESDIR}"/${PN}-gauche.m4.diff
+ epatch "${FILESDIR}"/${PN}-ext-ldflags.diff
+ epatch "${FILESDIR}"/${PN}-xz-info.diff
+ epatch "${FILESDIR}"/${PN}-rfc.tls.diff
+ epatch "${FILESDIR}"/${P}-gauche.threads.diff
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable ipv6) \
+ --with-slib="${EPREFIX}"/usr/share/slib
+}
+
+src_test() {
+ emake -j1 -s check
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install-pkg install-doc
+ dodoc AUTHORS ChangeLog HACKING README
+}
diff --git a/dev-scheme/gauche/gauche-0.9.4.ebuild b/dev-scheme/gauche/gauche-0.9.4.ebuild
new file mode 100644
index 000000000000..1a6aaaec57ef
--- /dev/null
+++ b/dev-scheme/gauche/gauche-0.9.4.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils
+
+MY_P="${P^g}"
+
+DESCRIPTION="A Unix system friendly Scheme Interpreter"
+HOMEPAGE="http://practical-scheme.net/gauche/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="ipv6 test"
+
+RDEPEND="sys-libs/gdbm"
+DEPEND="${RDEPEND}
+ test? ( dev-libs/openssl )"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-rpath.diff
+ epatch "${FILESDIR}"/${PN}-gauche.m4.diff
+ epatch "${FILESDIR}"/${PN}-ext-ldflags.diff
+ epatch "${FILESDIR}"/${PN}-xz-info.diff
+ epatch "${FILESDIR}"/${PN}-rfc.tls.diff
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable ipv6) \
+ --with-slib="${EPREFIX}"/usr/share/slib
+}
+
+src_test() {
+ emake -j1 -s check
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install-pkg install-doc
+ dodoc AUTHORS ChangeLog HACKING README
+}
diff --git a/dev-scheme/gauche/metadata.xml b/dev-scheme/gauche/metadata.xml
new file mode 100644
index 000000000000..11619e379dbd
--- /dev/null
+++ b/dev-scheme/gauche/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <maintainer>
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Gauche is an R5RS Scheme implementation developed to be a handy script
+ interpreter, which allows programmers and system administrators to write
+ small to large scripts for their daily chores. Quick startup, built-in
+ system interface, native multilingual support are some of my goals.
+
+ Gauche runs on several Unix-like platforms.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">gauche</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/goosh/Manifest b/dev-scheme/goosh/Manifest
new file mode 100644
index 000000000000..2645a5acd0a1
--- /dev/null
+++ b/dev-scheme/goosh/Manifest
@@ -0,0 +1 @@
+DIST goosh-1.3.tar.gz 43503 RMD160 aa518718e47fddf647a7407ab45f7e6d0330ce5e SHA1 3276d450b85af83b65837124f1fea9df130f6e74 SHA256 5a3c2ecae59b4f77831b6dd904016269f1b533fab5e1a52eebd2e723323fc920
diff --git a/dev-scheme/goosh/goosh-1.3.ebuild b/dev-scheme/goosh/goosh-1.3.ebuild
new file mode 100644
index 000000000000..65095b17e21b
--- /dev/null
+++ b/dev-scheme/goosh/goosh-1.3.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Small process-control library for Guile"
+HOMEPAGE="http://arglist.com/guile/"
+SRC_URI="http://arglist.com/guile/${P}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc x86"
+IUSE=""
+RDEPEND=">=dev-scheme/guile-1.6"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ make DESTDIR="${D}" install || die "install failed"
+}
diff --git a/dev-scheme/goosh/metadata.xml b/dev-scheme/goosh/metadata.xml
new file mode 100644
index 000000000000..9ac9ffdb3a41
--- /dev/null
+++ b/dev-scheme/goosh/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-chemistry</herd>
+</pkgmetadata>
diff --git a/dev-scheme/greg/Manifest b/dev-scheme/greg/Manifest
new file mode 100644
index 000000000000..966cb192437e
--- /dev/null
+++ b/dev-scheme/greg/Manifest
@@ -0,0 +1 @@
+DIST greg-2.0.0.tar.gz 453598 SHA256 da917cc45747f1369771860d635661e8fdc6e604eb20aa2c25fae0d113e4d769 SHA512 d20523b4f6fcfcb183615866a3b322dad39579707f6979ad1edf11dac4c93f5c8dda109a4d832aae597b44397befe81afb6ae9be282556228ade1ad48e8a17eb WHIRLPOOL dfd59766a428ee2757bfebf871637e1bccd5e9ab691c10ae51e8149914aba1eaf2bf28f5999b8f934ad825a2144e31d9495954175726a4b169978b23d199f4f4
diff --git a/dev-scheme/greg/files/2.0.0-notest.patch b/dev-scheme/greg/files/2.0.0-notest.patch
new file mode 100644
index 000000000000..26a6cdf1c0ad
--- /dev/null
+++ b/dev-scheme/greg/files/2.0.0-notest.patch
@@ -0,0 +1,12 @@
+diff --git a/test/Makefile.am b/test/Makefile.am
+index 3cda45d..c61b34e 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -23,7 +23,6 @@
+
+
+ all:
+- ./test.sh
+
+ check:
+ ./test.sh
diff --git a/dev-scheme/greg/files/greg-2.0.0-test.patch b/dev-scheme/greg/files/greg-2.0.0-test.patch
new file mode 100644
index 000000000000..26a6cdf1c0ad
--- /dev/null
+++ b/dev-scheme/greg/files/greg-2.0.0-test.patch
@@ -0,0 +1,12 @@
+diff --git a/test/Makefile.am b/test/Makefile.am
+index 3cda45d..c61b34e 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -23,7 +23,6 @@
+
+
+ all:
+- ./test.sh
+
+ check:
+ ./test.sh
diff --git a/dev-scheme/greg/greg-2.0.0-r1.ebuild b/dev-scheme/greg/greg-2.0.0-r1.ebuild
new file mode 100644
index 000000000000..f0a7a835ae42
--- /dev/null
+++ b/dev-scheme/greg/greg-2.0.0-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+DESCRIPTION="Testing-Framework for guile"
+HOMEPAGE="http://gna.org/projects/greg/"
+SRC_URI="http://download.gna.org/${PN}/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-2"
+IUSE="static-libs"
+
+RDEPEND=">=dev-scheme/guile-1.8"
+DEPEND=""
+
+PATCHES=( "${FILESDIR}"/${P}-test.patch )
+
+src_test() {
+ cd test || die
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${BUILD_DIR}/src/.libs"
+ export GUILE_LOAD_PATH="$GUILE_LOAD_PATH:${BUILD_DIR}/src/"
+ guile -s "${S}"/src/greg || die
+}
diff --git a/dev-scheme/greg/greg-2.0.0.ebuild b/dev-scheme/greg/greg-2.0.0.ebuild
new file mode 100644
index 000000000000..14f2be18112d
--- /dev/null
+++ b/dev-scheme/greg/greg-2.0.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit autotools eutils
+
+DESCRIPTION="Testing-Framework for guile"
+HOMEPAGE="http://gna.org/projects/greg/"
+SRC_URI="http://download.gna.org/${PN}/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="amd64 x86"
+LICENSE="GPL-2"
+IUSE=""
+
+RDEPEND=">=dev-scheme/guile-1.8"
+DEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-notest.patch
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc NEWS README AUTHORS ChangeLog || die
+}
diff --git a/dev-scheme/greg/metadata.xml b/dev-scheme/greg/metadata.xml
new file mode 100644
index 000000000000..4bf6dbc6b1ea
--- /dev/null
+++ b/dev-scheme/greg/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <email>sci@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-scheme/guile-cairo/Manifest b/dev-scheme/guile-cairo/Manifest
new file mode 100644
index 000000000000..f8ea9840ef4e
--- /dev/null
+++ b/dev-scheme/guile-cairo/Manifest
@@ -0,0 +1,2 @@
+DIST guile-cairo-1.4.0.tar.gz 512208 SHA256 bad5d4b6c09b77930d811e333a4920337d222c0ea4ee5e561a0276efa8bb9507 SHA512 59e70c9a78b50bc8f580984cf67d9708b9a201920736be16d3ee2b8e73abaeac1c2b9d934b1713529043474881cd7258cb8df99ac317f6a10417b08a677c0759 WHIRLPOOL 8fe8fa8054cb220e8c5c9929b36b9210de737090f8e595f923886f0bb6cd20cfcf50e0430a7f2d1bb05fde464904476614f4d1e6a91da748587622a4ff526b78
+DIST guile-cairo-1.9.91.tar.gz 578928 SHA256 1a3836083394dfc53b967366b18c197d8fc83f84116c0cadcbae789799dce00d SHA512 bdade3463bdac2f29519ef3001286e07ca3c57615183f2e5ac121d273f49c4dafaf3125ef7f8630e0695c0d73368c98241c59acdb9c5682be42bddbc4b5a28ac WHIRLPOOL 8ea1a79d707d7dbf1dbb909a3cc18ce19b8a3a016f5a11c6e2801d755afe360ccd2019ebf725b4c7443237fe1891b1ecfa8554183b4261d97403585cb78655d9
diff --git a/dev-scheme/guile-cairo/files/1.3.90-various-fixes-20070601.patch b/dev-scheme/guile-cairo/files/1.3.90-various-fixes-20070601.patch
new file mode 100644
index 000000000000..eb867ffe56df
--- /dev/null
+++ b/dev-scheme/guile-cairo/files/1.3.90-various-fixes-20070601.patch
@@ -0,0 +1,72 @@
+=== modified file 'ChangeLog'
+--- ChangeLog 2007-05-18 17:38:56 +0000
++++ ChangeLog 2007-05-20 22:36:42 +0000
+@@ -1,3 +1,15 @@
++2007-05-21 Andy Wingo <wingo@pobox.com>
++
++ * guile-cairo/guile-cairo-enum-types.h: Include <cairo-svg.h> if
++ we are wrapping cairo_svg_version_t.
++
++2007-05-20 Andy Wingo <wingo@pobox.com>
++
++ * guile-cairo/guile-cairo.c (scm_init_cairo): Add guard against
++ multiple instantiations.
++
++ * guile-cairo/guile-cairo.h: Include cairo.h header.
++
+ 2007-05-18 Andy Wingo <wingo@pobox.com>
+
+ * configure.ac: Change version to 1.3.90.
+
+=== modified file 'guile-cairo/guile-cairo-enum-types.h'
+--- guile-cairo/guile-cairo-enum-types.h 2007-05-18 14:05:17 +0000
++++ guile-cairo/guile-cairo-enum-types.h 2007-05-20 22:36:42 +0000
+@@ -24,6 +24,10 @@
+ #ifndef __GUILE_CAIRO_ENUM_TYPES_H__
+ #define __GUILE_CAIRO_ENUM_TYPES_H__
+
++#if CAIRO_HAS_SVG_SURFACE
++#include <cairo-svg.h>
++#endif
++
+
+
+ SCM scm_from_cairo_status (cairo_status_t cval);
+
+=== modified file 'guile-cairo/guile-cairo.c'
+--- guile-cairo/guile-cairo.c 2007-05-18 16:27:47 +0000
++++ guile-cairo/guile-cairo.c 2007-05-20 18:32:44 +0000
+@@ -2281,6 +2281,11 @@
+ void
+ scm_init_cairo (void)
+ {
++ static int initialized = 0;
++
++ if (initialized)
++ return;
++
+ #ifndef SCM_MAGIC_SNARFER
+ #include "guile-cairo.x"
+ #endif
+@@ -2288,5 +2293,6 @@
+ scm_init_cairo_smob_types ();
+ scm_init_cairo_vector_types ();
+ scm_init_cairo_enum_types ();
+- scm_c_export (NULL);
++
++ initialized = 1;
+ }
+
+=== modified file 'guile-cairo/guile-cairo.h'
+--- guile-cairo/guile-cairo.h 2007-05-18 11:39:11 +0000
++++ guile-cairo/guile-cairo.h 2007-05-20 17:30:53 +0000
+@@ -24,6 +24,8 @@
+ #ifndef __GUILE_CAIRO_H__
+ #define __GUILE_CAIRO_H__
+
++#include <cairo.h>
++
+ #include <guile-cairo-smob-types.h>
+ #include <guile-cairo-enum-types.h>
+ #include <guile-cairo-vector-types.h>
+
diff --git a/dev-scheme/guile-cairo/guile-cairo-1.4.0.ebuild b/dev-scheme/guile-cairo/guile-cairo-1.4.0.ebuild
new file mode 100644
index 000000000000..3ed5d116c6d3
--- /dev/null
+++ b/dev-scheme/guile-cairo/guile-cairo-1.4.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="Wraps the Cairo graphics library for Guile Scheme"
+HOMEPAGE="http://home.gna.org/guile-cairo/"
+SRC_URI="http://download.gna.org/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE="test"
+
+RDEPEND=">=dev-scheme/guile-1.8
+ >=x11-libs/cairo-1.4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-scheme/guile-lib )"
+
+src_configure() {
+ econf --disable-Werror
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die "install failed"
+ dodoc ChangeLog || die "dodoc failed"
+}
diff --git a/dev-scheme/guile-cairo/guile-cairo-1.9.91.ebuild b/dev-scheme/guile-cairo/guile-cairo-1.9.91.ebuild
new file mode 100644
index 000000000000..24535cce42fa
--- /dev/null
+++ b/dev-scheme/guile-cairo/guile-cairo-1.9.91.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools-utils
+
+DESCRIPTION="Wraps the Cairo graphics library for Guile Scheme"
+HOMEPAGE="http://www.nongnu.org/guile-cairo/"
+SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="static-libs test"
+
+RDEPEND="
+ >=dev-scheme/guile-1.8
+ >=x11-libs/cairo-1.4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-scheme/guile-lib )"
+
+src_configure() {
+ local myeconfargs=( --disable-Werror )
+ autotools-utils_src_configure
+}
diff --git a/dev-scheme/guile-cairo/metadata.xml b/dev-scheme/guile-cairo/metadata.xml
new file mode 100644
index 000000000000..e1fc076bd1ce
--- /dev/null
+++ b/dev-scheme/guile-cairo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">
+Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API stable, providing a firm base on which to do graphics work. Finally, and importantly, it is pleasant to use. You get a powerful and well-maintained graphics library with all of the benefits of Scheme: memory management, exceptions, macros, and a dynamic programming environment.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-scheme/guile-gnome-platform/Manifest b/dev-scheme/guile-gnome-platform/Manifest
new file mode 100644
index 000000000000..201ec0a66bd7
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/Manifest
@@ -0,0 +1,2 @@
+DIST guile-gnome-platform-2.16.1.tar.gz 3494333 SHA256 4c0856d3a8310af5959fb123f3a011fc6bc1ec1cf0f125629f8a4a741871c57b SHA512 c630e2d67b312fb41c8492f8956902f385faa834094860cac580d1df0329b41790d973f73fd7dd59dc365f5d6cfb6463cde8af90641fbc377680b51616ad8f7a WHIRLPOOL 53fee8b3b32552b927d032ea5e8e339a13615dd428b53f4abedf13ded0fdbb08cab97d848f23e6bbf49326c36a1c8d37a478f64f5574f48606efdd6bf2aea8d2
+DIST guile-gnome-platform-2.16.2.tar.gz 2538191 SHA256 50e6cd95c4a32f44498816c607c071b7d7368c49a34daebf598d9129df344fb0 SHA512 5acaa96d8caf82864ada8bfcbc4954a19cd5d7e210245f2e8b31082c6a9e4ab9ba7af5f8e1f762a891e1aad640913a7a205f56dfaed6915a9f782c53e042d042 WHIRLPOOL 2533d17e64bb4a66cb57d1c4178e2793d694bbfb38b94a92bb4eea91c8b635f42188c57e1617274c4abaa7fe3e92f8ae30a57b443707c593107fdb4a79d15d05
diff --git a/dev-scheme/guile-gnome-platform/files/2.15.92-add-atk-overrides.patch b/dev-scheme/guile-gnome-platform/files/2.15.92-add-atk-overrides.patch
new file mode 100644
index 000000000000..6168c79f1e99
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/files/2.15.92-add-atk-overrides.patch
@@ -0,0 +1,12 @@
+diff -urN guile-gnome-platform-2.15.92.orig/atk/gnome/Makefile.am guile-gnome-platform-2.15.92/atk/gnome/Makefile.am
+--- guile-gnome-platform-2.15.92.orig/atk/gnome/Makefile.am 2007-06-01 13:50:55.000000000 -0700
++++ guile-gnome-platform-2.15.92/atk/gnome/Makefile.am 2007-06-01 13:51:52.000000000 -0700
+@@ -6,7 +6,7 @@
+
+ if HAVE_PANGO
+ guilemodule_DATA += atk.scm
+-SUBDIRS += gw
++SUBDIRS += gw overrides
+ endif
+
+ EXTRA_DIST = atk.scm
diff --git a/dev-scheme/guile-gnome-platform/files/2.15.92-add-cairo-fix-from-bzr.patch b/dev-scheme/guile-gnome-platform/files/2.15.92-add-cairo-fix-from-bzr.patch
new file mode 100644
index 000000000000..030e5c1229d7
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/files/2.15.92-add-cairo-fix-from-bzr.patch
@@ -0,0 +1,91 @@
+=== modified file 'ChangeLog'
+--- ChangeLog 2007-05-24 15:14:46 +0000
++++ ChangeLog 2007-05-25 15:49:00 +0000
+@@ -1,3 +1,16 @@
++2007-05-25 Andy Wingo <wingo@pobox.com>
++
++ * gnome/gw/cairo-spec.scm: Now that we are actually making a
++ shlib, init guile-cairo in the shlib instead of in every dependant
++ wrapset.
++
++ * gnome/gw/Makefile.am: I tried really hard to avoid making a
++ shared library for this g-wrap wrapset, since it is not necessary
++ at all, but I have failed for the moment: other wrapsets depending
++ on this one will check to see that something has registered the
++ "guile-cairo" wrapset with the C g-wrap runtime, which will fail
++ unless we actually have a shlib that registers the wrapset. Suck.
++
+ 2007-05-24 Andy Wingo <wingo@pobox.com>
+
+ * == Released guile-gnome-platform version 2.15.92 ==
+
+=== modified file 'gnome/gw/Makefile.am'
+--- gnome/gw/Makefile.am 2007-05-20 17:43:35 +0000
++++ gnome/gw/Makefile.am 2007-05-25 15:49:00 +0000
+@@ -1,5 +1,27 @@
+ include $(top_srcdir)/common.mk
+
+-guilegwmodule_DATA = cairo-spec.scm
++guilegwmodule_DATA = cairo-spec.scm cairo.scm
+
+ EXTRA_DIST = cairo-spec.scm
++
++CLEANFILES = $(wildcard gnome-*.log)
++
++# I wanted to avoid having a cairo shlib, because there is no need, but
++# fighting g-wrap is too difficult for the moment.
++
++guilegnomelib_LTLIBRARIES = libgw-guile-gnome-cairo.la
++
++########################################################################
++## cairo
++nodist_libgw_guile_gnome_cairo_la_SOURCES = guile-gnome-gw-cairo.c
++
++libgw_guile_gnome_cairo_la_CFLAGS = $(GUILE_GLIB_CFLAGS) $(GLIB_CFLAGS) \
++ $(AM_CFLAGS) $(GUILE_CAIRO_CFLAGS) $(GUILE_CFLAGS) \
++ $(G_WRAP_CFLAGS)
++libgw_guile_gnome_cairo_la_LIBADD = $(GUILE_CAIRO_LIBS) $(GUILE_LIBS) \
++ $(G_WRAP_LIBS) $(GUILE_GLIB_LIBS)
++libgw_guile_gnome_cairo_la_LDFLAGS = -module
++
++CLEANFILES += $(wildcard guile-gnome-gw-cairo.*) cairo.scm
++
++BUILT_SOURCES = guile-gnome-gw-cairo.c
+
+=== modified file 'gnome/gw/cairo-spec.scm'
+--- gnome/gw/cairo-spec.scm 2007-05-20 22:39:45 +0000
++++ gnome/gw/cairo-spec.scm 2007-05-25 15:49:00 +0000
+@@ -27,7 +27,7 @@
+ (define-module (gnome gw cairo-spec)
+ #:use-module (oop goops)
+ #:use-module (gnome gw support g-wrap)
+- #:use-module (gnome gw support defs)
++ #:use-module (gnome gw gobject-spec)
+ #:use-module (gnome gw support gobject))
+
+ ;; G-Wrap inelegance
+@@ -116,8 +116,6 @@
+ (define-class <client-actions> (<gw-item>))
+ (define-method (global-declarations-cg (ws <gw-guile-wrapset>) (a <client-actions>))
+ '("#include <guile-cairo.h>\n"))
+-(define-method (initializations-cg (wrapset <gw-guile-wrapset>) (a <client-actions>) err)
+- (list "scm_init_cairo ();\n"))
+
+ (define-class <cairo-wrapset> (<gobject-wrapset-base>)
+ #:id 'gnome-cairo
+@@ -144,6 +142,14 @@
+ #:take "scm_take_cairo_font_options"))
+ (add-type-alias! ws "cairo_font_options_t*" 'cairo-font-options-t))
+
++(define-method (global-declarations-cg (ws <cairo-wrapset>))
++ (list (next-method)
++ "#include <guile-cairo.h>\n"))
++
++(define-method (initializations-cg (wrapset <cairo-wrapset>) err)
++ (list (next-method)
++ "scm_init_cairo ();\n"))
++
+ ;; pango-cairo
+ ;; cairo_t, cairo_font_options_t
+
+
diff --git a/dev-scheme/guile-gnome-platform/files/2.16.1-conflicting-types.patch b/dev-scheme/guile-gnome-platform/files/2.16.1-conflicting-types.patch
new file mode 100644
index 000000000000..e470977acbc8
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/files/2.16.1-conflicting-types.patch
@@ -0,0 +1,34 @@
+http://bugs.gentoo.org/293655
+
+--- guile-gnome-platform-2.16.1.orig/gtk/gnome/gw/gtk-support.c 2008-07-03 11:52:27.000000000 -0300
++++ guile-gnome-platform-2.16.1/gtk/gnome/gw/gtk-support.c 2009-11-27 03:09:28.204506213 -0200
+@@ -1012,7 +1012,7 @@
+ }
+
+ GdkRectangle*
+-gtk_widget_get_allocation (GtkWidget *widget)
++guile_gtk_widget_get_allocation (GtkWidget *widget)
+ {
+ GdkRectangle *ret = g_new (GdkRectangle, 1);
+ *ret = widget->allocation;
+--- guile-gnome-platform-2.16.1.orig/gtk/gnome/gw/gtk-support.h 2008-04-09 19:10:40.000000000 -0300
++++ guile-gnome-platform-2.16.1/gtk/gnome/gw/gtk-support.h 2009-11-27 03:08:29.385756221 -0200
+@@ -117,6 +117,6 @@
+ guint _wrap_gtk_ui_manager_add_ui_from_string (GtkUIManager *ui, const gchar *string, GError **error);
+
+ GdkWindow* gtk_widget_get_window (GtkWidget *widget);
+-GdkRectangle* gtk_widget_get_allocation (GtkWidget *widget);
++GdkRectangle* guile_gtk_widget_get_allocation (GtkWidget *widget);
+ void _wrap_gtk_drag_dest_set (GtkWidget *widget, GtkDestDefaults flags, const GList *types, GdkDragAction actions);
+ GtkStateType gtk_widget_get_state (GtkWidget *widget);
+--- guile-gnome-platform-2.16.1.orig/gtk/gnome/overrides/gtk.defs 2008-04-09 19:12:44.000000000 -0300
++++ guile-gnome-platform-2.16.1/gtk/gnome/overrides/gtk.defs 2009-11-27 03:13:34.667506321 -0200
+@@ -848,7 +848,7 @@
+
+ (define-method get-allocation
+ (of-object "GtkWidget")
+- (c-name "gtk_widget_get_allocation")
++ (c-name "guile_gtk_widget_get_allocation")
+ (return-type "GdkRectangle*")) ;; same as GtkAllocation
+
+ (define-method get_state
diff --git a/dev-scheme/guile-gnome-platform/files/2.16.1-gcc45.patch b/dev-scheme/guile-gnome-platform/files/2.16.1-gcc45.patch
new file mode 100644
index 000000000000..39c7e94760bd
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/files/2.16.1-gcc45.patch
@@ -0,0 +1,11 @@
+--- common.mk
++++ common.mk
+@@ -50,7 +50,7 @@
+ guile-snarf $(GUILE_SNARF_CFLAGS) $< > $@ \
+ || { rm $@; false; }
+ .c.doc:
+- $(CPP) -DSCM_MAGIC_SNARF_DOCS $(GUILE_SNARF_CFLAGS) $< \
++ $(CPP) -P -DSCM_MAGIC_SNARF_DOCS $(GUILE_SNARF_CFLAGS) $< \
+ | grep -E '^\^\^ {.*\^\^ }' > $@ || { rm $@; false; }
+
+ %.scm guile-gnome-gw-%.c: %-spec.scm
diff --git a/dev-scheme/guile-gnome-platform/files/2.16.1-gdk-color.patch b/dev-scheme/guile-gnome-platform/files/2.16.1-gdk-color.patch
new file mode 100644
index 000000000000..d7836ac489f9
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/files/2.16.1-gdk-color.patch
@@ -0,0 +1,55 @@
+# Bazaar merge directive format 2 (Bazaar 0.90)
+# revision_id: gbenison@gmail.com-20080728153014-9cmh3qp4879910dg
+# target_branch: http://arch.gna.org/guile-gnome/bzr/gtk/
+# testament_sha1: 1dd74795aba452934a0810f47bfe1ad34b958e4b
+# timestamp: 2008-07-28 08:36:30 -0700
+# base_revision_id: wingo@pobox.com-20080703151735-je9a72h0nlq3eere
+#
+# Begin patch
+=== modified file 'gnome/gw/gdk-support.c'
+--- gtk/gnome/gw/gdk-support.c 2008-04-24 11:17:07 +0000
++++ gtk/gnome/gw/gdk-support.c 2008-07-28 15:30:14 +0000
+@@ -228,11 +228,22 @@
+ return ret;
+ }
+
++/*
++ * Allocate a new GdkColor* which must be freed using
++ * gdk_color_free().
++ */
++static GdkColor*
++gdk_color_new()
++{
++ GdkColor tmp;
++ return gdk_color_copy(&tmp);
++}
++
+ GdkColor*
+ scm_scm_to_gdk_color (SCM scm)
+ #define FUNC_NAME "%scm->gdk-rectangle"
+ {
+- GdkColor *ret = g_new0 (GdkColor, 1);
++ GdkColor *ret = gdk_color_new();
+
+ if (scm_is_string (scm)) {
+ char *chars;
+
+# Begin bundle
+IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWZjPJ74AAbHfgEAQUXP//3qA
+AAC////6UAPZV7KKmigbBkSKemTJNjQBMKepo9RkZNGQ00MAAAABoAAAAAEomgmgaCTNBR6NQHpD
+0TTT1GjDAAAAAaAAAAABJIQ0j0TBJ5JiGmAppkZBoZHetMt0dHeL+Zs1essYZwmiipWtmW5noD6t
+JP2bTdtsv1JJPzNyeehztVVSPROr6m0YKZQFaOWu+z06Rud5U/7D6/HzSd7loXjOuOtTyhUB1+CF
+uquimbPJylUSYlaqGEDm3OnfJaLqj2yQ6r3QgKpKtA0pmW2HITLziKOTjm/fVLt6fxQHZtkGFTeB
+FuHcCiRWzsuJDoOcpYPAVFiEB8InMDl4naQHikc4a1XMxmYpaVYnPm2xrL3exYl0MEuEnlJO+JM5
+UFYwKS8BCwsgYhIWS2kuWGPMseMJO8ncXBIuJJ/X3ZRKMVCSIGaSULHRgmhOe9tGooKytZCskgmJ
+VS3QycULqKoxuNQ40lJoxtNxRyHHy7M0nUOE7BicXaUrMD5NrgsTCJtL8C5FPpE4MOJhg9nMJwT3
+DIsLzYUpCYlqPMWnEscKgQYSs2YjyQ6qxhXiYYlgxArte4UW+sCwwi2FpYQLks5oURZypVRHaVFP
+pJwmgV89TYjcTRROinDCUijL3O+eY5U1957/RoOIq5mRPALX3Kin8fYD/w9R85hVuGpzKzOiC8oV
+dPSyI6qB4jHE1b13nz11zltZaFSX1tLIcaRTqymf46deB05hZeUhBjGBqRcFZ2XkTb8hmPQXCMP0
+tfrRiWC4H2BiBEq5zGkSOGJoLiorU6aBWik6E8Rdxl/gYWG3ds790ppnbBuHeVHwr+HA0EfQlKAc
+q/E8AntpuJ1obUmOUEnfKYWm3NSt+oNhgoiNKKE+jOcy30xMx7eHGTLe33vIVOBzpxG8omhwPoNo
+PUmADruvHqaAVsAj5wgV2JksOsiBgWJZJ5ceoZqpB76oTzAbgKgLn8+qwLOWhwi4O5KK3uWHx6y8
+xGhbXvEVnkl2qk3YyJxYRuKNpjChsznCTyZ4PfeDxdm8DFXuCDIZbZWg3Yr6/kuYYAypBkmDrMiE
+4iIZlSOUreq0/wTGBllkoFAYcVIzkYjT/nQq/MW2bYwSTILXX3uG2etAsP61m91rJ9MZK6x94QmG
+YZNAZtZGfFMR1gOijgJD1tiHFaPr3/XjtiadSQ2LOpiSg+seT5OMoANJeQvIZNTBh4134wCOLGE6
+SCzdOZStqOnvfsWpi8GtD3xaP8XckU4UJCYzye+A
diff --git a/dev-scheme/guile-gnome-platform/files/2.16.1-glib-single-include.patch b/dev-scheme/guile-gnome-platform/files/2.16.1-glib-single-include.patch
new file mode 100644
index 000000000000..84f8c8761fbc
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/files/2.16.1-glib-single-include.patch
@@ -0,0 +1,26 @@
+Index: guile-gnome-platform-2.16.1/corba/gnome/corba/guile-gnome-corba-generic.c
+===================================================================
+--- guile-gnome-platform-2.16.1.orig/corba/gnome/corba/guile-gnome-corba-generic.c
++++ guile-gnome-platform-2.16.1/corba/gnome/corba/guile-gnome-corba-generic.c
+@@ -24,7 +24,7 @@
+
+ #include <guile-gnome-corba-generic.h>
+ #include <guile-gnome-gobject.h>
+-#include <glib/gstrfuncs.h>
++#include <glib.h>
+ #include <string.h>
+
+ static GQuark quark_corba_typecode = 0;
+Index: guile-gnome-platform-2.16.1/glib/gnome/gobject/guile-support.h
+===================================================================
+--- guile-gnome-platform-2.16.1.orig/glib/gnome/gobject/guile-support.h
++++ guile-gnome-platform-2.16.1/glib/gnome/gobject/guile-support.h
+@@ -24,7 +24,7 @@
+ #ifndef __GUILE_SUPPORT_H__
+ #define __GUILE_SUPPORT_H__
+
+-#include <glib/gmacros.h>
++#include <glib.h>
+
+ #include <libguile.h>
+
diff --git a/dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.1-r1.ebuild b/dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.1-r1.ebuild
new file mode 100644
index 000000000000..51e56f98f943
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.1-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils eutils multilib
+
+DESCRIPTION="Guile Scheme code that wraps the GNOME developer platform"
+HOMEPAGE="http://www.gnu.org/software/guile-gnome/"
+SRC_URI="http://ftp.gnu.org/pub/gnu/guile-gnome/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs"
+
+RDEPEND="
+ dev-libs/atk
+ dev-libs/g-wrap
+ dev-libs/glib:2
+ dev-scheme/guile:12
+ dev-scheme/guile-cairo
+ dev-scheme/guile-lib
+ gnome-base/gconf:2
+ gnome-base/gnome-vfs:2
+ gnome-base/libbonobo
+ gnome-base/libglade:2.0
+ gnome-base/libgnomecanvas
+ gnome-base/libgnomeui
+ gnome-base/orbit:2
+ x11-libs/gtk+:2
+ x11-libs/pango"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+#needs guile with networking
+RESTRICT=test
+
+MAKEOPTS+=" -j1"
+
+src_prepare() {
+ PATCHES=(
+ "${FILESDIR}/${PV}-conflicting-types.patch"
+ "${FILESDIR}/${PV}-gcc45.patch"
+ "${FILESDIR}/${PV}-gdk-color.patch"
+ "${FILESDIR}/${PV}-glib-single-include.patch"
+ )
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-Werror
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile \
+ guilegnomedir=/usr/share/guile/site \
+ guilegnomelibdir=/usr/$(get_libdir)
+}
+
+src_install() {
+ autotools-utils_src_install \
+ guilegnomedir=/usr/share/guile/site \
+ guilegnomelibdir=/usr/$(get_libdir)
+}
diff --git a/dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.1.ebuild b/dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.1.ebuild
new file mode 100644
index 000000000000..2a7eaab26754
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit autotools eutils multilib
+
+DESCRIPTION="Guile Scheme code that wraps the GNOME developer platform"
+HOMEPAGE="http://www.gnu.org/software/guile-gnome"
+SRC_URI="http://ftp.gnu.org/pub/gnu/guile-gnome/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND=">=dev-scheme/guile-1.6.4
+ >=dev-libs/g-wrap-1.9.11
+ dev-scheme/guile-cairo
+ dev-libs/atk
+ gnome-base/libbonobo
+ gnome-base/orbit:2
+ >=gnome-base/gconf-2.18:2
+ >=dev-libs/glib-2.10:2
+ >=gnome-base/gnome-vfs-2.16:2
+ >=x11-libs/gtk+-2.10:2
+ >=gnome-base/libglade-2.6:2.0
+ >=gnome-base/libgnomecanvas-2.14
+ >=gnome-base/libgnomeui-2.16
+ >=x11-libs/pango-1.14
+ dev-scheme/guile-lib"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+#needs guile with networking
+RESTRICT=test
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-conflicting-types.patch"
+ epatch "${FILESDIR}/${PV}-gcc45.patch"
+ epatch "${FILESDIR}/${PV}-glib-single-include.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-Werror
+}
+
+src_compile() {
+ emake -j1 guilegnomedir=/usr/share/guile/site \
+ guilegnomelibdir=/usr/$(get_libdir) || die "emake failed."
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" \
+ guilegnomedir=/usr/share/guile/site \
+ guilegnomelibdir=/usr/$(get_libdir) \
+ install || die "emake install failed."
+}
diff --git a/dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.2.ebuild b/dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.2.ebuild
new file mode 100644
index 000000000000..f068e3f4af27
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/guile-gnome-platform-2.16.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils multilib
+
+DESCRIPTION="Guile Scheme code that wraps the GNOME developer platform"
+HOMEPAGE="http://www.gnu.org/software/guile-gnome/"
+SRC_URI="http://ftp.gnu.org/pub/gnu/guile-gnome/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs"
+
+RDEPEND="
+ dev-libs/atk
+ >=dev-libs/g-wrap-1.9.14
+ dev-libs/glib:2
+ dev-scheme/guile:12
+ dev-scheme/guile-cairo
+ dev-scheme/guile-lib
+ gnome-base/gconf:2
+ gnome-base/gnome-vfs:2
+ gnome-base/libbonobo
+ gnome-base/libglade:2.0
+ gnome-base/libgnomecanvas
+ gnome-base/libgnomeui
+ gnome-base/orbit:2
+ x11-libs/gtk+:2
+ x11-libs/pango"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+#needs guile with networking
+RESTRICT=test
+
+MAKEOPTS+=" -j1"
+
+src_prepare() {
+ PATCHES=(
+ "${FILESDIR}/2.16.1-glib-single-include.patch"
+ )
+ autotools-utils_src_prepare
+}
+
+src_compile() {
+ autotools-utils_src_compile \
+ guilegnomedir=/usr/share/guile/site \
+ guilegnomelibdir=/usr/$(get_libdir)
+}
+
+src_install() {
+ autotools-utils_src_install \
+ guilegnomedir=/usr/share/guile/site \
+ guilegnomelibdir=/usr/$(get_libdir)
+}
diff --git a/dev-scheme/guile-gnome-platform/metadata.xml b/dev-scheme/guile-gnome-platform/metadata.xml
new file mode 100644
index 000000000000..b21c5fc8dc80
--- /dev/null
+++ b/dev-scheme/guile-gnome-platform/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+</pkgmetadata>
diff --git a/dev-scheme/guile-gui/Manifest b/dev-scheme/guile-gui/Manifest
new file mode 100644
index 000000000000..daeaf5f14a00
--- /dev/null
+++ b/dev-scheme/guile-gui/Manifest
@@ -0,0 +1 @@
+DIST guile-gui-0.2.tar.gz 33885 RMD160 41506b4102019b6800a293154b747979ff3710a6 SHA1 e5a50bd8e564b8664ebd329563ba1e19e06a154a SHA256 4a43950189f261d339c46dad1b6b561b905417e927fd2641a6ac075eb379668d
diff --git a/dev-scheme/guile-gui/guile-gui-0.2.ebuild b/dev-scheme/guile-gui/guile-gui-0.2.ebuild
new file mode 100644
index 000000000000..79a7285ebd31
--- /dev/null
+++ b/dev-scheme/guile-gui/guile-gui-0.2.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Guile Scheme code that aims to implement a graphical user interface"
+HOMEPAGE="http://www.ossau.uklinux.net/guile/"
+SRC_URI="http://www.ossau.uklinux.net/guile/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+RDEPEND="dev-scheme/guile
+ x11-libs/guile-gtk"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ make DESTDIR="${D}" install || die "install failed"
+ dodoc ${S}/README
+}
diff --git a/dev-scheme/guile-gui/metadata.xml b/dev-scheme/guile-gui/metadata.xml
new file mode 100644
index 000000000000..9ac9ffdb3a41
--- /dev/null
+++ b/dev-scheme/guile-gui/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-chemistry</herd>
+</pkgmetadata>
diff --git a/dev-scheme/guile-lib/Manifest b/dev-scheme/guile-lib/Manifest
new file mode 100644
index 000000000000..53828abdb191
--- /dev/null
+++ b/dev-scheme/guile-lib/Manifest
@@ -0,0 +1 @@
+DIST guile-lib-0.1.9.tar.gz 499394 SHA256 563dd0bfa8acc359e5d72b2618b98f1e1c2615f44bf164947bae66d053174c8f SHA512 53a00064783c6cdc450f3130808ca57696fdcd1aa25172b448f6d18861425e1dfa9a004df0405df0629950e80c43b4aebbef28be1e75a37f0d9cd4608ecc309e WHIRLPOOL 0b958a9acede7fc5e7475ee95ca7fc208ea104af62b93f8e77c14fe0882fd0311add7b71181c293ea9ad84e97d52c213eb988da164616133b276d2238aa2de2f
diff --git a/dev-scheme/guile-lib/guile-lib-0.1.9.ebuild b/dev-scheme/guile-lib/guile-lib-0.1.9.ebuild
new file mode 100644
index 000000000000..8ee4a0d7862c
--- /dev/null
+++ b/dev-scheme/guile-lib/guile-lib-0.1.9.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils
+
+DESCRIPTION="An accumulation place for pure-scheme Guile modules"
+HOMEPAGE="http://www.nongnu.org/guile-lib/"
+SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-scheme/guile[regex,deprecated]"
+DEPEND="${RDEPEND} !<dev-libs/g-wrap-1.9.8"
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die "install failed"
+}
diff --git a/dev-scheme/guile-lib/metadata.xml b/dev-scheme/guile-lib/metadata.xml
new file mode 100644
index 000000000000..36006ff275ea
--- /dev/null
+++ b/dev-scheme/guile-lib/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <maintainer>
+ <email>hkBst@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-scheme/guile-www/Manifest b/dev-scheme/guile-www/Manifest
new file mode 100644
index 000000000000..70c73d586cfb
--- /dev/null
+++ b/dev-scheme/guile-www/Manifest
@@ -0,0 +1,2 @@
+DIST guile-www-2.34.tar.xz 594488 SHA256 7d9ecf245f477970d7f9c035fcc4908537c165d02461cd6253ada3be32f45b62 SHA512 f2b05608eb3a3c79dfe779b771fe52acb78938290ecf34eeca8e11ded398366183cfba668fd50084ed67e06514b765034554ecc45ed969f51c1cdfa7c1e77a9c WHIRLPOOL 27699192f512f651273e95707d63f629f9d7426175b78d25f8966d08a06828578338aca370a845491487beb1ba8143f1c804e8d2de8da25b462dd6d58d60ac68
+DIST guile-www-2.35.tar.xz 614004 SHA256 67f2c6b4e52e339a521898b88d0e39e6f017721e500d80319a1cb2eda80b48a5 SHA512 5190088e762cfcaa1e602098a32b66af67295bc56c20d82f8b87fb3273370881805c1e735f4020b5889c904a588e21024432ddde15d452af82570367be6db3bb WHIRLPOOL 29bac413c74f9527333ebb83b4471494cd86c0cb27f77e9f9353bf9fe7151713338215d6cddaaaa4d7852a855dbbb5103431fa75d7b054148c721ada4c6fdc6d
diff --git a/dev-scheme/guile-www/files/guile-www-2.30-alive.test.patch b/dev-scheme/guile-www/files/guile-www-2.30-alive.test.patch
new file mode 100644
index 000000000000..fdd3b601533b
--- /dev/null
+++ b/dev-scheme/guile-www/files/guile-www-2.30-alive.test.patch
@@ -0,0 +1,74 @@
+From f41bf9380f7b08f5e8c07c9c58d66cd5da7bc356 Mon Sep 17 00:00:00 2001
+From: Thien-Thi Nguyen <ttn@gnuvola.org>
+Date: Thu, 28 Apr 2011 05:13:52 +0000
+Subject: [v] Make alive.test avoid (mis-)loading the .scm files, if possible.
+
+Reported by Bernardo Ezequiel Contreras:
+<https://savannah.nongnu.org/bugs/?33175>
+
+* source/alive.test: If guile has ‘%load-extensions’, create a
+preload file that removes ".scm" from it; use that file for
+all invocations; and delete it when done. If in debug mode,
+display ponderings, as well as ‘guile --version’ output.
+---
+diff --git a/source/ChangeLog b/source/ChangeLog
+index 2b5bd1b..2de79f4 100644
+--- a/source/ChangeLog
++++ b/source/ChangeLog
+@@ -1,3 +1,15 @@
++2011-04-28 Thien-Thi Nguyen <ttn@gnuvola.org>
++
++ [v] Make alive.test avoid (mis-)loading the .scm files, if possible.
++
++ Reported by Bernardo Ezequiel Contreras:
++ <https://savannah.nongnu.org/bugs/?33175>
++
++ * alive.test: If guile has ‘%load-extensions’, create a
++ preload file that removes ".scm" from it; use that file for
++ all invocations; and delete it when done. If in debug mode,
++ display ponderings, as well as ‘guile --version’ output.
++
+ 2011-01-24 Thien-Thi Nguyen <ttn@gnuvola.org>
+
+ Release: 2.29
+diff --git a/source/alive.test b/source/alive.test
+index 3521fcc..76e91c8 100755
+--- a/source/alive.test
++++ b/source/alive.test
+@@ -35,6 +35,25 @@ decho ()
+ if $debug ; then echo "$1" ; fi
+ }
+
++decho 'guile:'
++if $debug ; then ${GUILE-guile} --version ; fi
++
++if $guile -c '%load-extensions' >/dev/null 2>&1 ; then
++ preload=alive.preload
++ echo '(set! %load-extensions (delete ".scm" %load-extensions))' > $preload
++ if $debug ; then
++ decho 'preload:'
++ cat $preload
++ decho 'before:'
++ $guile -c '(begin (write %load-extensions) (newline))'
++ fi
++ guile="$guile -l $preload"
++ if $debug ; then
++ decho 'after:'
++ $guile -c '(begin (write %load-extensions) (newline))'
++ fi
++fi
++
+ decho 'indivdually:'
+ { while read m ;
+ do
+@@ -48,4 +67,8 @@ all="`cat $all`"
+ decho "$guile -c '(use-modules $all)'"
+ $guile -c "(use-modules $all)"
+
++if [ "$preload" ] ; then rm $preload ; fi
++
++exit 0
++
+ # alive.test ends here
+--
+cgit v0.9.0.2
diff --git a/dev-scheme/guile-www/files/guile-www-2.30-alive.test2.patch b/dev-scheme/guile-www/files/guile-www-2.30-alive.test2.patch
new file mode 100644
index 000000000000..9cf7efe984ab
--- /dev/null
+++ b/dev-scheme/guile-www/files/guile-www-2.30-alive.test2.patch
@@ -0,0 +1,51 @@
+From cfabb94ca727d63f5712860c3fe4132926e498c9 Mon Sep 17 00:00:00 2001
+From: Thien-Thi Nguyen <ttn@gnuvola.org>
+Date: Mon, 02 May 2011 08:32:02 +0000
+Subject: [v] Refine preload: Prioritize "" instead of deleting ".scm".
+
+The 2011-04-28 change goes too far; it impedes
+loading system modules used by Guile-WWW modules.
+Reported by (Savannah user) vonbecmann:
+<https://savannah.nongnu.org/bugs/?33175>.
+
+* source/alive.test: Don't delete ".scm" from ‘%load-extensions’;
+instead, ensure only that "" is at the beginning of the list.
+---
+diff --git a/source/ChangeLog b/source/ChangeLog
+index 2de79f4..ece831e 100644
+--- a/source/ChangeLog
++++ b/source/ChangeLog
+@@ -1,3 +1,15 @@
++2011-05-02 Thien-Thi Nguyen <ttn@gnuvola.org>
++
++ [v] Refine preload: Prioritize "" instead of deleting ".scm".
++
++ The 2011-04-28 change goes too far; it impedes
++ loading system modules used by Guile-WWW modules.
++ Reported by (Savannah user) vonbecmann:
++ <https://savannah.nongnu.org/bugs/?33175>.
++
++ * alive.test: Don't delete ".scm" from ‘%load-extensions’;
++ instead, ensure only that "" is at the beginning of the list.
++
+ 2011-04-28 Thien-Thi Nguyen <ttn@gnuvola.org>
+
+ [v] Make alive.test avoid (mis-)loading the .scm files, if possible.
+diff --git a/source/alive.test b/source/alive.test
+index 76e91c8..6e430f4 100755
+--- a/source/alive.test
++++ b/source/alive.test
+@@ -39,8 +39,10 @@ decho 'guile:'
+ if $debug ; then ${GUILE-guile} --version ; fi
+
+ if $guile -c '%load-extensions' >/dev/null 2>&1 ; then
++ # Make sure "" is at head of list.
+ preload=alive.preload
+- echo '(set! %load-extensions (delete ".scm" %load-extensions))' > $preload
++ echo '(set! %load-extensions (delete "" %load-extensions))' > $preload
++ echo '(set! %load-extensions (cons "" %load-extensions))' >> $preload
+ if $debug ; then
+ decho 'preload:'
+ cat $preload
+--
+cgit v0.9.0.2
diff --git a/dev-scheme/guile-www/guile-www-2.34.ebuild b/dev-scheme/guile-www/guile-www-2.34.ebuild
new file mode 100644
index 000000000000..431d67e2e1ca
--- /dev/null
+++ b/dev-scheme/guile-www/guile-www-2.34.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Guile Scheme modules to facilitate HTTP, URL and CGI programming"
+HOMEPAGE="http://www.nongnu.org/guile-www/"
+SRC_URI="mirror://nongnu/guile-www/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE=""
+
+RDEPEND="dev-scheme/guile:12"
+DEPEND="${RDEPEND}"
+
+src_test() {
+ emake VERBOSE=1 check
+}
diff --git a/dev-scheme/guile-www/guile-www-2.35.ebuild b/dev-scheme/guile-www/guile-www-2.35.ebuild
new file mode 100644
index 000000000000..ae16be2bafa4
--- /dev/null
+++ b/dev-scheme/guile-www/guile-www-2.35.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Guile Scheme modules to facilitate HTTP, URL and CGI programming"
+HOMEPAGE="http://www.nongnu.org/guile-www/"
+SRC_URI="mirror://nongnu/guile-www/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE=""
+
+RDEPEND="dev-scheme/guile"
+DEPEND="${RDEPEND}"
+
+src_test() {
+ emake VERBOSE=1 check
+}
diff --git a/dev-scheme/guile-www/metadata.xml b/dev-scheme/guile-www/metadata.xml
new file mode 100644
index 000000000000..51fdedab1b38
--- /dev/null
+++ b/dev-scheme/guile-www/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+</pkgmetadata>
diff --git a/dev-scheme/guile/Manifest b/dev-scheme/guile/Manifest
new file mode 100644
index 000000000000..2b9298ceaad6
--- /dev/null
+++ b/dev-scheme/guile/Manifest
@@ -0,0 +1,2 @@
+DIST guile-1.8.8.tar.gz 3956654 SHA256 c3471fed2e72e5b04ad133bbaaf16369e8360283679bcf19800bc1b381024050 SHA512 ede6feb90cd419d8763feb8c5169275490a653919573c4dfced025b74cf591072b3a10ffb9a3f6ee3fe7b0a0956ffcf434e0859b421455c8349cea56bf427db0 WHIRLPOOL 104810030b5dae16805595a5b398e5a7e600771b64b08d5ff686036e2f273dcec3829a16e4cdb1dbb9db5813f2e225476f83e0535a789bc570fc2fc15a76dbe2
+DIST guile-2.0.0.tar.gz 5564966 SHA256 7ba4ebd54d5b16840424172a14b2d10c76821bda9336fab5055b29fc288ec67b SHA512 44b5b703455eed28fc3981a067d8e0afd47b73bceb4d161c8d1db763db59adeb4add661424a41691bd00c7f4c54c5b02fefe9cd6cf94250eabab04848a2db3b2 WHIRLPOOL 066fcec5cffc217e233eb7c83eaef4fbbdaac7ada15acef5ebb2fbb937b8060c795a365bdc4c361965e452258db6d87bc637706370d951a2ed57f7337c52c06c
diff --git a/dev-scheme/guile/files/50guile-gentoo.el b/dev-scheme/guile/files/50guile-gentoo.el
new file mode 100644
index 000000000000..431f7e90ae73
--- /dev/null
+++ b/dev-scheme/guile/files/50guile-gentoo.el
@@ -0,0 +1 @@
+(add-to-list 'load-path "@SITELISP@")
diff --git a/dev-scheme/guile/files/guile-1.8.8-fix_guile-config.patch b/dev-scheme/guile/files/guile-1.8.8-fix_guile-config.patch
new file mode 100644
index 000000000000..2b04426ebd96
--- /dev/null
+++ b/dev-scheme/guile/files/guile-1.8.8-fix_guile-config.patch
@@ -0,0 +1,14 @@
+diff -ruN 1/configure.in 2/configure.in
+--- 1/configure.in 2010-12-13 17:24:39.000000000 +0000
++++ 2/configure.in 2011-04-29 11:53:39.000000000 +0000
+@@ -1522,8 +1522,8 @@
+ #######################################################################
+
+ dnl Tell guile-config what flags guile users should compile and link with.
+-GUILE_LIBS="$LDFLAGS $LIBS"
+-GUILE_CFLAGS="$CPPFLAGS $PTHREAD_CFLAGS"
++GUILE_LIBS="$LIBS"
++GUILE_CFLAGS="$PTHREAD_CFLAGS"
+ AC_SUBST(GUILE_LIBS)
+ AC_SUBST(GUILE_CFLAGS)
+
diff --git a/dev-scheme/guile/files/guile-1.8.8-gcc46.patch b/dev-scheme/guile/files/guile-1.8.8-gcc46.patch
new file mode 100644
index 000000000000..b06a0e59eb14
--- /dev/null
+++ b/dev-scheme/guile/files/guile-1.8.8-gcc46.patch
@@ -0,0 +1,39 @@
+Backported upstream patch to fix SIGSEGV with gcc-4.6
+
+http://git.savannah.gnu.org/cgit/guile.git/commit/?h=branch_release-1-8&id=62bc1072c19e81bb0f9e42a5034e7ab8c27d3b94
+https://bugs.gentoo.org/show_bug.cgi?id=424475
+--- a/configure.in
++++ b/configure.in
+@@ -1199,23 +1199,20 @@
+ AC_RUN_IFELSE([AC_LANG_SOURCE(
+ [AC_INCLUDES_DEFAULT
+ int
+-find_stack_direction ()
++find_stack_direction (int *addr, int depth)
+ {
+- static char *addr = 0;
+- auto char dummy;
+- if (addr == 0)
+- {
+- addr = &dummy;
+- return find_stack_direction ();
+- }
+- else
+- return (&dummy > addr) ? 1 : -1;
++ int dir, dummy = 0;
++ if (! addr)
++ addr = &dummy;
++ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
++ dir = depth ? find_stack_direction (addr, depth - 1) : 0;
++ return dir + dummy;
+ }
+
+ int
+-main ()
++main (int argc, char **argv)
+ {
+- return find_stack_direction () < 0;
++ return find_stack_direction (0, argc + !argv + 20) < 0;
+ }])],
+ [SCM_I_GSC_STACK_GROWS_UP=1],
+ [],
diff --git a/dev-scheme/guile/files/guile-1.8.8-gtexinfo-5.patch b/dev-scheme/guile/files/guile-1.8.8-gtexinfo-5.patch
new file mode 100644
index 000000000000..d7fbda15c101
--- /dev/null
+++ b/dev-scheme/guile/files/guile-1.8.8-gtexinfo-5.patch
@@ -0,0 +1,15 @@
+$NetBSD: patch-doc_tutorial_guile-tut.texi,v 1.1 2013/11/30 07:06:25 dsainty Exp $
+
+Compatibility with gtexinfo 5.2
+
+--- doc/tutorial/guile-tut.texi 2010-12-14 06:24:39.000000000 +1300
++++ doc/tutorial/guile-tut.texi 2013-11-30 19:44:28.304575529 +1300
+@@ -446,7 +446,7 @@
+ Schemer} from that list.}
+
+
+-@subsection Hello World
++@section Hello World
+ @cindex hello world
+
+ Our first program is the typical Scheme "hello world" program. Put the \ No newline at end of file
diff --git a/dev-scheme/guile/files/guile-1.8.8-makeinfo-5.patch b/dev-scheme/guile/files/guile-1.8.8-makeinfo-5.patch
new file mode 100644
index 000000000000..9f3a02c18c65
--- /dev/null
+++ b/dev-scheme/guile/files/guile-1.8.8-makeinfo-5.patch
@@ -0,0 +1,71 @@
+From 937da0f2604ea208ec56517c5a41e582f316a246 Mon Sep 17 00:00:00 2001
+From: Cyprien Nicolas <cyp@fulax.fr>
+Date: Thu, 18 Apr 2013 23:45:23 +0200
+Subject: [PATCH] Fix texinfo files for makeinfo-5.1
+
+---
+ doc/ref/api-options.texi | 2 +-
+ doc/ref/api-utility.texi | 2 +-
+ doc/ref/fdl.texi | 2 +-
+ doc/ref/gh.texi | 4 ++--
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/doc/ref/api-options.texi b/doc/ref/api-options.texi
+index 7b7a6e0..6ce7291 100644
+--- a/doc/ref/api-options.texi
++++ b/doc/ref/api-options.texi
+@@ -377,9 +377,9 @@ configure @emph{reading}, @emph{printing}, @emph{debugging} or
+ * User level options interfaces::
+ * Reader options::
+ * Printing options::
+-* Debugger options::
+ * Evaluator options::
+ * Evaluator trap options::
++* Debugger options::
+ * Examples of option use::
+ @end menu
+
+diff --git a/doc/ref/api-utility.texi b/doc/ref/api-utility.texi
+index 4a90212..9a4f3cc 100644
+--- a/doc/ref/api-utility.texi
++++ b/doc/ref/api-utility.texi
+@@ -657,7 +657,7 @@ Return 1 if @var{x} is a Scheme-level hook, 0 otherwise.
+ @end deftypefn
+
+
+-@subsubsection Handling Scheme-level hooks from C code
++@subsubheading Handling Scheme-level hooks from C code
+
+ Here is an example of how to handle Scheme-level hooks from C code using
+ the above functions.
+diff --git a/doc/ref/fdl.texi b/doc/ref/fdl.texi
+index 17fe148..4866055 100644
+--- a/doc/ref/fdl.texi
++++ b/doc/ref/fdl.texi
+@@ -408,7 +408,7 @@ as a draft) by the Free Software Foundation.
+ @end enumerate
+
+ @page
+-@appendixsubsec ADDENDUM: How to use this License for your documents
++@appendixsec ADDENDUM: How to use this License for your documents
+
+ To use this License in a document you have written, include a copy of
+ the License in the document and put the following copyright and
+diff --git a/doc/ref/gh.texi b/doc/ref/gh.texi
+index 95dfd92..bbd3af1 100644
+--- a/doc/ref/gh.texi
++++ b/doc/ref/gh.texi
+@@ -995,8 +995,8 @@ These correspond to the Scheme @code{(cons a b)} and @code{(list l0 l1
+
+ @deftypefun SCM gh_car (SCM @var{obj})
+ @deftypefunx SCM gh_cdr (SCM @var{obj})
+-@dots{}
+-
++@deftypefunx SCM gh_c[ad][ad]r (SCM @var{obj})
++@deftypefunx SCM gh_c[ad][ad][ad]r (SCM @var{obj})
+ @deftypefunx SCM gh_c[ad][ad][ad][ad]r (SCM @var{obj})
+ These correspond to the Scheme @code{(caadar ls)} procedures etc @dots{}
+ @end deftypefun
+--
+1.8.2.1
+
diff --git a/dev-scheme/guile/guile-1.8.8-r1.ebuild b/dev-scheme/guile/guile-1.8.8-r1.ebuild
new file mode 100644
index 000000000000..ffee62922f71
--- /dev/null
+++ b/dev-scheme/guile/guile-1.8.8-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools flag-o-matic elisp-common
+
+DESCRIPTION="Scheme interpreter"
+HOMEPAGE="http://www.gnu.org/software/guile/"
+SRC_URI="mirror://gnu/guile/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+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"
+IUSE="networking +regex discouraged +deprecated emacs nls debug-freelist debug-malloc debug +threads"
+RESTRICT="!regex? ( test )"
+
+RDEPEND="
+ >=dev-libs/gmp-4.1
+ >=sys-devel/libtool-1.5.6
+ sys-devel/gettext
+ emacs? ( virtual/emacs )"
+DEPEND="${RDEPEND}
+ sys-apps/texinfo"
+
+# 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.
+SLOT="12"
+MAJOR="1.8"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-fix_guile-config.patch" \
+ "${FILESDIR}/${P}-gcc46.patch" \
+ "${FILESDIR}/${P}-makeinfo-5.patch" \
+ "${FILESDIR}/${P}-gtexinfo-5.patch"
+ sed \
+ -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g" \
+ -e "/AM_PROG_CC_STDC/d" \
+ -i guile-readline/configure.in
+ eautoreconf
+}
+
+src_configure() {
+ # see bug #178499
+ filter-flags -ftree-vectorize
+
+ #will fail for me if posix is disabled or without modules -- hkBst
+ econf \
+ --disable-error-on-warning \
+ --disable-static \
+ --enable-posix \
+ $(use_enable networking) \
+ $(use_enable regex) \
+ $(use deprecated || use_enable discouraged) \
+ $(use_enable deprecated) \
+ $(use_enable emacs elisp) \
+ $(use_enable nls) \
+ --disable-rpath \
+ $(use_enable debug-freelist) \
+ $(use_enable debug-malloc) \
+ $(use_enable debug guile-debug) \
+ $(use_with threads) \
+ --with-modules \
+ EMACS=no
+}
+
+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
+ elisp-compile *.el || die
+ fi
+}
+
+src_install() {
+ einstall
+
+ dodoc AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS
+
+ # texmacs needs this, closing bug #23493
+ dodir /etc/env.d
+ echo "GUILE_LOAD_PATH=\"${EPREFIX}/usr/share/guile/${MAJOR}\"" > "${ED}"/etc/env.d/50guile
+
+ # 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() {
+ [ "${EROOT}" == "/" ] && pkg_config
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
+
+pkg_config() {
+ if has_version dev-scheme/slib; then
+ einfo "Registering slib with guile"
+ install_slib_for_guile
+ fi
+}
+
+_pkg_prerm() {
+ rm -f "${EROOT}"/usr/share/guile/site/slibcat
+}
diff --git a/dev-scheme/guile/guile-2.0.0.ebuild b/dev-scheme/guile/guile-2.0.0.ebuild
new file mode 100644
index 000000000000..e83a05bf7e9b
--- /dev/null
+++ b/dev-scheme/guile/guile-2.0.0.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit eutils flag-o-matic elisp-common
+
+DESCRIPTION="GNU Ubiquitous Intelligent Language for Extensions"
+HOMEPAGE="http://www.gnu.org/software/guile/"
+SRC_URI="mirror://gnu/guile/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+KEYWORDS="~amd64"
+IUSE="networking +regex +deprecated emacs nls debug-freelist debug-malloc debug +threads"
+
+RDEPEND="
+ dev-libs/gmp
+ >=sys-devel/libtool-1.5.6
+ sys-devel/gettext
+ virtual/pkgconfig
+ dev-libs/libunistring
+ >=dev-libs/boehm-gc-7.0[threads?]
+ virtual/libffi
+ emacs? ( virtual/emacs )"
+DEPEND="${RDEPEND}
+ sys-apps/texinfo"
+
+SLOT="2"
+MAJOR="2.0"
+
+src_configure() {
+ # see bug #178499
+ filter-flags -ftree-vectorize
+
+ #will fail for me if posix is disabled or without modules -- hkBst
+ econf \
+ --disable-error-on-warning \
+ --disable-static \
+ --enable-posix \
+ $(use_enable networking) \
+ $(use_enable regex) \
+ $(use_enable deprecated) \
+ $(use_enable nls) \
+ --disable-rpath \
+ $(use_enable debug-freelist) \
+ $(use_enable debug-malloc) \
+ $(use_enable debug guile-debug) \
+ $(use_with threads) \
+ --with-modules # \
+# EMACS=no
+}
+
+src_compile() {
+ emake || die "make failed"
+
+ # 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
+ # make
+ # elisp-compile *.el || die
+ # fi
+}
+
+src_install() {
+ einstall || die "install failed"
+
+ dodoc AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS || die
+
+ # texmacs needs this, closing bug #23493
+ dodir /etc/env.d
+ echo "GUILE_LOAD_PATH=\"${EPREFIX}/usr/share/guile/${MAJOR}\"" > "${ED}"/etc/env.d/50guile
+
+ # 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() {
+ [ "${EROOT}" == "/" ] && pkg_config
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
+
+pkg_config() {
+ if has_version dev-scheme/slib; then
+ einfo "Registering slib with guile"
+ install_slib_for_guile
+ fi
+}
+
+_pkg_prerm() {
+ rm -f "${EROOT}"/usr/share/guile/site/slibcat
+}
diff --git a/dev-scheme/guile/metadata.xml b/dev-scheme/guile/metadata.xml
new file mode 100644
index 000000000000..a3d993de70de
--- /dev/null
+++ b/dev-scheme/guile/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">
+Guile is a library designed to help programmers create flexible applications. Using Guile in an application allows programmers to write plug-ins, or modules (there are many names, but the concept is essentially the same) and users to use them to have an application fit their needs.
+ </longdescription>
+ <use>
+ <flag name='debug-freelist'>Include garbage collector freelist debugging
+ code</flag>
+ <flag name='debug-malloc'>Include malloc debugging code</flag>
+ <flag name='deprecated'>Enable deprecated features</flag>
+ <flag name='discouraged'> (implied by deprecated) enable merely discouraged
+ features</flag>
+ <flag name='networking'>Include networking interfaces</flag>
+ <flag name='regex'> Include regular expression interfaces</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-scheme/hop/Manifest b/dev-scheme/hop/Manifest
new file mode 100644
index 000000000000..3b5a82a0a6c0
--- /dev/null
+++ b/dev-scheme/hop/Manifest
@@ -0,0 +1 @@
+DIST hop-2.0.1.tar.gz 2407554 RMD160 b9a1ce2dfa7f12cf32665f5c092985ba8e49ba8f SHA1 46fa45c294a205e461ce3664e6741fe5a5b1dff5 SHA256 4f631be4d79a52b81ea7358d22c49cc188665d8e349c13f16b041693bd5a97b3
diff --git a/dev-scheme/hop/files/hop.confd b/dev-scheme/hop/files/hop.confd
new file mode 100644
index 000000000000..1688f64813d5
--- /dev/null
+++ b/dev-scheme/hop/files/hop.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/hop: config file for /etc/init.d/hop
+
+# see `hop --help` # for valid cmdline options
+#HOP_OPTS=""
diff --git a/dev-scheme/hop/files/hop.initd b/dev-scheme/hop/files/hop.initd
new file mode 100644
index 000000000000..9d111fe181a1
--- /dev/null
+++ b/dev-scheme/hop/files/hop.initd
@@ -0,0 +1,45 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+HOPEXEC=/usr/bin/hop
+HOPUSER=hop
+HOPHOME=/var/www
+PIDFILE=/var/run/hop.pid
+LOGFILE=/var/log/hop
+
+# For user extensions through /etc/conf.d/hop
+HOP_OPTS="--log-file ${LOGFILE} ${HOP_OPTS}"
+
+depend() {
+ need localmount net
+}
+
+logfile() {
+ if [ ! -f ${LOGFILE} ]
+ then
+ touch ${LOGFILE}
+ fi
+ chown ${HOPUSER} ${LOGFILE} || eerror "Cannot create logfile"
+ return 0
+}
+
+start() {
+ logfile || return 1
+
+ ebegin "Starting Hop Web Broker"
+ start-stop-daemon --start --oknodo \
+ --background --chuid ${HOPUSER} \
+ --make-pidfile --pidfile ${PIDFILE} \
+ --exec ${HOPEXEC} --env HOME=${HOPHOME} \
+ -- ${HOP_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Hop Web Broker"
+ start-stop-daemon --stop \
+ --exec ${HOPEXEC} --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/dev-scheme/hop/hop-2.0.1.ebuild b/dev-scheme/hop/hop-2.0.1.ebuild
new file mode 100644
index 000000000000..1a32ce140f39
--- /dev/null
+++ b/dev-scheme/hop/hop-2.0.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils multilib user
+
+DESCRIPTION="Hop is a higher-order language for programming interactive web applications"
+HOMEPAGE="http://hop.inria.fr/"
+SRC_URI="ftp://ftp-sop.inria.fr/indes/fp/Hop/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=dev-scheme/bigloo-3.3a[ssl?,threads?]"
+
+RDEPEND="${DEPEND}"
+
+IUSE="ssl threads debug"
+
+pkg_setup() {
+ enewgroup hop
+ enewuser hop -1 -1 /var/lib/hop hop
+}
+
+src_configure() {
+ # Hop doesn't use autoconf and consequently a lot of options used by econf give errors
+ # Manuel Serrano says: "Please, dont talk to me about autoconf. I simply dont want to hear about it..."
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --libdir=/usr/$(get_libdir) \
+ --etcdir=/etc/hop \
+ $(use_enable ssl) \
+ $(use_enable threads) \
+ $(use debug && echo "--debug") \
+ || die "configure failed"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "install failed"
+
+ newinitd "${FILESDIR}/hop.initd" hop || die
+ newconfd "${FILESDIR}/hop.confd" hop || die
+}
diff --git a/dev-scheme/hop/metadata.xml b/dev-scheme/hop/metadata.xml
new file mode 100644
index 000000000000..a424df30ec6f
--- /dev/null
+++ b/dev-scheme/hop/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">
+HOP is a new programming language designed for the Web 2.0. It is a higher-order language for programming interactive web applications such as web agendas, web galleries, music players, etc. HOP can be viewed as a replacement for traditional graphical toolkits. HOP is implemented as a Web broker, i.e., a Web server that may act indifferently as a regular Web server or Web proxy.
+ </longdescription>
+ <use>
+ <flag name="ssl">Enable SSL support for hop</flag>
+ <flag name="threads">Enable thread support for hop, it depends on <pkg>dev-scheme/bigloo</pkg> built with threads use flag.</flag>
+ <flag name="debug">Enables building with debug symbols</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-scheme/ikarus/Manifest b/dev-scheme/ikarus/Manifest
new file mode 100644
index 000000000000..00488b69b32b
--- /dev/null
+++ b/dev-scheme/ikarus/Manifest
@@ -0,0 +1 @@
+DIST ikarus-scheme-r1870.tgz 9397981 SHA256 cc4a2a23517a485d5ddbde87d9e504fb618e30b1f6d661e7c7b5061c19a3ca82
diff --git a/dev-scheme/ikarus/files/ikarus-0.0.3_p1870-cpu_has_sse2.patch b/dev-scheme/ikarus/files/ikarus-0.0.3_p1870-cpu_has_sse2.patch
new file mode 100644
index 000000000000..d66989671e32
--- /dev/null
+++ b/dev-scheme/ikarus/files/ikarus-0.0.3_p1870-cpu_has_sse2.patch
@@ -0,0 +1,12 @@
+--- a/src/cpu_has_sse2.S 2008-01-29 04:44:10.000000000 +0000
++++ b/src/cpu_has_sse2.S 2008-05-31 18:29:00.000000000 +0000
+@@ -13,6 +13,9 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+
+ .text
+ .globl cpu_has_sse2
diff --git a/dev-scheme/ikarus/files/ikarus-0.0.3_p1870-ikarus-enter.patch b/dev-scheme/ikarus/files/ikarus-0.0.3_p1870-ikarus-enter.patch
new file mode 100644
index 000000000000..2bdd780d7490
--- /dev/null
+++ b/dev-scheme/ikarus/files/ikarus-0.0.3_p1870-ikarus-enter.patch
@@ -0,0 +1,13 @@
+--- a/src/ikarus-enter.S 2008-01-29 04:44:17.000000000 +0000
++++ b/src/ikarus-enter.S 2008-05-31 18:28:09.000000000 +0000
+@@ -13,7 +13,9 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+
+ .text
+ .globl ik_asm_enter
diff --git a/dev-scheme/ikarus/ikarus-0.0.3_p1870.ebuild b/dev-scheme/ikarus/ikarus-0.0.3_p1870.ebuild
new file mode 100644
index 000000000000..3c14960f7a57
--- /dev/null
+++ b/dev-scheme/ikarus/ikarus-0.0.3_p1870.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic autotools versionator
+
+MY_PV=$(get_version_component_range 4-)
+MY_PV=${MY_PV/p/}
+
+MY_P=${PN}-scheme-r${MY_PV}
+
+DESCRIPTION="A free optimizing incremental native-code compiler for R6RS Scheme"
+HOMEPAGE="http://ikarus-scheme.org/"
+SRC_URI="http://ikarus-scheme.org/ikarus.dev/${MY_P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+KEYWORDS="-* ~x86"
+IUSE="cpu_flags_x86_sse2 doc"
+
+RDEPEND=">=dev-libs/gmp-4.2.2"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i -e 's/-O3//' configure.ac || die
+ epatch "${FILESDIR}/${P}-cpu_has_sse2.patch"
+ epatch "${FILESDIR}/${P}-ikarus-enter.patch"
+
+ eautoreconf
+}
+
+src_compile() {
+ if use !cpu_flags_x86_sse2; then \
+ eerror "You must have a processor who supports \
+ SSE2 instructions" && die
+ fi
+
+ append-flags "-std=gnu99"
+
+ emake || die "emake failed"
+}
+
+src_test() {
+ cd benchmarks
+ make benchall || die "Tests failed"
+ if [ -e timelog ]
+ then
+ cat timelog || die "stdout test logs failed."
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ rm -Rf "${D}/usr/share"
+ dodoc README ACKNOWLEDGMENTS || die "dodoc failed"
+ if use doc; then
+ dodoc doc/*.pdf || die "dodoc failed"
+ fi
+}
diff --git a/dev-scheme/ikarus/metadata.xml b/dev-scheme/ikarus/metadata.xml
new file mode 100644
index 000000000000..09e0bb5b7065
--- /dev/null
+++ b/dev-scheme/ikarus/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <maintainer>
+ <email>pchrist@gentoo.org</email>
+ <name>Panagiotis Christopoulos</name>
+ </maintainer>
+ <longdescription lang="en">
+ Ikarus Scheme is a free optimizing incremental native-code compiler for
+ Scheme as specified in the Revised-6 Report on the Algorithmic Language
+ Scheme.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-scheme/jscheme/Manifest b/dev-scheme/jscheme/Manifest
new file mode 100644
index 000000000000..6aa88a5aa6a2
--- /dev/null
+++ b/dev-scheme/jscheme/Manifest
@@ -0,0 +1 @@
+DIST jscheme-7.2.tgz 2507622 SHA256 a6460c3903c0dcd9eb8e31be4b3c324ec9f8e2aa43fbc8ec14948b2ea68a67a1 SHA512 48aa1ce806e2dd9bd6797dce6e6569787ad9072f728a39a37310ec5604afdb3fda4ad56a721336d0be9e3c985333ff9dd31cdb809c095d503f54a0f477adc3c7 WHIRLPOOL a12e899807e84922cfb879a88d6f885502260056501d277941bcf7bd7b68ed45dc000377a2e4a23a0bf717a5600756b07b8ed94c2f9734ce95ad03670b6a3965
diff --git a/dev-scheme/jscheme/jscheme-7.2.ebuild b/dev-scheme/jscheme/jscheme-7.2.ebuild
new file mode 100644
index 000000000000..a3cd4a69bbea
--- /dev/null
+++ b/dev-scheme/jscheme/jscheme-7.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit java-utils-2 java-pkg-2
+
+DESCRIPTION="JScheme is a dialect of Scheme with a very simple interface to Java, called the Javadot notation"
+HOMEPAGE="http://jscheme.sourceforge.net/jscheme/main.html"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="Apache-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=">=virtual/jdk-1.6"
+RDEPEND=">=virtual/jre-1.6
+ ${DEPEND}"
+
+src_compile() {
+ sh bin/make || die "make failed"
+}
+
+src_install() {
+ java-pkg_dojar lib/*.jar
+
+ java-pkg_dolauncher ${PN} \
+ --main jscheme.REPL
+
+ if use doc; then
+ dohtml -r doc || die "dohtml failed"
+ fi
+}
diff --git a/dev-scheme/jscheme/metadata.xml b/dev-scheme/jscheme/metadata.xml
new file mode 100644
index 000000000000..e0944d888fe5
--- /dev/null
+++ b/dev-scheme/jscheme/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">
+ JScheme is a dialect of Scheme with a very simple interface to Java, called
+ the Javadot notation . This notation provides a transparent access to all
+ Java classes, constructors, methods, and fields on the classpath.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">jscheme</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/kawa/Manifest b/dev-scheme/kawa/Manifest
new file mode 100644
index 000000000000..1322589956a2
--- /dev/null
+++ b/dev-scheme/kawa/Manifest
@@ -0,0 +1,4 @@
+DIST XQTS_1_0_2.zip 19879467 SHA256 923361362d70a20818c6442eb52a6401fe9d2e53e4f52ee8b4d7fb1c841b4443
+DIST XQTS_1_0_3.zip 30956043 SHA256 1a6c9dd8761f021e78105efd4f46d5d35bb8b73b18e14bfde0512661e6be78ec SHA512 e00efd3dbf0b1cf530795073f7548cf4ab4f3c55921f76af7c000e61e1d7293cd11f41d617b3ce5343df5e9c5b6de4ee3819a6db2b15df9441a19489ae46e1dd WHIRLPOOL 57ac5b2d5a38446d89df7bd7d06dbe09a592b6243ceb415fac4d2d0bf154a8cf51307194feab7eef14643bdd8f24e87f307b2cb521f5f81ef412814bf9fddc8b
+DIST kawa-1.10.tar.gz 2238130 SHA256 f697f5784b55b1945f0644954459f88a0eb9511bb60d695b1a9767b58eb7492e SHA512 4ab27331f7be6d6107272e75508179ed7d14c475e1fffaceeb7a16600e3ba4e54fc63506788ed89fca1f2d390477d2e3e685f29b015a28214fcb4f62016c943d WHIRLPOOL 2dc4c85ae4d8496b0425d6faf9c6077fe66906a107d0780b60d19fc91992b0a06f066857c4aa45fb81e29495ec4f9c7d9bac9d6f9a210874d2ffaf79dbf851eb
+DIST kawa-1.14.tar.gz 2691484 SHA256 2201cf3f4c57f49f15cf929d8634855cb8ef4ffe79158cecd66ebd5bd9b4b909 SHA512 e0a0eafd4ed0ce7d254f295db8e920b82cfef6f4f71c440db655d73761a2f99ab743def1daa54241998497db8f29269c7d98f7e3bf819a36d7f7151d3ba2913e WHIRLPOOL 6f7e32e38ecea68e4d7faffc2cb1df16d33b384010391d23507397714891ad1588a35aa7d0b4c1079322acc3250f25459c94ddb68f90a14f04a552f847542d6a
diff --git a/dev-scheme/kawa/files/kawa-1.10.patch b/dev-scheme/kawa/files/kawa-1.10.patch
new file mode 100644
index 000000000000..8acc5e442f69
--- /dev/null
+++ b/dev-scheme/kawa/files/kawa-1.10.patch
@@ -0,0 +1,24 @@
+diff -Naur kawa-1.10.orig/Makefile.in kawa-1.10/Makefile.in
+--- kawa-1.10.orig/Makefile.in 2010-09-19 01:38:24.000000000 +0200
++++ kawa-1.10/Makefile.in 2010-09-19 01:38:59.000000000 +0200
+@@ -908,7 +908,7 @@
+ | sed -e 's|./||' | sort > $@
+
+ gnu/kawa/util/PreProcess.class: $(srcdir)/gnu/kawa/util/PreProcess.java
+- $(JAVAC) -d . $(srcdir)/gnu/kawa/util/PreProcess.java
++ $(JAVAC) $(JAVACFLAGS) -d . $(srcdir)/gnu/kawa/util/PreProcess.java
+
+ # JDK 1.1
+ select-java1: $(srcdir)/patch-source-list gnu/kawa/util/PreProcess.class
+diff -Naur kawa-1.9.90.orig/bin/Makefile.in kawa-1.9.90/bin/Makefile.in
+--- kawa-1.9.90.orig/bin/Makefile.in 2009-08-08 12:20:49.000000000 -0300
++++ kawa-1.9.90/bin/Makefile.in 2009-09-21 20:15:06.000000000 -0300
+@@ -686,7 +686,7 @@
+ install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+-@ENABLE_KAWA_FRONTEND_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) kawa$(EXEEXT) $(DESTDIR)$(bindir)/kawa$(EXEEXT)
++@ENABLE_KAWA_FRONTEND_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) ./kawa$(EXEEXT) $(DESTDIR)$(bindir)/kawa$(EXEEXT)
+ @WITH_GCJ_DBTOOL_FALSE@@WITH_GCJ_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) kawa-bin$(EXEEXT) $(DESTDIR)$(bindir)/kawa-bin$(EXEEXT)
+ @ENABLE_SERVLET_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) cgi-servlet$(EXEEXT) $(DESTDIR)$(bindir)/cgi-servlet$(EXEEXT)
+
diff --git a/dev-scheme/kawa/files/kawa-1.14.patch b/dev-scheme/kawa/files/kawa-1.14.patch
new file mode 100644
index 000000000000..8acc5e442f69
--- /dev/null
+++ b/dev-scheme/kawa/files/kawa-1.14.patch
@@ -0,0 +1,24 @@
+diff -Naur kawa-1.10.orig/Makefile.in kawa-1.10/Makefile.in
+--- kawa-1.10.orig/Makefile.in 2010-09-19 01:38:24.000000000 +0200
++++ kawa-1.10/Makefile.in 2010-09-19 01:38:59.000000000 +0200
+@@ -908,7 +908,7 @@
+ | sed -e 's|./||' | sort > $@
+
+ gnu/kawa/util/PreProcess.class: $(srcdir)/gnu/kawa/util/PreProcess.java
+- $(JAVAC) -d . $(srcdir)/gnu/kawa/util/PreProcess.java
++ $(JAVAC) $(JAVACFLAGS) -d . $(srcdir)/gnu/kawa/util/PreProcess.java
+
+ # JDK 1.1
+ select-java1: $(srcdir)/patch-source-list gnu/kawa/util/PreProcess.class
+diff -Naur kawa-1.9.90.orig/bin/Makefile.in kawa-1.9.90/bin/Makefile.in
+--- kawa-1.9.90.orig/bin/Makefile.in 2009-08-08 12:20:49.000000000 -0300
++++ kawa-1.9.90/bin/Makefile.in 2009-09-21 20:15:06.000000000 -0300
+@@ -686,7 +686,7 @@
+ install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+-@ENABLE_KAWA_FRONTEND_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) kawa$(EXEEXT) $(DESTDIR)$(bindir)/kawa$(EXEEXT)
++@ENABLE_KAWA_FRONTEND_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) ./kawa$(EXEEXT) $(DESTDIR)$(bindir)/kawa$(EXEEXT)
+ @WITH_GCJ_DBTOOL_FALSE@@WITH_GCJ_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) kawa-bin$(EXEEXT) $(DESTDIR)$(bindir)/kawa-bin$(EXEEXT)
+ @ENABLE_SERVLET_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) cgi-servlet$(EXEEXT) $(DESTDIR)$(bindir)/cgi-servlet$(EXEEXT)
+
diff --git a/dev-scheme/kawa/files/kawa-1.9.90.patch b/dev-scheme/kawa/files/kawa-1.9.90.patch
new file mode 100644
index 000000000000..9466f0637ee6
--- /dev/null
+++ b/dev-scheme/kawa/files/kawa-1.9.90.patch
@@ -0,0 +1,12 @@
+diff -Naur kawa-1.9.90.orig/bin/Makefile.in kawa-1.9.90/bin/Makefile.in
+--- kawa-1.9.90.orig/bin/Makefile.in 2009-08-08 12:20:49.000000000 -0300
++++ kawa-1.9.90/bin/Makefile.in 2009-09-21 20:15:06.000000000 -0300
+@@ -686,7 +686,7 @@
+ install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+-@ENABLE_KAWA_FRONTEND_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) kawa$(EXEEXT) $(DESTDIR)$(bindir)/kawa$(EXEEXT)
++@ENABLE_KAWA_FRONTEND_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) ./kawa$(EXEEXT) $(DESTDIR)$(bindir)/kawa$(EXEEXT)
+ @WITH_GCJ_DBTOOL_FALSE@@WITH_GCJ_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) kawa-bin$(EXEEXT) $(DESTDIR)$(bindir)/kawa-bin$(EXEEXT)
+ @ENABLE_SERVLET_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(binPROGRAMS_INSTALL) cgi-servlet$(EXEEXT) $(DESTDIR)$(bindir)/cgi-servlet$(EXEEXT)
+
diff --git a/dev-scheme/kawa/kawa-1.10.ebuild b/dev-scheme/kawa/kawa-1.10.ebuild
new file mode 100644
index 000000000000..7a842cfe5fbf
--- /dev/null
+++ b/dev-scheme/kawa/kawa-1.10.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+JAVA_PKG_IUSE="source"
+
+inherit eutils java-pkg-2
+
+DESCRIPTION="Kawa, the Java-based Scheme system & Language Framework"
+HOMEPAGE="http://www.gnu.org/software/kawa/"
+XQTS_Ver="1_0_2"
+SRC_URI="mirror://gnu/kawa/${P}.tar.gz
+ xqtests? ( http://www.w3.org/XML/Query/test-suite/XQTS_${XQTS_Ver}.zip )"
+
+LICENSE="MIT public-domain
+ jemacs? ( GPL-2 )
+ krl? ( GPL-2 )"
+SLOT="0"
+KEYWORDS="x86"
+IUSE="+awt echo2 +frontend jemacs krl +sax servlets +swing swt +xml xqtests"
+
+COMMON_DEPEND="( >=virtual/jdk-1.5 )
+ frontend? ( sys-libs/readline:0 )
+ sax? ( dev-java/sax:0 )
+ echo2? ( dev-java/echo2 )
+ swt? ( dev-java/swt:3.5 )
+ servlets? ( dev-java/servletapi:2.4 )"
+DEPEND="${COMMON_DEPEND}
+ xqtests? ( app-arch/unzip:0 )"
+RDEPEND="${COMMON_DEPEND}"
+
+xtestsuite="XQTS_${XQTS_Ver}"
+
+src_unpack () {
+ unpack kawa-${PV}.tar.gz || die
+ if use xqtests; then
+ mkdir "${WORKDIR}/${xtestsuite}" || die
+ cd "${WORKDIR}/${xtestsuite}" || die
+ unpack ${xtestsuite}.zip || die
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}.patch
+}
+
+src_configure() {
+ # speeds up one-shot ebuilds.
+ myconf="--disable-dependency-tracking"
+ if use jemacs && ! use swing; then
+ echo
+ einfo "Although the swing USE flag is disabled you chose to enable jemacs,"
+ einfo "so swing is enabled anyway."
+ echo
+ myconf="${myconf} --with-swing"
+ else
+ myconf="${myconf} $(use_with swing)"
+ fi
+ if use xqtests; then
+ myconf="${myconf} $(use_with xqtests XQTS=${WORKDIR}/${xtestsuite})"
+ fi
+ if use servlets; then
+ myconf="${myconf} --with-servlet=$(java-pkg_getjar servletapi-2.4 servlet-api.jar)"
+ fi
+ if use swt; then
+ myconf="${myconf} --with-swt=$(java-pkg_getjar swt-3.5 swt.jar)"
+ fi
+
+ econf ${myconf} $(use_enable frontend kawa-frontend) \
+ $(use_enable xml) \
+ $(use_enable krl brl) \
+ $(use_enable echo2) \
+ $(use_enable jemacs) \
+ $(use_with awt) \
+ $(use_with sax sax2) \
+ --with-java-source=$(java-pkg_get-source) || die "econf failed."
+}
+
+src_compile() {
+ emake -j1 || die "emake failed."
+}
+
+src_install () {
+ emake -j1 DESTDIR="${D}" install || die "emake install failed"
+ rm -rv "${D}"/usr/share/java/ || die "rm -rv failed"
+
+ java-pkg_newjar kawa-${PV}.jar || die
+
+ java-pkg_dolauncher "kawa" --main kawa.repl || die "dolauncher failed"
+ java-pkg_dolauncher "qexo" --main kawa.repl --pkg_args \
+ "--xquery" || die "dolauncher qexo failed"
+ if use servlets; then
+ java-pkg_dolauncher "kawa-cgi-servlet" --main \
+ gnu.kawa.servlet.CGIServletWrapper || die
+ fi
+ if use jemacs; then
+ java-pkg_dolauncher "jemacs" --main \
+ gnu.jemacs.lang.ELisp || die
+ fi
+
+ use source && java-pkg_dosrc kawa/* gnu/*
+
+ dodoc ChangeLog TODO README NEWS || die
+ doinfo doc/kawa.info* || die
+ cp doc/kawa.man doc/kawa.2 || die
+ cp doc/qexo.man doc/qexo.2 || die
+ doman doc/*.2 || die
+}
diff --git a/dev-scheme/kawa/kawa-1.14.ebuild b/dev-scheme/kawa/kawa-1.14.ebuild
new file mode 100644
index 000000000000..18502abbd11f
--- /dev/null
+++ b/dev-scheme/kawa/kawa-1.14.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+
+JAVA_PKG_IUSE="source"
+
+inherit eutils java-pkg-2
+
+DESCRIPTION="Kawa, the Java-based Scheme system & Language Framework"
+HOMEPAGE="http://www.gnu.org/software/kawa/"
+XQTS_Ver="1_0_3"
+SRC_URI="mirror://gnu/kawa/${P}.tar.gz
+ xqtests? ( http://www.w3.org/XML/Query/test-suite/XQTS_${XQTS_Ver}.zip )"
+
+LICENSE="MIT public-domain
+ jemacs? ( GPL-2 )
+ krl? ( GPL-2 )"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="+awt echo2 +frontend jemacs krl +sax servlets +swing swt +xml xqtests"
+
+CDEPEND="( >=virtual/jdk-1.6 )
+ frontend? ( sys-libs/readline:0 )
+ sax? ( dev-java/sax:0 )
+ echo2? ( dev-java/echo2 )
+ swt? ( dev-java/swt:3.5 )
+ servlets? ( java-virtuals/servlet-api:3.0 )"
+DEPEND="${CDEPEND}
+ xqtests? ( app-arch/unzip:0 )"
+RDEPEND="${CDEPEND}"
+
+xtestsuite="XQTS_${XQTS_Ver}"
+
+src_unpack () {
+ unpack kawa-${PV}.tar.gz || die
+ if use xqtests; then
+ mkdir "${WORKDIR}/${xtestsuite}" || die
+ cd "${WORKDIR}/${xtestsuite}" || die
+ unpack ${xtestsuite}.Zip || die
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}.patch
+}
+
+src_configure() {
+ # speeds up one-shot ebuilds.
+ myconf="--disable-dependency-tracking"
+ if use jemacs && ! use swing; then
+ echo
+ einfo "Although the swing USE flag is disabled you chose to enable jemacs,"
+ einfo "so swing is enabled anyway."
+ echo
+ myconf="${myconf} --with-swing"
+ else
+ myconf="${myconf} $(use_with swing)"
+ fi
+ if use xqtests; then
+ myconf="${myconf} $(use_with xqtests XQTS=${WORKDIR}/${xtestsuite})"
+ fi
+ if use servlets; then
+ myconf="${myconf} --with-servlet=$(java-pkg_getjar servletapi-2.4 servlet-api.jar)"
+ fi
+ if use swt; then
+ myconf="${myconf} --with-swt=$(java-pkg_getjar swt-3.5 swt.jar)"
+ fi
+
+ econf ${myconf} $(use_enable frontend kawa-frontend) \
+ $(use_enable xml) \
+ $(use_enable krl brl) \
+ $(use_enable echo2) \
+ $(use_enable jemacs) \
+ $(use_with awt) \
+ $(use_with sax sax2) \
+ --with-java-source=$(java-pkg_get-source) || die "econf failed."
+}
+
+src_compile() {
+ emake -j1 || die "emake failed."
+}
+
+src_install () {
+ emake -j1 DESTDIR="${D}" install || die "emake install failed"
+ rm -rv "${D}"/usr/share/java/ || die "rm -rv failed"
+
+ java-pkg_newjar kawa-${PV}.jar || die
+
+ java-pkg_dolauncher "kawa" --main kawa.repl || die "dolauncher failed"
+ java-pkg_dolauncher "qexo" --main kawa.repl --pkg_args \
+ "--xquery" || die "dolauncher qexo failed"
+ if use servlets; then
+ java-pkg_dolauncher "kawa-cgi-servlet" --main \
+ gnu.kawa.servlet.CGIServletWrapper || die
+ fi
+ if use jemacs; then
+ java-pkg_dolauncher "jemacs" --main \
+ gnu.jemacs.lang.ELisp || die
+ fi
+
+ use source && java-pkg_dosrc kawa/* gnu/*
+
+ dodoc ChangeLog TODO README NEWS || die
+ doinfo doc/kawa.info* || die
+ cp doc/kawa.man doc/kawa.2 || die
+ cp doc/qexo.man doc/qexo.2 || die
+ doman doc/*.2 || die
+}
diff --git a/dev-scheme/kawa/metadata.xml b/dev-scheme/kawa/metadata.xml
new file mode 100644
index 000000000000..a427d8ea046c
--- /dev/null
+++ b/dev-scheme/kawa/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>scheme</herd>
+<longdescription lang="en">
+ Kawa is a full Scheme implementation. It implements almost all of R5RS,
+ plus some extensions. By default, symbols are case sensitive. It is
+ completely written in Java. Scheme functions and files are automatically
+ compiled into Java byte-codes. Kawa does some optimizations, and the
+ compiled code runs at reasonable speed.
+</longdescription>
+<use>
+ <flag name='awt'>Assume AWT is available</flag>
+ <flag name='echo2'>Enable support for the Echo2 web toolkit with
+ <pkg>dev-java/echo2</pkg></flag>
+ <flag name='frontend'>Build "kawa" front-end program using
+ <pkg>sys-libs/readline</pkg></flag>
+ <flag name='jemacs'>Build JEmacs</flag>
+ <flag name='krl'>Build BRL emulation and KRL</flag>
+ <flag name='sax'>Assume SAX2 is available with <pkg>dev-java/sax</pkg></flag>
+ <flag name='servlets'>Build support for generating servlets with
+ <pkg>dev-java/servletapi</pkg></flag>
+ <flag name='swing'>Assume Swing is available</flag>
+ <flag name='swt'>Assume SWT is available with <pkg>dev-java/swt</pkg></flag>
+ <flag name='xqtests'>Support XQuery Test Suite</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-scheme/metadata.xml b/dev-scheme/metadata.xml
new file mode 100644
index 000000000000..30a22896bc74
--- /dev/null
+++ b/dev-scheme/metadata.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The dev-scheme category contains libraries and utilities relevant to the
+ Scheme programming language.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie dev-scheme enthält Bibliotheken und Werkzeuge für die
+ Programmiersprache Scheme.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría dev-scheme contiene librerías y utilidades referentes al
+ lenguaje de programación Scheme.
+ </longdescription>
+ <longdescription lang="ja">
+ dev-schemeカテゴリーにはSchemeプログラミング言語に関連したライブラリーと
+ ユーティリティが含まれます。
+ </longdescription>
+ <longdescription lang="nl">
+ De dev-scheme categorie bevat bibliotheken en hulpmiddelen voor het gebruik
+ van de programmeertaal Scheme.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm dev-scheme chứa các thư viện và tiện ích liên quan
+ đến ngôn ngữ lập trình Scheme.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria dev-scheme contiene librerie e utilità per il linguaggio di
+ programmazione Scheme.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria dev-scheme contém bibliotecas e utilitários
+ referentes à linguagem de programação Scheme.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria dev-scheme zawiera biblioteki i narzędzia związane z językiem
+ programowania Scheme.
+ </longdescription>
+</catmetadata>
+
diff --git a/dev-scheme/net-http/Manifest b/dev-scheme/net-http/Manifest
new file mode 100644
index 000000000000..79570308010b
--- /dev/null
+++ b/dev-scheme/net-http/Manifest
@@ -0,0 +1 @@
+DIST net-http-0.3.1.tar.gz 26907 RMD160 5090499147fe64b34fde35134df988e08fd559dc SHA1 c06ad1e9028577831a02d07b79f3fa3bd0070c37 SHA256 4a89e51921604c0d1201df8524e49e68cbe4a831ff76382b045d8f9a920c8bfe
diff --git a/dev-scheme/net-http/metadata.xml b/dev-scheme/net-http/metadata.xml
new file mode 100644
index 000000000000..9ac9ffdb3a41
--- /dev/null
+++ b/dev-scheme/net-http/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-chemistry</herd>
+</pkgmetadata>
diff --git a/dev-scheme/net-http/net-http-0.3.1-r1.ebuild b/dev-scheme/net-http/net-http-0.3.1-r1.ebuild
new file mode 100644
index 000000000000..7876f5ae9462
--- /dev/null
+++ b/dev-scheme/net-http/net-http-0.3.1-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Library for doing HTTP client-side programming in Guile"
+HOMEPAGE="http://evan.prodromou.name/software/net-http/"
+SRC_URI="http://evan.prodromou.name/software/net-http/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE=""
+
+RDEPEND="dev-scheme/guile"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_configure() {
+ # Scheme doesn't compile
+ true
+}
+
+src_compile() {
+ # Scheme doesn't compile
+ true
+}
+
+src_install() {
+ local GUILE_DIR="/usr/share/guile/site"
+ insinto ${GUILE_DIR}
+ doins -r "${S}"/net
+ dodoc "${S}"/README
+}
diff --git a/dev-scheme/net-http/net-http-0.3.1.ebuild b/dev-scheme/net-http/net-http-0.3.1.ebuild
new file mode 100644
index 000000000000..6ba97edecd2e
--- /dev/null
+++ b/dev-scheme/net-http/net-http-0.3.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Library for doing HTTP client-side programming in Guile"
+HOMEPAGE="http://evan.prodromou.name/software/net-http/"
+SRC_URI="http://evan.prodromou.name/software/net-http/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+RDEPEND="dev-scheme/guile"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${PN}"
+
+src_compile() {
+ # Scheme doesn't compile
+ true
+}
+
+src_install() {
+ local GUILE_DIR="/usr/share/guile/site"
+ dodir ${GUILE_DIR}
+ cp -R "${S}"/net "${D}"${GUILE_DIR}
+ dodoc "${S}"/README
+}
diff --git a/dev-scheme/racket/Manifest b/dev-scheme/racket/Manifest
new file mode 100644
index 000000000000..75619255fa84
--- /dev/null
+++ b/dev-scheme/racket/Manifest
@@ -0,0 +1,9 @@
+DIST racket-5.1.2-src-unix.tgz 15960181 SHA256 99871d6c17c383eb31c5788e17e52849144b51494bd96d2ff1ab396d8041175b
+DIST racket-5.2.1-src-unix.tgz 17210561 SHA256 69942a4efbfc2b17d836b5252e6f77b4aa40887a8a4a04ec228a44b7cfddb3ec SHA512 b60d259878cc237e26952ffcd07aa483c460a14a1f62e0a939466a4a51ad4ddfb8eda6845962823c0394268ceb3f050a88d1ab364013381f7ebcf077c4571e3e WHIRLPOOL 7b4eddf90a0dd17579aaf19e8df3a6867b9fa06349d254728b0a2cbd56ea83968fb5e1ac3202cb1001e62726cd4160dd174d6e5bf8310918eb4e8d84ba8913ef
+DIST racket-5.3.1-src-unix.tgz 18296513 SHA256 2abfcd4edf39db9eafcc8a456ccf216fe486cb718e1f70210f902cc6b1d418c3 SHA512 3586a5e06dd7ba0357fca0478df967ec2984ff9457137f4a6947a690e0b66c372ea4785d9608069938234947127ebb8120cc5adf944dc4bf4bca903596a42435 WHIRLPOOL 3ba50e678b361dba059667bcd3421a0e736c1c27079b48cdc5f22786733737b36ccdcc013d2bb9821af5a67cf344b7276bee99274805a77a76bb14ce4f4d2a08
+DIST racket-5.3.2-src-unix.tgz 18903002 SHA256 dfbb4d305388c23bd80352a18b19a3746a8e402a23e0081416cd6f61b55701fb SHA512 36293de679530e85f4bf4e416d1028cb6fe7cc6d012e7b7f3a0b2203603e7d04c449dee5d0d0b6ab8cf3386e758a557d752119cd60c1a0aec12ea8815a17e413 WHIRLPOOL aae25f4507dd54dabc8b2e5ce4f11202cf69d25bffcf1fd8575ddd1623c5a2249f6f5a9750fc5ff7843c9c152587b6cfc94f1421581ddfd79c176c54461b4b23
+DIST racket-5.3.3-src-unix.tgz 18903284 SHA256 4772a01c0d1db32827b390b3239263f2a44a1c6bdcf63224dd7d36027575e0e2 SHA512 fdf1cfad87f5324a839dd766ac46681928f2d555b1b91ecfbe234ba1d83fc1412f7fe9d4e9586f0e9d36a724185b6c382de9cf0b74426d64570e9c22d0d057f1 WHIRLPOOL d6434fc970dc88476593233b5ff970d6a307350b8a34788bc42f81baedac0efa51910919581b10ca48a2e47f9c645432682819185e2ef9acc46fddd34e279ef1
+DIST racket-5.3.4-src-unix.tgz 19314579 SHA256 4d1fb86e001c497af674199f1ddff5534843bb94f21b9f0c1209b8bfdbad2d7b SHA512 35a05e31a11a8569d938af152a784358479cdad9f5007b04890d485ce92f04554df09d46179042478df96e018756b06e6c7c544b4f113272c31234b75ca740a9 WHIRLPOOL e114c4b18d4c18c8852627c9de207dd543e1f63b056bd1e8cbdecbe5e2a2a916d3144585ddb620c539ceb4c0710e0ee237803ffd4fa5b45e73434f7f017673e0
+DIST racket-5.3.6-src-unix.tgz 19278914 SHA256 7fe0ffc1231f888cd481f175e428f0217257dd136d2513bde73954af5a7cfb8a SHA512 08e8b599e800f41c9497b07e163ed43ae02ae9d9bcc3e20da31eb2f6aa20aa4b0071db51e93696ae1bd644ddfa1c3aea587a334db24ced4a3654dcf5da138e8f WHIRLPOOL c2c34de08d0ec9942f040cc23ea7f2a9bb743d0dcc7125e1b5336b0845482e67abd46b1b5cb821e898c3db50767312f3a27e386a0b7046bf068feb23a1b1bf52
+DIST racket-6.0.1-src-builtpkgs.tgz 101425779 SHA256 2b5f2bccb21d408041e167a4476115075c3b230ab50e1d66fe1a3c0ab205bfa1 SHA512 b51fade0afa33b11c4be7da8aec910a8b33bb1cc097748362ecc342b3cd50dcd1c6c52c68c3485b91bddd74a15f8767d357d911151c8cd263a0caa5d72a888a5 WHIRLPOOL d7944c7e1851bb48cc08c29d93763fb0c269ecbc33b59e02bbd6fc1592287376434c0c8c87bada29289d235d7816420170bc6c0f12f684eb9a32a7508342ce0b
+DIST racket-minimal-6.0.1-src-builtpkgs.tgz 9139061 SHA256 f58aa4e3e831417b72d5c19aba20a5b0eaa1111af2f1afa3096b0a4e83b860a3 SHA512 99c7ecf5d7e1de40358a03a5878271e2864fa9e6fe11bab71bd68784bd058a2edbb4ec65ba455dbff2a943c78ec0f9a9b0f46b1532fc1b55be500593160da313 WHIRLPOOL bc3dc19d8c23129866adeb71d125314d66ce2e505d1a453f26c09e9aa42bc98626cba2ddb87d8ae53c7ad5939443defc88c4f1c4ce174567a01b1f56be9788ea
diff --git a/dev-scheme/racket/metadata.xml b/dev-scheme/racket/metadata.xml
new file mode 100644
index 000000000000..5fbf28bf18bb
--- /dev/null
+++ b/dev-scheme/racket/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">
+==Grow your Program==
+Racket's interactive mode encourages experimentation, and quick scripts easily compose into larger systems. Small scripts and large systems both benefit from native-code JIT compilation. When a system gets too big to keep in your head, you can add static types.
+
+==Grow your Language==
+Extend Racket whenever you need to. Mold it to better suit your tasks without sacrificing interoperability with existing libraries and without having to modify the tool chain. When less is more, you can remove parts of a language or start over and build a new one.
+
+==Grow your Skills==
+Whether you're just starting out, want to know more about programming language applications or models, looking to expand your horizons, or ready to dive into research, Racket can help you become a better programmer and system builder.
+ </longdescription>
+ <use>
+ <flag name='backtrace'>
+ Support GC backtrace dumps
+ </flag>
+ <flag name='futures'>
+ Enable racket/future library for fine-grained hardware parallelism
+ </flag>
+ <flag name='places'>
+ Enable racket/place library for share-nothing parallelism and message-passing communication. Compared to futures, places are heavyweight, but they have a simpler performance model.
+ </flag>
+ <flag name='plot'>
+ Enable plot libraries
+ </flag>
+ <flag name='threads'>
+ Enable support for green threads
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-scheme/racket/racket-5.1.2.ebuild b/dev-scheme/racket/racket-5.1.2.ebuild
new file mode 100644
index 000000000000..090b35b69651
--- /dev/null
+++ b/dev-scheme/racket/racket-5.1.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# for live ebuilds uncomment inherit git, comment SRC_URI and empty KEYWORDS
+
+inherit eutils
+#inherit git-2
+
+DESCRIPTION="Racket is a general-purpose programming language with strong support for domain-specific languages"
+HOMEPAGE="http://racket-lang.org/"
+SRC_URI="http://download.racket-lang.org/installers/${PV}/${PN}/${P}-src-unix.tgz"
+#SRC_URI="http://pre.racket-lang.org/installers/plt-${PV}-src-unix.tgz"
+EGIT_REPO_URI="git://git.racket-lang.org/plt.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="backtrace cairo doc futures jit places plot threads X"
+
+RDEPEND="X? ( x11-libs/cairo[X] ) virtual/libffi"
+
+DEPEND="${RDEPEND} !dev-tex/slatex"
+
+EGIT_SOURCEDIR="${WORKDIR}/${P}"
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ #remove bundled libraries
+ rm -rf foreign/libffi/
+
+ sed -e "s,docdir=\"\${datadir}/${PN}/doc,docdir=\"\${datadir}/doc/${PF}," -i configure || die
+}
+
+src_configure() {
+# according to vapier, we should use the bundled libtool
+# such that we don't preclude cross-compile. Thus don't use
+# --enable-lt=/usr/bin/libtool
+ econf \
+ $(use_enable X gracket) \
+ $(use_enable plot) \
+ $(use_enable doc docs) \
+ --enable-shared \
+ $(use_enable jit) \
+ --enable-foreign \
+ $(use_enable places) \
+ $(use_enable futures) \
+ $(use_enable backtrace) \
+ $(use_enable threads pthread) \
+ --disable-perl \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ # deal with slatex
+ insinto /usr/share/texmf/tex/latex/slatex/
+ doins ../collects/slatex/slatex.sty
+
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use X; then
+ newicon ../collects/icons/PLT-206.png drracket.png
+ make_desktop_entry drracket "DrRacket" drracket "Development"
+ fi
+}
diff --git a/dev-scheme/racket/racket-5.2.1.ebuild b/dev-scheme/racket/racket-5.2.1.ebuild
new file mode 100644
index 000000000000..090b35b69651
--- /dev/null
+++ b/dev-scheme/racket/racket-5.2.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# for live ebuilds uncomment inherit git, comment SRC_URI and empty KEYWORDS
+
+inherit eutils
+#inherit git-2
+
+DESCRIPTION="Racket is a general-purpose programming language with strong support for domain-specific languages"
+HOMEPAGE="http://racket-lang.org/"
+SRC_URI="http://download.racket-lang.org/installers/${PV}/${PN}/${P}-src-unix.tgz"
+#SRC_URI="http://pre.racket-lang.org/installers/plt-${PV}-src-unix.tgz"
+EGIT_REPO_URI="git://git.racket-lang.org/plt.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="backtrace cairo doc futures jit places plot threads X"
+
+RDEPEND="X? ( x11-libs/cairo[X] ) virtual/libffi"
+
+DEPEND="${RDEPEND} !dev-tex/slatex"
+
+EGIT_SOURCEDIR="${WORKDIR}/${P}"
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ #remove bundled libraries
+ rm -rf foreign/libffi/
+
+ sed -e "s,docdir=\"\${datadir}/${PN}/doc,docdir=\"\${datadir}/doc/${PF}," -i configure || die
+}
+
+src_configure() {
+# according to vapier, we should use the bundled libtool
+# such that we don't preclude cross-compile. Thus don't use
+# --enable-lt=/usr/bin/libtool
+ econf \
+ $(use_enable X gracket) \
+ $(use_enable plot) \
+ $(use_enable doc docs) \
+ --enable-shared \
+ $(use_enable jit) \
+ --enable-foreign \
+ $(use_enable places) \
+ $(use_enable futures) \
+ $(use_enable backtrace) \
+ $(use_enable threads pthread) \
+ --disable-perl \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ # deal with slatex
+ insinto /usr/share/texmf/tex/latex/slatex/
+ doins ../collects/slatex/slatex.sty
+
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use X; then
+ newicon ../collects/icons/PLT-206.png drracket.png
+ make_desktop_entry drracket "DrRacket" drracket "Development"
+ fi
+}
diff --git a/dev-scheme/racket/racket-5.3.1.ebuild b/dev-scheme/racket/racket-5.3.1.ebuild
new file mode 100644
index 000000000000..090b35b69651
--- /dev/null
+++ b/dev-scheme/racket/racket-5.3.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# for live ebuilds uncomment inherit git, comment SRC_URI and empty KEYWORDS
+
+inherit eutils
+#inherit git-2
+
+DESCRIPTION="Racket is a general-purpose programming language with strong support for domain-specific languages"
+HOMEPAGE="http://racket-lang.org/"
+SRC_URI="http://download.racket-lang.org/installers/${PV}/${PN}/${P}-src-unix.tgz"
+#SRC_URI="http://pre.racket-lang.org/installers/plt-${PV}-src-unix.tgz"
+EGIT_REPO_URI="git://git.racket-lang.org/plt.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="backtrace cairo doc futures jit places plot threads X"
+
+RDEPEND="X? ( x11-libs/cairo[X] ) virtual/libffi"
+
+DEPEND="${RDEPEND} !dev-tex/slatex"
+
+EGIT_SOURCEDIR="${WORKDIR}/${P}"
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ #remove bundled libraries
+ rm -rf foreign/libffi/
+
+ sed -e "s,docdir=\"\${datadir}/${PN}/doc,docdir=\"\${datadir}/doc/${PF}," -i configure || die
+}
+
+src_configure() {
+# according to vapier, we should use the bundled libtool
+# such that we don't preclude cross-compile. Thus don't use
+# --enable-lt=/usr/bin/libtool
+ econf \
+ $(use_enable X gracket) \
+ $(use_enable plot) \
+ $(use_enable doc docs) \
+ --enable-shared \
+ $(use_enable jit) \
+ --enable-foreign \
+ $(use_enable places) \
+ $(use_enable futures) \
+ $(use_enable backtrace) \
+ $(use_enable threads pthread) \
+ --disable-perl \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ # deal with slatex
+ insinto /usr/share/texmf/tex/latex/slatex/
+ doins ../collects/slatex/slatex.sty
+
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use X; then
+ newicon ../collects/icons/PLT-206.png drracket.png
+ make_desktop_entry drracket "DrRacket" drracket "Development"
+ fi
+}
diff --git a/dev-scheme/racket/racket-5.3.2.ebuild b/dev-scheme/racket/racket-5.3.2.ebuild
new file mode 100644
index 000000000000..e5aeb2adc095
--- /dev/null
+++ b/dev-scheme/racket/racket-5.3.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# for live ebuilds uncomment inherit git, comment SRC_URI and empty KEYWORDS
+
+inherit eutils
+#inherit git-2
+
+DESCRIPTION="Racket is a general-purpose programming language with strong support for domain-specific languages"
+HOMEPAGE="http://racket-lang.org/"
+SRC_URI="http://download.racket-lang.org/installers/${PV}/${PN}/${P}-src-unix.tgz"
+#SRC_URI="http://pre.racket-lang.org/installers/plt-${PV}-src-unix.tgz"
+EGIT_REPO_URI="git://git.racket-lang.org/plt.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="backtrace cairo doc futures jit places plot threads X"
+
+RDEPEND="dev-db/sqlite:3 X? ( x11-libs/cairo[X] ) virtual/libffi"
+
+DEPEND="${RDEPEND} !dev-tex/slatex"
+
+EGIT_SOURCEDIR="${WORKDIR}/${P}"
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ #remove bundled libraries
+ rm -rf foreign/libffi/
+
+ sed -e "s,docdir=\"\${datadir}/${PN}/doc,docdir=\"\${datadir}/doc/${PF}," -i configure || die
+}
+
+src_configure() {
+# according to vapier, we should use the bundled libtool
+# such that we don't preclude cross-compile. Thus don't use
+# --enable-lt=/usr/bin/libtool
+ econf \
+ $(use_enable X gracket) \
+ $(use_enable plot) \
+ $(use_enable doc docs) \
+ --enable-shared \
+ $(use_enable jit) \
+ --enable-foreign \
+ $(use_enable places) \
+ $(use_enable futures) \
+ $(use_enable backtrace) \
+ $(use_enable threads pthread) \
+ --disable-perl \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ # deal with slatex
+ insinto /usr/share/texmf/tex/latex/slatex/
+ doins ../collects/slatex/slatex.sty
+
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use X; then
+ newicon ../collects/icons/PLT-206.png drracket.png
+ make_desktop_entry drracket "DrRacket" drracket "Development"
+ fi
+}
diff --git a/dev-scheme/racket/racket-5.3.3.ebuild b/dev-scheme/racket/racket-5.3.3.ebuild
new file mode 100644
index 000000000000..e5aeb2adc095
--- /dev/null
+++ b/dev-scheme/racket/racket-5.3.3.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# for live ebuilds uncomment inherit git, comment SRC_URI and empty KEYWORDS
+
+inherit eutils
+#inherit git-2
+
+DESCRIPTION="Racket is a general-purpose programming language with strong support for domain-specific languages"
+HOMEPAGE="http://racket-lang.org/"
+SRC_URI="http://download.racket-lang.org/installers/${PV}/${PN}/${P}-src-unix.tgz"
+#SRC_URI="http://pre.racket-lang.org/installers/plt-${PV}-src-unix.tgz"
+EGIT_REPO_URI="git://git.racket-lang.org/plt.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="backtrace cairo doc futures jit places plot threads X"
+
+RDEPEND="dev-db/sqlite:3 X? ( x11-libs/cairo[X] ) virtual/libffi"
+
+DEPEND="${RDEPEND} !dev-tex/slatex"
+
+EGIT_SOURCEDIR="${WORKDIR}/${P}"
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ #remove bundled libraries
+ rm -rf foreign/libffi/
+
+ sed -e "s,docdir=\"\${datadir}/${PN}/doc,docdir=\"\${datadir}/doc/${PF}," -i configure || die
+}
+
+src_configure() {
+# according to vapier, we should use the bundled libtool
+# such that we don't preclude cross-compile. Thus don't use
+# --enable-lt=/usr/bin/libtool
+ econf \
+ $(use_enable X gracket) \
+ $(use_enable plot) \
+ $(use_enable doc docs) \
+ --enable-shared \
+ $(use_enable jit) \
+ --enable-foreign \
+ $(use_enable places) \
+ $(use_enable futures) \
+ $(use_enable backtrace) \
+ $(use_enable threads pthread) \
+ --disable-perl \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ # deal with slatex
+ insinto /usr/share/texmf/tex/latex/slatex/
+ doins ../collects/slatex/slatex.sty
+
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use X; then
+ newicon ../collects/icons/PLT-206.png drracket.png
+ make_desktop_entry drracket "DrRacket" drracket "Development"
+ fi
+}
diff --git a/dev-scheme/racket/racket-5.3.4.ebuild b/dev-scheme/racket/racket-5.3.4.ebuild
new file mode 100644
index 000000000000..28e2c0c8c91a
--- /dev/null
+++ b/dev-scheme/racket/racket-5.3.4.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# for live ebuilds uncomment inherit git, comment SRC_URI and empty KEYWORDS
+
+inherit eutils
+#inherit git-2
+
+DESCRIPTION="Racket is a general-purpose programming language with strong support for domain-specific languages"
+HOMEPAGE="http://racket-lang.org/"
+SRC_URI="http://download.racket-lang.org/installers/${PV}/${PN}/${P}-src-unix.tgz"
+#SRC_URI="http://pre.racket-lang.org/installers/plt-${PV}-src-unix.tgz"
+EGIT_REPO_URI="git://git.racket-lang.org/plt.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="backtrace cairo doc futures jit places plot threads X"
+
+RDEPEND="dev-db/sqlite:3 x11-libs/cairo[X?] virtual/libffi"
+
+# see bug 426316: racket/draw (which depends on cairo) is sometimes used in compile-time code or when rendering documentation
+DEPEND="${RDEPEND} x11-libs/cairo !dev-tex/slatex"
+
+EGIT_SOURCEDIR="${WORKDIR}/${P}"
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ #remove bundled libraries
+ rm -rf foreign/libffi/
+
+ sed -e "s,docdir=\"\${datadir}/${PN}/doc,docdir=\"\${datadir}/doc/${PF}," -i configure || die
+}
+
+src_configure() {
+# according to vapier, we should use the bundled libtool
+# such that we don't preclude cross-compile. Thus don't use
+# --enable-lt=/usr/bin/libtool
+ econf \
+ $(use_enable X gracket) \
+ $(use_enable plot) \
+ $(use_enable doc docs) \
+ --enable-shared \
+ $(use_enable jit) \
+ --enable-foreign \
+ $(use_enable places) \
+ $(use_enable futures) \
+ $(use_enable backtrace) \
+ $(use_enable threads pthread) \
+ --disable-perl \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ # deal with slatex
+ insinto /usr/share/texmf/tex/latex/slatex/
+ doins ../collects/slatex/slatex.sty
+
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use X; then
+ newicon ../collects/icons/PLT-206.png drracket.png
+ make_desktop_entry drracket "DrRacket" drracket "Development"
+ fi
+}
diff --git a/dev-scheme/racket/racket-5.3.6.ebuild b/dev-scheme/racket/racket-5.3.6.ebuild
new file mode 100644
index 000000000000..b1212581dfa6
--- /dev/null
+++ b/dev-scheme/racket/racket-5.3.6.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# for live ebuilds uncomment inherit git, comment SRC_URI and empty KEYWORDS
+
+inherit eutils
+#inherit git-2
+
+DESCRIPTION="Racket is a general-purpose programming language with strong support for domain-specific languages"
+HOMEPAGE="http://racket-lang.org/"
+SRC_URI="http://download.racket-lang.org/installers/${PV}/${PN}/${P}-src-unix.tgz"
+#SRC_URI="http://pre.racket-lang.org/installers/plt-${PV}-src-unix.tgz"
+EGIT_REPO_URI="git://git.racket-lang.org/plt.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="backtrace cairo doc futures jit places plot threads X"
+
+RDEPEND="dev-db/sqlite:3 x11-libs/cairo[X?] virtual/libffi"
+
+# see bug 426316: racket/draw (which depends on cairo) is sometimes used in compile-time code or when rendering documentation
+DEPEND="${RDEPEND} x11-libs/cairo !dev-tex/slatex"
+
+EGIT_SOURCEDIR="${WORKDIR}/${P}"
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ #remove bundled libraries
+ rm -rf foreign/libffi/
+
+ sed -e "s,docdir=\"\${datadir}/${PN}/doc,docdir=\"\${datadir}/doc/${PF}," -i configure || die
+}
+
+src_configure() {
+# according to vapier, we should use the bundled libtool
+# such that we don't preclude cross-compile. Thus don't use
+# --enable-lt=/usr/bin/libtool
+ econf \
+ $(use_enable X gracket) \
+ $(use_enable plot) \
+ $(use_enable doc docs) \
+ --enable-shared \
+ $(use_enable jit) \
+ --enable-foreign \
+ $(use_enable places) \
+ $(use_enable futures) \
+ $(use_enable backtrace) \
+ $(use_enable threads pthread) \
+ --disable-perl \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ # deal with slatex
+ insinto /usr/share/texmf/tex/latex/slatex/
+ doins ../collects/slatex/slatex.sty
+
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use X; then
+ newicon ../collects/icons/PLT-206.png drracket.png
+ make_desktop_entry drracket "DrRacket" drracket "Development"
+ fi
+}
diff --git a/dev-scheme/racket/racket-6.0.1.ebuild b/dev-scheme/racket/racket-6.0.1.ebuild
new file mode 100644
index 000000000000..845364807c74
--- /dev/null
+++ b/dev-scheme/racket/racket-6.0.1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# for live ebuilds uncomment inherit git-2, comment SRC_URI and empty KEYWORDS
+
+inherit eutils pax-utils
+#inherit git-2
+
+DESCRIPTION="Racket is a general-purpose programming language with strong support for domain-specific languages"
+HOMEPAGE="http://racket-lang.org/"
+SRC_URI="minimal? ( http://download.racket-lang.org/installers/${PV}/${PN}-minimal-${PV}-src-builtpkgs.tgz ) !minimal? ( http://download.racket-lang.org/installers/${PV}/${P}-src-builtpkgs.tgz )"
+#SRC_URI="http://pre.racket-lang.org/installers/plt-${PV}-src-unix.tgz"
+EGIT_REPO_URI="git://git.racket-lang.org/plt.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc +futures +jit minimal +places +threads +X"
+REQUIRED_USE="futures? ( jit )"
+
+# see bug 426316: racket/draw (which depends on cairo) is sometimes used in compile-time code or when rendering documentation
+RDEPEND="dev-db/sqlite:3 x11-libs/cairo[X?] virtual/libffi"
+DEPEND="${RDEPEND}"
+
+EGIT_SOURCEDIR="${WORKDIR}/${P}"
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ #remove bundled libraries
+ rm -rf foreign/libffi/
+}
+
+src_configure() {
+# according to vapier, we should use the bundled libtool
+# such that we don't preclude cross-compile. Thus don't use
+# --enable-lt=/usr/bin/libtool
+ econf \
+ $(use_enable X gracket) \
+ $(use_enable doc docs) \
+ --enable-shared \
+ $(use_enable jit) \
+ --enable-foreign \
+ $(use_enable places) \
+ $(use_enable futures) \
+ $(use_enable threads pthread)
+}
+
+src_compile() {
+ if use jit; then
+ pushd racket
+ emake cgc
+ pax-mark m .libs/racketcgc
+ emake 3m
+ pax-mark m .libs/racket3m
+ popd
+ fi
+ emake
+}
+
+src_install() {
+ #racket now comes with desktop files, but DESTDIR is mishandled
+ for f in /usr/share/applications/{drracket,slideshow}.desktop; do
+ sed -ie "s|${D}||" "${D}/${f}"
+ done
+
+ emake DESTDIR="${D}" install
+}
diff --git a/dev-scheme/scheme48/Manifest b/dev-scheme/scheme48/Manifest
new file mode 100644
index 000000000000..e47464f58f2f
--- /dev/null
+++ b/dev-scheme/scheme48/Manifest
@@ -0,0 +1,2 @@
+DIST scheme48-1.8.tgz 3173151 SHA256 04a61ea28ef9d1f2f0e281fd6eb503f10afc94b0d3f34dbf376aedbe93eb1bb3 SHA512 1cae01ef1e282971ad0bad308a4d75fe24dcc629b09f711b54811d843f85f02cf3a728d19d44cdcc2699d071b27b2a0fb40c0ebb3a08db0f06a115e53e8b9e47 WHIRLPOOL c6748848df241d978c569768e39d0dced7c8a356342017e9777c018a63d38fe51f0eb28de3d2b34165a7c3658fb5f7dd4a72de1d1f585b9ea03b5ea5a33b5128
+DIST scheme48-1.9.2.tgz 3951356 SHA256 9c4921a90e95daee067cd2e9cc0ffe09e118f4da01c0c0198e577c4f47759df4 SHA512 a854e3c6f5b02c585fa125899dee276500b91e21cc773202fd4cb84f2e0566a0e19cc34b5f96a3265fab6bf06422e869a2e48433eb2d8fac83a1179fda62e2d1 WHIRLPOOL 6774a5488172b905577cfedabf454e54ec175df7582ea607ce99b39f6cedfa24366ecf1bcec3d60bc35132d483316cd192dcd9773e6d37af59c71de7ac0eed88
diff --git a/dev-scheme/scheme48/files/50scheme48-gentoo.el b/dev-scheme/scheme48/files/50scheme48-gentoo.el
new file mode 100644
index 000000000000..fe378e6a7081
--- /dev/null
+++ b/dev-scheme/scheme48/files/50scheme48-gentoo.el
@@ -0,0 +1,10 @@
+;;; scheme48 site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+
+(setq scheme-program-name "scheme48")
+(autoload 'run-scheme
+ "cmuscheme48"
+ "Run an inferior Scheme process."
+ t)
+
diff --git a/dev-scheme/scheme48/files/scheme48-1.8-as-needed+fix_destdir.patch b/dev-scheme/scheme48/files/scheme48-1.8-as-needed+fix_destdir.patch
new file mode 100644
index 000000000000..a6e050326871
--- /dev/null
+++ b/dev-scheme/scheme48/files/scheme48-1.8-as-needed+fix_destdir.patch
@@ -0,0 +1,31 @@
+--- Makefile.in.orig 2008-06-30 20:01:49.000000000 +0300
++++ Makefile.in 2008-06-30 20:08:12.000000000 +0300
+@@ -8,7 +8,7 @@
+ VPATH = @srcdir@
+ CC = @CC@
+ LD = @LD@
+-DEFS = @DEFS@ -D__COMPILING_SCHEME48_ITSELF__ -DS48_HOST_ARCHITECTURE=\"$(HOST_ARCHITECTURE)\"
++DEFS = @DEFS@ -D_GNU_SOURCE -D__COMPILING_SCHEME48_ITSELF__ -DS48_HOST_ARCHITECTURE=\"$(HOST_ARCHITECTURE)\"
+ LIBS = @LIBS@
+ CFLAGS = @CFLAGS@
+ CPPFLAGS =
+@@ -286,8 +286,8 @@
+ c/scheme48.exp c/scheme48.def
+ $(CC) $(LDFLAGS) $(LDFLAGS_VM) $(CFLAGS) -o $@ c/main.o \
+ $(OBJS) $(GC_OBJS) $(UNIX_OBJS) \
+- $(LIBOBJS) $(LIBS) \
+- $(EXTERNAL_OBJECTS)
++ $(LIBOBJS) \
++ $(EXTERNAL_OBJECTS) $(LIBS)
+ # Cygwin
+ if test -x /usr/bin/dlltool; then \
+ dlltool --dllname $(VM).exe --output-lib $(VM).a --def $(srcdir)/c/scheme48.def; \
+@@ -409,7 +409,7 @@
+ done
+
+ inst-config-script:
+- config_script=$(bindir)/$(CONFIG_SCRIPT) && \
++ config_script=$(DESTDIR)$(bindir)/$(CONFIG_SCRIPT) && \
+ sed -e 's,@incdir\@,$(incdir),g' \
+ -e 's,@libdir\@,$(libdir),g' \
+ -e 's,@CC\@,$(CC),g' \
diff --git a/dev-scheme/scheme48/metadata.xml b/dev-scheme/scheme48/metadata.xml
new file mode 100644
index 000000000000..150a7384a382
--- /dev/null
+++ b/dev-scheme/scheme48/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>scheme</herd>
+<longdescription lang="en">
+Scheme 48 is an implementation of Scheme written by Richard Kelsey and Jonathan
+Rees. It is based on a byte-code interpreter and is designed to be used as a
+testbed for experiments in implementation techniques and as an expository tool.
+</longdescription>
+</pkgmetadata>
+
diff --git a/dev-scheme/scheme48/scheme48-1.8-r2.ebuild b/dev-scheme/scheme48/scheme48-1.8-r2.ebuild
new file mode 100644
index 000000000000..9236dbef3534
--- /dev/null
+++ b/dev-scheme/scheme48/scheme48-1.8-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit elisp-common multilib eutils flag-o-matic
+
+DESCRIPTION="Scheme48 is an implementation of the Scheme Programming Language"
+HOMEPAGE="http://www.s48.org/"
+SRC_URI="http://www.s48.org/${PV}/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="doc emacs"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND="${DEPEND}"
+SITEFILE=50scheme48-gentoo.el
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-as-needed+fix_destdir.patch"
+ sed -i -e "s/\$(LD) /&\$(LFLAGS) /" Makefile.in || die #332007
+}
+
+src_compile() {
+ emake LFLAGS="$(raw-ldflags)"
+ if use emacs; then
+ elisp-compile "${S}"/emacs/cmuscheme48.el
+ fi
+}
+
+src_install() {
+ # weird parallel failures!
+ emake -j1 DESTDIR="${D}" install
+
+ if use emacs; then
+ elisp-install ${PN} emacs/cmuscheme48.el emacs/*.elc
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/manual.ps doc/manual.pdf doc/*.txt
+ dohtml -r doc/html/*
+ docinto src
+ dodoc doc/src/*
+ fi
+
+ #this symlink clashes with gambit
+ rm "${ED}"/usr/bin/scheme-r5rs || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/scheme48/scheme48-1.9.2.ebuild b/dev-scheme/scheme48/scheme48-1.9.2.ebuild
new file mode 100644
index 000000000000..80ef610bb3e5
--- /dev/null
+++ b/dev-scheme/scheme48/scheme48-1.9.2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit elisp-common multilib eutils flag-o-matic
+
+DESCRIPTION="Scheme48 is an implementation of the Scheme Programming Language"
+HOMEPAGE="http://www.s48.org/"
+SRC_URI="http://www.s48.org/${PV}/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="doc emacs"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND="${DEPEND}"
+SITEFILE=50scheme48-gentoo.el
+
+src_configure() {
+ append-cflags -fno-strict-aliasing
+ econf --docdir=/usr/share/doc/${P}
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ elisp-compile "${S}"/emacs/cmuscheme48.el
+ fi
+}
+
+src_install() {
+ # weird parallel failures!
+ emake -j1 DESTDIR="${D}" install
+
+ if use emacs; then
+ elisp-install ${PN} emacs/cmuscheme48.el emacs/*.elc
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/*.txt
+ docinto src
+ dodoc doc/src/*
+ pushd "${ED}/usr/share/doc/${P}" > /dev/null
+ install -dm755 html
+ mv *.html *.css *.gif html/
+ popd > /dev/null
+ else
+ pushd "${ED}/usr/share/doc/${P}" > /dev/null
+ rm -f *.html *.css *.gif
+ rm -f manu*
+ popd > /dev/null
+ fi
+
+ #this symlink clashes with gambit
+ rm "${ED}"/usr/bin/scheme-r5rs || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/schemik/Manifest b/dev-scheme/schemik/Manifest
new file mode 100644
index 000000000000..fc00b3fcf14e
--- /dev/null
+++ b/dev-scheme/schemik/Manifest
@@ -0,0 +1 @@
+DIST schemik-1.2.40.0.tar.gz 132603 SHA256 cadee740b9b651dd52c384ef8356cefa9b326d15bf69a3f0344e9303c6975ab1
diff --git a/dev-scheme/schemik/files/schemik-1.2.40.0-asneeded.patch b/dev-scheme/schemik/files/schemik-1.2.40.0-asneeded.patch
new file mode 100644
index 000000000000..07083e6e96e8
--- /dev/null
+++ b/dev-scheme/schemik/files/schemik-1.2.40.0-asneeded.patch
@@ -0,0 +1,15 @@
+Fixing build with as-needed, respect LDFLAGS
+
+http://bugs.gentoo.org/show_bug.cgi?id=330623
+
+--- Makefile
++++ Makefile
+@@ -4,7 +4,7 @@
+ STATIC_NAME="schemik-i686-linux-static"
+
+ all: stack_eval.o types.o functions.o env.o initial_env.o schemik.c rt.o int_funcs.o readline_wrapper.o config.h thread_pool.o parser.o lexer.o errors.o
+- $(CC) ${COMP_ARGS} `pkg-config --libs --cflags glib-2.0` -o schemik stack_eval.o types.o int_funcs.o functions.o env.o initial_env.o rt.o readline_wrapper.o thread_pool.o parser.o lexer.o errors.o schemik.c -lgc -lpthread -lreadline -lncurses -lm
++ $(CC) $(LDFLAGS) ${COMP_ARGS} -o schemik stack_eval.o types.o int_funcs.o functions.o env.o initial_env.o rt.o readline_wrapper.o thread_pool.o parser.o lexer.o errors.o schemik.c -lgc -lpthread -lreadline -lncurses -lm `pkg-config --libs --cflags glib-2.0`
+
+ stack_eval.o: stack_eval.c eval.h vm.h vm.c stack.c stack.h int_funcs.h functions.h rt.h mutex.h types.h config.h dump_vm.c tm_log.c tm_log.h constants.def
+ $(CC) ${COMP_ARGS} `pkg-config --cflags glib-2.0` -c stack_eval.c
diff --git a/dev-scheme/schemik/metadata.xml b/dev-scheme/schemik/metadata.xml
new file mode 100644
index 000000000000..a87597a84f29
--- /dev/null
+++ b/dev-scheme/schemik/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">
+ Schemik is a high-level lexically-scoped implicitly-parallel dialect of
+ Scheme and Common LISP, this means the parallel execution of programs is
+ done independently of the programmer and each program written in Schemik
+ always produces the same results no matter which parts of the program are
+ executed simultaneously.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">schemik</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/schemik/schemik-1.2.40.0.ebuild b/dev-scheme/schemik/schemik-1.2.40.0.ebuild
new file mode 100644
index 000000000000..693896be8315
--- /dev/null
+++ b/dev-scheme/schemik/schemik-1.2.40.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit toolchain-funcs versionator eutils
+
+DESCRIPTION="High-level lexically-scoped implicitly-parallel dialect of Scheme and Common LISP"
+HOMEPAGE="http://schemik.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/boehm-gc
+ >=dev-libs/glib-2.0
+ sys-libs/readline"
+
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-asneeded.patch
+ sed -i -e 's/\(COMP_ARGS=\)-g \(-Wall -Winline\) -O2/\1$(CFLAGS) \2/' \
+ Makefile || die "patching Makefile failed"
+}
+
+src_compile() {
+ emake CC=$(tc-getCC)|| die "emake failed"
+}
+
+src_install() {
+ dobin schemik || die "dobin failed"
+ insinto "/usr/share/${PN}/$(get_version_component_range 1-2)"
+ doins "scm/base.scm" || die "Standard library installation failed"
+ dodoc ChangeLog README || die "dodoc failed"
+ doman doc/man/schemik.1.gz || die "doman failed"
+}
diff --git a/dev-scheme/schoca/Manifest b/dev-scheme/schoca/Manifest
new file mode 100644
index 000000000000..e2f138d126e9
--- /dev/null
+++ b/dev-scheme/schoca/Manifest
@@ -0,0 +1 @@
+DIST schoca-0.3.0.tar.bz2 49738 SHA256 5527a8bf07faa7e715626612735a044bf970480637d98eea612bf61bb7042511
diff --git a/dev-scheme/schoca/metadata.xml b/dev-scheme/schoca/metadata.xml
new file mode 100644
index 000000000000..44caaf8cc89a
--- /dev/null
+++ b/dev-scheme/schoca/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <herd>ml</herd>
+ <longdescription lang="en">
+ Schoca is an implementation of the Scheme language. The primary
+ purpose of Schoca is the use as an embedded extension language
+ in OCaml applications (e.g. the ibgsclient).
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">chesslib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/schoca/schoca-0.3.0.ebuild b/dev-scheme/schoca/schoca-0.3.0.ebuild
new file mode 100644
index 000000000000..2aa501a645c4
--- /dev/null
+++ b/dev-scheme/schoca/schoca-0.3.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils
+
+DESCRIPTION="Schoca is a Scheme implementation in OCaml"
+HOMEPAGE="http://sourceforge.net/projects/chesslib/"
+SRC_URI="mirror://sourceforge/chesslib/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+ocamlopt"
+
+DEPEND="dev-ml/findlib
+ dev-lang/ocaml[ocamlopt?]
+ || ( dev-ml/camlp4[ocamlopt?] <dev-lang/ocaml-4.02.0 )"
+RDEPEND="${DEPEND}"
+
+RESTRICT="installsources"
+
+src_configure() {
+ sed "s:\$(CFLAGS):\$(CCFLAGS):g" -i OCaml.mk || die "sed failed"
+ sed "s:CCFLAGS= -ccopt -O2:CCFLAGS= -ccopt \"${CFLAGS}\":" -i OCaml.mk || die "sed failed"
+ sed -i -e "s:\$(LDFLAGS):-cclib \"${LDFLAGS}\":" OCaml.mk || die "sed failed"
+ sed -i -e "s:DESTDURFLAG:DESTDIRFLAG:" OCaml.mk || die "sed failed"
+ if ! use ocamlopt; then
+ sed -i -e 's/ \$(PROGRAM)\.opt/ \$(PROGRAM)/' OCaml.mk || die "sed failed"
+ sed -i -e 's/ \$(LIBRARY)\.cmxa//' OCaml.mk || die "sed failed"
+ sed -i -e 's/ \$(LIBRARY)\.a//' OCaml.mk || die "sed failed"
+ sed -i -e 's/) \$(NCOBJECTS)/)/' OCaml.mk || die "sed failed"
+ fi
+}
+
+src_compile() {
+ #parallel fails
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ use ocamlopt || export STRIP_MASK="*bin/schoca"
+ dodir "$(ocamlfind printconf destdir)" || die "dodir failed"
+ emake PREFIX="/usr" DESTDIR="${D}" DESTDIRFLAG="-destdir ${D}$(ocamlfind printconf destdir)" install || die "emake install failed"
+}
diff --git a/dev-scheme/scm/Manifest b/dev-scheme/scm/Manifest
new file mode 100644
index 000000000000..4adb984d6ec2
--- /dev/null
+++ b/dev-scheme/scm/Manifest
@@ -0,0 +1 @@
+DIST scm-5e6.zip 912968 SHA256 97f1b284aacfca01ae44e936dd8468c1d68b0b323776ab5da1d6ec7cb737c1df
diff --git a/dev-scheme/scm/files/scm-5.5.6-multiplefixes.patch b/dev-scheme/scm/files/scm-5.5.6-multiplefixes.patch
new file mode 100644
index 000000000000..8636c47c7185
--- /dev/null
+++ b/dev-scheme/scm/files/scm-5.5.6-multiplefixes.patch
@@ -0,0 +1,81 @@
+diff -Naur scm.old//build.scm scm//build.scm
+--- scm.old//build.scm 2009-08-03 15:35:57.000000000 -0300
++++ scm//build.scm 2010-04-16 15:52:25.000000000 -0300
+@@ -540,7 +540,7 @@
+ (graphics *unknown* "-I/usr/X11/include -DX11" "-lX11"
+ "/usr/X11/lib/libX11.sa" () ())
+ (editline *unknown* "" "-lreadline" "/usr/lib/libreadline.a" () ())
+- (termcap *unknown* "" "-ltermcap" "/usr/lib/libtermcap.a" () ())
++ (termcap *unknown* "" "-lncurses" "/usr/lib/libncurses.a" () ())
+ (debug *unknown* "-g" "-g" #f () ())
+ (socket *unknown* "" "" #f () ())
+ (lib *unknown* "" "" #f () ("scmmain.c"))
+diff -Naur scm.old//Makefile scm//Makefile
+--- scm.old//Makefile 2009-08-03 15:38:21.000000000 -0300
++++ scm//Makefile 2010-04-16 15:51:11.000000000 -0300
+@@ -178,18 +178,9 @@
+ $(BUILD) -f udscm4.opt -o udscm4 -s $(IMPLPATH)
+ -rm $(ofiles) scmmain.o
+ dscm4: udscm4 $(ifiles) require.scm
+- if [ -f /proc/sys/kernel/randomize_va_space -a\
+- "`cat /proc/sys/kernel/randomize_va_space`" != "0" ]; then {\
+- cat /proc/sys/kernel/randomize_va_space > randomize_va_space.tmp;\
+- echo 0 > /proc/sys/kernel/randomize_va_space;\
+- } fi
+ -rm -f slibcat implcat scm~
+ -mv scm scm~
+ echo "(quit)" | $(SETARCH) ./udscm4 -no-init-file -o scm
+- if [ -f randomize_va_space.tmp ]; then {\
+- cat randomize_va_space.tmp > /proc/sys/kernel/randomize_va_space;\
+- rm randomize_va_space.tmp;\
+- } fi
+
+ # dumpable R5RS interpreter
+ udscm5.opt:
+@@ -199,20 +190,10 @@
+ udscm5: $(cfiles) $(ufiles) $(hfiles) build.scm build udscm5.opt
+ $(BUILD) -f udscm5.opt -o udscm5 -s $(IMPLPATH)
+ -rm $(ofiles) scmmain.o
+- strip udscm5
+ dscm5: udscm5 $(ifiles) require.scm
+- if [ -f /proc/sys/kernel/randomize_va_space -a\
+- "`cat /proc/sys/kernel/randomize_va_space`" != "0" ]; then {\
+- cat /proc/sys/kernel/randomize_va_space > randomize_va_space.tmp;\
+- echo 0 > /proc/sys/kernel/randomize_va_space;\
+- } fi
+ -rm -f slibcat implcat scm~
+ -mv scm scm~
+ echo "(quit)" | $(SETARCH) ./udscm5 -no-init-file -r5 -o scm
+- if [ -f randomize_va_space.tmp ]; then {\
+- cat randomize_va_space.tmp > /proc/sys/kernel/randomize_va_space;\
+- rm randomize_va_space.tmp;\
+- } fi
+ $(MAKE) check
+ $(MAKE) checkmacro
+
+@@ -394,7 +375,7 @@
+ PREVDOCS = prevdocs/
+ html: $(htmldir)scm_toc.html $(htmldir)Xlibscm_toc.html $(htmldir)hobbit_toc.html
+
+-TEXI2HTML = /usr/local/bin/texi2html -split -verbose
++TEXI2HTML = /usr/bin/texi2html -split -verbose
+
+ $(htmldir)scm_toc.html: Makefile $(texifiles)
+ ${TEXI2HTML} scm.texi
+@@ -431,7 +412,7 @@
+
+ rpm_prefix=$(HOME)/rpmbuild/
+
+-prefix = /usr/local/
++prefix = /usr/
+ exec_prefix = $(prefix)
+ # directory where `make install' will put executable.
+ bindir = $(exec_prefix)bin/
+@@ -498,7 +479,6 @@
+ mkdir -p $(DESTDIR)$(bindir)
+ mkdir -p $(DESTDIR)$(man1dir)
+ -cp scm scmlit $(DESTDIR)$(bindir)
+- -strip $(DESTDIR)$(bindir)scmlit
+ -cp scm.1 $(DESTDIR)$(man1dir)
+ mkdir -p $(DESTDIR)$(libscmdir)
+ test -f $(DESTDIR)$(libscmdir)require.scm || \
diff --git a/dev-scheme/scm/metadata.xml b/dev-scheme/scm/metadata.xml
new file mode 100644
index 000000000000..f2fe873e0abe
--- /dev/null
+++ b/dev-scheme/scm/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">
+SCM is a Scheme implementation conforming to Revised5 Report on the Algorithmic Language Scheme and the IEEE P1178 specification.
+ </longdescription>
+ <use>
+ <flag name='arrays'>Support for arrays, uniform-arrays and
+ uniform-vectors.</flag>
+ <flag name='bignums'>Support for large precision integers.</flag>
+ <flag name='cautious'>SCM will always check the number of arguments to
+ interpreted closures.</flag>
+ <flag name='dynamic-linking'>Be able to load compiled files while
+ running.</flag>
+ <flag name='engineering-notation'>Floats to display in engineering
+ notation (exponents always multiples of 3) instead of scientific
+ notation.</flag>
+ <flag name='gsubr'>generalized c arguments: for arbitrary
+ (more then 11) arguments to C functions.</flag>
+ <flag name='inexact'>Support for floating point numbers.</flag>
+ <flag name='ioext'>Commonly available I/O extensions: line I/O, file
+ positioning, file delete and rename, and directory functions.</flag>
+ <flag name='macro'>C level support for hygienic and referentially
+ transparent macros (syntax-rules macros).</flag>
+ <flag name='regex'>String regular expression matching.</flag>
+ <flag name='unix'>Support for: nice, acct, lstat, readlink, symlink,
+ mknod and sync.</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-scheme/scm/scm-5.5.6.ebuild b/dev-scheme/scm/scm-5.5.6.ebuild
new file mode 100644
index 000000000000..fbcefdf71706
--- /dev/null
+++ b/dev-scheme/scm/scm-5.5.6.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit versionator eutils flag-o-matic multilib
+
+#version magic thanks to masterdriverz and UberLord using bash array instead of tr
+trarr="0abcdefghi"
+MY_PV="$(get_version_component_range 1)${trarr:$(get_version_component_range 2):1}$(get_version_component_range 3)"
+
+MY_P=${PN}-${MY_PV}
+S=${WORKDIR}/${PN}
+DESCRIPTION="SCM is a Scheme implementation from the author of slib"
+SRC_URI="http://groups.csail.mit.edu/mac/ftpdir/scm/${MY_P}.zip"
+HOMEPAGE="http://swiss.csail.mit.edu/~jaffer/SCM"
+
+SLOT="0"
+LICENSE="LGPL-3"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
+IUSE="arrays bignums cautious dynamic-linking engineering-notation gsubr inexact
+ioext macro ncurses posix readline regex sockets unix"
+
+#unzip for unpacking
+DEPEND="app-arch/unzip
+ >=dev-scheme/slib-3.1.5
+ dev-util/cproto
+ ncurses? ( sys-libs/ncurses )
+ readline? ( sys-libs/libtermcap-compat )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-multiplefixes.patch
+}
+
+src_compile() {
+ # SLIB is required to build SCM.
+ local slibpath="${EPREFIX}/usr/share/slib/"
+ if [ -n "$SCHEME_LIBRARY_PATH" ]; then
+ einfo "using SLIB $SCHEME_LIBRARY_PATH"
+ elif [ -d ${slibpath} ]; then
+ export SCHEME_LIBRARY_PATH=${slibpath}
+ fi
+
+ einfo "Making scmlit"
+ emake -j1 scmlit clean || die "faild to build scmlit"
+
+ einfo "Building scm"
+ local features=""
+ use arrays && features+="arrays"
+ use bignums && features+=" bignums"
+ use cautious && features+=" cautious"
+ use engineering-notation && features+=" engineering-notation"
+ use inexact && features+=" inexact"
+ use macro && features+=" macro"
+
+ ( use readline ||
+ use ncurses ||
+ use regex ||
+ use posix ||
+ use ioext ||
+ use gsubr ||
+ use sockets ||
+ use unix ||
+ use dynamic-linking ) && features+=" dynamic-linking"
+
+ ./build \
+ --compiler-options="${CFLAGS}" \
+ --linker-options="${LDFLAGS} -L${EPREFIX}/$(get_libdir)" \
+ -s "${EPREFIX}"/usr/$(get_libdir)/scm \
+ -F ${features:="none"} \
+ -h system \
+ -o scm || die
+
+ einfo "Building DLLs"
+ if use readline; then
+ ./build \
+ --compiler-options="${CFLAGS}" \
+ --linker-options="${LDFLAGS}" \
+ -h system \
+ -F edit-line \
+ -t dll || die
+ fi
+ if use ncurses ; then
+ ./build \
+ --compiler-options="${CFLAGS}" \
+ --linker-options="${LDFLAGS}" \
+ -F curses \
+ -h system \
+ -t dll || die
+ fi
+ if use regex ; then
+ ./build \
+ --compiler-options="${CFLAGS}" \
+ --linker-options="${LDFLAGS}" \
+ -c rgx.c \
+ -h system \
+ -t dll || die
+ fi
+ if use gsubr ; then
+ ./build \
+ --compiler-options="${CFLAGS}" \
+ --linker-options="${LDFLAGS}" \
+ -c gsubr.c \
+ -h system \
+ -t dll || die
+ fi
+ if use ioext ; then
+ ./build \
+ --compiler-options="${CFLAGS}" \
+ --linker-options="${LDFLAGS}" \
+ -c ioext.c \
+ -h system \
+ -t dll || die
+ fi
+ if use posix; then
+ ./build \
+ --compiler-options="${CFLAGS}" \
+ --linker-options="${LDFLAGS}" \
+ -c posix.c \
+ -h system \
+ -t dll || die
+ fi
+ if use sockets ; then
+ ./build \
+ --compiler-options="${CFLAGS}" \
+ --linker-options="${LDFLAGS}" \
+ -c socket.c \
+ -h system \
+ -t dll || die
+ fi
+ if use unix ; then
+ ./build \
+ --compiler-options="${CFLAGS}" \
+ --linker-options="${LDFLAGS}" \
+ -c unix.c \
+ -h system \
+ -t dll || die
+ fi
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed"
+
+ doinfo scm.info
+ doinfo hobbit.info
+}
+
+pkg_postinst() {
+ [ "${ROOT}" == "/" ] && pkg_config
+}
+
+pkg_config() {
+ einfo "Regenerating catalog..."
+ scm -e "(require 'new-catalog)"
+}
diff --git a/dev-scheme/scmxlate/Manifest b/dev-scheme/scmxlate/Manifest
new file mode 100644
index 000000000000..a52b388552d9
--- /dev/null
+++ b/dev-scheme/scmxlate/Manifest
@@ -0,0 +1 @@
+DIST scmxlate-20090410.tar.bz2 30016 SHA256 78fd2155dab925f1b47e36a57c55e6a322397737063aed1945b2da9325ae7cf6 SHA512 c6148a1c928ff326c5ac5442a0843a334645d76bb17a48d32018807a2dfa2a4147acfaf43866996d4b06fbe0e6723280da7e66576a3c7c18d70f8e75c73954af WHIRLPOOL 7a95f6f3698900ad87a0ba0a4aff3c5575bb2b7de1d52f4d26eb4db89ef1813095a12bf118df2f0b61d27077d73ec60efd120af5ff89e8ba339d57c5facb3759
diff --git a/dev-scheme/scmxlate/metadata.xml b/dev-scheme/scmxlate/metadata.xml
new file mode 100644
index 000000000000..b8be9f4a7dcf
--- /dev/null
+++ b/dev-scheme/scmxlate/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <maintainer>
+ <email>hkBst@gentoo.org</email>
+ <name>Marijn Schouten</name>
+ </maintainer>
+ <longdescription lang="en">
+Scmxlate is a configuration tool for software packages written in Scheme.
+Scmxlate provides the package author with a strategy for programmatically specifying the changes required to translate the package for a variety of Scheme dialects and Common Lisp, and a variety of operating systems. The end-user simply loads one file into their Scheme or Common Lisp, which triggers the entire configuration process with little or no further intervention.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-scheme/scmxlate/scmxlate-20090410.ebuild b/dev-scheme/scmxlate/scmxlate-20090410.ebuild
new file mode 100644
index 000000000000..3411ad2f47ba
--- /dev/null
+++ b/dev-scheme/scmxlate/scmxlate-20090410.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+DESCRIPTION="Scmxlate is a configuration tool for software packages written in Scheme"
+HOMEPAGE="http://www.ccs.neu.edu/home/dorai/scmxlate/scmxlate.html"
+SRC_URI="http://evalwhen.com/scmxlate/scmxlate.tar.bz2
+ -> ${P}.tar.bz2"
+
+LICENSE="freedist" # license doesn't grant the right for modifications
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${PN}"
+
+src_compile() { true; }
+
+src_install() {
+ insinto /usr/share/${PN}/
+ doins *.cl *.scm || die "doins failed"
+ dodoc README || die "dodoc failed"
+}
diff --git a/dev-scheme/sigscheme/Manifest b/dev-scheme/sigscheme/Manifest
new file mode 100644
index 000000000000..7da9e7308df0
--- /dev/null
+++ b/dev-scheme/sigscheme/Manifest
@@ -0,0 +1 @@
+DIST sigscheme-0.8.5.tar.bz2 1117490 SHA256 046b00f4793ea1d1ad22b73af72c60f42ac83369d526b0a8b531509e67cd6bbe
diff --git a/dev-scheme/sigscheme/metadata.xml b/dev-scheme/sigscheme/metadata.xml
new file mode 100644
index 000000000000..5d520e455d2a
--- /dev/null
+++ b/dev-scheme/sigscheme/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription>SigScheme is a R5RS Scheme interpreter for embedded use.
+ It features small footprint (64KB in library form on the
+ 'small' configuration) like SIOD and TinyScheme, low memory
+ consumption (2-words per cons cell), multibyte characters
+ handling (UTF-8, EUCs and Shift_JIS) and more.
+ It is mainly developed to replace the Scheme interpreter of uim.</longdescription>
+ <upstream>
+ <remote-id type="google-code">sigscheme</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/sigscheme/sigscheme-0.8.5.ebuild b/dev-scheme/sigscheme/sigscheme-0.8.5.ebuild
new file mode 100644
index 000000000000..ccede34e0c0a
--- /dev/null
+++ b/dev-scheme/sigscheme/sigscheme-0.8.5.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+DESCRIPTION="SigScheme is an R5RS Scheme interpreter for embedded use"
+HOMEPAGE="http://code.google.com/p/sigscheme/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_configure() {
+ econf --enable-hygienic-macro
+}
diff --git a/dev-scheme/slib/Manifest b/dev-scheme/slib/Manifest
new file mode 100644
index 000000000000..ad2065a6c6ee
--- /dev/null
+++ b/dev-scheme/slib/Manifest
@@ -0,0 +1,3 @@
+DIST slib-3b1.zip 1063227 SHA256 8e3ec24d51be03ebb7357ad9a2f3554056b86dafbc9e48d1d491aeda1efa566f
+DIST slib-3b2.zip 1067021 SHA256 b1cb9c1b7c888e32918ebdd8fca80d9c875024b064bc6989e4700905873bcae8
+DIST slib3a5.zip 1055491 SHA256 3c4fbfc08de9220f456ed1cd58ca0fb49b4a8cdd4d03697fbea11d9407a16e30
diff --git a/dev-scheme/slib/metadata.xml b/dev-scheme/slib/metadata.xml
new file mode 100644
index 000000000000..e2e83365222e
--- /dev/null
+++ b/dev-scheme/slib/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">
+SLIB is a portable scheme library meant to provide compatibiliy and
+utility functions for all standard scheme implementations.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-scheme/slib/slib-3.1.5-r1.ebuild b/dev-scheme/slib/slib-3.1.5-r1.ebuild
new file mode 100644
index 000000000000..d85c3024a8b2
--- /dev/null
+++ b/dev-scheme/slib/slib-3.1.5-r1.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit versionator eutils
+
+#version magic thanks to masterdriverz and UberLord using bash array instead of tr
+trarr="0abcdefghi"
+MY_PV="$(get_version_component_range 1)${trarr:$(get_version_component_range 2):1}$(get_version_component_range 3)"
+
+MY_P=${PN}${MY_PV}
+S=${WORKDIR}/${PN}
+DESCRIPTION="library providing functions for Scheme implementations"
+SRC_URI="http://swiss.csail.mit.edu/ftpdir/scm/${MY_P}.zip"
+
+HOMEPAGE="http://swiss.csail.mit.edu/~jaffer/SLIB"
+
+SLOT="0"
+LICENSE="public-domain BSD"
+KEYWORDS="alpha amd64 ia64 ppc sparc x86"
+IUSE="" #test"
+
+#unzip for unpacking
+RDEPEND=""
+DEPEND="app-arch/unzip"
+# test? ( dev-scheme/scm )"
+
+INSTALL_DIR="/usr/share/slib/"
+
+src_unpack() {
+ unpack ${A}; cd "${S}"
+
+# cp Makefile Makefile.old
+
+ sed "s:prefix = /usr/local/:prefix = ${D}/usr/:" -i Makefile
+
+ sed 's:libdir = $(exec_prefix)lib/:libdir = $(exec_prefix)share/:' -i Makefile
+ sed 's_mandir = $(prefix)man/_mandir = $(prefix)/share/man/_' -i Makefile
+ sed 's_infodir = $(prefix)info/_infodir = $(prefix)share/info/_' -i Makefile
+
+ sed 's:echo SCHEME_LIBRARY_PATH=$(libslibdir) >> $(bindir)slib:echo SCHEME_LIBRARY_PATH=/usr/share/slib/ >> $(bindir)slib:' -i Makefile
+
+# diff -u Makefile.old Makefile
+
+ sed 's:(lambda () "/usr/local/share/gambc/")):(lambda () "/usr/share/gambit")):' -i gambit.init
+}
+
+src_compile() {
+ emake || die "make failed"
+}
+
+#tests are unmaintained upstream and have been removed for 3a6
+RESTRICT="test"
+#slib needs scm for tests, but scm needs slib so we can't depend on it
+src_test() {
+ if has_version dev-scheme/scm; then
+ make test || die "Make test failed. See above for details."
+ else
+ einfo "Skipping test, because dev-scheme/scm is not installed."
+ fi
+}
+
+src_install() {
+ emake infoz || die "infoz failed"
+ emake install || die "install failed"
+
+ dodoc ANNOUNCE ChangeLog FAQ README
+ dodir /usr/share/gambit/
+ more_install
+}
+
+more_install() {
+ dosym ${INSTALL_DIR} /usr/share/guile/slib # link from guile dir
+ dosym ${INSTALL_DIR} /usr/lib/slib
+ dodir /etc/env.d/ && echo "SCHEME_LIBRARY_PATH=\"${INSTALL_DIR}\"" > "${D}"/etc/env.d/50slib
+
+ mkdir "${S}"/installers
+ pushd installers; make_installers; popd
+ dosbin installers/*
+}
+
+pkg_postinst() {
+ [ "${ROOT}" == "/" ] && pkg_config
+}
+
+IMPLEMENTATIONS="bigloo drscheme elk gambit guile scm" # mit-scheme
+
+pkg_config() {
+ for impl in ${IMPLEMENTATIONS}; do
+ install_slib ${impl}
+# echo '(slib:report-version)' | slib ${impl}
+ done
+}
+
+make_load_expression() {
+ echo "(load \\\"${INSTALL_DIR}$1.init\\\")"
+}
+
+make_installers()
+{
+ PROGRAM="(require 'new-catalog) (slib:report-version)"
+
+ bigloo_install_command="bigloo -s -eval \"(begin "$(make_load_expression bigloo)" ${PROGRAM} (exit))\""
+ drscheme_install_command="mzscheme -vme \"(begin $(make_load_expression DrScheme) ${PROGRAM})\""
+ elk_install_command="echo \"$(make_load_expression elk) ${PROGRAM}\" | elk -l -"
+ gambit_install_command="gambit-interpreter -e \"$(make_load_expression gambit) ${PROGRAM}\""
+# guile_install_command="guile -c \"$(make_load_expression guile) ${PROGRAM}\""
+ guile_install_command="guile -c \"(use-modules (ice-9 slib)) ${PROGRAM}\""
+ #variable names may not contain hyphens (-)
+ mitscheme_install_command="echo \"(set! load/suppress-loading-message? #t) $(make_load_expression mitscheme) ${PROGRAM}\" | mit-scheme --batch-mode"
+ echo ${mitscheme_install_command}
+ scm_install_command="scm -e \"${PROGRAM}\""
+
+ for impl in ${IMPLEMENTATIONS}; do
+ command_var=${impl//-/}_install_command
+ make_installer ${impl} "${!command_var}"
+ done
+}
+
+make_installer() {
+ echo $2 > install_slib_for_${1//-/}
+}
+
+install_slib() {
+ if has_version dev-scheme/$1; then
+ script=install_slib_for_${1//-/}
+ einfo "Registering slib with $1..."
+# echo running: $(cat /usr/sbin/${script})
+ $script
+ else
+ einfo "$1 not installed, not registering..."
+ fi
+}
diff --git a/dev-scheme/slib/slib-3.2.1.ebuild b/dev-scheme/slib/slib-3.2.1.ebuild
new file mode 100644
index 000000000000..43d8ae252e0a
--- /dev/null
+++ b/dev-scheme/slib/slib-3.2.1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit versionator eutils
+
+#version magic thanks to masterdriverz and UberLord using bash array instead of tr
+trarr="0abcdefghi"
+MY_PV="$(get_version_component_range 1)${trarr:$(get_version_component_range 2):1}$(get_version_component_range 3)"
+
+MY_P=${PN}-${MY_PV}
+S=${WORKDIR}/${PN}
+DESCRIPTION="library providing functions for Scheme implementations"
+SRC_URI="http://swiss.csail.mit.edu/ftpdir/scm/${MY_P}.zip"
+
+HOMEPAGE="http://swiss.csail.mit.edu/~jaffer/SLIB"
+
+SLOT="0"
+LICENSE="public-domain BSD"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
+IUSE="" #test"
+
+#unzip for unpacking
+RDEPEND=""
+DEPEND="app-arch/unzip"
+# test? ( dev-scheme/scm )"
+
+INSTALL_DIR="/usr/share/slib/"
+
+src_unpack() {
+ unpack ${A}; cd "${S}"
+
+# cp Makefile Makefile.old
+
+ sed "s:prefix = /usr/local/:prefix = ${D}/usr/:" -i Makefile
+ sed 's:libdir = $(exec_prefix)lib/:libdir = $(exec_prefix)share/:' -i Makefile
+ sed 's:man1dir = $(prefix)man/:man1dir = $(prefix)/share/man/:' -i Makefile
+ sed 's:infodir = $(prefix)info/:infodir = $(prefix)share/info/:' -i Makefile
+
+ sed 's:echo SCHEME_LIBRARY_PATH=$(libslibdir) >> $(bindir)slib:echo SCHEME_LIBRARY_PATH=/usr/share/slib/ >> $(bindir)slib:' -i Makefile
+
+# diff -u Makefile.old Makefile
+
+ sed 's:(lambda () "/usr/local/share/gambc/")):(lambda () "/usr/share/gambit")):' -i gambit.init
+}
+
+src_compile() {
+ emake || die "make failed"
+}
+
+#slib needs scm for tests, but scm needs slib so we can't depend on it
+src_test() {
+ if has_version dev-scheme/scm; then
+ make test || die "Make test failed. See above for details."
+ else
+ einfo "Skipping test, because dev-scheme/scm is not installed."
+ fi
+}
+
+src_install() {
+ emake infoz || die "infoz failed"
+ emake install || die "install failed"
+
+ dodoc ANNOUNCE ChangeLog FAQ README
+ dodir /usr/share/gambit/
+ more_install
+}
+
+more_install() {
+ dosym ${INSTALL_DIR} /usr/share/guile/slib # link from guile dir
+ dosym ${INSTALL_DIR} /usr/lib/slib
+ dodir /etc/env.d/ && echo "SCHEME_LIBRARY_PATH=\"${INSTALL_DIR}\"" > "${D}"/etc/env.d/50slib
+
+ mkdir "${S}"/installers
+ pushd installers; make_installers; popd
+ dosbin installers/*
+}
+
+pkg_postinst() {
+ [ "${ROOT}" == "/" ] && pkg_config
+}
+
+IMPLEMENTATIONS="bigloo drscheme elk gambit guile scm" # mit-scheme
+
+pkg_config() {
+ for impl in ${IMPLEMENTATIONS}; do
+ install_slib ${impl}
+# echo '(slib:report-version)' | slib ${impl}
+ done
+}
+
+make_load_expression() {
+ echo "(load \\\"${INSTALL_DIR}$1.init\\\")"
+}
+
+make_installers()
+{
+ PROGRAM="(require 'new-catalog) (slib:report-version)"
+
+ bigloo_install_command="bigloo -s -eval \"(begin "$(make_load_expression bigloo)" ${PROGRAM} (exit))\""
+ drscheme_install_command="mzscheme -vme \"(begin $(make_load_expression mzscheme) ${PROGRAM})\""
+ elk_install_command="echo \"$(make_load_expression elk) ${PROGRAM}\" | elk -l -"
+ gambit_install_command="gambit-interpreter -e \"$(make_load_expression gambit) ${PROGRAM}\""
+# guile_install_command="guile -c \"$(make_load_expression guile) ${PROGRAM}\""
+ guile_install_command="guile -c \"(use-modules (ice-9 slib)) ${PROGRAM}\""
+ #variable names may not contain hyphens (-)
+ mitscheme_install_command="echo \"(set! load/suppress-loading-message? #t) $(make_load_expression mitscheme) ${PROGRAM}\" | mit-scheme --batch-mode"
+ echo ${mitscheme_install_command}
+ scm_install_command="scm -e \"${PROGRAM}\""
+
+ for impl in ${IMPLEMENTATIONS}; do
+ command_var=${impl//-/}_install_command
+ make_installer ${impl} "${!command_var}"
+ done
+}
+
+make_installer() {
+ echo $2 > install_slib_for_${1//-/}
+}
+
+install_slib() {
+ if has_version dev-scheme/$1; then
+ script=install_slib_for_${1//-/}
+ einfo "Registering slib with $1..."
+# echo running: $(cat /usr/sbin/${script})
+ $script
+ else
+ einfo "$1 not installed, not registering..."
+ fi
+}
diff --git a/dev-scheme/slib/slib-3.2.2.ebuild b/dev-scheme/slib/slib-3.2.2.ebuild
new file mode 100644
index 000000000000..f821d58bab4a
--- /dev/null
+++ b/dev-scheme/slib/slib-3.2.2.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit versionator eutils
+
+#version magic thanks to masterdriverz and UberLord using bash array instead of tr
+trarr="0abcdefghi"
+MY_PV="$(get_version_component_range 1)${trarr:$(get_version_component_range 2):1}$(get_version_component_range 3)"
+
+MY_P=${PN}-${MY_PV}
+S=${WORKDIR}/${PN}
+DESCRIPTION="library providing functions for Scheme implementations"
+SRC_URI="http://swiss.csail.mit.edu/ftpdir/scm/${MY_P}.zip"
+
+HOMEPAGE="http://swiss.csail.mit.edu/~jaffer/SLIB"
+
+SLOT="0"
+LICENSE="public-domain BSD"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE="" #test"
+
+#unzip for unpacking
+RDEPEND=""
+DEPEND="app-arch/unzip"
+# test? ( dev-scheme/scm )"
+
+INSTALL_DIR="/usr/share/slib/"
+
+src_prepare() {
+ sed "s:prefix = /usr/local/:prefix = ${ED}/usr/:" -i Makefile || die
+ sed 's:libdir = $(exec_prefix)lib/:libdir = $(exec_prefix)share/:' -i Makefile || die
+ sed 's:man1dir = $(prefix)man/:man1dir = $(prefix)/share/man/:' -i Makefile || die
+ sed 's:infodir = $(prefix)info/:infodir = $(prefix)share/info/:' -i Makefile || die
+
+ sed 's:echo SCHEME_LIBRARY_PATH=$(libslibdir) >> $(bindir)slib:echo SCHEME_LIBRARY_PATH='"${EPREFIX}"'/usr/share/slib/ >> $(bindir)slib:' -i Makefile || die
+
+# diff -u Makefile.old Makefile
+
+ sed 's:(lambda () "/usr/local/share/gambc/")):(lambda () "'"${EPREFIX}"'/usr/share/gambit")):' -i gambit.init || die
+}
+
+src_compile() {
+ emake || die "make failed"
+}
+
+src_install() {
+ emake infoz || die "infoz failed"
+ emake install || die "install failed"
+
+ dodoc ANNOUNCE ChangeLog FAQ README || die
+ dodir /usr/share/gambit/
+ more_install
+}
+
+more_install() {
+ dosym ${INSTALL_DIR} /usr/share/guile/slib # link from guile dir
+ dosym ${INSTALL_DIR} /usr/lib/slib
+ dodir /etc/env.d/ && echo "SCHEME_LIBRARY_PATH=\"${EPREFIX}${INSTALL_DIR}\"" > "${ED}"/etc/env.d/50slib
+
+ mkdir "${S}"/installers
+ pushd installers; make_installers; popd
+ dosbin installers/* || die
+}
+
+pkg_postinst() {
+ [ "${ROOT}" == "/" ] && pkg_config
+}
+
+IMPLEMENTATIONS="bigloo drscheme elk gambit guile scm" # mit-scheme
+
+pkg_config() {
+ for impl in ${IMPLEMENTATIONS}; do
+ install_slib ${impl}
+# echo '(slib:report-version)' | slib ${impl}
+ done
+}
+
+make_load_expression() {
+ echo "(load \\\"${EPREFIX}${INSTALL_DIR}$1.init\\\")"
+}
+
+make_installers()
+{
+ PROGRAM="(require 'new-catalog) (slib:report-version)"
+
+ bigloo_install_command="bigloo -s -eval \"(begin "$(make_load_expression bigloo)" ${PROGRAM} (exit))\""
+ drscheme_install_command="mzscheme -vme \"(begin $(make_load_expression mzscheme) ${PROGRAM})\""
+ elk_install_command="echo \"$(make_load_expression elk) ${PROGRAM}\" | elk -l -"
+ gambit_install_command="gambit-interpreter -e \"$(make_load_expression gambit) ${PROGRAM}\""
+# guile_install_command="guile -c \"$(make_load_expression guile) ${PROGRAM}\""
+ guile_install_command="guile -c \"(use-modules (ice-9 slib)) ${PROGRAM}\""
+ #variable names may not contain hyphens (-)
+ mitscheme_install_command="echo \"(set! load/suppress-loading-message? #t) $(make_load_expression mitscheme) ${PROGRAM}\" | mit-scheme --batch-mode"
+ echo ${mitscheme_install_command}
+ scm_install_command="scm -e \"${PROGRAM}\""
+
+ for impl in ${IMPLEMENTATIONS}; do
+ command_var=${impl//-/}_install_command
+ make_installer ${impl} "${!command_var}"
+ done
+}
+
+make_installer() {
+ echo $2 > install_slib_for_${1//-/}
+}
+
+install_slib() {
+ if has_version dev-scheme/$1; then
+ script=install_slib_for_${1//-/}
+ einfo "Registering slib with $1..."
+# echo running: $(cat "${EPREFIX}"/usr/sbin/${script})
+ $script
+ else
+ einfo "$1 not installed, not registering..."
+ fi
+}
diff --git a/dev-scheme/stalin/Manifest b/dev-scheme/stalin/Manifest
new file mode 100644
index 000000000000..fa467aff9a29
--- /dev/null
+++ b/dev-scheme/stalin/Manifest
@@ -0,0 +1 @@
+DIST stalin-0.11.tgz 5392735 SHA256 95eafb4fa870cb93f5d79b8935c42664cf54f227b2c7eacf7b55b06b33e1e3fe SHA512 c42dfd5e6240fb865adc6c6f20dec2ae5fae9273a7750f4919a9fabfe8f2cd533031ca977006bb700939b7e5c113700cffdbddbc816a535996ab012cecb62517 WHIRLPOOL 6b623bd1667deef1c7cda014845b2550eae7600001647e706e5a0bbaa2dbb2eae840adbd1f4483a201e8c1b347f50aefcf6a1d99bf53adffebdd10e5507885fa
diff --git a/dev-scheme/stalin/metadata.xml b/dev-scheme/stalin/metadata.xml
new file mode 100644
index 000000000000..06b97553c3d2
--- /dev/null
+++ b/dev-scheme/stalin/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <maintainer>
+ <email>pchrist@gentoo.org</email>
+ <name>Panagiotis Christopoulos</name>
+ </maintainer>
+ <longdescription lang="en">
+ Stalin is an aggressively optimizing Scheme compiler. It is the most
+ highly optimizing Scheme compiler, and in fact one of the most highly
+ optimizing compilers of any sort for any language. It was written by
+ Jeffrey M. Siskind.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-scheme/stalin/stalin-0.11.ebuild b/dev-scheme/stalin/stalin-0.11.ebuild
new file mode 100644
index 000000000000..b9edc676a3be
--- /dev/null
+++ b/dev-scheme/stalin/stalin-0.11.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="An aggressively optimizing Scheme compiler"
+HOMEPAGE="http://community.schemewiki.org/?Stalin"
+SRC_URI="ftp://ftp.ecn.purdue.edu/qobi/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11"
+DEPEND="${RDEPEND}"
+
+RESTRICT="strip"
+
+src_prepare() {
+ sed -i -e "s/-O3 -fomit-frame-pointer/${CFLAGS}/" makefile || die
+}
+
+src_compile() {
+ ./build || die "Stalin's compilation failed"
+}
+
+src_test() {
+ einfo "This may take REALLY much time and requires"
+ einfo "possibly more than 2Gb of RAM+swap."
+ cd benchmarks || die
+ ./compile-and-run-stalin-old-benchmarks || die "old benchmarks failed"
+ #./compile-and-run-stalin-bcl-benchmarks || die "bcl bechmarks failed"
+ #./compile-and-run-stalin-fdlcc-benchmarks || die "fdlcc benchmarks failed"
+}
+
+src_install() {
+ pushd include
+ doheader gc.h gc_config_macros.h
+ insinto /usr/lib/${PN}
+ doins \
+ libgc.a libstalin.a stalin stalin-architecture-name \
+ stalin.architectures QobiScheme.sc xlib.sc xlib-original.sc \
+ Scheme-to-C-compatibility.sc
+ fperms 755 /usr/lib/${PN}/stalin /usr/lib/${PN}/stalin-architecture-name
+ popd
+
+ cat > stalin <<- EOF
+ #!/bin/bash
+
+ exec /usr/lib/stalin/stalin -I /usr/include/stalin \
+ -I /usr/lib/stalin -copt -fno-strict-aliasing $@
+
+ EOF
+
+ dobin stalin
+ doman stalin.1
+ dodoc ANNOUNCEMENT MORE README
+ pushd benchmarks
+ sed -i -e 's/..\/stalin/stalin/' make-hello || die
+ dodoc hello.sc make-hello
+ popd
+}
+
+pkg_postinst() {
+ elog "In ${ROOT}/usr/share/doc/${PF} you will find the make-hello and"
+ elog "hello.sc files(compressed). If you put them in the same directory"
+ elog "and run make.hello, it will produce a \"hello\" executable."
+ elog "The \"make-hello\" file can be used as an example of how to use"
+ elog "stalin to compile code and create efficient executables. "
+ elog "man stalin , for documentation"
+}
diff --git a/dev-scheme/stklos/Manifest b/dev-scheme/stklos/Manifest
new file mode 100644
index 000000000000..4d8d907ad6c1
--- /dev/null
+++ b/dev-scheme/stklos/Manifest
@@ -0,0 +1 @@
+DIST stklos-1.10.tar.gz 6097807 SHA256 215e6e6ffcf7751be5f0c114f83286f99e556e089ca1b0ee66f54dd1be080de4
diff --git a/dev-scheme/stklos/metadata.xml b/dev-scheme/stklos/metadata.xml
new file mode 100644
index 000000000000..28121fec7862
--- /dev/null
+++ b/dev-scheme/stklos/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <maintainer>
+ <email>hkBst@gentoo.org</email>
+ <name>Marijn Schouten</name>
+ </maintainer>
+ <longdescription lang="en">
+ STklos is a free Scheme system supporting most of the languages
+ features defined in R5RS. The aim of this implementation is to
+ be fast as well as light. The implementation is based on an ad-hoc
+ Virtual Machine. STklos can also be compiled as a library and
+ embedded in an application.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-scheme/stklos/stklos-1.10.ebuild b/dev-scheme/stklos/stklos-1.10.ebuild
new file mode 100644
index 000000000000..775ef88c0bfa
--- /dev/null
+++ b/dev-scheme/stklos/stklos-1.10.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+DESCRIPTION="fast and light Scheme implementation"
+HOMEPAGE="http://www.stklos.net"
+SRC_URI="http://www.stklos.net/download/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="threads"
+DEPEND="dev-libs/gmp dev-libs/libpcre virtual/libffi dev-libs/boehm-gc[threads?]"
+RDEPEND="${DEPEND}"
+
+#parallel build failure reported upstream
+MAKEOPTS=-j1
+
+src_prepare() {
+ # kill bundled libs
+ rm -rf "${S}"/{ffi,gc,gmp,pcre}
+}
+
+src_configure() {
+ econf --enable-threads=$(if use threads; then echo pthreads; else echo none; fi) \
+ --without-gmp-light --without-provided-gc \
+ --without-provided-regexp --without-provided-ffi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed"
+ dodoc AUTHORS ChangeLog NEWS PACKAGES-USED PORTING-NOTES README SUPPORTED-SRFIS \
+ || die "dodocs failed"
+}
diff --git a/dev-scheme/termite/Manifest b/dev-scheme/termite/Manifest
new file mode 100644
index 000000000000..23a9c329e3a1
--- /dev/null
+++ b/dev-scheme/termite/Manifest
@@ -0,0 +1 @@
+DIST termite-0.15.tar.gz 77482 RMD160 32eaefe1ff38042d43310e32348c5e6e8e916db8 SHA1 8d35515e1b25c09e4d0388a403aa1fdccd249efa SHA256 afd3ccdc40580b227c7e72aa08d41e60b40e566b2d23f396581f0272eec30ad3
diff --git a/dev-scheme/termite/metadata.xml b/dev-scheme/termite/metadata.xml
new file mode 100644
index 000000000000..eaca52e6f0f4
--- /dev/null
+++ b/dev-scheme/termite/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">Termite Scheme is a variant of Scheme intended for distributed computing.
+ It offers a simple and powerful concurrency model, inspired by the Erlang
+ programming language, which is based on a message-passing model of
+ concurrency.</longdescription>
+ <upstream>
+ <remote-id type="google-code">termite</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/termite/termite-0.15.ebuild b/dev-scheme/termite/termite-0.15.ebuild
new file mode 100644
index 000000000000..c4d0a889ecb8
--- /dev/null
+++ b/dev-scheme/termite/termite-0.15.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit multilib
+
+DESCRIPTION="Erlang-style concurrency for Gambit Scheme"
+HOMEPAGE="http://code.google.com/p/termite/"
+SRC_URI="http://termite.googlecode.com/files/${PN}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="dev-scheme/gambit"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_install() {
+ dobin tsi || die "dobin failed"
+ dodoc README CHANGELOG || die "dodoc failed"
+
+ insinto /usr/$(get_libdir)/${PN}/
+ doins *.scm || die "doins failed"
+ doins -r otp || die "doins failed"
+
+ insinto /usr/share/${PN}
+ doins -r examples test benchmarks || die "doins failed"
+}
diff --git a/dev-scheme/tinyscheme/Manifest b/dev-scheme/tinyscheme/Manifest
new file mode 100644
index 000000000000..de19d83e7be0
--- /dev/null
+++ b/dev-scheme/tinyscheme/Manifest
@@ -0,0 +1 @@
+DIST tinyscheme-1.41.tar.gz 61761 SHA256 eac0103494c755192b9e8f10454d9f98f2bbd4d352e046f7b253439a3f991999 SHA512 a9c1c9cd7a11bf31e0f8ac813ebd6e731cb56b9526fd14d343d7f8c479a8e1b561b744b3f522512adc023cacd1acbf52aa18bf5d8db68f767971660305b79b0f WHIRLPOOL 4df1f6f80a03c1dae73cd0e39fead9d454c41be536c4a9ec63da80ab31e5712bae0f8a2e8a58154edcc4d595129a11399f65e59fe9f0524b7669912ce16825cf
diff --git a/dev-scheme/tinyscheme/files/tinyscheme-1.41-makefile.patch b/dev-scheme/tinyscheme/files/tinyscheme-1.41-makefile.patch
new file mode 100644
index 000000000000..69fccb5e537a
--- /dev/null
+++ b/dev-scheme/tinyscheme/files/tinyscheme-1.41-makefile.patch
@@ -0,0 +1,50 @@
+diff -ru a/makefile b/makefile
+--- a/makefile 2013-04-14 20:08:33.000000000 +0000
++++ b/makefile 2013-12-11 11:59:58.688782748 +0000
+@@ -18,8 +18,7 @@
+ #AR= echo
+
+ # Unix, generally
+-CC = gcc -fpic -pedantic
+-DEBUG=-g -Wall -Wno-char-subscripts -O
++#CC = $(CC)
+ Osuf=o
+ SOsuf=so
+ LIBsuf=a
+@@ -27,12 +26,11 @@
+ LIBPREFIX=lib
+ OUT = -o $@
+ RM= -rm -f
+-AR= ar crs
++#AR= $(AR)
++ARFLAGS = crs
+
+ # Linux
+-LD = gcc
+-LDFLAGS = -shared
+-DEBUG=-g -Wno-char-subscripts -O
++#LD = $(CC)
+ SYS_LIBS= -ldl -lm
+ PLATFORM_FEATURES= -DSUN_DL=1
+
+@@ -71,16 +69,16 @@
+ all: $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT)
+
+ %.$(Osuf): %.c
+- $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
++ $(CC) -fpic $(CFLAGS) -I. -c $(FEATURES) $(DL_FLAGS) $<
+
+ $(LIBTARGET): $(OBJS)
+- $(LD) $(LDFLAGS) $(OUT) $(OBJS) $(SYS_LIBS)
++ $(CC) -shared $(LDFLAGS) -Wl,-soname=$@ -o $@ $(OUT) $(OBJS) $(SYS_LIBS)
+
+ scheme$(EXE_EXT): $(OBJS)
+- $(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(SYS_LIBS)
+
+ $(STATICLIBTARGET): $(OBJS)
+- $(AR) $@ $(OBJS)
++ $(AR) $(ARFLAGS) $@ $(OBJS)
+
+ $(OBJS): scheme.h scheme-private.h opdefines.h
+ dynload.$(Osuf): dynload.h
diff --git a/dev-scheme/tinyscheme/metadata.xml b/dev-scheme/tinyscheme/metadata.xml
new file mode 100644
index 000000000000..b60f12cff3b7
--- /dev/null
+++ b/dev-scheme/tinyscheme/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">
+TinyScheme is a lightweight Scheme interpreter that implements as large a subset of R5RS as was possible without getting very large and complicated. It is meant to be used as an embedded scripting interpreter for other programs. As such, it does not offer IDEs or extensive toolkits although it does sport a small top-level loop, included conditionally. A lot of functionality in TinyScheme is included conditionally, to allow developers freedom in balancing features and footprint.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tinyscheme</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/tinyscheme/tinyscheme-1.41.ebuild b/dev-scheme/tinyscheme/tinyscheme-1.41.ebuild
new file mode 100644
index 000000000000..ae4d9719956a
--- /dev/null
+++ b/dev-scheme/tinyscheme/tinyscheme-1.41.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit flag-o-matic multilib
+
+DESCRIPTION="Lightweight scheme interpreter"
+HOMEPAGE="http://tinyscheme.sourceforge.net"
+SRC_URI="mirror://sourceforge/tinyscheme/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+#KEYWORDS="~amd64 ~ppc ~x86 ~ppc-macos ~x64-macos"
+KEYWORDS="amd64 ppc x86"
+IUSE="static-libs"
+
+DEPEND=""
+RDEPEND=""
+
+src_prepare() {
+
+ epatch "${FILESDIR}"/${P}-makefile.patch
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ append-flags -DOSX
+ sed -i \
+ -e 's/SOsuf=so/SOsuf=dylib/' \
+ -e "s|-Wl,-soname=|-Wl,-install_name=${EPREFIX}/usr/lib/|" \
+ makefile || die
+ fi
+}
+
+src_compile() {
+ emake LDFLAGS="${LDFLAGS}"\
+ AR=$(tc-getAR) CC=$(tc-getCC)
+}
+
+src_install() {
+
+ local tslib=libtinyscheme$(get_libname)
+ local tslibx=libtinyscheme$(get_libname ${PV})
+
+ newbin scheme ${PN}
+
+ newlib.so ${tslib} ${tslibx}
+ dosym ${tslibx} /usr/$(get_libdir)/${tslib}
+ dodoc Manual.txt || die "dodoc failed"
+
+ if use static-libs; then
+ dolib.a libtinyscheme.a
+ fi
+
+ # Bug 328967: dev-scheme/tinyscheme-1.39-r1 doesn't install header file
+ insinto /usr/include/
+ newins scheme.h tinyscheme.h
+
+ local INIT_DIR=/usr/share/${PN}/
+ insinto ${INIT_DIR}
+ doins init.scm
+ dodir /etc/env.d/ && echo "TINYSCHEMEINIT=\"${EPREFIX}${INIT_DIR}init.scm\"" > "${ED}"/etc/env.d/50tinyscheme
+}
diff --git a/dev-scheme/ypsilon/Manifest b/dev-scheme/ypsilon/Manifest
new file mode 100644
index 000000000000..122d553f250f
--- /dev/null
+++ b/dev-scheme/ypsilon/Manifest
@@ -0,0 +1 @@
+DIST ypsilon-0.9.6.update3.tar.gz 4555843 SHA256 2ca3c901dc3f6bca857a94a9d991d14ecc12727d2833694f0e4f5aa1a8a4064d SHA512 9ea5e3e70481c538bcaf671feb7f764015fb44702bcec4e2873007e065bf48d7d9b0cfc8f9dcc51e0083b0bf5296fd8ac40a1f851d76019a18b21fa7e292ee89 WHIRLPOOL ab3f341a27b00f0f8d688adfe17c66a38125c2e4a4a62d622070299283cd27526d6a41c0e5fd61a85e38a0c0aac0e142b0597e1a7475d5d9b060634de315db0a
diff --git a/dev-scheme/ypsilon/files/ypsilon-0.9.6_p3-asneeded.patch b/dev-scheme/ypsilon/files/ypsilon-0.9.6_p3-asneeded.patch
new file mode 100644
index 000000000000..4769fce6c25c
--- /dev/null
+++ b/dev-scheme/ypsilon/files/ypsilon-0.9.6_p3-asneeded.patch
@@ -0,0 +1,11 @@
+--- ypsilon-0.9.6.update3.orig/Makefile 2008-12-23 09:56:02.000000000 +0100
++++ ypsilon-0.9.6.update3/Makefile 2009-10-21 18:14:37.613881129 +0200
+@@ -126,7 +126,7 @@
+ @mkdir -p -m755 $(HOME)/.ypsilon
+
+ $(PROG): $(OBJS)
+- $(CXX) $(LDFLAGS) $(LDLIBS) -o $@ $^
++ $(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+
+ vm1.s: vm1.cpp
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) \
diff --git a/dev-scheme/ypsilon/metadata.xml b/dev-scheme/ypsilon/metadata.xml
new file mode 100644
index 000000000000..993379f14f74
--- /dev/null
+++ b/dev-scheme/ypsilon/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <longdescription lang="en">Ypsilon is the implementation of Scheme Programming Language, which conforms
+ to the latest standard R6RS.</longdescription>
+ <upstream>
+ <remote-id type="google-code">ypsilon</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-scheme/ypsilon/ypsilon-0.9.6_p3.ebuild b/dev-scheme/ypsilon/ypsilon-0.9.6_p3.ebuild
new file mode 100644
index 000000000000..6b7bcbf8b28f
--- /dev/null
+++ b/dev-scheme/ypsilon/ypsilon-0.9.6_p3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+MY_P="${P/_p/.update}"
+DESCRIPTION="R6RS-compliant Scheme implementation for real-time applications"
+HOMEPAGE="http://code.google.com/p/ypsilon/"
+SRC_URI="http://ypsilon.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples threads"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-asneeded.patch
+}
+
+src_compile() {
+ use threads && append-flags "-pthread"
+
+ emake PREFIX="/usr" CXX="$(tc-getCXX)" \
+ CXXFLAGS="${CXXFLAGS}" LDFLAGS="$LDFLAGS" || die "emake failed"
+}
+
+src_install() {
+ emake PREFIX="/usr" DESTDIR="${D}" install || die "Install failed"
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins example/* || die "Failed to install examples"
+ fi
+}