[packages/qca] - added libgcrypt (use pkg-config to detect libgcrypt instead of recently removed libgcrypt-config)

qboosh qboosh at pld-linux.org
Wed Oct 23 20:16:17 CEST 2024


commit 28808149f21f12bc173da48128cbe7c237351e02
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Oct 23 20:01:57 2024 +0200

    - added libgcrypt (use pkg-config to detect libgcrypt instead of recently removed libgcrypt-config)
    - package botan plugin

 qca-libgcrypt.patch | 22 ++++++++++++++++++++++
 qca.spec            | 25 ++++++++++++++++---------
 2 files changed, 38 insertions(+), 9 deletions(-)
---
diff --git a/qca.spec b/qca.spec
index cc63750..6cbc2bc 100644
--- a/qca.spec
+++ b/qca.spec
@@ -8,18 +8,22 @@ Group:		Libraries
 Source0:	https://download.kde.org/stable/qca/%{version}/%{name}-%{version}.tar.xz
 # Source0-md5:	5d809bf0ade891dc89dfd7639cbeaa9d
 Patch0:		openssl3.patch
+Patch1:		%{name}-libgcrypt.patch
 URL:		https://invent.kde.org/libraries/qca
-BuildRequires:	QtCore-devel
-BuildRequires:	QtGui-devel
-BuildRequires:	QtNetwork-devel
-BuildRequires:	QtTest-devel
-BuildRequires:	cmake >= 2.8.2
+BuildRequires:	QtCore-devel >= 4.7.0
+BuildRequires:	QtGui-devel >= 4.7.0
+BuildRequires:	QtNetwork-devel >= 4.7.0
+BuildRequires:	QtTest-devel >= 4.7.0
+BuildRequires:	botan2-devel >= 2
+BuildRequires:	cmake >= 3.4
+BuildRequires:	cyrus-sasl-devel >= 2
+BuildRequires:	libgcrypt-devel >= 1.8.5
 BuildRequires:	libstdc++-devel
 BuildRequires:	nss-devel
 BuildRequires:	openssl-devel >= 0.9.7d
 BuildRequires:	pkcs11-helper-devel
-BuildRequires:	qt4-build >= 4.3.3-3
-BuildRequires:	qt4-qmake >= 4.3.3-3
+BuildRequires:	qt4-build >= 4.7.0
+BuildRequires:	qt4-qmake >= 4.7.0
 BuildRequires:	which
 Provides:	qt4-plugin-qca-ossl = %{version}
 Obsoletes:	qt4-plugin-qca-cyrus-sasl
@@ -50,6 +54,7 @@ programistów.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
@@ -66,6 +71,7 @@ cd ..
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
@@ -80,10 +86,11 @@ rm -rf $RPM_BUILD_ROOT
 %doc README
 %attr(755,root,root) %{_bindir}/qcatool
 %attr(755,root,root) %{_bindir}/mozcerts
-%ghost %attr(755,root,root) %{_libdir}/libqca.so.2
-%attr(755,root,root) %{_libdir}/libqca.so.*.*
+%attr(755,root,root) %{_libdir}/libqca.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libqca.so.2
 %dir %{_libdir}/qca
 %dir %{_libdir}/qca/crypto
+%attr(755,root,root) %{_libdir}/qca/crypto/libqca-botan.so
 %attr(755,root,root) %{_libdir}/qca/crypto/libqca-cyrus-sasl.so
 %attr(755,root,root) %{_libdir}/qca/crypto/libqca-gcrypt.so
 %attr(755,root,root) %{_libdir}/qca/crypto/libqca-gnupg.so
diff --git a/qca-libgcrypt.patch b/qca-libgcrypt.patch
new file mode 100644
index 0000000..8a2f053
--- /dev/null
+++ b/qca-libgcrypt.patch
@@ -0,0 +1,22 @@
+--- qca-2.2.1/cmake/modules/FindLibGcrypt.cmake.orig	2019-04-24 14:58:14.000000000 +0200
++++ qca-2.2.1/cmake/modules/FindLibGcrypt.cmake	2024-10-23 19:45:55.330870021 +0200
+@@ -14,7 +14,7 @@
+ # libgcrypt is moving to pkg-config, but earlier version don't have it
+ 
+ #search in typical paths for libgcrypt-config
+-FIND_PROGRAM(LIBGCRYPTCONFIG_EXECUTABLE NAMES libgcrypt-config)
++FIND_PROGRAM(LIBGCRYPTCONFIG_EXECUTABLE NAMES pkg-config)
+ mark_as_advanced(LIBGCRYPTCONFIG_EXECUTABLE)
+ 
+ #reset variables
+@@ -26,8 +26,8 @@ IF(LIBGCRYPTCONFIG_EXECUTABLE)
+ 
+   # workaround for MinGW/MSYS
+   # CMake can't starts shell scripts on windows so it need to use sh.exe
+-  EXECUTE_PROCESS(COMMAND sh ${LIBGCRYPTCONFIG_EXECUTABLE} --libs RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE LIBGCRYPT_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE)
+-  EXECUTE_PROCESS(COMMAND sh ${LIBGCRYPTCONFIG_EXECUTABLE} --cflags RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE LIBGCRYPT_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
++  EXECUTE_PROCESS(COMMAND ${LIBGCRYPTCONFIG_EXECUTABLE} libgcrypt --libs RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE LIBGCRYPT_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE)
++  EXECUTE_PROCESS(COMMAND ${LIBGCRYPTCONFIG_EXECUTABLE} libgcrypt --cflags RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE LIBGCRYPT_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
+ 
+   IF(NOT LIBGCRYPT_CFLAGS AND NOT _return_VALUE)
+     SET(LIBGCRYPT_CFLAGS " ")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qca.git/commitdiff/5568451c6efdf2e421170d0b4e63de27f401919f



More information about the pld-cvs-commit mailing list