Diff taucs-2.2-r1 with a taucs-2.2.1

/usr/portage/sci-libs/taucs/taucs-2.2.1.ebuild 2025-07-29 16:22:17.340467776 +0300
1
# Copyright 1999-2021 Gentoo Authors
1
# Copyright 1999-2025 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6 6
inherit fortran-2 toolchain-funcs
7 7

  
8 8
DESCRIPTION="C library of sparse linear solvers"
9
HOMEPAGE="http://www.tau.ac.il/~stoledo/taucs/"
10
SRC_URI="http://www.tau.ac.il/~stoledo/${PN}/${PV}/${PN}.tgz -> ${P}.tgz"
9
HOMEPAGE="https://github.com/sivantoledo/taucs/"
10
SRC_URI="https://github.com/sivantoledo/taucs/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11 11

  
12 12
LICENSE="LGPL-2.1"
13 13
SLOT="0"
......
22 22
DEPEND="${RDEPEND}"
23 23
BDEPEND="virtual/pkgconfig"
24 24

  
25
S="${WORKDIR}"
26

  
27 25
PATCHES=(
28 26
	# bug 725588
29
	"${FILESDIR}"/${P}-respect-ar.patch
27
	"${FILESDIR}"/${PN}-2.2-respect-ar.patch
28
	"${FILESDIR}"/${PN}-2.2-missing-include.patch
29
	"${FILESDIR}"/${P}-C23.patch
30
	"${FILESDIR}"/${P}-allocate-memory-in-test.patch
30 31
)
31 32

  
32 33
src_configure() {
......
41 42
		LDFLAGS=${LDFLAGS} -fPIC
42 43
		LIBBLAS=$($(tc-getPKG_CONFIG) --libs blas)
43 44
		LIBLAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
45
		LIBMETIS=$($(tc-getPKG_CONFIG) --libs metis)
44 46
		LIBF77=
45 47
	EOF
46

  
47
	echo "LIBMETIS=$($(tc-getPKG_CONFIG) --libs metis)" >> config/linux_shared.mk || die
48 48
	# no cat <<EOF because -o has a trailing space
49
	sed -e 's/ -fPIC//g' config/linux_shared.mk || die
49
	cp config/linux.mk config/linux-musl.mk
50
	cp config/linux_shared.mk config/linux-musl_shared.mk
50 51
}
51 52

  
52 53
src_compile() {
53
	# not autotools configure
54
	CC=$(tc-getCC) ./configure variant=_shared || die
54
	# not autotools configure. Uses difference in mkdir signature
55
	# between windows and linux to recognize system.
56
	CC="$(tc-getCC)" ./configure variant=_shared || die
55 57
	emake
56 58

  
57
	cd lib/linux_shared || die
59
	cd lib/linux$(usev elibc_musl -musl)_shared || die
58 60
	$(tc-getFC) ${LDFLAGS} -shared -Wl,-soname=libtaucs.so.1 \
59 61
		-Wl,--whole-archive libtaucs.a -Wl,--no-whole-archive \
60 62
		$($(tc-getPKG_CONFIG) --libs blas lapack metis) \
......
63 65
}
64 66

  
65 67
src_test() {
66
	LD_LIBRARY_PATH=lib/linux_shared \
68
	LD_LIBRARY_PATH=lib/linux$(usev elibc_musl -musl)_shared \
67 69
		./testscript variant=_shared || die "compile test failed"
68 70
	if grep -q FAILED testscript.log; then
69 71
		eerror "Test failed. See ${S}/testscript.log"
......
72 74
}
73 75

  
74 76
src_install() {
75
	ln -s libtaucs.so.1.0.0 lib/linux_shared/libtaucs.so.1 || die
76
	ln -s libtaucs.so.1 lib/linux_shared/libtaucs.so || die
77
	dolib.so lib/linux_shared/libtaucs.so*
77
	ln -s libtaucs.so.1.0.0 lib/linux$(usev elibc_musl -musl)_shared/libtaucs.so.1 || die
78
	ln -s libtaucs.so.1 lib/linux$(usev elibc_musl -musl)_shared/libtaucs.so || die
79
	dolib.so lib/linux$(usev elibc_musl -musl)_shared/libtaucs.so*
78 80

  
79 81
	doheader build/*/*.h src/*.h
80 82

  
Thank you!