source: trunk/dports/graphics/qwtplot3d/Portfile @ 73110

Last change on this file since 73110 was 73110, checked in by michaelld@…, 7 years ago

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.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# -*- 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
2# $Id: Portfile 73110 2010-11-04 02:07:41Z michaelld@macports.org $
3
4PortSystem          1.0
5
6name                qwtplot3d
7version             0.2.7
8revision            3
9categories          graphics science
10platforms           darwin
11maintainers         michaelld openmaintainer
12
13description         Qt-based 3D-widgets
14long_description    Feature-rich Qt / OpenGL-based C++ programming library, \
15                    providing 3D-widgets for technical applications
16
17homepage            http://${name}.sourceforge.net
18master_sites        sourceforge:${name}
19worksrcdir          ${name}
20extract.suffix      .tgz
21
22checksums           md5    2f14660152e2e26bfeaaeec479ed9f2b \
23                    sha1   4463fafb8420a91825e165da7a296aaabd70abea \
24                    rmd160 0f28462cb95ef6091d73642c8b26ece60d50bfb8
25platforms           darwin
26
27patchfiles          patch-qwtplot3d.pro.diff
28
29# use any QWT version, but default to 5.2
30depends_lib-append  path:lib/libqwt.dylib:qwt52
31
32variant qt3 conflicts qt4 description {Use qt3-mac} {}
33
34variant qt4 conflicts qt3 description {Use qt4-mac} {}
35
36# move setting of 'qt_qmake_cmd' outside variants, since 'if'
37# statements are processed in-order while variants are processed after
38# everything else.
39set qt_qmake_cmd ""
40if {[variant_isset qt3]} {
41    depends_lib-append  port:qt3-mac
42    set qt_qmake_cmd    ${prefix}/libexec/qt3-mac/bin/qmake
43
44    PortGroup           archcheck 1.0
45    # check arch of libraries on which this port depends
46    archcheck.files-append  lib/libQtCore.dylib
47
48} else {
49    # when variant 'qt3' is not set, use qt4 whether by default or via
50    # the user's variant choice
51    if {![variant_isset qt4]} {
52        default_variants    +qt4
53    }
54    PortGroup           qt4 1.0
55}
56
57# check arch of libraries on which this port depends
58archcheck.files-append  lib/libqwt.dylib
59
60post-patch {
61    # setup for debug, if selected
62    if {[variant_isset debug]} {
63        reinplace "/CONFIG/s@release@debug_and_release build_all@" \
64            ${worksrcpath}/qwtplot3d.pro
65    }
66
67    # set arch type(s)
68    reinplace "s/@ARCHES@/${qt_arch_types}/g" \
69        ${worksrcpath}/qwtplot3d.pro
70}
71
72configure.cmd       ${qt_qmake_cmd}
73configure.pre_args  INSTALLBASE="${prefix}"
74
75# qmake does not handle these flags flags
76configure.universal_args-delete --disable-dependency-tracking
77configure.args-delete           --disable-dependency-tracking
78
79# allow ccache, if specified by the user
80pre-build {
81    if {[tbool configure.ccache]} {
82        build.post_args "CCACHE=ccache"
83    }
84}
85
86universal_variant   yes
87
88variant debug description "Build release and debug versions" {}
Note: See TracBrowser for help on using the repository browser.