Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/lemon/
Date: Sat, 26 Feb 2022 21:09:57
Message-Id: 1645909737.ea8e8a89bcd911c655ea9856641bd8f97f53d4bd.sam@gentoo
1 commit: ea8e8a89bcd911c655ea9856641bd8f97f53d4bd
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 26 21:05:13 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 26 21:08:57 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea8e8a89
7
8 sci-libs/lemon: update EAPI 6 -> 8
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sci-libs/lemon/lemon-1.3.1-r1.ebuild | 96 ++++++++++++++++++++++++++++++++++++
13 1 file changed, 96 insertions(+)
14
15 diff --git a/sci-libs/lemon/lemon-1.3.1-r1.ebuild b/sci-libs/lemon/lemon-1.3.1-r1.ebuild
16 new file mode 100644
17 index 000000000000..902d5e27521e
18 --- /dev/null
19 +++ b/sci-libs/lemon/lemon-1.3.1-r1.ebuild
20 @@ -0,0 +1,96 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +# Needed to build tests for now
27 +CMAKE_MAKEFILE_GENERATOR=emake
28 +inherit cmake
29 +
30 +DESCRIPTION="C++ template static library of common data structures and algorithms"
31 +HOMEPAGE="https://lemon.cs.elte.hu/trac/lemon/"
32 +SRC_URI="https://lemon.cs.elte.hu/pub/sources/${P}.tar.gz"
33 +
34 +LICENSE="Boost-1.0"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
37 +IUSE="+coin doc glpk static-libs test"
38 +RESTRICT="!test? ( test )"
39 +
40 +REQUIRED_USE="|| ( coin glpk )"
41 +
42 +RDEPEND="coin? (
43 + sci-libs/coinor-cbc:=
44 + sci-libs/coinor-clp:=
45 + )
46 + glpk? ( sci-mathematics/glpk:= )"
47 +DEPEND="${RDEPEND}"
48 +BDEPEND="doc? (
49 + app-doc/doxygen
50 + app-text/ghostscript-gpl
51 + dev-libs/mathjax
52 + )"
53 +
54 +PATCHES=(
55 + "${FILESDIR}"/${P}-multilib.patch
56 + "${FILESDIR}"/${PN}-1.3-as-needed.patch
57 +)
58 +
59 +src_prepare() {
60 + local t
61 + for t in \
62 + max_clique \
63 + max_flow \
64 + graph_utils \
65 + random \
66 + time_measure \
67 + tsp; do
68 + sed -i -e "/${t}_test/d" test/CMakeLists.txt || die
69 + done
70 +
71 + sed -i \
72 + -e '/ADD_TEST(lp_test lp_test)/d' \
73 + -e '/ADD_DEPENDENCIES(check lp_test)/d' \
74 + test/CMakeLists.txt || die
75 +
76 + cmake_comment_add_subdirectory demo
77 +
78 + use doc || cmake_comment_add_subdirectory doc
79 + use test || cmake_comment_add_subdirectory test
80 +
81 + cmake_src_prepare
82 +}
83 +
84 +src_configure() {
85 + local mycmakeargs=(
86 + -DLEMON_ENABLE_COIN=$(usex coin)
87 + -DLEMON_ENABLE_GLPK=$(usex glpk)
88 + )
89 +
90 + use coin && mycmakeargs+=( -DCOIN_ROOT_DIR="${EPREFIX}/usr" )
91 +
92 + if use doc; then
93 + mycmakeargs+=(
94 + -DLEMON_DOC_MATHJAX_RELPATH="${EPREFIX}/usr/share/mathjax"
95 + -DLEMON_DOC_SOURCE_BROWSER=$(usex doc)
96 + -DLEMON_DOC_USE_MATHJAX=$(usex doc)
97 + )
98 + fi
99 +
100 + cmake_src_configure
101 +}
102 +
103 +src_test() {
104 + cd "${S}" || die
105 + emake -C "${BUILD_DIR}" check
106 +}
107 +
108 +src_install() {
109 + cmake_src_install
110 +
111 + # TODO: Upstream needs to see the light of GNUInstallDirs
112 + if use doc; then
113 + mv "${ED}"/usr/share/doc/lemon/html "${ED}"/usr/share/doc/${PF} || die
114 + rmdir "${ED}"/usr/share/doc/lemon || die
115 + fi
116 +}