Сравнение clisp-2.49.92-r1 с clisp-2.49.92-r3

/usr/portage/dev-lisp/clisp/clisp-2.49.92-r3.ebuild 2025-12-11 18:18:04.468443390 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
inherit flag-o-matic xdg-utils
6
inherit edo flag-o-matic toolchain-funcs xdg-utils
7 7

  
8
DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp"
8
DESCRIPTION="Portable, bytecode-compiled implementation of Common Lisp"
9 9
HOMEPAGE="https://clisp.sourceforge.io/"
10 10
SRC_URI="mirror://gentoo/${P}.tar.bz2"
11 11

  
12 12
LICENSE="GPL-2+"
13 13
SLOT="2/8"
14 14
KEYWORDS="~alpha amd64 ~mips ppc ppc64 ~riscv ~sparc x86"
15
IUSE="hyperspec X berkdb dbus fastcgi gdbm gtk +pcre postgres +readline svm threads +unicode +zlib"
16 15
# "jit" disabled ATM
16
IUSE="hyperspec X berkdb dbus fastcgi gdbm gtk +pcre postgres +readline svm threads +unicode +zlib"
17
# Needs work still
18
RESTRICT="test"
17 19

  
18
RDEPEND=">=dev-lisp/asdf-2.33-r3
19
	virtual/libcrypt:=
20
	virtual/libiconv
20
RDEPEND="
21
	>=dev-lisp/asdf-2.33-r3
21 22
	>=dev-libs/libsigsegv-2.10
22 23
	>=dev-libs/ffcall-1.10
24
	virtual/libcrypt:=
25
	virtual/libiconv
23 26
	dbus? ( sys-apps/dbus )
24 27
	fastcgi? ( dev-libs/fcgi )
25
	gdbm? ( sys-libs/gdbm:0= )
26
	gtk? ( >=x11-libs/gtk+-2.10:2 >=gnome-base/libglade-2.6 )
28
	gdbm? ( sys-libs/gdbm:= )
29
	gtk? (
30
		>=gnome-base/libglade-2.6
31
		>=x11-libs/gtk+-2.10:2
32
	)
27 33
	postgres? ( >=dev-db/postgresql-8.0:* )
28
	readline? ( >=sys-libs/readline-7.0:0= )
34
	readline? ( >=sys-libs/readline-7.0:= )
29 35
	pcre? ( dev-libs/libpcre:3 )
30 36
	svm? ( sci-libs/libsvm )
31 37
	zlib? ( virtual/zlib:= )
32 38
	X? ( x11-libs/libXpm )
33 39
	hyperspec? ( dev-lisp/hyperspec )
34
	berkdb? ( sys-libs/db:4.8 )"
40
	berkdb? ( sys-libs/db:5.3 )
41
"
42
DEPEND="
43
	${RDEPEND}
44
	X? ( x11-base/xorg-proto )
45
"
46
BDEPEND="X? ( x11-misc/imake )"
47

  
48
PATCHES=(
49
	"${FILESDIR}"/${P}-after_glibc_cfree_bdb.patch
50
	"${FILESDIR}"/${P}-gdbm_and_bdb5.3.patch
51
	"${FILESDIR}"/${P}-build-Build-genclx-without-gnulib.patch
52
)
35 53

  
36
DEPEND="${RDEPEND}
37
	X? ( x11-base/xorg-proto x11-misc/imake )"
