Skip to content

Commit eac5f2c

Browse files
authored
lomiri.trust-store: Fix compatibility with glog 0.7.x, pin Boost to 1.86 (NixOS#375363)
2 parents 232bc51 + 110716d commit eac5f2c

File tree

2 files changed

+65
-2
lines changed

2 files changed

+65
-2
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
From dbd44fbdc580a83ce7fb67fe8d2c87acee087cb0 Mon Sep 17 00:00:00 2001
2+
From: OPNA2608 <[email protected]>
3+
Date: Mon, 20 Jan 2025 19:25:00 +0100
4+
Subject: [PATCH] treewide: Switch to glog CMake module
5+
6+
---
7+
CMakeLists.txt | 5 ++---
8+
src/CMakeLists.txt | 2 +-
9+
2 files changed, 3 insertions(+), 4 deletions(-)
10+
11+
diff --git a/CMakeLists.txt b/CMakeLists.txt
12+
index 6f03c1c..b58d8ab 100644
13+
--- a/CMakeLists.txt
14+
+++ b/CMakeLists.txt
15+
@@ -38,8 +38,9 @@ IF(CMAKE_BUILD_TYPE MATCHES [cC][oO][vV][eE][rR][aA][gG][eE])
16+
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage -fprofile-arcs" )
17+
ENDIF(CMAKE_BUILD_TYPE MATCHES [cC][oO][vV][eE][rR][aA][gG][eE])
18+
19+
-find_package(PkgConfig)
20+
+find_package(PkgConfig REQUIRED)
21+
find_package(Boost COMPONENTS filesystem program_options system REQUIRED)
22+
+find_package(glog REQUIRED)
23+
24+
add_subdirectory(3rd_party/xdg)
25+
26+
@@ -56,7 +57,6 @@ if (TRUST_STORE_MIR_AGENT_ENABLED)
27+
)
28+
endif()
29+
30+
-pkg_check_modules(GLOG libglog REQUIRED)
31+
pkg_check_modules(PROCESS_CPP process-cpp REQUIRED)
32+
33+
include(CTest)
34+
@@ -66,7 +66,6 @@ include_directories(
35+
3rd_party/xdg
36+
37+
${GFLAGS_INCLUDE_DIRS}
38+
- ${GLOG_INCLUDE_DIRS}
39+
${PROCESS_CPP_INCLUDE_DIRS}
40+
)
41+
42+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
43+
index ac87e7f..416549c 100644
44+
--- a/src/CMakeLists.txt
45+
+++ b/src/CMakeLists.txt
46+
@@ -211,7 +211,7 @@ target_link_libraries(
47+
${Boost_LIBRARIES}
48+
${DBUS_LIBRARIES}
49+
${GFLAGS_LDFLAGS}
50+
- ${GLOG_LDFLAGS}
51+
+ glog::glog
52+
${GLIB_LDFLAGS}
53+
${GOBJECT_LDFLAGS}
54+
${LIBAPPARMOR_LDFLAGS}
55+
--
56+
2.47.1
57+

pkgs/desktops/lomiri/development/trust-store/default.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
fetchpatch,
66
gitUpdater,
77
testers,
8-
boost,
8+
# dbus-cpp not compatible with Boost 1.87
9+
# https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/issues/8
10+
boost186,
911
cmake,
1012
cmake-extras,
1113
dbus,
@@ -50,6 +52,10 @@ stdenv.mkDerivation (finalAttrs: {
5052
url = "https://gitlab.com/ubports/development/core/trust-store/-/commit/569f6b35d8bcdb2ae5ff84549cd92cfc0899675b.patch";
5153
hash = "sha256-3lrdVIzscXGiLKwftC5oECICVv3sBoS4UedfRHx7uOs=";
5254
})
55+
56+
# Fix compatibility with glog 0.7.x
57+
# Remove when https://gitlab.com/ubports/development/core/trust-store/-/merge_requests/18 merged & in release
58+
./1001-treewide-Switch-to-glog-CMake-module.patch
5359
];
5460

5561
postPatch =
@@ -79,7 +85,7 @@ stdenv.mkDerivation (finalAttrs: {
7985
];
8086

8187
buildInputs = [
82-
boost
88+
boost186
8389
cmake-extras
8490
dbus-cpp
8591
glog

0 commit comments

Comments
 (0)