From b0813da4d0db76e8c785348e7ea9061d94397b6b Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Wed, 23 Dec 2020 19:58:36 +0200 Subject: [PATCH] dev-libs/properties-cpp: add properties-cpp Package-Manager: Portage-3.0.9, Repoman-3.0.2 --- dev-libs/properties-cpp/Manifest | 1 + .../properties-cpp/files/optional_tests.patch | 22 +++++++++++ dev-libs/properties-cpp/metadata.xml | 11 ++++++ .../properties-cpp-0_pre20180409.ebuild | 38 +++++++++++++++++++ .../properties-cpp/properties-cpp-9999.ebuild | 36 ++++++++++++++++++ 5 files changed, 108 insertions(+) create mode 100644 dev-libs/properties-cpp/Manifest create mode 100644 dev-libs/properties-cpp/files/optional_tests.patch create mode 100644 dev-libs/properties-cpp/metadata.xml create mode 100644 dev-libs/properties-cpp/properties-cpp-0_pre20180409.ebuild create mode 100644 dev-libs/properties-cpp/properties-cpp-9999.ebuild diff --git a/dev-libs/properties-cpp/Manifest b/dev-libs/properties-cpp/Manifest new file mode 100644 index 0000000..bb92edd --- /dev/null +++ b/dev-libs/properties-cpp/Manifest @@ -0,0 +1 @@ +DIST properties-cpp-0_pre20180409.tar.gz 41134 BLAKE2B 982b11a3c742547caf141dbaa341c56efc7f76b40e3da0fa8b74e5ebcdb40a3f493dcd1a80274e4f9314cab6e947d655e599d5eb0527d95c90186a0b933fb02b SHA512 5697b9acacb63b801ef531a3741655e67896604c5150a754d9e11f87898ee564a2707fcb8346119b7081ae725e8bbfa671e537e4985a061da7161ff7b12d5985 diff --git a/dev-libs/properties-cpp/files/optional_tests.patch b/dev-libs/properties-cpp/files/optional_tests.patch new file mode 100644 index 0000000..01f1eb4 --- /dev/null +++ b/dev-libs/properties-cpp/files/optional_tests.patch @@ -0,0 +1,22 @@ +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 180498f..ac5e66c 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,3 +1,11 @@ ++option( ++ PROPERTIES_CPP_BUILD_TESTS ++ "Build tests" ++ ON ++) ++ ++if (PROPERTIES_CPP_BUILD_TESTS) ++ + set (OLD_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + # Don't treat warnings as errors in 3rd_party/{gmock,cucumber-cpp} + string (REPLACE " -Werror " " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +@@ -31,3 +39,5 @@ target_link_libraries( + + add_test(properties_test ${CMAKE_CURRENT_BINARY_DIR}/properties_test) + add_test(signals_test ${CMAKE_CURRENT_BINARY_DIR}/signals_test) ++ ++endif (PROPERTIES_CPP_BUILD_TESTS) diff --git a/dev-libs/properties-cpp/metadata.xml b/dev-libs/properties-cpp/metadata.xml new file mode 100644 index 0000000..09eed47 --- /dev/null +++ b/dev-libs/properties-cpp/metadata.xml @@ -0,0 +1,11 @@ + + + + + parona@protonmail.com + Alfred Wingate + + + lib-cpp/properties-cpp + + diff --git a/dev-libs/properties-cpp/properties-cpp-0_pre20180409.ebuild b/dev-libs/properties-cpp/properties-cpp-0_pre20180409.ebuild new file mode 100644 index 0000000..6842de9 --- /dev/null +++ b/dev-libs/properties-cpp/properties-cpp-0_pre20180409.ebuild @@ -0,0 +1,38 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="A very simple convenience library for handling properties and signals in C++11" +HOMEPAGE="https://github.com/lib-cpp/properties-cpp" + +if [[ "${PV}" == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/lib-cpp/properties-cpp" +else + COMMIT="45863e849b39c4921d6553e6d27e267a96ac7d77" # 9.4.2018 + SRC_URI="https://github.com/lib-cpp/properties-cpp/archive/"${COMMIT}".tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${COMMIT}" + KEYWORDS="~amd64" +fi + +LICENSE="LGPL-3" +SLOT="0" +IUSE="doc test" + +DEPEND=" + doc? ( app-doc/doxygen ) + test? ( dev-cpp/gtest ) +" + +PATCHES=( "${FILESDIR}/optional_tests.patch" ) + +src_configure() { + local mycmakeargs=( + -DPROPERTIES_CPP_ENABLE_DOC_GENERATION=$(usex doc) + -DPROPERTIES_CPP_BUILD_TESTS=$(usex test) + ) + cmake_src_configure +} diff --git a/dev-libs/properties-cpp/properties-cpp-9999.ebuild b/dev-libs/properties-cpp/properties-cpp-9999.ebuild new file mode 100644 index 0000000..3de7d23 --- /dev/null +++ b/dev-libs/properties-cpp/properties-cpp-9999.ebuild @@ -0,0 +1,36 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="A very simple convenience library for handling properties and signals in C++11" +HOMEPAGE="https://github.com/lib-cpp/properties-cpp" + +if [[ "${PV}" == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/lib-cpp/properties-cpp" +else + COMMIT="45863e849b39c4921d6553e6d27e267a96ac7d77" # 9.4.2018 + SRC_URI="https://github.com/lib-cpp/properties-cpp/archive/"${COMMIT}".tar.gz -> ${P}.tar.gz" +fi + +LICENSE="LGPL-3" +SLOT="0" +IUSE="doc" + +DEPEND=" + doc? ( app-doc/doxygen ) +" +# test? ( dev-cpp/gtest ) + +#PATCHES=( "${FILESDIR}/optional_tests.patch" ) + +src_configure() { + local mycmakeargs=( + -DPROPERTIES_CPP_ENABLE_DOC_GENERATION=$(usex doc) +# -DPROPERTIES_CPP_BUILD_TESTS=$(usex test) + ) + cmake_src_configure +}