diff options
Diffstat (limited to 'dev-scheme/slib')
-rw-r--r-- | dev-scheme/slib/Manifest | 6 | ||||
-rw-r--r-- | dev-scheme/slib/files/50slib | 1 | ||||
-rw-r--r-- | dev-scheme/slib/files/slib-3.2.5-fix-makefile-guile.patch | 23 | ||||
-rw-r--r-- | dev-scheme/slib/files/slib-3.2.5-fix-paths.patch | 42 | ||||
-rw-r--r-- | dev-scheme/slib/metadata.xml | 16 | ||||
-rw-r--r-- | dev-scheme/slib/slib-3.2.5-r1.ebuild | 122 |
6 files changed, 210 insertions, 0 deletions
diff --git a/dev-scheme/slib/Manifest b/dev-scheme/slib/Manifest new file mode 100644 index 000000000000..381389b0ead3 --- /dev/null +++ b/dev-scheme/slib/Manifest @@ -0,0 +1,6 @@ +AUX 50slib 39 BLAKE2B a7e221f173cfc2b24c72f047130e6b4c289533a22dc7d59fca49a147ed5c9290935f852e8425ac95942da2e8f135713dbd999d6e96521e35c9bce9cf8b6458d2 SHA512 e454fbcd8e4516b363a94055a0dde09f3cd5fa61babb0c6510ba6dcb50ddc123bb89ec8657171cc1d05fa5ebf5a1691b9425d3397c88617c9d2288770ff8a29b +AUX slib-3.2.5-fix-makefile-guile.patch 882 BLAKE2B 6e9c80b476cafa24477aae5b30e8c35f116cfbd0261f06b15672e39cc94e2ef6cb116104a41e5c0f1ebcb887664d9f43ec6c5b21ab3286d5a33c56d081ca9a4b SHA512 74997578edd5472f084a3b899c4e11b67432a4776bce6a19cbd4300316bf413f38374711a9a5cd3c10cd6cac01cb6d337d6f2ad18236bc4747c0bccf88948e3a +AUX slib-3.2.5-fix-paths.patch 1627 BLAKE2B bea0c823ca1f4e006953128cb5fe2886f5e84efbcf2d1ee32c801524d3bbbaf65899853c476697b501673501b112e7bd9382f7e372d27745cd190d3fa66a0bd4 SHA512 bdd667f20ca0ef57707a4df379186b58ef5ffab38e61a7e8e4ef697d7a90ebbafa8e4ca1f887d87520290656f2445fe1a9f4bd4e22634587908f70059dde0f30 +DIST slib-3b5.tar.gz 987735 BLAKE2B ad1e6e43885a16277d01f37582db7de068f21da5e10b23e034f5487ac8748303dcc9c12615884ee047dce7c246203f1d0d1cc375794371eae6854199d720c209 SHA512 e5d1210b70cd882cd5e810b3c4102d6060ec82fb2093f472bf31b597f6273e0a02f4d35a82c4b5c8cdc3f8b2c7b9e498fa3e35c7f265fa864cd9dc50e7a874c8 +EBUILD slib-3.2.5-r1.ebuild 2768 BLAKE2B 1a07e6c9e5fe579ca7a1df0914a06612e89e86559e99d484428fa7faa9ba6584a5f1d4ee09a9c504adcb08cb6ff7302f68f8bf019625a826d26e535cc4857103 SHA512 35f5d974cb1f99875f837d432f8fd8dba2061d3b993152275015251d49e1f6c181a2d11a9b81c9af07d561ab7a2138231ec7a3a04a5d2c34c8ef639ee3212e6d +MISC metadata.xml 580 BLAKE2B 64dcf4957037aed50b50ea0648103f9b9f2cc040736751a1bf584464855fed650efe1d3e437ef122356e3f83f7c9b528ddea493193aebe49dc285a7066281d69 SHA512 5b75cfc410ff0ec6a324590f69001ac38410e963df6490695abb85132168cd37ccf685b9281026eea2fc82e59340fccecde58887aa3b64f88003970b979d5807 diff --git a/dev-scheme/slib/files/50slib b/dev-scheme/slib/files/50slib new file mode 100644 index 000000000000..072862ed0b83 --- /dev/null +++ b/dev-scheme/slib/files/50slib @@ -0,0 +1 @@ +SCHEME_LIBRARY_PATH="/usr/share/slib/" diff --git a/dev-scheme/slib/files/slib-3.2.5-fix-makefile-guile.patch b/dev-scheme/slib/files/slib-3.2.5-fix-makefile-guile.patch new file mode 100644 index 000000000000..4617b4e780cb --- /dev/null +++ b/dev-scheme/slib/files/slib-3.2.5-fix-makefile-guile.patch @@ -0,0 +1,23 @@ +--- slib-3b5/~Makefile 2016-10-10 23:54:01.461733550 +0200 ++++ slib-3b5/Makefile 2016-10-10 23:59:33.806035867 +0200 +@@ -13,9 +13,9 @@ SHELL = /bin/sh + INSTALL = install + INSTALL_PROGRAM = ${INSTALL} + INSTALL_DATA = ${INSTALL} -m 644 +-INSTALL_INFO = ginstall-info ++INSTALL_INFO = install-info + +-SCHEME = scm ++SCHEME = guile + CHPAT = $(HOME)/bin/chpat + MAKEDEV = $(MAKE) -f $(HOME)/makefile.dev + TEXI2HTML = /usr/local/bin/texi2html -split -verbose +@@ -183,7 +183,7 @@ slib.html: slib.texi + $(MAKEINFO) --html --no-split --no-warn --force $< + + slib-$(VERSION).info: slib.texi version.txi $(txifiles) $(texifiles) +- $(MAKEINFO) $< --no-warn --no-split -o slib-$(VERSION).info ++ $(MAKEINFO) $< --no-warn --no-split --force -o slib-$(VERSION).info + slib.info: slib-$(VERSION).info + if [ -f $(prevdocsdir)slib.info ];\ + then infobar $(prevdocsdir)slib.info slib-$(VERSION).info \ diff --git a/dev-scheme/slib/files/slib-3.2.5-fix-paths.patch b/dev-scheme/slib/files/slib-3.2.5-fix-paths.patch new file mode 100644 index 000000000000..9a373c14d733 --- /dev/null +++ b/dev-scheme/slib/files/slib-3.2.5-fix-paths.patch @@ -0,0 +1,42 @@ +--- slib-3b5/~RScheme.init 2016-10-10 23:05:39.117046443 +0200 ++++ slib-3b5/RScheme.init 2016-10-10 23:06:47.242857550 +0200 +@@ -52,7 +52,7 @@ + ;; Use this path if your scheme does not support GETENV + ;; or if SCHEME_LIBRARY_PATH is not set. + (case (software-type) +- ((unix) "/usr/lib/slib/") ++ ((unix) "/usr/share/slib/") + ((vms) "lib$scheme:") + ((ms-dos) "C:\\SLIB\\") + (else ""))))) +--- slib-3b5/~gambit.init 2016-10-10 23:05:20.939634454 +0200 ++++ slib-3b5/gambit.init 2016-10-10 23:07:46.571968697 +0200 +@@ -38,7 +38,7 @@ + (let ((impl-path + (or (getenv "GAMBIT_IMPLEMENTATION_PATH") + (case (software-type) +- ((unix) "/usr/local/share/gambc/") ++ ((unix) "/usr/share/gambc/") + ((vms) "scheme$src:") + ((ms-dos) "C:\\scheme\\") + ((windows) "c:/scheme/") +@@ -65,7 +65,7 @@ + ;; Use this path if your scheme does not support GETENV + ;; or if SCHEME_LIBRARY_PATH is not set. + (case (software-type) +- ((unix) "/usr/local/lib/slib/") ++ ((unix) "/usr/share/slib/") + ((macos) (string-append (implementation-vicinity) "slib:")) + ((amiga) "dh0:scm/Library/") + ((vms) "lib$scheme:") +--- slib-3b5/~guile-2.init 2016-10-10 23:05:46.531807087 +0200 ++++ slib-3b5/guile-2.init 2016-10-10 23:08:00.154538349 +0200 +@@ -199,7 +199,7 @@ + (define implementation-vicinity + (cond ((getenv "GUILE_IMPLEMENTATION_PATH") + => (lambda (path) (lambda () path))) +- (else %site-dir))) ++ (else %library-dir))) + + ;;; (library-vicinity) should be defined to be the pathname of the + ;;; directory where files of Scheme library functions reside. diff --git a/dev-scheme/slib/metadata.xml b/dev-scheme/slib/metadata.xml new file mode 100644 index 000000000000..def1d63fae27 --- /dev/null +++ b/dev-scheme/slib/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>scheme@gentoo.org</email> + <name>Gentoo Scheme Project</name> + </maintainer> + <longdescription lang="en"> +SLIB is a portable scheme library meant to provide compatibiliy and +utility functions for all standard scheme implementations. + </longdescription> + <use> + <flag name="scm">Support for scm scheme implementation</flag> + <flag name="gambit">Support for gambit scheme implementation</flag> + </use> +</pkgmetadata> diff --git a/dev-scheme/slib/slib-3.2.5-r1.ebuild b/dev-scheme/slib/slib-3.2.5-r1.ebuild new file mode 100644 index 000000000000..b48f4c3cd153 --- /dev/null +++ b/dev-scheme/slib/slib-3.2.5-r1.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit versionator + +#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)" + +DESCRIPTION="Portable Scheme library for all standard Scheme implementations" +HOMEPAGE="http://people.csail.mit.edu/jaffer/SLIB" +SRC_URI="http://swiss.csail.mit.edu/ftpdir/scm/${PN}-${MY_PV}.tar.gz" + +RESTRICT="mirror" + +LICENSE="public-domain BSD" +SLOT="0" +KEYWORDS="alpha amd64 ia64 ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" +IUSE="gambit scm" + +RDEPEND=" + >=sys-apps/texinfo-5.0 + >=dev-scheme/guile-1.8.8:= + gambit? ( dev-scheme/gambit ) + scm? ( dev-scheme/scm )" +DEPEND="${RDEPEND}" + +DOCS=( ANNOUNCE COPYING FAQ README ChangeLog slib.{txt,html} ) + +PATCHES=( + "${FILESDIR}/${P}-fix-paths.patch" + "${FILESDIR}/${P}-fix-makefile-guile.patch" +) + +S=${WORKDIR}/${PN}-${MY_PV} + +src_configure() { + ./configure \ + --prefix=/usr \ + --libdir=/usr/share || die +} + +src_compile() { + default + + makeinfo -o slib.txt --plaintext --force slib.texi || die + makeinfo -o slib.html --html --no-split --force slib.texi || die +} + +src_install() { + # core + dodir /usr/share/${PN} + insinto /usr/share/${PN} + doins *.{dat,init,ps,scm,sh} + + # permissions + local i + for i in "${ED%/}"/usr/share/${PN}/*.sh ; do + fperms +x /usr/share/${PN}/$(basename "$i") + done + + # bin + dodir /usr/bin/ + dosym /usr/share/${PN}/${PN}.sh /usr/bin/${PN} + + # env + doenvd "${FILESDIR}/50slib" + + # docs + doinfo slib.info + doman slib.1 + + # guile + if has_version '=dev-scheme/guile-2.0*'; then + dodir /usr/share/guile/2.0 + dosym /usr/share/${PN}/ /usr/share/guile/2.0/${PN} + else + dodir /usr/share/guile/1.8 + dosym /usr/share/${PN}/ /usr/share/guile/1.8/${PN} + fi + + # backwards compatibility + dodir /usr/lib/ + dosym /usr/share/${PN}/ /usr/lib/${PN} +} + +_new_catalog() { + if [[ ! "$1" =~ ^(guile|scm)$ ]]; then + echo -n "(load \"${ROOT}/usr/share/slib/$1.init\")" || die + fi + echo " (require 'new-catalog) (slib:report-version)" || die +} + +pkg_postinst() { + local SCHEME_LIBRARY_PATH=/usr/share/slib/ + + # catalogs + einfo "Updating implementation catalogs.." + guile -c "(use-modules (ice-9 slib)) $(_new_catalog guile)" |& grep -i '^slib' || die + + # broken as for now + # if use elk ; then + # echo "$(_new_catalog elk)" | elk -l - + # fi + + if use gambit ; then + gsi -e "$(_new_catalog gambit)" || die + fi + + if use scm ; then + scm -e "$(_new_catalog scm)" || die + fi +} + +pkg_postrm() { + for impl in 'guile/*' gambc scm; do + rm -f "${ROOT}/usr/"lib*/${impl}/slibcat \ + "${ROOT}/usr/share/"${impl}/slibcat || die + done +} |