Skip to content

Commit d19564f

Browse files
committed
KeePassXC, -devel: update to 2.7.10, 20250909.git9a40182
* patch value of MAC_OS_VERSION_12_3 to fix build on older systems * add ScreenCaptureKit to existing patches * create separate old_macos patch for devel version * make devel builds not marked as Release build type 2.7.10 adds restrictions on short custom word lists, this is not a bug. Behavior is changed in devel version. Closes: https://trac.macports.org/ticket/72178
1 parent 9958e3c commit d19564f

File tree

4 files changed

+353
-35
lines changed

4 files changed

+353
-35
lines changed

security/KeePassXC/Portfile

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,9 @@ long_description KeePassXC is a community fork of KeePassX with the \
2727
license {GPL-2 GPL-3}
2828
license_noconflict openssl openssl10 openssl11 openssl3
2929

30-
if { ${os.platform} eq "darwin" && ${os.major} >= 24 } {
31-
macosx_deployment_target 14.0
32-
}
33-
3430
if {${subport} eq ${name}} {
3531
# stable
36-
github.setup keepassxreboot keepassxc 2.7.9
32+
github.setup keepassxreboot keepassxc 2.7.10
3733
revision 0
3834
github.tarball_from releases
3935
distname keepassxc-${version}-src
@@ -45,34 +41,39 @@ if {${subport} eq ${name}} {
4541

4642
# See keepassxc-${version}-src.tar.xz.DIGEST on upstream GitHub releases page for SHA256 sums
4743
checksums ${distname}${extract.suffix} \
48-
rmd160 0ac59defa184907036007f57d55e97ab8b422ce6 \
49-
sha256 3c44e45f22c00ddac63d8bc11054b4b0ada0222ffac08d3ed70f196cb9ed46fd \
50-
size 9789312 \
44+
rmd160 98dd8094eedd8029a4d7e5cc4dbb53d23299fb98 \
45+
sha256 5ce76d6440986c24842585f019d5f3cadc166fa71fc911a4fe97b8bbc4819dfa \
46+
size 9787952 \
5147
${distname}${extract.suffix}.sig \
52-
rmd160 1ca16506c6bd2abbf3e30e3cb91b5d9a06139ec0 \
53-
sha256 f3a51f4cbb7f4b3574cf3201d84427ebec59461eb5db516065bf282ba9b16a8b \
48+
rmd160 66bf14a194f8dbc459f7fd0abee18c7ee5e1c54e \
49+
sha256 315a1e19af294feec6eb7ffaa3f6621318d339e169636ad66dd188522ffd1374 \
5450
size 488
5551

5652
gpg_verify.use_gpg_verification \
5753
yes
54+
55+
patchfiles-append add_support_for_old_macos.diff
56+
57+
configure.args-append -DKEEPASSXC_BUILD_TYPE=Release \
5858
}
5959

6060
subport ${name}-devel {
61-
github.setup keepassxreboot keepassxc 37dabd2561c33d7c0e66bba6ab0883bb55e90cf1
62-
# Change github.tarball_from to 'releases' or 'archive' next update
63-
github.tarball_from tarball
61+
github.setup keepassxreboot keepassxc 9a40182a62543858537e279b2c9be9e2a9f92639
62+
github.tarball_from archive
6463
set githash [string range ${github.version} 0 6]
65-
version 20230514.git${githash}
66-
revision 2
64+
version 20250909.git${githash}
65+
revision 0
6766

6867
conflicts KeePassXC
6968

70-
checksums rmd160 16d79aa775a0dc6d8cf32015a3dc7131a2e13163 \
71-
sha256 05fb0c84e426f33bacd41f6809d52c5bc758dace52b41c58001385a26bed89c3 \
72-
size 10967053
69+
checksums rmd160 bb3804d67e76adba06ecee9df6159c31a9b1802c \
70+
sha256 7a2a62c1c28612dadc180e90c07a5c482f98ef2af328dd6fb7979efe19bcf0ba \
71+
size 12712636
7372

7473
gpg_verify.use_gpg_verification \
7574
no
75+
76+
patchfiles-append add_support_for_old_macos_devel.diff
7677
}
7778

7879
if {[option gpg_verify.use_gpg_verification]} {
@@ -112,7 +113,6 @@ depends_lib-append port:argon2 \
112113

113114
patchfiles-append patch-no-deployqt.diff \
114115
patch-no-findpackage-path.diff \
115-
add_support_for_old_macos.diff \
116116
add_support_for_old_macos-2.diff
117117

118118
# error: no matching constructor for initialization of 'std::shared_ptr<unsigned char []>'
@@ -124,7 +124,6 @@ configure.args-append \
124124
-DCMAKE_INSTALL_PREFIX=${applications_dir} \
125125
-DCMAKE_INSTALL_MANDIR=${prefix}/share/man \
126126
-DCMAKE_PREFIX_PATH=${qt_cmake_module_dir} \
127-
-DKEEPASSXC_BUILD_TYPE=Release \
128127
-DWITH_XC_BROWSER=ON \
129128
-DWITH_XC_KEESHARE=ON \
130129
-DWITH_XC_NETWORKING=ON \

security/KeePassXC/files/add_support_for_old_macos-2.diff

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
--- src/gui/osutils/macutils/AppKitImpl.mm
2-
+++ src/gui/osutils/macutils/AppKitImpl.mm
3-
@@ -66,7 +66,7 @@
1+
--- src/gui/osutils/macutils/AppKitImpl.mm.orig 2025-05-27 17:48:31.000000000 -0700
2+
+++ src/gui/osutils/macutils/AppKitImpl.mm 2025-05-27 19:14:00.000000000 -0700
3+
@@ -19,7 +19,7 @@
4+
#import "AppKitImpl.h"
5+
#import <QWindow>
6+
#import <Cocoa/Cocoa.h>
7+
-#if __clang_major__ >= 13 && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_12_3
8+
+#if __clang_major__ >= 13 && MAC_OS_X_VERSION_MIN_REQUIRED >= 120300
9+
#import <ScreenCaptureKit/ScreenCaptureKit.h>
10+
#endif
11+
12+
@@ -61,7 +61,7 @@
413

514
- (void) observeValueForKeyPath:(NSString *)keyPath
615
ofObject:(id)object
@@ -9,7 +18,7 @@
918
context:(void *)context
1019
{
1120
Q_UNUSED(object)
12-
@@ -80,8 +80,10 @@
21+
@@ -75,8 +75,10 @@
1322
};
1423

1524
if(@available(macOS 11.0, *)) {
@@ -20,7 +29,7 @@
2029
}
2130
else {
2231
emitBlock();
23-
@@ -139,7 +141,11 @@
32+
@@ -134,7 +136,11 @@
2433
//
2534
- (bool) isDarkMode
2635
{
@@ -32,3 +41,12 @@
3241
}
3342

3443

44+
@@ -186,7 +192,7 @@
45+
//
46+
- (bool) enableScreenRecording
47+
{
48+
-#if __clang_major__ >= 13 && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_12_3
49+
+#if __clang_major__ >= 13 && MAC_OS_X_VERSION_MIN_REQUIRED >= 120300
50+
if (@available(macOS 12.3, *)) {
51+
__block BOOL hasPermission = NO;
52+
dispatch_semaphore_t sema = dispatch_semaphore_create(0);

security/KeePassXC/files/add_support_for_old_macos.diff

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Upstream doesn't want to merge patches to build on versions prior to macos
1111
10.13, so this patch is not forwarded upstream.
1212
See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-1291750066
1313

14-
--- CMakeLists.txt
15-
+++ CMakeLists.txt
16-
@@ -81,6 +81,42 @@ if(APPLE)
14+
--- CMakeLists.txt.orig 2025-09-17 16:07:50.000000000 -0700
15+
+++ CMakeLists.txt 2025-09-17 16:14:00.000000000 -0700
16+
@@ -82,6 +82,46 @@
1717
${CMAKE_CURRENT_BINARY_DIR}/tiometry_test/
1818
${CMAKE_CURRENT_SOURCE_DIR}/cmake/compiler-checks/macos/control_watch_support.mm)
1919
message(STATUS "Apple watch compiler support: ${XC_APPLE_COMPILER_SUPPORT_WATCH}")
@@ -53,6 +53,10 @@ See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-12917500
5353
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compiler-checks/macos/control_SecAccessControlRef_support.mm)
5454
+ message(STATUS "SecAccessControlRef compiler support: ${XC_APPLE_COMPILER_SUPPORT_SecAccessControlRef}")
5555
+
56+
+ try_compile(XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit
57+
+ ${CMAKE_CURRENT_BINARY_DIR}/ScreenCaptureKit_test/
58+
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compiler-checks/macos/control_ScreenCaptureKit_support.mm)
59+
+ message(STATUS "ScreenCaptureKit compiler support: ${XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit}")
5660
endif()
5761

5862
if(WITH_CCACHE)
@@ -115,9 +119,14 @@ See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-12917500
115119
+ kSecUseOperationPrompt;
116120
+ return 0;
117121
+}
118-
--- src/config-keepassx.h.cmake
119-
+++ src/config-keepassx.h.cmake
120-
@@ -41,10 +41,24 @@
122+
--- /dev/null
123+
+++ cmake/compiler-checks/macos/control_ScreenCaptureKit_support.mm
124+
@@ -0,0 +1,2 @@
125+
+#include <ScreenCaptureKit/ScreenCaptureKit.h>
126+
+int main() { return 0; }
127+
--- src/config-keepassx.h.cmake.orig 2025-09-17 16:23:31.000000000 -0700
128+
+++ src/config-keepassx.h.cmake 2025-09-17 16:26:08.000000000 -0700
129+
@@ -43,10 +43,26 @@
121130
#cmakedefine01 XC_APPLE_COMPILER_SUPPORT_BIOMETRY()
122131
#cmakedefine01 XC_APPLE_COMPILER_SUPPORT_TOUCH_ID()
123132
#cmakedefine01 XC_APPLE_COMPILER_SUPPORT_WATCH()
@@ -128,6 +137,7 @@ See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-12917500
128137
+#cmakedefine01 XC_APPLE_COMPILER_SUPPORT_kSecAttrAccessControl()
129138
+#cmakedefine01 XC_APPLE_COMPILER_SUPPORT_kSecUseOperationPrompt()
130139
+#cmakedefine01 XC_APPLE_COMPILER_SUPPORT_SecAccessControlRef()
140+
+#cmakedefine01 XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit()
131141

132142
#define XC_COMPILER_SUPPORT(X) XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_##X()
133143
#define XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_APPLE_BIOMETRY() XC_APPLE_COMPILER_SUPPORT_BIOMETRY()
@@ -140,6 +150,7 @@ See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-12917500
140150
+#define XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_kSecAttrAccessControl() XC_APPLE_COMPILER_SUPPORT_kSecAttrAccessControl()
141151
+#define XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_kSecUseOperationPrompt() XC_APPLE_COMPILER_SUPPORT_kSecUseOperationPrompt()
142152
+#define XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_SecAccessControlRef() XC_APPLE_COMPILER_SUPPORT_SecAccessControlRef()
153+
+#define XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_ScreenCaptureKit() XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit()
143154

144155
#endif // KEEPASSX_CONFIG_KEEPASSX_H
145156
--- src/touchid/TouchID.mm
@@ -229,17 +240,34 @@ See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-12917500
229240
LogStatusError("TouchID::getKey - key query error", status);
230241
return false;
231242
}
232-
--- src/CMakeLists.txt
233-
+++ src/CMakeLists.txt
234-
@@ -354,7 +354,10 @@ if(WITH_XC_KEESHARE)
243+
--- src/CMakeLists.txt.orig 2025-09-17 17:04:25.000000000 -0700
244+
+++ src/CMakeLists.txt 2025-09-17 17:06:55.000000000 -0700
245+
@@ -372,7 +372,13 @@
235246
endif()
236247

237248
if(APPLE)
238-
- target_link_libraries(keepassx_core "-framework Foundation -framework AppKit -framework Carbon -framework Security -framework LocalAuthentication")
249+
- target_link_libraries(keepassx_core "-framework Foundation -framework AppKit -framework Carbon -framework Security -framework LocalAuthentication -framework ScreenCaptureKit")
239250
+ target_link_libraries(keepassx_core "-framework Foundation -framework AppKit -framework Carbon -framework Security")
240251
+ if(XC_APPLE_COMPILER_SUPPORT_LocalAuthentication)
241252
+ target_link_libraries(keepassx_core "-framework LocalAuthentication")
253+
+ endif()
254+
+ if(XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit)
255+
+ target_link_libraries(keepassx_core "-framework ScreenCaptureKit")
242256
+ endif()
243257
if(Qt5MacExtras_FOUND)
244258
target_link_libraries(keepassx_core Qt5::MacExtras)
245259
endif()
260+
--- src/autotype/mac/CMakeLists.txt.orig 2025-09-17 18:29:38.000000000 -0700
261+
+++ src/autotype/mac/CMakeLists.txt 2025-09-17 18:40:25.000000000 -0700
262+
@@ -1,7 +1,10 @@
263+
set(autotype_mac_SOURCES AutoTypeMac.cpp)
264+
265+
add_library(keepassxc-autotype-cocoa MODULE ${autotype_mac_SOURCES})
266+
-set_target_properties(keepassxc-autotype-cocoa PROPERTIES LINK_FLAGS "-framework Foundation -framework AppKit -framework Carbon -framework ScreenCaptureKit")
267+
+set_target_properties(keepassxc-autotype-cocoa PROPERTIES LINK_FLAGS "-framework Foundation -framework AppKit -framework Carbon")
268+
+ if(XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit)
269+
+ set_target_properties(keepassxc-autotype-cocoa PROPERTIES LINK_FLAGS "-framework ScreenCaptureKit")
270+
+ endif()
271+
target_link_libraries(keepassxc-autotype-cocoa ${PROGNAME} Qt5::Core Qt5::Widgets)
272+
273+
install(TARGETS keepassxc-autotype-cocoa

0 commit comments

Comments
 (0)