[97879] trunk/dports/graphics/qwt-devel

michaelld at macports.org michaelld at macports.org
Tue Sep 18 10:29:38 PDT 2012


Revision: 97879
          http://trac.macports.org//changeset/97879
Author:   michaelld at macports.org
Date:     2012-09-18 10:29:37 -0700 (Tue, 18 Sep 2012)
Log Message:
-----------
qwt-devel : bump to 6.0.1; remove support for qt3 since 6.0+ require Qt 4.4+; create library version if framework is built.

Modified Paths:
--------------
    trunk/dports/graphics/qwt-devel/Portfile
    trunk/dports/graphics/qwt-devel/files/patch-qwtbuild.pri.diff
    trunk/dports/graphics/qwt-devel/files/patch-qwtconfig.pri.diff

Modified: trunk/dports/graphics/qwt-devel/Portfile
===================================================================
--- trunk/dports/graphics/qwt-devel/Portfile	2012-09-18 16:06:34 UTC (rev 97878)
+++ trunk/dports/graphics/qwt-devel/Portfile	2012-09-18 17:29:37 UTC (rev 97879)
@@ -2,9 +2,10 @@
 # $Id$
 
 PortSystem          1.0
+PortGroup           qt4 1.0
 
 name                qwt-devel
-version             6.0.0-rc3
+version             6.0.1
 conflicts           qwt qwt52
 categories          graphics science
 maintainers         michaelld openmaintainer
@@ -22,10 +23,10 @@
 distname            qwt-${version}
 use_bzip2           yes
 use_parallel_build  no
-checksums           md5     00372e5c149ccd2bc7a31791320fd7ea \
-                    sha1    6052dcd0756947685ac7e465f25642c804c6973d \
-                    rmd160  68b9779e6837e09e99783d7a3b3d42740c737c85
 
+checksums           sha1    301cca0c49c7efc14363b42e082b09056178973e \
+                    rmd160  54b815d131fd7e7c8bfd1a49fbf3bc7c0ccc9c7a
+
 platforms           darwin
 
 patchfiles          patch-qwtconfig.pri.diff \
@@ -49,26 +50,6 @@
     }
 }
 
-variant qt3 conflicts qt4 description {Use qt3-mac} {}
-
-variant qt4 conflicts qt3 description {Use qt4-mac} {}
-
-# move setting of 'qt_qmake_cmd' outside variants, since 'if'
-# statements are processed in-order while variants are processed after
-# everything else.
-set qt_qmake_cmd ""
-if {[variant_isset qt3]} {
-    depends_lib-append  port:qt3-mac
-    set qt_qmake_cmd    ${prefix}/libexec/qt3-mac/bin/qmake
-} else {
-    # when variant 'qt3' is not set, use qt4 whether by default or via
-    # the user's variant choice
-    if {![variant_isset qt4]} {
-        default_variants    +qt4
-    }
-    PortGroup           qt4 1.0
-}
-
 configure.cmd       ${qt_qmake_cmd}
 configure.pre_args  INSTALLBASE="${prefix}"
 
@@ -83,6 +64,52 @@
     }
 }
 
+post-destroot {
+
+    # if qwt is installed as a framework,
+    # link in as libraries and headers too
+
+    if {[file exists ${destroot}${qt_frameworks_dir}/qwt.framework/qwt]} {
+
+        # get qwt's version numbers
+
+        set qwt_vers [split ${version} "."]
+        set qwt_major [lindex ${qwt_vers} 0]
+        set qwt_minor [lindex ${qwt_vers} 1]
+        set qwt_patch [lindex ${qwt_vers} 2]
+
+        foreach fixfile [exec find ${destroot}${qt_frameworks_dir} \
+                             -name "*.framework" | \
+                             sed -e "s@${destroot}@@g"] {
+
+            set tf_full [strsed ${fixfile} {s@\\.framework@@}]
+            set tf [strsed ${tf_full} {g at .*\/@@}]
+
+            # link headers into ${qt_includes_dir}, removing
+            # directories if they are already there first
+
+            set inc_file ${destroot}${qt_includes_dir}/${tf}
+            if {[file exists ${inc_file}]} {
+                file delete -force ${inc_file}
+            }
+            ln -s ${tf_full}.framework/Headers ${inc_file}
+
+            # link libraries into ${qt_libs_dir}, all 4 number
+            # variants as well as the .prl and .la files
+
+            set libs_dir ${destroot}${qt_libs_dir}
+
+            ln -s ${tf_full}.framework/${tf}.prl ${libs_dir}/lib${tf}.prl
+            ln -s ${tf_full}.la ${libs_dir}/lib${tf}.la
+            ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.dylib
+            ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.${qwt_major}.dylib
+            ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.${qwt_major}.${qwt_minor}.dylib
+            ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.${qwt_major}.${qwt_minor}.${qwt_patch}.dylib
+
+        }
+    }
+}
+
 universal_variant   yes
 
 variant debug description "Build release and debug versions" {}

