summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-10-15 22:21:14 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-10-15 23:16:07 +0200
commitf6fc01bed0963a5e27c782f1531ee5da9d4c8aeb (patch)
treee9137fd0111f9d40682515be84ec30b72f785b28 /sci-libs/lemon
parentdev-util/ccache: disable nvcc tests (diff)
downloadgentoo-f6fc01bed0963a5e27c782f1531ee5da9d4c8aeb.tar.gz
gentoo-f6fc01bed0963a5e27c782f1531ee5da9d4c8aeb.tar.bz2
gentoo-f6fc01bed0963a5e27c782f1531ee5da9d4c8aeb.zip
sci-libs/lemon: 1.3.1 version bump, EAPI-6 bump, fix multilib
Use cmake-utils functions instead of manual sed. Fix unused cmake args. Fix USE doc install location. Drop USE tools, only saved a minuscule amount of space. Closes: https://bugs.gentoo.org/668570 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'sci-libs/lemon')
-rw-r--r--sci-libs/lemon/Manifest1
-rw-r--r--sci-libs/lemon/files/lemon-1.3.1-multilib.patch31
-rw-r--r--sci-libs/lemon/lemon-1.3.1.ebuild89
3 files changed, 121 insertions, 0 deletions
diff --git a/sci-libs/lemon/Manifest b/sci-libs/lemon/Manifest
index 48e20adb6a33..e9ae37c003d5 100644
--- a/sci-libs/lemon/Manifest
+++ b/sci-libs/lemon/Manifest
@@ -1 +1,2 @@
+DIST lemon-1.3.1.tar.gz 5142826 BLAKE2B 23d3b637b4dd32d73bb053b4f5d032e16be787ba162eed6df793f65b81efef6d7ca66d6e5a483b75ac7b1ddb7c8a2698b3b13eb16fcd44e0b726052290082bee SHA512 715eb45e790c908e41de4c13e68b7880e1d86c54eca53f896c95b6bc411ded504f3f768bed9d63562ed4adad53167fb3a7828c67456fdea645a5d0a94ae2e038
DIST lemon-1.3.tar.gz 5454290 BLAKE2B f204b84d6ce82d1e942597e40c3b35e0a218d110017bc74d8982d09270e2d94e260e2a62e818e88d69a56a75886a60343b787e2cf05d581b5e520faaf2c73b02 SHA512 f48c14e42e0a463a3d203a05a012fdf635cf09503a5d18e14e64722e9f7f68d7fc223059e0a6a5d118491a473a25196d531e0a6302552f9fb8c121a4ed70af45
diff --git a/sci-libs/lemon/files/lemon-1.3.1-multilib.patch b/sci-libs/lemon/files/lemon-1.3.1-multilib.patch
new file mode 100644
index 000000000000..f2b3cd6bf00c
--- /dev/null
+++ b/sci-libs/lemon/files/lemon-1.3.1-multilib.patch
@@ -0,0 +1,31 @@
+--- a/lemon/CMakeLists.txt 2014-07-07 16:40:24.911315501 +0200
++++ b/lemon/CMakeLists.txt 2018-10-15 22:13:12.040890710 +0200
+@@ -66,8 +66,8 @@
+
+ INSTALL(
+ TARGETS lemon
+- ARCHIVE DESTINATION lib
+- LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ COMPONENT library
+ )
+
+@@ -86,6 +86,6 @@
+
+ INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
+- DESTINATION lib/pkgconfig
++ DESTINATION lib${LIB_SUFFIX}/pkgconfig
+ )
+
+--- a/lemon/lemon.pc.in 2014-07-07 16:40:24.949315716 +0200
++++ b/lemon/lemon.pc.in 2018-10-15 22:45:28.869931587 +0200
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
+-libdir=@CMAKE_INSTALL_PREFIX@/lib
++libdir=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@
+ includedir=@CMAKE_INSTALL_PREFIX@/include
+
+ Name: @PROJECT_NAME@
diff --git a/sci-libs/lemon/lemon-1.3.1.ebuild b/sci-libs/lemon/lemon-1.3.1.ebuild
new file mode 100644
index 000000000000..3a35fa7919de
--- /dev/null
+++ b/sci-libs/lemon/lemon-1.3.1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="C++ template static library of common data structures and algorithms"
+HOMEPAGE="https://lemon.cs.elte.hu/trac/lemon/"
+SRC_URI="https://lemon.cs.elte.hu/pub/sources/${P}.tar.gz"
+
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+coin doc glpk static-libs test"
+
+REQUIRED_USE="|| ( coin glpk )"
+
+RDEPEND="
+ coin? (
+ sci-libs/coinor-cbc:=
+ sci-libs/coinor-clp:=
+ )
+ glpk? ( sci-mathematics/glpk:= )
+"
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen
+ app-text/ghostscript-gpl
+ dev-libs/mathjax
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-multilib.patch
+ "${FILESDIR}"/${PN}-1.3-as-needed.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+ cmake_comment_add_subdirectory demo
+
+ use doc || cmake_comment_add_subdirectory doc
+ use test || cmake_comment_add_subdirectory test
+
+ for t in \
+ max_clique \
+ max_flow \
+ graph_utils \
+ random \
+ time_measure \
+ tsp; do
+ sed -i -e "/${t}_test/d" test/CMakeLists.txt || die
+ done
+ sed -i \
+ -e '/ADD_TEST(lp_test lp_test)/d' \
+ -e '/ADD_DEPENDENCIES(check lp_test)/d' \
+ test/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=TRUE
+ -DLEMON_ENABLE_COIN=$(usex coin)
+ -DLEMON_ENABLE_GLPK=$(usex glpk)
+ )
+ use coin && mycmakeargs+=( -DCOIN_ROOT_DIR="${EPREFIX}/usr" )
+ if use doc; then
+ mycmakeargs+=(
+ -DLEMON_DOC_MATHJAX_RELPATH="${EPREFIX}/usr/share/mathjax"
+ -DLEMON_DOC_SOURCE_BROWSER=$(usex doc)
+ -DLEMON_DOC_USE_MATHJAX=$(usex doc)
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ # TODO: Upstream needs to see the light of GNUInstallDirs
+ if use doc; then
+ mv "${D}"/usr/share/doc/lemon/html "${D}"/usr/share/doc/${PF} || die
+ rmdir "${D}"/usr/share/doc/lemon || die
+ fi
+}
+
+src_test() {
+ emake -C "${BUILD_DIR}" check
+}