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 |
| 35 | master_sites http://delta.affinix.com/download/qca/${branch}.0/ |
| 36 | #use_bzip2 yes |
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 |
| 49 | patchfiles-append patch-qca-ossl.diff |
| 50 | |
| 51 | # 1) it seems that configure.pre_args --prefix=${qt_dir} has the desired effect, but |
| 52 | # I don't know to what extent that uses an undocumented cmake feature, so use |
| 53 | # the exhaustive list of install variables. |
| 54 | # 2) the QCA plugins have been rolled into the main source tarball and are built by default |
| 55 | # when their dependencies are available. Allow this for all plugins that were not already |
| 56 | # available through an individual port. |
| 57 | configure.args -DCMAKE_INSTALL_PREFIX:PATH=${qt_dir} \ |
| 58 | -DQCA_PLUGINS_INSTALL_DIR:PATH=${qt_plugins_dir} \ |
| 59 | -DQCA_LIBRARY_INSTALL_DIR:PATH=${qt_libs_dir} \ |
| 60 | -DQCA_BINARY_INSTALL_DIR:PATH=${qt_bins_dir} \ |
| 61 | -DQCA_FEATURE_INSTALL_DIR:PATH=${qt_mkspecs_dir}/features \ |
| 62 | -DQCA_INCLUDE_INSTALL_DIR:PATH=${qt_includes_dir} \ |
| 63 | -DQCA_PRIVATE_INCLUDE_INSTALL_DIR:PATH=${qt_includes_dir} \ |
| 64 | -DQCA_DOC_INSTALL_DIR:PATH=${qt_docs_dir} \ |
| 65 | -DQCA_MAN_INSTALL_DIR:PATH=${prefix}/share/man \ |
| 66 | -DPKGCONFIG_INSTALL_PREFIX:PATH=${qt_pkg_config_dir} \ |
| 67 | -DOSX_FRAMEWORK:BOOL=OFF \ |
| 68 | -DBUILD_PLUGINS:STRING="botan\;gcrypt\;logger\;nss\;softstore" |
| 69 | |
| 70 | if {${Qt_Major} eq "4"} { |
| 71 | configure.args-append \ |
| 72 | -DQT4_BUILD:BOOL=ON |
| 73 | if {${qt_dir} ne ${prefix}} { |
| 74 | # temporary transitional variant to accompany qt4-mac's transitional subport: |
| 75 | variant transitional description \ |
| 76 | {temporary variant that allows to install Qt4 and QCA "concurrently" without having to rebuild all dependents} {} |
| 77 | if {[file exists ${prefix}/lib/libQtCore.4.dylib]} { |
| 78 | default_variants +transitional |
| 79 | } |
| 80 | } |
| 81 | } elseif {${Qt_Major} eq "5"} { |
| 82 | configure.args-append \ |
| 83 | -DQCA_SUFFIX:STRING="qt5" |
| 84 | } |
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} |
| 101 | if {${subport} eq "${name}"} { |
| 102 | # install cmake file (taken from port 'kdelibs4'). To use this |
| 103 | # file, include '-DCMAKE_MODULE_PATH=...' in configure.args during |
| 104 | # the initial 'configure' stage (which uses CMake), to the full |
| 105 | # path of where the CMake files are installed. |
| 106 | # note that QCA 2.1+ also installs .cmake files in ${qt_libs_dir}/cmake/Qca; I don't |
| 107 | # currently know what to do with those so I'm leaving them there. |
| 108 | xinstall -d -m 755 ${destroot}${qt_cmake_module_dir} |
| 109 | xinstall -m 644 -W ${filespath} FindQCA2.cmake \ |
| 110 | ${destroot}${qt_cmake_module_dir} |
| 111 | |
| 112 | # check if Qt4 was installed in concurrent mode; should become unconditional |
| 113 | # once Qt4 can only install that way. |
| 114 | if {${qt_dir} ne ${prefix}} { |
| 115 | # temporary |
| 116 | if {[variant_isset transitional]} { |
| 117 | ln -s ${qt_libs_dir}/libqca.2.dylib ${destroot}${prefix}/lib |
| 118 | } |
| 119 | # move the pkgconfig file to its designated location |
| 120 | #move ${destroot}${qt_libs_dir}/pkgconfig/qca2.pc ${destroot}/${qt_pkg_config_dir} |
| 121 | } |
| 122 | } |
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 |
| 142 | # NB: I haven't yet tested universal variants; those may require the muniversal portgroup |
| 143 | # variant universal { |
| 144 | # # Add the universal flag understood by qmake |
| 145 | # configure.universal_args-append --universal |
| 146 | # } |
| 147 | |
| 148 | ### The ossl, cyrus-sasl and gnupg plugins that used to be standalone ports. |
| 149 | ### It makes more sense IMHO to implement them as subports. The other plugins |
| 150 | ### are built together with the main port. I'd have done the same thing for the |
| 151 | ### plugins below, but that would have meant changing all dependents and could |
| 152 | ### have licensing implications. |
| 153 | # Qt4 receives no suffix: |
| 154 | set qt.versions {"" "-qt5"} |
| 155 | foreach qv ${qt.versions} { |
| 156 | subport ${name}${qv}-ossl { |
| 157 | license LGPL-2.1+ |
| 158 | depends_lib-append port:${name}${qv} port:openssl |
| 159 | configure.args-delete -DBUILD_PLUGINS:STRING="botan\;gcrypt\;logger\;nss\;softstore" |
| 160 | configure.args-append -DBUILD_PLUGINS:STRING="ossl" |
| 161 | build.dir ${workpath}/build/plugins/qca-ossl |
| 162 | } |
| 163 | subport ${name}${qv}-cyrus-sasl { |
| 164 | license LGPL-2.1+ |
| 165 | depends_lib-append port:${name}${qv} port:cyrus-sasl2 |
| 166 | configure.args-delete -DBUILD_PLUGINS:STRING="botan\;gcrypt\;logger\;nss\;softstore" |
| 167 | configure.args-append -DBUILD_PLUGINS:STRING="cyrus-sasl" |
| 168 | build.dir ${workpath}/build/plugins/qca-cyrus-sasl |
| 169 | } |
| 170 | subport ${name}${qv}-gnupg { |
| 171 | license LGPL-2.1+ |
| 172 | depends_lib-append port:${name}${qv} |
| 173 | configure.args-delete -DBUILD_PLUGINS:STRING="botan\;gcrypt\;logger\;nss\;softstore" |
| 174 | configure.args-append -DBUILD_PLUGINS:STRING="gnupg" |
| 175 | build.dir ${workpath}/build/plugins/qca-gnupg |