Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 60611 - scheme 48
Summary: scheme 48
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Scheme Project
URL: http://www.s48.org/
Whiteboard:
Keywords:
: 104074 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-16 16:34 UTC by Johannes Brügmann
Modified: 2007-01-18 13:54 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Brügmann 2004-08-16 16:34:26 UTC
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit flag-o-matic eutils alternatives

DESCRIPTION="Scheme implementation designed as expository tool."
HOMEPAGE="http://www.s48.org/"
SRC_URI="http://www.s48.org/${PV}/${P}.tgz"

# Don't know exactly but it's similar *they* say ;-)
LICENSE="BSD"
#SLOT="0"

#
# Sorry, but I can only test on x86.
#
KEYWORDS="~x86 ~sparc ~ppc"

#
# s48doc: add the fine manual in html, pdf, ps to /usr/share/doc/${P}/
# s48emacs: commandline interpreter mode (shell, scheme, cmulisp) for (x)emacs.
#
IUSE="s48doc s48emacs"

#RESTRICT="nostrip"
#DEPEND=""
#RDEPEND=""

S=${WORKDIR}/${P}

src_unpack() {

    unpack ${A}
    einfo "Trying to                                                          "
    einfo "                                                                   "
        einfo "           make DESTDIR=\${D} install                              
"
    einfo "                                                                   "
    einfo "work.                                                              "
    einfo "                                                                   "
    cd ${S} && epatch ${FILESDIR}/destdir-${PF}.diff

}

src_compile() {

        local myconf
        myconf="--prefix=/usr                              \
            --mandir=/usr/share/man                    "

        econf ${myconf} || die
        emake || die "emake failed"

}

