<!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 &quot;Qt Cryptographic Architecture&quot;
+default long_description \
+    &quot;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.&quot;
+
</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 &quot;Build with qt4&quot; {
-    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 &quot;Build with qt5&quot; {
-    PortGroup qt5 1.0
-}
</del><ins>+# Qt variants
</ins><span class="cx"> 
</span><ins>+variant qt4 conflicts qt5 description &quot;Build with qt4&quot; {}
+
+variant qt5 conflicts qt4 description &quot;Build with qt5&quot; {}
+
</ins><span class="cx"> if {![variant_isset qt4] &amp;&amp; ![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] &amp;&amp; ![variant_isset qt5]} {
</span><del>-    ui_error &quot;\n\nYou must select either the +qt4 or +qt5 variant to build ${name}\n&quot;
</del><ins>+    ui_error &quot;\n\nYou must select either the +qt4 or +qt5 variant to build ${subport}\n&quot;
</ins><span class="cx">     return -code error &quot;Invalid variant selection&quot;
</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} &quot;.&quot;]
-    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} &quot;.&quot;]
+        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      {&quot;&quot;               logger}
+    nss         {port:nss         nss}
+    ossl        {path:lib/libssl.dylib:openssl ossl}
+    softstore   {&quot;&quot;               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 &quot;&quot;
+
+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 &quot;&quot;} {
+            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 &quot;&quot;} {
+    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 &quot;${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}&quot;
+}
</ins><span class="cx"> 
</span><del>-livecheck.type  regex
-livecheck.url   ${homepage}
-livecheck.regex &quot;${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}&quot;
</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 &quot;2&quot;)
+ set(QCA_LIB_MINOR_VERSION &quot;1&quot;)
+ set(QCA_LIB_PATCH_VERSION &quot;0&quot;)
++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 &quot;Create test&quot; ON)
+-option(BUILD_TOOLS &quot;Compile mozcerts and qcatool&quot; ON)
+-set(BUILD_PLUGINS &quot;auto&quot; CACHE STRING &quot;Plugins for building (also possible values: none, all and auto)&quot;)
+-option(BUILD_SHARED_LIBS &quot;Build shared library&quot; ON)
+-option(DEVELOPER_MODE &quot;Special developer mode&quot; 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 &quot;Build a Mac OS X Framework&quot; ON)
+-else()
+-  set(OSX_FRAMEWORK OFF)
+-endif()
++set(BUILD_PLUGINS &quot;none&quot; CACHE STRING &quot;Plugins for building (also possible values: none, all and auto)&quot;)

+ find_package(Doxygen)

+@@ -75,32 +72,7 @@ else()
+   set(QCA_QT_PC_VERSION &quot;QtCore&quot;)
+ 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 &quot;STATIC&quot;)
+-else(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC)
+-  set(PLUGIN_TYPE &quot;MODULE&quot;)
+-endif(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC)
+-
+-set(QCA_SUFFIX &quot;&quot; CACHE STRING &quot;QCA common suffix&quot;)
+-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 &quot;${QCA_LIB_MAJOR_VERSION}.${QCA_LIB_MINOR_VERSION}.${QCA_LIB_PATCH_VERSION}&quot;)
+-
+-configure_file(&quot;include/QtCrypto/qca_version.h.in&quot; &quot;${CMAKE_BINARY_DIR}/qca_version.h&quot;)
++set(PLUGIN_TYPE &quot;MODULE&quot;)

+ if (WIN32)
+  set(CMAKE_DEBUG_POSTFIX &quot;d&quot;)
+@@ -118,9 +90,6 @@ if (CMAKE_COMPILER_IS_GNUCXX)
+ endif (CMAKE_COMPILER_IS_GNUCXX)

+ add_definitions (${QT_DEFINITIONS})
+-include_directories(&quot;include/QtCrypto/&quot;)
+-# 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 &quot;${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}&quot; CACHE PATH &quot;Directory where lib will install&quot;)

