diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2016-09-20 19:11:32 +0300 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2016-12-26 17:09:03 +0100 |
commit | e29d93b85d758c74c4f8e90e52f051747dd33ea0 (patch) | |
tree | ef7d1e2c280ab60baf95e4c9a54698c62adc33d6 /media-libs/libmygpo-qt | |
parent | media-libs/libmygpo-qt: fix test failure (diff) | |
download | gentoo-e29d93b85d758c74c4f8e90e52f051747dd33ea0.tar.gz gentoo-e29d93b85d758c74c4f8e90e52f051747dd33ea0.tar.bz2 gentoo-e29d93b85d758c74c4f8e90e52f051747dd33ea0.zip |
media-libs/libmygpo-qt: add Qt5 support
Gentoo Bug: 562588
Closes: https://github.com/gentoo/gentoo/pull/2350
Diffstat (limited to 'media-libs/libmygpo-qt')
-rw-r--r-- | media-libs/libmygpo-qt/libmygpo-qt-1.0.9.ebuild | 73 | ||||
-rw-r--r-- | media-libs/libmygpo-qt/libmygpo-qt-9999.ebuild | 73 |
2 files changed, 118 insertions, 28 deletions
diff --git a/media-libs/libmygpo-qt/libmygpo-qt-1.0.9.ebuild b/media-libs/libmygpo-qt/libmygpo-qt-1.0.9.ebuild index cf7ac6c6fe1e..5b6b821da7fa 100644 --- a/media-libs/libmygpo-qt/libmygpo-qt-1.0.9.ebuild +++ b/media-libs/libmygpo-qt/libmygpo-qt-1.0.9.ebuild @@ -2,38 +2,83 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=5 -inherit cmake-utils +EAPI=6 +inherit cmake-utils multibuild DESCRIPTION="Qt/C++ library wrapping the gpodder.net webservice" HOMEPAGE="http://wiki.gpodder.org/wiki/Libmygpo-qt" if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI="https://github.com/gpodder/libmygpo-qt.git" - KEYWORDS="" - SRC_URI="" - inherit git-2 + inherit git-r3 else - KEYWORDS="~amd64 ~x86" SRC_URI="https://github.com/gpodder/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" fi LICENSE="LGPL-2.1" SLOT="0" -IUSE="test" +IUSE="+qt4 qt5 test" + +REQUIRED_USE="|| ( qt4 qt5 )" -RDEPEND="dev-qt/qtcore:4 - >=dev-libs/qjson-0.5" +RDEPEND=" + qt4? ( + >=dev-libs/qjson-0.5[qt4(+)] + dev-qt/qtcore:4 + ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtnetwork:5 + ) +" DEPEND="${RDEPEND} virtual/pkgconfig - test? ( dev-qt/qttest:4 )" + test? ( + qt4? ( dev-qt/qttest:4 ) + qt5? ( dev-qt/qttest:5 ) + ) +" DOCS=( AUTHORS README ) PATCHES=( ${FILESDIR}/${PN}-1.0.8-fix-JsonCreatorTest-failure.patch ) +pkg_setup() { + MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) ) + if use qt5; then + ewarn "Please note that Qt5 support is still experimental." + ewarn "If you find anything to not work with Qt5, please report a bug." + fi +} + src_configure() { - local mycmakeargs=( - $(cmake-utils_use test MYGPO_BUILD_TESTS) - ) - cmake-utils_src_configure + myconfigure() { + local mycmakeargs=( + -DMYGPO_BUILD_TESTS=$(usex test) + ) + + if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then + mycmakeargs+=(-DBUILD_WITH_QT4=ON) + fi + + if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then + mycmakeargs+=(-DBUILD_WITH_QT4=OFF) + fi + + cmake-utils_src_configure + } + + multibuild_foreach_variant myconfigure +} + +src_compile() { + multibuild_foreach_variant cmake-utils_src_compile +} + +src_test() { + multibuild_foreach_variant cmake-utils_src_test +} + +src_install() { + multibuild_foreach_variant cmake-utils_src_install } diff --git a/media-libs/libmygpo-qt/libmygpo-qt-9999.ebuild b/media-libs/libmygpo-qt/libmygpo-qt-9999.ebuild index af69ab287371..60f6697cebc1 100644 --- a/media-libs/libmygpo-qt/libmygpo-qt-9999.ebuild +++ b/media-libs/libmygpo-qt/libmygpo-qt-9999.ebuild @@ -2,37 +2,82 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=5 -inherit cmake-utils +EAPI=6 +inherit cmake-utils multibuild DESCRIPTION="Qt/C++ library wrapping the gpodder.net webservice" HOMEPAGE="http://wiki.gpodder.org/wiki/Libmygpo-qt" if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI="https://github.com/gpodder/libmygpo-qt.git" - KEYWORDS="" - SRC_URI="" - inherit git-2 + inherit git-r3 else - KEYWORDS="~amd64 ~x86" SRC_URI="https://github.com/gpodder/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" fi LICENSE="LGPL-2.1" SLOT="0" -IUSE="test" +IUSE="+qt4 qt5 test" + +REQUIRED_USE="|| ( qt4 qt5 )" -RDEPEND="dev-qt/qtcore:4 - >=dev-libs/qjson-0.5" +RDEPEND=" + qt4? ( + >=dev-libs/qjson-0.5[qt4(+)] + dev-qt/qtcore:4 + ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtnetwork:5 + ) +" DEPEND="${RDEPEND} virtual/pkgconfig - test? ( dev-qt/qttest:4 )" + test? ( + qt4? ( dev-qt/qttest:4 ) + qt5? ( dev-qt/qttest:5 ) + ) +" DOCS=( AUTHORS README ) +pkg_setup() { + MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) ) + if use qt5; then + ewarn "Please note that Qt5 support is still experimental." + ewarn "If you find anything to not work with Qt5, please report a bug." + fi +} + src_configure() { - local mycmakeargs=( - $(cmake-utils_use test MYGPO_BUILD_TESTS) - ) - cmake-utils_src_configure + myconfigure() { + local mycmakeargs=( + -DMYGPO_BUILD_TESTS=$(usex test) + ) + + if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then + mycmakeargs+=(-DBUILD_WITH_QT4=ON) + fi + + if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then + mycmakeargs+=(-DBUILD_WITH_QT4=OFF) + fi + + cmake-utils_src_configure + } + + multibuild_foreach_variant myconfigure +} + +src_compile() { + multibuild_foreach_variant cmake-utils_src_compile +} + +src_test() { + multibuild_foreach_variant cmake-utils_src_test +} + +src_install() { + multibuild_foreach_variant cmake-utils_src_install } |