Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] cpp-hocon: add shared library, disable tests build
@ 2022-11-20 12:20 paper42
  2022-11-20 12:45 ` [PR PATCH] [Updated] " paper42
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: paper42 @ 2022-11-20 12:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]

There is a new pull request by paper42 against master on the void-packages repository

https://github.com/paper42/void-packages cpp-hocon
https://github.com/void-linux/void-packages/pull/40645

cpp-hocon: add shared library, disable tests build
tests do not build with gcc 12

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/40645.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cpp-hocon-40645.patch --]
[-- Type: text/x-diff, Size: 2160 bytes --]

From 0f9de97dcae3de432a60e4689178293f88ee53ea Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Sun, 20 Nov 2022 13:19:04 +0100
Subject: [PATCH] cpp-hocon: add shared library, disable tests build

tests do not build with gcc 12
---
 .../cpp-hocon/patches/disable-building-tests.patch   |  8 ++++++++
 srcpkgs/cpp-hocon/template                           | 12 +++---------
 2 files changed, 11 insertions(+), 9 deletions(-)
 create mode 100644 srcpkgs/cpp-hocon/patches/disable-building-tests.patch

diff --git a/srcpkgs/cpp-hocon/patches/disable-building-tests.patch b/srcpkgs/cpp-hocon/patches/disable-building-tests.patch
new file mode 100644
index 000000000000..27db097479c7
--- /dev/null
+++ b/srcpkgs/cpp-hocon/patches/disable-building-tests.patch
@@ -0,0 +1,8 @@
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -90,5 +90,3 @@ symbol_exports(lib${PROJECT_NAME} "${CMAKE_CURRENT_LIST_DIR}/inc/hocon/export.h"
+ # This correctly handles DLL installation on Windows.
+ leatherman_install(lib${PROJECT_NAME})
+ install(DIRECTORY inc/hocon DESTINATION include)
+-
+-add_subdirectory(tests)
diff --git a/srcpkgs/cpp-hocon/template b/srcpkgs/cpp-hocon/template
index f61316adcc11..aeb2a61b376b 100644
--- a/srcpkgs/cpp-hocon/template
+++ b/srcpkgs/cpp-hocon/template
@@ -1,20 +1,14 @@
 # Template file for 'cpp-hocon'
 pkgname=cpp-hocon
 version=0.3.0
-revision=4
+revision=5
 build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON"
 hostmakedepends="pkg-config"
 makedepends="boost-devel leatherman-devel libcurl-devel"
 short_desc="C++ port of the Typesafe Config library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://github.com/puppetlabs/cpp-hocon/"
-distfiles="https://github.com/puppetlabs/cpp-hocon/archive/${version}.tar.gz>${pkgname}-${version}.tar.gz"
+distfiles="https://github.com/puppetlabs/cpp-hocon/archive/${version}.tar.gz"
 checksum=dab02354046f05aca6275c746d7583ee5f71853aa5b1d93529564632e184c3dd
-
-post_install() {
-	# this package is a static library,
-	# needs to be rebuild when update boost,
-	# force an shlib-dependencies
-	vbin build/bin/libcpp-hocon_test
-}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] cpp-hocon: add shared library, disable tests build
  2022-11-20 12:20 [PR PATCH] cpp-hocon: add shared library, disable tests build paper42
@ 2022-11-20 12:45 ` paper42
  2022-11-23  7:29 ` kruceter
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: paper42 @ 2022-11-20 12:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

There is an updated pull request by paper42 against master on the void-packages repository

https://github.com/paper42/void-packages cpp-hocon
https://github.com/void-linux/void-packages/pull/40645

cpp-hocon: add shared library, disable tests build
tests do not build with gcc 12

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/40645.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cpp-hocon-40645.patch --]
[-- Type: text/x-diff, Size: 5245 bytes --]

From a9aea036c6fa8691ef271ac710da2e30fb0e023f Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Sun, 20 Nov 2022 13:19:04 +0100
Subject: [PATCH 1/2] cpp-hocon: build shared library, disable tests

tests do not build with gcc 12
---
 common/shlibs                                   |  1 +
 srcpkgs/cpp-hocon-devel                         |  1 +
 .../patches/disable-building-tests.patch        |  8 ++++++++
 srcpkgs/cpp-hocon/template                      | 17 ++++++++++-------
 4 files changed, 20 insertions(+), 7 deletions(-)
 create mode 120000 srcpkgs/cpp-hocon-devel
 create mode 100644 srcpkgs/cpp-hocon/patches/disable-building-tests.patch

diff --git a/common/shlibs b/common/shlibs
index c103447f8b31..7f07c64149b0 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4197,3 +4197,4 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libcpp-hocon.so.0.3.0 cpp-hocon-0.3.0_5
diff --git a/srcpkgs/cpp-hocon-devel b/srcpkgs/cpp-hocon-devel
new file mode 120000
index 000000000000..8d8bc1453e86
--- /dev/null
+++ b/srcpkgs/cpp-hocon-devel
@@ -0,0 +1 @@
+cpp-hocon
\ No newline at end of file
diff --git a/srcpkgs/cpp-hocon/patches/disable-building-tests.patch b/srcpkgs/cpp-hocon/patches/disable-building-tests.patch
new file mode 100644
index 000000000000..27db097479c7
--- /dev/null
+++ b/srcpkgs/cpp-hocon/patches/disable-building-tests.patch
@@ -0,0 +1,8 @@
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -90,5 +90,3 @@ symbol_exports(lib${PROJECT_NAME} "${CMAKE_CURRENT_LIST_DIR}/inc/hocon/export.h"
+ # This correctly handles DLL installation on Windows.
+ leatherman_install(lib${PROJECT_NAME})
+ install(DIRECTORY inc/hocon DESTINATION include)
+-
+-add_subdirectory(tests)
diff --git a/srcpkgs/cpp-hocon/template b/srcpkgs/cpp-hocon/template
index f61316adcc11..ce521b1395ae 100644
--- a/srcpkgs/cpp-hocon/template
+++ b/srcpkgs/cpp-hocon/template
@@ -1,20 +1,23 @@
 # Template file for 'cpp-hocon'
 pkgname=cpp-hocon
 version=0.3.0
-revision=4
+revision=5
 build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON"
 hostmakedepends="pkg-config"
 makedepends="boost-devel leatherman-devel libcurl-devel"
 short_desc="C++ port of the Typesafe Config library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://github.com/puppetlabs/cpp-hocon/"
-distfiles="https://github.com/puppetlabs/cpp-hocon/archive/${version}.tar.gz>${pkgname}-${version}.tar.gz"
+distfiles="https://github.com/puppetlabs/cpp-hocon/archive/${version}.tar.gz"
 checksum=dab02354046f05aca6275c746d7583ee5f71853aa5b1d93529564632e184c3dd
 
-post_install() {
-	# this package is a static library,
-	# needs to be rebuild when update boost,
-	# force an shlib-dependencies
-	vbin build/bin/libcpp-hocon_test
+cpp-hocon-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+	}
 }

From 9c53eb50101c002c8ad30b4ef9d7022676de3e28 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Sun, 20 Nov 2022 13:35:34 +0100
Subject: [PATCH 2/2] facter: use shared cpp-hocon

---
 srcpkgs/facter/patches/shared_cpp_hcon.patch | 13 +++++++++++++
 srcpkgs/facter/template                      |  4 ++--
 2 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/facter/patches/shared_cpp_hcon.patch

diff --git a/srcpkgs/facter/patches/shared_cpp_hcon.patch b/srcpkgs/facter/patches/shared_cpp_hcon.patch
new file mode 100644
index 000000000000..37c475697a96
--- /dev/null
+++ b/srcpkgs/facter/patches/shared_cpp_hcon.patch
@@ -0,0 +1,13 @@
+https://github.com/archlinux/svntogit-community/blob/0eb74a76c976a7fd638fbf6cd1c3b47be3dccd8b/trunk/shared_cpp_hcon.patch
+
+diff --git a/cmake/FindCPPHOCON.cmake b/cmake/FindCPPHOCON.cmake
+index 00ba8bd..0df0a51 100644
+--- a/cmake/FindCPPHOCON.cmake
++++ b/cmake/FindCPPHOCON.cmake
+@@ -1,5 +1,5 @@
+ include(FindDependency)
+-find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.a")
++find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.so")
+ 
+ include(FeatureSummary)
+ set_package_properties(CPPHOCON PROPERTIES DESCRIPTION "A C++ parser for the HOCON configuration language" URL "https://github.com/puppetlabs/cpp-hocon")
diff --git a/srcpkgs/facter/template b/srcpkgs/facter/template
index 45c921a0b72d..dc01c966a041 100644
--- a/srcpkgs/facter/template
+++ b/srcpkgs/facter/template
@@ -1,12 +1,12 @@
 # Template file for 'facter'
 pkgname=facter
 version=3.14.16
-revision=4
+revision=5
 build_style=cmake
 configure_args="-DRUBY_CONFIG_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include
  -DENABLE_CXX_WERROR=OFF -DCMAKE_INSTALL_LIBDIR=/usr/lib"
 hostmakedepends="ruby-devel"
-makedepends="boost-devel cpp-hocon leatherman-devel libblkid-devel libcurl-devel
+makedepends="boost-devel cpp-hocon-devel leatherman-devel libblkid-devel libcurl-devel
  ruby-devel yaml-cpp-devel"
 depends="net-tools ruby"
 short_desc="Collect and display system facts"

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cpp-hocon: add shared library, disable tests build
  2022-11-20 12:20 [PR PATCH] cpp-hocon: add shared library, disable tests build paper42
  2022-11-20 12:45 ` [PR PATCH] [Updated] " paper42
