[149176] trunk/dports/aqua/qtpfsgui

mcalhoun at macports.org mcalhoun at macports.org
Sat Jun 4 13:50:45 PDT 2016


Revision: 149176
          https://trac.macports.org/changeset/149176
Author:   mcalhoun at macports.org
Date:     2016-06-04 13:50:45 -0700 (Sat, 04 Jun 2016)
Log Message:
-----------
qtpfsgui: revamp installations process
* remove gcc flags since clang does not understand them (#39443)
* generate proper translations files and allow qtpfsgui to find them
* create links to external programs so qtpfsgui can find them (#16524)

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

Modified: trunk/dports/aqua/qtpfsgui/Portfile
===================================================================
--- trunk/dports/aqua/qtpfsgui/Portfile	2016-06-04 20:33:48 UTC (rev 149175)
+++ trunk/dports/aqua/qtpfsgui/Portfile	2016-06-04 20:50:45 UTC (rev 149176)
@@ -2,11 +2,11 @@
 # $Id$
 
 PortSystem 1.0
-PortGroup       qt4 1.0
+PortGroup       qmake 1.0
 
 name		qtpfsgui
 version		1.9.3
-revision        6
+revision        7
 categories	aqua graphics
 license		GPL-2+
 maintainers     nomaintainer
@@ -17,6 +17,8 @@
 homepage	http://qtpfsgui.sourceforge.net/oldsite/
 master_sites	sourceforge
 
+set target Qtpfsgui
+
 depends_lib-append \
     port:exiv2 \
     port:openexr \
@@ -25,29 +27,34 @@
     port:fftw-3-single \
     port:tiff
 
+depends_run-append \
+    port:dcraw \
+    port:hugin-app
+
 checksums \
     rmd160  5188b2f1679d6788358067fe761d0c72c475bfe9 \
     sha256  016aaa339ede405bfa55d531069bd64f45fd6139836b6ea9b4d655e2734b8fd6
 
 patchfiles      patch-project.pro.diff
 
-# set arch type(s); done is a stage to make sure the 'options
-# qt_arch_types' is evaluated -after- +universal (if selected).
-pre-configure {
-    configure.pre_args  CONFIG+="${qt_arch_types}"
+post-extract {
+    # generate translation files
+    system -W ${worksrcpath} "${qt_bins_dir}/lrelease project.pro"
 }
 
-configure.args  APPLICATIONS_DIR="${applications_dir}" \
-                DOCDIR="${prefix}/share/doc/${name}" \
-                PREFIX="${prefix}" CONFIG+="release" \
-                LOCALSOFT="${prefix}"
-configure.cmd   ${qt_qmake_cmd}
-configure.post_args
-configure.universal_args
+configure.args-append \
+    LOCALSOFT="${prefix}" \
+    DOCDIR="${prefix}/share/doc/${name}" \
+    APPLICATIONS_DIR="${applications_dir}" \
+    TARGET=${target} \
+    I18NDIR=${applications_dir}/${target}.app/Contents/Resources/i18n
 
-# allow ccache, if specified by the user
-pre-build {
-    if {[tbool configure.ccache]} {
-        build.post_args "CCACHE=ccache"
+post-destroot {
+    # allow app to find external binaries (#16524)
+    foreach bin {dcraw align_image_stack} {
+        ln -s ${prefix}/bin/${bin} ${destroot}${applications_dir}/${target}.app/Contents/MacOS/
     }
+
+    # allow help menu to find documentation
+    ln -s ${prefix}/share/doc/${name}/html ${destroot}${applications_dir}/${target}.app/Contents/Resources/
 }

Modified: trunk/dports/aqua/qtpfsgui/files/patch-project.pro.diff
===================================================================
--- trunk/dports/aqua/qtpfsgui/files/patch-project.pro.diff	2016-06-04 20:33:48 UTC (rev 149175)
+++ trunk/dports/aqua/qtpfsgui/files/patch-project.pro.diff	2016-06-04 20:50:45 UTC (rev 149176)
@@ -1,76 +1,94 @@
---- project.pro.orig	2010-11-05 12:17:22.000000000 -0400
-+++ project.pro	2010-11-05 12:18:44.000000000 -0400
-@@ -1,5 +1,5 @@
- TEMPLATE = app
--CONFIG += release qt thread
-+CONFIG += qt thread
+--- project.pro.orig	2009-03-29 06:25:15.000000000 -0700
++++ project.pro	2016-06-04 07:52:41.000000000 -0700
+@@ -2,11 +2,9 @@
+ CONFIG += release qt thread
  DEFINES += QT_NO_DEBUG_OUTPUT
  
- # Assume openmp-capable g++ (>=4.2)
-@@ -192,7 +192,7 @@
+-# Assume openmp-capable g++ (>=4.2)
+-QMAKE_CXXFLAGS += -funroll-loops -fstrength-reduce -fschedule-insns2 -felide-constructors -frerun-loop-opt -fexceptions -fno-strict-aliasing -fexpensive-optimizations -ffast-math -pipe -fopenmp -msse2
+-QMAKE_LFLAGS += -fopenmp
+-
+-TARGET = qtpfsgui
++isEmpty(TARGET) {
++        error( "TARGET must be set before executing this script; fatal error, bailing out." )
++}
+ 
+ MOC_DIR = generated_moc
+ OBJECTS_DIR = generated_obj
+@@ -187,12 +185,17 @@
+ message("Qt4, OK")
+ }
+ 
++########################################### MacPorts Location ###########################################
++isEmpty(LOCALSOFT) {
++        error( "LOCALSOFT must be set before executing this script; fatal error, bailing out." )
++}
++
+ ########################################### EXIV2 ###########################################
+ message ( "" )
  message ( "Detecting exiv2:" )
  #I think these are the only paths where we have to search for.
  #If your system is more exotic let me know.
 -EXIV2IMAGEHPP = /usr/include/exiv2/image.hpp /usr/local/include/exiv2/image.hpp $$(LOCALSOFT)/include/exiv2/image.hpp 
-+EXIV2IMAGEHPP = /usr/include/exiv2/image.hpp /usr/local/include/exiv2/image.hpp $${LOCALSOFT}/include/exiv2/image.hpp 
++EXIV2IMAGEHPP = $$LOCALSOFT/include/exiv2/image.hpp 
  for(path, EXIV2IMAGEHPP) {
  	exists($$path) {
  		EXIV2PATH = $$dirname(path)
-@@ -218,7 +218,7 @@
+@@ -218,7 +221,7 @@
  message ( "Detecting OpenEXR:" )
  #I think these are the only paths where we have to search for.
  #If your system is more exotic let me know.
 -OPENEXRHEADER = /usr/include/OpenEXR/ImfHeader.h /usr/local/include/OpenEXR/ImfHeader.h /usr/local/include/ilmbase/ImfHeader.h /usr/include/ilmbase/ImfHeader.h $$(LOCALSOFT)/include/OpenEXR/ImfHeader.h 
-+OPENEXRHEADER = /usr/include/OpenEXR/ImfHeader.h /usr/local/include/OpenEXR/ImfHeader.h /usr/local/include/ilmbase/ImfHeader.h /usr/include/ilmbase/ImfHeader.h $${LOCALSOFT}/include/OpenEXR/ImfHeader.h 
++OPENEXRHEADER = $$LOCALSOFT/include/OpenEXR/ImfHeader.h 
  for(path, OPENEXRHEADER) {
  	exists($$path) {
  		OPENEXRDIR = $$dirname(path)
-@@ -244,7 +244,7 @@
+@@ -244,7 +247,7 @@
  message ( "Detecting fftw3:" )
  #I think these are the only paths where we have to search for.
  #If your system is more exotic let me know.
 -FFTW3HEADER = /usr/include/fftw3.h /usr/local/include/fftw3.h $$(LOCALSOFT)/include/fftw3.h
-+FFTW3HEADER = /usr/include/fftw3.h /usr/local/include/fftw3.h $${LOCALSOFT}/include/fftw3.h
++FFTW3HEADER = $$LOCALSOFT/include/fftw3.h
  for(path, FFTW3HEADER) {
  	exists($$path) {
  		FFTW3DIR = $$dirname(path)
-@@ -271,7 +271,7 @@
+@@ -271,7 +274,7 @@
  message ( "Detecting libtiff:" )
  #I think these are the only paths where we have to search for.
  #If your system is more exotic let me know.
 -LIBTIFFHEADER = /usr/include/tiffio.h /usr/local/include/tiffio.h $$(LOCALSOFT)/include/tiffio.h
-+LIBTIFFHEADER = /usr/include/tiffio.h /usr/local/include/tiffio.h $${LOCALSOFT}/include/tiffio.h
++LIBTIFFHEADER = $$LOCALSOFT/include/tiffio.h
  for(path, LIBTIFFHEADER) {
  	exists($$path) {
  		LIBTIFFDIR = $$dirname(path)
-@@ -295,8 +295,12 @@
+@@ -295,7 +298,7 @@
  
  ############################## required by "make install" ########################################
  isEmpty(PREFIX) {
 -        PREFIX = /usr/local
 +        error( "PREFIX must be set before executing this script; fatal error, bailing out." )
  }
-+isEmpty(LOCALSOFT) {
-+        error( "LOCALSOFT must be set before executing this script; fatal error, bailing out." )
-+}
-+
  isEmpty(I18NDIR) {
  	mac {
- 		#I18NDIR=(QCoreApplication::applicationDirPath()+\"/i18n\")
-@@ -315,7 +319,11 @@
+@@ -315,7 +318,7 @@
  	HTMLDIR = $${DOCDIR}
  }
  
 -target.path      = $${PREFIX}/bin
-+mac {
-+	target.path      = $${APPLICATIONS_DIR}
-+} else {
-+	target.path      = $${PREFIX}/bin
-+}
++target.path      = $${APPLICATIONS_DIR}
  menu.files       = qtpfsgui.desktop
  menu.path        = $${PREFIX}/share/applications
  icon.files       = images/qtpfsgui.png
-@@ -365,37 +373,8 @@
+@@ -323,7 +326,7 @@
+ htmls.files      = html
+ htmls.path       = $$HTMLDIR
+ i18n.files       = i18n/lang_de.qm i18n/lang_es.qm i18n/lang_it.qm i18n/lang_fr.qm i18n/lang_pl.qm i18n/lang_tr.qm i18n/lang_ru.qm i18n/lang_cs.qm
+-i18n.path        = $$I18NDIR
++i18n.path        = $${APPLICATIONS_DIR}/$${TARGET}.app/Contents/Resources/i18n
+ docs.files       = README LICENSE AUTHORS INSTALL Changelog
+ docs.path        = $$DOCDIR
+ 
+@@ -365,46 +368,8 @@
  #TODO we have to complete this.
  LIBS+=-lIlmThread
  
@@ -105,15 +123,16 @@
 -
  # We like to search the LOCALSOFT/lib explicitly on MacOSX
 -LIBS += -L$$(LOCALSOFT)/lib
-+LIBS += -L$${LOCALSOFT}/lib
- # Libtiff depends on jpeg, but it is not searched for automatically on MacOSX
- LIBS += -ljpeg
- # Exiv also depend on libexpat and libiconv, so same as above:
-@@ -418,7 +397,6 @@
+-# Libtiff depends on jpeg, but it is not searched for automatically on MacOSX
+-LIBS += -ljpeg
+-# Exiv also depend on libexpat and libiconv, so same as above:
+-LIBS += -lexpat 
+-LIBS += -liconv
+-
+-# for now, we disable openMP on MacOSX - have to wait for support in next
+-# Xcode!
+-QMAKE_CXXFLAGS -= -fopenmp
++LIBS += -L$$LOCALSOFT/lib
+ }
  
- # this is just how my MinGW installation is. You gotta change it if you want to compile it in windows.
- CONFIG += windows
--#CONFIG += debug
- CONFIG += console
- 
- #OpenEXR available in win32
+ win32 {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160604/6cd60784/attachment-0001.html>


More information about the macports-changes mailing list