diff options
author | James Le Cuirot <chewi@gentoo.org> | 2022-08-20 17:34:47 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2022-08-20 17:34:47 +0100 |
commit | 365f04c3ce304f919b7ff4ff11152a4f17aec459 (patch) | |
tree | 02935c0b3be31d33d3e33eddc7754c160bb6dfd7 /dev-cpp/sdbus-c++ | |
parent | sys-boot/systemd-boot: use python_has_version (diff) | |
download | gentoo-365f04c3ce304f919b7ff4ff11152a4f17aec459.tar.gz gentoo-365f04c3ce304f919b7ff4ff11152a4f17aec459.tar.bz2 gentoo-365f04c3ce304f919b7ff4ff11152a4f17aec459.zip |
dev-cpp/sdbus-c++: Fix pkg-config dep on libsystemd when statically linked
Closes: https://bugs.gentoo.org/865389
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'dev-cpp/sdbus-c++')
-rw-r--r-- | dev-cpp/sdbus-c++/files/sdbus-c++-pc-reqs.patch | 29 | ||||
-rw-r--r-- | dev-cpp/sdbus-c++/sdbus-c++-0.9.0-r4.ebuild | 4 | ||||
-rw-r--r-- | dev-cpp/sdbus-c++/sdbus-c++-1.2.0.ebuild | 4 |
3 files changed, 37 insertions, 0 deletions
diff --git a/dev-cpp/sdbus-c++/files/sdbus-c++-pc-reqs.patch b/dev-cpp/sdbus-c++/files/sdbus-c++-pc-reqs.patch new file mode 100644 index 000000000000..9730bda5bc65 --- /dev/null +++ b/dev-cpp/sdbus-c++/files/sdbus-c++-pc-reqs.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0733b41..fd613be 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -210,6 +210,11 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/sdbus-c++-config.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/sdbus-c++ + COMPONENT dev) + ++if(BUILD_LIBSYSTEMD OR pkgcfg_lib_Systemd_systemd MATCHES "\.a$") ++ set(PKGCONFIG_REQS "") ++else() ++ set(PKGCONFIG_REQS "libsystemd") ++endif() + configure_file(pkgconfig/sdbus-c++.pc.in pkgconfig/sdbus-c++.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/sdbus-c++.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT dev) +diff --git a/pkgconfig/sdbus-c++.pc.in b/pkgconfig/sdbus-c++.pc.in +index 21e0f0b..a6d6ec9 100644 +--- a/pkgconfig/sdbus-c++.pc.in ++++ b/pkgconfig/sdbus-c++.pc.in +@@ -5,7 +5,7 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + + Name: @PROJECT_NAME@ + Description: C++ library on top of sd-bus, a systemd D-Bus library +-Requires: libsystemd ++Requires: @PKGCONFIG_REQS@ + Version: @SDBUSCPP_VERSION@ + Libs: -L${libdir} -l@PROJECT_NAME@ + Cflags: -I${includedir} diff --git a/dev-cpp/sdbus-c++/sdbus-c++-0.9.0-r4.ebuild b/dev-cpp/sdbus-c++/sdbus-c++-0.9.0-r4.ebuild index 12f7585b9012..d65f5c3ead87 100644 --- a/dev-cpp/sdbus-c++/sdbus-c++-0.9.0-r4.ebuild +++ b/dev-cpp/sdbus-c++/sdbus-c++-0.9.0-r4.ebuild @@ -58,6 +58,10 @@ S="${WORKDIR}/sdbus-cpp-${PV}" SDS="${WORKDIR}/${SDP}" SDB="${WORKDIR}/systemd-build" +PATCHES=( + "${FILESDIR}"/${PN}-pc-reqs.patch +) + pkg_setup() { use systemd || python-any-r1_pkg_setup } diff --git a/dev-cpp/sdbus-c++/sdbus-c++-1.2.0.ebuild b/dev-cpp/sdbus-c++/sdbus-c++-1.2.0.ebuild index 2ebb4f8fe333..e6de260d88b5 100644 --- a/dev-cpp/sdbus-c++/sdbus-c++-1.2.0.ebuild +++ b/dev-cpp/sdbus-c++/sdbus-c++-1.2.0.ebuild @@ -58,6 +58,10 @@ S="${WORKDIR}/sdbus-cpp-${PV}" SDS="${WORKDIR}/${SDP}" SDB="${WORKDIR}/systemd-build" +PATCHES=( + "${FILESDIR}"/${PN}-pc-reqs.patch +) + pkg_setup() { use systemd || python-any-r1_pkg_setup } |