pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/guile Add patch to replace ice-9/slib.scm with a ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a29e51212c26
branches:  trunk
changeset: 501836:a29e51212c26
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Sun Oct 30 00:56:40 2005 +0000

description:
Add patch to replace ice-9/slib.scm with a few lines to read slib's
guile.init.  A bit hackish, but restores slib functionality, which
should restore gnucash to working order.  (The underlying problem is
that slib 3a2 has new primitives that dialect-specific init files are
supposed to define, and ice-9/slib.scm doesn't define one of them.
The slib way is to read slib's guile.init, but guile's way was to have
an implementation of the same interface, know known to be a moving
target.)

PKGREVISION++

diffstat:

 lang/guile/Makefile         |    3 +-
 lang/guile/distinfo         |    3 +-
 lang/guile/patches/patch-ak |  401 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 405 insertions(+), 2 deletions(-)

diffs (truncated from 431 to 300 lines):

diff -r b34b22b632a6 -r a29e51212c26 lang/guile/Makefile
--- a/lang/guile/Makefile       Sat Oct 29 23:49:11 2005 +0000
+++ b/lang/guile/Makefile       Sun Oct 30 00:56:40 2005 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.66 2005/10/16 21:01:19 gdt Exp $
+# $NetBSD: Makefile,v 1.67 2005/10/30 00:56:40 gdt Exp $
 
 DISTNAME=              guile-1.6.7
+PKGREVISION=           1
 CATEGORIES=            lang
 MASTER_SITES=          ${MASTER_SITE_GNU:=guile/}
 
diff -r b34b22b632a6 -r a29e51212c26 lang/guile/distinfo
--- a/lang/guile/distinfo       Sat Oct 29 23:49:11 2005 +0000
+++ b/lang/guile/distinfo       Sun Oct 30 00:56:40 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.24 2005/10/10 17:19:51 joerg Exp $
+$NetBSD: distinfo,v 1.25 2005/10/30 00:56:40 gdt Exp $
 
 SHA1 (guile-1.6.7.tar.gz) = 00a82dc4c7c19f9b791e116a2baf83e7d0c0856d
 RMD160 (guile-1.6.7.tar.gz) = 63d45e8143834c641d4a4732cfbb34e8984f55dd
@@ -10,3 +10,4 @@
 SHA1 (patch-ah) = e66596a5ecc5c2d4fd09833507499b4d02c7af8a
 SHA1 (patch-ai) = 3343ea669fa05c93a2af5a75cf9da5a04d068273
 SHA1 (patch-aj) = 2d55986fd8161bdc32c6e2ef7fe3d89310ab20cd
