From 26ffc64b0dadb38f05fce59a263a18ff6aa3f120 Mon Sep 17 00:00:00 2001 From: Victor Kustov Date: Tue, 23 May 2023 19:50:39 +0300 Subject: [PATCH] openshot remake to 3.11 Signed-off-by: Victor Kustov --- .../libopenshot/libopenshot-0.3.2.ebuild | 2 +- .../files/openshot-3.1.1-fix-pybuild.patch | 9 ++++++ media-video/openshot/openshot-3.1.1.ebuild | 32 +++++++------------ 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/media-libs/libopenshot/libopenshot-0.3.2.ebuild b/media-libs/libopenshot/libopenshot-0.3.2.ebuild index bf91487bc..7aebb4649 100644 --- a/media-libs/libopenshot/libopenshot-0.3.2.ebuild +++ b/media-libs/libopenshot/libopenshot-0.3.2.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{10..11} ) inherit cmake python-single-r1 toolchain-funcs diff --git a/media-video/openshot/files/openshot-3.1.1-fix-pybuild.patch b/media-video/openshot/files/openshot-3.1.1-fix-pybuild.patch index 1d3ce6e80..e5020f98d 100644 --- a/media-video/openshot/files/openshot-3.1.1-fix-pybuild.patch +++ b/media-video/openshot/files/openshot-3.1.1-fix-pybuild.patch @@ -11,6 +11,15 @@ index ee7a13f..549ecbd 100644 from shutil import copytree, rmtree, copy +@@ -54,7 +54,7 @@ + log.info("Execution path: %s" % os.path.abspath(__file__)) + + # Boolean: running as root? +-ROOT = os.geteuid() == 0 ++ROOT = False + # For Debian packaging it could be a fakeroot so reset flag to prevent execution of + # system update services for Mime and Desktop registrations. + # The debian/openshot.postinst script must do those. @@ -105,7 +105,7 @@ package_data["openshot_qt"] = src_files # Call the main Distutils setup command # ------------------------------------- diff --git a/media-video/openshot/openshot-3.1.1.ebuild b/media-video/openshot/openshot-3.1.1.ebuild index f53d0ff52..3302d8ec1 100644 --- a/media-video/openshot/openshot-3.1.1.ebuild +++ b/media-video/openshot/openshot-3.1.1.ebuild @@ -1,12 +1,11 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_REQ_USE=xml DISTUTILS_SINGLE_IMPL=1 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{10..11} ) inherit distutils-r1 xdg @@ -22,13 +21,14 @@ SLOT="1" KEYWORDS="~amd64 ~x86" IUSE="doc" -RDEPEND="$(python_gen_cond_dep ' - dev-python/httplib2[${PYTHON_USEDEP}] - dev-python/PyQt5[${PYTHON_USEDEP},gui,svg,widgets] - dev-python/PyQtWebEngine[${PYTHON_USEDEP}] - dev-python/pyzmq[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] - ') +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + dev-python/httplib2[${PYTHON_SINGLE_USEDEP}] + dev-python/PyQt5[${PYTHON_SINGLE_USEDEP},gui,svg,widgets] + dev-python/PyQtWebEngine[${PYTHON_SINGLE_USEDEP}] + dev-python/pyzmq[${PYTHON_SINGLE_USEDEP}] + dev-python/requests[${PYTHON_SINGLE_USEDEP}] >=media-libs/libopenshot-0.3.2:0=[python,${PYTHON_SINGLE_USEDEP}]" DEPEND="" BDEPEND="$(python_gen_cond_dep ' @@ -37,12 +37,6 @@ BDEPEND="$(python_gen_cond_dep ' PATCHES=( "${FILESDIR}/${P}-fix-pybuild.patch" ) -src_prepare() { - distutils-r1_python_prepare_all - # prevent setup.py from trying to update MIME databases - sed -i 's/^ROOT =.*/ROOT = False/' setup.py || die -} - python_compile_all() { use doc && emake -C doc html } @@ -53,8 +47,6 @@ python_install_all() { } python_test() { - local -x sitedir=$(python_get_sitedir) - local -x PYPATH="${BUILD_DIR}/install/${sitedir}/${PN}_qt/" - cd "${PYPATH}" - "${EPYTHON}" tests/query_tests.py -v --platform minimal || die + cd "${BUILD_DIR}/install$(python_get_sitedir)/${PN}_qt/" || die + "${EPYTHON}" tests/query_tests.py -v --platform minimal || die }