public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libmygpo-qt/
Date: Mon, 26 Dec 2016 16:14:06 +0000 (UTC)	[thread overview]
Message-ID: <1482768543.e29d93b85d758c74c4f8e90e52f051747dd33ea0.polynomial-c@gentoo> (raw)

commit:     e29d93b85d758c74c4f8e90e52f051747dd33ea0
Author:     Alexander Golubev <fatzer2 <AT> gmail <DOT> com>
AuthorDate: Tue Sep 20 16:11:32 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Dec 26 16:09:03 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e29d93b8

media-libs/libmygpo-qt: add Qt5 support

Gentoo Bug: 562588
Closes: https://github.com/gentoo/gentoo/pull/2350

 media-libs/libmygpo-qt/libmygpo-qt-1.0.9.ebuild | 73 ++++++++++++++++++++-----
 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 cf7ac6c..5b6b821 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 af69ab2..60f6697 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
 }


             reply	other threads:[~2016-12-26 16:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-26 16:14 Lars Wendler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-18 22:13 [gentoo-commits] repo/gentoo:master commit in: media-libs/libmygpo-qt/ Andreas Sturmlechner
2025-02-23 21:46 Andreas Sturmlechner
2021-02-28 12:26 Andreas Sturmlechner
2021-02-16  8:25 Sergei Trofimovich
2020-12-07 18:48 Sam James
2019-04-28 23:45 Andreas Sturmlechner
2018-04-25 19:27 Thomas Deutschmann
2018-04-25 11:48 Aaron Bauman
2018-04-15 20:52 Andreas Sturmlechner
2018-04-12 21:08 Jonas Stein
2018-03-22 18:38 Andreas Sturmlechner
2018-03-22 18:38 Andreas Sturmlechner
2017-12-08 18:32 Andreas Sturmlechner
2016-12-27  9:48 Aaron Bauman
2016-12-26 16:14 Lars Wendler
2016-12-26 16:14 Lars Wendler
2016-01-13 17:21 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1482768543.e29d93b85d758c74c4f8e90e52f051747dd33ea0.polynomial-c@gentoo \
    --to=polynomial-c@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox