summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-scheme/guile')
-rw-r--r--dev-scheme/guile/Manifest1
-rw-r--r--dev-scheme/guile/files/guile-3.0-fix-32bit-BE.patch21
-rw-r--r--dev-scheme/guile/files/guile-3.0.10-backport-issue72913.patch394
-rw-r--r--dev-scheme/guile/guile-1.8.8-r102.ebuild171
-rw-r--r--dev-scheme/guile/guile-1.8.8-r5.ebuild (renamed from dev-scheme/guile/guile-1.8.8-r4.ebuild)5
-rw-r--r--dev-scheme/guile/guile-2.2.7-r102.ebuild (renamed from dev-scheme/guile/guile-2.2.7-r100.ebuild)34
-rw-r--r--dev-scheme/guile/guile-3.0.10-r102.ebuild (renamed from dev-scheme/guile/guile-3.0.10-r100.ebuild)49
-rw-r--r--dev-scheme/guile/guile-3.0.9.ebuild81
8 files changed, 660 insertions, 96 deletions
diff --git a/dev-scheme/guile/Manifest b/dev-scheme/guile/Manifest
index c1735be1a9cc..356da8c593a8 100644
--- a/dev-scheme/guile/Manifest
+++ b/dev-scheme/guile/Manifest
@@ -1,4 +1,3 @@
DIST guile-1.8.8.tar.gz 3956654 BLAKE2B 4820d635ac2c57526c0c03f3e0e6e4ac4276533ea8db15e6d1b759c33edec094a1a4bdc3e09ccae61f1b271d63565063746feea242a90c18cd575775444a42ef SHA512 ede6feb90cd419d8763feb8c5169275490a653919573c4dfced025b74cf591072b3a10ffb9a3f6ee3fe7b0a0956ffcf434e0859b421455c8349cea56bf427db0
DIST guile-2.2.7.tar.xz 10881984 BLAKE2B e2b1fe7cb010371beaaf32f8f173397c90fd291ed7d5835b9d976f37fd133254841b4179bd1e1cd02e604c7befcab6c25f85d20ba0850f96978f7c32ca1fe6d8 SHA512 6f60b3489e26f5ff32b55c89316cdcdbf3ec1f4344726006e445f24098c922c50becdc748f1b66d2b271dc002e409ee6210bf85da779cee1f68c9111b3b5c543
DIST guile-3.0.10.tar.xz 5802280 BLAKE2B 2b41f1afb282eb4672f5aca5b044f47a12509745f5580fc4a621e7555c8b884f92dc76bc78fbdf8a64d59cf1de65b230ce03b0a34bbcb77307a7c9453a277ac6 SHA512 8b58e6c70cd48af85a0b346fcdf488fd5ac8d8678181c9c469895bf6ddab909c415e471776fdcda3c234e00fae80bdd4518c17ff16cf8107a36d2990a4face1d
-DIST guile-3.0.9.tar.xz 5750636 BLAKE2B 693f189bda52468d989f27c9482b515b8a14ed814d6e4a9a988d7a03d9789903a568b41c5e3ae524b3a51cc635693cd20245b2017efabb9774be59c298823083 SHA512 a1e47a60a654f26edc57b3a34d943e15a055fc85c3cc764e912be23a80d56534b16f3512d7c7bc426f24a0cac1fcc9556802ac248f10c1fbdde51cd1e24afaf2
diff --git a/dev-scheme/guile/files/guile-3.0-fix-32bit-BE.patch b/dev-scheme/guile/files/guile-3.0-fix-32bit-BE.patch
new file mode 100644
index 000000000000..6417f639b5df
--- /dev/null
+++ b/dev-scheme/guile/files/guile-3.0-fix-32bit-BE.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/940650#c4
+https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=977223;filename=guile-3.0-fix-32bit-BE.patch;msg=66
+
+diff --git a/stage0/Makefile.am b/stage0/Makefile.am
+index 12029fb45..b00611df0 100644
+--- a/stage0/Makefile.am
++++ b/stage0/Makefile.am
+@@ -22,7 +22,12 @@
+
+
+ GUILE_WARNINGS = -W0
+-GUILE_OPTIMIZATIONS = -O1
++$(ifeq($SCM_PREBUILT_BINARIES,"32-bit-little-endian") \
++ GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps \
++else \
++ GUILE_OPTIMIZATIONS = -O1 \
++endif)
++
+ GUILE_BOOTSTRAP_STAGE = stage0
+
+ include $(top_srcdir)/am/bootstrap.am
diff --git a/dev-scheme/guile/files/guile-3.0.10-backport-issue72913.patch b/dev-scheme/guile/files/guile-3.0.10-backport-issue72913.patch
new file mode 100644
index 000000000000..0a4d84cfea31
--- /dev/null
+++ b/dev-scheme/guile/files/guile-3.0.10-backport-issue72913.patch
@@ -0,0 +1,394 @@
+https://bugs.gentoo.org/940650#c12
+https://issues.guix.gnu.org/72913
+https://git.savannah.gnu.org/cgit/guile.git/commit/?id=aff9ac968840e9c86719fb613bd2ed3c39b9905c
+
+From 605440d8021061a4ef8c18370783ef39f62c59b2 Mon Sep 17 00:00:00 2001
+From: Andy Wingo <wingo@pobox.com>
+Date: Wed, 25 Sep 2024 17:23:06 +0200
+Subject: [PATCH 1/4] Fix fixpoint needed-bits computation in
+ specialize-numbers
+
+* module/language/cps/specialize-numbers.scm (next-power-of-two): Use
+integer-length. No change.
+(compute-significant-bits): Fix the fixpoint computation, which was
+failing to complete in some cases with loops.
+---
+ module/language/cps/specialize-numbers.scm | 27 ++++++++--------------
+ 1 file changed, 10 insertions(+), 17 deletions(-)
+
+diff --git a/module/language/cps/specialize-numbers.scm b/module/language/cps/specialize-numbers.scm
+index 4ec88871c..12963cd71 100644
+--- a/module/language/cps/specialize-numbers.scm
++++ b/module/language/cps/specialize-numbers.scm
+@@ -265,10 +265,7 @@
+ (sigbits-intersect a (sigbits-intersect b c)))
+
+ (define (next-power-of-two n)
+- (let lp ((out 1))
+- (if (< n out)
+- out
+- (lp (ash out 1)))))
++ (ash 1 (integer-length n)))
+
+ (define (range->sigbits min max)
+ (cond
+@@ -310,18 +307,16 @@
+ BITS indicating the significant bits needed for a variable. BITS may be
+ #f to indicate all bits, or a non-negative integer indicating a bitmask."
+ (let ((preds (invert-graph (compute-successors cps kfun))))
+- (let lp ((worklist (intmap-keys preds)) (visited empty-intset)
+- (out empty-intmap))
++ (let lp ((worklist (intmap-keys preds)) (out empty-intmap))
+ (match (intset-prev worklist)
+ (#f out)
+ (label
+- (let ((worklist (intset-remove worklist label))
+- (visited* (intset-add visited label)))
++ (let ((worklist (intset-remove worklist label)))
+ (define (continue out*)
+- (if (and (eq? out out*) (eq? visited visited*))
+- (lp worklist visited out)
++ (if (eq? out out*)
++ (lp worklist out)
+ (lp (intset-union worklist (intmap-ref preds label))
+- visited* out*)))
++ out*)))
+ (define (add-def out var)
+ (intmap-add out var 0 sigbits-union))
+ (define (add-defs out vars)
+@@ -352,12 +347,10 @@ BITS indicating the significant bits needed for a variable. BITS may be
+ (($ $values args)
+ (match (intmap-ref cps k)
+ (($ $kargs _ vars)
+- (if (intset-ref visited k)
+- (fold (lambda (arg var out)
+- (intmap-add out arg (intmap-ref out var)
+- sigbits-union))
+- out args vars)
+- out))
++ (fold (lambda (arg var out)
++ (intmap-add out arg (intmap-ref out var (lambda (_) 0))
++ sigbits-union))
++ out args vars))
+ (($ $ktail)
+ (add-unknown-uses out args))))
+ (($ $call proc args)
+--
+2.47.0
+
+
+From 6953fcb8d9b7d9d36bf36e83e80e24153d37e2a4 Mon Sep 17 00:00:00 2001
+From: Andy Wingo <wingo@pobox.com>
+Date: Wed, 25 Sep 2024 17:24:51 +0200
+Subject: [PATCH 2/4] Fix boxing of non-fixnum negative u64 values
+
+* module/language/cps/specialize-numbers.scm (u64->fixnum/truncate): New
+helper.
+(specialize-operations): Fix specialized boxing of u64 values to
+truncate possibly-negative values, to avoid confusing CSE. Fixes
+https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71891.
+---
+ module/language/cps/specialize-numbers.scm | 21 ++++++++++++++++++++-
+ 1 file changed, 20 insertions(+), 1 deletion(-)
+
+diff --git a/module/language/cps/specialize-numbers.scm b/module/language/cps/specialize-numbers.scm
+index 12963cd71..e9761f0cb 100644
+--- a/module/language/cps/specialize-numbers.scm
++++ b/module/language/cps/specialize-numbers.scm
+@@ -115,6 +115,13 @@
+ (letk ks64 ($kargs ('s64) (s64) ,tag-body))
+ (build-term
+ ($continue ks64 src ($primcall 'u64->s64 #f (u64))))))
++(define (u64->fixnum/truncate cps k src u64 bits)
++ (with-cps cps
++ (letv truncated)
++ (let$ tag-body (u64->fixnum k src truncated))
++ (letk ku64 ($kargs ('truncated) (truncated) ,tag-body))
++ (build-term
++ ($continue ku64 src ($primcall 'ulogand/immediate bits (u64))))))
+ (define-simple-primcall scm->u64)
+ (define-simple-primcall scm->u64/truncate)
+ (define-simple-primcall u64->scm)
+@@ -473,7 +480,19 @@ BITS indicating the significant bits needed for a variable. BITS may be
+ (define (box-s64 result)
+ (if (fixnum-result? result) tag-fixnum s64->scm))
+ (define (box-u64 result)
+- (if (fixnum-result? result) u64->fixnum u64->scm))
++ (call-with-values
++ (lambda ()
++ (lookup-post-type types label result 0))
++ (lambda (type min max)
++ (cond
++ ((and (type<=? type &exact-integer)
++ (<= 0 min max (target-most-positive-fixnum)))
++ u64->fixnum)
++ ((only-fixnum-bits-used? result)
++ (lambda (cps k src u64)
++ (u64->fixnum/truncate cps k src u64 (intmap-ref sigbits result))))
++ (else
++ u64->scm)))))
+ (define (box-f64 result)
+ f64->scm)
+
+--
+2.47.0
+
+
+From b0559dbe88eb54e2bba4a82dd1f7e7c5b6de2f55 Mon Sep 17 00:00:00 2001
+From: Andy Wingo <wingo@pobox.com>
+Date: Mon, 23 Sep 2024 15:57:23 +0200
+Subject: [PATCH 3/4] Narrow parameter of logand/immediate if no bits used
+
+* module/language/cps/specialize-numbers.scm (specialize-operations):
+Narrow ulogand/immediate param according to used bits.
+---
+ module/language/cps/specialize-numbers.scm | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/module/language/cps/specialize-numbers.scm b/module/language/cps/specialize-numbers.scm
+index e9761f0cb..262dee484 100644
+--- a/module/language/cps/specialize-numbers.scm
++++ b/module/language/cps/specialize-numbers.scm
+@@ -1,6 +1,6 @@
+ ;;; Continuation-passing style (CPS) intermediate language (IL)
+
+-;; Copyright (C) 2015-2021, 2023 Free Software Foundation, Inc.
++;; Copyright (C) 2015-2021,2023-2024 Free Software Foundation, Inc.
+
+ ;;;; This library is free software; you can redistribute it and/or
+ ;;;; modify it under the terms of the GNU Lesser General Public
+@@ -573,9 +573,11 @@ BITS indicating the significant bits needed for a variable. BITS may be
+ (specialize-unop cps k src op param a
+ (unbox-u64 a) (box-u64 result))))
+
+- (('logand/immediate (? u64-result? ) param (? u64-operand? a))
++ (('logand/immediate (? u64-result?) param (? u64-operand? a))
+ (specialize-unop cps k src 'ulogand/immediate
+- (logand param (1- (ash 1 64)))
++ (logand param
++ (or (intmap-ref sigbits result) -1)
++ (1- (ash 1 64)))
+ a
+ (unbox-u64 a) (box-u64 result)))
+
+--
+2.47.0
+
+
+From 51db308ec2107f9fb32a06004e7a0a3da6418ff6 Mon Sep 17 00:00:00 2001
+From: Andy Wingo <wingo@pobox.com>
+Date: Thu, 26 Sep 2024 11:14:52 +0200
+Subject: [PATCH 4/4] Run sigbits fixpoint based on use/def graph, not cfg
+
+* module/language/cps/specialize-numbers.scm (sigbits-ref): New helper.
+(invert-graph*): New helper.
+(compute-significant-bits): When visiting a term changes computed
+needed-bits for one of its definitions, we need to revisit the variables
+that contributed to its result (the uses), because they might need more
+bits as well. Previously we were doing this by enqueueing predecessors
+to the term, which worked if the uses were defined in predecessors, or
+if all defining terms were already in the worklist, which is the case
+without loops. But with loops, when revisiting a term, you could see
+that it causes sigbits to change, enqueue its predecessors, but then the
+predecessors don't change anything and the fixpoint stops before
+reaching the definitions of the variables we need. So instead we
+compute the use-def graph and enqueue defs directly.
+---
+ module/language/cps/specialize-numbers.scm | 120 ++++++++++-----------
+ 1 file changed, 54 insertions(+), 66 deletions(-)
+
+diff --git a/module/language/cps/specialize-numbers.scm b/module/language/cps/specialize-numbers.scm
+index 262dee484..ac63c8194 100644
+--- a/module/language/cps/specialize-numbers.scm
++++ b/module/language/cps/specialize-numbers.scm
+@@ -286,6 +286,9 @@
+ (and (type<=? type (logior &exact-integer &u64 &s64))
+ (range->sigbits min max)))))
+
++(define (sigbits-ref sigbits var)
++ (intmap-ref sigbits var (lambda (_) 0)))
++
+ (define significant-bits-handlers (make-hash-table))
+ (define-syntax-rule (define-significant-bits-handler
+ ((primop label types out def ...) param arg ...)
+@@ -297,24 +300,42 @@
+ (define-significant-bits-handler ((logand label types out res) param a b)
+ (let ((sigbits (sigbits-intersect3 (inferred-sigbits types label a)
+ (inferred-sigbits types label b)
+- (intmap-ref out res (lambda (_) 0)))))
++ (sigbits-ref out res))))
+ (intmap-add (intmap-add out a sigbits sigbits-union)
+ b sigbits sigbits-union)))
+ (define-significant-bits-handler ((logand/immediate label types out res) param a)
+ (let ((sigbits (sigbits-intersect3 (inferred-sigbits types label a)
+ param
+- (intmap-ref out res (lambda (_) 0)))))
++ (sigbits-ref out res))))
+ (intmap-add out a sigbits sigbits-union)))
+
+ (define (significant-bits-handler primop)
+ (hashq-ref significant-bits-handlers primop))
+
++(define (invert-graph* defs)
++ "Given a graph LABEL->VAR..., return a graph VAR->LABEL.... Like the one
++in (language cps graphs), but different because it doesn't assume that
++the domain will be the same before and after."
++ (persistent-intmap
++ (intmap-fold (lambda (label vars out)
++ (intset-fold
++ (lambda (var out)
++ (intmap-add! out var (intset label) intset-union))
++ vars
++ out))
++ defs
++ empty-intmap)))
++
+ (define (compute-significant-bits cps types kfun)
+ "Given the locally inferred types @var{types}, compute a map of VAR ->
+ BITS indicating the significant bits needed for a variable. BITS may be
+ #f to indicate all bits, or a non-negative integer indicating a bitmask."
+- (let ((preds (invert-graph (compute-successors cps kfun))))
+- (let lp ((worklist (intmap-keys preds)) (out empty-intmap))
++ (let ((cps (intmap-select cps (compute-function-body cps kfun))))
++ ;; Label -> Var...
++ (define-values (defs uses) (compute-defs-and-uses cps))
++ ;; Var -> Label...
++ (define defs-by-var (invert-graph* defs))
++ (let lp ((worklist (intmap-keys cps)) (out empty-intmap))
+ (match (intset-prev worklist)
+ (#f out)
+ (label
+@@ -322,69 +343,36 @@ BITS indicating the significant bits needed for a variable. BITS may be
+ (define (continue out*)
+ (if (eq? out out*)
+ (lp worklist out)
+- (lp (intset-union worklist (intmap-ref preds label))
++ (lp (intset-fold
++ (lambda (use worklist)
++ (intset-union worklist (intmap-ref defs-by-var use)))
++ (intmap-ref uses label)
++ worklist)
+ out*)))
+- (define (add-def out var)
+- (intmap-add out var 0 sigbits-union))
+- (define (add-defs out vars)
+- (match vars
+- (() out)
+- ((var . vars) (add-defs (add-def out var) vars))))
+- (define (add-unknown-use out var)
++ (define (add-unknown-use var out)
+ (intmap-add out var (inferred-sigbits types label var)
+ sigbits-union))
+- (define (add-unknown-uses out vars)
+- (match vars
+- (() out)
+- ((var . vars)
+- (add-unknown-uses (add-unknown-use out var) vars))))
++ (define (default)
++ (intset-fold add-unknown-use (intmap-ref uses label) out))
+ (continue
+ (match (intmap-ref cps label)
+- (($ $kfun src meta self)
+- (if self (add-def out self) out))
+- (($ $kargs names vars term)
+- (let ((out (add-defs out vars)))
+- (match term
+- (($ $continue k src exp)
+- (match exp
+- ((or ($ $const) ($ $prim) ($ $fun) ($ $const-fun)
+- ($ $code) ($ $rec))
+- ;; No uses, so no info added to sigbits.
+- out)
+- (($ $values args)
+- (match (intmap-ref cps k)
+- (($ $kargs _ vars)
+- (fold (lambda (arg var out)
+- (intmap-add out arg (intmap-ref out var (lambda (_) 0))
+- sigbits-union))
+- out args vars))
+- (($ $ktail)
+- (add-unknown-uses out args))))
+- (($ $call proc args)
+- (add-unknown-use (add-unknown-uses out args) proc))
+- (($ $callk label proc args)
+- (let ((out (add-unknown-uses out args)))
+- (if proc
+- (add-unknown-use out proc)
+- out)))
+- (($ $calli args callee)
+- (add-unknown-uses (add-unknown-use out callee) args))
+- (($ $primcall name param args)
+- (let ((h (significant-bits-handler name)))
+- (if h
+- (match (intmap-ref cps k)
+- (($ $kargs _ defs)
+- (h label types out param args defs)))
+- (add-unknown-uses out args))))))
+- (($ $branch kf kt src op param args)
+- (add-unknown-uses out args))
+- (($ $switch kf kt src arg)
+- (add-unknown-use out arg))
+- (($ $prompt k kh src escape? tag)
+- (add-unknown-use out tag))
+- (($ $throw src op param args)
+- (add-unknown-uses out args)))))
+- (_ out)))))))))
++ (($ $kargs _ _ ($ $continue k _ ($ $primcall op param args)))
++ (match (significant-bits-handler op)
++ (#f (default))
++ (h
++ (match (intmap-ref cps k)
++ (($ $kargs _ defs)
++ (h label types out param args defs))))))
++ (($ $kargs _ _ ($ $continue k _ ($ $values args)))
++ (match (intmap-ref cps k)
++ (($ $kargs _ vars)
++ (fold (lambda (arg var out)
++ (intmap-add out arg (sigbits-ref out var)
++ sigbits-union))
++ out args vars))
++ (($ $ktail)
++ (default))))
++ (_ (default))))))))))
+
+ (define (specialize-operations cps)
+ (define (u6-parameter? param)
+@@ -416,7 +404,7 @@ BITS indicating the significant bits needed for a variable. BITS may be
+ (define (all-u64-bits-set? var)
+ (operand-in-range? var &exact-integer (1- (ash 1 64)) (1- (ash 1 64))))
+ (define (only-fixnum-bits-used? var)
+- (let ((bits (intmap-ref sigbits var)))
++ (let ((bits (sigbits-ref sigbits var)))
+ (and bits (= bits (logand bits (target-most-positive-fixnum))))))
+ (define (fixnum-result? result)
+ (or (only-fixnum-bits-used? result)
+@@ -429,7 +417,7 @@ BITS indicating the significant bits needed for a variable. BITS may be
+ min max
+ (target-most-positive-fixnum)))))))
+ (define (only-u64-bits-used? var)
+- (let ((bits (intmap-ref sigbits var)))
++ (let ((bits (sigbits-ref sigbits var)))
+ (and bits (= bits (logand bits (1- (ash 1 64)))))))
+ (define (u64-result? result)
+ (or (only-u64-bits-used? result)
+@@ -490,7 +478,7 @@ BITS indicating the significant bits needed for a variable. BITS may be
+ u64->fixnum)
+ ((only-fixnum-bits-used? result)
+ (lambda (cps k src u64)
+- (u64->fixnum/truncate cps k src u64 (intmap-ref sigbits result))))
++ (u64->fixnum/truncate cps k src u64 (sigbits-ref sigbits result))))
+ (else
+ u64->scm)))))
+ (define (box-f64 result)
+@@ -576,7 +564,7 @@ BITS indicating the significant bits needed for a variable. BITS may be
+ (('logand/immediate (? u64-result?) param (? u64-operand? a))
+ (specialize-unop cps k src 'ulogand/immediate
+ (logand param
+- (or (intmap-ref sigbits result) -1)
++ (or (sigbits-ref sigbits a) -1)
+ (1- (ash 1 64)))
+ a
+ (unbox-u64 a) (box-u64 result)))
+--
+2.47.0
+
diff --git a/dev-scheme/guile/guile-1.8.8-r102.ebuild b/dev-scheme/guile/guile-1.8.8-r102.ebuild
new file mode 100644
index 000000000000..02b22963cc6d
--- /dev/null
+++ b/dev-scheme/guile/guile-1.8.8-r102.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic elisp-common
+
+DESCRIPTION="GNU Ubiquitous Intelligent Language for Extensions"
+HOMEPAGE="https://www.gnu.org/software/guile/"
+SRC_URI="mirror://gnu/guile/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="$(ver_cut 1-2)"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="debug debug-freelist debug-malloc +deprecated discouraged emacs networking nls readline +regex +threads"
+RESTRICT="!regex? ( test )"
+
+RDEPEND="
+ >=dev-libs/gmp-4.1:0=
+ dev-libs/libltdl:0=
+ sys-devel/gettext
+ sys-libs/ncurses:0=
+ virtual/libcrypt:=
+ readline? ( sys-libs/readline:0= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-apps/texinfo
+ dev-build/libtool
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix_guile-config.patch
+ "${FILESDIR}"/${P}-gcc46.patch
+ "${FILESDIR}"/${P}-gcc5.patch
+ "${FILESDIR}"/${P}-makeinfo-5.patch
+ "${FILESDIR}"/${P}-gtexinfo-5.patch
+ "${FILESDIR}"/${P}-readline.patch
+ "${FILESDIR}"/${P}-tinfo.patch
+ "${FILESDIR}"/${P}-sandbox.patch
+ "${FILESDIR}"/${P}-mkdir-mask.patch
+ "${FILESDIR}"/${PN}-1.8.8-texinfo-6.7.patch
+)
+
+DOCS=( AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS )
+
+# Where to install data files.
+GUILE_DATA="${EPREFIX}/usr/share/guile-data/${SLOT}"
+GUILE_PCDIR="${EPREFIX}/usr/share/guile-data/${SLOT}/pkgconfig"
+GUILE_INFODIR="${EPREFIX}"/usr/share/guile-data/"${SLOT}"/info
+
+src_prepare() {
+ default
+
+ sed \
+ -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g" \
+ -e "/AM_PROG_CC_STDC/d" \
+ -i guile-readline/configure.in || die
+
+ mv "${S}"/configure.{in,ac} || die
+ mv "${S}"/guile-readline/configure.{in,ac} || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # See bug #178499. filter-flags no longer works since the compiler
+ # will vectorize by default when optimizing.
+ append-flags -fno-tree-vectorize -fno-strict-aliasing
+
+ #will fail for me if posix is disabled or without modules -- hkBst
+ myconf=(
+ --program-suffix="-${SLOT}"
+ --infodir="${GUILE_INFODIR}"
+ --includedir="${EPREFIX}/usr/include/guile/${SLOT}"
+
+ --disable-error-on-warning
+ --disable-static
+ --enable-posix
+ $(use_enable networking)
+ $(use_enable readline)
+ $(use_enable regex)
+ $(use deprecated || use_enable discouraged)
+ $(use_enable deprecated)
+ $(use_enable emacs elisp)
+ $(use_enable nls)
+ --disable-rpath
+ $(use_enable debug-freelist)
+ $(use_enable debug-malloc)
+ $(use_enable debug guile-debug)
+ $(use_with threads)
+ --with-modules
+ )
+ econf "${myconf[@]}" EMACS=no
+}
+
+src_compile() {
+ emake
+
+ # Above we have disabled the build system's Emacs support;
+ # for USE=emacs we compile (and install) the files manually
+ if use emacs; then
+ cd emacs || die
+ elisp-compile *.el || die
+ fi
+}
+
+# Akin to (and taken from) toolchain-autoconfs eclass
+guile_slot_info() {
+ rm -f dir || die
+
+ pushd "${D}/${GUILE_INFODIR}" >/dev/null || die
+ for f in *.info*; do
+ # Install convenience aliases for versioned Guile pages.
+ ln -s "$f" "${f/./-${SLOT}.}" || die
+ done
+ popd >/dev/null || die
+
+ docompress "${GUILE_INFODIR}"
+}
+
+src_install() {
+ default
+
+ dodir "${GUILE_PCDIR}"
+ sed -e "/libdir/i bindir=${ESYSROOT}/usr/bin" \
+ -e "/libguileinterface/a guile=\${bindir}/guile-${SLOT}" \
+ -i "${ED}"/usr/$(get_libdir)/pkgconfig/guile-1.8.pc || die
+ mv "${ED}"/usr/$(get_libdir)/pkgconfig/guile-1.8.pc "${D}/${GUILE_PCDIR}"/guile-1.8.pc || die
+
+ sed -i "1s/guile/guile-1.8/" "${ED}"/usr/bin/guile-config-1.8 || die
+
+ for script in PROGRAM autofrisk doc-snarf generate-autoload punify \
+ read-scheme-source scan-api snarf-guile-m4-docs use2dot \
+ api-diff display-commentary frisk lint read-rfc822 \
+ read-text-outline snarf-check-and-output-texi summarize-guile-TODO; do
+ sed "s/GUILE-guile/GUILE-guile-1.8/" \
+ -i "${ED}"/usr/share/guile/1.8/scripts/${script}-1.8 || die
+ mv "${ED}"/usr/share/guile/1.8/scripts/${script}{-1.8,} || die
+ done
+
+ mv "${ED}"/usr/share/aclocal/guile{,-"${SLOT}"}.m4 || die
+ find "${ED}" -name '*.la' -delete || die
+
+ guile_slot_info
+
+ local major="$(ver_cut 1 "${SLOT}")"
+ local minor="$(ver_cut 2 "${SLOT}")"
+ local idx="$((99999-(major*1000+minor)))"
+ newenvd - "50guile${idx}" <<-EOF
+ PKG_CONFIG_PATH="${GUILE_PCDIR}"
+ INFOPATH="${GUILE_INFODIR}"
+ EOF
+
+ # necessary for registering slib, see bug 206896
+ keepdir /usr/share/guile/site
+
+ if use emacs; then
+ elisp-install ${PN}-${SLOT} emacs/*.{el,elc}
+ elisp-make-site-file "50${PN}-${SLOT}-gentoo.el"
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-scheme/guile/guile-1.8.8-r4.ebuild b/dev-scheme/guile/guile-1.8.8-r5.ebuild
index 5844c16085b0..2bb5c4af7553 100644
--- a/dev-scheme/guile/guile-1.8.8-r4.ebuild
+++ b/dev-scheme/guile/guile-1.8.8-r5.ebuild
@@ -66,8 +66,9 @@ src_prepare() {
}
src_configure() {
- # see bug #178499
- filter-flags -ftree-vectorize
+ # See bug #178499. filter-flags no longer works since the compiler
+ # will vectorize by default when optimizing.
+ append-flags -fno-tree-vectorize -fno-strict-aliasing
#will fail for me if posix is disabled or without modules -- hkBst
myconf=(
diff --git a/dev-scheme/guile/guile-2.2.7-r100.ebuild b/dev-scheme/guile/guile-2.2.7-r102.ebuild
index f8523d251f35..c948400c4f5d 100644
--- a/dev-scheme/guile/guile-2.2.7-r100.ebuild
+++ b/dev-scheme/guile/guile-2.2.7-r102.ebuild
@@ -9,7 +9,7 @@ SRC_URI="mirror://gnu/guile/${P}.tar.xz"
LICENSE="LGPL-3+"
SLOT="$(ver_cut 1-2)" # See (guile)Parallel Installations.
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
IUSE="debug debug-malloc +deprecated +networking +nls +regex +threads" # upstream recommended +networking +nls
REQUIRED_USE="regex" # workaround for bug 596322
RESTRICT="strip"
@@ -41,6 +41,8 @@ PATCHES=(
# It's a portage's false positive. bug #677600
QA_PREBUILT='*[.]go'
+GUILE_INFODIR="${EPREFIX}"/usr/share/guile-data/"${SLOT}"/info
+
DOCS=( GUILE-VERSION HACKING README )
src_configure() {
@@ -48,6 +50,7 @@ src_configure() {
mv prebuilt/32-bit-big-endian{,.broken} || die
econf \
+ --infodir="${GUILE_INFODIR}" \
--program-suffix="-${SLOT}" \
--disable-error-on-warning \
--disable-rpath \
@@ -68,6 +71,20 @@ src_configure() {
$(use_with threads)
}
+# Akin to (and taken from) toolchain-autoconfs eclass
+guile_slot_info() {
+ rm -f dir || die
+
+ pushd "${D}/${GUILE_INFODIR}" >/dev/null || die
+ for f in *.info*; do
+ # Install convenience aliases for versioned Guile pages.
+ ln -s "$f" "${f/./-${SLOT}.}" || die
+ done
+ popd >/dev/null || die
+
+ docompress "${GUILE_INFODIR}"
+}
+
src_install() {
default
@@ -81,13 +98,20 @@ src_install() {
# Move the pkg-config files to guile-data. In future versions, this
# should be handled by --with-pkgconfigdir (patch waiting on
# upstream).
- local pcdir=/usr/share/guile-data/"${SLOT}"
- mkdir -p "${ED}${pcdir}" || die
+ local datadir=/usr/share/guile-data/"${SLOT}"
+ local pcdir="${datadir}"/pkgconfig
+ mkdir -p "${ED}${datadir}" || die
mv "${ED}"/usr/share/aclocal/guile{,-"${SLOT}"}.m4 || die
mv "${ED}"/usr/$(get_libdir)/pkgconfig/ \
"${ED}/${pcdir}" || die
- newenvd - "50guile${SLOT}" <<-EOF
- PKG_CONFIG_PATH="${pcdir}/pkgconfig"
+ guile_slot_info
+
+ local major="$(ver_cut 1 "${SLOT}")"
+ local minor="$(ver_cut 2 "${SLOT}")"
+ local idx="$((99999-(major*1000+minor)))"
+ newenvd - "50guile${idx}" <<-EOF
+ PKG_CONFIG_PATH="${pcdir}"
+ INFOPATH="${GUILE_INFODIR}"
EOF
}
diff --git a/dev-scheme/guile/guile-3.0.10-r100.ebuild b/dev-scheme/guile/guile-3.0.10-r102.ebuild
index 6e77a662ec8e..38857723c0be 100644
--- a/dev-scheme/guile/guile-3.0.10-r100.ebuild
+++ b/dev-scheme/guile/guile-3.0.10-r102.ebuild
@@ -3,13 +3,15 @@
EAPI=8
+inherit autotools
+
DESCRIPTION="GNU Ubiquitous Intelligent Language for Extensions"
HOMEPAGE="https://www.gnu.org/software/guile/"
SRC_URI="mirror://gnu/guile/${P}.tar.xz"
LICENSE="LGPL-3+"
SLOT="$(ver_cut 1-2)" # See (guile)Parallel Installations.
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
IUSE="debug debug-malloc +deprecated +jit +networking +nls +regex +threads" # upstream recommended +networking +nls
REQUIRED_USE="regex" # workaround for bug #596322
@@ -39,19 +41,31 @@ QA_PREBUILT='*[.]go'
DOCS=( ABOUT-NLS AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS )
-PATCHES=( "${FILESDIR}"/${PN}-2.2.3-gentoo-sandbox.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.2.3-gentoo-sandbox.patch
+ "${FILESDIR}/${PN}-3.0-fix-32bit-BE.patch"
+ "${FILESDIR}/${PN}-3.0.10-backport-issue72913.patch"
+)
# Where to install data files.
-GUILE_DATA="${PREFIX}/usr/share/guile-data/${SLOT}"
-GUILE_PCDIR="/usr/share/guile-data/${SLOT}/pkgconfig"
+GUILE_DATA="${EPREFIX}/usr/share/guile-data/${SLOT}"
+GUILE_PCDIR="${EPREFIX}/usr/share/guile-data/${SLOT}/pkgconfig"
+GUILE_INFODIR="${GUILE_DATA}"/info
+
+src_prepare() {
+ default
+
+ # Needed for fix-32bit-BE.patch
+ eautoreconf
+}
src_configure() {
- # see bug #676468
+ # See bug #676468 (may be able to drop this if we adapt fix-32bit-BE.patch)?
mv prebuilt/32-bit-big-endian{,.broken} || die
local -a myconf=(
--program-suffix="-${SLOT}"
- --infodir="${GUILE_DATA}/info"
+ --infodir="${GUILE_INFODIR}"
--with-pkgconfigdir="${GUILE_PCDIR}"
--disable-error-on-warning
@@ -72,9 +86,24 @@ src_configure() {
$(use_enable regex)
$(use_with threads)
)
+
econf "${myconf[@]}"
}
+# Akin to (and taken from) toolchain-autoconfs eclass
+guile_slot_info() {
+ rm -f dir || die
+
+ pushd "${D}/${GUILE_INFODIR}" >/dev/null || die
+ for f in *.info*; do
+ # Install convenience aliases for versioned Guile pages.
+ ln -s "$f" "${f/./-${SLOT}.}" || die
+ done
+ popd >/dev/null || die
+
+ docompress "${GUILE_INFODIR}"
+}
+
src_install() {
default
@@ -85,7 +114,13 @@ src_install() {
mv "${ED}"/usr/share/aclocal/guile{,-"${SLOT}"}.m4 || die
find "${ED}" -name '*.la' -delete || die
- newenvd - "50guile${SLOT}" <<-EOF
+ guile_slot_info
+
+ local major="$(ver_cut 1 "${SLOT}")"
+ local minor="$(ver_cut 2 "${SLOT}")"
+ local idx="$((99999-(major*1000+minor)))"
+ newenvd - "50guile${idx}" <<-EOF
PKG_CONFIG_PATH="${GUILE_PCDIR}"
+ INFOPATH="${GUILE_INFODIR}"
EOF
}
diff --git a/dev-scheme/guile/guile-3.0.9.ebuild b/dev-scheme/guile/guile-3.0.9.ebuild
deleted file mode 100644
index 2c48a15dd4fa..000000000000
--- a/dev-scheme/guile/guile-3.0.9.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MAJOR="3.0"
-DESCRIPTION="GNU Ubiquitous Intelligent Language for Extensions"
-HOMEPAGE="https://www.gnu.org/software/guile/"
-SRC_URI="mirror://gnu/guile/${P}.tar.xz"
-
-LICENSE="LGPL-3+"
-SLOT="12/3.0-1" # libguile-2.2.so.1 => 2.2-1
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
-
-IUSE="debug debug-malloc +deprecated +jit +networking +nls +regex +threads" # upstream recommended +networking +nls
-REQUIRED_USE="regex" # workaround for bug #596322
-RESTRICT="strip"
-
-RDEPEND="
- >=dev-libs/boehm-gc-7.0[threads?]
- dev-libs/gmp:=
- dev-libs/libffi:=
- dev-libs/libatomic_ops
- dev-libs/libunistring:=
- sys-libs/ncurses:=
- sys-libs/readline:=
- virtual/libcrypt:=
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- virtual/pkgconfig
- dev-build/libtool
- sys-devel/gettext
-"
-
-# guile generates ELF files without use of C or machine code
-# It's false positive. bug #677600
-QA_PREBUILT='*[.]go'
-
-DOCS=( ABOUT-NLS AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS )
-
-PATCHES=( "${FILESDIR}"/${PN}-2.2.3-gentoo-sandbox.patch )
-
-src_configure() {
- # see bug #676468
- mv prebuilt/32-bit-big-endian{,.broken} || die
-
- local -a myconf=(
- --disable-error-on-warning
- --disable-rpath
- --disable-lto
- --enable-posix
- --without-libgmp-prefix
- --without-libiconv-prefix
- --without-libintl-prefix
- --without-libreadline-prefix
- --without-libunistring-prefix
- $(use_enable debug guile-debug)
- $(use_enable debug-malloc)
- $(use_enable deprecated)
- $(use_enable jit)
- $(use_enable networking)
- $(use_enable nls)
- $(use_enable regex)
- $(use_with threads)
- )
- econf ${myconf[@]}
-}
-
-src_install() {
- default
-
- # From Novell https://bugzilla.novell.com/show_bug.cgi?id=874028#c0
- dodir /usr/share/gdb/auto-load/$(get_libdir)
- mv "${ED}"/usr/$(get_libdir)/libguile-*-gdb.scm "${ED}"/usr/share/gdb/auto-load/$(get_libdir) || die
-
- # necessary for registering slib, see bug #206896
- keepdir /usr/share/guile/site
-
- find "${ED}" -name '*.la' -delete || die
-}