X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=dev-python%2FPyQtWebEngine%2FPyQtWebEngine-5.12.1.ebuild;fp=dev-python%2FPyQtWebEngine%2FPyQtWebEngine-5.12.1.ebuild;h=ccb71ce8e54917b0dd998369c0c17f08a6c46344;hb=398606fd17bed1279975fa9a65e3514dad3327e5;hp=0000000000000000000000000000000000000000;hpb=83d8e4fcd0c9bbdbb3a7df24f47fbb505e51c899;p=max%2Fgentoo-overlay.git diff --git a/dev-python/PyQtWebEngine/PyQtWebEngine-5.12.1.ebuild b/dev-python/PyQtWebEngine/PyQtWebEngine-5.12.1.ebuild new file mode 100644 index 0000000..ccb71ce --- /dev/null +++ b/dev-python/PyQtWebEngine/PyQtWebEngine-5.12.1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2019 Gentoo Authors +# Copyright 2019 Maximilian Friedersdorff +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} ) +inherit multibuild python-r1 qmake-utils + +DESCRIPTION="Python bindings for the Qt framework" +HOMEPAGE="https://www.riverbankcomputing.com/software/pyqtwebengine/intro" + +MY_P=${PN}_gpl-${PV/_pre/.dev} +if [[ ${PV} == *_pre* ]]; then + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz" +else + SRC_URI="https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/PyQtWebEngine_gpl-${PV}.tar.gz" +fi + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +IUSE="debug examples widgets" + +# The requirements below were extracted from configure.py +# and from the output of 'grep -r "%Import " "${S}"/sip' +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} +" + +# Minimal supported version of Qt. +QT_PV="5.10:5" + +RDEPEND=" + ${PYTHON_DEPS} + >=dev-python/PyQt5-5.12_pre[widgets?] + >=dev-qt/qtwebengine-${QT_PV}[widgets?] + widgets? ( >=dev-qt/qtwidgets-${QT_PV} ) +" +DEPEND="${RDEPEND} + >=dev-python/sip-4.19.14_pre[${PYTHON_USEDEP}] +" + +S=${WORKDIR}/${MY_P} + +pyqt_use_enable() { + use "$1" || return + + if [[ $# -eq 1 ]]; then + echo --enable=Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1} + else + shift + echo ${@/#/--enable=} + fi +} + +src_configure() { + configuration() { + local myconf=( + "${PYTHON}" + "${S}"/configure.py + $(usex debug '--debug --qml-debug --trace' '') + --verbose + --qmake="$(qt5_get_bindir)"/qmake + --sip-incdir="$(python_get_includedir)" + ) + echo "${myconf[@]}" + "${myconf[@]}" || die + + eqmake5 -recursive ${PN}.pro + } + python_foreach_impl run_in_build_dir configuration +} + +src_compile() { + python_foreach_impl run_in_build_dir default +} + +src_install() { + installation() { + local tmp_root=${D}/${PN}_tmp_root + # parallel install fails (same issue as qscintilla-python-2.10.8) + emake -j1 INSTALL_ROOT="${tmp_root}" install + + multibuild_merge_root "${tmp_root}" "${D}" + python_optimize + } + python_foreach_impl run_in_build_dir installation + + einstalldocs + + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples + fi +}