diff options
author | leycec <leycec@gmail.com> | 2017-09-29 02:44:39 -0400 |
---|---|---|
committer | Davide Pesavento <pesa@gentoo.org> | 2017-10-22 06:17:07 +0200 |
commit | fa7ed68675611c76a2df33dfa2ddb97b9c2ce8ea (patch) | |
tree | c9160930b8099d9b2596322e62285942081c3152 | |
parent | dev-qt/qtwidgets: USE="gtk" requires dev-qt/qtgui[dbus] (diff) | |
download | qt-fa7ed68675611c76a2df33dfa2ddb97b9c2ce8ea.tar.gz qt-fa7ed68675611c76a2df33dfa2ddb97b9c2ce8ea.tar.bz2 qt-fa7ed68675611c76a2df33dfa2ddb97b9c2ce8ea.zip |
dev-python/pyside: enable Qt 5.9 support
- Shiboken2, pyside2, and pyside2-tools are built against the "5.9"
branches of their respective repositories requiring Qt 5.9.x
- Shiboken2 conditionally supports NumPy
- Pyside2 conditionally supports Qt5Charts and Qt5DataVisualization
- Pyside2-tools supports Python 2.7
-rw-r--r-- | dev-python/pyside-tools/pyside-tools-9999.ebuild | 38 | ||||
-rw-r--r-- | dev-python/pyside/metadata.xml | 2 | ||||
-rw-r--r-- | dev-python/pyside/pyside-9999.ebuild | 22 | ||||
-rw-r--r-- | dev-python/shiboken/metadata.xml | 3 | ||||
-rw-r--r-- | dev-python/shiboken/shiboken-9999.ebuild | 41 |
5 files changed, 54 insertions, 52 deletions
diff --git a/dev-python/pyside-tools/pyside-tools-9999.ebuild b/dev-python/pyside-tools/pyside-tools-9999.ebuild index 02b8a105..95fa3e0d 100644 --- a/dev-python/pyside-tools/pyside-tools-9999.ebuild +++ b/dev-python/pyside-tools/pyside-tools-9999.ebuild @@ -4,26 +4,19 @@ EAPI=6 CMAKE_IN_SOURCE_BUILD="1" - -#FIXME: Restore Python 2.7 support after this upstream issue is resolved: -# https://bugreports.qt.io/browse/PYSIDE-508 -#Even after this issue is resolved, further ebuild changes will probably be -#needed to fully support Python 2.7. Unlike PySide2 and Shiboken2, the root -#"CMakeLists.txt" file in pyside2-tools provides no ${PYTHON_EXECUTABLE} option. -#Instead, the ${PYTHON_EXTENSION_SUFFIX} and ${PYTHON_BASENAME} options must be -#passed with values specific to Python 2.7. Additionally, note that the -#"python2.7-config" command provides no "--extension-suffix" option. -PYTHON_COMPAT=( python3_{4,5,6} ) +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) inherit cmake-utils python-r1 virtualx git-r3 DESCRIPTION="PySide development tools (lupdate, rcc, uic)" HOMEPAGE="https://wiki.qt.io/PySide2" -EGIT_REPO_URI="https://code.qt.io/pyside/${PN}.git" -#FIXME: Switch to the clang-enabled "dev" branch once stable. -EGIT_BRANCH="5.6" +EGIT_REPO_URI="https://code.qt.io/pyside/pyside-tools.git" +EGIT_BRANCH="5.9" -LICENSE="BSD GPL-2" +# Although "LICENSE-uic" suggests the "pyside2uic" directory to be dual-licensed +# under the BSD 3-clause and GPL v2 licenses, this appears to be an oversight; +# all files in this (and every) directory are licensed only under the GPL v2. +LICENSE="GPL-2" SLOT="2" KEYWORDS="" IUSE="test" @@ -76,26 +69,17 @@ src_configure() { -DBUILD_TESTS=$(usex test) ) + # Find the previously installed "Shiboken2Config.*.cmake" and + # "PySide2Config.*.cmake" files specific to this Python version. if python_is_python3; then # Extension tag unique to the current Python 3.x version (e.g., # ".cpython-34m" for CPython 3.4). local EXTENSION_TAG="$("$(python_get_PYTHON_CONFIG)" --extension-suffix)" EXTENSION_TAG="${EXTENSION_TAG%.so}" - mycmakeargs+=( - #FIXME: Submit an upstream PySide2 issue requesting that the - #"PySide2Config.cmake" file use the same - #${PYTHON_EXTENSION_SUFFIX} variable as the - #"Shiboken2Config.cmake" file. - - # Find the previously installed "Shiboken2Config.*.cmake" and - # "PySide2Config.*.cmake" files specific to this Python 3.x - # version. - -DPYTHON_EXTENSION_SUFFIX="${EXTENSION_TAG}" - -DPYTHON_BASENAME="${EXTENSION_TAG}" - ) + mycmakeargs+=( -DPYTHON_CONFIG_SUFFIX="${EXTENSION_TAG}" ) else - die "Python 2.7 currently unsupported." + mycmakeargs+=( -DPYTHON_CONFIG_SUFFIX="-python2.7" ) fi CMAKE_USE_DIR="${BUILD_DIR}" cmake-utils_src_configure diff --git a/dev-python/pyside/metadata.xml b/dev-python/pyside/metadata.xml index a4b07195..9c049859 100644 --- a/dev-python/pyside/metadata.xml +++ b/dev-python/pyside/metadata.xml @@ -6,7 +6,9 @@ <name>Gentoo Qt Project</name> </maintainer> <use> + <flag name="charts">Build QtCharts module</flag> <flag name="concurrent">Build QtConcurrent module</flag> + <flag name="datavis">Build QtDataVisualization 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> diff --git a/dev-python/pyside/pyside-9999.ebuild b/dev-python/pyside/pyside-9999.ebuild index 58ccf9a0..0d90c94b 100644 --- a/dev-python/pyside/pyside-9999.ebuild +++ b/dev-python/pyside/pyside-9999.ebuild @@ -10,21 +10,24 @@ inherit cmake-utils python-r1 virtualx git-r3 DESCRIPTION="Python bindings for the Qt framework" HOMEPAGE="https://wiki.qt.io/PySide2" EGIT_REPO_URI="https://code.qt.io/pyside/pyside-setup.git" -#FIXME: Switch to the clang-enabled "dev" branch once stable. -EGIT_BRANCH="5.6" +EGIT_BRANCH="5.9" -LICENSE="|| ( GPL-2+ LGPL-3 )" +# See "sources/pyside2/PySide2/licensecomment.txt" for licensing details. +LICENSE="|| ( GPL-2 GPL-3+ LGPL-3 )" SLOT="2" KEYWORDS="" -IUSE="concurrent declarative designer gui help multimedia network opengl - printsupport script scripttools sql svg test testlib webchannel - webengine webkit websockets widgets x11extras xmlpatterns" +# TODO: speech +IUSE="charts concurrent datavis 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 extracted from the output of # 'grep "set(.*_deps" "${S}"/PySide2/Qt*/CMakeLists.txt' REQUIRED_USE=" ${PYTHON_REQUIRED_USE} + charts? ( widgets ) + datavis? ( gui ) declarative? ( gui network ) designer? ( widgets ) help? ( widgets ) @@ -44,14 +47,16 @@ REQUIRED_USE=" # Minimum version of Qt required, derived from the CMakeLists.txt line: # find_package(Qt5 ${QT_PV} REQUIRED COMPONENTS Core) -QT_PV="5.6*:5" +QT_PV="5.9*:5" DEPEND=" ${PYTHON_DEPS} >=dev-python/shiboken-${PV}:${SLOT}[${PYTHON_USEDEP}] =dev-qt/qtcore-${QT_PV} =dev-qt/qtxml-${QT_PV} + charts? ( =dev-qt/qtcharts-${QT_PV} ) concurrent? ( =dev-qt/qtconcurrent-${QT_PV} ) + datavis? ( =dev-qt/qtdatavis3d-${QT_PV} ) declarative? ( =dev-qt/qtdeclarative-${QT_PV}[widgets?] ) designer? ( =dev-qt/designer-${QT_PV} ) gui? ( =dev-qt/qtgui-${QT_PV} ) @@ -89,7 +94,9 @@ src_configure() { # See COLLECT_MODULE_IF_FOUND macros in CMakeLists.txt local mycmakeargs=( -DBUILD_TESTS=$(usex test) + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Charts=$(usex !charts) -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Concurrent=$(usex !concurrent) + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5DataVisualization=$(usex !datavis) -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Designer=$(usex !designer) -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Gui=$(usex !gui) -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Help=$(usex !help) @@ -108,7 +115,6 @@ src_configure() { -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=$(usex !testlib) -DCMAKE_DISABLE_FIND_PACKAGE_Qt5UiTools=$(usex !designer) -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) diff --git a/dev-python/shiboken/metadata.xml b/dev-python/shiboken/metadata.xml index 17237689..d199c54b 100644 --- a/dev-python/shiboken/metadata.xml +++ b/dev-python/shiboken/metadata.xml @@ -5,4 +5,7 @@ <email>qt@gentoo.org</email> <name>Gentoo Qt Project</name> </maintainer> + <use> + <flag name="numpy">Enable NumPy-based 2D array support</flag> + </use> </pkgmetadata> diff --git a/dev-python/shiboken/shiboken-9999.ebuild b/dev-python/shiboken/shiboken-9999.ebuild index 8993de01..4a4a2249 100644 --- a/dev-python/shiboken/shiboken-9999.ebuild +++ b/dev-python/shiboken/shiboken-9999.ebuild @@ -10,19 +10,23 @@ inherit cmake-utils llvm python-r1 git-r3 DESCRIPTION="Tool for creating Python bindings for C++ libraries" HOMEPAGE="https://wiki.qt.io/PySide2" EGIT_REPO_URI="https://code.qt.io/pyside/pyside-setup.git" -#FIXME: Switch to the clang-enabled "dev" branch once stable. -EGIT_BRANCH="5.6" +EGIT_BRANCH="5.9" -LICENSE="|| ( GPL-2+ LGPL-3 ) GPL-3" +# The "sources/shiboken2/libshiboken" directory is triple-licensed under the GPL +# v2, v3+, and LGPL v3. All remaining files are licensed under the GPL v3 with +# version 1.0 of a Qt-specific exception enabling shiboken2 output to be +# arbitrarily relicensed. (TODO) +LICENSE="|| ( GPL-2 GPL-3+ LGPL-3 ) GPL-3" SLOT="2" KEYWORDS="" -IUSE="test" +IUSE="numpy test" REQUIRED_USE="${PYTHON_REQUIRED_USE}" # Minimum version of Qt required. -QT_PV="5.6*:5" +QT_PV="5.9*:5" -#FIXME: Add "sys-devel/clang:*" after switching to the "dev" branch. +#FIXME: Determine the maximum supported version of clang. +#FIXME: Determine exactly which versions of numpy are supported. DEPEND=" ${PYTHON_DEPS} dev-libs/libxml2 @@ -30,6 +34,8 @@ DEPEND=" =dev-qt/qtcore-${QT_PV} =dev-qt/qtxml-${QT_PV} =dev-qt/qtxmlpatterns-${QT_PV} + >=sys-devel/clang-3.9.1:= + numpy? ( dev-python/numpy ) " RDEPEND="${DEPEND}" @@ -37,9 +43,17 @@ S=${WORKDIR}/${P}/sources/shiboken2 DOCS=( AUTHORS ) +# Ensure the path returned by get_llvm_prefix() contains clang as well. +llvm_check_deps() { + has_version "sys-devel/clang:${LLVM_SLOT}" +} + src_prepare() { - #FIXME: Uncomment after switching to the "dev" branch. - # sed -i -e "/^find_library(CLANG_LIBRARY/ s~/lib)$~/$(get_libdir))~" CMakeLists.txt || die + #FIXME: File an upstream issue requesting a sane way to disable NumPy support. + if ! use numpy; then + sed -i -e '/print(os\.path\.realpath(numpy))/d' \ + libshiboken/CMakeLists.txt || die + fi if use prefix; then cp "${FILESDIR}"/rpath.cmake . || die @@ -55,15 +69,8 @@ src_configure() { -DBUILD_TESTS=$(usex test) -DPYTHON_EXECUTABLE="${PYTHON}" ) - - #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 + # CMakeLists.txt expects LLVM_INSTALL_DIR as an environment variable. + LLVM_INSTALL_DIR="$(get_llvm_prefix)" cmake-utils_src_configure } python_foreach_impl configuration } |