summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarijn Schouten <hkbst@gentoo.org>2008-01-21 21:26:43 +0000
committerMarijn Schouten <hkbst@gentoo.org>2008-01-21 21:26:43 +0000
commitf0baac79c8c110064d240697852e4c49d1b5e31e (patch)
tree1b86185cb6c29f2236c2e102d50ca4b0dd682b63 /dev-scheme
parentStable for HPPA (bug #206664). (diff)
downloadgentoo-2-f0baac79c8c110064d240697852e4c49d1b5e31e.tar.gz
gentoo-2-f0baac79c8c110064d240697852e4c49d1b5e31e.tar.bz2
gentoo-2-f0baac79c8c110064d240697852e4c49d1b5e31e.zip
make slib work with guile again, run tests if scm is installed (still fail) thanks to Olivier Huber <oli.huber@gmail.com> bug 206695
(Portage version: 2.1.4)
Diffstat (limited to 'dev-scheme')
-rw-r--r--dev-scheme/slib/ChangeLog8
-rw-r--r--dev-scheme/slib/files/digest-slib-3.1.5-r13
-rw-r--r--dev-scheme/slib/slib-3.1.5-r1.ebuild132
3 files changed, 142 insertions, 1 deletions
diff --git a/dev-scheme/slib/ChangeLog b/dev-scheme/slib/ChangeLog
index d53e8bef24ea..eea5b4a5ba3c 100644
--- a/dev-scheme/slib/ChangeLog
+++ b/dev-scheme/slib/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-scheme/slib
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-scheme/slib/ChangeLog,v 1.34 2008/01/18 12:50:22 hkbst Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-scheme/slib/ChangeLog,v 1.35 2008/01/21 21:26:43 hkbst Exp $
+
+*slib-3.1.5-r1 (21 Jan 2008)
+
+ 21 Jan 2008; Marijn Schouten <hkBst@gentoo.org> +slib-3.1.5-r1.ebuild:
+ make slib work with guile again, run tests if scm is installed (still fail)
+ thanks to Olivier Huber <oli.huber@gmail.com> bug 206695
*slib-3.1.5 (18 Jan 2008)
diff --git a/dev-scheme/slib/files/digest-slib-3.1.5-r1 b/dev-scheme/slib/files/digest-slib-3.1.5-r1
new file mode 100644
index 000000000000..ba0e1df5d567
--- /dev/null
+++ b/dev-scheme/slib/files/digest-slib-3.1.5-r1
@@ -0,0 +1,3 @@
+MD5 39274e6de82af2c97bdfc6c4cc125fb0 slib3a5.zip 1055491
+RMD160 1d0e487bde6ecbd4aaa878b56abb25086bbc36aa slib3a5.zip 1055491
+SHA256 3c4fbfc08de9220f456ed1cd58ca0fb49b4a8cdd4d03697fbea11d9407a16e30 slib3a5.zip 1055491
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..953c5c9a7084
--- /dev/null
+++ b/dev-scheme/slib/slib-3.1.5-r1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-scheme/slib/slib-3.1.5-r1.ebuild,v 1.1 2008/01/21 21:26:43 hkbst Exp $
+
+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
+
+# sed 's_mkdir_mkdir -p_g' -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 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
+}