summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libdivsufsort/libdivsufsort-2.0.1-r2.ebuild')
-rw-r--r--dev-libs/libdivsufsort/libdivsufsort-2.0.1-r2.ebuild39
1 files changed, 39 insertions, 0 deletions
diff --git a/dev-libs/libdivsufsort/libdivsufsort-2.0.1-r2.ebuild b/dev-libs/libdivsufsort/libdivsufsort-2.0.1-r2.ebuild
new file mode 100644
index 000000000000..700d1a09c135
--- /dev/null
+++ b/dev-libs/libdivsufsort/libdivsufsort-2.0.1-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+DESCRIPTION="Suffix-sorting library (for BWT)"
+HOMEPAGE="https://github.com/y-256/libdivsufsort/"
+SRC_URI="https://github.com/y-256/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="openmp"
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ # will appreciate saner approach, if there is any
+ sed -i -e "s:\(DESTINATION \)lib:\1$(get_libdir):" \
+ */CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DBUILD_DIVSUFSORT64=ON"
+ "-DUSE_OPENMP=$(usex openmp)"
+ )
+ cmake_src_configure
+}