8 | | version 2.0.3 |
9 | | revision 1 |
10 | | set branch [join [lrange [split ${version} .] 0 1] .] |
| 7 | |
| 8 | # Qt version handling logic |
| 9 | global Qt_Major |
| 10 | subport ${name}-qt5 {} |
| 11 | if {[string match "${name}-qt5*" ${subport}]} { |
| 12 | version 2.1.0.3 |
| 13 | PortGroup qt5 1.0 |
| 14 | set Qt_Major 5 |
| 15 | master_sites http://download.kde.org/stable/qca-qt5/${version}/src |
| 16 | checksums rmd160 cc4040d013170ca5f21fbcefd0607daa8191d333 \ |
| 17 | sha256 ab0170696a8ff87588d38a72d36d0b4b42db9080c991d1a40ceb3f8311d289f9 |
| 18 | use_xz yes |
| 19 | distname "qca-qt5-${version}" |
| 20 | livecheck.regex "qca-qt5-(\\d+(?:\\.\\d+)*)" |
| 21 | } else { |
| 22 | version 2.1.0 |
| 23 | set branch [join [lrange [split ${version} .] 0 0] .] |
| 24 | PortGroup qt4 1.0 |
| 25 | set Qt_Major 4 |
| 26 | master_sites http://delta.affinix.com/download/qca/${branch}.0/ |
| 27 | checksums md5 c2b00c732036244701bae4853a2101cf \ |
| 28 | sha1 2b582b3ccc7e6098cd14d6f52a829ae1539e9cc8 \ |
| 29 | rmd160 30358bbd182cfeb9eaa696b5b39fa9e6d1f99b4c |
| 30 | livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)" |
| 31 | } |
| 32 | PortGroup cmake 1.0 |
| 33 | cmake.out_of_source yes |
| 34 | |
22 | | homepage http://delta.affinix.com/qca/ |
23 | | master_sites http://delta.affinix.com/download/qca/${branch}/ |
24 | | use_bzip2 yes |
25 | | |
26 | | checksums md5 fc15bd4da22b8096c51fcfe52d2fa309 \ |
27 | | sha1 9c868b05b81dce172c41b813de4de68554154c60 \ |
28 | | rmd160 333cfdce91fedfaec09c205528de52d7b569c521 |
29 | | |
30 | | # (1) correct pkgconfig file for framework install, if selected. |
31 | | # (2) allow for 'debug' and 'framework' options at the same time. |
32 | | # This change is needed to allow for +debug [+framework] -- |
33 | | # disallow just debug framework via no variants for it. |
34 | | # (3) allow simple replacement for universal arch arguments, if that |
35 | | # variant is requested. |
36 | | patchfiles patch-configure.diff |
| 46 | homepage http://delta.affinix.com/qca/ |
44 | | post-patch { |
45 | | # set arch type(s) |
46 | | reinplace "s|@ARCHES@|${qt_arch_types}|g" \ |
47 | | ${worksrcpath}/configure |
48 | | |
49 | | # since Qt now uses the correct install_name for libraries, |
50 | | # remove that from QCA's library |
51 | | reinplace "/QMAKE_LFLAGS_SONAME/d" \ |
52 | | ${worksrcpath}/src/src.pro |
53 | | } |
54 | | |
55 | | # set QCA to install into the QT4 directory |
56 | | configure.pre_args --prefix=${qt_dir} |
57 | | |
58 | | # defaults: release only, no-framework, specific build_arch. |
59 | | # use variants to change everything except framework |
60 | | configure.args --verbose \ |
61 | | --qtdir=${qt_dir} \ |
62 | | --release \ |
63 | | --no-framework |
64 | | |
65 | | # QCA's configure does not handle this flag, |
66 | | # but does not generate an error either. |
67 | | configure.universal_args-delete --disable-dependency-tracking |
68 | | configure.args-delete --disable-dependency-tracking |
| 55 | patchfiles-append patch-qca-ossl.diff |
| 56 | |
| 57 | # 1) it seems that configure.pre_args --prefix=${qt_dir} has the desired effect, but |
| 58 | # I don't know to what extent that uses an undocumented cmake feature, so use |
| 59 | # the exhaustive list of install variables. |
| 60 | # 2) the QCA plugins have been rolled into the main source tarball and are built by default |
| 61 | # when their dependencies are available. Allow this for all plugins that were not already |
| 62 | # available through an individual port; no reason to impose new dependencies on our dependents. |
| 63 | configure.args -DCMAKE_INSTALL_PREFIX:PATH=${qt_dir} \ |
| 64 | -DQCA_PLUGINS_INSTALL_DIR:PATH=${qt_plugins_dir} \ |
| 65 | -DQCA_LIBRARY_INSTALL_DIR:PATH=${qt_libs_dir} \ |
| 66 | -DQCA_BINARY_INSTALL_DIR:PATH=${qt_bins_dir} \ |
| 67 | -DQCA_FEATURE_INSTALL_DIR:PATH=${qt_mkspecs_dir}/features \ |
| 68 | -DQCA_INCLUDE_INSTALL_DIR:PATH=${qt_includes_dir} \ |
| 69 | -DQCA_PRIVATE_INCLUDE_INSTALL_DIR:PATH=${qt_includes_dir} \ |
| 70 | -DQCA_DOC_INSTALL_DIR:PATH=${qt_docs_dir} \ |
| 71 | -DQCA_MAN_INSTALL_DIR:PATH=${prefix}/share/man \ |
| 72 | -DPKGCONFIG_INSTALL_PREFIX:PATH=${qt_pkg_config_dir} \ |
| 73 | -DOSX_FRAMEWORK:BOOL=OFF \ |
| 74 | -DBUILD_PLUGINS:STRING="botan\;gcrypt\;logger\;nss\;softstore" |
| 75 | |
| 76 | if {${Qt_Major} eq "4"} { |
| 77 | configure.args-append \ |
| 78 | -DQT4_BUILD:BOOL=ON |
| 79 | } elseif {${Qt_Major} eq "5"} { |
| 80 | patchfiles-append patch-qca210-qt550.diff |
| 81 | configure.args-append \ |
| 82 | -DQCA_SUFFIX:STRING="qt5" |
| 83 | } |
81 | | # install docs |
82 | | xinstall -d -m 755 ${destroot_qt}/share/doc/${name} |
83 | | xinstall -m 644 -W ${worksrcpath} COPYING README TODO \ |
84 | | ${destroot_qt}/share/doc/${name} |
85 | | |
86 | | # install cmake file (taken from port 'kdelibs4'). To use this |
87 | | # file, include '-DCMAKE_MODULE_PATH=...' in configure.args during |
88 | | # the initial 'configure' stage (which uses CMake), to the full |
89 | | # path of where the CMake files are installed. |
90 | | xinstall -d -m 755 ${destroot}${qt_cmake_module_dir} |
91 | | xinstall -m 644 -W ${filespath} FindQCA2.cmake \ |
92 | | ${destroot}${qt_cmake_module_dir} |
| 100 | if {${subport} eq "${name}"} { |
| 101 | # install cmake file (taken from port 'kdelibs4'). To use this |
| 102 | # file, include '-DCMAKE_MODULE_PATH=...' in configure.args during |
| 103 | # the initial 'configure' stage (which uses CMake), to the full |
| 104 | # path of where the CMake files are installed. |
| 105 | # note that QCA 2.1+ also installs .cmake files in ${qt_libs_dir}/cmake/Qca; I don't |
| 106 | # see a reason to move those so I'm leaving them there. |
| 107 | xinstall -d -m 755 ${destroot}${qt_cmake_module_dir} |
| 108 | xinstall -m 644 -W ${filespath} FindQCA2.cmake \ |
| 109 | ${destroot}${qt_cmake_module_dir} |
| 110 | |
| 111 | } |
110 | | platform darwin 8 { |
111 | | # might not be necessary |
112 | | if {[variant_exists universal] && [variant_isset universal]} { |
113 | | configure.args-append --mac-sdk=${developer_dir}/SDKs/MacOSX10.4u.sdk |
| 131 | # NB: I haven't yet tested universal variants; those may require the muniversal portgroup |
| 132 | # variant universal { |
| 133 | # # Add the universal flag understood by qmake |
| 134 | # configure.universal_args-append --universal |
| 135 | # } |
| 136 | |
| 137 | subport qca-tls { |
| 138 | replaced_by qca-ossl |
| 139 | PortGroup obsolete 1.0 |
| 140 | long_description "This port is obsolete." |
| 141 | } |
| 142 | |
| 143 | ### The ossl, cyrus-sasl and gnupg plugins that used to be standalone ports. |
| 144 | ### It makes more sense IMHO to implement them as subports. The other plugins |
| 145 | ### are built together with the main port; I don't see a reason to introduce |
| 146 | ### new subports for components that used to be built along with the main ports, |
| 147 | ### only to impose new dependencies on the ports that require qca. |
| 148 | # Qt4 receives no suffix: |
| 149 | set qt.versions {"" "-qt5"} |
| 150 | foreach qv ${qt.versions} { |
| 151 | subport ${name}${qv}-ossl { |
| 152 | license LGPL-2.1+ |
| 153 | depends_lib-append port:${name}${qv} port:openssl |
| 154 | configure.args-delete -DBUILD_PLUGINS:STRING="botan\;gcrypt\;logger\;nss\;softstore" |
| 155 | configure.args-append -DBUILD_PLUGINS:STRING="ossl" |
| 156 | build.dir ${workpath}/build/plugins/qca-ossl |
| 157 | } |
| 158 | subport ${name}${qv}-cyrus-sasl { |
| 159 | license LGPL-2.1+ |
| 160 | depends_lib-append port:${name}${qv} port:cyrus-sasl2 |
| 161 | configure.args-delete -DBUILD_PLUGINS:STRING="botan\;gcrypt\;logger\;nss\;softstore" |
| 162 | configure.args-append -DBUILD_PLUGINS:STRING="cyrus-sasl" |
| 163 | build.dir ${workpath}/build/plugins/qca-cyrus-sasl |
| 164 | } |
| 165 | subport ${name}${qv}-gnupg { |
| 166 | license LGPL-2.1+ |
| 167 | depends_lib-append port:${name}${qv} |
| 168 | configure.args-delete -DBUILD_PLUGINS:STRING="botan\;gcrypt\;logger\;nss\;softstore" |
| 169 | configure.args-append -DBUILD_PLUGINS:STRING="gnupg" |
| 170 | build.dir ${workpath}/build/plugins/qca-gnupg |