[73109] trunk/dports/graphics
michaelld at macports.org
michaelld at macports.org
Wed Nov 3 19:05:18 PDT 2010
Revision: 73109
http://trac.macports.org/changeset/73109
Author: michaelld at macports.org
Date: 2010-11-03 19:05:14 -0700 (Wed, 03 Nov 2010)
Log Message:
-----------
qwt changes:
* new port qwt-devel with version 6.0.0rc3.
* no longer need to fix install_name of libraries and plugins.
* better way of handling arch type(s).
* allow for the use of ccache/distcc.
Modified Paths:
--------------
trunk/dports/graphics/qwt/Portfile
trunk/dports/graphics/qwt/files/patch-qwtconfig.pri.diff
trunk/dports/graphics/qwt52/Portfile
trunk/dports/graphics/qwt52/files/patch-qwtconfig.pri.diff
Added Paths:
-----------
trunk/dports/graphics/qwt-devel/
trunk/dports/graphics/qwt-devel/Portfile
trunk/dports/graphics/qwt-devel/files/
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/Portfile
===================================================================
--- trunk/dports/graphics/qwt/Portfile 2010-11-04 01:58:20 UTC (rev 73108)
+++ trunk/dports/graphics/qwt/Portfile 2010-11-04 02:05:14 UTC (rev 73109)
@@ -6,16 +6,16 @@
name qwt
version 5.1.2
revision 2
-conflicts qwt52
+conflicts qwt52 qwt-devel
categories graphics science
-maintainers michaelld
+maintainers michaelld openmaintainer
description Qt Widgets for Technical Applications, version 5.1
long_description \
The Qwt 5.1 library contains GUI Components and utility classes \
which are primarily useful for programs with a technical \
background. Beside a 2D plot widget it provides scales, sliders, \
dials, compasses, thermometers, wheels and knobs to control \
- or display values, arrays, or ranges of type double. \
+ or display values, arrays, or ranges of type double. \
Version 5.1 contains source incompatible changes versus 5.2. \
See qwt52 for that port.
homepage http://qwt.sourceforge.net
@@ -29,15 +29,40 @@
patchfiles patch-qwtconfig.pri.diff
+post-patch {
+ # setup for debug, if selected
+ if {[variant_isset debug]} {
+ reinplace "/CONFIG/s at release@debug_and_release build_all@" \
+ ${worksrcpath}/qwtconfig.pri
+ }
+
+ # set arch type
+ reinplace "s/@ARCHES@/${qt_arch_types}/" \
+ ${worksrcpath}/qwtconfig.pri
+
+ # setup for examples, if selected
+ if {![variant_isset examples]} {
+ reinplace "s at QwtExamples@@" \
+ ${worksrcpath}/qwtconfig.pri
+ }
+}
+
variant qt3 conflicts qt4 description {Use qt3-mac} {}
variant qt4 conflicts qt3 description {Use qt4-mac} {}
-# move setting of 'qt_dir' outside variants, since 'if' statements are
-# processed in-order while variants are processed after everything else.
+# 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_dir ${prefix}/libexec/qt3-mac
+ set qt_qmake_cmd ${prefix}/libexec/qt3-mac/bin/qmake
+
+ PortGroup archcheck 1.0
+ # check arch of libraries on which this port depends
+ archcheck.files-append lib/libQtCore.dylib
+
} else {
# when variant 'qt3' is not set, use qt4 whether by default or via
# the user's variant choice
@@ -47,27 +72,22 @@
PortGroup qt4 1.0
}
-configure.cmd ${qt_dir}/bin/qmake
+configure.cmd ${qt_qmake_cmd}
configure.pre_args INSTALLBASE="${prefix}"
+
+# qmake does not handle these flags flags
configure.universal_args-delete --disable-dependency-tracking
-destroot.destdir INSTALL_ROOT="${destroot}"
+configure.args-delete --disable-dependency-tracking
-post-destroot {
- # fix install-name of dynamic library & plugin in generic ways
+# allow ccache, if specified by the user
+pre-build {
+ if {[tbool configure.ccache]} {
+ build.post_args "CCACHE=ccache"
+ }
+}
- # (1) fix the install name of the dynamic library
- set libqwt_file [exec find ${destroot}${prefix}/lib -type f | \
- sed -e "s@${destroot}@@g"]
- system "install_name_tool -id ${libqwt_file} ${destroot}${libqwt_file}"
+universal_variant yes
- # (2) fix the install name of the plugin
- set plugin_file [exec find ${destroot}${qt_plugins_dir}/designer -type f | \
- sed -e "s@${destroot}@@g"]
- system "install_name_tool -id ${plugin_file} ${destroot}${plugin_file}"
+variant debug description "Build release and debug versions" {}
- # (3) fix the plugin dependency on the dynamic library
- set plugin_qwt [exec otool -L ${destroot}${plugin_file} | \
- grep "${version}" | awk "{ print \$1 }"]
- system "install_name_tool -change ${plugin_qwt} \
- ${prefix}/lib/${plugin_qwt} ${destroot}${plugin_file}"
-}
+variant examples description "Build examples" {}
Modified: trunk/dports/graphics/qwt/files/patch-qwtconfig.pri.diff
===================================================================
--- trunk/dports/graphics/qwt/files/patch-qwtconfig.pri.diff 2010-11-04 01:58:20 UTC (rev 73108)
+++ trunk/dports/graphics/qwt/files/patch-qwtconfig.pri.diff 2010-11-04 02:05:14 UTC (rev 73109)
@@ -1,22 +1,67 @@
---- qwtconfig.pri.orig 2008-05-02 11:08:06.000000000 -0700
-+++ qwtconfig.pri 2008-05-02 11:10:49.000000000 -0700
-@@ -7,17 +7,13 @@
+--- qwtconfig.pri.orig 2010-11-02 15:09:08.000000000 -0400
++++ qwtconfig.pri 2010-11-02 15:10:35.000000000 -0400
+@@ -7,17 +7,9 @@
VER_PAT = 2
- VERSION = $$VER_MAJ.$$VER_MIN.$$VER_PAT
+ VERSION = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
-unix {
- INSTALLBASE = /usr/local/qwt-5.1.2
-}
-
- win32 {
- INSTALLBASE = C:/Qwt-5.1.2
- }
-
+-win32 {
+- INSTALLBASE = C:/Qwt-5.1.2
+-}
+-
target.path = $$INSTALLBASE/lib
-headers.path = $$INSTALLBASE/include
+-doc.path = $$INSTALLBASE/doc
+headers.path = $$INSTALLBASE/include/qwt
--doc.path = $$INSTALLBASE/doc
+doc.path = $$INSTALLBASE/share/qwt/doc
######################################################################
# qmake internal options
+@@ -33,36 +25,14 @@
+ # have to differ to avoid, that they overwrite each other.
+ ######################################################################
+
+-VVERSION = $$[QT_VERSION]
+-isEmpty(VVERSION) {
+-
+- # Qt 3
+- CONFIG += release # release/debug
+-}
+-else {
+- # Qt 4
+- win32 {
+- # On Windows you can't mix release and debug libraries.
+- # The designer is built in release mode. If you like to use it
+- # you need a release version. For your own application development you
+- # might need a debug version.
+- # Enable debug_and_release + build_all if you want to build both.
+-
+- CONFIG += release # release/debug/debug_and_release
+- #CONFIG += debug_and_release
+- #CONFIG += build_all
+- }
+- else {
+- CONFIG += release # release/debug
+- }
+-}
++CONFIG += @ARCHES@ release
+
+ ######################################################################
+ # If you want to have different names for the debug and release
+ # versions you can add a suffix rule below.
+ ######################################################################
+
+-DEBUG_SUFFIX =
++DEBUG_SUFFIX = _debug
+ RELEASE_SUFFIX =
+
+ win32 {
+@@ -121,4 +91,4 @@
+ # Otherwise you have to build them from the examples directory.
+ ######################################################################
+
+-#CONFIG += QwtExamples
++CONFIG += QwtExamples
Added: trunk/dports/graphics/qwt-devel/Portfile
===================================================================
--- trunk/dports/graphics/qwt-devel/Portfile (rev 0)
+++ trunk/dports/graphics/qwt-devel/Portfile 2010-11-04 02:05:14 UTC (rev 73109)
@@ -0,0 +1,98 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id: $
+
+PortSystem 1.0
+
+name qwt-devel
+version 6.0.0-rc3
+conflicts qwt qwt52
+categories graphics science
+maintainers michaelld openmaintainer
+description Qt Widgets for Technical Applications, version 6.0
+long_description \
+ The Qwt 6.0 library contains GUI Components and utility classes \
+ which are primarily useful for programs with a technical \
+ background. Beside a 2D plot widget it provides scales, sliders, \
+ dials, compasses, thermometers, wheels and knobs to control \
+ or display values, arrays, or ranges of type double. \
+ Version 6.0 contains source incompatible changes versus 5.1. \
+ See qwt for that port.
+homepage http://qwt.sourceforge.net
+master_sites sourceforge:qwt
+distname qwt-${version}
+use_bzip2 yes
+use_parallel_build no
+checksums md5 00372e5c149ccd2bc7a31791320fd7ea \
+ sha1 6052dcd0756947685ac7e465f25642c804c6973d \
+ rmd160 68b9779e6837e09e99783d7a3b3d42740c737c85
+
+platforms darwin
+
+patchfiles patch-qwtconfig.pri.diff \
+ patch-qwtbuild.pri.diff
+
+post-patch {
+ # setup for debug, if selected
+ if {[variant_isset debug]} {
+ reinplace "/CONFIG/s at release@debug_and_release build_all@" \
+ ${worksrcpath}/qwtbuild.pri
+ }
+
+ # set arch type
+ reinplace "s/@ARCHES@/${qt_arch_types}/" \
+ ${worksrcpath}/qwtbuild.pri
+
+ # setup for examples, if selected
+ if {![variant_isset examples]} {
+ reinplace "s at QwtExamples@@" \
+ ${worksrcpath}/qwtconfig.pri
+ }
+}
+
+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
+
+ PortGroup archcheck 1.0
+ # check arch of libraries on which this port depends
+ archcheck.files-append lib/libQtCore.dylib
+
+} 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}"
+
+# qmake does not handle these flags flags
+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"
+ }
+}
+
+universal_variant yes
+
+variant debug description "Build release and debug versions" {}
+
+variant examples description "Build examples" {}
+
+livecheck.url http://sourceforge.net/api/file/index/project-id/13693/mtime/desc/rss?path=%2Fqwt
+livecheck.regex \\/qwt\\/(\\d+(\\.\\d+)+)\\/
Added: trunk/dports/graphics/qwt-devel/files/patch-qwtbuild.pri.diff
===================================================================
--- trunk/dports/graphics/qwt-devel/files/patch-qwtbuild.pri.diff (rev 0)
+++ trunk/dports/graphics/qwt-devel/files/patch-qwtbuild.pri.diff 2010-11-04 02:05:14 UTC (rev 73109)
@@ -0,0 +1,48 @@
+--- qwtbuild.pri.orig 2010-11-02 08:36:50.000000000 -0400
++++ qwtbuild.pri 2010-11-02 08:37:34.000000000 -0400
+@@ -14,7 +14,6 @@
+ CONFIG += qt
+ CONFIG += warn_on
+ CONFIG += no_keywords
+-CONFIG += silent
+
+ ######################################################################
+ # release/debug mode
+@@ -32,7 +31,7 @@
+ }
+ else {
+
+- CONFIG += release
++ CONFIG += @ARCHES@ release
+
+ VER_MAJ = $${QWT_VER_MAJ}
+ VER_MIN = $${QWT_VER_MIN}
+@@ -40,10 +39,6 @@
+ VERSION = $${QWT_VERSION}
+ }
+
+-linux-g++ {
+- # CONFIG += separate_debug_info
+-}
+-
+ ######################################################################
+ # paths for building qwt
+ ######################################################################
+@@ -53,17 +48,3 @@
+ !debug_and_release {
+ OBJECTS_DIR = obj
+ }
+-
+-unix {
+-
+- exists( $${QMAKE_LIBDIR_QT}/libqwt.* ) {
+-
+- # On some Linux distributions the 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
+- # used instead of the local ones.
+-
+- error( "local build will conflict with $${QMAKE_LIBDIR_QT}/libqwt.*" )
+- }
+-}
Added: trunk/dports/graphics/qwt-devel/files/patch-qwtconfig.pri.diff
===================================================================
--- trunk/dports/graphics/qwt-devel/files/patch-qwtconfig.pri.diff (rev 0)
+++ trunk/dports/graphics/qwt-devel/files/patch-qwtconfig.pri.diff 2010-11-04 02:05:14 UTC (rev 73109)
@@ -0,0 +1,43 @@
+--- 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 @@
+ # Install paths
+ ######################################################################
+
+-QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
++QWT_INSTALL_PREFIX = $$INSTALLBASE
+
+-unix {
+- QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-rc3
+-}
+-
+-win32 {
+- QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-rc3
+-}
+-
+-QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/doc
+-QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include
++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
+ ######################################################################
+
+-QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer
+-# QWT_INSTALL_PLUGINS = $${QT_INSTALL_PREFIX}/plugins/designer
++QWT_INSTALL_PLUGINS = $$[QT_INSTALL_PLUGINS]/designer
+
+ ######################################################################
+ # Features
+@@ -49,8 +40,7 @@
+ # with every Qt upgrade.
+ ######################################################################
+
+-QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features
+-# QWT_INSTALL_FEATURES = $${QT_INSTALL_PREFIX}/features
++QWT_INSTALL_FEATURES = $$[QT_INSTALL_DATA]/mkspecs/features
+
+ ######################################################################
+ # Build the static/shared libraries.
Modified: trunk/dports/graphics/qwt52/Portfile
===================================================================
--- trunk/dports/graphics/qwt52/Portfile 2010-11-04 01:58:20 UTC (rev 73108)
+++ trunk/dports/graphics/qwt52/Portfile 2010-11-04 02:05:14 UTC (rev 73109)
@@ -5,13 +5,13 @@
name qwt52
version 5.2.1
-revision 1
-conflicts qwt
+revision 2
+conflicts qwt qwt-devel
categories graphics science
-maintainers michaelld
+maintainers michaelld openmaintainer
description Qt Widgets for Technical Applications, version 5.2
long_description \
- The Qwt library contains GUI Components and utility classes \
+ The Qwt 5.2 library contains GUI Components and utility classes \
which are primarily useful for programs with a technical \
background. Beside a 2D plot widget it provides scales, sliders, \
dials, compasses, thermometers, wheels and knobs to control \
@@ -31,15 +31,40 @@
patchfiles patch-qwtconfig.pri.diff
+post-patch {
+ # setup for debug, if selected
+ if {[variant_isset debug]} {
+ reinplace "/CONFIG/s at release@debug_and_release build_all@" \
+ ${worksrcpath}/qwtconfig.pri
+ }
+
+ # set arch type
+ reinplace "s/@ARCHES@/${qt_arch_types}/" \
+ ${worksrcpath}/qwtconfig.pri
+
+ # setup for examples, if selected
+ if {![variant_isset examples]} {
+ reinplace "s at QwtExamples@@" \
+ ${worksrcpath}/qwtconfig.pri
+ }
+}
+
variant qt3 conflicts qt4 description {Use qt3-mac} {}
variant qt4 conflicts qt3 description {Use qt4-mac} {}
-# move setting of 'qt_dir' outside variants, since 'if' statements are
-# processed in-order while variants are processed after everything else.
+# 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_dir ${prefix}/libexec/qt3-mac
+ set qt_qmake_cmd ${prefix}/libexec/qt3-mac/bin/qmake
+
+ PortGroup archcheck 1.0
+ # check arch of libraries on which this port depends
+ archcheck.files-append lib/libQtCore.dylib
+
} else {
# when variant 'qt3' is not set, use qt4 whether by default or via
# the user's variant choice
@@ -49,30 +74,22 @@
PortGroup qt4 1.0
}
-configure.cmd ${qt_dir}/bin/qmake
+configure.cmd ${qt_qmake_cmd}
configure.pre_args INSTALLBASE="${prefix}"
+
+# qmake does not handle these flags flags
configure.universal_args-delete --disable-dependency-tracking
-destroot.destdir INSTALL_ROOT="${destroot}"
+configure.args-delete --disable-dependency-tracking
-post-destroot {
- # fix install-name of dynamic library & plugin in generic ways
+# allow ccache, if specified by the user
+pre-build {
+ if {[tbool configure.ccache]} {
+ build.post_args "CCACHE=ccache"
+ }
+}
- # (1) fix the install name of the dynamic library
- set libqwt_file [exec find ${destroot}${prefix}/lib -type f | \
- sed -e "s@${destroot}@@g"]
- system "install_name_tool -id ${libqwt_file} ${destroot}${libqwt_file}"
+universal_variant yes
- # (2) fix the install name of the plugin
- set plugin_file [exec find ${destroot}${qt_plugins_dir}/designer -type f | \
- sed -e "s@${destroot}@@g"]
- system "install_name_tool -id ${plugin_file} ${destroot}${plugin_file}"
+variant debug description "Build release and debug versions" {}
- # (3) fix the plugin dependency on the dynamic library
- set plugin_qwt [exec otool -L ${destroot}${plugin_file} | \
- grep "${version}" | awk "{ print \$1 }"]
- system "install_name_tool -change ${plugin_qwt} \
- ${prefix}/lib/${plugin_qwt} ${destroot}${plugin_file}"
-}
-
-livecheck.url http://sourceforge.net/api/file/index/project-id/13693/mtime/desc/rss?path=%2Fqwt
-livecheck.regex \\/qwt\\/(\\d+(\\.\\d+)+)\\/
+variant examples description "Build examples" {}
Modified: trunk/dports/graphics/qwt52/files/patch-qwtconfig.pri.diff
===================================================================
--- trunk/dports/graphics/qwt52/files/patch-qwtconfig.pri.diff 2010-11-04 01:58:20 UTC (rev 73108)
+++ trunk/dports/graphics/qwt52/files/patch-qwtconfig.pri.diff 2010-11-04 02:05:14 UTC (rev 73109)
@@ -1,6 +1,6 @@
---- qwtconfig.pri.orig 2010-06-28 10:39:44.000000000 -0600
-+++ qwtconfig.pri 2010-06-28 10:40:28.000000000 -0600
-@@ -7,17 +7,13 @@
+--- qwtconfig.pri.orig 2010-10-28 21:52:51.000000000 -0400
++++ qwtconfig.pri 2010-10-28 21:54:24.000000000 -0400
+@@ -7,17 +7,9 @@
VER_PAT = 1
VERSION = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
@@ -8,10 +8,10 @@
- INSTALLBASE = /usr/local/qwt-5.2.1
-}
-
- win32 {
- INSTALLBASE = C:/Qwt-5.2.1
- }
-
+-win32 {
+- INSTALLBASE = C:/Qwt-5.2.1
+-}
+-
target.path = $$INSTALLBASE/lib
-headers.path = $$INSTALLBASE/include
-doc.path = $$INSTALLBASE/doc
@@ -20,3 +20,56 @@
######################################################################
# qmake internal options
+@@ -26,7 +18,6 @@
+ CONFIG += qt # Also for Qtopia Core!
+ CONFIG += warn_on
+ CONFIG += thread
+-CONFIG += silent
+
+ ######################################################################
+ # release/debug mode
+@@ -34,36 +25,14 @@
+ # have to differ to avoid, that they overwrite each other.
+ ######################################################################
+
+-VVERSION = $$[QT_VERSION]
+-isEmpty(VVERSION) {
+-
+- # Qt 3
+- CONFIG += release # release/debug
+-}
+-else {
+- # Qt 4
+- win32 {
+- # On Windows you can't mix release and debug libraries.
+- # The designer is built in release mode. If you like to use it
+- # you need a release version. For your own application development you
+- # might need a debug version.
+- # Enable debug_and_release + build_all if you want to build both.
+-
+- CONFIG += release # release/debug/debug_and_release
+- #CONFIG += debug_and_release
+- #CONFIG += build_all
+- }
+- else {
+- CONFIG += release # release/debug
+- }
+-}
++CONFIG += @ARCHES@ release
+
+ ######################################################################
+ # If you want to have different names for the debug and release
+ # versions you can add a suffix rule below.
+ ######################################################################
+
+-DEBUG_SUFFIX =
++DEBUG_SUFFIX = _debug
+ RELEASE_SUFFIX =
+
+ win32 {
+@@ -122,4 +91,4 @@
+ # Otherwise you have to build them from the examples directory.
+ ######################################################################
+
+-#CONFIG += QwtExamples
++CONFIG += QwtExamples
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101103/8ad2116e/attachment-0001.html>
More information about the macports-changes
mailing list