facter: use shared cpp-hocon

Close: #40645
This commit is contained in:
Michal Vasilek 2022-11-20 13:35:34 +01:00 committed by Đoàn Trần Công Danh
parent 66c3fdc295
commit ae77199399
2 changed files with 17 additions and 4 deletions

View File

@ -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")

View File

@ -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() {