Сравнение coinor-clp-1.17.6 с coinor-clp-1.17.6-r1

/usr/portage/sci-libs/coinor-clp/coinor-clp-1.17.6-r1.ebuild 2023-10-09 14:52:35.064368491 +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 5

  
6
inherit toolchain-funcs
6
DOCS_BUILDER="doxygen"
7
DOCS_DEPEND="media-gfx/graphviz"
8
DOCS_DIR="doxydoc"
9
DOCS_CONFIG_NAME="doxygen.conf"
10
inherit docs toolchain-funcs
7 11

  
8 12
MY_PN=Clp
9 13

  
10 14
DESCRIPTION="COIN-OR linear programming solver"
11
HOMEPAGE="https://github.com/coin-or/Clp/"
12
SRC_URI="https://github.com/coin-or/${MY_PN}/archive/releases/${PV}.tar.gz
13
	-> ${P}.tar.gz"
14
LICENSE="EPL-1.0"
15

  
16
# major soname component
17
SLOT="0/1"
15
HOMEPAGE="https://github.com/coin-or/Clp"
16
SRC_URI="https://github.com/coin-or/Clp/archive/releases/${PV}.tar.gz -> ${P}.tar.gz"
17
S="${WORKDIR}/${MY_PN}-releases-${PV}/${MY_PN}"
18 18

  
19
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
20
IUSE="doc examples glpk metis mumps sparse static-libs test"
19
LICENSE="EPL-1.0"
20
SLOT="0/1" # major soname component
21
KEYWORDS="~amd64 ~loong ~riscv ~x86 ~amd64-linux ~x86-linux"
22
IUSE="examples glpk metis mpi mumps sparse static-libs test"
23
REQUIRED_USE="mpi? ( mumps )"
21 24
RESTRICT="!test? ( test )"
22 25

  
23 26
# Fortran is NOT needed, but the ./configure scripts for all of the CoinOR
......
25 28
#
26 29
#   https://github.com/coin-or/CoinUtils/issues/132
27 30
#
28
BDEPEND="virtual/fortran
31
BDEPEND="
32
	virtual/fortran
29 33
	virtual/pkgconfig
30
	doc? ( app-doc/doxygen[dot] )
31
	test? ( sci-libs/coinor-sample )"
32

  
33
# USE=mpi is disabled on sci-libs/mumps because mumps/scotch are in
34
# total disarray, but in particular for bugs 670759 and 695962. There
35
# used to be some conditional USE=mpi stuff in src_prepare() that will
36
# need to be put back if you restore the ability to build against
37
# mumps[mpi].
38
DEPEND="sci-libs/coinor-osi:=
34
	test? ( sci-libs/coinor-sample )
35
"
36
DEPEND="
37
	sci-libs/coinor-osi:=
39 38
	sci-libs/coinor-utils:=
40 39
	glpk? ( sci-mathematics/glpk:= sci-libs/amd )
41 40
	metis? ( sci-libs/metis )
42
	mumps? ( sci-libs/mumps[-mpi] )
43
	sparse? ( sci-libs/cholmod )"
41
	mumps? ( sci-libs/mumps[mpi?] )
42
	sparse? ( sci-libs/cholmod )
