aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory M. Tuner <gmt@be-evil.net>2014-06-26 21:05:41 -0700
committerGregory M. Tuner <gmt@be-evil.net>2014-06-26 21:05:41 -0700
commit1aee0ab81685497b8e066896f3e6ba4f05daf7a1 (patch)
treebc69f5c28adee92d4bb1eac46f6cef25a1524a44 /media-libs
parentmedia-libs/phonon: revbump/merge, atoms (diff)
downloadgmt-1aee0ab81685497b8e066896f3e6ba4f05daf7a1.tar.gz
gmt-1aee0ab81685497b8e066896f3e6ba4f05daf7a1.tar.bz2
gmt-1aee0ab81685497b8e066896f3e6ba4f05daf7a1.zip
media-libs/phonon-gstreamer: conquer!
Holy shit that was hard. This fixes phonon-gstreamer to actually work. Not sure why it stopped working -- maybe some upstream change in the phonon buildsystem code, or as a consequence of having dropped various overlay builds with wrapped executables for upstream alternates that lack them. Anyhow this gets 'er done. Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/phonon-gstreamer/Manifest6
-rw-r--r--media-libs/phonon-gstreamer/files/phonon-gstreamer-4.7.2-FindPhonon-multilib.patch51
-rw-r--r--media-libs/phonon-gstreamer/phonon-gstreamer-4.7.1-r1.ebuild103
-rw-r--r--media-libs/phonon-gstreamer/phonon-gstreamer-4.7.2-r1.ebuild159
-rw-r--r--media-libs/phonon-gstreamer/phonon-gstreamer-9999.ebuild159
5 files changed, 373 insertions, 105 deletions
diff --git a/media-libs/phonon-gstreamer/Manifest b/media-libs/phonon-gstreamer/Manifest
index bf63135..e3a00b5 100644
--- a/media-libs/phonon-gstreamer/Manifest
+++ b/media-libs/phonon-gstreamer/Manifest
@@ -1,4 +1,6 @@
-DIST phonon-backend-gstreamer-4.7.1.tar.xz 75528 SHA256 7859782fb3d304e1d0363e665feecb7d3b64a712705dc326151c6402fef6f2ca SHA512 a176e2647710f9e6c1b6afb371c30c27a9c1a10fe29e03957ea82f762396f6c4463f40d47a6e5fe00fdac4c82bc51c5e162dbeee56c30398e1582f5346f82950 WHIRLPOOL 7517e5fc8196dd0d7ad55da515342d85ba1b7d0efed3ada4d54fd80679e41ff07fba3289ed8619413f3c71a0c63e369a5a1f9d000006615b84ef6e31cf0a2de6
-EBUILD phonon-gstreamer-4.7.1-r1.ebuild 2567 SHA256 66d5aa5b2fa0c395aa67468958a8c8b36595ffc7a08593112decf7b7686a31e3 SHA512 102335c47e160aac9fb29c52a91c302acc378211d913b3082260e23d0cb5c5506be45d31e89f26866e1f39a7515b467e369b5f4e7db4b3bb7b3b89389cf70ef1 WHIRLPOOL 00ce85827af6d87d6cf9640122691c7a5b8759fe6bbad2384deeffdc681fba55548d4503c4e5a5dcad3bd96f2f30d7aa02f2201082a7e837f4cd50cada7bf1a4
+AUX phonon-gstreamer-4.7.2-FindPhonon-multilib.patch 2292 SHA256 a2091877659fd4c2542dbcdaa10d670dd0ce6cd0f5ab02ef84fe095cb3e4aef0 SHA512 d873931353be10516503f6f130b4db8ae3e6da605bc9684fb5b9e9f6e69e5c38e991adc85c1cf338922a202924eba8962e1bbe523541cab08e46bc25e22ef34e WHIRLPOOL 3e0e8b0d772e16fe0d3bf06d707930455992e7e4d09f1069949b1362de186d05103f4c10101d59af1010f70a750ad5392463db1a11cbcef224496ce6844e10e5
+DIST phonon-backend-gstreamer-4.7.2.tar.xz 75552 SHA256 80b72a9092f540dd0a2abd2898328f3d5f9febfa073b0b1d44592a050a99d2b1 SHA512 d8cf408261f80de7ac29101c3613002a0e838f07e6c8dad2d3922a522a27be167ef8f17a8ab0c99c06c1b75cb4d9d68acee03cb60cf4a44dc2248b7b0dafae08 WHIRLPOOL 368f9784d2ea6fbb3d105fe4645af308bca975bac4cf21908a344d04ab76dd56d5a83ce9a4347a3d664f1830b65de4d40e12b663bcdf91170a4df38bdeb479af
+EBUILD phonon-gstreamer-4.7.2-r1.ebuild 4114 SHA256 de45ede6751d1aa30766b96f32107eca826fa517cd97d942a8ecdde62f62f9b0 SHA512 f7682fc662c71c2e06483aa373fd04f5057555aacdeb020a237847b9c63729a3c0a600f2f88d8cd6509f155fc30a183a9a675de9e97d27ff11db6c7e6ac3cac6 WHIRLPOOL 21a78508c7114b525be1fd0d7e12ceb55a7ec4b9ea1ddf1330983c167d2a36ee38f702e930e736ebb19438d5f5680993af785d33832fe0e9d3247635a0b8b161
+EBUILD phonon-gstreamer-9999.ebuild 3945 SHA256 ab726ef0194fc9fdc4e381d7a53e092c02daa9b51f254aa1528d6cc3dc01332d SHA512 4a6e74eec5218336492bfbcc4e20f6ac2746206824e9cf10c400fb37c4882111ac5b3fd50e04a2484f21972de005f8b4ef6b469f6b8697e0266faefeb746906b WHIRLPOOL 66bad7f3338ac817b052947f5ac9a5ec88342438b345d4d44de5aab2f0dd402dad769873990af5d540e04f20878b8347d1f05aac2d8caa88034c08a5b85651e8
MISC ChangeLog 8142 SHA256 6b6b44ae59370e1fab64cadd49dae94f4a893e9602c7af957f34a991bbb87153 SHA512 23a1ef16995027962928bf248e82b5acff23c47e013ecd9cd8eb9e2b52685cbd39a36cc953d3c8073690d7076982d39922041c47d46720001d7440ade49345ed WHIRLPOOL 41422673da76f6428b18657e43704de723890f3e46e3a26a36a4202ff42dcedf2f76d5f8603e864f381b41b9a50d36b09f7e17e58de6a235f8cdaca9ab1ff437
MISC metadata.xml 244 SHA256 4e62785c5651e1802026dce1b7fe721cbd9bc2f24bd59ec5f839e47af0ac8c58 SHA512 dcce9ee0215b078568f17854200c539f12e1225b42411c088d002e5089e9c5e0e324673e155fe396fd71e480576c1ef1bbe662edf333f82fa623cf3eefd86702 WHIRLPOOL 5e9f0369159fa7b195aca60aa622ec8248fb0fd8a9cf08b5abe4e54a72eba8d666ad9a8820915e79daefe347ecb1766cb4a6716777e04b214f85dd6584e39334
diff --git a/media-libs/phonon-gstreamer/files/phonon-gstreamer-4.7.2-FindPhonon-multilib.patch b/media-libs/phonon-gstreamer/files/phonon-gstreamer-4.7.2-FindPhonon-multilib.patch
new file mode 100644
index 0000000..83373f7
--- /dev/null
+++ b/media-libs/phonon-gstreamer/files/phonon-gstreamer-4.7.2-FindPhonon-multilib.patch
@@ -0,0 +1,51 @@
+diff -urpN phonon-backend-gstreamer-4.7.2.orig/cmake/FindPhonon.cmake phonon-backend-gstreamer-4.7.2/cmake/FindPhonon.cmake
+--- phonon-backend-gstreamer-4.7.2.orig/cmake/FindPhonon.cmake 2014-06-20 01:39:03.000000000 -0700
++++ phonon-backend-gstreamer-4.7.2/cmake/FindPhonon.cmake 2014-06-26 20:58:33.323213780 -0700
+@@ -6,24 +6,27 @@
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+-set(PKG UndefinedPhononPackage)
+-if(PHONON_BUILD_PHONON4QT5)
+- set(PKG Phonon4Qt5)
++if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
++ set(PHONON_FIND_QUIETLY TRUE)
+ else()
+- set(PKG Phonon)
+-endif()
+-
+-find_package(${PKG} NO_MODULE)
+-
+-if(PHONON_BUILDSYSTEM_DIR)
+- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PHONON_BUILDSYSTEM_DIR})
+- # Prevent double-include of internals, and make sure they are included
+- # In Phonon <4.7 the internals were auto-included, in >=4.7 they are not.
+- if(NOT COMMAND phonon_add_executable)
+- include(${PHONON_BUILDSYSTEM_DIR}/FindPhononInternal.cmake )
+- endif()
+-endif()
+-
+-include(FindPackageHandleStandardArgs)
+-
+-find_package_handle_standard_args(${PKG} DEFAULT_MSG ${PKG}_DIR )
++ set(PKG UndefinedPhononPackage)
++ if(PHONON_BUILD_PHONON4QT5)
++ set(PKG Phonon4Qt5)
++ find_package(Phonon4Qt5 NO_MODULE HINTS "$ENV{EPREFIX}/usr/lib${LIB_SUFFIX}/cmake/phonon4qt5")
++ if(Phonon4Qt5_FOUND)
++ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PHONON_BUILDSYSTEM_DIR})
++ include(${PHONON_BUILDSYSTEM_DIR}/FindPhononInternal.cmake )
++ endif()
++ include(FindPackageHandleStandardArgs)
++ find_package_handle_standard_args(Phonon4Qt5 DEFAULT_MSG Phonon4Qt5_DIR )
++ else()
++ set(PKG Phonon)
++ find_package(Phonon NO_MODULE HINTS "$ENV{EPREFIX}/usr/lib${LIB_SUFFIX}/cmake/phonon")
++ if(Phonon_FOUND)
++ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PHONON_BUILDSYSTEM_DIR})
++ include(${PHONON_BUILDSYSTEM_DIR}/FindPhononInternal.cmake )
++ endif()
++ include(FindPackageHandleStandardArgs)
++ find_package_handle_standard_args(Phonon DEFAULT_MSG Phonon_DIR )
++ endif(PHONON_BUILD_PHONON4QT5)
++endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
diff --git a/media-libs/phonon-gstreamer/phonon-gstreamer-4.7.1-r1.ebuild b/media-libs/phonon-gstreamer/phonon-gstreamer-4.7.1-r1.ebuild
deleted file mode 100644
index fb4690b..0000000
--- a/media-libs/phonon-gstreamer/phonon-gstreamer-4.7.1-r1.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=5
-
-[[ ${PV} == *9999 ]] && git_eclass="git-r3"
-EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
-
-MY_PN="phonon-backend-gstreamer"
-MY_P=${MY_PN}-${PV}
-
-CMAKE_IN_SOURCE_BUILD=1
-
-inherit cmake-multilib multibuild ${git_eclass}
-
-DESCRIPTION="Phonon GStreamer backend"
-HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon/phonon-gstreamer"
-[[ ${PV} == *9999 ]] || SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/${MY_P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-if [[ ${PV} == *9999 ]]; then
- KEYWORDS=""
-else
- KEYWORDS="~amd64"
-fi
-SLOT="0"
-IUSE="alsa debug +network +qt4 qt5"
-REQUIRED_USE="|| ( qt4 qt5 )"
-
-RDEPEND="
- media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
- media-plugins/gst-plugins-meta:0.10[alsa?,ogg,vorbis,${MULTILIB_USEDEP}]
- >=media-libs/phonon-4.7.0[qt4?,qt5?,${MULTILIB_USEDEP}]
- qt4? (
- dev-qt/qtcore:4[glib,${MULTILIB_USEDEP}]
- dev-qt/qtgui:4[glib,${MULTILIB_USEDEP}]
- dev-qt/qtopengl:4[${MULTILIB_USEDEP}]
- )
- qt5? (
- dev-qt/qtcore:5[glib,${MULTILIB_USEDEP}]
- dev-qt/qtgui:5[glib,${MULTILIB_USEDEP}]
- dev-qt/qtopengl:5[${MULTILIB_USEDEP}]
- )
- virtual/opengl[${MULTILIB_USEDEP}]
- network? ( media-plugins/gst-plugins-soup:0.10[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}
- qt4? ( >=dev-util/automoc-0.9.87 )
- virtual/pkgconfig
-"
-
-[[ ${PV} == 9999 ]] || S=${WORKDIR}/${MY_P}
-
-pkg_setup() {
- MULTIBUILD_VARIANTS=()
- if use qt4; then
- MULTIBUILD_VARIANTS+=(qt4)
- fi
- if use qt5; then
- MULTIBUILD_VARIANTS+=(qt5)
- fi
-}
-
-src_prepare() {
- myprepare() {
- cmake-multilib_src_prepare
- # sigh -- we just want to copy from ${S} to ${BUILD_DIR}-${ml-ABI} directories,
- # but as there's no straightforward way to make that happen directly, intermediate
- # ${BUILD_DIR} directories must be created, even though they serve no purpose.
- cd ..
- rm -rf ${BUILD_DIR}
- }
- multibuild_copy_sources
- multibuild_foreach_variant myprepare
-}
-
-src_configure() {
- myconfigure() {
- local mycmakeargs=(-DPhonon_DIR="${EPREFIX}"/usr/@GET_LIBDIR@/cmake/phonon)
- if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
- mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
- fi
- if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
- mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
- fi
- cmake-multilib_src_configure
- }
-
- multibuild_foreach_variant myconfigure
-}
-
-src_compile() {
- multibuild_foreach_variant cmake-multilib_src_compile
-}
-
-src_install() {
- multibuild_foreach_variant cmake-multilib_src_install
-}
-
-src_test() {
- multibuild_foreach_variant cmake-multilib_src_test
-}
diff --git a/media-libs/phonon-gstreamer/phonon-gstreamer-4.7.2-r1.ebuild b/media-libs/phonon-gstreamer/phonon-gstreamer-4.7.2-r1.ebuild
new file mode 100644
index 0000000..724c8d9
--- /dev/null
+++ b/media-libs/phonon-gstreamer/phonon-gstreamer-4.7.2-r1.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v1
+# $Header: $
+
+EAPI=5
+
+[[ ${PV} == *9999 ]] && git_eclass="git-r3"
+EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+
+MY_PN="phonon-backend-gstreamer"
+MY_P=${MY_PN}-${PV}
+
+inherit my-god-its-full-of-quotation-marks cmake-multilib multibuild ${git_eclass}
+
+DESCRIPTION="Phonon GStreamer backend"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon/phonon-gstreamer"
+[[ ${PV} == *9999 ]] || SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/src/${MY_P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+if [[ ${PV} == *9999 ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64"
+fi
+SLOT="0"
+IUSE="alsa debug +network +qt4 qt5"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+# fixme: qt5 atoms need to be multilibutized.
+RDEPEND="
+ >=media-libs/gstreamer-0.10.36-r2:0.10[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-0.10.36-r1:0.10[${MULTILIB_USEDEP}]
+ >=media-plugins/gst-plugins-meta-0.10-r9:0.10[alsa?,ogg,vorbis,${MULTILIB_USEDEP}]
+ >=media-libs/phonon-4.7.2[qt4?,qt5?,${MULTILIB_USEDEP}]
+ qt4? (
+ >=dev-qt/qtcore-4.8.5-r2:4[glib,${MULTILIB_USEDEP}]
+ >=dev-qt/qtgui-4.8.5-r3:4[glib,${MULTILIB_USEDEP}]
+ >=dev-qt/qtopengl-4.8.5-r1:4[${MULTILIB_USEDEP}]
+ )
+ qt5? (
+ dev-qt/qtcore:5[glib,${MULTILIB_USEDEP}]
+ dev-qt/qtgui:5[glib,${MULTILIB_USEDEP}]
+ dev-qt/qtopengl:5[${MULTILIB_USEDEP}]
+ dev-qt/qtwidgets:5[${MULTILIB_USEDEP}]
+ )
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ network? (
+ >=media-plugins/gst-plugins-soup-0.10.31-r1:0.10[${MULTILIB_USEDEP}]
+ )
+"
+DEPEND="${RDEPEND}
+ qt4? ( >=dev-util/automoc-0.9.87 )
+ virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}/${P}-FindPhonon-multilib.patch" )
+
+[[ ${PV} == 9999 ]] || S=${WORKDIR}/${MY_P}
+
+CMAKE_IN_SOURCE_BUILD=1
+
+setup_qt_variants() {
+ MULTIBUILD_VARIANTS=()
+ if use qt4; then
+ MULTIBUILD_VARIANTS+=(qt4)
+ fi
+ if use qt5; then
+ MULTIBUILD_VARIANTS+=(qt5)
+ fi
+}
+
+foreach_qt_variant() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+
+ local MULTIBUILD_VARIANTS=()
+ setup_qt_variants
+
+ # FIXME: stupidly clever construct
+ _localizing_wrapper \
+ multibuild_foreach_variant _localizing_wrapper \
+ run_in_build_dir "$@"
+}
+
+# FIXME: figure out if this is really needed; if so, make
+# it magically no longer neccesary
+_localizing_wrapper() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+
+ local S="${S}"
+ local BUILD_DIR="${BUILD_DIR}"
+ local CMAKE_USE_DIR="${BUILD_DIR}"
+ local ECONF_SOURCE="${ECONF_SOURCE}"
+ "$@"
+}
+
+src_prepare() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+ debug-print "${FUNCNAME}: BUILD_DIR=\"${BUILD_DIR}\""
+
+ qt_copy_variants() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+ debug-print "${FUNCNAME}: BUILD_DIR=\"${BUILD_DIR}\""
+
+ local MULTIBUILD_VARIANTS=()
+ setup_qt_variants
+ multibuild_copy_sources
+ # sigh -- ${BUILD_DIR} is not used, just the copies.
+ cd .. || die
+ rm -rf ${BUILD_DIR} || die
+ mkdir ${BUILD_DIR} || die
+ }
+ cmake-multilib_src_prepare
+ multilib_foreach_abi _localizing_wrapper qt_copy_variants
+}
+
+multilib_src_configure() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+ debug-print "${FUNCNAME}: BUILD_DIR=\"${BUILD_DIR}\""
+
+ qt_variant_configure() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+ debug-print "${FUNCNAME}: BUILD_DIR=\"${BUILD_DIR}\""
+
+ # localize mycmakeargs
+ local mycmakeargs=("${mycmakeargs[@]}")
+
+ # find correct multilib Phonon package
+ local Phonon_DIR="${EPREFIX}/usr/$(get_libdir)/phonon"
+ export Phonon_DIR
+
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+ }
+
+ foreach_qt_variant qt_variant_configure
+}
+
+multilib_src_compile() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+
+ foreach_qt_variant cmake-utils_src_compile
+}
+
+multilib_src_install() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+
+ foreach_qt_variant cmake-utils_src_install
+}
+
+multilib_src_test() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+
+ foreach_qt_variant cmake-utils_src_test
+}
diff --git a/media-libs/phonon-gstreamer/phonon-gstreamer-9999.ebuild b/media-libs/phonon-gstreamer/phonon-gstreamer-9999.ebuild
new file mode 100644
index 0000000..724c8d9
--- /dev/null
+++ b/media-libs/phonon-gstreamer/phonon-gstreamer-9999.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v1
+# $Header: $
+
+EAPI=5
+
+[[ ${PV} == *9999 ]] && git_eclass="git-r3"
+EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+
+MY_PN="phonon-backend-gstreamer"
+MY_P=${MY_PN}-${PV}
+
+inherit my-god-its-full-of-quotation-marks cmake-multilib multibuild ${git_eclass}
+
+DESCRIPTION="Phonon GStreamer backend"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon/phonon-gstreamer"
+[[ ${PV} == *9999 ]] || SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/src/${MY_P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+if [[ ${PV} == *9999 ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64"
+fi
+SLOT="0"
+IUSE="alsa debug +network +qt4 qt5"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+# fixme: qt5 atoms need to be multilibutized.
+RDEPEND="
+ >=media-libs/gstreamer-0.10.36-r2:0.10[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-0.10.36-r1:0.10[${MULTILIB_USEDEP}]
+ >=media-plugins/gst-plugins-meta-0.10-r9:0.10[alsa?,ogg,vorbis,${MULTILIB_USEDEP}]
+ >=media-libs/phonon-4.7.2[qt4?,qt5?,${MULTILIB_USEDEP}]
+ qt4? (
+ >=dev-qt/qtcore-4.8.5-r2:4[glib,${MULTILIB_USEDEP}]
+ >=dev-qt/qtgui-4.8.5-r3:4[glib,${MULTILIB_USEDEP}]
+ >=dev-qt/qtopengl-4.8.5-r1:4[${MULTILIB_USEDEP}]
+ )
+ qt5? (
+ dev-qt/qtcore:5[glib,${MULTILIB_USEDEP}]
+ dev-qt/qtgui:5[glib,${MULTILIB_USEDEP}]
+ dev-qt/qtopengl:5[${MULTILIB_USEDEP}]
+ dev-qt/qtwidgets:5[${MULTILIB_USEDEP}]
+ )
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ network? (
+ >=media-plugins/gst-plugins-soup-0.10.31-r1:0.10[${MULTILIB_USEDEP}]
+ )
+"
+DEPEND="${RDEPEND}
+ qt4? ( >=dev-util/automoc-0.9.87 )
+ virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}/${P}-FindPhonon-multilib.patch" )
+
+[[ ${PV} == 9999 ]] || S=${WORKDIR}/${MY_P}
+
+CMAKE_IN_SOURCE_BUILD=1
+
+setup_qt_variants() {
+ MULTIBUILD_VARIANTS=()
+ if use qt4; then
+ MULTIBUILD_VARIANTS+=(qt4)
+ fi
+ if use qt5; then
+ MULTIBUILD_VARIANTS+=(qt5)
+ fi
+}
+
+foreach_qt_variant() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+
+ local MULTIBUILD_VARIANTS=()
+ setup_qt_variants
+
+ # FIXME: stupidly clever construct
+ _localizing_wrapper \
+ multibuild_foreach_variant _localizing_wrapper \
+ run_in_build_dir "$@"
+}
+
+# FIXME: figure out if this is really needed; if so, make
+# it magically no longer neccesary
+_localizing_wrapper() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+
+ local S="${S}"
+ local BUILD_DIR="${BUILD_DIR}"
+ local CMAKE_USE_DIR="${BUILD_DIR}"
+ local ECONF_SOURCE="${ECONF_SOURCE}"
+ "$@"
+}
+
+src_prepare() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+ debug-print "${FUNCNAME}: BUILD_DIR=\"${BUILD_DIR}\""
+
+ qt_copy_variants() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+ debug-print "${FUNCNAME}: BUILD_DIR=\"${BUILD_DIR}\""
+
+ local MULTIBUILD_VARIANTS=()
+ setup_qt_variants
+ multibuild_copy_sources
+ # sigh -- ${BUILD_DIR} is not used, just the copies.
+ cd .. || die
+ rm -rf ${BUILD_DIR} || die
+ mkdir ${BUILD_DIR} || die
+ }
+ cmake-multilib_src_prepare
+ multilib_foreach_abi _localizing_wrapper qt_copy_variants
+}
+
+multilib_src_configure() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+ debug-print "${FUNCNAME}: BUILD_DIR=\"${BUILD_DIR}\""
+
+ qt_variant_configure() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+ debug-print "${FUNCNAME}: BUILD_DIR=\"${BUILD_DIR}\""
+
+ # localize mycmakeargs
+ local mycmakeargs=("${mycmakeargs[@]}")
+
+ # find correct multilib Phonon package
+ local Phonon_DIR="${EPREFIX}/usr/$(get_libdir)/phonon"
+ export Phonon_DIR
+
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+ }
+
+ foreach_qt_variant qt_variant_configure
+}
+
+multilib_src_compile() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+
+ foreach_qt_variant cmake-utils_src_compile
+}
+
+multilib_src_install() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+
+ foreach_qt_variant cmake-utils_src_install
+}
+
+multilib_src_test() {
+ debug-print-function ${FUNCNAME} "$(mg-qm "${@}")"
+
+ foreach_qt_variant cmake-utils_src_test
+}