@ 2022-11-23  7:29 ` kruceter
  2022-11-25 10:25 ` sgn
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: kruceter @ 2022-11-23  7:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3295 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40645#issuecomment-1324651994

Comment:
Is this patch suitable for you?

```diff
diff --git a/srcpkgs/facter/template b/srcpkgs/facter/template
index dc01c966a0..dbf8bd0e71 100644
--- a/srcpkgs/facter/template
+++ b/srcpkgs/facter/template
@@ -24,7 +24,7 @@ pre_configure() {
 
 post_build() {
 	# fixup vendor_ruby usr/lib{32,64} install path to always use usr/lib
-	vsed -i build/lib/cmake_install.cmake -e "s;lib32;lib;g" -e "s;lib64;lib;g"
+	vsed -i build/lib/cmake_install.cmake -e "s;lib[0-9][0-9];;g"
 }
 
 facter-devel_package() {
```

Tests seem to be failing here:

```
=> facter-3.14.16_5: running post_build ...
=> facter-3.14.16_5: running do_check ...
[0/1] Running tests...
Test project /builddir/facter-3.14.16/build
    Start 1: libfacter tests
1/3 Test #1: libfacter tests ..................***Failed    5.57 sec

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libfacter_test is a Catch v1.10.0 host application.
Run with -? for options

-------------------------------------------------------------------------------
Scenario: using a double fact value
      When: serialized to YAML
      Then: it should have the same value
-------------------------------------------------------------------------------
/builddir/facter-3.14.16/lib/tests/facts/double_value.cc:27
...............................................................................

/builddir/facter-3.14.16/lib/tests/facts/double_value.cc:30: FAILED:
  REQUIRE( string(emitter.c_str()) == "42.4242" )
with expansion:
  "42.424199999999999" == "42.4242"

-------------------------------------------------------------------------------
Scenario: using the filesystem resolver
      When: populating facts
      Then: non-tmpfs mounts should exist
-------------------------------------------------------------------------------
/builddir/facter-3.14.16/lib/tests/facts/linux/filesystem_resolver.cc:37
...............................................................................

/builddir/facter-3.14.16/lib/tests/facts/linux/filesystem_resolver.cc:38: FAILED:
  REQUIRE( facts.query<facter::facts::map_value>("mountpoints./") )
with expansion:
  NULL

===============================================================================
test cases:    73 |    71 passed | 2 failed
assertions: 12054 | 12052 passed | 2 failed


    Start 2: libfacter specs
2/3 Test #2: libfacter specs ..................   Passed    4.76 sec
    Start 3: facter smoke
3/3 Test #3: facter smoke .....................   Passed    0.51 sec

67% tests passed, 1 tests failed out of 3

Total Test time (real) =  10.95 sec

The following tests FAILED:
	  1 - libfacter tests (Failed)
Errors while running CTest
FAILED: CMakeFiles/test.util 
cd /builddir/facter-3.14.16/build && /usr/bin/ctest --force-new-ctest-process
ninja: build stopped: subcommand failed.
=> ERROR: facter-3.14.16_5: do_check: '${make_check_pre} ${make_cmd} ${makejobs} ${make_check_args} ${make_check_target}' exited with 1
=> ERROR:   in do_check() at common/build-style/cmake.sh:127
```

