Skip to content

Commit

Permalink
[dbus] Use port libsystemd (#34333)
Browse files Browse the repository at this point in the history
* [dbus] Fix features

* [dbus] Use port libsystemd [skip actions]

* [dbus] Fix libsystemd dependency

* [dbus] libsystemd include dir via target

* [freerdp] Disable libsystemd
  • Loading branch information
dg0yt committed Nov 21, 2023
1 parent 3bfa3d4 commit 64a8686
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 5 deletions.
15 changes: 15 additions & 0 deletions ports/dbus/libsystemd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d3ec71b..932066a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -141,6 +141,10 @@ if(DBUS_LINUX)
if(ENABLE_SYSTEMD AND SYSTEMD_FOUND)
set(DBUS_BUS_ENABLE_SYSTEMD ON)
set(HAVE_SYSTEMD ${SYSTEMD_FOUND})
+ pkg_check_modules(SYSTEMD libsystemd IMPORTED_TARGET)
+ set(SYSTEMD_LIBRARIES PkgConfig::SYSTEMD CACHE INTERNAL "")
+ else()
+ set(SYSTEMD_LIBRARIES "" CACHE INTERNAL "")
endif()
option(ENABLE_USER_SESSION "enable user-session semantics for session bus under systemd" OFF)
set(DBUS_ENABLE_USER_SESSION ${ENABLE_USER_SESSION})
3 changes: 2 additions & 1 deletion ports/dbus/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ vcpkg_from_gitlab(
cmake.dep.patch
pkgconfig.patch
getpeereid.patch # missing check from configure.ac
libsystemd.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS options
FEATURES
systemd ENABLE_SYSTEMD
x11 DBUS_BUILD_X11
x11 CMAKE_REQUIRE_FIND_PACKAGE_X11
)
Expand All @@ -30,7 +32,6 @@ vcpkg_cmake_configure(
-DDBUS_INSTALL_SYSTEM_LIBS=OFF
#-DDBUS_SERVICE=ON
-DDBUS_WITH_GLIB=OFF
-DENABLE_SYSTEMD=ON
-DTHREADS_PREFER_PTHREAD_FLAG=ON
-DXSLTPROC_EXECUTABLE=FALSE
"-DCMAKE_INSTALL_SYSCONFDIR=${CURRENT_PACKAGES_DIR}/etc/${PORT}"
Expand Down
18 changes: 17 additions & 1 deletion ports/dbus/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dbus",
"version": "1.15.8",
"port-version": 1,
"port-version": 2,
"description": "D-Bus specification and reference implementation, including libdbus and dbus-daemon",
"homepage": "https://gitlab.freedesktop.org/dbus/dbus",
"license": "AFL-2.1 OR GPL-2.0-or-later",
Expand All @@ -17,7 +17,23 @@
"host": true
}
],
"default-features": [
{
"name": "systemd",
"platform": "linux"
}
],
"features": {
"systemd": {
"description": "Build with systemd at_console support",
"supports": "linux",
"dependencies": [
{
"name": "libsystemd",
"platform": "linux"
}
]
},
"x11": {
"description": "Build with X11 autolaunch support",
"dependencies": [
Expand Down
1 change: 1 addition & 0 deletions ports/freerdp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ vcpkg_cmake_configure(
# Can be overriden in custom triplet file
-DWITH_ALSA=OFF
-DWITH_CAIRO=OFF
-DWITH_LIBSYSTEMD=OFF
MAYBE_UNUSED_VARIABLES
MSVC_RUNTIME
)
Expand Down
12 changes: 11 additions & 1 deletion ports/freerdp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "freerdp",
"version": "2.11.2",
"port-version": 1,
"description": "A free implementation of the Remote Desktop Protocol (RDP)",
"homepage": "https://github.com/FreeRDP/FreeRDP",
"license": "Apache-2.0",
Expand Down Expand Up @@ -46,7 +47,16 @@
},
"server": {
"description": "Build server components",
"supports": "!android & !ios & !uwp"
"supports": "!android & !ios & !uwp",
"dependencies": [
{
"name": "freerdp",
"default-features": false,
"features": [
"winpr-tools"
]
}
]
},
"urbdrc": {
"description": "USB redirection channel support",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,7 @@
},
"dbus": {
"baseline": "1.15.8",
"port-version": 1
"port-version": 2
},
"dcmtk": {
"baseline": "3.6.7",
Expand Down Expand Up @@ -2762,7 +2762,7 @@
},
"freerdp": {
"baseline": "2.11.2",
"port-version": 0
"port-version": 1
},
"freetds": {
"baseline": "1.3.10",
Expand Down
5 changes: 5 additions & 0 deletions versions/d-/dbus.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d91a1718705f5d0d6ba7922cf832759a58469ff8",
"version": "1.15.8",
"port-version": 2
},
{
"git-tree": "9104cc6d890ace8c14067e7cbf29c39f7a93b937",
"version": "1.15.8",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/freerdp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "980f914c0856191ef155ede267bc4553ccc49ac2",
"version": "2.11.2",
"port-version": 1
},
{
"git-tree": "90f838d8fb3b7d8d45b9d64f951486cee618ab8e",
"version": "2.11.2",
Expand Down

0 comments on commit 64a8686

Please sign in to comment.