Skip to content

Commit

Permalink
Add QWT 6.1.3 support for both Qt4 and Qt5.
Browse files Browse the repository at this point in the history
  • Loading branch information
Veence committed Apr 18, 2017
1 parent 3fa248d commit 821897a
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions graphics/qwt/Portfile
Expand Up @@ -68,12 +68,19 @@ subport qwt61 {
conflicts qwt qwt52 qwt60
checksums rmd160 1e36e79dab0ecc4df89d9fb20607925fe261c6b3 \
sha256 f3ecd34e72a9a2b08422fb6c8e909ca76f4ce5fa77acad7a2883b701f4309733
use_parallel_build yes

patchfiles patch-designer_designer.pro.61.diff \
patch-qwtconfig.pri.61.diff \
patch-qwtbuild.pri.61.diff
livecheck.url http://sourceforge.net/api/file/index/project-id/13693/mtime/desc/rss
livecheck.regex \\/qwt\\/(6\\.1\\.\\d+)\\/
post-patch {
reinplace "s|@INSTALL_DOCS@@|${qt_docs_dir}/${subport}|" \
${worksrcpath}/qwtconfig.pri
reinplace "s|@INSTALL_HEADERS@@|${qt_includes_dir}|" \
${worksrcpath}/qwtconfig.pri
}

}

Expand Down Expand Up @@ -124,8 +131,13 @@ post-patch {
# setup for examples, if selected

if {![variant_isset examples]} {
# I presume this worked with qwt < 6.1
reinplace "s@QwtExamples@@" \
${worksrcpath}/qwtconfig.pri
} else {
# qwt 6.1.2 disables the examples by default, so reenable them when requested
reinplace "s@#QWT_CONFIG += QwtExamples@QWT_CONFIG += QwtExamples@" \
${worksrcpath}/qwtconfig.pri
}
}

Expand Down Expand Up @@ -167,19 +179,26 @@ if {${qwt_major} < 6} {
# QWT 6+ uses Qt4+ only
if {![variant_isset qt5]} {
PortGroup qt4 1.0
PortGroup qmake 1.0
} else {
PortGroup qt5 1.0
#PortGroup qt5 1.0
PortGroup qmake5 1.0
set qt_arch_types "x86_64"
post-patch {
reinplace "s|QT_STATIC_CONST|static const|" \
${worksrcpath}/src/qwt_scale_map.cpp \
${worksrcpath}/src/qwt_scale_map.h
reinplace "s/QT_INSTALL_FRAMEWORKS/QT_INSTALL_LIBS/" \
${worksrcpath}/qwtconfig.pri
}
configure.args-append \
-config absolute_library_soname
}
}

configure.cmd ${qt_qmake_cmd}
configure.pre_args INSTALLBASE="${prefix}"
# configure.cmd ${qt_qmake_cmd}
# configure.pre_args-delete --prefix=${prefix}
configure.pre_args-append INSTALLBASE="${prefix}"

# qmake does not handle these flags
configure.universal_args-delete --disable-dependency-tracking
Expand Down Expand Up @@ -247,6 +266,13 @@ post-destroot {
}
}
}
if {[variant_isset examples]} {
set exdir ${destroot}${qt_examples_dir}/${subport}
xinstall -d -m 755 ${exdir}
foreach bin [glob -nocomplain ${build.dir}/examples/bin/*] {
copy ${bin} ${exdir}
}
}
}

variant debug description "Build release and debug versions" {}
Expand Down

0 comments on commit 821897a

Please sign in to comment.