source: trunk/dports/audio/phonon/Portfile

Last change on this file was 140960, checked in by michaelld@…, 2 years ago

qt4 various: change qt_dir to ${prefix}/libexec/qt4 to allow for a parallel install with qt5; rev-bump dependencies that are known to work with this change. Addresses the primary issue of #44193. Will address secondary issues down the road.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# -*- 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
2# $Id: Portfile 140960 2015-10-06 20:13:45Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           qt4 1.0
6PortGroup           cmake 1.0
7
8name                phonon
9version             4.8.3
10revision            2
11categories          audio kde kde4
12license             {LGPL-2.1 LGPL-3}
13maintainers         michaelld openmaintainer
14description         Cross Platform Multimedia API used by KDE4
15long_description    Phonon is a multimedia, multi-platform sound \
16    framework for the application developer.
17platforms           darwin
18homepage            http://phonon.kde.org
19master_sites        kde:stable/${name}/${version}/src
20use_xz              yes
21distname            phonon-${version}
22checksums           rmd160 c035f253eda49635377122423bb72161f97f18d3 \
23                    sha256 a1149c961ca1570968d070bbd23671e614aa506f847ca93748960e309f85da16
24
25depends_build-append  port:automoc
26
27# fix use of CMAKE_INSTALL_NAME to be an absolute path
28
29patchfiles-append   patch-cmake_FindPhononInternal.cmake.diff
30
31# fix MODULE names to end in .dylib instead of .so
32
33patchfiles-append   patch-cmake_PhononMacros.cmake.diff
34
35# (1) fix install location of cmake module files;
36# patch here and post-patch reinplace.
37# (2) fix library compatibility version to be 4.4.0,
38# because pretty much every KDE port expects it.
39
40patchfiles-append   patch-CMakeLists.txt.diff
41
42post-patch {
43    set rel_mp_qt_cmake_dir [strsed ${qt_cmake_module_dir} "g@${qt_dir}/@@"]
44    reinplace "s|@MACPORTS_CMAKE_DIR@|${rel_mp_qt_cmake_dir}|" \
45        ${worksrcpath}/CMakeLists.txt
46}
47
48# do VPATH (out of source tree) build
49
50cmake.out_of_source yes
51
52# standard args
53
54configure.args-append   \
55    ${qt_cmake_defines} \
56    -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=TRUE \
57    -DWITH_QZeitgeist=OFF
58
59configure.ldflags-append -F${qt_frameworks_dir}
60
61post-destroot {
62
63    # link major library version name
64
65    ln -s libphonon.dylib ${destroot}${prefix}/lib/libphonon.4.dylib
66    ln -s libphononexperimental.dylib ${destroot}${prefix}/lib/libphononexperimental.4.dylib
67
68    if {[variant_isset demos]} {
69        set demos_dest_dir ${destroot}${prefix}/share/examples/phonon
70        xinstall -m 775 -d ${demos_dest_dir}
71        copy ${workpath}/build/demos/simpleplayer/simpleplayer ${demos_dest_dir}
72        copy ${workpath}/build/demos/metadatareader/metadatareader ${demos_dest_dir}
73        copy ${workpath}/build/demos/phota/phota ${demos_dest_dir}
74        copy ${workpath}/build/demos/simplecapture/simplecapture ${demos_dest_dir}
75    }
76}
77
78variant pulseaudio description "Build Phonon with additional support for PulseAudio" {
79
80    depends_lib-append port:pulseaudio
81    configure.args-append \
82        -DWITH_PulseAudio=ON \
83        -DPHONON_PULSESUPPORT=YES \
84        -DPULSEAUDIO_INCLUDE_DIR=${prefix}/include \
85        -DPULSEAUDIO_LIBRARY=${prefix}/lib/libpulse.dylib \
86        -DPULSEAUDIO_MAINLOOP_LIBRARY=${prefix}/lib/libpulse-mainloop-glib.dylib
87
88}
89
90if {![variant_isset pulseaudio]} {
91    configure.args-append \
92        -DWITH_PulseAudio=OFF \
93        -DPHONON_PULSESUPPORT=NO \
94        -DPULSEAUDIO_INCLUDE_DIR= \
95        -DPULSEAUDIO_LIBRARY= \
96        -DPULSEAUDIO_MAINLOOP_LIBRARY=
97}
98
99variant demos description "Build Phonon demos" {
100    configure.args-append -DPHONON_BUILD_DEMOS=ON
101}
102
103if {![variant_isset demos]} {
104    configure.args-append -DPHONON_BUILD_DEMOS=OFF
105}
106
107livecheck.type   regex
108livecheck.url    http://www.gtlib.gatech.edu/pub/kde/stable/${name}/
109livecheck.regex  "\(\\d+(?:\\.\\d+)*)\/"
Note: See TracBrowser for help on using the repository browser.