dev-qt/qttest: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-libs / libdivsufsort / libdivsufsort-2.0.1-r1.ebuild
1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit cmake-utils multilib toolchain-funcs
6
7 DESCRIPTION="Suffix-sorting library (for BWT)"
8 HOMEPAGE="https://github.com/y-256/libdivsufsort"
9 SRC_URI="https://github.com/y-256/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
10
11 LICENSE="MIT"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="openmp"
15
16 pkg_pretend() {
17         [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
18 }
19
20 pkg_setup() {
21         [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
22 }
23
24 src_prepare() {
25         cmake-utils_src_prepare
26
27         # will appreciate saner approach, if there is any
28         sed -i -e "s:\(DESTINATION \)lib:\1$(get_libdir):" \
29                 */CMakeLists.txt || die
30 }
31
32 src_configure() {
33         local mycmakeargs=("-DBUILD_DIVSUFSORT64=ON" "-DUSE_OPENMP=$(usex openmp)")
34         cmake-utils_src_configure
35 }