25 | | # fix use of CMAKE_INSTALL_NAME to be an absolute path |
26 | | |
27 | | patchfiles-append patch-cmake_FindPhononInternal.cmake.diff |
28 | | |
29 | | # fix MODULE names to end in .dylib instead of .so |
30 | | |
31 | | patchfiles-append patch-cmake_PhononMacros.cmake.diff |
32 | | |
33 | | # (1) fix install location of cmake module files; |
34 | | # patch here and post-patch reinplace. |
35 | | # (2) fix library compatibility version to be 4.4.0, |
36 | | # because pretty much every KDE port expects it. |
37 | | |
38 | | patchfiles-append patch-CMakeLists.txt.diff |
39 | | |
40 | | post-patch { |
41 | | set rel_mp_qt_cmake_dir [strsed ${qt_cmake_module_dir} "g@${qt_dir}/@@"] |
42 | | reinplace "s|@MACPORTS_CMAKE_DIR@|${rel_mp_qt_cmake_dir}|" \ |
43 | | ${worksrcpath}/CMakeLists.txt |
44 | | } |
45 | | |
46 | | # do VPATH (out of source tree) build |
47 | | |
48 | | cmake.out_of_source yes |
49 | | |
50 | | # standard args |
| 24 | subport ${name}-qt5 { |
| 25 | PortGroup qt5 1.0 |
| 26 | PortGroup cmake 1.0 |
| 27 | categories audio kde kf5 |
| 28 | long_description Phonon is a multimedia, multi-platform sound \ |
| 29 | framework for the application developer. This is the Phonon 4\ |
| 30 | transitional library for Qt5 (API compatible with regular Phonon4) |
65 | | variant compversion440 description {Build libraries with compatibility version 4.4.0 for existing Qt4 installs expecting that} { |
66 | | # fix the library compatibility version to be 4.4.0 |
67 | | patchfiles patch-CMakeLists.txt.diff |
| 37 | if {[variant_isset demos]} { |
| 38 | set demos_dest_dir ${destroot}${prefix}/share/examples/phonon4qt5 |
| 39 | xinstall -m 775 -d ${demos_dest_dir} |
| 40 | copy ${workpath}/build/demos/simpleplayer/simpleplayer ${demos_dest_dir} |
| 41 | copy ${workpath}/build/demos/metadatareader/metadatareader ${demos_dest_dir} |
| 42 | copy ${workpath}/build/demos/phota/phota ${demos_dest_dir} |
| 43 | copy ${workpath}/build/demos/simplecapture/simplecapture ${demos_dest_dir} |
| 44 | } |
| 45 | |
| 46 | # fix library and plugin self-names |
| 47 | system "install_name_tool -id ${prefix}/lib/${LPH}.4.dylib ${destroot}${prefix}/lib/${LPH}.dylib" |
| 48 | system "install_name_tool -id ${prefix}/lib/${LPH}experimental.4.dylib ${destroot}${prefix}/lib/${LPH}experimental.dylib" |
| 49 | |
| 50 | # fix use of libphonon4qt5 |
| 51 | system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 52 | ${destroot}${prefix}/lib/${LPH}experimental.dylib" |
| 53 | system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 54 | ${destroot}${qt_plugins_dir}/designer/libphononwidgets.dylib" |
| 55 | system "install_name_tool -id libphononwidgets.dylib ${destroot}${qt_plugins_dir}/designer/libphononwidgets.dylib" |
| 56 | if {[variant_isset demos]} { |
| 57 | system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 58 | ${demos_dest_dir}/simpleplayer" |
| 59 | system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 60 | ${demos_dest_dir}/metadatareader" |
| 61 | system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 62 | ${demos_dest_dir}/phota" |
| 63 | system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 64 | ${demos_dest_dir}/simplecapture" |
| 65 | } |
75 | | if {[variant_isset demos]} { |
76 | | set demos_dest_dir ${destroot}${prefix}/share/examples/phonon |
77 | | xinstall -m 775 -d ${demos_dest_dir} |
78 | | copy ${workpath}/build/demos/simpleplayer/simpleplayer ${demos_dest_dir} |
79 | | copy ${workpath}/build/demos/metadatareader/metadatareader ${demos_dest_dir} |
80 | | copy ${workpath}/build/demos/phota/phota ${demos_dest_dir} |
81 | | copy ${workpath}/build/demos/simplecapture/simplecapture ${demos_dest_dir} |
82 | | } |
83 | | } |
| 75 | # fix MODULE names to end in .dylib instead of .so |
| 76 | patchfiles-append patch-cmake_PhononMacros.cmake.diff |
106 | | variant demos description "Build Phonon demos" { |
107 | | configure.args-append -DPHONON_BUILD_DEMOS=ON |
| 98 | if {${subport} ne "${name}-qt5"} { |
| 99 | PortGroup qt4 1.0 |
| 100 | PortGroup cmake 1.0 |
| 101 | categories audio kde kde4 |
| 102 | long_description Phonon is a multimedia, multi-platform sound \ |
| 103 | framework for the application developer. |
| 104 | # do we really depend on port:automoc, because cmake prints |
| 105 | # -- Using CMake automoc builtin |
| 106 | depends_build-append port:automoc |
| 107 | |
| 108 | variant compversion440 description {Build libraries with compatibility version 4.4.0 for existing Qt4 installs expecting that} { |
| 109 | # fix the library compatibility version to be 4.4.0 |
| 110 | patchfiles-append patch-CMakeLists.txt.diff |
| 111 | } |
| 112 | |
| 113 | set LPH libphonon |
| 114 | post-destroot { |
| 115 | |
| 116 | global demos_dest_dir |
| 117 | if {[variant_isset demos]} { |
| 118 | set demos_dest_dir ${destroot}${prefix}/share/examples/phonon |
| 119 | xinstall -m 775 -d ${demos_dest_dir} |
| 120 | copy ${workpath}/build/demos/simpleplayer/simpleplayer ${demos_dest_dir} |
| 121 | copy ${workpath}/build/demos/metadatareader/metadatareader ${demos_dest_dir} |
| 122 | copy ${workpath}/build/demos/phota/phota ${demos_dest_dir} |
| 123 | copy ${workpath}/build/demos/simplecapture/simplecapture ${demos_dest_dir} |
| 124 | } |
| 125 | |
| 126 | if {[variant_isset compversion440]} { |
| 127 | # link major library version name |
| 128 | ln -s ${prefix}/lib/${LPH}.dylib ${destroot}${prefix}/lib/${LPH}.4.dylib |
| 129 | ln -s ${prefix}/lib/${LPH}experimental.dylib ${destroot}${prefix}/lib/${LPH}experimental.4.dylib |
| 130 | |
| 131 | set DLVERS 4.4.0 |
| 132 | } else { |
| 133 | set DLVERS 4 |
| 134 | } |
| 135 | |
| 136 | # fix library and plugin self-names |
| 137 | system "install_name_tool -id ${prefix}/lib/${LPH}.4.dylib ${destroot}${prefix}/lib/${LPH}.dylib" |
| 138 | system "install_name_tool -id ${prefix}/lib/${LPH}experimental.4.dylib ${destroot}${prefix}/lib/${LPH}experimental.dylib" |
| 139 | |
| 140 | # fix use of libphonon |
| 141 | system "install_name_tool -change lib/${LPH}.${DLVERS}.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 142 | ${destroot}${prefix}/lib/${LPH}experimental.dylib" |
| 143 | system "install_name_tool -change lib/${LPH}.${DLVERS}.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 144 | ${destroot}${qt_plugins_dir}/designer/libphononwidgets.dylib" |
| 145 | if {[variant_isset demos]} { |
| 146 | system "install_name_tool -change lib/${LPH}.${DLVERS}.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 147 | ${demos_dest_dir}/simpleplayer" |
| 148 | system "install_name_tool -change lib/${LPH}.${DLVERS}.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 149 | ${demos_dest_dir}/metadatareader" |
| 150 | system "install_name_tool -change lib/${LPH}.${DLVERS}.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 151 | ${demos_dest_dir}/phota" |
| 152 | system "install_name_tool -change lib/${LPH}.${DLVERS}.dylib ${prefix}/lib/${LPH}.4.dylib \ |
| 153 | ${demos_dest_dir}/simplecapture" |
| 154 | } |
| 155 | } |