+   set(QCA_PREFIX_INSTALL_DIR &quot;${CMAKE_INSTALL_PREFIX}&quot; CACHE PATH &quot;Directory where qca will install&quot;)
+-  set(QCA_PLUGINS_INSTALL_DIR &quot;${LIB_INSTALL_DIR}/${QCA_LIB_NAME}&quot; CACHE PATH &quot;Directory where qca plugins will install&quot;)
++  if(NOT QCA_PLUGINS_INSTALL_DIR)
++    set(QCA_PLUGINS_INSTALL_DIR &quot;${LIB_INSTALL_DIR}/${QCA_LIB_NAME}&quot;
++  CACHE PATH &quot;Directory where qca plugins will install&quot;)
++  endif()
+   set(QCA_BINARY_INSTALL_DIR &quot;${CMAKE_INSTALL_PREFIX}/bin&quot; CACHE PATH &quot;Directory where qca plugins will install&quot;)
+   set(QCA_LIBRARY_INSTALL_DIR &quot;${LIB_INSTALL_DIR}&quot; CACHE PATH &quot;Directory where qca library will install&quot;)
+-  set(QCA_FEATURE_INSTALL_DIR &quot;${CMAKE_INSTALL_PREFIX}/mkspecs/features&quot; CACHE PATH &quot;Directory where qca feature file will install&quot;)
++  if(NOT QCA_FEATURE_INSTALL_DIR)
++    set(QCA_FEATURE_INSTALL_DIR &quot;${CMAKE_INSTALL_PREFIX}/mkspecs/features&quot; CACHE PATH &quot;Directory where qca feature file will install&quot;)
++  endif()
+   set(QCA_INCLUDE_INSTALL_DIR &quot;${CMAKE_INSTALL_PREFIX}/include&quot; CACHE PATH &quot;Directory where qca public headers will install&quot;)
+-  set(QCA_PRIVATE_INCLUDE_INSTALL_DIR &quot;${CMAKE_INSTALL_PREFIX}/include&quot; CACHE PATH &quot;Directory where qca headers will install&quot;)
+-  set(QCA_DOC_INSTALL_DIR &quot;${CMAKE_INSTALL_PREFIX}/share/doc/${QCA_LIB_NAME}/html&quot; CACHE PATH &quot;Directory where qca documentation will install&quot;)
+-  set(QCA_MAN_INSTALL_DIR &quot;${CMAKE_INSTALL_PREFIX}/share/man&quot; CACHE PATH &quot;Directory where qca man pages will install&quot;)
++  set(QCA_PRIVATE_INCLUDE_INSTALL_DIR
++  &quot;${CMAKE_INSTALL_PREFIX}/include&quot; CACHE PATH &quot;Directory where qca
++  headers will install&quot;)
++  if(NOT QCA_DOC_INSTALL_DIR)
++    set(QCA_DOC_INSTALL_DIR &quot;${CMAKE_INSTALL_PREFIX}/share/doc/${QCA_LIB_NAME}/html&quot; CACHE PATH &quot;Directory where qca documentation will install&quot;)
++  endif()
++  if(NOT QCA_MAN_INSTALL_DIR)
++    set(QCA_MAN_INSTALL_DIR &quot;${CMAKE_INSTALL_PREFIX}/share/man&quot; CACHE PATH
++  &quot;Directory where qca man pages will install&quot;)
++  endif()
+ endif( QCA_INSTALL_IN_QT_PREFIX )

