diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-08-03 13:48:30 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-08-03 13:48:30 +0100 |
commit | 24d75f43d3d4caf76f2448bb277e89a3b3ae0d99 (patch) | |
tree | 4f290d635d831599222130ba8ddbf1a726129426 /eclass | |
parent | 8d8735134b6bb6e159162e531cccb456691a4ed4 (diff) |
gentoo auto-resync : 03.08.2022 - 13:48:05
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 36821 -> 36992 bytes | |||
-rw-r--r-- | eclass/java-pkg-simple.eclass | 6 | ||||
-rw-r--r-- | eclass/qt6-build.eclass | 161 |
3 files changed, 164 insertions, 3 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 6adb563c8214..128ccbc029e1 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass index 09062d9ede68..6f7324240e34 100644 --- a/eclass/java-pkg-simple.eclass +++ b/eclass/java-pkg-simple.eclass @@ -344,9 +344,6 @@ java-pkg-simple_prepend_resources() { java-pkg-simple_src_compile() { local sources=sources.lst classes=target/classes apidoc=target/api moduleinfo - # auto generate classpath - java-pkg_gen-cp JAVA_GENTOO_CLASSPATH - # do not compile if we decide to install binary jar if has binary ${JAVA_PKG_IUSE} && use binary; then # register the runtime dependencies @@ -357,6 +354,9 @@ java-pkg-simple_src_compile() { cp "${DISTDIR}"/${JAVA_BINJAR_FILENAME} ${JAVA_JAR_FILENAME}\ || die "Could not copy the binary jar file to ${S}" return 0 + else + # auto generate classpath + java-pkg_gen-cp JAVA_GENTOO_CLASSPATH fi # gather sources diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass new file mode 100644 index 000000000000..c8313e255a0a --- /dev/null +++ b/eclass/qt6-build.eclass @@ -0,0 +1,161 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: qt6-build.eclass +# @MAINTAINER: +# qt@gentoo.org +# @SUPPORTED_EAPIS: 8 +# @BLURB: Eclass for Qt6 split ebuilds. +# @DESCRIPTION: +# This eclass contains various functions that are used when building Qt6. +# Requires EAPI 8. + +if [[ ${CATEGORY} != dev-qt ]]; then + die "qt6-build.eclass is only to be used for building Qt 6" +fi + +case ${EAPI} in + 8) : ;; + *) die "qt6-build.eclass: unsupported EAPI=${EAPI:-0}" ;; +esac + +# @ECLASS_VARIABLE: QT6_MODULE +# @PRE_INHERIT +# @DESCRIPTION: +# The upstream name of the module this package belongs to. Used for +# SRC_URI and EGIT_REPO_URI. Must be set before inheriting the eclass. +: ${QT6_MODULE:=${PN}} + +# @ECLASS_VARIABLE: VIRTUALX_REQUIRED +# @DESCRIPTION: +# For proper description see virtualx.eclass man page. +# Here we redefine default value to be manual, if your package needs virtualx +# for tests you should proceed with setting VIRTUALX_REQUIRED=test. +: ${VIRTUALX_REQUIRED:=manual} + +inherit cmake virtualx + +HOMEPAGE="https://www.qt.io/" +LICENSE="|| ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3" +SLOT=6/$(ver_cut 1-2) + +QT6_MINOR_VERSION=$(ver_cut 2) +readonly QT6_MINOR_VERSION + +case ${PV} in + 6.9999) + # git dev branch + QT6_BUILD_TYPE="live" + EGIT_BRANCH="dev" + ;; + 6.?.9999|6.??.9999) + # git stable branch + QT6_BUILD_TYPE="live" + EGIT_BRANCH=${PV%.9999} + ;; + *_alpha*|*_beta*|*_rc*) + # development release + QT6_BUILD_TYPE="release" + MY_P=${QT6_MODULE}-everywhere-src-${PV/_/-} + SRC_URI="https://download.qt.io/development_releases/qt/${PV%.*}/${PV/_/-}/submodules/${MY_P}.tar.xz" + S=${WORKDIR}/${MY_P} + ;; + *) + # official stable release + QT6_BUILD_TYPE="release" + MY_P=${QT6_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 QT6_BUILD_TYPE + +EGIT_REPO_URI=( + "https://code.qt.io/qt/${QT6_MODULE}.git" + "https://github.com/qt/${QT6_MODULE}.git" +) +[[ ${QT6_BUILD_TYPE} == live ]] && inherit git-r3 + +# @ECLASS_VARIABLE: QT6_BUILD_DIR +# @OUTPUT_VARIABLE +# @DESCRIPTION: +# Build directory for out-of-source builds. +: ${QT6_BUILD_DIR:=${S}_build} + +IUSE="debug test" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + RESTRICT="test" # bug 457182 +else + RESTRICT="!test? ( test )" +fi + +BDEPEND=" + dev-lang/perl + virtual/pkgconfig +" +# TODO: Tests have not been split from qtbase. +#if [[ ${PN} != qttest ]]; then +# DEPEND+=" test? ( ~dev-qt/qttest-${PV} )" +#fi + +EXPORT_FUNCTIONS src_prepare src_configure + +###### Phase functions ###### + +# @FUNCTION: qt6-build_src_prepare +# @DESCRIPTION: +# Prepares the environment and patches the sources if necessary. +qt6-build_src_prepare() { + qt6_prepare_env + + cmake_src_prepare +} + +# @FUNCTION: qt6-build_src_configure +# @DESCRIPTION: +# Configures sources. +qt6-build_src_configure() { + cmake_src_configure +} + +###### Public helpers ###### + +# @FUNCTION: qt_feature +# @USAGE: <flag> [feature] +# @DESCRIPTION: +# <flag> is the name of a flag in IUSE. +qt_feature() { + [[ $# -ge 1 ]] || die "${FUNCNAME}() requires at least one argument" + echo "-DQT_FEATURE_${2:-$1}=$(usex $1 ON OFF)" +} + +###### Internal functions ###### + +# @FUNCTION: qt6_prepare_env +# @INTERNAL +# @DESCRIPTION: +# Prepares the environment for building Qt. +qt6_prepare_env() { + # setup installation directories + # note: keep paths in sync with qmake-utils.eclass + QT6_PREFIX=${EPREFIX}/usr + QT6_HEADERDIR=${QT6_PREFIX}/include/qt6 + QT6_LIBDIR=${QT6_PREFIX}/$(get_libdir) + QT6_ARCHDATADIR=${QT6_PREFIX}/$(get_libdir)/qt6 + QT6_BINDIR=${QT6_ARCHDATADIR}/bin + QT6_PLUGINDIR=${QT6_ARCHDATADIR}/plugins + QT6_LIBEXECDIR=${QT6_ARCHDATADIR}/libexec + QT6_IMPORTDIR=${QT6_ARCHDATADIR}/imports + QT6_QMLDIR=${QT6_ARCHDATADIR}/qml + QT6_DATADIR=${QT6_PREFIX}/share/qt6 + QT6_DOCDIR=${QT6_PREFIX}/share/qt6-doc + QT6_TRANSLATIONDIR=${QT6_DATADIR}/translations + QT6_EXAMPLESDIR=${QT6_DATADIR}/examples + QT6_TESTSDIR=${QT6_DATADIR}/tests + QT6_SYSCONFDIR=${EPREFIX}/etc/xdg + readonly QT6_PREFIX QT6_HEADERDIR QT6_LIBDIR QT6_ARCHDATADIR \ + QT6_BINDIR QT6_PLUGINDIR QT6_LIBEXECDIR QT6_IMPORTDIR \ + QT6_QMLDIR QT6_DATADIR QT6_DOCDIR QT6_TRANSLATIONDIR \ + QT6_EXAMPLESDIR QT6_TESTSDIR QT6_SYSCONFDIR +} |