<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[145253] trunk/dports/devel</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/145253">145253</a></dd>
<dt>Author</dt> <dd>michaelld@macports.org</dd>
<dt>Date</dt> <dd>2016-01-29 12:46:25 -0800 (Fri, 29 Jan 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>qca: move all plugins into subports of qca; make qca-tls obsolete since it requires qt3.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsdevelqcaPortfile">trunk/dports/devel/qca/Portfile</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsdevelqcafilespatchCMakeListstxt_pluginsdiff">trunk/dports/devel/qca/files/patch-CMakeLists.txt_plugins.diff</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li>trunk/dports/devel/qca-cyrus-sasl/</li>
<li>trunk/dports/devel/qca-gnupg/</li>
<li>trunk/dports/devel/qca-ossl/</li>
<li>trunk/dports/devel/qca-tls/</li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsdevelqcaPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/devel/qca/Portfile (145252 => 145253)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/qca/Portfile        2016-01-29 20:43:50 UTC (rev 145252)
+++ trunk/dports/devel/qca/Portfile        2016-01-29 20:46:25 UTC (rev 145253)
</span><span class="lines">@@ -3,6 +3,7 @@
</span><span class="cx">
</span><span class="cx"> PortSystem 1.0
</span><span class="cx"> PortGroup cmake 1.0
</span><ins>+PortGroup active_variants 1.1
</ins><span class="cx">
</span><span class="cx"> name qca
</span><span class="cx"> version 2.1.0
</span><span class="lines">@@ -11,12 +12,13 @@
</span><span class="cx"> categories devel crypto security
</span><span class="cx"> maintainers michaelld openmaintainer
</span><span class="cx"> license LGPL-2.1
</span><del>-description Qt Cryptographic Architecture
-long_description \
- Qt Cryptographic Architecture provides an easy API for the following \
- features: SSL/TLS, X509, SASL, RSA, Hashing (SHA1, MD5), Ciphers \
- (BlowFish, 3DES, AES). Functionality is supplied via plugins.
</del><span class="cx">
</span><ins>+default description "Qt Cryptographic Architecture"
+default long_description \
+ "Qt Cryptographic Architecture provides an easy API for the following \
+ features: SSL/TLS, X509, SASL, RSA, Hashing (SHA1, MD5), Ciphers \
+ (BlowFish, 3DES, AES). Functionality is supplied via plugins."
+
</ins><span class="cx"> platforms darwin
</span><span class="cx">
</span><span class="cx"> homepage http://delta.affinix.com/qca/
</span><span class="lines">@@ -29,29 +31,31 @@
</span><span class="cx">
</span><span class="cx"> cmake.out_of_source yes
</span><span class="cx">
</span><del>-# temporary patch to add including QIODevice to qca_basic.h
</del><ins>+if {${name} eq ${subport}} {
</ins><span class="cx">
</span><del>-patchfiles-append patch-include_QtCrypto_qca_basic.h.diff
</del><ins>+ # temporary patch to add including QIODevice to qca_basic.h
</ins><span class="cx">
</span><del>-# fix install directories for certs and cmake files
</del><ins>+ patchfiles-append patch-include_QtCrypto_qca_basic.h.diff
</ins><span class="cx">
</span><del>-patchfiles-append patch-CMakeLists.txt.diff
</del><ins>+ # fix install directories for certs and cmake files
</ins><span class="cx">
</span><del>-# remove unnecessary Carbon #include, which fails on 10.8
</del><ins>+ patchfiles-append patch-CMakeLists.txt.diff
</ins><span class="cx">
</span><del>-patchfiles-append patch-src_qac_systemstore_mac.cpp.diff
</del><ins>+ # remove unnecessary Carbon #include, which fails on 10.8
</ins><span class="cx">
</span><del>-# Qt variants
</del><ins>+ patchfiles-append patch-src_qac_systemstore_mac.cpp.diff
</ins><span class="cx">
</span><del>-variant qt4 conflicts qt5 description "Build with qt4" {
- PortGroup qt4 1.0
- configure.args-append -DQT4_BUILD=ON
</del><ins>+} else {
+ # fix top-level CMakeLists.txt to build just plugins
+ patchfiles-append patch-CMakeLists.txt_plugins.diff
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-variant qt5 conflicts qt4 description "Build with qt5" {
- PortGroup qt5 1.0
-}
</del><ins>+# Qt variants
</ins><span class="cx">
</span><ins>+variant qt4 conflicts qt5 description "Build with qt4" {}
+
+variant qt5 conflicts qt4 description "Build with qt5" {}
+
</ins><span class="cx"> if {![variant_isset qt4] && ![variant_isset qt5]} {
</span><span class="cx"> default_variants +qt4
</span><span class="cx"> }
</span><span class="lines">@@ -59,34 +63,58 @@
</span><span class="cx"> # make sure -qt4 wasn't specified alone
</span><span class="cx">
</span><span class="cx"> if {![variant_isset qt4] && ![variant_isset qt5]} {
</span><del>- ui_error "\n\nYou must select either the +qt4 or +qt5 variant to build ${name}\n"
</del><ins>+ ui_error "\n\nYou must select either the +qt4 or +qt5 variant to build ${subport}\n"
</ins><span class="cx"> return -code error "Invalid variant selection"
</span><span class="cx"> }
</span><span class="cx">
</span><del>-# set install directory for mkspec files
-
-pre-configure {
- configure.args-append \
- -DQCA_FEATURE_INSTALL_DIR=${qt_mkspecs_dir}
</del><ins>+if {${name} eq ${subport}} {
+ if {[variant_isset qt4]} {
+ PortGroup qt4 1.0
+ configure.args-append -DQT4_BUILD=ON
+ } else {
+ PortGroup qt5 1.0
+ }
+} else {
+ # require qca to also have the selected Qt variant
+ if {[variant_isset qt4]} {
+ PortGroup qt4 1.0
+ require_active_variants port:qca qt4
+ } else {
+ PortGroup qt5 1.0
+ require_active_variants port:qca qt5
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-# build as a framework
</del><ins>+# set install directory for mkspec files
</ins><span class="cx">
</span><span class="cx"> configure.args-append \
</span><del>- -DOSX_FRAMEWORK=YES
</del><ins>+ -DQCA_FEATURE_INSTALL_DIR=${qt_mkspecs_dir}
</ins><span class="cx">
</span><span class="cx"> # specify various configure options
</span><span class="cx">
</span><span class="cx"> configure.args-append \
</span><del>- -DBUILD_PLUGINS=NO \
</del><span class="cx"> -DQCA_INSTALL_IN_QT_PREFIX=NO \
</span><del>- -DQCA_MAN_INSTALL_DIR=${prefix}/share/man \
- -DQCA_LIBRARY_INSTALL_DIR=${frameworks_dir} \
- -DCMAKE_MODULES_DIR=${prefix}/share/cmake \
- -DPKGCONFIG_INSTALL_PREFIX=${prefix}/lib/pkgconfig \
- -DQCA_PLUGINS_INSTALL_DIR=${prefix}/share/${name}/plugins \
- -DQCA_DOC_INSTALL_DIR=${prefix}/share/${name}/doc
</del><ins>+ -DQCA_PLUGINS_INSTALL_DIR=${prefix}/share/${name}/plugins
</ins><span class="cx">
</span><ins>+if {${name} eq ${subport}} {
+
+ # build as a framework
+
+ configure.args-append \
+ -DOSX_FRAMEWORK=YES
+
+ # specify various configure options
+
+ configure.args-append \
+ -DBUILD_PLUGINS=NO \
+ -DQCA_MAN_INSTALL_DIR=${prefix}/share/man \
+ -DQCA_LIBRARY_INSTALL_DIR=${frameworks_dir} \
+ -DCMAKE_MODULES_DIR=${prefix}/share/cmake \
+ -DPKGCONFIG_INSTALL_PREFIX=${prefix}/lib/pkgconfig \
+ -DQCA_DOC_INSTALL_DIR=${prefix}/share/${name}/doc
+
+}
+
</ins><span class="cx"> # allow ccache, if specified by the user
</span><span class="cx">
</span><span class="cx"> pre-build {
</span><span class="lines">@@ -97,48 +125,98 @@
</span><span class="cx">
</span><span class="cx"> post-destroot {
</span><span class="cx">
</span><del>- # install docs
</del><ins>+ if {${name} eq ${subport}} {
</ins><span class="cx">
</span><del>- xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
- xinstall -m 644 -W ${worksrcpath} COPYING README TODO \
- ${destroot}${prefix}/share/doc/${name}
</del><ins>+ # install docs
</ins><span class="cx">
</span><del>- # get qca's version numbers
</del><ins>+ xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
+ xinstall -m 644 -W ${worksrcpath} COPYING README TODO \
+ ${destroot}${prefix}/share/doc/${name}
</ins><span class="cx">
</span><del>- set qca_vers [split ${version} "."]
- set qca_major [lindex ${qca_vers} 0]
- set qca_minor [lindex ${qca_vers} 1]
- set qca_patch [lindex ${qca_vers} 2]
</del><ins>+ # get qca's version numbers
</ins><span class="cx">
</span><del>- # link includes and libraries for each actual installed framework
</del><ins>+ set qca_vers [split ${version} "."]
+ set qca_major [lindex ${qca_vers} 0]
+ set qca_minor [lindex ${qca_vers} 1]
+ set qca_patch [lindex ${qca_vers} 2]
</ins><span class="cx">
</span><del>- set tf_full ${frameworks_dir}/qca.framework/Versions/${version}
</del><ins>+ # link includes and libraries for each actual installed framework
</ins><span class="cx">
</span><del>- # link headers into ${prefix}/include, removing
- # directories if they are already there first
</del><ins>+ set tf_full ${frameworks_dir}/qca.framework/Versions/${version}
</ins><span class="cx">
</span><del>- set dr_inc_file ${destroot}${prefix}/include
- ln -s ${tf_full}/Headers ${dr_inc_file}/qca
- ln -s ${tf_full}/Headers ${dr_inc_file}/QtCrypto
</del><ins>+ # link headers into ${prefix}/include, removing
+ # directories if they are already there first
</ins><span class="cx">
</span><del>- # link libraries into ${dr_libs_dir}, all 4 number variants
</del><ins>+ set dr_inc_file ${destroot}${prefix}/include
+ ln -s ${tf_full}/Headers ${dr_inc_file}/qca
+ ln -s ${tf_full}/Headers ${dr_inc_file}/QtCrypto
</ins><span class="cx">
</span><del>- set dr_libs_dir ${destroot}${prefix}/lib
- ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.dylib
- ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.dylib
- ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.${qca_minor}.dylib
- ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.${qca_minor}.${qca_patch}.dylib
</del><ins>+ # link libraries into ${dr_libs_dir}, all 4 number variants
</ins><span class="cx">
</span><ins>+ set dr_libs_dir ${destroot}${prefix}/lib
+ ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.dylib
+ ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.dylib
+ ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.${qca_minor}.dylib
+ ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.${qca_minor}.${qca_patch}.dylib
+
+ }
+
+ variant examples description {Include examples in install} {
+ post-destroot {
+ xinstall -d -m 755 ${destroot}${prefix}/share/examples/${name}
+ eval file copy [glob ${worksrcpath}/examples/*] \
+ ${destroot}${prefix}/share/examples/${name}
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-variant examples description {Include examples in install} {
- post-destroot {
- xinstall -d -m 755 ${destroot}${prefix}/share/examples/${name}
- eval file copy [glob ${worksrcpath}/examples/*] \
- ${destroot}${prefix}/share/examples/${name}
</del><ins>+array set bindings {
+ botan {port:botan botan}
+ cyrus-sasl {port:cyrus-sasl2 cyrus-sasl}
+ gcrypt {port:libgcrypt gcrypt}
+ gnupg {port:gnupg gnupg}
+ logger {"" logger}
+ nss {port:nss nss}
+ ossl {path:lib/libssl.dylib:openssl ossl}
+ softstore {"" softstore}
+}
+# pkcs11 {port:pkcs11 pkcs11}
+array set prettynames {
+ botan Botan cyrus-sasl Cyrus-SASL gcrypt GCrypt
+ gnupg GNUPG logger Logger nss NSS
+ ossl OpenSSL pkcs11 pkcs11 softstore SoftStore
+}
+
+options qca.plugin
+default qca.plugin ""
+
+foreach plugin [lsort [array names bindings]] {
+ set arg [lindex $bindings($plugin) 1]
+ set arg_name [lindex [split ${arg} =] 0]
+ subport qca-${plugin} {
+ if {[lindex $bindings($plugin) 0] ne ""} {
+ depends_lib-append [lindex $bindings($plugin) 0]
+ }
+ configure.args-append -DWITH_${arg}_PLUGIN=ON
+ qca.plugin ${arg_name}
</ins><span class="cx"> }
</span><ins>+ if {${qca.plugin} != ${arg_name}} {
+ configure.args-append -DWITH_${arg_name}_PLUGIN=OFF
+ }
</ins><span class="cx"> }
</span><ins>+if {${qca.plugin} ne ""} {
+ description $prettynames(${qca.plugin}) plugin for ${name}
+ long_description \
+ Qt Cryptographic Architecture. This is the \
+ $prettynames(${qca.plugin}) plugin.
+ depends_lib-append port:qca
+ livecheck.type none
+} else {
+ livecheck.type regex
+ livecheck.url ${homepage}
+ livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
+}
</ins><span class="cx">
</span><del>-livecheck.type regex
-livecheck.url ${homepage}
-livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
</del><ins>+subport qca-tls {
+ PortGroup obsolete 1.0
+}
</ins></span></pre></div>
<a id="trunkdportsdevelqcafilespatchCMakeListstxt_pluginsdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/qca/files/patch-CMakeLists.txt_plugins.diff (0 => 145253)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/qca/files/patch-CMakeLists.txt_plugins.diff         (rev 0)
+++ trunk/dports/devel/qca/files/patch-CMakeLists.txt_plugins.diff        2016-01-29 20:46:25 UTC (rev 145253)
</span><span class="lines">@@ -0,0 +1,351 @@
</span><ins>+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -6,30 +6,27 @@ if(NOT CMAKE_INSTALL_PREFIX)
+ unset(CMAKE_INSTALL_PREFIX CACHE)
+ endif(NOT CMAKE_INSTALL_PREFIX)
+
+-project(qca)
++project(qca-plugins)
+
+ cmake_minimum_required(VERSION 2.6.0)
+
+ set(QCA_LIB_MAJOR_VERSION "2")
+ set(QCA_LIB_MINOR_VERSION "1")
+ set(QCA_LIB_PATCH_VERSION "0")
++set(QCA_LIB_VERSION ${QCA_LIB_MAJOR_VERSION}.${QCA_LIB_MINOR_VERSION}.${QCA_LIB_PATCH_VERSION})
+
+ # Do not automatically link Qt executables to qtmain target on Windows.
+ # QCA exucatables use console mode only. Not need to link against
+ # qtmain.lib.
+ cmake_policy(SET CMP0020 OLD)
+
+-option(BUILD_TESTS "Create test" ON)
+-option(BUILD_TOOLS "Compile mozcerts and qcatool" ON)
+-set(BUILD_PLUGINS "auto" CACHE STRING "Plugins for building (also possible values: none, all and auto)")
+-option(BUILD_SHARED_LIBS "Build shared library" ON)
+-option(DEVELOPER_MODE "Special developer mode" OFF)
++find_package(Qca ${QCA_LIB_VERSION} EXACT REQUIRED)
++get_property(QCA_INCLUDE_DIRS TARGET qca PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
++get_property(QCA_LIBRARY TARGET qca PROPERTY IMPORTED_LOCATION_RELEASE)
++set(QCA_LIB_NAME ${QCA_LIBRARY})
++include_directories(${QCA_INCLUDE_DIRS})
+
+-if(APPLE)
+- option(OSX_FRAMEWORK "Build a Mac OS X Framework" ON)
+-else()
+- set(OSX_FRAMEWORK OFF)
+-endif()
++set(BUILD_PLUGINS "none" CACHE STRING "Plugins for building (also possible values: none, all and auto)")
+
+ find_package(Doxygen)
+
+@@ -75,32 +72,7 @@ else()
+ set(QCA_QT_PC_VERSION "QtCore")
+ endif()
+
+-# QCA can be shared but plugins will be static
+-# if Qt is static.
+-if(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC)
+- set(STATIC_PLUGINS ON)
+- add_definitions(-DQT_STATICPLUGIN)
+- set(PLUGIN_TYPE "STATIC")
+-else(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC)
+- set(PLUGIN_TYPE "MODULE")
+-endif(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC)
+-
+-set(QCA_SUFFIX "" CACHE STRING "QCA common suffix")
+-if(QCA_SUFFIX)
+- set(QCA_LIB_NAME qca-${QCA_SUFFIX})
+- set(QCA_TOOL_NAME qcatool-${QCA_SUFFIX})
+- set(MOZCERTS_NAME mozcerts-${QCA_SUFFIX})
+- set(QCA_PC_NAME qca2-${QCA_SUFFIX}.pc)
+-else(QCA_SUFFIX)
+- set(QCA_LIB_NAME qca)
+- set(QCA_TOOL_NAME qcatool)
+- set(MOZCERTS_NAME mozcerts)
+- set(QCA_PC_NAME qca2.pc)
+-endif(QCA_SUFFIX)
+-
+-set(QCA_LIB_VERSION_STRING "${QCA_LIB_MAJOR_VERSION}.${QCA_LIB_MINOR_VERSION}.${QCA_LIB_PATCH_VERSION}")
+-
+-configure_file("include/QtCrypto/qca_version.h.in" "${CMAKE_BINARY_DIR}/qca_version.h")
++set(PLUGIN_TYPE "MODULE")
+
+ if (WIN32)
+ set(CMAKE_DEBUG_POSTFIX "d")
+@@ -118,9 +90,6 @@ if (CMAKE_COMPILER_IS_GNUCXX)
+ endif (CMAKE_COMPILER_IS_GNUCXX)
+
+ add_definitions (${QT_DEFINITIONS})
+-include_directories("include/QtCrypto/")
+-# for generated files
+-include_directories(${CMAKE_BINARY_DIR})
+
+ if(NOT DEVELOPER_MODE)
+ # uninstall target
+@@ -166,17 +135,31 @@ else( QCA_INSTALL_IN_QT_PREFIX )
+ set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "Directory where lib will install")
+
+ set(QCA_PREFIX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Directory where qca will install")
+- set(QCA_PLUGINS_INSTALL_DIR "${LIB_INSTALL_DIR}/${QCA_LIB_NAME}" CACHE PATH "Directory where qca plugins will install")
++ if(NOT QCA_PLUGINS_INSTALL_DIR)
++ set(QCA_PLUGINS_INSTALL_DIR "${LIB_INSTALL_DIR}/${QCA_LIB_NAME}"
++ CACHE PATH "Directory where qca plugins will install")
++ endif()
+ set(QCA_BINARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Directory where qca plugins will install")
+ set(QCA_LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}" CACHE PATH "Directory where qca library will install")
+- set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install")
++ if(NOT QCA_FEATURE_INSTALL_DIR)
++ set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install")
++ endif()
+ set(QCA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca public headers will install")
+- set(QCA_PRIVATE_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca headers will install")
+- set(QCA_DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${QCA_LIB_NAME}/html" CACHE PATH "Directory where qca documentation will install")
+- set(QCA_MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Directory where qca man pages will install")
++ set(QCA_PRIVATE_INCLUDE_INSTALL_DIR
++ "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca
++ headers will install")
++ if(NOT QCA_DOC_INSTALL_DIR)
++ set(QCA_DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${QCA_LIB_NAME}/html" CACHE PATH "Directory where qca documentation will install")
++ endif()
++ if(NOT QCA_MAN_INSTALL_DIR)
++ set(QCA_MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH
++ "Directory where qca man pages will install")
++ endif()
+ endif( QCA_INSTALL_IN_QT_PREFIX )
+
++if(NOT PKGCONFIG_INSTALL_PREFIX)
+ set(PKGCONFIG_INSTALL_PREFIX "${QCA_LIBRARY_INSTALL_DIR}/pkgconfig" CACHE PATH "Base directory for pkgconfig files")
++endif()
+
+ normalize_path(QCA_PREFIX_INSTALL_DIR)
+
+@@ -203,22 +186,6 @@ foreach(PATH QCA_PLUGINS_INSTALL_DIR
+ endif()
+ endforeach()
+
+-if(NOT WIN32)
+- if(OSX_FRAMEWORK)
+- set(PKGCONFIG_CFLAGS "-F\${libdir} -I\${libdir}/${QCA_LIB_NAME}.framework/Headers")
+- set(PKGCONFIG_LIBS "-F\${libdir} -framework ${QCA_LIB_NAME}")
+- else()
+- set(PKGCONFIG_CFLAGS "-I\${includedir}")
+- set(PKGCONFIG_LIBS "-L\${libdir} -l${QCA_LIB_NAME}")
+- endif()
+-
+- # qca2.pc uses absolute paths. So it must be there. Don't rellocate this.
+- configure_file("qca2.pc.cmake" "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/${QCA_PC_NAME}" @ONLY)
+- if(NOT DEVELOPER_MODE)
+- install(FILES "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/${QCA_PC_NAME}" DESTINATION ${PKGCONFIG_INSTALL_PREFIX})
+- endif()
+-endif(NOT WIN32)
+-
+ # strip CMAKE_INSTALL_PREFIX in all paths
+ if(USE_RELATIVE_PATHS)
+ message(STATUS "Installed package is relocatable")
+@@ -241,203 +208,14 @@ else()
+ set(CRYPTO_PRF_RELATIVE_PATH "")
+ endif()
+
+-if(DEVELOPER_MODE)
+- add_definitions(-DDEVELOPER_MODE)
+-
+-# To prefer plugins from build tree when run qca from build tree
+- file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf
+-"[Paths]
+-Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME}
+-")
+-endif()
+-
+ if (APPLE)
+ find_package(Carbon REQUIRED)
+ set(CMAKE_INSTALL_NAME_DIR ${QCA_LIBRARY_INSTALL_DIR})
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+-endif (APPLE)
+-
+-message(STATUS "Checking for certstore..")
+-# fixme add OR mac
+-if( WIN32 )
+-# USE BUILTIN
+-else ( WIN32 )
+- if ( ENV{QC_CERTSTORE_PATH} )
+- if(EXISTS ENV{QC_CERTSTORE_PATH})
+- set( qca_CERTSTORE $ENV{QC_CERTSTORE_PATH})
+- else(EXISTS ENV{QC_CERTSTORE_PATH})
+- # path to try
+- endif(EXISTS ENV{QC_CERTSTORE_PATH})
+- else( ENV{QC_CERTSTORE_PATH} )
+- set( toTry
+- "/etc/ssl/certs/ca-certificates.crt"
+- "/usr/share/ssl/cert.pem"
+- "/usr/share/ssl/certs/ca-bundle.crt"
+- "/etc/pki/tls/cert.pem"
+- "/etc/ssl/ca-bundle.pem"
+- "/usr/share/curl/curl-ca-bundle.crt"
+- )
+- foreach (_current_try ${toTry})
+- if(EXISTS ${_current_try})
+- set( qca_CERTSTORE ${_current_try})
+- endif(EXISTS ${_current_try})
+- endforeach (_current_try)
+- endif( ENV{QC_CERTSTORE_PATH} )
+-endif(WIN32)
+-
+-if (qca_CERTSTORE)
+- message(STATUS "Found system certstore")
+-else (qca_CERTSTORE)
+- message(STATUS "Using built in certstore.")
+- set( qca_CERTSTORE "${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem")
+- # note that INSTALL_FILES targets are relative to the current installation prefix...
+- if(NOT DEVELOPER_MODE)
+- install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/certs")
+- endif()
+-endif (qca_CERTSTORE)
+-message(STATUS "certstore path: " ${qca_CERTSTORE})
+-add_definitions( -DQCA_SYSTEMSTORE_PATH="${qca_CERTSTORE}" )
+-
+-
+-set( private_HEADERS ${qca_INCLUDEDIR}/QtCrypto/qca_plugin.h ${qca_INCLUDEDIR}/QtCrypto/qca_systemstore.h )
+-
+-set( public_HEADERS
+- ${qca_INCLUDEDIR}/QtCrypto/qca.h
+- ${qca_INCLUDEDIR}/QtCrypto/qcaprovider.h
+- ${qca_INCLUDEDIR}/QtCrypto/QtCrypto
+- ${qca_INCLUDEDIR}/QtCrypto/qca_export.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_support.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_tools.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_core.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_textfilter.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_basic.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_publickey.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_cert.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_keystore.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_securelayer.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_securemessage.h
+- ${CMAKE_BINARY_DIR}/qca_version.h
+- ${qca_INCLUDEDIR}/QtCrypto/qpipe.h
+- ${qca_INCLUDEDIR}/QtCrypto/qca_safetimer.h)
+-
+-set( qca_HEADERS ${private_HEADERS} ${public_HEADERS} )
+-
+-include_directories(${QT_QTCORE_INCLUDE_DIR} "${qca_INCLUDEDIR}/QtCrypto")
+-
+-configure_file("crypto.prf.cmake" "${CMAKE_BINARY_DIR}/mkspecs/features/crypto.prf" @ONLY)
+-if(NOT DEVELOPER_MODE)
+- install(FILES "${CMAKE_BINARY_DIR}/mkspecs/features/crypto.prf" DESTINATION "${QCA_FEATURE_INSTALL_DIR}")
+-endif()
++endif(APPLE)
+
+-configure_file(man/qcatool.1 "${CMAKE_BINARY_DIR}/share/man/man1/${QCA_TOOL_NAME}.1" COPYONLY)
+-if(NOT DEVELOPER_MODE)
+- install(FILES "${CMAKE_BINARY_DIR}/share/man/man1/${QCA_TOOL_NAME}.1" DESTINATION "${QCA_MAN_INSTALL_DIR}/man1")
+-endif()
++include_directories(${QT_QTCORE_INCLUDE_DIR})
+
+ set(QCA_CRYPTO_INSTALL_DIR "${QCA_PLUGINS_INSTALL_DIR}/crypto")
+
+-add_subdirectory(src)
+ add_subdirectory(plugins)
+-
+-if(STATIC_PLUGINS)
+- # Generate header with static plugins list
+- file(WRITE "${CMAKE_BINARY_DIR}/import_plugins.h" "#include <QtPlugin>\n")
+- foreach(PLUGIN IN LISTS PLUGINS)
+- if(WITH_${PLUGIN}_PLUGIN_INTERNAL)
+- string(REPLACE "-" "_" IMPORT_NAME "qca-${PLUGIN}")
+- file(APPEND "${CMAKE_BINARY_DIR}/import_plugins.h" "Q_IMPORT_PLUGIN(${IMPORT_NAME})\n")
+- endif(WITH_${PLUGIN}_PLUGIN_INTERNAL)
+- endforeach(PLUGIN IN LISTS PLUGINS)
+-endif(STATIC_PLUGINS)
+-
+-if(BUILD_TESTS)
+- enable_testing()
+- add_subdirectory(unittest)
+- add_subdirectory(examples)
+-endif(BUILD_TESTS)
+-if(BUILD_TOOLS)
+- add_subdirectory(tools)
+-endif(BUILD_TOOLS)
+-
+-if(DOXYGEN_FOUND)
+- configure_file(${CMAKE_SOURCE_DIR}/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile @ONLY)
+- add_custom_target(doc
+- ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
+- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/images
+- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/images/qca-arch.eps ${CMAKE_BINARY_DIR}/images/qca-arch.eps
+- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/images/qca-arch.png ${CMAKE_BINARY_DIR}/images/qca-arch.png
+- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+- COMMENT "Generating API documentation with Doxygen" VERBATIM)
+-endif(DOXYGEN_FOUND)
+-
+-include(CMakePackageConfigHelpers)
+-configure_package_config_file(
+- "${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in"
+- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfig.cmake"
+- INSTALL_DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca
+-)
+-write_basic_config_version_file("${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion)
+-
+-if(NOT DEVELOPER_MODE)
+-
+- # /usr/local is traditional path for installing apps on POSIX-systems.
+- # I consciously break this. Qt by default looks plugins and features only in
+- # own directory. So by default install libs in Qt prefix it is a best choice.
+- # This can be unwanted behaviour for users who don't read INSTALL file or/and
+- # not read cmake reports. I just try to warn their.
+-
+- # In really anybody who do cmake . && make && sudo make install do it for own risk.
+-
+- if(QCA_INSTALL_IN_QT_PREFIX)
+- string(ASCII 27 ESCAPE)
+- message("")
+- message("${ESCAPE}[31m")
+- message("!!!!!!!!!!!!!!!!!!!!!ATTENTION!!!!!!!!!!!!!!!!!!!!!!")
+- message("!! QCA will be installed in Qt prefix !!")
+- message("!! If you want to install in /usr/local !!")
+- message("!! you MUST explicity define CMAKE_INSTALL_PREFIX !!")
+- message("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
+- message("${ESCAPE}[0m")
+- endif(QCA_INSTALL_IN_QT_PREFIX)
+-
+- message("")
+- if(USE_RELATIVE_PATHS)
+- message("QCA prefix is " "${QCA_PREFIX_INSTALL_DIR}")
+- message("Plugins will be installed to " "${QCA_PREFIX_INSTALL_DIR}/${QCA_PLUGINS_INSTALL_DIR}")
+- message("Binary will be installed to " "${QCA_PREFIX_INSTALL_DIR}/${QCA_BINARY_INSTALL_DIR}")
+- if(OSX_FRAMEWORK)
+- message("Framework will be installed to " "${QCA_PREFIX_INSTALL_DIR}/${QCA_LIBRARY_INSTALL_DIR}")
+- else()
+- message("Library will be installed to " "${QCA_PREFIX_INSTALL_DIR}/${QCA_LIBRARY_INSTALL_DIR}")
+- message("Public headers will be installed to " "${QCA_PREFIX_INSTALL_DIR}/${QCA_INCLUDE_INSTALL_DIR}")
+- message("Private headers will be installed to " "${QCA_PREFIX_INSTALL_DIR}/${QCA_PRIVATE_INCLUDE_INSTALL_DIR}")
+- endif()
+- message("Feature file will be installed to " "${QCA_PREFIX_INSTALL_DIR}/${QCA_FEATURE_INSTALL_DIR}")
+- message("Documentation will be installed to " "${QCA_PREFIX_INSTALL_DIR}/${QCA_DOC_INSTALL_DIR}")
+- message("Man page will be installed to " "${QCA_PREFIX_INSTALL_DIR}/${QCA_MAN_INSTALL_DIR}")
+- message("Pkg-config file will be installed to " "${QCA_PREFIX_INSTALL_DIR}/${PKGCONFIG_INSTALL_PREFIX}")
+- else()
+- message("QCA prefix is " "${QCA_PREFIX_INSTALL_DIR}")
+- message("Plugins will be installed to " "${QCA_PLUGINS_INSTALL_DIR}")
+- message("Binary will be installed to " "${QCA_BINARY_INSTALL_DIR}")
+- if(OSX_FRAMEWORK)
+- message("Framework will be installed to " "${QCA_LIBRARY_INSTALL_DIR}")
+- else()
+- message("Library will be installed to " "${QCA_LIBRARY_INSTALL_DIR}")
+- message("Public headers will be installed to " "${QCA_INCLUDE_INSTALL_DIR}")
+- message("Private headers will be installed to " "${QCA_PRIVATE_INCLUDE_INSTALL_DIR}")
+- endif()
+- message("Feature file will be installed to " "${QCA_FEATURE_INSTALL_DIR}")
+- message("Documentation will be installed to " "${QCA_DOC_INSTALL_DIR}")
+- message("Man page will be installed to " "${QCA_MAN_INSTALL_DIR}")
+- message("Pkg-config file will be installed to " "${PKGCONFIG_INSTALL_PREFIX}")
+- endif()
+- message("")
+-
+- install(EXPORT QCATargets DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca FILE QcaTargets.cmake)
+- install(FILES
+- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfig.cmake"
+- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfigVersion.cmake"
+- DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca
+- )
+-endif()
</ins></span></pre>
</div>
</div>
</body>
</html>