++if(NOT PKGCONFIG_INSTALL_PREFIX)
+ set(PKGCONFIG_INSTALL_PREFIX &quot;${QCA_LIBRARY_INSTALL_DIR}/pkgconfig&quot; CACHE PATH &quot;Base directory for pkgconfig files&quot;)
++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 &quot;-F\${libdir} -I\${libdir}/${QCA_LIB_NAME}.framework/Headers&quot;)
+-    set(PKGCONFIG_LIBS &quot;-F\${libdir} -framework ${QCA_LIB_NAME}&quot;)
+-  else()
+-    set(PKGCONFIG_CFLAGS &quot;-I\${includedir}&quot;)
+-    set(PKGCONFIG_LIBS &quot;-L\${libdir} -l${QCA_LIB_NAME}&quot;)
+-  endif()
+-
+-  # qca2.pc uses absolute paths. So it must be there. Don't rellocate this.
+-  configure_file(&quot;qca2.pc.cmake&quot; &quot;${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/${QCA_PC_NAME}&quot; @ONLY)
+-  if(NOT DEVELOPER_MODE)
+-    install(FILES &quot;${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/${QCA_PC_NAME}&quot; DESTINATION ${PKGCONFIG_INSTALL_PREFIX})
+-  endif()
+-endif(NOT WIN32)
+-
+ # strip CMAKE_INSTALL_PREFIX in all paths
+ if(USE_RELATIVE_PATHS)
+   message(STATUS &quot;Installed package is relocatable&quot;)
+@@ -241,203 +208,14 @@ else()
+   set(CRYPTO_PRF_RELATIVE_PATH &quot;&quot;)
+ 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
+-&quot;[Paths]
+-Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME}
+-&quot;)
+-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 &quot;Checking for certstore..&quot;)
+-# 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
+-      &quot;/etc/ssl/certs/ca-certificates.crt&quot;
+-      &quot;/usr/share/ssl/cert.pem&quot;
+-      &quot;/usr/share/ssl/certs/ca-bundle.crt&quot;
+-      &quot;/etc/pki/tls/cert.pem&quot;
+-      &quot;/etc/ssl/ca-bundle.pem&quot;
+-      &quot;/usr/share/curl/curl-ca-bundle.crt&quot;
+-    )
+-    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 &quot;Found system certstore&quot;)
+-else (qca_CERTSTORE)
+-  message(STATUS &quot;Using built in certstore.&quot;)
+-  set( qca_CERTSTORE &quot;${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem&quot;)
+-  # note that INSTALL_FILES targets are relative to the current installation prefix...
+-  if(NOT DEVELOPER_MODE)
+-    install(FILES &quot;${qca_CERTSTORE}&quot; DESTINATION &quot;${QCA_PREFIX_INSTALL_DIR}/certs&quot;)
+-  endif()
+-endif (qca_CERTSTORE)
+-message(STATUS &quot;certstore path: &quot; ${qca_CERTSTORE})
+-add_definitions( -DQCA_SYSTEMSTORE_PATH=&quot;${qca_CERTSTORE}&quot; )
+-
+-
+-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} &quot;${qca_INCLUDEDIR}/QtCrypto&quot;)
+-
+-configure_file(&quot;crypto.prf.cmake&quot; &quot;${CMAKE_BINARY_DIR}/mkspecs/features/crypto.prf&quot; @ONLY)
+-if(NOT DEVELOPER_MODE)
+-  install(FILES &quot;${CMAKE_BINARY_DIR}/mkspecs/features/crypto.prf&quot; DESTINATION &quot;${QCA_FEATURE_INSTALL_DIR}&quot;)
+-endif()
++endif(APPLE)

+-configure_file(man/qcatool.1 &quot;${CMAKE_BINARY_DIR}/share/man/man1/${QCA_TOOL_NAME}.1&quot; COPYONLY)
+-if(NOT DEVELOPER_MODE)
+-  install(FILES &quot;${CMAKE_BINARY_DIR}/share/man/man1/${QCA_TOOL_NAME}.1&quot; DESTINATION &quot;${QCA_MAN_INSTALL_DIR}/man1&quot;)
+-endif()
++include_directories(${QT_QTCORE_INCLUDE_DIR})

+ set(QCA_CRYPTO_INSTALL_DIR &quot;${QCA_PLUGINS_INSTALL_DIR}/crypto&quot;)

