support clang build

Signed-off-by: luofeng14 <luofeng13@huawei.com>
This commit is contained in:
luofeng14 2023-09-23 10:10:01 +00:00 committed by Gitee
parent 5404d6d1d2
commit 49dac173d5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 31 additions and 1 deletions

View File

@ -9,7 +9,7 @@ Summary: Java Security Services
URL: http://www.dogtagpki.org/wiki/JSS
License: MPLv1.1 or GPLv2+ or LGPLv2+
Version: 5.4.0
Release: 1
Release: 2
Source0: https://github.com/dogtagpki/jss/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: make cmake >= 3.14 gcc-c++ nspr-devel >= 4.13.1 nss-devel >= 3.66 nss-tools >= 3.66
@ -20,6 +20,8 @@ Requires: nss >= 3.66 jpackage-utils slf4j slf4j-jdk14 java-17-openjdk-hea
Conflicts: ldapjdk < 4.20 idm-console-framework < 1.2 tomcatjss < 7.6.0 pki-base < 10.10.0
Patch1: support-clang-build.patch
%description
JSS offers a implementation for java-based applications to use native NSS.
@ -82,6 +84,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA
%{_javadocdir}/jss/
%changelog
* Sat Sep 23 2023 luofeng <luofeng13@huawei.com> - 5.4.0-2
- support clang build
* Wed Apr 26 2023 xu_ping <707078654@qq.com> - 5.4.0-1
- Upgrade to 5.4.0

25
support-clang-build.patch Normal file
View File

@ -0,0 +1,25 @@
From fd3adeeb0a757c52c62327ace6016fb792b7a491 Mon Sep 17 00:00:00 2001
From: luofeng <luofeng13@huawei.com>
Date: Sat, 23 Sep 2023 17:55:57 +0800
Subject: [PATCH] support clang build
---
cmake/JSSConfig.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/JSSConfig.cmake b/cmake/JSSConfig.cmake
index 07b5cd6..a11289e 100644
--- a/cmake/JSSConfig.cmake
+++ b/cmake/JSSConfig.cmake
@@ -176,7 +176,7 @@ macro(jss_config_cflags)
# Handle passed-in C flags as well; assume they are valid.
separate_arguments(PASSED_C_FLAGS UNIX_COMMAND "${CMAKE_C_FLAGS}")
foreach(PASSED_C_FLAG ${PASSED_C_FLAGS})
- list(INSERT JSS_C_FLAGS 0 "${PASSED_C_FLAG}")
+ list(APPEND JSS_C_FLAGS "${PASSED_C_FLAG}")
endforeach()
message(STATUS "JSS C FLAGS: ${JSS_C_FLAGS}")
--
2.19.1