source: trunk/dports/devel/qca/Portfile @ 70695

Last change on this file since 70695 was 70695, checked in by michaelld@…, 10 years ago

Set 'destroot_qca' to simplify destroot installations.
Correct 'configure' comment.
Add in CMake file, installation, and use comment; does not conflict

with that installed by 'kdelibs4'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 70695 2010-08-17 15:53:04Z michaelld@macports.org $
3
4PortSystem          1.0
5name                qca
6version             2.0.2
7revision            3
8set branch          [join [lrange [split ${version} .] 0 1] .]
9categories          devel crypto security
10maintainers         michaelld openmaintainer
11license             LGPLv2.1
12description         Qt Cryptographic Architecture
13long_description \
14    Qt Cryptographic Architecture provides an easy API for the following \
15    features: SSL/TLS, X509, SASL, RSA, Hashing (SHA1, MD5), Ciphers \
16    (BlowFish, 3DES, AES).  Functionality is supplied via plugins.
17
18platforms            darwin
19
20homepage             http://delta.affinix.com/qca/
21master_sites         http://delta.affinix.com/download/qca/${branch}/
22use_bzip2            yes
23
24checksums            md5     27ebdfbd9869d90dae078a6decd029f4 \
25                     sha1    5a414c3296cd37d1ec34182be0d089c5073f55a8 \
26                     rmd160  18b0f497709f9700227644977946735d2ec3c623
27
28depends_build        port:pkgconfig
29depends_lib          port:qt4-mac
30
31# patch to correct pkgconfig file for framework install, if selected.
32# and allow for 'debug' and 'framework' options at the same time.
33# This change is needed to allow for +debug [+framework] -- disallow
34# just debug framework via no variants for it.
35patchfiles           patch-configure.diff
36
37set qt_dir           ${prefix}/libexec/qt4-mac
38set qca_dir          ${prefix}/libexec/qt4-mac
39
40# set QT4 plugins to install into the QT4 directory
41configure.pre_args   --prefix=${qca_dir}
42
43# defaults: release only, framework, specific build_arch.
44# use variants to change these
45configure.args        --verbose         \
46                      --qtdir=${qt_dir} \
47                      --release         \
48                      --framework
49
50destroot.destdir      INSTALL_ROOT="${destroot}"
51
52post-destroot {
53    # alias to destroot QCA top-level directory
54    set destroot_qca ${destroot}${qca_dir}
55
56    # tweak header install for framework only
57    if {![variant_isset no_framework]} {
58        # when installed as a framework, link headers from
59        # the framework into ${destroot_qca}/include
60        xinstall -d 755 ${destroot_qca}/include
61        ln -s ${destroot_qca}/lib/qca.framework/Headers \
62            ${destroot_qca}/include/QtCrypto
63    }
64
65    # install docs
66    xinstall -d 755 ${destroot_qca}/share/doc/${name}
67    xinstall -m 644 -W ${worksrcpath} COPYING README TODO \
68        ${destroot_qca}/share/doc/${name}
69
70    # install cmake file (taken from port 'kdelibs4'). To use this
71    # file, include '-DCMAKE_MODULE_PATH=...' in configure.args during
72    # the initial 'configure' stage (which uses CMake), to the full
73    # path of where the CMake files are installed.
74    xinstall -d 755 ${destroot_qca}/share/cmake/modules
75    xinstall -m 644 -W ${filespath} FindQCA2.cmake \
76        ${destroot_qca}/share/cmake/modules
77}
78
79variant no_framework description \
80{Build as a library, not framework} {
81    configure.args-delete --framework
82    configure.args-append --no-framework
83}
84
85variant debug description \
86{Build both release and debug library / framework} {
87    configure.args-delete --release
88    configure.args-append --debug-and-release
89}
90
91variant examples description \
92{Include examples in install} {
93    post-destroot {
94        xinstall -d 755 ${destroot}${qca_dir}/share/examples/${name}
95        eval file copy [glob ${worksrcpath}/examples/*] \
96            ${destroot}${qca_dir}/share/examples/${name}
97    }
98}
99
100variant universal {
101    configure.universal_args-append --universal
102}
103
104livecheck.type  regex
105livecheck.url   ${homepage}
106livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.