Diff guile-1.8.8-r4 with a guile-2.2.7-r1

/usr/portage/dev-scheme/guile/guile-2.2.7-r1.ebuild 2023-10-09 14:52:30.900368386 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=8
5

  
6
MAJOR="1.8"
7

  
8
inherit autotools flag-o-matic elisp-common
4
EAPI=7
9 5

  
6
MAJOR="2.2"
10 7
DESCRIPTION="GNU Ubiquitous Intelligent Language for Extensions"
11 8
HOMEPAGE="https://www.gnu.org/software/guile/"
12
SRC_URI="mirror://gnu/guile/${P}.tar.gz"
9
SRC_URI="mirror://gnu/guile/${P}.tar.xz"
13 10

  
14
LICENSE="LGPL-2.1"
15
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
16
IUSE="debug debug-freelist debug-malloc +deprecated discouraged emacs networking nls readline +regex +threads"
17
RESTRICT="!regex? ( test )"
18

  
19
# Guile seems to contain some slotting support, /usr/share/guile/ is slotted,
20
# but there are lots of collisions. Most in /usr/share/libguile. Therefore
21
# I'm slotting this in the same slot as guile-1.6* for now.
22
SLOT="12/8"
11
LICENSE="LGPL-3+"
12
SLOT="12/2.2-1" # libguile-2.2.so.1 => 2.2-1
13
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
14
IUSE="debug debug-malloc +deprecated +networking +nls +regex +threads" # upstream recommended +networking +nls
15
REQUIRED_USE="regex" # workaround for bug 596322
16
RESTRICT="strip"
23 17

  
24 18
RDEPEND="
25
	>=dev-libs/gmp-4.1:0=
26
	dev-libs/libltdl:0=
27
	sys-devel/gettext
19
	>=dev-libs/boehm-gc-7.0:=[threads?]
20
	dev-libs/gmp:=
21
	dev-libs/libffi:=
22
	dev-libs/libltdl:=
23
	dev-libs/libunistring:0=
28 24
	sys-libs/ncurses:0=
29
	virtual/libcrypt:=
30
	readline? ( sys-libs/readline:0= )
31
"
25
	sys-libs/readline:0=
26
	virtual/libcrypt:="
32 27
DEPEND="${RDEPEND}"
33 28
BDEPEND="
34
	sys-apps/texinfo
29
	virtual/pkgconfig
35 30
	sys-devel/libtool
36
	emacs? ( >=app-editors/emacs-23.1:* )
37
"
31
	sys-devel/gettext"
38 32

  
39 33
PATCHES=(
40
	"${FILESDIR}"/${P}-fix_guile-config.patch
41
	"${FILESDIR}"/${P}-gcc46.patch
42
	"${FILESDIR}"/${P}-gcc5.patch
43
	"${FILESDIR}"/${P}-makeinfo-5.patch
44
	"${FILESDIR}"/${P}-gtexinfo-5.patch
45
	"${FILESDIR}"/${P}-readline.patch
46
	"${FILESDIR}"/${P}-tinfo.patch
47
	"${FILESDIR}"/${P}-sandbox.patch
48
	"${FILESDIR}"/${P}-mkdir-mask.patch
49
	"${FILESDIR}"/${PN}-1.8.8-texinfo-6.7.patch
34
	"${FILESDIR}/${PN}-2.2.3-gentoo-sandbox.patch"
35
	"${FILESDIR}/${PN}-2.2.7-stack-up.patch"
50 36
)
51 37

  
52
DOCS=( AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS )
53

  
54
src_prepare() {
55
	default
38
# guile generates ELF files without use of C or machine code
39
# It's a portage's false positive. bug #677600
40
QA_PREBUILT='*[.]go'
56 41

  
57
	sed \
58
		-e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g" \
59
		-e "/AM_PROG_CC_STDC/d" \
60
		-i guile-readline/configure.in || die
61

  
62
	mv "${S}"/configure.{in,ac} || die
63
	mv "${S}"/guile-readline/configure.{in,ac} || die
64

  
65
	eautoreconf
66
}
42
DOCS=( GUILE-VERSION HACKING README )
67 43

  
68 44
src_configure() {
69
	# see bug #178499
70
	filter-flags -ftree-vectorize
45
	# see bug #676468
46
	mv prebuilt/32-bit-big-endian{,.broken} || die
71 47

  
72
	#will fail for me if posix is disabled or without modules -- hkBst
73
	myconf=(
74
		--disable-error-on-warning
75
		--disable-static
76
		--enable-posix
77
		$(use_enable networking)
78
		$(use_enable readline)
79
		$(use_enable regex)
80
		$(use deprecated || use_enable discouraged)
81
		$(use_enable deprecated)
82
		$(use_enable emacs elisp)
83
		$(use_enable nls)
84
		--disable-rpath
85
		$(use_enable debug-freelist)
86
		$(use_enable debug-malloc)
87
		$(use_enable debug guile-debug)
48
	econf \
49
		--disable-error-on-warning \
50
		--disable-rpath \
51
		--disable-static \
52
		--enable-posix \
53
		--without-libgmp-prefix \
54
		--without-libiconv-prefix \
55
		--without-libintl-prefix \
56
		--without-libltdl-prefix \
57
		--without-libreadline-prefix \
58
		--without-libunistring-prefix \
59
		$(use_enable debug guile-debug) \
60
		$(use_enable debug-malloc) \
61
		$(use_enable deprecated) \
62
		$(use_enable networking) \
63
		$(use_enable nls) \
64
		$(use_enable regex) \
88 65
		$(use_with threads)
89
		--with-modules
90
	)
91
	econf "${myconf[@]}" EMACS=no
92
}
93

  
94
src_compile() {
95
	emake
96

  
97
	# Above we have disabled the build system's Emacs support;
98
	# for USE=emacs we compile (and install) the files manually
99
	if use emacs; then
100
		cd emacs || die
101
		elisp-compile *.el || die
102
	fi
103 66
}
104 67

  
105 68
src_install() {
106 69
	default
107 70

  
108
	# texmacs needs this, closing bug #23493
109
	dodir /etc/env.d
110
	echo "GUILE_LOAD_PATH=\"${EPREFIX}/usr/share/guile/${MAJOR}\"" \
111
		 > "${ED}"/etc/env.d/50guile || die
71
	# From Novell
72
	# https://bugzilla.novell.com/show_bug.cgi?id=874028#c0
73
	dodir /usr/share/gdb/auto-load/$(get_libdir)
74
	mv "${ED}"/usr/$(get_libdir)/libguile-*-gdb.scm "${ED}"/usr/share/gdb/auto-load/$(get_libdir) || die
112 75

  
113 76
	# necessary for registering slib, see bug 206896
114 77
	keepdir /usr/share/guile/site
115 78

  
116
	if use emacs; then
117
		elisp-install ${PN} emacs/*.{el,elc}
118
		elisp-make-site-file "50${PN}-gentoo.el"
119
	fi
120
}
121

  
122
pkg_postinst() {
123
	use emacs && elisp-site-regen
124
}
125

  
126
pkg_postrm() {
127
	use emacs && elisp-site-regen
79
	find "${D}" -name '*.la' -delete || die
128 80
}
Thank you!