summaryrefslogtreecommitdiff
path: root/app-text/editorconfig-core-c/editorconfig-core-c-0.12.6.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-30 11:17:10 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-30 11:17:10 +0100
commit200338d9ebd0cd0599af59f208eb58f48f5ae168 (patch)
tree03aa7ba96612219b7aeb018639ba95924c0f1d81 /app-text/editorconfig-core-c/editorconfig-core-c-0.12.6.ebuild
parenta9a8100d7a659b808e3a112a113b65e16f0070c3 (diff)
gentoo auto-resync : 30:04:2023 - 11:17:09
Diffstat (limited to 'app-text/editorconfig-core-c/editorconfig-core-c-0.12.6.ebuild')
-rw-r--r--app-text/editorconfig-core-c/editorconfig-core-c-0.12.6.ebuild51
1 files changed, 51 insertions, 0 deletions
diff --git a/app-text/editorconfig-core-c/editorconfig-core-c-0.12.6.ebuild b/app-text/editorconfig-core-c/editorconfig-core-c-0.12.6.ebuild
new file mode 100644
index 000000000000..dd0268f37edc
--- /dev/null
+++ b/app-text/editorconfig-core-c/editorconfig-core-c-0.12.6.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="EditorConfig core library written in C"
+HOMEPAGE="https://github.com/editorconfig/editorconfig-core-c/"
+SRC_URI="https://github.com/editorconfig/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="cli doc"
+
+BDEPEND="doc? ( app-doc/doxygen )"
+DEPEND="dev-libs/libpcre2:="
+RDEPEND="
+ ${DEPEND}
+ cli? ( !dev-python/editorconfig-core-py[cli] )
+"
+# Header-only
+DEPEND+=" dev-libs/uthash"
+
+src_prepare() {
+ # Don't install the static library.
+ sed -e '/install(TARGETS editorconfig_static/,+5d' -i src/lib/CMakeLists.txt || die
+
+ # Unbundle dev-libs/uthash
+ rm src/lib/utarray.h || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_DOCUMENTATION=$(usex doc 'ON' 'OFF')
+ -DBUILD_STATICALLY_LINKED_EXE=OFF
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
+ cmake_src_install
+
+ if ! use cli; then
+ rm -r "${ED}/usr/bin" || die
+ fi
+}