[arch-commits] Commit in slib/repos/community-any (6 files)

Alexander Rødseth arodseth at archlinux.org
Tue Oct 31 11:03:44 UTC 2017


    Date: Tuesday, October 31, 2017 @ 11:03:43
  Author: arodseth
Revision: 264890

archrelease: copy trunk to community-any

Added:
  slib/repos/community-any/PKGBUILD
    (from rev 264889, slib/trunk/PKGBUILD)
  slib/repos/community-any/slib-register.hook
    (from rev 264889, slib/trunk/slib-register.hook)
  slib/repos/community-any/slib-unregister.hook
    (from rev 264889, slib/trunk/slib-unregister.hook)
  slib/repos/community-any/slib.install
    (from rev 264889, slib/trunk/slib.install)
Deleted:
  slib/repos/community-any/PKGBUILD
  slib/repos/community-any/slib.install

----------------------+
 PKGBUILD             |   84 +++++++++++++++++++++++--------------------------
 slib-register.hook   |   12 +++++++
 slib-unregister.hook |   12 +++++++
 slib.install         |   49 ++++++++++++++++++++--------
 4 files changed, 99 insertions(+), 58 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2017-10-31 11:03:22 UTC (rev 264889)
+++ PKGBUILD	2017-10-31 11:03:43 UTC (rev 264890)
@@ -1,44 +0,0 @@
-# $Id$
-# Maintainer: Aaron Griffin <aaron at archlinux.org>
-# Contributor: David Moore <davidm at sjsoft.com>
-
-pkgname=slib
-pkgver=3b5
-pkgrel=2
-pkgdesc="A library providing functions for Scheme implementations"
-arch=('any')
-url="http://people.csail.mit.edu/jaffer/SLIB.html"
-license=('custom')
-depends=('guile1.8' 'sh')
-options=('emptydirs')
-install=slib.install
-source=("http://groups.csail.mit.edu/mac/ftpdir/scm/$pkgname-$pkgver.zip")
-md5sums=('b3181fa98bbb4153a4fc984c3e71a86b')
-
-prepare() {
-  cd ${pkgname}
-  sed -r -i "s,/usr/(local/)?lib/slib,/usr/share/slib,g" *.init
-}
-
-package() {
-  cd ${pkgname}
-  install -m755 -d "${pkgdir}"/usr/{bin,share/{guile/site,slib}}
-  install -m644 *.scm *.init *.xyz *.txt *.dat *.ps "${pkgdir}/usr/share/slib/"
-  install -D -m644 slib.info "${pkgdir}/usr/share/info/slib.info"
-  install -D -m644 slib.1 "${pkgdir}/usr/share/man/man1/slib.1"
-  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
-
-  cat << _EOF > "${pkgdir}/usr/bin/slib"
-#!/bin/sh
-SCHEME_LIBRARY_PATH=/usr/share/slib/
-export SCHEME_LIBRARY_PATH
-VERSION=${pkgver}
-S48_VICINITY="/usr/share/scheme48/"
-export S48_VICINITY
-_EOF
-
-  cat slib.sh >> "${pkgdir}/usr/bin/slib"
-  chmod 755 "${pkgdir}/usr/bin/slib"
-
-  ln -s /usr/share/slib "${pkgdir}/usr/share/guile/site/"
-}

