[70438] trunk/dports/devel/qca-gnupg

michaelld at macports.org michaelld at macports.org
Mon Aug 9 11:06:51 PDT 2010


Revision: 70438
          http://trac.macports.org/changeset/70438
Author:   michaelld at macports.org
Date:     2010-08-09 11:06:50 -0700 (Mon, 09 Aug 2010)
Log Message:
-----------
Revision bump to 2.0.0-beta3.
Set depends_run to 'gnupg' (variant: 'gnupg2').
Patch configure to find QCA more robustly.
Install this plugin into default location (inside QT4 plugins).
Allow variant for debug, which installs both release and debug plugins.

Modified Paths:
--------------
    trunk/dports/devel/qca-gnupg/Portfile

Added Paths:
-----------
    trunk/dports/devel/qca-gnupg/files/
    trunk/dports/devel/qca-gnupg/files/patch-configure.diff

Modified: trunk/dports/devel/qca-gnupg/Portfile
===================================================================
--- trunk/dports/devel/qca-gnupg/Portfile	2010-08-09 17:55:34 UTC (rev 70437)
+++ trunk/dports/devel/qca-gnupg/Portfile	2010-08-09 18:06:50 UTC (rev 70438)
@@ -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
@@ -2,5 +3,5 @@
 name                qca-gnupg
-version             2.0.0-beta2
+version             2.0.0-beta3
 categories          devel crypto security
-maintainers         rowue openmaintainer
+maintainers         michaelld openmaintainer
 description         Qt Cryptographic Architecture - gnupg plugin
@@ -19,23 +20,47 @@
 master_sites        http://delta.affinix.com/download/qca/2.0/plugins/
 use_bzip2           yes
 
-checksums           md5 491f8acb97e9943cb1c8822000516ed6 \
-                    sha1 d7b7834132f40c73ad6bf589951949b878868906 \
-                    rmd160 c28d37a5d045e3f5e2102b1b98d422b4d8d7b310
+checksums           md5 9b4d020efd835a52d98b2ced9ae79c4b \
+                    sha1 77e3874b9ed427e281b23b9bf41ecc95e74f7053 \
+                    rmd160 2531d81179e0b78cc3689c7891b4c6c60d56a422
 
 depends_lib         port:qca
+depends_run         port:gnupg
 
-configure.pre_args  --qtdir=${prefix}
+# The patch to "configure" uses QCA's 'crypto.prf' file to correctly
+# include its libraries (no matter how QCA is installed), instead of
+# forcing patching of multiple files.
+patchfiles          patch-configure.diff
 
-post-build {
-    system "install_name_tool -id ${prefix}/lib/libqca-gnupg.dylib \
-        ${worksrcpath}/lib/libqca-gnupg.dylib"
+set qt_dir         ${prefix}/libexec/qt4-mac
+
+# qca-gnupg does not use --prefix
+configure.pre_args
+configure.args       --verbose             \
+                     --qtdir=${qt_dir}
+
+destroot.destdir    INSTALL_ROOT="${destroot}"
+
+post-destroot {
+    # fix library path of installed library/ies
+    foreach fixfile [exec find ${destroot}${qt_dir} -name "*.dylib" | \
+                         sed -e "s@${destroot}@@g"] {
+        system "install_name_tool -id ${fixfile} ${destroot}${fixfile}"
+    }
 }
 
-destroot {
-    xinstall -m 755 -d ${destroot}${prefix}/lib/qt4-plugins/crypto
-        
-    xinstall -m 644 -W ${worksrcpath}/lib libqca-gnupg.dylib \
-                ${destroot}${prefix}/lib/qt4-plugins/crypto
+variant debug description \
+{Build both release and debug library} \
+{
+    configure.args-delete --release
+    configure.args-append --debug-and-release
 }
 
+variant universal {
+    configure.universal_args-append --universal
+}
+
+variant gnupg2 description {GnuPG version 2 runtime use} {
+	depends_run-delete port:gnupg
+	depends_run-append port:gnupg2
+}

Added: trunk/dports/devel/qca-gnupg/files/patch-configure.diff
===================================================================
--- trunk/dports/devel/qca-gnupg/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/devel/qca-gnupg/files/patch-configure.diff	2010-08-09 18:06:50 UTC (rev 70438)
@@ -0,0 +1,22 @@
+--- configure_orig	2010-08-04 20:17:53.000000000 -0400
++++ configure	2010-08-04 20:22:54.000000000 -0400
+@@ -537,18 +537,7 @@
+ // based on crypto.prf. any changes made to that file need to be tracked here.
+ static QString internal_crypto_prf(const QString &incdir, const QString &libdir)
+ {
+-	QString out = QString(
+-	"CONFIG *= qt\n"
+-	"INCLUDEPATH += %1/QtCrypto\n"
+-	"LIBS += -L%2\n"
+-	"\n"
+-	"LINKAGE = -lqca\n"
+-	"CONFIG(debug, debug|release) {\n"
+-        "	windows:LINKAGE = -lqcad\n"
+-        "	mac:LINKAGE = -lqca_debug\n"
+-	"}\n"
+-	"LIBS += \$\$LINKAGE\n"
+-	).arg(incdir, libdir);
++	QString out = QString("CONFIG *= crypto\n");
+ 	return out;
+ }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100809/7233ccfe/attachment.html>


More information about the macports-changes mailing list