Diff bertini-1.4 with a bertini-1.6

/usr/portage/sci-mathematics/bertini/bertini-1.6.ebuild 2023-10-09 14:52:35.104368492 +0300
1
# Copyright 1999-2021 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5

  
6
MYP=BertiniSource_v${PV}
5 7

  
6 8
inherit toolchain-funcs flag-o-matic
7 9

  
8
MYP="BertiniSource_v${PV}"
9 10
DESCRIPTION="Software for Numerical Algebraic Geometry"
10 11
HOMEPAGE="http://bertini.nd.edu"
11
SRC_URI="http://www3.nd.edu/~sommese/bertini/${MYP}.tar.gz"
12
S="${WORKDIR}/${MYP}/src"
12
SRC_URI="https://bertini.nd.edu/${MYP}.tar.gz
13
	doc? ( https://bertini.nd.edu/BertiniUsersManual.pdf )"
14
S="${WORKDIR}"/${MYP/./}
13 15

  
14 16
LICENSE="bertini"
15 17
SLOT="0"
16 18
KEYWORDS="~amd64 ~x86"
17 19
IUSE="doc examples +optimization"
18 20

  
19
BDEPEND="
20
	sys-devel/bison
21
	sys-devel/flex
22
"
23 21
RDEPEND="
24 22
	dev-libs/gmp
25 23
	dev-libs/mpfr
26 24
"
27 25
DEPEND="${RDEPEND}"
26
BDEPEND="
27
	sys-devel/bison
28
	sys-devel/flex
29
"
30

  
31
DOCS=( AUTHORS ChangeLog NEWS README )
28 32

  
29 33
src_prepare() {
30 34
	default
......
34 38

  
35 39
	# Ensure this is before the CFLAGS sed
36 40
	# or breakage occurs if 'gcc' is in your CFLAGS
37
	sed -i -e "s/gcc/$(tc-getCC)/" Makefile || die
41
	sed -i -e "s/gcc/$(tc-getCC)/" src/Makefile || die
38 42

  
39
	if ! use optimization; then
40
		sed -i -e "s/\$(OPT)/ ${CFLAGS} ${CXXFLAGS} ${LDFLAGS}/" Makefile || die
43
	if ! use optimization ; then
44
		sed -i -e "s/\$(OPT)/ ${CFLAGS} ${CXXFLAGS} ${LDFLAGS}/" src/Makefile || die
41 45
	else
42 46
		# If people want the optimisation offered by upstream,
43 47
		# let's ensure they don't accidentally override it.
44 48
		filter-flags -O?
45
		sed -i -e "s/\$(OPT)/ \$(OPT) ${CFLAGS} ${LDFLAGS}/" Makefile || die
49
		sed -i -e "s/\$(OPT)/ \$(OPT) ${CFLAGS} ${LDFLAGS}/" src/Makefile || die
46 50
	fi
47 51
}
48 52

  
53
src_configure() {
54
	econf --prefix=/usr --includedir=/usr/include/${PN}
55

  
56
	use doc && DOCS+=( "${DISTDIR}"/BertiniUsersManual.pdf )
57
}
58

  
49 59
src_install() {
50
	dobin bertini
60
	emake DESTDIR="${D}" install
51 61

  
52
	if use doc; then
53
		dodoc "${WORKDIR}/${MYP}/BertiniUsersManual.pdf"
54
	fi
62
	find "${ED}" -name "*.la" -delete || die
55 63

  
56
	if use examples; then
57
		docinto examples
58
		dodoc -r "${WORKDIR}/${MYP}/examples"
59
		elog "Examples have been installed into /usr/share/${MYP}"
60
	fi
64
	einstalldocs
61 65
}
Thank you!