[73110] trunk/dports/graphics/qwtplot3d/Portfile
michaelld at macports.org
michaelld at macports.org
Wed Nov 3 19:07:44 PDT 2010
Revision: 73110
http://trac.macports.org/changeset/73110
Author: michaelld at macports.org
Date: 2010-11-03 19:07:41 -0700 (Wed, 03 Nov 2010)
Log Message:
-----------
qwtplot3d changes:
* allow use of ccache/distcc.
* better way to handle setting arch type(s).
* no longer need to fix install_name of libraries and plugins.
Modified Paths:
--------------
trunk/dports/graphics/qwtplot3d/Portfile
Modified: trunk/dports/graphics/qwtplot3d/Portfile
===================================================================
--- trunk/dports/graphics/qwtplot3d/Portfile 2010-11-04 02:05:14 UTC (rev 73109)
+++ trunk/dports/graphics/qwtplot3d/Portfile 2010-11-04 02:07:41 UTC (rev 73110)
@@ -8,7 +8,7 @@
revision 3
categories graphics science
platforms darwin
-maintainers michaelld
+maintainers michaelld openmaintainer
description Qt-based 3D-widgets
long_description Feature-rich Qt / OpenGL-based C++ programming library, \
@@ -22,16 +22,29 @@
checksums md5 2f14660152e2e26bfeaaeec479ed9f2b \
sha1 4463fafb8420a91825e165da7a296aaabd70abea \
rmd160 0f28462cb95ef6091d73642c8b26ece60d50bfb8
+platforms darwin
+patchfiles patch-qwtplot3d.pro.diff
+
+# use any QWT version, but default to 5.2
+depends_lib-append path:lib/libqwt.dylib:qwt52
+
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
@@ -41,67 +54,35 @@
PortGroup qt4 1.0
}
-configure.cmd ${qt_qmake_cmd}
-configure.pre_args
+# check arch of libraries on which this port depends
+archcheck.files-append lib/libqwt.dylib
-variant qwt conflicts qwt52 description {Use qwt} {
- depends_lib-append port:qwt
-}
+post-patch {
+ # setup for debug, if selected
+ if {[variant_isset debug]} {
+ reinplace "/CONFIG/s at release@debug_and_release build_all@" \
+ ${worksrcpath}/qwtplot3d.pro
+ }
-variant qwt52 conflicts qwt description {Use qwt52} {
- depends_lib-append port:qwt52
+ # set arch type(s)
+ reinplace "s/@ARCHES@/${qt_arch_types}/g" \
+ ${worksrcpath}/qwtplot3d.pro
}
-if {![variant_isset qwt] && ![variant_isset qwt52]} {
- default_variants +qwt52
-}
+configure.cmd ${qt_qmake_cmd}
+configure.pre_args INSTALLBASE="${prefix}"
-variant debug description "Build release and debug versions" {}
+# qmake does not handle these flags flags
+configure.universal_args-delete --disable-dependency-tracking
+configure.args-delete --disable-dependency-tracking
-post-patch {
- # tweak the qwtplot3d.pro file. add key for later reinplace for
- # archs, no matter the status of the debug or universal variants.
- reinplace "/CONFIG/s/debug/debug @UNIVERSAL_TYPES@/g" \
- ${worksrcpath}/qwtplot3d.pro
- if {![variant_isset debug]} {
- # remove 'debug' from the qwtplot3d.pro file
- reinplace "s at debug@@g" ${worksrcpath}/qwtplot3d.pro
+# allow ccache, if specified by the user
+pre-build {
+ if {[tbool configure.ccache]} {
+ build.post_args "CCACHE=ccache"
}
- set qca_arch_types_str ""
- 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 ""
- foreach arch ${universal_archs} {
- lappend qca_arch_types $macports_to_qt_build_arch($arch)
- }
- set qca_arch_types_str [join ${qca_arch_types} " "]
- }
- reinplace "s/@UNIVERSAL_TYPES@/${qca_arch_types_str}/g" \
- ${worksrcpath}/qwtplot3d.pro
}
-variant universal {
- # remove from universal configure flags
- configure.universal_args-delete --disable-dependency-tracking
-}
+universal_variant yes
-patch {
- reinplace "s|0.2.6|${version}|g" ${worksrcpath}/qwtplot3d.pro
-}
-
-destroot {
- xinstall -m 0644 ${worksrcpath}/lib/lib${name}.${version}.dylib ${destroot}${prefix}/lib
- system "cd ${destroot}${prefix}/lib && ln -s lib${name}.${version}.dylib lib${name}.0.2.dylib"
- system "cd ${destroot}${prefix}/lib && ln -s lib${name}.${version}.dylib lib${name}.0.dylib"
- system "cd ${destroot}${prefix}/lib && ln -s lib${name}.${version}.dylib lib${name}.dylib"
- xinstall -m 755 -d ${destroot}${prefix}/include/${name}
- eval xinstall -m 0644 [glob ${worksrcpath}/include/*] ${destroot}${prefix}/include/${name}
- system "install_name_tool -id ${prefix}/lib/lib${name}.${version}.dylib ${destroot}${prefix}/lib/lib${name}.${version}.dylib"
-}
+variant debug description "Build release and debug versions" {}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101103/5036619f/attachment.html>
More information about the macports-changes
mailing list