mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
qca: add recipe and patch for version 2.1.1
This commit is contained in:
77
app-crypt/qca/patches/qca-2.1.1.patchset
Normal file
77
app-crypt/qca/patches/qca-2.1.1.patchset
Normal file
@@ -0,0 +1,77 @@
|
||||
From fc1d9a0c193fbe837e386e4d3b0dd3db296f354b Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Tue, 13 Oct 2015 12:07:31 +0300
|
||||
Subject: QCA2: fix compilation on Haiku/GCC4.
|
||||
|
||||
|
||||
diff --git a/plugins/qca-ossl/qca-ossl.cpp b/plugins/qca-ossl/qca-ossl.cpp
|
||||
index cfb1e9f..95b2bc4 100644
|
||||
--- a/plugins/qca-ossl/qca-ossl.cpp
|
||||
+++ b/plugins/qca-ossl/qca-ossl.cpp
|
||||
@@ -5805,7 +5805,7 @@ public:
|
||||
{
|
||||
SessionInfo sessInfo;
|
||||
|
||||
- sessInfo.isCompressed = (0 != SSL_SESSION_get_compress_id(ssl->session));
|
||||
+ sessInfo.isCompressed = (0 != ssl->session->compress_meth);
|
||||
|
||||
if (ssl->version == TLS1_VERSION)
|
||||
sessInfo.version = TLS::TLS_v1;
|
||||
diff --git a/src/botantools/botan/ml_unix/mlock.cpp b/src/botantools/botan/ml_unix/mlock.cpp
|
||||
index 109609c..c88b23b 100644
|
||||
--- a/src/botantools/botan/ml_unix/mlock.cpp
|
||||
+++ b/src/botantools/botan/ml_unix/mlock.cpp
|
||||
@@ -52,7 +52,9 @@ namespace Botan {
|
||||
*************************************************/
|
||||
void lock_mem(void* ptr, u32bit bytes)
|
||||
{
|
||||
+ #ifndef __HAIKU__
|
||||
mlock(ptr, bytes);
|
||||
+ #endif
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
@@ -60,7 +62,9 @@ void lock_mem(void* ptr, u32bit bytes)
|
||||
*************************************************/
|
||||
void unlock_mem(void* ptr, u32bit bytes)
|
||||
{
|
||||
+ #ifndef __HAIKU__
|
||||
munlock(ptr, bytes);
|
||||
+ #endif
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/src/qca_tools.cpp b/src/qca_tools.cpp
|
||||
index cef2b79..44357c0 100644
|
||||
--- a/src/qca_tools.cpp
|
||||
+++ b/src/qca_tools.cpp
|
||||
@@ -44,11 +44,13 @@ static bool can_lock()
|
||||
#endif
|
||||
|
||||
MLOCK_TYPE d = MLOCK_TYPE_CAST malloc(256);
|
||||
+ #ifndef __HAIKU__
|
||||
if(mlock(d, 256) == 0)
|
||||
{
|
||||
munlock(d, 256);
|
||||
ok = true;
|
||||
}
|
||||
+ #endif
|
||||
free(d);
|
||||
return ok;
|
||||
#else
|
||||
diff --git a/src/support/console.cpp b/src/support/console.cpp
|
||||
index c3c5570..0d5c5d2 100644
|
||||
--- a/src/support/console.cpp
|
||||
+++ b/src/support/console.cpp
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifdef Q_OS_WIN
|
||||
# include <windows.h>
|
||||
#else
|
||||
-# ifdef Q_OS_ANDROID
|
||||
+# if defined(Q_OS_ANDROID) || defined(Q_OS_HAIKU)
|
||||
# include <termios.h>
|
||||
# else
|
||||
# include <sys/termios.h>
|
||||
--
|
||||
2.2.2
|
||||
|
||||
91
app-crypt/qca/qca-2.1.1.recipe
Normal file
91
app-crypt/qca/qca-2.1.1.recipe
Normal file
@@ -0,0 +1,91 @@
|
||||
SUMMARY="Qt Cryptographic Architecture"
|
||||
DESCRIPTION="QCA aims to provide a straightforward and cross-platform \
|
||||
crypto API, using Qt datatypes and conventions. QCA separates the API from \
|
||||
the implementation, using plugins known as Providers. The advantage of this \
|
||||
model is to allow applications to avoid linking to or explicitly depending \
|
||||
on any particular cryptographic library. This allows one to easily change or \
|
||||
upgrade crypto implementations without even needing to recompile the \
|
||||
application!"
|
||||
HOMEPAGE="http://delta.affinix.com/qca/"
|
||||
SOURCE_URI="http://download.kde.org/stable/qca/2.1.1/src/qca-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="95de3e7910b5f9ec7084169989c9d98bfb527e6a4865fe17269c3b24308be983"
|
||||
SOURCE_DIR="qca-$portVersion"
|
||||
REVISION="1"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
COPYRIGHT="2003-2015 Justin Karneges"
|
||||
|
||||
PATCHES="qca-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
qca2$secondaryArchSuffix = $portVersion
|
||||
cmd:mozcerts_qt5$secondaryArchSuffix = $portVersion
|
||||
cmd:qcatool_qt5$secondaryArchSuffix = $portVersion
|
||||
cmd:qcatool2$secondaryArchSuffix = $portVersion
|
||||
lib:libqca$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
PROVIDES_devel="
|
||||
libqca${secondaryArchSuffix}_devel
|
||||
devel:libqca$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libqca_qt5_x86$secondaryArchSuffix
|
||||
ca_root_certificates
|
||||
"
|
||||
REQUIRES_devel="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
qca2$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:which
|
||||
cmd:cmake
|
||||
cmd:make
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libqt5$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libgsasl$secondaryArchSuffix
|
||||
devel:libnss3$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
#TODO: remove when Qt5 package is fixed
|
||||
export Qt5Core_DIR=/system/data/cmake/Modules/Qt5Core
|
||||
export Qt5Network_DIR=/system/data/cmake/Modules/Qt5Network
|
||||
export Qt5Test_DIR=/system/data/cmake/Modules/Qt5Test
|
||||
|
||||
export QC_CERTSTORE_PATH=/system/data/ssl/CARootCertificates.pem
|
||||
|
||||
cmake . -DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DQCA_PLUGINS_INSTALL_DIR=$libDir \
|
||||
-DQCA_BINARY_INSTALL_DIR=$binDir \
|
||||
-DQCA_LIBRARY_INSTALL_DIR=$libDir \
|
||||
-DQCA_FEATURE_INSTALL_DIR=$dataDir/Qt/mkspecs/features \
|
||||
-DQCA_INCLUDE_INSTALL_DIR=$includeDir \
|
||||
-DQCA_PRIVATE_INCLUDE_INSTALL_DIR=$includeDir \
|
||||
-DQCA_DOC_INSTALL_DIR=$docDir \
|
||||
-DQCA_MAN_INSTALL_DIR=$manDir \
|
||||
-DPKGCONFIG_INSTALL_PREFIX=$developLibDir/pkgconfig
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
rm -f bin/qcatool2.debug
|
||||
rm -f lib/libqca.so.2.0.3.debug
|
||||
|
||||
make install
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$dataDir/Qt/mkspecs
|
||||
}
|
||||
Reference in New Issue
Block a user