summaryrefslogtreecommitdiff
path: root/dev-cpp/cpp-hocon
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
commit3517852e3b8a68d1e997770fc0650c5053bafc6c (patch)
tree44068672445b1418489aed82de58df3c470289e7 /dev-cpp/cpp-hocon
parent0f15659d48c193027158492acb726297501202c5 (diff)
gentoo resync : 04.01.2022
Diffstat (limited to 'dev-cpp/cpp-hocon')
-rw-r--r--dev-cpp/cpp-hocon/Manifest2
-rw-r--r--dev-cpp/cpp-hocon/cpp-hocon-0.3.0-r1.ebuild40
-rw-r--r--dev-cpp/cpp-hocon/files/cpp-hocon-0.3.0-use-system-catch.patch51
3 files changed, 93 insertions, 0 deletions
diff --git a/dev-cpp/cpp-hocon/Manifest b/dev-cpp/cpp-hocon/Manifest
index b032aeb810eb..a104141fc374 100644
--- a/dev-cpp/cpp-hocon/Manifest
+++ b/dev-cpp/cpp-hocon/Manifest
@@ -1,4 +1,6 @@
AUX cpp-hocon-0.2.1-cmake.patch 1792 BLAKE2B 2caf382ed29013b85d989f827a07430aa40dcc2ea8c7357c3efd3e2b41c2be95f385297f021c54125bbc2695e753c7ab97f3e78a16497c11e980bb9a6f41eab0 SHA512 7b039ba0b668b9578f908c1bfe20ca725c8bc753f6b68f8540d3eddc8323f865096d0cb4e9274ef09d210a72844aed54888506be20c964b91c8bbd5e01a4229a
+AUX cpp-hocon-0.3.0-use-system-catch.patch 1897 BLAKE2B 962f56c329d0dd930929e6ffa0eebb828509a9ef6676f23489a33fac4b396ce68abc80645118f54dc57e1ce4234a7031189b4d1a0fe7b00741cb7f0c016a2a98 SHA512 bea1aeedd0eed39d660043c16cb04327577d2f28df65a134403de35b2aa9058f68018f0b673968639ef2adc66079618e4c387beef3b202d6492fbe92604734f6
DIST cpp-hocon-0.3.0.tar.gz 159032 BLAKE2B a5503d28d4740c78ad13836d5e7c60fc56b06d8f60f3d977a1db1008e0e90e159f2bef4d9737215684a4318b3c6d0a5efa20da1c14cd94ceacdb597bc5eaaab8 SHA512 de997e6d90330f901863b7da0d6f6e069a31e052b6f31c1e3009a9559c863f08879ecf4e202c763ec32567dd3a1e436ff5d3bf0b3009a085ef3ee95e5ca6c7e5
+EBUILD cpp-hocon-0.3.0-r1.ebuild 883 BLAKE2B 91aa2052ae27cafd925032f47b1b6f95efbb541596ce1c8d57f4072923388b5ec421607dc3f17dcdf8e17f6b3cebdbabf7f60fd14fa77dd395ec3c63a32a7da5 SHA512 a016968cb15e15a6e3cda59c7b3899c98ea09a2384cf8063180b63e28355c84a63d8b1c7e3c63c561127f5975b6c60e6f68f1dc17e154a0cb7cc312e3c32b055
EBUILD cpp-hocon-0.3.0.ebuild 583 BLAKE2B 07e9241102d8402ca278e9c3bef86e961002e8cd66d142e2419bb0824bf7d7337bea4e34085c53ca1044a616c4fba19948a5a761b1fcb85ee82ad0d9e2104cfb SHA512 ae883347f8fe5ed11e1e62121efe7072bb354bffb830147ff47475fc305d4b168bafe617469128b1b1c5892179d95eb49e0b0af58b6a4d1865bf85373b7abbe2
MISC metadata.xml 340 BLAKE2B f6689012de9c50abdb8ea3ae92cd2ed960d5c601c953d62f7fc9e1fe760f4df2631aabd3523368b2684c9b3d221e03f4ac9a24bdd12050d61e0e4cd049868a2d SHA512 4c824adec6b20595929856a2fe350348c133c41c508ff8586f0161190a5bf6ba572fbf2ca93c8bec0dd540a3749d3e9e1ce82441519c68e191771ba4c8bf50cf
diff --git a/dev-cpp/cpp-hocon/cpp-hocon-0.3.0-r1.ebuild b/dev-cpp/cpp-hocon/cpp-hocon-0.3.0-r1.ebuild
new file mode 100644
index 000000000000..e80181729b1c
--- /dev/null
+++ b/dev-cpp/cpp-hocon/cpp-hocon-0.3.0-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake prefix
+
+DESCRIPTION="Provides C++ support for the HOCON configuration file format"
+HOMEPAGE="https://github.com/puppetlabs/cpp-hocon"
+SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/${PV}"
+KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc x86"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-libs/boost-1.54:=[nls]
+ >=dev-libs/leatherman-0.9.3:=
+"
+DEPEND="${DEPEND}
+ test? ( dev-cpp/catch:1 )"
+
+#PATCHES=( "${FILESDIR}"/${PN}-0.2.1-cmake.patch )
+PATCHES=( "${FILESDIR}"/${PN}-0.3.0-use-system-catch.patch )
+
+src_prepare() {
+ cmake_src_prepare
+
+ eprefixify lib/tests/CMakeLists.txt
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_TESTING=$(usex test)
+ )
+
+ cmake_src_configure
+}
diff --git a/dev-cpp/cpp-hocon/files/cpp-hocon-0.3.0-use-system-catch.patch b/dev-cpp/cpp-hocon/files/cpp-hocon-0.3.0-use-system-catch.patch
new file mode 100644
index 000000000000..0964e3e7bc7a
--- /dev/null
+++ b/dev-cpp/cpp-hocon/files/cpp-hocon-0.3.0-use-system-catch.patch
@@ -0,0 +1,51 @@
+https://bugs.gentoo.org/823419
+
+Wanted to make this "proper" but Catch2 lacks a pkgconfig file (or a CMake one)
+and it's easier to just do this for now.
+
+Based on patch version of sed commands from upstream bug
+(https://github.com/puppetlabs/cpp-hocon/issues/132) and
+Fedora (https://src.fedoraproject.org/rpms/cpp-hocon/blob/rawhide/f/cpp-hocon.spec#_76).
+
+Makes tests conditional too.
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -16,12 +16,16 @@ if (NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
+ endif()
+
+-enable_testing()
+-
+ # Leatherman setup
+-set(LEATHERMAN_COMPONENTS locale catch nowide util)
++set(LEATHERMAN_COMPONENTS locale nowide util)
+ find_package(Leatherman REQUIRED COMPONENTS ${LEATHERMAN_COMPONENTS})
+
++option(BUILD_TESTING "Build test suite (needs Catch)" ON)
++
++if(BUILD_TESTING)
++ enable_testing()
++endif()
++
+ ## Before we find any packages, we want to pull in the common leatherman options, as they can affect commonly-used packages.
+ include(options)
+ ## Pull in common cflags setting from leatherman. Don't override CMAKE_CXX_FLAGS at the project root to avoid impacting 3rd party code.
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -91,4 +91,6 @@ symbol_exports(lib${PROJECT_NAME} "${CMAKE_CURRENT_LIST_DIR}/inc/hocon/export.h"
+ leatherman_install(lib${PROJECT_NAME})
+ install(DIRECTORY inc/hocon DESTINATION include)
+
+-add_subdirectory(tests)
++if (BUILD_TESTING)
++ add_subdirectory(tests)
++endif()
+--- a/lib/tests/CMakeLists.txt
++++ b/lib/tests/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ # Setup compiling the test executable. C++ compile flags are inherited from the parent directory.
+-include_directories(${LEATHERMAN_CATCH_INCLUDE})
++include_directories(@GENTOO_PORTAGE_EPREFIX@/usr/include/catch)
+
+ set(TEST_CASES
+ concatenation_test.cc