+-add_subdirectory(src)
+ add_subdirectory(plugins)
+-
+-if(STATIC_PLUGINS)
+-  # Generate header with static plugins list
+-  file(WRITE &quot;${CMAKE_BINARY_DIR}/import_plugins.h&quot; &quot;#include &lt;QtPlugin&gt;\n&quot;)
+-  foreach(PLUGIN IN LISTS PLUGINS)
+-    if(WITH_${PLUGIN}_PLUGIN_INTERNAL)
+-      string(REPLACE &quot;-&quot; &quot;_&quot; IMPORT_NAME &quot;qca-${PLUGIN}&quot;)
+-      file(APPEND &quot;${CMAKE_BINARY_DIR}/import_plugins.h&quot; &quot;Q_IMPORT_PLUGIN(${IMPORT_NAME})\n&quot;)
+-    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 &quot;Generating API documentation with Doxygen&quot; VERBATIM)
+-endif(DOXYGEN_FOUND)
+-
+-include(CMakePackageConfigHelpers)
+-configure_package_config_file(
+-  &quot;${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in&quot;
+-  &quot;${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfig.cmake&quot;
+-  INSTALL_DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca
+-)
+-write_basic_config_version_file(&quot;${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfigVersion.cmake&quot; 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 . &amp;&amp; make &amp;&amp; sudo make install do it for own risk.
+-
+-  if(QCA_INSTALL_IN_QT_PREFIX)
+-    string(ASCII 27 ESCAPE)
+-    message(&quot;&quot;)
+-    message(&quot;${ESCAPE}[31m&quot;)
+-    message(&quot;!!!!!!!!!!!!!!!!!!!!!ATTENTION!!!!!!!!!!!!!!!!!!!!!!&quot;)
+-    message(&quot;!! QCA will be installed in Qt prefix             !!&quot;)
+-    message(&quot;!! If you want to install in /usr/local           !!&quot;)
+-    message(&quot;!! you MUST explicity define CMAKE_INSTALL_PREFIX !!&quot;)
+-    message(&quot;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&quot;)
+-    message(&quot;${ESCAPE}[0m&quot;)
+-  endif(QCA_INSTALL_IN_QT_PREFIX)
+-
+-  message(&quot;&quot;)
+-  if(USE_RELATIVE_PATHS)
+-    message(&quot;QCA prefix is &quot; &quot;${QCA_PREFIX_INSTALL_DIR}&quot;)
+-    message(&quot;Plugins will be installed to &quot; &quot;${QCA_PREFIX_INSTALL_DIR}/${QCA_PLUGINS_INSTALL_DIR}&quot;)
+-    message(&quot;Binary will be installed to &quot; &quot;${QCA_PREFIX_INSTALL_DIR}/${QCA_BINARY_INSTALL_DIR}&quot;)
+-    if(OSX_FRAMEWORK)
+-      message(&quot;Framework will be installed to &quot; &quot;${QCA_PREFIX_INSTALL_DIR}/${QCA_LIBRARY_INSTALL_DIR}&quot;)
+-    else()
+-      message(&quot;Library will be installed to &quot; &quot;${QCA_PREFIX_INSTALL_DIR}/${QCA_LIBRARY_INSTALL_DIR}&quot;)
+-      message(&quot;Public headers will be installed to &quot; &quot;${QCA_PREFIX_INSTALL_DIR}/${QCA_INCLUDE_INSTALL_DIR}&quot;)
+-      message(&quot;Private headers will be installed to &quot; &quot;${QCA_PREFIX_INSTALL_DIR}/${QCA_PRIVATE_INCLUDE_INSTALL_DIR}&quot;)
+-    endif()
+-    message(&quot;Feature file will be installed to &quot; &quot;${QCA_PREFIX_INSTALL_DIR}/${QCA_FEATURE_INSTALL_DIR}&quot;)
+-    message(&quot;Documentation will be installed to &quot; &quot;${QCA_PREFIX_INSTALL_DIR}/${QCA_DOC_INSTALL_DIR}&quot;)
+-    message(&quot;Man page will be installed to &quot; &quot;${QCA_PREFIX_INSTALL_DIR}/${QCA_MAN_INSTALL_DIR}&quot;)
+-    message(&quot;Pkg-config file will be installed to &quot; &quot;${QCA_PREFIX_INSTALL_DIR}/${PKGCONFIG_INSTALL_PREFIX}&quot;)
+-  else()
+-    message(&quot;QCA prefix is &quot; &quot;${QCA_PREFIX_INSTALL_DIR}&quot;)
+-    message(&quot;Plugins will be installed to &quot; &quot;${QCA_PLUGINS_INSTALL_DIR}&quot;)
+-    message(&quot;Binary will be installed to &quot; &quot;${QCA_BINARY_INSTALL_DIR}&quot;)
+-    if(OSX_FRAMEWORK)
+-      message(&quot;Framework will be installed to &quot; &quot;${QCA_LIBRARY_INSTALL_DIR}&quot;)
+-    else()
+-      message(&quot;Library will be installed to &quot; &quot;${QCA_LIBRARY_INSTALL_DIR}&quot;)
+-      message(&quot;Public headers will be installed to &quot; &quot;${QCA_INCLUDE_INSTALL_DIR}&quot;)
+-      message(&quot;Private headers will be installed to &quot; &quot;${QCA_PRIVATE_INCLUDE_INSTALL_DIR}&quot;)
+-    endif()
+-    message(&quot;Feature file will be installed to &quot; &quot;${QCA_FEATURE_INSTALL_DIR}&quot;)
+-    message(&quot;Documentation will be installed to &quot; &quot;${QCA_DOC_INSTALL_DIR}&quot;)
+-    message(&quot;Man page will be installed to &quot; &quot;${QCA_MAN_INSTALL_DIR}&quot;)
+-    message(&quot;Pkg-config file will be installed to &quot; &quot;${PKGCONFIG_INSTALL_PREFIX}&quot;)
+-  endif()
+-  message(&quot;&quot;)
+-
+-  install(EXPORT QCATargets DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca FILE QcaTargets.cmake)
+-  install(FILES
+-    &quot;${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfig.cmake&quot;
+-    &quot;${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfigVersion.cmake&quot;
+-    DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca
+-    )
+-endif()
</ins></span></pre>
</div>
</div>

</body>
</html>