/[gentoo-x86]/sci-libs/lemon/lemon-1.3-r2.ebuild
Gentoo

Contents of /sci-libs/lemon/lemon-1.3-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Feb 4 18:19:49 2014 UTC (5 years, 11 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Fixed as-needed bug #500272

(Portage version: 2.2.8-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/lemon/lemon-1.3-r1.ebuild,v 1.2 2014/01/15 20:12:20 bicatali Exp $
4
5 EAPI=5
6
7 inherit cmake-utils
8
9 DESCRIPTION="C++ template static library of common data structures and algorithms"
10 HOMEPAGE="https://lemon.cs.elte.hu/trac/lemon/"
11 SRC_URI="http://lemon.cs.elte.hu/pub/sources/${P}.tar.gz"
12
13 LICENSE="Boost-1.0"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
16 IUSE="+coin doc glpk static-libs test tools"
17
18 RDEPEND="
19 glpk? ( sci-mathematics/glpk:= )
20 coin? ( sci-libs/coinor-cbc:= sci-libs/coinor-clp:= )"
21 DEPEND="${RDEPEND}
22 doc? (
23 app-text/ghostscript-gpl
24 dev-libs/mathjax
25 app-doc/doxygen )"
26
27 REQUIRED_USE="|| ( coin glpk )"
28
29 PATCHES=(
30 "${FILESDIR}"/${P}-multilib.patch
31 "${FILESDIR}"/${P}-as-needed.patch
32 )
33
34 src_prepare() {
35 sed -i \
36 -e '/ADD_SUBDIRECTORY(demo)/d' \
37 CMakeLists.txt || die
38
39 use doc || sed -i \
40 -e '/ADD_SUBDIRECTORY(doc)/d' \
41 CMakeLists.txt || die
42
43 use tools || sed -i \
44 -e '/ADD_SUBDIRECTORY(tools)/d' \
45 CMakeLists.txt || die
46
47 use test || sed -i \
48 -e '/ADD_SUBDIRECTORY(test)/d' \
49 CMakeLists.txt || die
50
51 for t in \
52 max_clique \
53 max_flow \
54 graph_utils \
55 random \
56 time_measure \
57 tsp; do
58 sed -i -e "/${t}_test/d" test/CMakeLists.txt || die
59 done
60 sed -i \
61 -e '/ADD_TEST(lp_test lp_test)/d' \
62 -e '/ADD_DEPENDENCIES(check lp_test)/d' \
63 test/CMakeLists.txt || die
64 cmake-utils_src_prepare
65 }
66
67 src_configure() {
68 local mycmakeargs=(
69 -DBUILD_SHARED_LIBS=TRUE
70 -DCOIN_ROOT_DIR="${EPREFIX}/usr"
71 -DLEMON_DOC_MATHJAX_RELPATH="${EPREFIX}/usr/share/mathjax"
72 $(cmake-utils_use doc LEMON_DOC_SOURCE_BROWSER)
73 $(cmake-utils_use doc LEMON_DOC_USE_MATHJAX)
74 $(cmake-utils_use coin LEMON_ENABLE_COIN)
75 $(cmake-utils_use glpk LEMON_ENABLE_GLPK)
76 )
77 cmake-utils_src_configure
78 }
79
80 src_test() {
81 emake -C "${BUILD_DIR}" check
82 }

  ViewVC Help
Powered by ViewVC 1.1.20