summaryrefslogtreecommitdiff
blob: 6b22c78bf287191265d387819360040e949e4d51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DESCRIPTION="COIN-OR lightweight API for COIN-OR libraries CLP, CBC, and CGL"
HOMEPAGE="https://projects.coin-or.org/CoinMP/"
SRC_URI="https://github.com/coin-or/CoinMP/archive/releases/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/CoinMP-releases-${PV}/CoinMP"

LICENSE="CPL-1.0"
SLOT="0/1"
KEYWORDS="~amd64 ~loong ~x86 ~amd64-linux ~x86-linux"

RDEPEND="
	sci-libs/coinor-cbc:=
	sci-libs/coinor-cgl:=
	sci-libs/coinor-clp:=
	sci-libs/coinor-osi:=
	sci-libs/coinor-utils:="
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"

src_prepare() {
	default
	# Prevent unneeded call to pkg-config that needs ${ED}'s in path.
	# Also installation of unneeded files in a double ${D}.
	sed -i '/--libs.*addlibs.txt/d; s/ install-addlibsDATA//' \
		Makefile.in || die
}

src_test() {
	emake -j1 test
}

src_install() {
	default
	dodoc -r examples

	# Duplicate or irrelevant files.
	rm -r "${ED}"/usr/share/coin/doc || die
	find "${ED}" -name '*.la' -delete || die
}