[arch-commits] Commit in slib/trunk (5 files)
Alexander Rødseth
arodseth at archlinux.org
Tue Oct 31 11:02:46 UTC 2017
Date: Tuesday, October 31, 2017 @ 11:02:45
Author: arodseth
Revision: 264887
Remove guile 1.8 installation
+ add WIP directory
Added:
slib/trunk/wip/
slib/trunk/wip/slib-register.hook
slib/trunk/wip/slib-unregister.hook
slib/trunk/wip/slib.install
Deleted:
slib/trunk/slib.install
--------------------------+
slib.install | 14 --------------
wip/slib-register.hook | 12 ++++++++++++
wip/slib-unregister.hook | 12 ++++++++++++
wip/slib.install | 35 +++++++++++++++++++++++++++++++++++
4 files changed, 59 insertions(+), 14 deletions(-)
Deleted: slib.install
===================================================================
--- slib.install 2017-10-31 11:01:55 UTC (rev 264886)
+++ slib.install 2017-10-31 11:02:45 UTC (rev 264887)
@@ -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
-}
Added: wip/slib-register.hook
===================================================================
--- wip/slib-register.hook (rev 0)
+++ wip/slib-register.hook 2017-10-31 11:02:45 UTC (rev 264887)
@@ -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
Added: wip/slib-unregister.hook
===================================================================
--- wip/slib-unregister.hook (rev 0)
+++ wip/slib-unregister.hook 2017-10-31 11:02:45 UTC (rev 264887)
@@ -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
Added: wip/slib.install
===================================================================
--- wip/slib.install (rev 0)
+++ wip/slib.install 2017-10-31 11:02:45 UTC (rev 264887)
@@ -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