src_install() {

        mkdir -p                                           \
                ${D}/usr/lib/scheme48                          \
                ${D}/usr/bin                                   \
                ${D}/usr/include                               \
                ${D}/usr/share/man/man1

        make DESTDIR=${D}                                  \
         prefix=/usr                                   \
           install || die

        if use s48emacs ; then
                insinto /usr/share/emacs/site-lisp/scheme48
                insopts -m 0644
                doins ${S}/emacs/*.el
        fi

        dodoc README INSTALL COPYING 
        if use s48doc ; then 
                dodoc doc/*.txt doc/manual.pdf doc/manual.ps
                dohtml -r ${S}/doc/html/*
        fi

}

pkg_postinst() {

   if use s48emacs ; then

   einfo "You should consider to add something like                          "
   einfo "                                                                   "
   einfo " (setq load-path (cons                                             "
   einfo "       (expand-file-name \"/usr/share/emacs/site-lisp/scheme48\")  "
   einfo "                    load-path))                                         
                                                 "
   einfo "                                                                   "
   einfo " ;; CMULISP                                                             
                                                 "
   einfo " (autoload 'cmulisp \"cmulisp\"                                         
                                 "
   einfo "           \"Run an inferior Lisp process.\"                            
                 "
   einfo "           t)                                                           
                                                 "
   einfo "                                                                   "
   einfo " ;; CMUSCHEME                                                           
                                                 "
   einfo " (autoload 'run-scheme \"cmuscheme\"                                    
                         "
   einfo "           \"Run an inferior Scheme process.\"                          
                 "
   einfo "           t)                                                           
                                                 "
   einfo "                                                                   "
   einfo " ;; CMUSHELL                                                            
                                                 "
   einfo " (autoload 'cmushell \"cmushell\"                                       
                                 "
   einfo "           \"Run an inferior shell process.\"                           
                 "
   einfo "           t)                                                           
                                                 "
   einfo "                                                                        
                                                                 "
   einfo " ;; map .scm files to scheme-mode                                       
                         "
   einfo " (setq auto-mode-alist                                                  
                                         "
   einfo "       (cons '(\"\\\\.scm\$\" . scheme-mode)                            
                 "
   einfo "             auto-mode-alist))                                          
                                 "
   einfo "                                                                   "
   einfo " ;; if you want font-lock-mode in scheme comint                         
         "
   einfo " ;; (setq inferior-scheme-mode-hook '(scheme-mode comint-mode))        "
   einfo "                                                                        
                                                                 "
   einfo " (setq scheme-program-name \"scheme48\")                                
                 "
   einfo "                                                                        
                                                                 "
   einfo " (require 'cmuscheme)                                                   
                                         "
   einfo "                                                                   "
   einfo "to your ~/.emacs.d/custom.el files.                                "
   einfo "                                                                   "
   einfo "For further information have a look at:                            "
   einfo "       /usr/share/emacs/site-lisp/scheme48/*.el                    "
   einfo "                                                                   "

   fi

}

--- Makefile.in.orig    2004-08-14 15:26:50.497342832 +0200
+++ Makefile.in 2004-08-14 15:26:56.250468224 +0200
@@ -26,7 +26,7 @@
 libdir = $(exec_prefix)/lib
 incdir = $(exec_prefix)/include
 manext = 1
-mandir = $(prefix)/man/man$(manext)
+mandir = $(prefix)/share/man/man$(manext)
 
 # HP 9000 series, if you don't have gcc
 #   CC = cc
@@ -251,13 +251,13 @@
 install: enough dirs inst-script inst-vm inst-misc inst-man inst-inc inst-image
 
 inst-vm:
-       $(INSTALL_PROGRAM) $(VM) $(LIB)
+       $(INSTALL_PROGRAM) $(VM) $(DESTDIR)/$(LIB)
 
 inst-image:
        rm -f '/tmp/$(IMAGE)' &&                                        \
        $(srcdir)/build/build-usual-image $(srcdir) '$(LIB)'            \
                 '/tmp/$(IMAGE)' './$(VM)' '$(INITIAL)' &&              \
-       $(INSTALL_DATA) /tmp/$(IMAGE) $(LIB) &&                         \
+       $(INSTALL_DATA) /tmp/$(IMAGE) $(DESTDIR)/$(LIB) &&              \
        rm /tmp/$(IMAGE)
 
 inst-man:
@@ -265,7 +265,7 @@
                sed 's=LBIN=$(bindir)=g' $(srcdir)/doc/scheme48.man |      \
                        sed 's=LLIB=$(LIB)=g' |                            \
                        sed 's=LS48=$(RUNNABLE)=g' >$(MANPAGE) &&          \
-               $(INSTALL_DATA) $(MANPAGE) $(mandir) &&                    \
+               $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)/$(mandir) &&         \
                rm $(MANPAGE);                                             \
        else                                                               \
                echo "$(mandir) not writable dir, not installing man page" \
@@ -273,21 +273,21 @@
        fi
 
 inst-inc:
-       $(INSTALL_DATA) $(srcdir)/c/scheme48.h $(incdir)
+       $(INSTALL_DATA) $(srcdir)/c/scheme48.h $(DESTDIR)/$(incdir)
 
 inst-misc:
        for stub in env big sort opt misc link posix srfi; do           \
                for f in $(srcdir)/scheme/$$stub/*.scm; do              \
-                       $(INSTALL_DATA) $$f $(LIB)/$$stub || exit 1;    \
+                       $(INSTALL_DATA) $$f $(DESTDIR)/$(LIB)/$$stub || exit 1; \
                done;                                                   \
        done &&                                                         \
        for f in $(srcdir)/scheme/rts/*num.scm                          \
                 $(srcdir)/scheme/rts/jar-defrecord.scm; do             \
-               $(INSTALL_DATA) $$f $(LIB)/rts || exit 1;               \
+               $(INSTALL_DATA) $$f $(DESTDIR)/$(LIB)/rts || exit 1;    \
        done
 
 inst-script:
-       script=$(bindir)/$(RUNNABLE) &&                                 \
+       script=$(DESTDIR)/$(bindir)/$(RUNNABLE) &&                      \
        echo '#!/bin/sh'        >$$script &&                            \
        echo                    >>$$script &&                           \
        echo 'lib=$(LIB)'       >>$$script &&                           \
@@ -306,18 +306,20 @@
 
 dirs:
        for dir in $(libdir) $(bindir) $(incdir); do                     \
-               [ -d $$dir -a -w $$dir ] || {                            \
-                       echo "$$dir not a writable directory" >&2;       \
+               [ -d $(DESTDIR)/$$dir -a -w $(DESTDIR)/$$dir ] || {      \
+                       echo "$(DESTDIR)/$$dir not a writable directory" >&2; \
                        exit 1;                                          \
                };                                                       \
        done
-       { mkdir -p $(LIB) && [ -w $(LIB) ]; } || {                       \
-               echo "$(LIB) not a writable directory" >&2;              \
+       { mkdir -p $(DESTDIR)/$(LIB) && [ -w $(DESTDIR)/$(LIB) ]; } || { \
+               echo "$(DESTDIR)/$(LIB) not a writable directory" >&2;   \
                exit 1;                                                  \
        }
        for dir in rts env big sort opt misc link posix srfi; do          \
-               { mkdir -p $(LIB)/$$dir && [ -w $(LIB)/$$dir ]; } || {    \
-                       echo "$(LIB)/$$dir not a writable directory" >&2; \
+               { mkdir -p $(DESTDIR)/$(LIB)/$$dir                        \
+                        && [ -w $(DESTDIR)/$(LIB)/$$dir ]; }              \
+             || {                                                        \
+                       echo "$(DESTDIR)/$(LIB)/$$dir not a writable directory" >&
2; \
                        exit 1;                                           \
                };                                                        \
        done


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r0,
2.6.7-ck5)
=================================================================
System uname: 2.6.7-ck5 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.5.2
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-tbird -O2"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-tbird -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache fixpackages sandbox"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
http://www.gigaload.org/gentoo.org/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d aalib acl acpi alsa avi berkdb bidi cdr crypt cscope cups
curl dga directfb dvd dvdr emacs encode ethereal fbcon flac foomaticdb freetds
gdbm ggi gif gpm gtk gtk2 gtkhtml imagemagick imap imlib imlib2 innodb java
jikes jpeg kerberos lcms leim lesstif libg++ libwww lirc mad maildir memlimit
mikmod mmx motif mpeg mule ncurses nls odbc oggvorbis opengl pam pdflib perl
plotutils png postgres ppds python quicktime readline sdl speex spell ssl svga
tcltk tetex tiff truetype unicode usb v4l2 wmf wxwindows x86 xml xml2 xmms xv zlib"
Comment 1 Pupeno 2004-12-10 21:31:46 UTC
I didn't check that there was already an ebuild for scheme48, so, I created another one :(
Mine seems to have less features, but it also is simpler, so, I'm submitting here in case it is useful in some way. When will we have an ebuild for scheme48 on Portage ?
scheme48-1.1.ebuild:
inherit eutils

DESCRIPTION="An implementation of Scheme (R5RS) based on a byte-code interpreter, designed to be used asa testbed for experiments in implementation techniques and as an expository tool."
HOMEPAGE="http://s48.org/"
SRC_URI="http://s48.org/${PV}/${P}.tgz"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~x86"
IUSE=""


src_unpack() {
    unpack ${A}
        epatch ${FILESDIR}/${P}-Makefile.in.patch
}

src_compile() {
        econf || die "could not configure"
        emake || die "emake failed"
}

src_install() {
        mkdir -p ${D}/usr/lib/ ${D}/usr/bin/ ${D}/usr/include/
        einstall || die "could not install"
}
======================================
files/scheme48-Makefile.in.patch:
--- Makefile.in.orig    2004-12-11 02:07:04.038409568 -0300
+++ Makefile.in 2004-12-11 02:09:35.983310432 -0300
@@ -19,6 +19,7 @@ LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@

 prefix = @prefix@
+runprefix = @prefix@
 exec_prefix = @exec_prefix@
 ### End of `configure' section###

@@ -43,6 +44,7 @@ mandir = $(prefix)/man/man$(manext)
 RUNNABLE = scheme48
 MANPAGE = $(RUNNABLE).$(manext)
 LIB = $(libdir)/$(RUNNABLE)
+RUNLIB = $(runprefix)/lib/$(RUNNABLE)

 distdir = /tmp

@@ -255,7 +257,7 @@ inst-vm:

 inst-image:
        rm -f '/tmp/$(IMAGE)' &&                                        \
-       $(srcdir)/build/build-usual-image $(srcdir) '$(LIB)'            \
+       $(srcdir)/build/build-usual-image $(srcdir) '$(RUNLIB)'         \
                 '/tmp/$(IMAGE)' './$(VM)' '$(INITIAL)' &&              \
        $(INSTALL_DATA) /tmp/$(IMAGE) $(LIB) &&                         \
        rm /tmp/$(IMAGE)
@@ -290,7 +292,7 @@ inst-script:
        script=$(bindir)/$(RUNNABLE) &&                                 \
        echo '#!/bin/sh'        >$$script &&                            \
        echo                    >>$$script &&                           \
-       echo 'lib=$(LIB)'       >>$$script &&                           \
+       echo 'lib=$(RUNLIB)'    >>$$script &&                           \
        echo 'exec $$lib/$(VM) -o $$lib/$(VM) -i $$lib/$(IMAGE) "$$@"'  \
                                >>$$script &&                           \
        chmod +x $$script

Thanks.
Comment 2 Marijn Schouten (RETIRED) gentoo-dev 2006-11-12 08:02:58 UTC
it seems we have a scheme48 ebuild, so this bug should be closed.
Comment 3 Marijn Schouten (RETIRED) gentoo-dev 2007-01-18 13:49:32 UTC
There seems to be a patch so scheme48 works with amd64:
http://people.csail.mit.edu/riastradh/tmp/s48-64.patch
Comment 4 Marijn Schouten (RETIRED) gentoo-dev 2007-01-18 13:54:05 UTC
*** Bug 104074 has been marked as a duplicate of this bug. ***