# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
maintainers {michaelld @michaelld} openmaintainer
description QtScript bindings generator.
long_description Qt Script Generator is a tool that generates \
Qt bindings for Qt Script. With the generated bindings you get \
access to substantial portions of the Qt API from within Qt Script.
homepage http://labs.trolltech.com/page/Projects/QtScript/Generator
distname ${name}-src-${version}
master_sites http://qtscriptgenerator.googlecode.com/files/
checksums md5 9f82b0aa212f7938de37df46cd27165c \
sha1 4c1078f26b196156e857c17c9d11a66cfea66f00 \
rmd160 01c8ce3b4c8e9ebb3bc3c2d7b319846f34baee04
depends_build-append port:automoc
depends_lib-append port:phonon
patchfiles patch-generator.diff \
patch-generator_typesystem_phonon-qtscript.xml.diff \
patch-generator_typesystem_phonon.xml.diff \
debian_drop_extra_linkage_fix.diff \
debian_qs_eval_globalize.diff \
upstream_memory_alignment_fix.diff \
upstream_support_later_phonon.diff \
remove-QtScriptFutureIterator.diff \
patch-include-everything.diff \
patch-build-system-for-MacPorts.diff
# check for +debug variant of this port, and make sure phonon was
# installed with +debug as well; if not, error out. phonon checks to
# make sure Qt was installed with +debug, so it is OK if this stage
# overrides that provided in the qt4 portgroup.
if {[variant_exists debug] && \
[variant_isset debug] && \
![info exists building_qt4]} {
if {![file exists ${prefix}/lib/libphonon_debug.dylib]} {
return -code error "\n\nERROR:\n\
In order to install this port as +debug,
Phonon \(and Qt4\) must also be installed with +debug.\n"
# copy the QMake build script into place
copy ${filespath}/qtsg.pro ${worksrcpath}
reinplace "s|@QT_FRAMEWORKS_DIR@|${qt_frameworks_dir}|g" \
${worksrcpath}/generator/main.h
reinplace -W ${worksrcpath} "s|@QT_INCLUDES_DIR@|${qt_includes_dir}|g" \
generator/generator.pri \
qtbindings/qtbindingsbase.pri
reinplace -W ${worksrcpath} "s|@PREFIX@|${prefix}|g" \
generator/generator.pri \
qtbindings/qtbindingsbase.pri
reinplace "s|@CC@|${configure.cc}|g" \
reinplace "s|@CXX@|${configure.cxx}|g" \
# allow for universal and non-native building if just the
# qtbinding scripts, not the generator (which is solely used for
# generating the scripts)
reinplace "s/@ARCHES@/${qt_arch_types}/" \
${worksrcpath}/qtbindings/qtbindingsbase.pri
# fix up qtbindings QMake build file to handle debug and release
if {[variant_isset debug]} {
set build_type "debug_and_release build_all"
reinplace "s/@BUILD_TYPE@/${build_type}/" \
${worksrcpath}/qtbindings/qtbindingsbase.pri
# set up to use the installed QMake files
configure.cmd ${qt_qmake_cmd}