[70436] trunk/dports/devel/qca
michaelld at macports.org
michaelld at macports.org
Mon Aug 9 10:52:21 PDT 2010
Revision: 70436
http://trac.macports.org/changeset/70436
Author: michaelld at macports.org
Date: 2010-08-09 10:52:21 -0700 (Mon, 09 Aug 2010)
Log Message:
-----------
Allow for correct framework info in PKGCONFIG file, as appropriate.
Allow default installer to do 'destroot' stage.
Correct header install for framework only.
Allow for debug and framework (and release) at the same time; do not
allow just debug and framework.
Install into QT4 main directory; plugins too. Hopefully addresses
ticket #25670.
Default install to just release version (no debug), framework, and
arch specific (not universal); allow variants for each of these as
well as examples.
Modified Paths:
--------------
trunk/dports/devel/qca/Portfile
Added Paths:
-----------
trunk/dports/devel/qca/files/
trunk/dports/devel/qca/files/patch-configure.diff
Modified: trunk/dports/devel/qca/Portfile
===================================================================
--- trunk/dports/devel/qca/Portfile 2010-08-09 17:31:08 UTC (rev 70435)
+++ trunk/dports/devel/qca/Portfile 2010-08-09 17:52:21 UTC (rev 70436)
@@ -1,3 +1,4 @@
+# -*- 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
# $Id$
PortSystem 1.0
@@ -3,15 +4,14 @@
name qca
version 2.0.2
-revision 1
+revision 2
set branch [join [lrange [split ${version} .] 0 1] .]
-set major [lindex [split ${version} .] 0]
categories devel crypto security
-maintainers rowue openmaintainer
+maintainers michaelld openmaintainer
license LGPLv2.1
description Qt Cryptographic Architecture
long_description \
- This library 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.
+ 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.
platforms darwin
@@ -25,44 +25,71 @@
sha1 5a414c3296cd37d1ec34182be0d089c5073f55a8 \
rmd160 18b0f497709f9700227644977946735d2ec3c623
+depends_build port:pkgconfig
depends_lib port:qt4-mac
-configure.args --qtdir=${prefix}/libexec/qt4-mac \
- --no-framework
+# patch to correct pkgconfig file for framework install, if selected.
+# and allow for 'debug' and 'framework' options at the same time.
+# This change is needed to allow for +combined [+framework]; handle
+# +debug [+framework] in pre-extract.
+patchfiles patch-configure.diff
-post-build {
- system "install_name_tool -id ${prefix}/lib/libqca.${major}.dylib \
- ${worksrcpath}/lib/libqca.${version}.dylib"
-}
+set qt_dir ${prefix}/libexec/qt4-mac
+set qca_dir ${prefix}/libexec/qt4-mac
-destroot {
- xinstall -m 755 -d ${destroot}${prefix}/lib ${destroot}${prefix}/include \
- ${destroot}${prefix}/share/qt4/mkspecs/features \
- ${destroot}${prefix}/lib/pkgconfig \
- ${destroot}${prefix}/share/doc/${name} \
- ${destroot}${prefix}/share/examples/${name} \
- ${destroot}${prefix}/include/QtCrypto
-
- xinstall -m 644 -W ${worksrcpath}/lib libqca.${version}.dylib \
- ${destroot}${prefix}/lib
- ln -s libqca.${version}.dylib ${destroot}${prefix}/lib/libqca.dylib
- ln -s libqca.${version}.dylib ${destroot}${prefix}/lib/libqca.${major}.dylib
- ln -s libqca.${version}.dylib ${destroot}${prefix}/lib/libqca.${branch}.dylib
+# set QT4 plugins to install into the QT4 directory
+configure.pre_args --prefix=${qca_dir}
- foreach f [glob ${worksrcpath}/include/QtCrypto/*] {
- xinstall -m 644 $f ${destroot}${prefix}/include/QtCrypto
+# defaults: release only, framework, specific build_arch.
+# use variants to change these
+configure.args --verbose \
+ --qtdir=${qt_dir} \
+ --release \
+ --framework
+
+destroot.destdir INSTALL_ROOT="${destroot}"
+
+post-destroot {
+ # tweak header install for framework only
+ if {![variant_isset no_framework]} {
+ # when installed as a framework, link headers from
+ # the framework into ${qca_dir}/include
+ xinstall -d 755 ${destroot}${qca_dir}/include
+ ln -s ${qca_dir}/lib/qca.framework/Headers \
+ ${destroot}${qca_dir}/include/QtCrypto
}
- xinstall -m 644 -W ${worksrcpath} crypto.prf \
- ${destroot}${prefix}/share/qt4/mkspecs/features
- xinstall -m 644 -W ${worksrcpath}/lib/pkgconfig qca2.pc \
- ${destroot}${prefix}/lib/pkgconfig
+ # install docs
+ xinstall -d 755 ${destroot}${qca_dir}/share/doc/${name}
xinstall -m 644 -W ${worksrcpath} COPYING README TODO \
- ${destroot}${prefix}/share/doc/${name}
- eval file copy [glob ${worksrcpath}/examples/*] \
- ${destroot}${prefix}/share/examples/${name}
+ ${destroot}${qca_dir}/share/doc/${name}
}
+variant no_framework description \
+{Build as a library, not framework} {
+ configure.args-delete --framework
+ configure.args-append --no-framework
+}
+
+variant debug description \
+{Build both release and debug library / framework} {
+ configure.args-delete --release
+ configure.args-append --debug-and-release
+}
+
+variant examples description \
+{Include examples in install} {
+ post-destroot {
+ xinstall -d 755 ${destroot}${qca_dir}/share/examples/${name}
+ eval file copy [glob ${worksrcpath}/examples/*] \
+ ${destroot}${qca_dir}/share/examples/${name}
+ }
+}
+
+variant universal {
+ configure.universal_args-append --universal
+}
+
livecheck.type regex
livecheck.url ${homepage}
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Added: trunk/dports/devel/qca/files/patch-configure.diff
===================================================================
--- trunk/dports/devel/qca/files/patch-configure.diff (rev 0)
+++ trunk/dports/devel/qca/files/patch-configure.diff 2010-08-09 17:52:21 UTC (rev 70436)
@@ -0,0 +1,39 @@
+--- configure.orig 2010-07-14 11:50:27.000000000 -0600
++++ configure 2010-07-14 11:51:53.000000000 -0600
+@@ -618,12 +618,6 @@
+ }
+ #endif
+
+- if(opt_framework && qc_buildmode_debug)
+- {
+- printf("\nError: Cannot use both --framework and --debug.\n");
+- exit(1);
+- }
+-
+ // sanity check exclusive options
+ int x;
+
+@@ -884,10 +884,19 @@
+ QString pkg_template3 = QString(
+ "Requires: %1\n");
+
+- QString pkg_template4 = QString(
+- "Libs: -L\${libdir} -l%1\n"
+- "Cflags: -I\${includedir}\n"
+- "\n");
++ QString pkg_template4;
++ if (qc_buildmode_framework_enabled) {
++ pkg_template4 = QString(
++ "Libs: -F\${libdir} -framework %1\n"
++ "Libs.private: -L\${libdir}\n"
++ "Cflags: -I\${includedir}\n"
++ "\n");
++ } else {
++ pkg_template4 = QString(
++ "Libs: -L\${libdir} -l%1\n"
++ "Cflags: -I\${includedir}\n"
++ "\n");
++ }
+
+ QStringList pcfiles;
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100809/3ed6931a/attachment-0001.html>
More information about the macports-changes
mailing list