[72606] trunk/dports/aqua/qtpfsgui

michaelld at macports.org michaelld at macports.org
Thu Oct 21 05:42:48 PDT 2010


Revision: 72606
          http://trac.macports.org/changeset/72606
Author:   michaelld at macports.org
Date:     2010-10-21 05:42:46 -0700 (Thu, 21 Oct 2010)
Log Message:
-----------
Changes to use qt4 portgroup.
Fix building for the specified ARCH and/or +universal.

Modified Paths:
--------------
    trunk/dports/aqua/qtpfsgui/Portfile

Added Paths:
-----------
    trunk/dports/aqua/qtpfsgui/files/patch-project.pro.diff

Removed Paths:
-------------
    trunk/dports/aqua/qtpfsgui/files/patch-app-path.diff

Modified: trunk/dports/aqua/qtpfsgui/Portfile
===================================================================
--- trunk/dports/aqua/qtpfsgui/Portfile	2010-10-21 12:41:08 UTC (rev 72605)
+++ trunk/dports/aqua/qtpfsgui/Portfile	2010-10-21 12:42:46 UTC (rev 72606)
@@ -1,10 +1,12 @@
+# -*- 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
+PortGroup       qt4 1.0
 
 name		qtpfsgui
 version		1.9.3
-revision        1
+revision        2
 categories	aqua graphics
 maintainers	gmail.com:clubjuggler openmaintainer
 description	GUI for HDR imaging workflow
@@ -13,19 +15,45 @@
 platforms	darwin
 homepage	http://qtpfsgui.sourceforge.net/
 master_sites	sourceforge
-patchfiles      patch-app-path.diff
 
-depends_lib     port:qt4-mac port:exiv2 port:openexr \
-		port:ilmbase port:fftw-3-single port:tiff
+depends_lib-append \
+    port:exiv2 port:openexr \
+    port:ilmbase port:fftw-3-single port:tiff
 
 checksums       md5     5a6421391e373c912e4a793e131151c8 \
                 sha1    adf037c54f55be50d931fa484cca169c01d0384d \
                 rmd160  5188b2f1679d6788358067fe761d0c72c475bfe9
 
+patchfiles      patch-project.pro.diff
+
+post-patch {
+    # set ARCHES in project.pro (per the second patchfile),
+    set MP_ARCHES ""
+    if {[variant_exists universal] && [variant_isset universal]} {
+        # build for universal, as defined by the local user
+        set MP_ARCHES ${universal_archs}
+    } else {
+        # build arch specific
+        set MP_ARCHES ${build_arch}
+    }
+    array set macports_to_qt_build_arch {
+        ppc     ppc
+        i386    x86
+        ppc64   ppc64
+        x86_64  x86_64
+    }
+    set QT_ARCHES ""
+    foreach arch ${MP_ARCHES} {
+        set this_arch_in_qt $macports_to_qt_build_arch($arch)
+        lappend QT_ARCHES ${this_arch_in_qt}
+    }
+    set ARCHES [join ${QT_ARCHES} " "]
+    reinplace "s|@@ARCHES@@|${ARCHES}|g" ${worksrcpath}/project.pro
+}
+
 configure.pre_args  PREFIX="${prefix}"
 configure.args      APPLICATIONS_DIR="${applications_dir}" \
                     DOCDIR="${prefix}/share/doc/${name}" \
                     QMAKE_CC="\${CC}" \
                     QMAKE_CXX="\${CXX}"
-configure.cmd   "LOCALSOFT=${prefix} ${prefix}/libexec/qt4-mac/bin/qmake"
-destroot.destdir INSTALL_ROOT=${destroot}
+configure.cmd   "LOCALSOFT=${prefix} ${qt_qmake_cmd}"

Deleted: trunk/dports/aqua/qtpfsgui/files/patch-app-path.diff
===================================================================
--- trunk/dports/aqua/qtpfsgui/files/patch-app-path.diff	2010-10-21 12:41:08 UTC (rev 72605)
+++ trunk/dports/aqua/qtpfsgui/files/patch-app-path.diff	2010-10-21 12:42:46 UTC (rev 72606)
@@ -1,15 +0,0 @@
---- project.pro.orig	2009-03-29 08:25:15.000000000 -0500
-+++ project.pro	2009-12-31 17:08:44.000000000 -0600
-@@ -315,7 +315,11 @@
- 	HTMLDIR = $${DOCDIR}
- }
- 
--target.path      = $${PREFIX}/bin
-+mac {
-+	target.path      = $${APPLICATIONS_DIR}
-+} else {
-+	target.path      = $${PREFIX}/bin
-+}
- menu.files       = qtpfsgui.desktop
- menu.path        = $${PREFIX}/share/applications
- icon.files       = images/qtpfsgui.png

Added: trunk/dports/aqua/qtpfsgui/files/patch-project.pro.diff
===================================================================
--- trunk/dports/aqua/qtpfsgui/files/patch-project.pro.diff	                        (rev 0)
+++ trunk/dports/aqua/qtpfsgui/files/patch-project.pro.diff	2010-10-21 12:42:46 UTC (rev 72606)
@@ -0,0 +1,49 @@
+--- project.pro.orig	2010-10-18 14:55:56.000000000 -0400
++++ project.pro	2010-10-18 14:56:39.000000000 -0400
+@@ -315,7 +315,11 @@
+ 	HTMLDIR = $${DOCDIR}
+ }
+ 
+-target.path      = $${PREFIX}/bin
++mac {
++	target.path      = $${APPLICATIONS_DIR}
++} else {
++	target.path      = $${PREFIX}/bin
++}
+ menu.files       = qtpfsgui.desktop
+ menu.path        = $${PREFIX}/share/applications
+ icon.files       = images/qtpfsgui.png
+@@ -367,32 +371,7 @@
+ 
+ # Enable universal (requires a universal Qt)? Default = non-universal
+ # If you wish to build a Universal Binary please un-comment the following line
+-#CONFIG += x86 ppc
+-
+-# Warn user what type of binary is being built and what the possible implications are
+-contains(CONFIG, "x86"):contains(CONFIG, "ppc") {
+-	message ("Building an OS X Universal Binary:")
+-	message ("Please ensure all dependencies and Qt are also Universal")
+-	message ("********************************************************************")
+-} else {
+-	# Test what architecture we are on (Intel or PPC)
+-	# 'arch' returns "i386" on Intel-Tiger is this true on Intel-Leopard?
+-	# What does 'arch' return on PPC machines? Presumably "ppc"?
+-	MAC_ARCH = $$system(arch)
+-	contains(MAC_ARCH, i386) {
+-		message ("This is an Intel Mac - Building an Intel specific OS X binary")
+-		message ("Please refer to the documentation if you require a Universal Binary")
+-		message ("********************************************************************")
+-		# Is this next line strictly necessary? gcc should compile for the correct architecture by default.
+-		CONFIG += x86
+-	} else {
+-		message ("This is a PPC Mac - Building a PPC specific OS X binary")
+-		message ("Please refer to the documentation if you require a Universal Binary")
+-		message ("********************************************************************")
+-		# Is this next line strictly necessary? gcc should compile for the correct architecture by default.
+-		CONFIG += ppc
+-	}
+-}
++CONFIG += @@ARCHES@@
+ 
+ # We like to search the LOCALSOFT/lib explicitly on MacOSX
+ LIBS += -L$$(LOCALSOFT)/lib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101021/b26ee944/attachment-0001.html>


More information about the macports-changes mailing list