From b1c81de4fadbd00897700a7321f03b390d952b2e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 26 Aug 2021 00:09:36 +0100 Subject: gentoo resync : 26.08.2021 --- eclass/Manifest.gz | Bin 35980 -> 35980 bytes eclass/kernel-2.eclass | 7 ++- eclass/linux-mod.eclass | 2 +- eclass/qt5-build.eclass | 140 +++++++++++++++++++++--------------------------- 4 files changed, 69 insertions(+), 80 deletions(-) (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index c1b18d88ee20..900de55148fa 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz differ diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index f94dd9c43982..58e0bae94eee 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -583,6 +583,7 @@ if [[ ${ETYPE} == sources ]]; then [[ ${EAPI} == 6 ]] && DEPEND="!build? ( sys-apps/sed )" || BDEPEND="!build? ( sys-apps/sed )" RDEPEND="!build? ( + app-arch/cpio dev-lang/perl sys-devel/bc sys-devel/bison @@ -604,8 +605,12 @@ if [[ ${ETYPE} == sources ]]; then [[ -z ${K_DEBLOB_AVAILABLE} ]] && \ kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \ K_DEBLOB_AVAILABLE=1 + # deblob less than 5.10 require python 2.7 + if kernel_is lt 5 10; then + K_DEBLOB_AVAILABLE=0 + fi if [[ ${K_DEBLOB_AVAILABLE} == 1 ]]; then - PYTHON_COMPAT=( python2_7 ) + PYTHON_COMPAT=( python3_{7..10} ) inherit python-any-r1 diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index e87c5ec0cdb3..7e47a2e209d5 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -741,7 +741,7 @@ linux-mod_src_install() { einfo "Installing ${modulename} module" cd "${objdir}" || die "${objdir} does not exist" - insinto /lib/modules/${KV_FULL}/${libdir} + insinto "${INSTALL_MOD_PATH}"/lib/modules/${KV_FULL}/${libdir} doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed" cd "${OLDPWD}" diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index bc5928d33140..2765fc46081f 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -6,7 +6,7 @@ # qt@gentoo.org # @AUTHOR: # Davide Pesavento -# @SUPPORTED_EAPIS: 7 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Eclass for Qt5 split ebuilds. # @DESCRIPTION: # This eclass contains various functions that are used when building Qt5. @@ -16,10 +16,20 @@ if [[ ${CATEGORY} != dev-qt ]]; then fi case ${EAPI} in - 7) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac +# @ECLASS-VARIABLE: QT5_BUILD_TYPE +# @DESCRIPTION: +# Default value is "release". +# If PV matches "*9999*", this is automatically set to "live". +QT5_BUILD_TYPE=release +if [[ ${PV} == *9999* ]]; then + QT5_BUILD_TYPE=live +fi +readonly QT5_BUILD_TYPE + # @ECLASS-VARIABLE: QT5_MODULE # @PRE_INHERIT # @DESCRIPTION: @@ -27,6 +37,13 @@ esac # SRC_URI and EGIT_REPO_URI. Must be set before inheriting the eclass. : ${QT5_MODULE:=${PN}} +# @ECLASS-VARIABLE: _QT5_P +# @INTERNAL +# @DESCRIPTION: +# The upstream package name of the module this package belongs to. +# Used for SRC_URI and S. +_QT5_P=${QT5_MODULE}-everywhere-src-${PV} + # @ECLASS-VARIABLE: QT5_TARGET_SUBDIRS # @DEFAULT_UNSET # @DESCRIPTION: @@ -59,41 +76,17 @@ esac inherit estack flag-o-matic toolchain-funcs virtualx -HOMEPAGE="https://www.qt.io/" -LICENSE="|| ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3" -SLOT=5/$(ver_cut 1-2) - -QT5_MINOR_VERSION=$(ver_cut 2) -readonly QT5_MINOR_VERSION - -case ${PV} in - 5.??.9999) - # git stable branch - QT5_BUILD_TYPE="live" - EGIT_BRANCH=${PV%.9999} - ;; - *_alpha*|*_beta*|*_rc*) - # development release - QT5_BUILD_TYPE="release" - MY_P=${QT5_MODULE}-everywhere-src-${PV/_/-} - SRC_URI="https://download.qt.io/development_releases/qt/${PV%.*}/${PV/_/-}/submodules/${MY_P}.tar.xz" - S=${WORKDIR}/${MY_P} - ;; - *) +if [[ ${PN} != qtwebengine ]]; then + if [[ ${QT5_BUILD_TYPE} == live ]] || [[ -n ${KDE_ORG_COMMIT} ]]; then + # KDE Qt5PatchCollection + inherit kde.org + else # official stable release - QT5_BUILD_TYPE="release" - MY_P=${QT5_MODULE}-everywhere-src-${PV} - SRC_URI="https://download.qt.io/official_releases/qt/${PV%.*}/${PV}/submodules/${MY_P}.tar.xz" - S=${WORKDIR}/${MY_P} - ;; -esac -readonly QT5_BUILD_TYPE - -EGIT_REPO_URI=( - "https://code.qt.io/qt/${QT5_MODULE}.git" - "https://github.com/qt/${QT5_MODULE}.git" -) -[[ ${QT5_BUILD_TYPE} == live ]] && inherit git-r3 + HOMEPAGE="https://www.qt.io/" + SRC_URI="https://download.qt.io/official_releases/qt/${PV%.*}/${PV}/submodules/${_QT5_P}.tar.xz" + S=${WORKDIR}/${_QT5_P} + fi +fi # @ECLASS-VARIABLE: QT5_BUILD_DIR # @OUTPUT_VARIABLE @@ -101,6 +94,8 @@ EGIT_REPO_URI=( # Build directory for out-of-source builds. : ${QT5_BUILD_DIR:=${S}_build} +LICENSE="|| ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3" +SLOT=5/$(ver_cut 1-2) IUSE="debug test" if [[ ${QT5_BUILD_TYPE} == release ]]; then @@ -119,30 +114,7 @@ fi ###### Phase functions ###### -EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm - -# @FUNCTION: qt5-build_src_unpack -# @DESCRIPTION: -# Unpacks the sources. -qt5-build_src_unpack() { - # bug 307861 - if [[ ${PN} == qtwebengine ]]; then - eshopts_push -s extglob - if is-flagq '-g?(gdb)?([1-9])'; then - ewarn - ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)." - ewarn "You may experience really long compilation times and/or increased memory usage." - ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug." - ewarn - fi - eshopts_pop - fi - - case ${QT5_BUILD_TYPE} in - live) git-r3_src_unpack ;& - release) default ;; - esac -} +EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm # @FUNCTION: qt5-build_src_prepare # @DESCRIPTION: @@ -150,6 +122,15 @@ qt5-build_src_unpack() { qt5-build_src_prepare() { qt5_prepare_env + if [[ -n ${KDE_ORG_COMMIT} ]]; then + # Upstream bumped version in 5.15 branch after 5.15.2 release but their + # 5.15.3 release is closed and this will never be more than a Qt 5.15.2 + # with patches on top. + einfo "Preparing KDE Qt5PatchCollection snapshot at ${KDE_ORG_COMMIT}" + sed -e "/^MODULE_VERSION/s/5\.15\.3/5\.15\.2/" -i .qmake.conf || die + mkdir -p .git || die # need to fake a git repository for configure + fi + if [[ ${QT5_MODULE} == qtbase ]]; then qt5_symlink_tools_to_build_dir @@ -258,22 +239,23 @@ qt5-build_src_install() { "${D}${QT5_HEADERDIR}"/QtCore/qconfig.h \ || die "sed failed (qconfig.h)" - # install qtchooser configuration file - cat > "${T}/qt5-${CHOST}.conf" <<-_EOF_ || die - ${QT5_BINDIR} - ${QT5_LIBDIR} - _EOF_ - - ( - insinto /etc/xdg/qtchooser - doins "${T}/qt5-${CHOST}.conf" - ) - - # convenience symlinks - dosym qt5-"${CHOST}".conf /etc/xdg/qtchooser/5.conf - dosym qt5-"${CHOST}".conf /etc/xdg/qtchooser/qt5.conf - # TODO bug 522646: write an eselect module to manage default.conf - dosym qt5.conf /etc/xdg/qtchooser/default.conf + if ver_test -lt 5.15.2-r10; then + # install qtchooser configuration file + cat > "${T}/qt5-${CHOST}.conf" <<-_EOF_ || die + ${QT5_BINDIR} + ${QT5_LIBDIR} + _EOF_ + + ( + insinto /etc/xdg/qtchooser + doins "${T}/qt5-${CHOST}.conf" + ) + + # convenience symlinks + dosym qt5-"${CHOST}".conf /etc/xdg/qtchooser/5.conf + dosym qt5-"${CHOST}".conf /etc/xdg/qtchooser/qt5.conf + dosym qt5.conf /etc/xdg/qtchooser/default.conf + fi fi qt5_install_module_config @@ -647,9 +629,11 @@ qt5_base_configure() { # a forwarding header is no longer created since 5.8, causing the system # config to always be used. bug 599636 - # ${S}/include does not exist in live sources + # ${S}/include does not exist in live sources or kde.org snapshots local basedir="${S}/" - [[ ${QT5_BUILD_TYPE} == live ]] && basedir="" + if [[ ${QT5_BUILD_TYPE} == live ]] || [[ -n ${KDE_ORG_COMMIT} ]]; then + basedir="" + fi cp src/corelib/global/qconfig.h "${basedir}"include/QtCore/ || die popd >/dev/null || die -- cgit v1.2.3