Diff arb-2.17.0 with a arb-2.18.1

/usr/portage/sci-mathematics/arb/arb-2.18.1.ebuild 2021-04-05 17:39:00.000000000 +0300
3 3

  
4 4
EAPI=7
5 5

  
6
inherit toolchain-funcs
6
inherit cmake
7 7

  
8 8
DESCRIPTION="C library for arbitrary-precision interval arithmetic"
9
HOMEPAGE="http://fredrikj.net/arb/"
9
HOMEPAGE="https://fredrikj.net/arb/"
10 10
SRC_URI="https://github.com/fredrik-johansson/arb/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
IUSE="test"
11 12

  
12
LICENSE="LGPL-2.1+"
13
RESTRICT="!test? ( test )"
14

  
15
LICENSE="GPL-2+"
13 16
SLOT="0/2"
14
KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
15
IUSE="static-libs"
17
KEYWORDS="amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
16 18

  
17 19
RDEPEND="
18 20
	dev-libs/gmp:0=
......
21 23

  
22 24
DEPEND="${RDEPEND}"
23 25

  
24
src_prepare() {
25
	default
26

  
27
	# The autodetection finds "lib" first, which may e.g. contain 32-bit
28
	# libs during a 64-bit build.
29
	#
30
	# Copied from flint which has the same issues because arb is just
31
	# copying flint. Of course flint doesn't have a line for itself
32
	# and, it had to be added.
33
	sed -e "s:{GMP_DIR}/lib\":{GMP_DIR}/$(get_libdir)\":g" \
34
		-e "s:{MPFR_DIR}/lib\":{MPFR_DIR}/$(get_libdir)\":g" \
35
		-e "s:{FLINT_DIR}/lib\":{FLINT_DIR}/$(get_libdir)\":g" \
36
		-i configure
37
}
26
PATCHES=(
27
	"${FILESDIR}"/${PN}-2.18.0-multilib-strict.patch
28
	"${FILESDIR}"/${PN}-2.18.0-build_type.patch
29
)
38 30

  
39 31
src_configure() {
40
	# Not an autoconf configure script. It appears to have been cloned
41
	# from the flint configure script and that not all the options
42
	# offered are valid.
43
	tc-export CC AR CXX
44
	./configure \
45
		--prefix="${EPREFIX}/usr" \
46
		--with-flint="${EPREFIX}/usr" \
47
		--with-gmp="${EPREFIX}/usr" \
48
		--with-mpfr="${EPREFIX}/usr" \
49
		$(use_enable static-libs static) \
50
		CFLAGS="${CPPFLAGS} ${CFLAGS}" || die
51
}
52

  
53
src_compile() {
54
	emake verbose
55
}
56

  
57
src_test() {
58
	# We have to set the library path otherwise a previous install of
59
	# libarb may be loaded.  This is in part a consequence of setting
60
	# the soname/installname I think.
61
	if [[ ${CHOST} == *-darwin* ]] ; then
62
		DYLD_LIBRARY_PATH="${S}" emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
63
	else
64
		LD_LIBRARY_PATH="${S}" emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
65
	fi
66
}
32
	local mycmakeargs=(
33
		-DBUILD_TESTING="$(usex test)"
34
	)
67 35

  
68
src_install() {
69
	emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install
70
	if ! use static-libs; then
71
		find "${ED}" -name '*.la' -delete || die
72
	fi
73
	dodoc README.md
36
	cmake_src_configure
74 37
}
Thank you!