git: b6b7a839ea2a - 2022Q2 - security/keepassxc: Fix build on recent head (after lld 14 import)

From: Li-Wen Hsu <lwhsu_at_FreeBSD.org>
Date: Sun, 29 May 2022 16:31:40 UTC
The branch 2022Q2 has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b6b7a839ea2af3df87446a9acd42d78b8a016757

commit b6b7a839ea2af3df87446a9acd42d78b8a016757
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-05-29 16:23:58 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2022-05-29 16:31:29 +0000

    security/keepassxc: Fix build on recent head (after lld 14 import)
    
    PR:             264225
    (cherry picked from commit 19ceed92123e6e2612056b42566974421b6834de)
---
 security/keepassxc/files/patch-CMakeLists.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/security/keepassxc/files/patch-CMakeLists.txt b/security/keepassxc/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..7c2bba1a2360
--- /dev/null
+++ b/security/keepassxc/files/patch-CMakeLists.txt
@@ -0,0 +1,14 @@
+--- CMakeLists.txt.orig	2022-04-06 03:12:34 UTC
++++ CMakeLists.txt
+@@ -310,9 +310,9 @@ if(UNIX AND NOT APPLE)
+ 
+ if(UNIX AND NOT APPLE)
+     check_add_gcc_compiler_flag("-Qunused-arguments")
+-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed -Wl,--no-undefined")
++    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed -Wl,--no-undefined")
+     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro,-z,now -pie")
+-    set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed")
++    set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--as-needed")
+     set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
+ endif()
+