Copied: slib/repos/community-any/PKGBUILD (from rev 264889, slib/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2017-10-31 11:03:43 UTC (rev 264890)
@@ -0,0 +1,40 @@
+# $Id$
+# Maintainer: Alexander F Rødseth <xyproto at archlinux.org>
+# Contributor: Aaron Griffin <aaron at archlinux.org>
+# Contributor: David Moore <davidm at sjsoft.com>
+
+pkgname=slib
+pkgver=3b5
+pkgrel=3
+pkgdesc='Library of functions for Scheme implementations'
+arch=('any')
+url='https://people.csail.mit.edu/jaffer/SLIB.html'
+license=('custom')
+depends=('guile')
+options=('emptydirs')
+source=("https://groups.csail.mit.edu/mac/ftpdir/scm/$pkgname-$pkgver.zip")
+sha256sums=('f8b64a9820c2ccbdb263a0cb7bcf4caadce0857fdf4e2f52111ca33b4a131760')
+
+prepare() {
+  cd $pkgname
+  
+  # Path fix
+  sed -r -i 's,/usr/(local/)?lib/slib,/usr/share/slib,g' *.init
+
+  # Add missing headers and definitions
+  sed -i "1s,^,#!/bin/sh\nexport SCHEME_LIBRARY_PATH=/usr/share/slib/\nVERSION=$pkgver\n,;s,\${S48_VICINITY},/usr/share/scheme48/,g" slib.sh
+}
+
+package() {
+  cd $pkgname
+
+  install -d "$pkgdir"/usr/{bin,share/{guile/site,slib}}
+  install -m644 *.scm *.init *.xyz *.txt *.dat *.ps "$pkgdir/usr/share/slib/"
+  install -Dm755 slib.sh "$pkgdir/usr/bin/slib"
+  ln -s /usr/share/slib "$pkgdir/usr/share/guile/site/"
+  install -Dm644 slib.info "$pkgdir/usr/share/info/slib.info"
+  install -Dm644 slib.1 "$pkgdir/usr/share/man/man1/slib.1"
+  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim: ts=2 sw=2 et:

Copied: slib/repos/community-any/slib-register.hook (from rev 264889, slib/trunk/slib-register.hook)
===================================================================
--- slib-register.hook	                        (rev 0)
+++ slib-register.hook	2017-10-31 11:03:43 UTC (rev 264890)
@@ -0,0 +1,12 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Target = usr/share/slib/register/*.sh
+
+[Action]
+Description = Registering slib for all available scheme compilers...
+When = PostTransaction
+Exec = /bin/sh -c 'while read -r f; do /bin/sh "/$f" 2>&1 > /dev/null; done'
+Depends = slib
+NeedsTargets

Copied: slib/repos/community-any/slib-unregister.hook (from rev 264889, slib/trunk/slib-unregister.hook)
===================================================================
--- slib-unregister.hook	                        (rev 0)
+++ slib-unregister.hook	2017-10-31 11:03:43 UTC (rev 264890)
@@ -0,0 +1,12 @@
+[Trigger]
+Type = File
+Operation = Upgrade
+Operation = Remove
+Target = usr/share/slib/unregister/*.sh
+
+[Action]
+Description = Unregistering slib for all available scheme compilers...
+When = PreTransaction
+Exec = /bin/sh -c 'while read -r f; do /bin/sh "/$f" 2>&1 >/dev/null; done'
+Depends = slib
+NeedsTargets

Deleted: slib.install
===================================================================
--- slib.install	2017-10-31 11:03:22 UTC (rev 264889)
+++ slib.install	2017-10-31 11:03:43 UTC (rev 264890)
@@ -1,14 +0,0 @@
-#TODO the addition of other implementation support should be added here. We
-# can/should generate catalogs for mzscheme, drscheme, whatever else we can
-
-post_upgrade () {
-  guile1.8 -c "((use-modules (ice-9 slib))(require 'new-catalog)(quit))"
-}
-
-post_install() {
-  post_upgrade
-}
-
-pre_remove() {
-  rm usr/share/guile/site/slibcat
-}

Copied: slib/repos/community-any/slib.install (from rev 264889, slib/trunk/slib.install)
===================================================================
--- slib.install	                        (rev 0)
+++ slib.install	2017-10-31 11:03:43 UTC (rev 264890)
@@ -0,0 +1,35 @@
+#
+# This is a bit of a chicken-and-egg problem. slib depends on some sort of scheme interpreter to be installed,
+# but when installing a new scheme interpreter, it should look for and use slib, if installed.
+#
+# This can probably be installed with a pacman hooks.
+#
+
+_new_catalog() {
+  # From https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-scheme/slib/slib-3.2.5-r1.ebuild?id=61b861acd7b49083dab687e133f30f3331cb7480
+	if [[ ! "$1" =~ ^(guile|scm)$ ]]; then
+    echo -n "(load \"/usr/share/slib/$1.init\")"
+	fi
+  echo " (require 'new-catalog) (slib:report-version)"
+}
+
+#post_upgrade () {
+  #[ ! -d /usr/share/guile/site/2.2 ] && install -dm755 /usr/share/guile/site/2.2
+  #[ -d /root/.cache/guile/ccache ] && rm -rf /root/.cache/guile/ccache || true
+  #[ -x /usr/bin/guile ] && guile -c "(use-modules (ice-9 slib)) $(_new_catalog guile-2)"
+  #[ -x /usr/bin/csi ] && csi -e "$(_new_catalog csi)" || echo no chicken
+  #[ -x /usr/bin/scm ] && scm -e "$(_new_catalog scm)" || echo no scm
+  #[ -x /usr/bin/gsi ] && gsi -e "$(_new_catalog gambit)" || echo gambit slib installation failed
+#}
+
+#post_install() {
+#  post_upgrade
+#}
+
+#pre_remove() {
+#  rm -f \
+#    /usr/share/guile/site/slibcat \
+#    /usr/share/guile/site/2.2/slibcat
+#}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list