[arch-commits] Commit in qca/repos (3 files)

2019-04-20 Thread Antonio Rojas via arch-commits
Date: Saturday, April 20, 2019 @ 23:27:38
  Author: arojas
Revision: 351841

archrelease: copy trunk to staging-x86_64

Added:
  qca/repos/staging-x86_64/
  qca/repos/staging-x86_64/PKGBUILD
(from rev 351840, qca/trunk/PKGBUILD)
  qca/repos/staging-x86_64/qca-fix-build-qt-prefix.patch
(from rev 351840, qca/trunk/qca-fix-build-qt-prefix.patch)

---+
 PKGBUILD  |   49 +++
 qca-fix-build-qt-prefix.patch |   55 
 2 files changed, 104 insertions(+)

Copied: qca/repos/staging-x86_64/PKGBUILD (from rev 351840, qca/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2019-04-20 23:27:38 UTC (rev 351841)
@@ -0,0 +1,49 @@
+# Maintainer: Antonio Rojas 
+# Contributor: Andrea Scarpino 
+# Contributor: Pierre Schmitz 
+
+pkgname=qca
+pkgver=2.2.0
+pkgrel=2
+pkgdesc="Qt Cryptographic Architecture"
+arch=(x86_64)
+url="https://userbase.kde.org/QCA;
+license=(LGPL)
+depends=(qt5-base nss ca-certificates)
+optdepends=('pkcs11-helper: PKCS-11 plugin' 'botan: botan plugin')
+makedepends=(cmake doxygen pkcs11-helper botan)
+conflicts=(qca-qt5)
+provides=(qca-qt5)
+replaces=(qca-qt5)
+source=("https://download.kde.org/stable/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz"{,.sig}
+qca-fix-build-qt-prefix.patch)
+sha256sums=('3b479826858099c9ac1bd7992a0e2f1cd68d684d9a32910dbc4372bef592318a'
+'SKIP'
+'e480b850ab78df4fe887c1262053cc4ab8b9e458299a4944a04121b06cbdf646')
+validpgpkeys=(CB9387521E1EE0127DA804843FDBB55084CC5D84) # Harald Sitter 

+
+prepare() {
+  mkdir -p build
+
+  cd qca-$pkgver
+  patch -p1 -i ../qca-fix-build-qt-prefix.patch # Fix build when installing 
under Qt prefix
+}
+
+build() {
+  cd build
+  cmake ../$pkgname-$pkgver \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DBUILD_TESTS=OFF \
+-DQCA_INSTALL_IN_QT_PREFIX=ON \
+-DQCA_MAN_INSTALL_DIR=/usr/share/man
+  make
+}
+
+package() {
+  depends=(qt5-base nss ca-certificates)
+  optdepends=('pkcs11-helper: PKCS-11 plugin' 'botan: botan plugin')
+
+  cd build
+  make DESTDIR="$pkgdir" install
+}
+

Copied: qca/repos/staging-x86_64/qca-fix-build-qt-prefix.patch (from rev 
351840, qca/trunk/qca-fix-build-qt-prefix.patch)
===
--- staging-x86_64/qca-fix-build-qt-prefix.patch
(rev 0)
+++ staging-x86_64/qca-fix-build-qt-prefix.patch2019-04-20 23:27:38 UTC 
(rev 351841)
@@ -0,0 +1,55 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -431,7 +431,6 @@
+ message("!! you MUST explicity define CMAKE_INSTALL_PREFIX !!")
+ message("")
+ message("${ESCAPE}[0m")
+-message(FATAL_ERROR "Aborting")
+   endif(QCA_INSTALL_IN_QT_PREFIX)
+ 
+   message("")
+diff --git a/cmake/modules/QcaMacro.cmake b/cmake/modules/QcaMacro.cmake
+--- a/cmake/modules/QcaMacro.cmake
 b/cmake/modules/QcaMacro.cmake
+@@ -11,14 +11,15 @@
+   ENDMACRO(QT4_GET_MOC_INC_DIRS)
+ 
+   MACRO(SETUP_QT5_DIRS)
+-EXECUTE_PROCESS( COMMAND $ ARGS "-query 
QT_INSTALL_LIBS" OUTPUT_VARIABLE QT_LIBRARY_DIR )
+-EXECUTE_PROCESS( COMMAND $ ARGS "-query 
QT_INSTALL_PREFIX" OUTPUT_VARIABLE QT_PREFIX_DIR )
+-EXECUTE_PROCESS( COMMAND $ ARGS "-query 
QT_INSTALL_PLUGINS" OUTPUT_VARIABLE QT_PLUGINS_DIR )
+-EXECUTE_PROCESS( COMMAND $ ARGS "-query 
QT_INSTALL_BINS" OUTPUT_VARIABLE QT_BINARY_DIR )
+-EXECUTE_PROCESS( COMMAND $ ARGS "-query 
QT_INSTALL_HEADERS" OUTPUT_VARIABLE QT_HEADERS_DIR )
+-EXECUTE_PROCESS( COMMAND $ ARGS "-query 
QT_INSTALL_DOCS" OUTPUT_VARIABLE QT_DOC_DIR )
+-EXECUTE_PROCESS( COMMAND $ ARGS "-query 
QT_INSTALL_DATA" OUTPUT_VARIABLE QT_DATA_DIR )
+-EXECUTE_PROCESS( COMMAND $ ARGS "-query 
QT_HOST_DATA" OUTPUT_VARIABLE QT_ARCHDATA_DIR )
++GET_TARGET_PROPERTY(QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} LOCATION)
++EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_LIBS" 
OUTPUT_VARIABLE QT_LIBRARY_DIR )
++EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_PREFIX" 
OUTPUT_VARIABLE QT_PREFIX_DIR )
++EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_PLUGINS" 
OUTPUT_VARIABLE QT_PLUGINS_DIR )
++EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_BINS" 
OUTPUT_VARIABLE QT_BINARY_DIR )
++EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_HEADERS" 
OUTPUT_VARIABLE QT_HEADERS_DIR )
++EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_DOCS" 
OUTPUT_VARIABLE QT_DOC_DIR )
++EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_DATA" 
OUTPUT_VARIABLE QT_DATA_DIR )
++EXEC_PROGRAM( ${QMAKE_EXECUTABLE} ARGS "-query QT_HOST_DATA" 
OUTPUT_VARIABLE QT_ARCHDATA_DIR )
+ SET( QT_MKSPECS_DIR "${QT_ARCHDATA_DIR}/mkspecs" )

[arch-commits] Commit in qca/repos (3 files)

2018-10-21 Thread Antonio Rojas via arch-commits
Date: Sunday, October 21, 2018 @ 16:05:12
  Author: arojas
Revision: 336957

archrelease: copy trunk to staging-x86_64

Added:
  qca/repos/staging-x86_64/
  qca/repos/staging-x86_64/PKGBUILD
(from rev 336956, qca/trunk/PKGBUILD)
  qca/repos/staging-x86_64/qca-openssl-1.1.patch
(from rev 336956, qca/trunk/qca-openssl-1.1.patch)

---+
 PKGBUILD  |   50 +
 qca-openssl-1.1.patch | 2036 
 2 files changed, 2086 insertions(+)

Copied: qca/repos/staging-x86_64/PKGBUILD (from rev 336956, qca/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2018-10-21 16:05:12 UTC (rev 336957)
@@ -0,0 +1,50 @@
+# Maintainer: Antonio Rojas 
+# Contributor: Andrea Scarpino 
+# Contributor: Pierre Schmitz 
+
+pkgname=qca
+pkgver=2.1.3
+pkgrel=2
+pkgdesc="Qt Cryptographic Architecture"
+arch=(x86_64)
+url="https://userbase.kde.org/QCA;
+license=(LGPL)
+depends=(qt5-base nss ca-certificates)
+optdepends=('pkcs11-helper: PKCS-11 plugin' 'botan: botan plugin')
+makedepends=(cmake doxygen pkcs11-helper botan)
+conflicts=(qca-qt5)
+provides=(qca-qt5)
+replaces=(qca-qt5)
+source=("http://download.kde.org/stable/$pkgname/$pkgver/src/$pkgname-$pkgver.tar.xz;
 qca-openssl-1.1.patch
+qca-botan2.patch::"https://cgit.kde.org/qca.git/patch/?id=47163784;)
+sha256sums=('003fd86a32421057a03b18a8168db52e2940978f9db5ebbb6a08882f8ab1e353'
+'b1505bc313fd2f4e350cd4c94af69256c901afa419ae6700b208cb6e40e6926d'
+'2b2c3103e47166eee46604288ba343b9ed1ccb957c54650e8eea770faab515e9')
+
+prepare() {
+  mkdir -p build
+
+  cd $pkgname-$pkgver
+  patch -p1 -i ../qca-openssl-1.1.patch # Fix build with OpenSSL 1.1 
https://bugs.kde.org/show_bug.cgi?id=379810
+  patch -p1 -i ../qca-botan2.patch  # Fix build with botan 2
+}
+
+build() {
+  cd build
+  cmake ../$pkgname-$pkgver \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DBUILD_TESTS=OFF \
+-DQCA_INSTALL_IN_QT_PREFIX=ON \
+-DQCA_MAN_INSTALL_DIR=/usr/share/man
+  make
+}
+
+package() {
+  depends=(qt5-base nss ca-certificates)
+  optdepends=('pkcs11-helper: PKCS-11 plugin' 'botan: botan plugin')
+
+  cd build
+  make DESTDIR="$pkgdir" install
+}
+
+

Copied: qca/repos/staging-x86_64/qca-openssl-1.1.patch (from rev 336956, 
qca/trunk/qca-openssl-1.1.patch)
===
--- staging-x86_64/qca-openssl-1.1.patch(rev 0)
+++ staging-x86_64/qca-openssl-1.1.patch2018-10-21 16:05:12 UTC (rev 
336957)
@@ -0,0 +1,2036 @@
+diff --git a/plugins/qca-ossl/CMakeLists.txt b/plugins/qca-ossl/CMakeLists.txt
+index cdeaeca..f7c5c1b 100644
+--- a/plugins/qca-ossl/CMakeLists.txt
 b/plugins/qca-ossl/CMakeLists.txt
+@@ -32,7 +32,7 @@ if(OPENSSL_FOUND)
+ message(WARNING "qca-ossl will be compiled without SHA-0 digest algorithm 
support")
+   endif(HAVE_OPENSSL_SHA0)
+ 
+-  set(QCA_OSSL_SOURCES qca-ossl.cpp)
++  set(QCA_OSSL_SOURCES libcrypto-compat.c qca-ossl.cpp)
+ 
+   my_automoc( QCA_OSSL_SOURCES )
+ 
+diff --git a/plugins/qca-ossl/libcrypto-compat.c 
b/plugins/qca-ossl/libcrypto-compat.c
+index e69de29..b587845 100644
+--- a/plugins/qca-ossl/libcrypto-compat.c
 b/plugins/qca-ossl/libcrypto-compat.c
+@@ -0,0 +1,410 @@
++/*
++ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
++ *
++ * Licensed under the OpenSSL license (the "License").  You may not use
++ * this file except in compliance with the License.  You can obtain a copy
++ * in the file LICENSE in the source distribution or at
++ * https://www.openssl.org/source/license.html
++ */
++
++#include 
++
++#if OPENSSL_VERSION_NUMBER < 0x1010L
++
++#include 
++#include 
++
++static void *OPENSSL_zalloc(size_t num)
++{
++void *ret = OPENSSL_malloc(num);
++
++if (ret != NULL)
++memset(ret, 0, num);
++return ret;
++}
++
++int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
++{
++/* If the fields n and e in r are NULL, the corresponding input
++ * parameters MUST be non-NULL for n and e.  d may be
++ * left NULL (in case only the public key is used).
++ */
++if ((r->n == NULL && n == NULL)
++|| (r->e == NULL && e == NULL))
++return 0;
++
++if (n != NULL) {
++BN_free(r->n);
++r->n = n;
++}
++if (e != NULL) {
++BN_free(r->e);
++r->e = e;
++}
++if (d != NULL) {
++BN_free(r->d);
++r->d = d;
++}
++
++return 1;
++}
++
++int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
++{
++/* If the fields p and q in r are NULL, the corresponding input
++ * parameters MUST be non-NULL.
++ */
++if ((r->p == NULL && p == NULL)
++|| (r->q == NULL && q == NULL))
++return 0;
++
++if (p != NULL) {
++BN_free(r->p);
++r->p = p;
++}
++if (q != 

[arch-commits] Commit in qca/repos (3 files)

2017-12-17 Thread Antonio Rojas via arch-commits
Date: Sunday, December 17, 2017 @ 12:46:18
  Author: arojas
Revision: 313250

archrelease: copy trunk to testing-x86_64

Added:
  qca/repos/testing-x86_64/
  qca/repos/testing-x86_64/PKGBUILD
(from rev 313249, qca/trunk/PKGBUILD)
  qca/repos/testing-x86_64/qca-openssl-1.1.patch
(from rev 313249, qca/trunk/qca-openssl-1.1.patch)

---+
 PKGBUILD  |   66 +
 qca-openssl-1.1.patch | 2036 
 2 files changed, 2102 insertions(+)

Copied: qca/repos/testing-x86_64/PKGBUILD (from rev 313249, qca/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2017-12-17 12:46:18 UTC (rev 313250)
@@ -0,0 +1,66 @@
+# $Id$
+# Maintainer: Antonio Rojas 
+# Contributor: Andrea Scarpino 
+# Contributor: Pierre Schmitz 
+
+pkgbase=qca
+pkgname=(qca-qt4 qca-qt5)
+pkgver=2.1.3
+pkgrel=6
+pkgdesc="Qt Cryptographic Architecture"
+arch=(x86_64)
+url="http://delta.affinix.com/qca/;
+license=(LGPL)
+makedepends=(qt4 qt5-base cmake doxygen nss pkcs11-helper botan1.10)
+source=("http://download.kde.org/stable/$pkgbase/$pkgver/src/$pkgbase-$pkgver.tar.xz;
 qca-openssl-1.1.patch)
+sha256sums=('003fd86a32421057a03b18a8168db52e2940978f9db5ebbb6a08882f8ab1e353'
+'b1505bc313fd2f4e350cd4c94af69256c901afa419ae6700b208cb6e40e6926d')
+
+prepare() {
+  mkdir -p build{4,5}
+
+  cd $pkgbase-$pkgver
+  patch -p1 -i ../qca-openssl-1.1.patch # Fix build with OpenSSL 1.1 
https://bugs.kde.org/show_bug.cgi?id=379810
+}
+
+build() {
+  cd build4
+  cmake ../$pkgbase-$pkgver \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DCMAKE_BUILD_TYPE=Release \
+-DBUILD_TESTS=OFF \
+-DQCA_LIBRARY_INSTALL_DIR=/usr/lib \
+-DQCA_FEATURE_INSTALL_DIR=/usr/share/qt4/mkspecs/features/ \
+-DQT4_BUILD=ON
+  make
+
+  cd ../build5
+  cmake ../$pkgbase-$pkgver \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DCMAKE_BUILD_TYPE=Release \
+-DBUILD_TESTS=OFF \
+-DQCA_INSTALL_IN_QT_PREFIX=ON \
+-DQCA_MAN_INSTALL_DIR=/usr/share/man
+  make
+}
+
+package_qca-qt4() {
+  depends=(qt4 nss)
+  optdepends=('pkcs11-helper: PKCS-11 plugin' 'botan1.10: botan plugin')
+  conflicts=(qca qca-gnupg qca-ossl)
+  provides=(qca qca-gnupg qca-ossl)
+  replaces=(qca qca-gnupg qca-ossl)
+
+  cd build4
+  make DESTDIR="$pkgdir" install
+}
+
+package_qca-qt5() {
+  depends=(qt5-base nss ca-certificates)
+  optdepends=('pkcs11-helper: PKCS-11 plugin' 'botan1.10: botan plugin')
+
+  cd build5
+  make DESTDIR="$pkgdir" install
+}
+
+

Copied: qca/repos/testing-x86_64/qca-openssl-1.1.patch (from rev 313249, 
qca/trunk/qca-openssl-1.1.patch)
===
--- testing-x86_64/qca-openssl-1.1.patch(rev 0)
+++ testing-x86_64/qca-openssl-1.1.patch2017-12-17 12:46:18 UTC (rev 
313250)
@@ -0,0 +1,2036 @@
+diff --git a/plugins/qca-ossl/CMakeLists.txt b/plugins/qca-ossl/CMakeLists.txt
+index cdeaeca..f7c5c1b 100644
+--- a/plugins/qca-ossl/CMakeLists.txt
 b/plugins/qca-ossl/CMakeLists.txt
+@@ -32,7 +32,7 @@ if(OPENSSL_FOUND)
+ message(WARNING "qca-ossl will be compiled without SHA-0 digest algorithm 
support")
+   endif(HAVE_OPENSSL_SHA0)
+ 
+-  set(QCA_OSSL_SOURCES qca-ossl.cpp)
++  set(QCA_OSSL_SOURCES libcrypto-compat.c qca-ossl.cpp)
+ 
+   my_automoc( QCA_OSSL_SOURCES )
+ 
+diff --git a/plugins/qca-ossl/libcrypto-compat.c 
b/plugins/qca-ossl/libcrypto-compat.c
+index e69de29..b587845 100644
+--- a/plugins/qca-ossl/libcrypto-compat.c
 b/plugins/qca-ossl/libcrypto-compat.c
+@@ -0,0 +1,410 @@
++/*
++ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
++ *
++ * Licensed under the OpenSSL license (the "License").  You may not use
++ * this file except in compliance with the License.  You can obtain a copy
++ * in the file LICENSE in the source distribution or at
++ * https://www.openssl.org/source/license.html
++ */
++
++#include 
++
++#if OPENSSL_VERSION_NUMBER < 0x1010L
++
++#include 
++#include 
++
++static void *OPENSSL_zalloc(size_t num)
++{
++void *ret = OPENSSL_malloc(num);
++
++if (ret != NULL)
++memset(ret, 0, num);
++return ret;
++}
++
++int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
++{
++/* If the fields n and e in r are NULL, the corresponding input
++ * parameters MUST be non-NULL for n and e.  d may be
++ * left NULL (in case only the public key is used).
++ */
++if ((r->n == NULL && n == NULL)
++|| (r->e == NULL && e == NULL))
++return 0;
++
++if (n != NULL) {
++BN_free(r->n);
++r->n = n;
++}
++if (e != NULL) {
++BN_free(r->e);
++r->e = e;
++}
++if (d != NULL) {
++BN_free(r->d);
++r->d = d;
++}
++
++return 1;
++}
++
++int RSA_set0_factors(RSA