[73107] trunk/dports/devel/qca

michaelld at macports.org michaelld at macports.org
Wed Nov 3 18:54:24 PDT 2010


Revision: 73107
          http://trac.macports.org/changeset/73107
Author:   michaelld at macports.org
Date:     2010-11-03 18:54:21 -0700 (Wed, 03 Nov 2010)
Log Message:
-----------
qca changes:
* better way to handle setting arches for which to build.
* allow use of ccache/distcc.

Modified Paths:
--------------
    trunk/dports/devel/qca/Portfile
    trunk/dports/devel/qca/files/patch-configure.diff

Modified: trunk/dports/devel/qca/Portfile
===================================================================
--- trunk/dports/devel/qca/Portfile	2010-11-04 01:44:36 UTC (rev 73106)
+++ trunk/dports/devel/qca/Portfile	2010-11-04 01:54:21 UTC (rev 73107)
@@ -35,6 +35,17 @@
 #     variant is requested.
 patchfiles           patch-configure.diff
 
+post-patch {
+    # set arch type(s)
+    reinplace "s|@ARCHES@|${qt_arch_types}|g" \
+        ${worksrcpath}/configure
+
+    # since Qt now uses the correct install_name for libraries,
+    # remove that from QCA's library
+    reinplace "/QMAKE_LFLAGS_SONAME/d" \
+        ${worksrcpath}/src/src.pro
+}
+
 # set QCA to install into the QT4 directory
 configure.pre_args   --prefix=${qt_dir}
 
@@ -45,6 +56,18 @@
                       --release         \
                       --no-framework
 
+# QCA's configure does not handle this flag,
+# but does not generate an error either.
+configure.universal_args-delete --disable-dependency-tracking
+configure.args-delete  --disable-dependency-tracking
+
+# allow ccache, if specified by the user
+pre-build {
+    if {[tbool configure.ccache]} {
+        build.post_args "CCACHE=ccache"
+    }
+}
+
 post-destroot {
     # alias to destroot QCA top-level directory
     set destroot_qt ${destroot}${qt_dir}
@@ -64,7 +87,7 @@
 }
 
 variant debug description \
-{Build both release and debug library / framework} {
+{Build both release and debug library} {
     configure.args-delete --release
     configure.args-append --debug-and-release
 }
@@ -78,31 +101,6 @@
     }
 }
 
-post-patch {
-    if {[variant_exists universal] && [variant_isset universal]} {
-        # set universal arch types, depending on what the user has specified
-        array set macports_to_qt_build_arch {
-            ppc     ppc
-            i386    x86
-            ppc64   ppc64
-            x86_64  x86_64
-        }
-        set qca_arch_types ""
-        set qca_qt_config_str ""
-        foreach arch ${universal_archs} {
-            set this_arch_in_qt $macports_to_qt_build_arch($arch)
-            lappend qca_arch_types ${this_arch_in_qt}
-            lappend qca_qt_config_strs "contains(QT_CONFIG,${this_arch_in_qt})"
-        }
-        set qca_arch_types_str [join ${qca_arch_types} " "]
-        set qca_qt_config_str [join ${qca_qt_config_strs} ":"]
-        reinplace "s/@UNIVERSAL_CONTAINS@/${qca_qt_config_str}/g" \
-            ${worksrcpath}/configure
-        reinplace "s/@UNIVERSAL_TYPES@/${qca_arch_types_str}/g" \
-            ${worksrcpath}/configure
-    }
-}
-
 platform darwin 8 {
     # might not be necessary
     if {[variant_exists universal] && [variant_isset universal]} {
@@ -110,11 +108,6 @@
     }
 }
 
-# QCA's configure does not handle this flag,
-# but does not generate an error either.
-configure.universal_args-delete --disable-dependency-tracking
-configure.args-delete  --disable-dependency-tracking
-
 variant universal {
     # Add the universal flag understood by qmake
     configure.universal_args-append --universal

Modified: trunk/dports/devel/qca/files/patch-configure.diff
===================================================================
--- trunk/dports/devel/qca/files/patch-configure.diff	2010-11-04 01:44:36 UTC (rev 73106)
+++ trunk/dports/devel/qca/files/patch-configure.diff	2010-11-04 01:54:21 UTC (rev 73107)
@@ -1,5 +1,5 @@
---- configure_orig	2010-09-10 09:26:14.000000000 -0400
-+++ configure	2010-09-10 09:28:20.000000000 -0400
+--- configure.orig	2010-11-02 16:22:33.000000000 -0400
++++ configure	2010-11-02 16:34:52.000000000 -0400
 @@ -618,12 +618,6 @@
  		}
  #endif
@@ -13,29 +13,49 @@
  		// sanity check exclusive options
  		int x;
  
-@@ -700,8 +694,8 @@
+@@ -695,24 +689,19 @@
+ 	bool exec()
+ 	{
+ #ifdef Q_OS_MAC
++		QString str = "CONFIG += @ARCHES@\n";
+ 		if(qc_getenv("QC_UNIVERSAL") == "Y")
+ 		{
  			qc_universal_enabled = true;
  
- 			QString str =
+-			QString str =
 -			"contains(QT_CONFIG,x86):contains(QT_CONFIG,ppc) {\n"
 -			"	CONFIG += x86 ppc\n"
-+                        "@UNIVERSAL_CONTAINS@ {\n"
-+                        "       CONFIG += @UNIVERSAL_TYPES@\n"
- 			"}\n";
- 
+-			"}\n";
+-
  			QString sdk = qc_getenv("QC_MAC_SDK");
-@@ -817,8 +811,8 @@
+ 			if(!sdk.isEmpty())
+ 			{
+ 				str += QString("QMAKE_MAC_SDK = %1\n").arg(sdk);
+ 				qc_universal_sdk = sdk;
+ 			}
+-
+-			conf->addExtra(str);
+ 		}
++		conf->addExtra(str);
+ #endif
+ 		return true;
+ 	}
+@@ -814,13 +803,9 @@
+ 			str += "QMAKE_CFLAGS += -g\n";
+ 			str += "QMAKE_CXXFLAGS += -g\n";
+ 		}
++		str += "       CONFIG += @ARCHES@\n";
  		if(universal)
  		{
- 			str +=
+-			str +=
 -			"contains(QT_CONFIG,x86):contains(QT_CONFIG,ppc) {\n"
 -			"	CONFIG += x86 ppc\n"
-+                        "@UNIVERSAL_CONTAINS@ {\n"
-+                        "       CONFIG += @UNIVERSAL_TYPES@\n"
- 			"}\n";
- 
+-			"}\n";
+-
  			if(!sdk.isEmpty())
-@@ -884,10 +878,19 @@
+ 				str += QString("QMAKE_MAC_SDK = %1\n").arg(sdk);
+ 		}
+@@ -884,10 +869,19 @@
  		QString pkg_template3 = QString(
  		"Requires: %1\n");
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101103/870c7a53/attachment.html>


More information about the macports-changes mailing list