Upstream does not have fixes for them in the "3.*" branch.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cpp-hocon: add shared library, disable tests build
  2022-11-20 12:20 [PR PATCH] cpp-hocon: add shared library, disable tests build paper42
  2022-11-20 12:45 ` [PR PATCH] [Updated] " paper42
  2022-11-23  7:29 ` kruceter
@ 2022-11-25 10:25 ` sgn
  2022-12-03 12:44 ` [PR PATCH] [Updated] " paper42
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sgn @ 2022-11-25 10:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/40645#issuecomment-1327296771

Comment:
test can be built again.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] cpp-hocon: add shared library, disable tests build
  2022-11-20 12:20 [PR PATCH] cpp-hocon: add shared library, disable tests build paper42
                   ` (2 preceding siblings ...)
  2022-11-25 10:25 ` sgn
@ 2022-12-03 12:44 ` paper42
  2022-12-03 12:54 ` sgn
  2022-12-03 13:26 ` [PR PATCH] [Merged]: " sgn
  5 siblings, 0 replies; 7+ messages in thread
From: paper42 @ 2022-12-03 12:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

There is an updated pull request by paper42 against master on the void-packages repository

https://github.com/paper42/void-packages cpp-hocon
https://github.com/void-linux/void-packages/pull/40645

cpp-hocon: add shared library, disable tests build
tests do not build with gcc 12

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/40645.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cpp-hocon-40645.patch --]
[-- Type: text/x-diff, Size: 5737 bytes --]

From 6989f25460bd1948f62fa8316a9ca3971be64908 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Sun, 20 Nov 2022 13:19:04 +0100
Subject: [PATCH 1/2] cpp-hocon: build shared library, disable tests

tests do not build with gcc 12
---
 common/shlibs                                   |  1 +
 srcpkgs/cpp-hocon-devel                         |  1 +
 .../patches/disable-building-tests.patch        |  8 ++++++++
 srcpkgs/cpp-hocon/template                      | 17 ++++++++++-------
 4 files changed, 20 insertions(+), 7 deletions(-)
 create mode 120000 srcpkgs/cpp-hocon-devel
 create mode 100644 srcpkgs/cpp-hocon/patches/disable-building-tests.patch

diff --git a/common/shlibs b/common/shlibs
index 3da9f38d56a0..8fd417267d4d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4205,3 +4205,4 @@ libtraceevent.so.1 libtraceevent-1.6.2_1
 libtracefs.so.1 libtracefs-1.4.2_1
 libtracecmd.so.1 libtracecmd-3.1.2_1
 libkshark.so.2 libkshark-2.1.1_1
+libcpp-hocon.so.0.3.0 cpp-hocon-0.3.0_5
diff --git a/srcpkgs/cpp-hocon-devel b/srcpkgs/cpp-hocon-devel
new file mode 120000
index 000000000000..8d8bc1453e86
--- /dev/null
+++ b/srcpkgs/cpp-hocon-devel
@@ -0,0 +1 @@
+cpp-hocon
\ No newline at end of file
diff --git a/srcpkgs/cpp-hocon/patches/disable-building-tests.patch b/srcpkgs/cpp-hocon/patches/disable-building-tests.patch
new file mode 100644
index 000000000000..27db097479c7
--- /dev/null
+++ b/srcpkgs/cpp-hocon/patches/disable-building-tests.patch
@@ -0,0 +1,8 @@
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -90,5 +90,3 @@ symbol_exports(lib${PROJECT_NAME} "${CMAKE_CURRENT_LIST_DIR}/inc/hocon/export.h"
+ # This correctly handles DLL installation on Windows.
+ leatherman_install(lib${PROJECT_NAME})
+ install(DIRECTORY inc/hocon DESTINATION include)
+-
+-add_subdirectory(tests)
diff --git a/srcpkgs/cpp-hocon/template b/srcpkgs/cpp-hocon/template
index f61316adcc11..ce521b1395ae 100644
--- a/srcpkgs/cpp-hocon/template
+++ b/srcpkgs/cpp-hocon/template
@@ -1,20 +1,23 @@
 # Template file for 'cpp-hocon'
 pkgname=cpp-hocon
 version=0.3.0
-revision=4
+revision=5
 build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON"
 hostmakedepends="pkg-config"
 makedepends="boost-devel leatherman-devel libcurl-devel"
 short_desc="C++ port of the Typesafe Config library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://github.com/puppetlabs/cpp-hocon/"
-distfiles="https://github.com/puppetlabs/cpp-hocon/archive/${version}.tar.gz>${pkgname}-${version}.tar.gz"
+distfiles="https://github.com/puppetlabs/cpp-hocon/archive/${version}.tar.gz"
 checksum=dab02354046f05aca6275c746d7583ee5f71853aa5b1d93529564632e184c3dd
 
-post_install() {
-	# this package is a static library,
-	# needs to be rebuild when update boost,
-	# force an shlib-dependencies
-	vbin build/bin/libcpp-hocon_test
+cpp-hocon-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+	}
 }

From 2093b3e1fdfe623d4606cf8a3c3fded53bc91bda Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Sun, 20 Nov 2022 13:35:34 +0100
Subject: [PATCH 2/2] facter: use shared cpp-hocon

---
 srcpkgs/facter/patches/shared_cpp_hcon.patch | 13 +++++++++++++
 srcpkgs/facter/template                      |  8 ++++----
 2 files changed, 17 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/facter/patches/shared_cpp_hcon.patch

diff --git a/srcpkgs/facter/patches/shared_cpp_hcon.patch b/srcpkgs/facter/patches/shared_cpp_hcon.patch
new file mode 100644
index 000000000000..37c475697a96
--- /dev/null
+++ b/srcpkgs/facter/patches/shared_cpp_hcon.patch
@@ -0,0 +1,13 @@
+https://github.com/archlinux/svntogit-community/blob/0eb74a76c976a7fd638fbf6cd1c3b47be3dccd8b/trunk/shared_cpp_hcon.patch
+
+diff --git a/cmake/FindCPPHOCON.cmake b/cmake/FindCPPHOCON.cmake
+index 00ba8bd..0df0a51 100644
+--- a/cmake/FindCPPHOCON.cmake
++++ b/cmake/FindCPPHOCON.cmake
+@@ -1,5 +1,5 @@
+ include(FindDependency)
+-find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.a")
++find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.so")
+ 
+ include(FeatureSummary)
+ set_package_properties(CPPHOCON PROPERTIES DESCRIPTION "A C++ parser for the HOCON configuration language" URL "https://github.com/puppetlabs/cpp-hocon")
diff --git a/srcpkgs/facter/template b/srcpkgs/facter/template
index 45c921a0b72d..f92ea61d20ce 100644
--- a/srcpkgs/facter/template
+++ b/srcpkgs/facter/template
@@ -1,12 +1,12 @@
 # Template file for 'facter'
 pkgname=facter
 version=3.14.16
-revision=4
+revision=5
 build_style=cmake
 configure_args="-DRUBY_CONFIG_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include
  -DENABLE_CXX_WERROR=OFF -DCMAKE_INSTALL_LIBDIR=/usr/lib"
 hostmakedepends="ruby-devel"
-makedepends="boost-devel cpp-hocon leatherman-devel libblkid-devel libcurl-devel
+makedepends="boost-devel cpp-hocon-devel leatherman-devel libblkid-devel libcurl-devel
  ruby-devel yaml-cpp-devel"
 depends="net-tools ruby"
 short_desc="Collect and display system facts"
@@ -18,13 +18,13 @@ checksum=196c69b1ae325dbf11f68025eb12b9c53c054bee9112bd4f3e2ece8c5fe76571
 
 pre_configure() {
 	case "$XBPS_TARGET_MACHINE" in
-		mips*)	sed -i lib/CMakeLists.txt -e'/add_subdirectory(tests)/d' ;;
+		mips*)	vsed -i lib/CMakeLists.txt -e'/add_subdirectory(tests)/d' ;;
 	esac
 }
 
 post_build() {
 	# fixup vendor_ruby usr/lib{32,64} install path to always use usr/lib
-	vsed -i build/lib/cmake_install.cmake -e "s;lib32;lib;g" -e "s;lib64;lib;g"
+	vsed -i build/lib/cmake_install.cmake -e "s;lib\(32\|64\);lib;g"
 }
 
 facter-devel_package() {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] cpp-hocon: add shared library, disable tests build
  2022-11-20 12:20 [PR PATCH] cpp-hocon: add shared library, disable tests build paper42
                   ` (3 preceding siblings ...)
  2022-12-03 12:44 ` [PR PATCH] [Updated] " paper42
@ 2022-12-03 12:54 ` sgn
  2022-12-03 13:26 ` [PR PATCH] [Merged]: " sgn
  5 siblings, 0 replies; 7+ messages in thread
From: sgn @ 2022-12-03 12:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/paper42/void-packages cpp-hocon
https://github.com/void-linux/void-packages/pull/40645

cpp-hocon: add shared library, disable tests build
tests do not build with gcc 12

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/40645.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cpp-hocon-40645.patch --]
[-- Type: text/x-diff, Size: 5657 bytes --]

From 9efe1f486dd3f44bb23fb09e3ffe71a867070477 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 3 Dec 2022 19:51:30 +0700
Subject: [PATCH 1/3] leatherman: really bump to revision 4

fix c68be094a42, (leatherman: fix vendor include for catch, 2022-11-25)
---
 srcpkgs/leatherman/template | 1 -
 1 file changed, 1 deletion(-)

diff --git a/srcpkgs/leatherman/template b/srcpkgs/leatherman/template
index a2813bd4a923..4c6e775bfcee 100644
--- a/srcpkgs/leatherman/template
+++ b/srcpkgs/leatherman/template
@@ -1,7 +1,6 @@
 # Template file for 'leatherman'
 pkgname=leatherman
 version=1.12.4
-revision=3
 revision=4
 build_style=cmake
 configure_args="-DLEATHERMAN_SHARED=ON"

From 361b56aa8f7f94633bca1d81a0054a16e5656306 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Sun, 20 Nov 2022 13:19:04 +0100
Subject: [PATCH 2/3] cpp-hocon: build shared library

---
 common/shlibs              |  1 +
 srcpkgs/cpp-hocon-devel    |  1 +
 srcpkgs/cpp-hocon/template | 17 ++++++++++-------
 3 files changed, 12 insertions(+), 7 deletions(-)
 create mode 120000 srcpkgs/cpp-hocon-devel

diff --git a/common/shlibs b/common/shlibs
index 3da9f38d56a0..8fd417267d4d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4205,3 +4205,4 @@ libtraceevent.so.1 libtraceevent-1.6.2_1
 libtracefs.so.1 libtracefs-1.4.2_1
 libtracecmd.so.1 libtracecmd-3.1.2_1
 libkshark.so.2 libkshark-2.1.1_1
+libcpp-hocon.so.0.3.0 cpp-hocon-0.3.0_5
diff --git a/srcpkgs/cpp-hocon-devel b/srcpkgs/cpp-hocon-devel
new file mode 120000
index 000000000000..8d8bc1453e86
--- /dev/null
+++ b/srcpkgs/cpp-hocon-devel
@@ -0,0 +1 @@
+cpp-hocon
\ No newline at end of file
diff --git a/srcpkgs/cpp-hocon/template b/srcpkgs/cpp-hocon/template
index f61316adcc11..ce521b1395ae 100644
--- a/srcpkgs/cpp-hocon/template
+++ b/srcpkgs/cpp-hocon/template
@@ -1,20 +1,23 @@
 # Template file for 'cpp-hocon'
 pkgname=cpp-hocon
 version=0.3.0
-revision=4
+revision=5
 build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON"
 hostmakedepends="pkg-config"
 makedepends="boost-devel leatherman-devel libcurl-devel"
 short_desc="C++ port of the Typesafe Config library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://github.com/puppetlabs/cpp-hocon/"
-distfiles="https://github.com/puppetlabs/cpp-hocon/archive/${version}.tar.gz>${pkgname}-${version}.tar.gz"
+distfiles="https://github.com/puppetlabs/cpp-hocon/archive/${version}.tar.gz"
 checksum=dab02354046f05aca6275c746d7583ee5f71853aa5b1d93529564632e184c3dd
 
-post_install() {
-	# this package is a static library,
-	# needs to be rebuild when update boost,
-	# force an shlib-dependencies
-	vbin build/bin/libcpp-hocon_test
+cpp-hocon-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+	}
 }

From 456a0bfb9cfb007acc610b566f27c99c31325ccb Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Sun, 20 Nov 2022 13:35:34 +0100
Subject: [PATCH 3/3] facter: use shared cpp-hocon

Close: #40645
---
 srcpkgs/facter/patches/shared_cpp_hcon.patch | 13 +++++++++++++
 srcpkgs/facter/template                      |  8 ++++----
 2 files changed, 17 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/facter/patches/shared_cpp_hcon.patch

diff --git a/srcpkgs/facter/patches/shared_cpp_hcon.patch b/srcpkgs/facter/patches/shared_cpp_hcon.patch
new file mode 100644
index 000000000000..37c475697a96
--- /dev/null
+++ b/srcpkgs/facter/patches/shared_cpp_hcon.patch
@@ -0,0 +1,13 @@
+https://github.com/archlinux/svntogit-community/blob/0eb74a76c976a7fd638fbf6cd1c3b47be3dccd8b/trunk/shared_cpp_hcon.patch
+
+diff --git a/cmake/FindCPPHOCON.cmake b/cmake/FindCPPHOCON.cmake
+index 00ba8bd..0df0a51 100644
+--- a/cmake/FindCPPHOCON.cmake
++++ b/cmake/FindCPPHOCON.cmake
+@@ -1,5 +1,5 @@
+ include(FindDependency)
+-find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.a")
++find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.so")
+ 
+ include(FeatureSummary)
+ set_package_properties(CPPHOCON PROPERTIES DESCRIPTION "A C++ parser for the HOCON configuration language" URL "https://github.com/puppetlabs/cpp-hocon")
diff --git a/srcpkgs/facter/template b/srcpkgs/facter/template
index 45c921a0b72d..f92ea61d20ce 100644
--- a/srcpkgs/facter/template
+++ b/srcpkgs/facter/template
@@ -1,12 +1,12 @@
 # Template file for 'facter'
 pkgname=facter
 version=3.14.16
-revision=4
+revision=5
 build_style=cmake
 configure_args="-DRUBY_CONFIG_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include
  -DENABLE_CXX_WERROR=OFF -DCMAKE_INSTALL_LIBDIR=/usr/lib"
 hostmakedepends="ruby-devel"
-makedepends="boost-devel cpp-hocon leatherman-devel libblkid-devel libcurl-devel
+makedepends="boost-devel cpp-hocon-devel leatherman-devel libblkid-devel libcurl-devel
  ruby-devel yaml-cpp-devel"
 depends="net-tools ruby"
 short_desc="Collect and display system facts"
@@ -18,13 +18,13 @@ checksum=196c69b1ae325dbf11f68025eb12b9c53c054bee9112bd4f3e2ece8c5fe76571
 
 pre_configure() {
 	case "$XBPS_TARGET_MACHINE" in
-		mips*)	sed -i lib/CMakeLists.txt -e'/add_subdirectory(tests)/d' ;;
+		mips*)	vsed -i lib/CMakeLists.txt -e'/add_subdirectory(tests)/d' ;;
 	esac
 }
 
 post_build() {
 	# fixup vendor_ruby usr/lib{32,64} install path to always use usr/lib
-	vsed -i build/lib/cmake_install.cmake -e "s;lib32;lib;g" -e "s;lib64;lib;g"
+	vsed -i build/lib/cmake_install.cmake -e "s;lib\(32\|64\);lib;g"
 }
 
 facter-devel_package() {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Merged]: cpp-hocon: add shared library, disable tests build
  2022-11-20 12:20 [PR PATCH] cpp-hocon: add shared library, disable tests build paper42
                   ` (4 preceding siblings ...)
  2022-12-03 12:54 ` sgn
@ 2022-12-03 13:26 ` sgn
  5 siblings, 0 replies; 7+ messages in thread
From: sgn @ 2022-12-03 13:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]

There's a merged pull request on the void-packages repository

cpp-hocon: add shared library, disable tests build
https://github.com/void-linux/void-packages/pull/40645

Description:
tests do not build with gcc 12

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-03 13:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-20 12:20 [PR PATCH] cpp-hocon: add shared library, disable tests build paper42
2022-11-20 12:45 ` [PR PATCH] [Updated] " paper42
2022-11-23  7:29 ` kruceter
2022-11-25 10:25 ` sgn
2022-12-03 12:44 ` [PR PATCH] [Updated] " paper42
2022-12-03 12:54 ` sgn
2022-12-03 13:26 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).