43
"
44 44
RDEPEND="${DEPEND}"
45 45

  
46
S="${WORKDIR}/${MY_PN}-releases-${PV}/${MY_PN}"
47

  
48 46
src_prepare() {
49 47
	# Needed to make the --with-coin-instdir in src_configure happy.
50 48
	dodir /usr
51 49

  
52
	# The file ClpCholeskyMumps.cpp does #include "mpi.h", and we
53
	# need to point it to the right file. Our sci-libs/mumps ebuild
54
	# is so ridiculous that I can't even tell if this is our fault
55
	# or if it's something that should be reported upstream.
56
	ln -s "${EPREFIX}"/usr/include/mpiseq/mpi.h src/mpi.h || die
50
	mumpslibs="-lmumps_common -ldmumps -lzmumps -lsmumps -lcmumps"
51

  
52
	if use mumps; then
53
		if use mpi; then
54
			# https://github.com/coin-or/Clp/issues/199
55
			eapply "${FILESDIR}/${P}-remove-extern-C-for-MPI.patch"
56
			export CXX=mpicxx
57
		else
58
			# The file ClpCholeskyMumps.cpp does #include "mpi.h", and we
59
			# need to point it to the right file. Our sci-libs/mumps ebuild
60
			# is so ridiculous that I can't even tell if this is our fault
61
			# or if it's something that should be reported upstream.
62
			ln -s "${EPREFIX}/usr/include/mpiseq/mpi.h" src/mpi.h || die
63
			mumpslibs="${mumpslibs} -lmpiseq"
64
		fi
65
	fi
57 66

  
58 67
	# They don't need to guess at this, but they do, and get it wrong...
59
	sed -e "s:lib/pkgconfig:$(get_libdir)/pkgconfig:g" \
68
	sed -e "s|lib/pkgconfig|$(get_libdir)/pkgconfig|g" \
60 69
		-i configure \
61 70
		|| die "failed to fix the pkgconfig path in ${S}/configure"
62 71

  
......
78 87
			--with-amd-incdir="${EPREFIX}"/usr/include
79 88
			--with-amd-lib=-lamd
80 89
			--with-glpk-incdir="${EPREFIX}"/usr/include
81
			--with-glpk-lib=-lglpk )
90
			--with-glpk-lib=-lglpk
91
		)
82 92
	else
83 93
		myeconfargs+=( --without-glpk )
84 94
	fi
......
87 97
			--with-amd-incdir="${EPREFIX}"/usr/include
88 98
			--with-amd-lib=-lamd
89 99
			--with-cholmod-incdir="${EPREFIX}"/usr/include
90
			--with-cholmod-lib=-lcholmod )
100
			--with-cholmod-lib=-lcholmod
101
		)
91 102
	else
92 103
		myeconfargs+=( --without-amd --without-cholmod )
93 104
	fi
94 105
	if use metis; then
95 106
		myeconfargs+=(
96 107
			--with-metis-incdir="$($(tc-getPKG_CONFIG) --cflags metis | sed s/-I//)"
97
			--with-metis-lib="$($(tc-getPKG_CONFIG) --libs metis)" )
108
			--with-metis-lib="$($(tc-getPKG_CONFIG) --libs metis)"
109
		)
98 110
	else
99 111
		myeconfargs+=( --without-metis )
100 112
	fi
101 113
	if use mumps; then
102 114
		myeconfargs+=(
103 115
			--with-mumps-incdir="${EPREFIX}"/usr/include
104
			--with-mumps-lib="-lmumps_common -ldmumps -lzmumps -lsmumps -lcmumps -lmpiseq" )
116
			--with-mumps-lib="$mumpslibs"
117
		)
105 118
	else
106 119
		myeconfargs+=( --without-mumps )
107 120
	fi
......
110 123
}
111 124

  
112 125
src_compile() {
113
	emake all $(usex doc doxydoc "")
126
	emake all
127
	docs_compile
114 128
}
115 129

  
116 130
src_test() {
......
120 134
}
121 135

  
122 136
src_install() {
123
	use doc && HTML_DOC=("${BUILD_DIR}/doxydocs/html/")
124

  
125
	emake DESTDIR="${D}" install
137
	emake DESTDIR="${ED}" install
138
	einstalldocs
126 139

  
127 140
	# Duplicate junk, and in the wrong location.
128 141
	rm -r "${ED}/usr/share/coin/doc/${MY_PN}" || die
129 142

  
130 143
	use examples && dodoc -r examples
144

  
145
	find "${ED}" -name '*.la' -delete || die
131 146
}
Спасибо!