Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 562588 | Differences between
and this patch

Collapse All | Expand All

(-)libmygpo-qt-1.0.8.ebuild (-5 / +39 lines)
Lines 2-8 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Id$
3
# $Id$
4
4
5
EAPI=5
5
EAPI=6
6
inherit cmake-utils
6
inherit cmake-utils
7
7
8
DESCRIPTION="Qt/C++ library wrapping the gpodder.net webservice"
8
DESCRIPTION="Qt/C++ library wrapping the gpodder.net webservice"
Lines 20-32 Link Here
20
20
21
LICENSE="LGPL-2.1"
21
LICENSE="LGPL-2.1"
22
SLOT="0"
22
SLOT="0"
23
IUSE="test"
23
IUSE="qt4 +qt5 test"
24
25
RDEPEND="
26
	qt4? ( dev-qt/qtcore:4
27
		>=dev-libs/qjson-0.5[qt4] )
28
	qt5? ( >=dev-qt/qtcore-5.1:5
29
		>=dev-qt/qtgui-5.1:5
30
		>=dev-qt/qtnetwork-5.1:5
31
		>=dev-libs/qjson-0.5[qt5] )
32
	"
24
33
25
RDEPEND="dev-qt/qtcore:4
26
	>=dev-libs/qjson-0.5"
27
DEPEND="${RDEPEND}
34
DEPEND="${RDEPEND}
35
	qt4? ( test? ( dev-qt/qttest:4 ) )
36
	qt5? ( test? ( dev-qt/qttest:5 ) )
28
	virtual/pkgconfig
37
	virtual/pkgconfig
29
	test? ( dev-qt/qttest:4 )"
38
	"
30
39
31
DOCS=( AUTHORS README )
40
DOCS=( AUTHORS README )
32
41
Lines 35-45 Link Here
35
	if ! use test ; then
44
	if ! use test ; then
36
		sed -i -e '/find_package/s/QtTest//' CMakeLists.txt || die
45
		sed -i -e '/find_package/s/QtTest//' CMakeLists.txt || die
37
	fi
46
	fi
47
48
	epatch "${FILESDIR}"/${PN}-correct-package-name.patch
49
50
	# If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used.
51
	# Setting QT_SELECT environment variable will enforce correct binaries.
52
	if use qt4; then
53
		export QT_SELECT=qt4
54
	elif use qt5; then
55
		export QT_SELECT=qt5
56
		ewarn "Please note that Qt5 support is still experimental."
57
		ewarn "If you find anything to not work with Qt5, please report a bug."
58
	fi
38
}
59
}
39
60
40
src_configure() {
61
src_configure() {
62
	local qt_flag=""
63
	if use qt5 ; then
64
		qt_flag="-DBUILD_WITH_QT4=OFF"
65
	fi
41
	local mycmakeargs=(
66
	local mycmakeargs=(
42
		$(cmake-utils_use test MYGPO_BUILD_TESTS)
67
		$(cmake-utils_use test MYGPO_BUILD_TESTS)
68
		${qt_flag}
43
	)
69
	)
70
71
	use qt5 && append-cppflags -DBUILD_WITH_QT4=OFF
72
44
	cmake-utils_src_configure
73
	cmake-utils_src_configure
45
}
74
}
75
76
src_test() {
77
	cd "${CMAKE_BUILD_DIR}" || die
78
	Xemake test
79
}

Return to bug 562588