summaryrefslogtreecommitdiff
blob: 8bf23bbb206c7c85fb3977ea93b9fbad498fd99b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Copyright 2000-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-scheme/tinyscheme/tinyscheme-1.39.ebuild,v 1.1 2008/05/08 10:07:42 hkbst Exp $

MY_P=${PN}${PV}
DESCRIPTION="Lightweight scheme interpreter"
HOMEPAGE="http://tinyscheme.sourceforge.net"
SRC_URI="mirror://sourceforge/tinyscheme/${MY_P}.zip"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE=""

DEPEND="app-arch/unzip"
RDEPEND=""

S=${WORKDIR}/${MY_P}

src_unpack() {
	unpack ${A}; cd "${S}"
	sed 's/PLATFORM_FEATURES = -DUSE_STRLWR=0/#PLATFORM_FEATURES = -DUSE_STRLWR=0/' -i makefile
	sed 's/CC = gcc -fpic/CC = gcc -fpic ${CFLAGS}/' -i makefile
	sed 's/LDFLAGS/LOCAL_LDFLAGS/g' -i makefile
	sed 's/LOCAL_LDFLAGS = -shared/LOCAL_LDFLAGS = -shared ${LDFLAGS}/' -i makefile
	sed 's/DEBUG=-g -Wno-char-subscripts -O/DEBUG=/' -i makefile
}

src_install() {
	INIT_DIR=/usr/share/tinyscheme/
	newbin scheme tinyscheme
	dolib libtinyscheme.a libtinyscheme.so
	insinto ${INIT_DIR}
	doins init.scm
	dodir /etc/env.d/ && echo "TINYSCHEMEINIT=\"${INIT_DIR}init.scm\"" > "${D}"/etc/env.d/50tinyscheme
}