Modified: trunk/dports/graphics/qwt-devel/files/patch-qwtbuild.pri.diff
===================================================================
--- trunk/dports/graphics/qwt-devel/files/patch-qwtbuild.pri.diff	2012-09-18 16:06:34 UTC (rev 97878)
+++ trunk/dports/graphics/qwt-devel/files/patch-qwtbuild.pri.diff	2012-09-18 17:29:37 UTC (rev 97879)
@@ -1,5 +1,5 @@
---- qwtbuild.pri.orig	2010-11-02 08:36:50.000000000 -0400
-+++ qwtbuild.pri	2010-11-02 08:37:34.000000000 -0400
+--- qwtbuild.pri.orig	2012-08-29 09:45:16.000000000 -0400
++++ qwtbuild.pri	2012-08-29 09:45:59.000000000 -0400
 @@ -14,7 +14,6 @@
  CONFIG           += qt     
  CONFIG           += warn_on
@@ -37,7 +37,7 @@
 -
 -    exists( $${QMAKE_LIBDIR_QT}/libqwt.* ) {
 -
--        # On some Linux distributions the the Qwt libraries are installed 
+-        # On some Linux distributions the Qwt libraries are installed 
 -        # in the same directory as the Qt libraries. Unfortunately
 -        # qmake always adds QMAKE_LIBDIR_QT at the beginning of the 
 -        # linker path, so that the installed libraries will be

Modified: trunk/dports/graphics/qwt-devel/files/patch-qwtconfig.pri.diff
===================================================================
--- trunk/dports/graphics/qwt-devel/files/patch-qwtconfig.pri.diff	2012-09-18 16:06:34 UTC (rev 97878)
+++ trunk/dports/graphics/qwt-devel/files/patch-qwtconfig.pri.diff	2012-09-18 17:29:37 UTC (rev 97879)
@@ -1,6 +1,6 @@
---- qwtconfig.pri.orig	2010-11-02 09:20:29.000000000 -0400
-+++ qwtconfig.pri	2010-11-02 09:22:48.000000000 -0400
-@@ -16,26 +16,17 @@
+--- qwtconfig.pri.orig	2012-08-29 10:01:32.000000000 -0400
++++ qwtconfig.pri	2012-08-29 10:03:48.000000000 -0400
+@@ -16,26 +16,16 @@
  # Install paths
  ######################################################################
  
@@ -8,18 +8,18 @@
 +QWT_INSTALL_PREFIX = $$INSTALLBASE
  
 -unix {
--    QWT_INSTALL_PREFIX    = /usr/local/qwt-$$QWT_VERSION-rc3
+-    QWT_INSTALL_PREFIX    = /usr/local/qwt-$$QWT_VERSION
 -}
 -
 -win32 {
--    QWT_INSTALL_PREFIX    = C:/Qwt-$$QWT_VERSION-rc3
+-    QWT_INSTALL_PREFIX    = C:/Qwt-$$QWT_VERSION
 -}
 -
 -QWT_INSTALL_DOCS      = $${QWT_INSTALL_PREFIX}/doc
 -QWT_INSTALL_HEADERS   = $${QWT_INSTALL_PREFIX}/include
+-QWT_INSTALL_LIBS      = $${QWT_INSTALL_PREFIX}/lib
 +QWT_INSTALL_DOCS      = $${QWT_INSTALL_PREFIX}/share/qwt/doc
 +QWT_INSTALL_HEADERS   = $${QWT_INSTALL_PREFIX}/include/qwt
- QWT_INSTALL_LIBS      = $${QWT_INSTALL_PREFIX}/lib
  
  ######################################################################
  # Designer plugin
@@ -31,7 +31,7 @@
  
  ######################################################################
  # Features
-@@ -49,8 +40,7 @@
+@@ -49,8 +39,7 @@
  # with every Qt upgrade. 
  ######################################################################
  
@@ -41,3 +41,24 @@
  
  ######################################################################
  # Build the static/shared libraries.
+@@ -105,7 +94,7 @@
+ # Otherwise you have to build them from the examples directory.
+ ######################################################################
+ 
+-# QWT_CONFIG     += QwtExamples
++QWT_CONFIG     += QwtExamples
+ 
+ ######################################################################
+ # When Qt has been built as framework qmake ( qtAddLibrary ) wants 
+@@ -113,6 +102,8 @@
+ ######################################################################
+ 
+ macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
+-
+-    QWT_CONFIG += QwtFramework
+-}  
++  QWT_CONFIG += QwtFramework
++  QWT_INSTALL_LIBS = $$[QT_INSTALL_FRAMEWORKS]
++} else {
++  QWT_INSTALL_LIBS = $$[QT_INSTALL_LIBS]
++}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120918/02f12448/attachment.html>


More information about the macports-changes mailing list