dev-scheme/scm: Fix man page destination (bug #351389)
authorSebastian Pipping <sping@gentoo.org>
Tue, 11 Aug 2015 17:35:18 +0000 (19:35 +0200)
committerSebastian Pipping <sping@gentoo.org>
Tue, 11 Aug 2015 17:38:51 +0000 (19:38 +0200)
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
dev-scheme/scm/Manifest
dev-scheme/scm/scm-5.5.6-r1.ebuild [new file with mode: 0644]

index 4adb984d6ec286ebc2a86a7ba554910adaa84de2..c9844efdf3f102e5f329b1e7ceb5c4de35e037df 100644 (file)
@@ -1 +1 @@
-DIST scm-5e6.zip 912968 SHA256 97f1b284aacfca01ae44e936dd8468c1d68b0b323776ab5da1d6ec7cb737c1df
+DIST scm-5e6.zip 912968 SHA256 97f1b284aacfca01ae44e936dd8468c1d68b0b323776ab5da1d6ec7cb737c1df SHA512 897370f043401a7961eb1c2e22c951e2144505a1670e328e2c3eab33d52da83f195b873fb7cf8486f412ae52316cfc437c9f2da1432ade70f82eb0da12c2f852 WHIRLPOOL 6734e610e50691e869ad3daeb909bc66d24804239787effadb1499bdad2b7e57583ad02e9e9bec9fb8684184f963ee4473ebb1571139cf53da433e07df43ffc9
diff --git a/dev-scheme/scm/scm-5.5.6-r1.ebuild b/dev-scheme/scm/scm-5.5.6-r1.ebuild
new file mode 100644 (file)
index 0000000..d2e44c4
--- /dev/null
@@ -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}" man1dir=/usr/share/man/man1/ 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)"
+}