54
BUILDDIR="builddir"
38 55

  
39 56
enable_modules() {
40 57
	[[ $# = 0 ]] && die "${FUNCNAME[0]} must receive at least one argument"
58

  
59
	local m
41 60
	for m in "$@" ; do
42
		einfo "enabling module $m"
43
		myconf+=" --with-module=${m}"
61
		einfo "Enabling module ${m}"
62
		myconf+=( --with-module=${m} )
44 63
	done
45 64
}
46 65

  
47
BUILDDIR="builddir"
48

  
49
# modules not enabled:
50
#  * berkdb: must figure out a way to make the configure script pick up the
51
#            currect version of the library and headers
52
#  * dirkey: fails to compile, requiring windows.h, possibly wrong #ifdefs
53
#  * matlab, netica: not in portage
54
#  * oracle: can't install oracle-instantclient
55

  
56 66
src_prepare() {
67
	default
68

  
57 69
	# More than -O1 breaks alpha
58 70
	if use alpha; then
59 71
		sed -i -e 's/-O2//g' src/makemake.in || die
60 72
	fi
61
	eapply "${FILESDIR}"/"${P}"-after_glibc_cfree_bdb.patch
62
	eapply_user
63 73

  
64 74
	xdg_environment_reset
65 75
}
66 76

  
67 77
src_configure() {
78
	# Not local so enable_modules() can use it
79
	myconf=(
80
		--prefix="${EPREFIX}"/usr
81
		--libdir="${EPREFIX}"/usr/$(get_libdir)
82
		--enable-portability
83
		$(use_with readline)
84
		$(use_with unicode)
85
		--hyperspec=${CLHSROOT}
86
	)
87

  
88
	# Temporary workaround for bug #932564 with GCC 15
89
	# This can be dropped with a new release.
90
	strip-flags
91
	tc-is-gcc && {
92
		append-flags -fno-tree-dce -fno-tree-dse -fno-tree-pta
93
	}
94

  
68 95
	# -Werror=lto-type-mismatch
69 96
	# https://bugs.gentoo.org/856103
70 97
	# https://gitlab.com/gnu-clisp/clisp/-/issues/49
71 98
	filter-lto
72 99

  
73
	# We need this to build on alpha
74 100
	if use alpha; then
101
		# We need this to build on alpha
75 102
		replace-flags -O? -O1
76
	fi
77

  
78
	if use x86; then
103
	elif use x86; then
104
		# bug #585182
79 105
		append-flags -falign-functions=4
80 106
	fi
81 107

  
82 108
	# built-in features
83
	local myconf="--with-ffcall --without-dynamic-modules"
84
#    There's a problem with jit_allocai function
85
#    if use jit; then
86
#        myconf+=" --with-jitc=lightning"
87
#    fi
109
	myconf+=(
110
		--with-ffcall
111
		--without-dynamic-modules
112
	)
113

  
114
	# There's a problem with jit_allocai function
115
	#if use jit; then
116
	#	myconf+=" --with-jitc=lightning"
117
	#fi
118

  
88 119
	if use threads; then
89
		myconf+=" --with-threads=POSIX_THREADS"
120
		myconf+=( --with-threads=POSIX_THREADS )
90 121
	fi
91 122

  
123
	# modules not enabled:
124
	#  * berkdb: must figure out a way to make the configure script pick up the
125
	#            currect version of the library and headers
126
	#  * dirkey: fails to compile, requiring windows.h, possibly wrong #ifdefs
127
	#  * matlab, netica: not in portage
128
	#  * oracle: can't install oracle-instantclient
129
	#
92 130
	# default modules
93 131
	enable_modules rawsock
94 132
	# optional modules
......
100 138
	fi
101 139
	if use berkdb; then
102 140
		enable_modules berkeley-db
103
		append-cppflags -I"${EPREFIX}"/usr/include/db4.8
141
		append-cppflags -I"${EPREFIX}"/usr/include/db5.3
104 142
	fi
105 143
	use dbus && enable_modules dbus
106 144
	use fastcgi && enable_modules fastcgi
......
111 149
	use zlib && enable_modules zlib
112 150

  
113 151
	if use hyperspec; then
114
		CLHSROOT="file:///${EPREFIX}/usr/share/doc/hyperspec/HyperSpec/"
152
		CLHSROOT="file://${EPREFIX}/usr/share/hyperspec/HyperSpec/"
115 153
	else
116 154
		CLHSROOT="http://www.lispworks.com/reference/HyperSpec/"
117 155
	fi
118 156

  
157
	myconf+=(
158
		--config
159
		CC="$(tc-getCC)"
160
		CFLAGS="${CFLAGS}"
161
		LDFLAGS="${LDFLAGS}"
162
	)
163

  
119 164
	# configure chokes on --sysconfdir option
120
	local configure="./configure --prefix=${EPREFIX}/usr --enable-portability \
121
		  --libdir=${EPREFIX}/usr/$(get_libdir) $(use_with readline) $(use_with unicode) \
122
		  ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}"
123
	einfo "${configure}"
124
	${configure} || die "./configure failed"
165
	edo ./configure "${myconf[@]}" ${BUILDDIR}
125 166

  
126 167
	IMPNOTES="file://${EPREFIX}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
127 168
	sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \
......
130 171

  
131 172
src_compile() {
132 173
	export VARTEXFONTS="${T}"/fonts
133
	cd "${BUILDDIR}" || die
134 174
	# parallel build fails
135
	emake -j1
175
	emake -C "${BUILDDIR}" -j1
176
}
177

  
178
src_test() {
179
	emake -C "${BUILDDIR}" -j1 check
180
	# Test non-portable features and modules
181
	emake -C "${BUILDDIR}" -j1 extracheck mod-check
136 182
}
137 183

  
138 184
src_install() {
139 185
	pushd "${BUILDDIR}" || die
140
	make DESTDIR="${D}" prefix="${EPREFIX}"/usr install-bin || die "Installation failed"
186
	emake -j1 DESTDIR="${D}" prefix="${EPREFIX}"/usr install-bin
141 187
	doman clisp.1
142 188
	dodoc ../SUMMARY README* ../src/NEWS ../unix/MAGIC.add ../ANNOUNCE
143 189
	popd || die
190

  
144 191
	dodoc doc/{CLOS-guide,LISP-tutorial}.txt
145 192
	docinto html
146 193
	dodoc doc/impnotes.{css,html} doc/regexp.html doc/clisp.png
Спасибо!