[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-commits
Subject:    [gentoo-commits] proj/qt:master commit in: dev-python/pyside/, dev-python/shiboken/
From:       "Davide Pesavento" <pesa () gentoo ! org>
Date:       2017-04-30 19:17:26
Message-ID: 1493579424.a03f2e5c1d461e828e3b36b0f94a036695d04374.pesa () gentoo
[Download RAW message or body]

commit:     a03f2e5c1d461e828e3b36b0f94a036695d04374
Author:     leycec <leycec <AT> gmail <DOT> com>
AuthorDate: Mon Mar 13 06:22:46 2017 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Sun Apr 30 19:10:24 2017 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=a03f2e5c

dev-python/pyside: Build PySide2 and shiboken2, 5.6 branch.

The live pyside and shiboken ebuilds now build PySide2 and shiboken2
respectively. For disambiguity, both are now slotted into slot 2. All
pyside USE flags are now handled as expected and support all available
optional dependencies. For upstream reasons, Qt =5.6* is required for now.
Python 3.6 is additionally supported.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-python/pyside/metadata.xml           |  16 +++-
 dev-python/pyside/pyside-9999.ebuild     | 158 +++++++++++++++++++------------
 dev-python/shiboken/shiboken-9999.ebuild |  39 +++++---
 3 files changed, 136 insertions(+), 77 deletions(-)

diff --git a/dev-python/pyside/metadata.xml b/dev-python/pyside/metadata.xml
index dcfc63e1..6dff63cb 100644
--- a/dev-python/pyside/metadata.xml
+++ b/dev-python/pyside/metadata.xml
@@ -6,18 +6,26 @@
 		<name>Gentoo Qt Project</name>
 	</maintainer>
 	<use>
-		<flag name="X">Build QtGui and QtTest modules</flag>
-		<flag name="declarative">Build QtDeclarative module</flag>
+		<flag name="concurrent">Build QtConcurrent module</flag>
+		<flag name="declarative">Build QtQml, QtQuick, and QtQuickWidgets modules</flag>
 		<flag name="designer">Build QtDesigner and QtUiTools modules</flag>
+		<flag name="gui">Build QtGui module</flag>
 		<flag name="help">Build QtHelp module</flag>
 		<flag name="multimedia">Build QtMultimedia module</flag>
+		<flag name="network">Build QtNetwork module</flag>
 		<flag name="opengl">Build QtOpenGL module</flag>
+		<flag name="printsupport">Build QtPrintSupport module</flag>
 		<flag name="script">Build QtScript module</flag>
 		<flag name="scripttools">Build QtScriptTools module</flag>
 		<flag name="sql">Build QtSql module</flag>
 		<flag name="svg">Build QtSvg module</flag>
-		<flag name="webkit">Build QtWebKit module</flag>
+		<flag name="testlib">Build QtTest module</flag>
+		<flag name="webchannel">Build QtWebChannel module</flag>
+		<flag name="webengine">Build QtWebEngine and QtWebEngineWidgets modules</flag>
+		<flag name="webkit">Build QtWebKit and QtWebKitWidgets modules</flag>
+		<flag name="websockets">Build QtWebSockets module</flag>
+		<flag name="widgets">Build QtWidgets module</flag>
+		<flag name="x11extras">Build QtX11Extras module</flag>
 		<flag name="xmlpatterns">Build QtXmlPatterns module</flag>
 	</use>
 </pkgmetadata>
-

diff --git a/dev-python/pyside/pyside-9999.ebuild \
b/dev-python/pyside/pyside-9999.ebuild index b3beda50..108dbb67 100644
--- a/dev-python/pyside/pyside-9999.ebuild
+++ b/dev-python/pyside/pyside-9999.ebuild
@@ -1,71 +1,94 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
 
-inherit cmake-utils flag-o-matic python-r1 virtualx git-r3
+inherit cmake-utils python-r1 virtualx git-r3
 
 DESCRIPTION="Python bindings for the Qt framework"
-HOMEPAGE="https://wiki.qt.io/Pyside"
+HOMEPAGE="https://wiki.qt.io/PySide2"
 EGIT_REPO_URI=(
 	"git://code.qt.io/pyside/${PN}.git"
 	"https://code.qt.io/git/pyside/${PN}.git"
 )
+#FIXME: Switch to the clang-enabled "dev" branch once stable.
+EGIT_BRANCH="5.6"
 
 LICENSE="LGPL-2.1"
-SLOT="0"
+SLOT="2"
 KEYWORDS=""
 
-IUSE="X declarative designer help multimedia opengl script scripttools sql svg test \
webkit xmlpatterns" +IUSE="concurrent declarative designer gui help multimedia \
network opengl +	printsupport script scripttools sql svg test testlib webchannel
+	webengine webkit websockets widgets x11extras xmlpatterns"
+
+# The requirements below were strongly inspired by their PyQt5 equivalents.
 REQUIRED_USE="
 	${PYTHON_REQUIRED_USE}
-	declarative? ( X )
-	designer? ( X )
-	help? ( X )
-	multimedia? ( X )
-	opengl? ( X )
-	scripttools? ( X script )
-	sql? ( X )
-	svg? ( X )
-	test? ( X )
-	webkit? ( X )
+	declarative? ( gui network )
+	designer? ( widgets )
+	help? ( widgets )
+	multimedia? ( gui network )
+	opengl? ( widgets )
+	printsupport? ( widgets )
+	scripttools? ( gui script )
+	sql? ( widgets )
+	svg? ( widgets )
+	test? ( widgets )
+	testlib? ( widgets )
+	webchannel? ( network )
+	webengine? ( network webchannel widgets )
+	webkit? ( gui network printsupport widgets )
+	websockets? ( network )
+	widgets? ( gui )
+	xmlpatterns? ( network )
 "
 
-# Minimal supported version of Qt.
-QT_PV="4.8.5:4"
+# Minimum version of Qt required, derived from the CMakeLists.txt line:
+#   find_package(Qt5 ${QT_PV} REQUIRED COMPONENTS Core)
+QT_PV="5.6*:5"
 
 RDEPEND="
 	${PYTHON_DEPS}
-	>=dev-python/shiboken-${PV}[${PYTHON_USEDEP}]
-	>=dev-qt/qtcore-${QT_PV}
-	X? (
-		>=dev-qt/qtgui-${QT_PV}[accessibility]
-		>=dev-qt/qttest-${QT_PV}
-	)
-	declarative? ( >=dev-qt/qtdeclarative-${QT_PV} )
-	designer? ( >=dev-qt/designer-${QT_PV} )
-	help? ( >=dev-qt/qthelp-${QT_PV} )
-	multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
-	opengl? ( >=dev-qt/qtopengl-${QT_PV} )
-	script? ( >=dev-qt/qtscript-${QT_PV} )
-	sql? ( >=dev-qt/qtsql-${QT_PV} )
-	svg? ( >=dev-qt/qtsvg-${QT_PV}[accessibility] )
-	webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
-	xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
-"
-DEPEND="${RDEPEND}
-	>=dev-qt/qtgui-${QT_PV}
+	>=dev-python/shiboken-${PV}:${SLOT}[${PYTHON_USEDEP}]
+	=dev-qt/qtcore-${QT_PV}
+	=dev-qt/qtxml-${QT_PV}
+	declarative? ( =dev-qt/qtdeclarative-${QT_PV}[widgets?] )
+	designer? ( =dev-qt/designer-${QT_PV} )
+	help? ( =dev-qt/qthelp-${QT_PV} )
+	multimedia? ( =dev-qt/qtmultimedia-${QT_PV}[widgets?] )
+	opengl? ( =dev-qt/qtopengl-${QT_PV} )
+	printsupport? ( =dev-qt/qtprintsupport-${QT_PV} )
+	script? ( =dev-qt/qtscript-${QT_PV} )
+	sql? ( =dev-qt/qtsql-${QT_PV} )
+	svg? ( =dev-qt/qtsvg-${QT_PV} )
+	testlib? ( =dev-qt/qttest-${QT_PV} )
+	webchannel? ( =dev-qt/qtwebchannel-${QT_PV} )
+	webengine? ( =dev-qt/qtwebengine-${QT_PV}[widgets?] )
+	webkit? ( =dev-qt/qtwebkit-${QT_PV}[printsupport] )
+	websockets? ( =dev-qt/qtwebsockets-${QT_PV} )
+	x11extras? ( =dev-qt/qtx11extras-${QT_PV} )
+	xmlpatterns? ( =dev-qt/qtxmlpatterns-${QT_PV} )
+	concurrent? ( =dev-qt/qtconcurrent-${QT_PV} )
+	gui? ( =dev-qt/qtgui-${QT_PV} )
+	network? ( =dev-qt/qtnetwork-${QT_PV} )
+	printsupport? ( =dev-qt/qtprintsupport-${QT_PV} )
+	sql? ( =dev-qt/qtsql-${QT_PV} )
+	testlib? ( =dev-qt/qttest-${QT_PV} )
+	widgets? ( =dev-qt/qtwidgets-${QT_PV} )
 "
-
-DOCS=( ChangeLog )
+DEPEND="${RDEPEND}"
 
 src_prepare() {
-	# Fix generated pkgconfig file to require the shiboken
-	# library suffixed with the correct python version.
-	sed -i -e '/^Requires:/ s/shiboken$/&@SHIBOKEN_PYTHON_SUFFIX@/' \
-		libpyside/pyside2.pc.in || die
+	#FIXME: Remove the following "sed" patch after this upstream issue is closed:
+	#    https://bugreports.qt.io/browse/PYSIDE-502
+	# Force the optional "Qt5Concurrent", "Qt5Gui", "Qt5Network",
+	# "Qt5PrintSupport", "Qt5Sql", "Qt5Test", and "Qt5Widgets" packages
+	# erroneously marked as mandatory to be optional.
+	sed -i -e 's/^\(CHECK_PACKAGE_FOUND(Qt5\(Concurrent\|Gui\|Network\|PrintSupport\|Sql\|Test\|Widgets\)\))$/\1 \
opt)/' \ +		PySide2/CMakeLists.txt || die
 
 	if use prefix; then
 		cp "${FILESDIR}"/rpath.cmake . || die
@@ -76,25 +99,38 @@ src_prepare() {
 }
 
 src_configure() {
-	append-cxxflags -std=c++11
-
+	# For each line of the form "CHECK_PACKAGE_FOUND(${PACKAGE_NAME} opt)" in
+	# PySide2/CMakeLists.txt defining an optional dependency, an option of the
+	# form "-DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGE_NAME}=$(usex !${USE_FLAG})"
+	# is passed to "cmake" here conditionally disabling this dependency.
 	local mycmakeargs=(
 		-DBUILD_TESTS=$(usex test)
-		-DDISABLE_QtGui=$(usex !X)
-		-DDISABLE_QtTest=$(usex !X)
-		-DDISABLE_QtQml=$(usex !declarative)
-		-DDISABLE_QtQuick=$(usex !declarative)
-		-DDISABLE_QtQuickWidgets=$(usex !declarative)
-		-DDISABLE_QtUiTools=$(usex !designer)
-		-DDISABLE_QtHelp=$(usex !help)
-		-DDISABLE_QtMultimedia=$(usex !multimedia)
-		-DDISABLE_QtOpenGL=$(usex !opengl)
-		-DDISABLE_QtScript=$(usex !script)
-		-DDISABLE_QtScriptTools=$(usex !scripttools)
-		-DDISABLE_QtSql=$(usex !sql)
-		-DDISABLE_QtSvg=$(usex !svg)
-		-DDISABLE_QtWebKit=$(usex !webkit)
-		-DDISABLE_QtXmlPatterns=$(usex !xmlpatterns)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Concurrent=$(usex !concurrent)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Gui=$(usex !gui)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Designer=$(usex !designer)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5UiTools=$(usex !designer)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Help=$(usex !help)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Multimedia=$(usex !multimedia)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Network=$(usex !network)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5OpenGL=$(usex !opengl)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Qml=$(usex !declarative)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Quick=$(usex !declarative)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5QuickWidgets=$(usex !declarative)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5PrintSupport=$(usex !printsupport)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Script=$(usex !script)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5ScriptTools=$(usex !scripttools)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Sql=$(usex !sql)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Svg=$(usex !svg)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=$(usex !testlib)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebChannel=$(usex !webchannel)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngine=$(usex !webengine)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineWidgets=$(usex !webengine)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebKit=$(usex !webkit)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebKitWidgets=$(usex !webkit)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebSockets=$(usex !websockets)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=$(usex !widgets)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras=$(usex !x11extras)
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5XmlPatterns=$(usex !xmlpatterns)
 	)
 
 	configuration() {
@@ -120,7 +156,7 @@ src_test() {
 src_install() {
 	installation() {
 		cmake-utils_src_install
-		mv "${ED}"usr/$(get_libdir)/pkgconfig/${PN}{,-${EPYTHON}}.pc || die
+		mv "${ED}"usr/$(get_libdir)/pkgconfig/${PN}2{,-${EPYTHON}}.pc || die
 	}
 	python_foreach_impl installation
 }

diff --git a/dev-python/shiboken/shiboken-9999.ebuild \
b/dev-python/shiboken/shiboken-9999.ebuild index 0c7e78ff..721c08d3 100644
--- a/dev-python/shiboken/shiboken-9999.ebuild
+++ b/dev-python/shiboken/shiboken-9999.ebuild
@@ -1,44 +1,52 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
 
-inherit cmake-utils python-r1 git-r3
+inherit cmake-utils llvm python-r1 git-r3
 
-DESCRIPTION="A tool for creating Python bindings for C++ libraries"
-HOMEPAGE="https://wiki.qt.io/Pyside"
+DESCRIPTION="Tool for creating Python bindings for C++ libraries"
+HOMEPAGE="https://wiki.qt.io/PySide2"
 EGIT_REPO_URI=(
 	"git://code.qt.io/pyside/${PN}.git"
 	"https://code.qt.io/git/pyside/${PN}.git"
 )
+#FIXME: Switch to the clang-enabled "dev" branch once stable.
+EGIT_BRANCH="5.6"
 
 LICENSE="LGPL-2.1"
-SLOT="0"
+SLOT="2"
 KEYWORDS=""
 IUSE="test"
-
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
+# Minimum version of Qt required.
+QT_PV="5.6*:5"
+
+#FIXME: Add "sys-devel/clang:*" after switching to the "dev" branch.
 RDEPEND="
 	${PYTHON_DEPS}
 	dev-libs/libxml2
 	dev-libs/libxslt
-	dev-qt/qtcore:5
-	dev-qt/qtxml:5
-	dev-qt/qtxmlpatterns:5
+	=dev-qt/qtcore-${QT_PV}
+	=dev-qt/qtxml-${QT_PV}
+	=dev-qt/qtxmlpatterns-${QT_PV}
 "
 DEPEND="${RDEPEND}
 	test? (
-		dev-qt/qtgui:5
-		dev-qt/qttest:5
+		=dev-qt/qtgui-${QT_PV}
+		=dev-qt/qttest-${QT_PV}
 	)
 "
 
 DOCS=( AUTHORS )
 
 src_prepare() {
+	#FIXME: Uncomment after switching to the "dev" branch.
+	# sed -i -e "/^find_library(CLANG_LIBRARY/ s~/lib)$~/$(get_libdir))~" \
CMakeLists.txt || die +
 	if use prefix; then
 		cp "${FILESDIR}"/rpath.cmake . || die
 		sed -i -e '1iinclude(rpath.cmake)' CMakeLists.txt || die
@@ -61,6 +69,13 @@ src_configure() {
 			)
 		fi
 
+		#FIXME: Uncomment after switching to the "dev" branch.
+		#FIXME: "CMakeLists.txt" currently requires that callers manually set
+		#this environment variable to the absolute path of the directory
+		#containing clang libraries rather than magically finding this path
+		#(e.g., via "find_package(CLang)"). If this changes, remove this option.
+		# CLANG_INSTALL_DIR="$(get_llvm_prefix)" cmake-utils_src_configure
+
 		cmake-utils_src_configure
 	}
 	python_foreach_impl configuration


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic