You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-text/editorconfig-core-c/editorconfig-core-c-0.12.3....

40 lines
1023 B

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake-utils
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 ~ppc64 ~x86"
IUSE="cli doc"
CDEPEND="dev-libs/libpcre:="
DEPEND="${CDEPEND}
doc? ( app-doc/doxygen )"
RDEPEND="${CDEPEND}
cli? ( !dev-python/editorconfig-core-py[cli] )"
src_prepare() {
sed -e 's:OUTPUT_NAME editorconfig_static:OUTPUT_NAME editorconfig:' \
-i src/lib/CMakeLists.txt || die
cmake-utils_src_prepare
}
src_configure() {
local mycmakeargs=()
use doc && mycmakeargs+=(-DINSTALL_HTML_DOC=ON)
cmake-utils_src_configure
sed -e "s:/share/doc/editorconfig\":/share/doc/${PF}\":" \
-i "${BUILD_DIR}/doc/cmake_install.cmake" || die
}
src_install() {
cmake-utils_src_install
use cli || rm -rf "${ED}/usr/bin"
}