[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/qca/plugins
From: Justin Karneges <infiniti () affinix ! com>
Date: 2007-03-31 20:15:01
Message-ID: 1175372101.145267.11590.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 648608 by infiniti:
openssl and gnupg plugins now support build modes
A qca-gnupg/buildmode.qcm
M +7 -3 qca-gnupg/qca-gnupg.pro
M +3 -0 qca-gnupg/qca-gnupg.qc
M +47 -10 qca-gnupg/qca.qcm
A qca-openssl/buildmode.qcm
M +2 -1 qca-openssl/qca-openssl.cpp
M +7 -3 qca-openssl/qca-openssl.pro
M +4 -0 qca-openssl/qca-openssl.qc
M +29 -6 qca-openssl/qca.qcm
--- trunk/kdesupport/qca/plugins/qca-gnupg/qca-gnupg.pro #648607:648608
@@ -1,11 +1,10 @@
-#CONFIG += release
-CONFIG += debug
-
TEMPLATE = lib
CONFIG += plugin
QT -= gui
CONFIG += crypto
+VERSION = 0.0.1
+
windows:LIBS += -ladvapi32
GPG_BASE = .
@@ -20,3 +19,8 @@
$$GPG_BASE/qca-gnupg.cpp
include(conf.pri)
+
+CONFIG(debug, debug|release) {
+ unix:TARGET = $$join(TARGET,,,_debug)
+ else:TARGET = $$join(TARGET,,,d)
+}
--- trunk/kdesupport/qca/plugins/qca-gnupg/qca-gnupg.qc #648607:648608
@@ -2,6 +2,9 @@
<name>qca-gnupg</name>
<profile>qca-gnupg.pro</profile>
<noprefix/>
+ <dep type='buildmode'>
+ <required/>
+ </dep>
<dep type='qca'>
<required/>
</dep>
--- trunk/kdesupport/qca/plugins/qca-gnupg/qca.qcm #648607:648608
@@ -1,6 +1,7 @@
/*
-----BEGIN QCMOD-----
name: QCA 2.0
+arg: in-tree-build,Build with uninstalled QCA, only useful for SVN users.
-----END QCMOD-----
*/
@@ -15,27 +16,63 @@
QString shortname() const { return "qca"; }
bool exec()
{
+ // get the build mode
+#ifdef BUILDMODE
+ bool release = buildmode_release;
+ bool debug = buildmode_debug;
+#else
+ // else, default to just release mode
+ bool release = true;
+ bool debug = false;
+#endif
+
// test for "crypto" feature and check qca version number
+ QString arg;
+ arg = conf->getenv("QC_IN_TREE_BUILD");
- QString proextra =
- "CONFIG += qt crypto\n"
- "QT -= gui\n";
-
+ QString proextra;
+ if (!arg.isEmpty()) {
+ proextra =
+ "CONFIG += qt \n"
+ "QT -= gui\n"
+ "INCLUDEPATH += ../../../../include/QtCrypto \n"
+ "LIBS += -L../../../../lib -lqca \n";
+ } else {
+ proextra =
+ "CONFIG += qt crypto\n"
+ "QT -= gui\n";
+ }
QString str =
"#include <QtCrypto>\n"
"\n"
"int main()\n"
"{\n"
" unsigned long x = QCA_VERSION;\n"
- " if(x >= 0x020000) return 0; else return 1;\n"
+ " if(x >= 0x016363) return 0; else return 1;\n"
"}\n";
- int ret;
- if(!conf->doCompileAndLink(str, QStringList(), QString(), proextra, &ret))
- return false;
- if(ret != 0)
- return false;
+ if(release)
+ {
+ int ret;
+ if(!conf->doCompileAndLink(str, QStringList(), QString(), proextra + "CONFIG += release\n", &ret))
+ return false;
+ if(ret != 0)
+ return false;
+ }
+ if(debug)
+ {
+ int ret;
+ if(!conf->doCompileAndLink(str, QStringList(), QString(), proextra + "CONFIG += debug\n", &ret))
+ return false;
+ if(ret != 0)
+ return false;
+ }
+
+ if (!arg.isEmpty()) {
+ conf->addIncludePath("../../include/QtCrypto");
+ conf->addLib("-L../../lib -lqca");
+ }
return true;
}
};
--- trunk/kdesupport/qca/plugins/qca-openssl/qca-openssl.cpp #648607:648608
@@ -2367,7 +2367,8 @@
unsigned char *p, *tmps = NULL;
const unsigned char *s = NULL;
- int i,j;//,ret=1;
+ int i,j;
+ j = 0;
if(type == NID_md5_sha1)
{
--- trunk/kdesupport/qca/plugins/qca-openssl/qca-openssl.pro #648607:648608
@@ -1,11 +1,10 @@
-#CONFIG += release
-CONFIG += debug
-
TEMPLATE = lib
CONFIG += plugin
QT -= gui
CONFIG += crypto
+VERSION = 0.0.1
+
SOURCES = qca-openssl.cpp
#SOURCES += main.cpp
@@ -21,3 +20,8 @@
}
include(conf.pri)
+
+CONFIG(debug, debug|release) {
+ unix:TARGET = $$join(TARGET,,,_debug)
+ else:TARGET = $$join(TARGET,,,d)
+}
--- trunk/kdesupport/qca/plugins/qca-openssl/qca-openssl.qc #648607:648608
@@ -2,6 +2,10 @@
<name>qca-openssl</name>
<profile>qca-openssl.pro</profile>
<noprefix/>
+ <lib/>
+ <dep type='buildmode'>
+ <required/>
+ </dep>
<dep type='qca'>
<required/>
</dep>
--- trunk/kdesupport/qca/plugins/qca-openssl/qca.qcm #648607:648608
@@ -16,6 +16,16 @@
QString shortname() const { return "qca"; }
bool exec()
{
+ // get the build mode
+#ifdef BUILDMODE
+ bool release = buildmode_release;
+ bool debug = buildmode_debug;
+#else
+ // else, default to just release mode
+ bool release = true;
+ bool debug = false;
+#endif
+
// test for "crypto" feature and check qca version number
QString arg;
arg = conf->getenv("QC_IN_TREE_BUILD");
@@ -38,14 +48,27 @@
"int main()\n"
"{\n"
" unsigned long x = QCA_VERSION;\n"
- " if(x >= 0x020000) return 0; else return 1;\n"
+ " if(x >= 0x016363) return 0; else return 1;\n"
"}\n";
- int ret;
- if(!conf->doCompileAndLink(str, QStringList(), QString(), proextra, &ret))
- return false;
- if(ret != 0)
- return false;
+ if(release)
+ {
+ int ret;
+ if(!conf->doCompileAndLink(str, QStringList(), QString(), proextra + "CONFIG += release\n", &ret))
+ return false;
+ if(ret != 0)
+ return false;
+ }
+
+ if(debug)
+ {
+ int ret;
+ if(!conf->doCompileAndLink(str, QStringList(), QString(), proextra + "CONFIG += debug\n", &ret))
+ return false;
+ if(ret != 0)
+ return false;
+ }
+
if (!arg.isEmpty()) {
conf->addIncludePath("../../include/QtCrypto");
conf->addLib("-L../../lib -lqca");
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic