commit: 0b712be364fd348597632bee985cace8e420b454 Author: Erik Falor <ewfalor <AT> gmail <DOT> com> AuthorDate: Sun Mar 9 01:56:43 2014 +0000 Commit: Erik Falor <ewfalor <AT> gmail <DOT> com> CommitDate: Tue Mar 11 01:41:29 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lisp.git;a=commit;h=0b712be3
dev-scheme/chibi-scheme: bump to version 0.6.1 update ebuild to EAPI=5; fix some QA errors in Makefile --- dev-scheme/chibi-scheme/chibi-scheme-0.6.1.ebuild | 64 +++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/dev-scheme/chibi-scheme/chibi-scheme-0.6.1.ebuild b/dev-scheme/chibi-scheme/chibi-scheme-0.6.1.ebuild new file mode 100644 index 0000000..66eb03d --- /dev/null +++ b/dev-scheme/chibi-scheme/chibi-scheme-0.6.1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +DESCRIPTION="A very tiny Scheme implementation with decent speed and native hygienic macros." +SRC_URI="http://synthcode.com/scheme/${P}.tgz" +HOMEPAGE="http://synthcode.com/scheme/" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="boehm-gc" + +DEPEND="boehm-gc? ( dev-libs/boehm-gc )" +RDEPEND="${DEPEND}" + +export EXTRA_EMAKE+="PREFIX=/usr $(use boehm-gc && echo SEXP_USE_BOEHM=1)" + +src_prepare() { + # Upstream uses a D variable in its Makefile which conflicts with + # the variable predifined by ebuild D="${PORTAGE_BUILDDIR}/image" + sed 's,\([^[:alpha:]]\)D\([^[:alpha:]]\),\1chibiD\2,' -i Makefile \ + || die "sed Makefile failed" + + # Upstream calls ldconfig in the install target, which goes outside + # of the ebuild Sandbox. We'll call ldconfig ourselves after merging + # the package. + sed '/ldconfig/d' -i Makefile \ + || die "sed Makefile failed" + + # Incorporate local system's LDFLAGS into the chibi-scheme executable + sed 's/$(CC) $(XCPPFLAGS) $(XCFLAGS) -o $@ $< -L. -lchibi-scheme/& $(LDFLAGS)/' -i Makefile \ + || die "sed Makefile failed" + + # Incorporate local system's LDFLAGS into the chibi-scheme executable + sed 's/$(CC) $(XCPPFLAGS) $(XCFLAGS) -o $@ $< -L. -lchibi-scheme/& $(LDFLAGS)/' -i Makefile \ + || die "sed Makefile failed" + + # Set SONAME in libchibi-scheme.so + sed '/^libchibi-scheme/{ n; s/$(CC) $(CLIBFLAGS) -o $@ $^ $(XLDFLAGS)/& -Wl,-soname,libchibi-scheme.so/}' -i Makefile \ + || die "sed Makefile failed" + + # Incorporate local system's LDFLAGS into Chibi's compiled modules + sed 's/$(CC) $(CLIBFLAGS) $(XCPPFLAGS) $(XCFLAGS) -o $@ $< -L. $(XLIBS) -lchibi-scheme/& $(LDFLAGS)/' -i Makefile.libs \ + || die "sed Makefile.libs failed" + +} + +# When the number of jobs > 1, the Makefile lets things get ahead of themselves +# and sometimes later targets will fail because libchibi-scheme.so doesn't yet +# exist. +src_compile() { + emake -j1 +} + +src_test() { + LD_LIBRARY_PATH="${S}" emake test +} + +src_install() { + emake DESTDIR="${D}" ${EXTRA_EMAKE} install +}