+SHA1 (patch-ak) = 7da8cba3f56b2f3c036a5db767184931b0afcb95
diff -r b34b22b632a6 -r a29e51212c26 lang/guile/patches/patch-ak
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/guile/patches/patch-ak       Sun Oct 30 00:56:40 2005 +0000
@@ -0,0 +1,401 @@
+$NetBSD: patch-ak,v 1.1 2005/10/30 00:56:40 gdt Exp $
+
+--- ice-9/slib.scm.orig        2004-08-11 21:04:21.000000000 -0400
++++ ice-9/slib.scm
+@@ -1,390 +1,7 @@
+-;;;; slib.scm --- definitions needed to get SLIB to work with Guile
+-;;;;
+-;;;;  Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+-;;;;
+-;;;; This file is part of GUILE.
+-;;;; 
+-;;;; GUILE is free software; you can redistribute it and/or modify it
+-;;;; under the terms of the GNU General Public License as published by
+-;;;; the Free Software Foundation; either version 2, or (at your
+-;;;; option) any later version.
+-;;;; 
+-;;;; GUILE is distributed in the hope that it will be useful, but
+-;;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+-;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-;;;; General Public License for more details.
+-;;;; 
+-;;;; You should have received a copy of the GNU General Public License
+-;;;; along with GUILE; see the file COPYING.  If not, write to the
+-;;;; Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+-;;;; Boston, MA 02111-1307 USA
+-;;;;
+-;;;; As a special exception, the Free Software Foundation gives permission
+-;;;; for additional uses of the text contained in its release of GUILE.
+-;;;;
+-;;;; The exception is that, if you link the GUILE library with other files
+-;;;; to produce an executable, this does not by itself cause the
+-;;;; resulting executable to be covered by the GNU General Public License.
+-;;;; Your use of that executable is in no way restricted on account of
+-;;;; linking the GUILE library code into it.
+-;;;;
+-;;;; This exception does not however invalidate any other reasons why
+-;;;; the executable file might be covered by the GNU General Public License.
+-;;;;
+-;;;; This exception applies only to the code released by the
+-;;;; Free Software Foundation under the name GUILE.  If you copy
+-;;;; code from other Free Software Foundation releases into a copy of
+-;;;; GUILE, as the General Public License permits, the exception does
+-;;;; not apply to the code that you add in this way.  To avoid misleading
+-;;;; anyone as to the status of such modified files, you must delete
+-;;;; this exception notice from them.
+-;;;;
+-;;;; If you write modifications of your own for GUILE, it is your choice
+-;;;; whether to permit this exception to apply to your modifications.
+-;;;; If you do not wish that, delete this exception notice.
+-;;;;
+-(define-module (ice-9 slib)
+-  :export (slib:load
+-         implementation-vicinity
+-         library-vicinity
+-         home-vicinity
+-         scheme-implementation-type
+-         scheme-implementation-version
+-         make-random-state
+-         <? <=? =? >? >=?
+-         require)
+-  :no-backtrace)
++;; Load slib's init file directly, implicitly symbols into the current
++;; module.
++(load (string-append (assoc-ref %guile-build-info 'pkgdatadir)
++                   "/slib/guile.init"))
+ 
+-
+-
+-(define (eval-load <filename> evl)
+-  (if (not (file-exists? <filename>))
+-      (set! <filename> (string-append <filename> (scheme-file-suffix))))
+-  (call-with-input-file <filename>
+-    (lambda (port)
+-      (let ((old-load-pathname *load-pathname*))
+-      (set! *load-pathname* <filename>)
+-      (do ((o (read port) (read port)))
+-          ((eof-object? o))
+-        (evl o))
+-      (set! *load-pathname* old-load-pathname)))))
+-
+-
+-
+-(define-public slib:exit quit)
+-(define-public slib:error error)
+-(define-public slib:warn warn)
+-(define-public slib:eval (lambda (x) (eval x slib-module)))
+-(define defmacro:eval (lambda (x) (eval x (interaction-environment))))
+-(define logical:logand logand)
+-(define logical:logior logior)
+-(define logical:logxor logxor)
+-(define logical:lognot lognot)
+-(define logical:ash ash)
+-(define logical:logcount logcount)
+-(define logical:integer-length integer-length)
+-(define logical:bit-extract bit-extract)
+-(define logical:integer-expt integer-expt)
+-(define logical:ipow-by-squaring ipow-by-squaring)
+-(define-public slib:eval-load eval-load)
+-(define-public slib:tab #\tab)
+-(define-public slib:form-feed #\page)
+-
+-(define slib-module (current-module))
+-
+-(define (defined? symbol)
+-  (module-defined? slib-module symbol))
+-
+-(define slib:features
+-  (append '(source
+-          eval
+-          abort
+-          alist
+-          defmacro
+-          delay
+-          dynamic-wind
+-          full-continuation
+-          hash
+-          hash-table
+-          line-i/o
+-          logical
+-          multiarg/and-
+-          multiarg-apply
+-          promise
+-          rev2-procedures
+-          rev4-optional-procedures
+-          string-port
+-          with-file)
+-
+-        (if (defined? 'getenv)
+-            '(getenv)
+-            '())
+-
+-        (if (defined? 'current-time)
+-            '(current-time)
+-            '())
+-
+-        (if (defined? 'system)
+-            '(system)
+-            '())
+-
+-        (if (defined? 'char-ready?)
+-            '(char-ready?)
+-            '())
+-
+-        (if (and (string->number "0.0") (inexact? (string->number "0.0")))
+-            '(inexact)
+-            '())
+-
+-        (if (rational? (string->number "1/19"))
+-            '(rational)
+-            '())
+-
+-        (if (real? (string->number "0.0"))
+-            '(real)
+-            ())
+-
+-        (if (complex? (string->number "1+i"))
+-            '(complex)
+-            '())
+-
+-        (let ((n (string->number "9999999999999999999999999999999")))
+-          (if (and n (exact? n))
+-              '(bignum)
+-              '()))))
+-
+-
+-;; The array module specified by slib 3a1 is not the same as what guile
+-;; provides, so we must remove `array' from the features list.
+-;;
+-;; The main difference is `create-array' which is similar to
+-;; `make-uniform-array', but the `Ac64' etc prototype procedures incorporate
+-;; an initial fill element into the prototype.
+-;;
+-;; Believe the array-for-each module will need to be taken from slib when
+-;; the array module is taken from there, since what the array module creates
+-;; won't be understood by the guile functions.  So remove `array-for-each'
+-;; from the features list too.
+-;;
+-;; Also, slib 3a1 array-for-each specifies an `array-map' which is not in
+-;; guile (but could be implemented quite easily).
+-;;
+-;; ENHANCE-ME: It'd be nice to implement what's necessary, since the guile
+-;; functions should be more efficient than the implementation in slib.
+-;;
+-;; FIXME: Since the *features* variable is shared by slib and the guile
+-;; core, removing these feature symbols has the unhappy effect of making it
+-;; look like they aren't in the core either.  Let's assume that arrays have
+-;; been present unconditionally long enough that no guile-specific code will
+-;; bother to test.  An alternative would be to make a new separate
+-;; *features* variable which the slib stuff operated on, leaving the core
+-;; mechanism alone.  That might be a good thing anyway.
+-;;
+-(set! *features* (delq 'array          *features*))
+-(set! *features* (delq 'array-for-each *features*))
+-
+-
+-;;; FIXME: Because uers want require to search the path, this uses
+-;;; load-from-path, which probably isn't a hot idea.  slib
+-;;; doesn't expect this function to search a path, so I expect to get
+-;;; bug reports at some point complaining that the wrong file gets
+-;;; loaded when something accidentally appears in the path before
+-;;; slib, etc. ad nauseum.  However, the right fix seems to involve
+-;;; changing catalog:get in slib/require.scm, and I don't expect
+-;;; Aubrey will integrate such a change.  So I'm just going to punt
+-;;; for the time being.
+-(define (slib:load name)
+-  (save-module-excursion
+-   (lambda ()
+-     (set-current-module slib-module)
+-     (let ((errinfo (catch 'system-error
+-                         (lambda ()
+-                           (load-from-path name)
+-                           #f)
+-                         (lambda args args))))
+-       (if (and errinfo
+-              (catch 'system-error
+-                     (lambda ()
+-                       (load-from-path
+-                        (string-append name ".scm"))
+-                       #f)
+-                     (lambda args args)))
+-         (apply throw errinfo))))))
+-
+-(define-public slib:load-source slib:load)
+-(define defmacro:load slib:load)
+-
+-(define slib-parent-dir
+-  (let* ((path (%search-load-path "slib/require.scm")))
+-    (if path
+-      (substring path 0 (- (string-length path) 17))
+-      (error "Could not find slib/require.scm in " %load-path))))
+-
+-(define (implementation-vicinity)
+-  (string-append slib-parent-dir "/"))
+-(define (library-vicinity)
+-  (string-append (implementation-vicinity) "slib/"))
+-(define home-vicinity
+-  (let ((home-path (getenv "HOME")))
+-    (lambda () home-path)))
+-(define (scheme-implementation-type) 'guile)
+-(define (scheme-implementation-version) "")
+-
+-;; legacy from r3rs, but slib says all implementations provide these
+-;; ("Legacy" section of the "Miscellany" node in the manual)
+-(define-public t   #t)
+-(define-public nil #f)
+-
+-(define-public (output-port-width . arg) 80)
+-(define-public (output-port-height . arg) 24)
+-(define (identity x) x)
+-
+-;; slib 3a1 and up, straight from Template.scm
+-(define-public (call-with-open-ports . ports)
+-  (define proc (car ports))
+-  (cond ((procedure? proc) (set! ports (cdr ports)))
+-      (else (set! ports (reverse ports))
+-            (set! proc (car ports))
+-            (set! ports (reverse (cdr ports)))))
+-  (let ((ans (apply proc ports)))
+-    (for-each close-port ports)
+-    ans))
+-
+-;; slib (version 3a1) requires open-file accept a symbol r, rb, w or wb for
+-;; MODES, so extend the guile core open-file accordingly.
+-;;
+-;; slib (version 3a1) also calls open-file with strings "rb" or "wb", not
+-;; sure if that's intentional, but in any case this extension continues to
+-;; accept strings to make that work.
+-;;
+-(define-public open-file
+-  (let ((guile-core-open-file open-file))



Home | Main Index | Thread Index | Old Index