# -*- 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
license {LGPL-2.1 LGPL-3}
maintainers {michaelld @michaelld} openmaintainer
description Cross Platform Multimedia API used by KDE4
homepage http://phonon.kde.org
master_sites kde:stable/${name}/${version}
distname phonon-${version}
checksums rmd160 d38d582aabb45e175e12aeeacac9b08e0ccab6db \
sha256 e2c10ecc7d2f3d3a0f80a63def789a875420b3d90062c26718dcfdaab8a5d03f
variant demos description {Build the demos} {
configure.args-append -DPHONON_BUILD_DEMOS:BOOL=ON
long_description Phonon is a multimedia, multi-platform sound \
framework for the application developer. This is the Phonon 4\
transitional library for Qt5 (API compatible with regular Phonon4)
depends_build-append port:kde-extra-cmake-modules
configure.args-append -DPHONON_BUILD_PHONON4QT5:BOOL=ON
if {[variant_isset demos]} {
set demos_dest_dir ${destroot}${prefix}/share/examples/phonon4qt5
xinstall -m 775 -d ${demos_dest_dir}
copy ${workpath}/build/demos/simpleplayer/simpleplayer.app ${demos_dest_dir}
copy ${workpath}/build/demos/metadatareader/metadatareader.app ${demos_dest_dir}
copy ${workpath}/build/demos/phota/phota.app ${demos_dest_dir}
copy ${workpath}/build/demos/simplecapture/simplecapture.app ${demos_dest_dir}
# fix library and plugin self-names
system "install_name_tool -id ${prefix}/lib/${LPH}.4.dylib ${destroot}${prefix}/lib/${LPH}.dylib"
system "install_name_tool -id ${prefix}/lib/${LPH}experimental.4.dylib ${destroot}${prefix}/lib/${LPH}experimental.dylib"
# fix use of libphonon4qt5
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \
${destroot}${prefix}/lib/${LPH}experimental.dylib"
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \
${destroot}${qt_plugins_dir}/designer/phononwidgets.dylib"
system "install_name_tool -id phononwidgets.dylib ${destroot}${qt_plugins_dir}/designer/phononwidgets.dylib"
if {[variant_isset demos]} {
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \
${demos_dest_dir}/simpleplayer.app/Contents/MacOS/simpleplayer"
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \
${demos_dest_dir}/metadatareader.app/Contents/MacOS/metadatareader"
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \