[70439] trunk/dports/devel/qca-cyrus-sasl

michaelld at macports.org michaelld at macports.org
Mon Aug 9 11:08:28 PDT 2010


Revision: 70439
          http://trac.macports.org/changeset/70439
Author:   michaelld at macports.org
Date:     2010-08-09 11:08:28 -0700 (Mon, 09 Aug 2010)
Log Message:
-----------
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-cyrus-sasl/Portfile

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

Modified: trunk/dports/devel/qca-cyrus-sasl/Portfile
===================================================================
--- trunk/dports/devel/qca-cyrus-sasl/Portfile	2010-08-09 18:06:50 UTC (rev 70438)
+++ trunk/dports/devel/qca-cyrus-sasl/Portfile	2010-08-09 18:08:28 UTC (rev 70439)
@@ -5,8 +5,9 @@
 
 name                qca-cyrus-sasl
 version             2.0.0-beta3
+revision            1
 categories          devel crypto security
-maintainers         rowue openmaintainer
+maintainers         michaelld openmaintainer
 description         Qt Cryptographic Architecture - cyrus-sasl plugin
 long_description \
     This library provides an easy API for the following features: SSL/TLS, \
@@ -28,17 +29,36 @@
 depends_lib         port:qca \
                     port:cyrus-sasl2
 
-configure.pre_args  --with-sasl-inc=${prefix}/include/
+# 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-cyrus-sasl.dylib \
-        ${worksrcpath}/lib/libqca-cyrus-sasl.dylib"
+set qt_dir          ${prefix}/libexec/qt4-mac
+
+# qca-gnupg does not use --prefix
+configure.pre_args
+configure.args       --verbose             \
+                     --qtdir=${qt_dir}     \
+                     --with-sasl-inc=${prefix}/include
+
+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-cyrus-sasl.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
+}

Added: trunk/dports/devel/qca-cyrus-sasl/files/patch-configure.diff
===================================================================
--- trunk/dports/devel/qca-cyrus-sasl/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/devel/qca-cyrus-sasl/files/patch-configure.diff	2010-08-09 18:08:28 UTC (rev 70439)
@@ -0,0 +1,22 @@
+--- configure_orig	2010-08-04 20:41:38.000000000 -0400
++++ configure	2010-08-04 20:42:10.000000000 -0400
+@@ -551,18 +551,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/9b8a13a9/attachment.html>


More information about the macports-changes mailing list