From 1c44179b7a2b9617ba4346102764f6bb0514be3a Mon Sep 17 00:00:00 2001 From: Patrick McLean Date: Tue, 31 Mar 2020 17:47:47 -0700 Subject: [PATCH] dev-libs/yaml-cpp: New package Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Patrick McLean --- dev-libs/yaml-cpp/Manifest | 1 + dev-libs/yaml-cpp/metadata.xml | 8 +++ dev-libs/yaml-cpp/yaml-cpp-0.6.3.ebuild | 74 +++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 dev-libs/yaml-cpp/Manifest create mode 100644 dev-libs/yaml-cpp/metadata.xml create mode 100644 dev-libs/yaml-cpp/yaml-cpp-0.6.3.ebuild diff --git a/dev-libs/yaml-cpp/Manifest b/dev-libs/yaml-cpp/Manifest new file mode 100644 index 000000000000..65c478502e0d --- /dev/null +++ b/dev-libs/yaml-cpp/Manifest @@ -0,0 +1 @@ +DIST yaml-cpp-0.6.3.tar.gz 1398768 BLAKE2B 07abe1c56740105a0af2335bb1cd48086cb614d9d04c61342e53788bfb043fd7eb2629e441a0a5be50898b288f3526f1707c5fdf1d734395b6450c3103773b14 SHA512 68b9ce987cabc1dec79382f922de20cc2c222cb9c090ecb93dc686b048da5c917facf4fce6d8f72feea44b61e5a6770ed3b0c199c4cd4e6bde5b6245c09f8e49 diff --git a/dev-libs/yaml-cpp/metadata.xml b/dev-libs/yaml-cpp/metadata.xml new file mode 100644 index 000000000000..126b9ca42a25 --- /dev/null +++ b/dev-libs/yaml-cpp/metadata.xml @@ -0,0 +1,8 @@ + + + + + Patrick McLean + chutzpah@gentoo.org + + diff --git a/dev-libs/yaml-cpp/yaml-cpp-0.6.3.ebuild b/dev-libs/yaml-cpp/yaml-cpp-0.6.3.ebuild new file mode 100644 index 000000000000..35bba105594c --- /dev/null +++ b/dev-libs/yaml-cpp/yaml-cpp-0.6.3.ebuild @@ -0,0 +1,74 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +inherit python-any-r1 multibuild cmake-utils + +DESCRIPTION="A YAML parser and emitter in C++" +HOMEPAGE="https://github.com/jbeder/yaml-cpp" +SRC_URI="https://github.com/jbeder/${PN}/archive/${P}.tar.gz" +S="${WORKDIR}/${PN}-${P}" + +LICENSE="MIT" +SLOT="0/0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs test" + +BDEPEND=" + test? ( ${PYTHON_DEPS} ) +" + +RESTRICT="!test? ( test )" + +CMAKE_MAKEFILE_GENERATOR=emake + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + MULTIBUILD_VARIANTS=(shared) + use static-libs && MULTIBUILD_VARIANTS+=(static) + + cmake-utils_src_prepare +} + +src_configure() { + multibuild_foreach_variant yaml-cpp_configure +} + +yaml-cpp_configure() { + local -a mycmakeargs=( + -DYAML_BUILD_SHARED_LIBS=$( + if [[ ${MULTIBUILD_VARIANT} == shared ]]; then + printf 'ON\n' + else + printf 'OFF\n' + fi + ) + -DYAML_CPP_BUILD_TESTS=$(usex test) + ) + + cmake-utils_src_configure +} + +src_compile() { + multibuild_foreach_variant cmake-utils_src_compile +} + +src_test() { + multibuild_foreach_variant yaml-cpp_test +} + +yaml-cpp_test() { + pushd "${BUILD_DIR}" >/dev/null || die + pwd + ./test/run-tests || die "tests failed for ${MULTIBUILD_VARIANT} libs" + popd >/dev/null || die +} + +src_install() { + multibuild_foreach_variant cmake-utils_src_install +} -- 2.26.2