summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin35991 -> 35989 bytes
-rw-r--r--eclass/distutils-r1.eclass2
-rw-r--r--eclass/kde.org.eclass2
-rw-r--r--eclass/kernel-2.eclass112
-rw-r--r--eclass/linux-info.eclass48
-rw-r--r--eclass/linux-mod.eclass8
-rw-r--r--eclass/mozcoreconf-v5.eclass4
-rw-r--r--eclass/multilib.eclass2
-rw-r--r--eclass/postgres-multi.eclass1
-rw-r--r--eclass/qt5-build.eclass43
10 files changed, 79 insertions, 143 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index f4899465e3fc..d3b01a95e0d0 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 75e8179c810e..786f59636638 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -86,7 +86,7 @@ esac
#
# - no -- do not add the dependency (pure distutils package)
# - bdepend -- add it to BDEPEND (the default)
-# - rdepend -- add it to BDEPEND+RDEPEND (when using entry_points)
+# - rdepend -- add it to BDEPEND+RDEPEND (e.g. when using pkg_resources)
# - pyproject.toml -- use pyproject2setuptools to install a project
# using pyproject.toml (flit, poetry...)
# - manual -- do not add the dependency and suppress the checks
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
index bf087dfc8a60..9e357001a970 100644
--- a/eclass/kde.org.eclass
+++ b/eclass/kde.org.eclass
@@ -260,7 +260,7 @@ _kde.org_calculate_live_repo() {
# (anongit) with anything else you might want to use.
EGIT_MIRROR=${EGIT_MIRROR:=https://invent.kde.org/${KDE_ORG_CATEGORY}}
- if [[ ${PV} == ?.??.9999 && ${CATEGORY} == dev-qt ]]; then
+ if [[ ${PV} == 5.??(.?)*.9999 && ${CATEGORY} == dev-qt ]]; then
EGIT_BRANCH="kde/$(ver_cut 1-2)"
fi
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index ef70e250c179..983ba916931d 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -759,83 +759,6 @@ unpack_fix_install_path() {
sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' "${S}"/Makefile || die
}
-# Compile Functions
-
-# @FUNCTION: compile_headers
-# @USAGE:
-# @DESCRIPTION:
-# header compilation
-
-compile_headers() {
- env_setup_xmakeopts
-
- # if we couldnt obtain HOSTCFLAGS from the Makefile,
- # then set it to something sane
- local HOSTCFLAGS=$(getfilevar HOSTCFLAGS "${S}"/Makefile)
- HOSTCFLAGS=${HOSTCFLAGS:--Wall -Wstrict-prototypes -O2 -fomit-frame-pointer}
-
- if kernel_is 2 4; then
- yes "" | make oldconfig ${xmakeopts}
- einfo ">>> make oldconfig complete"
- make dep ${xmakeopts}
- elif kernel_is 2 6; then
- # 2.6.18 introduces headers_install which means we dont need any
- # of this crap anymore :D
- kernel_is ge 2 6 18 && return 0
-
- # autoconf.h isnt generated unless it already exists. plus, we have
- # no guarantee that any headers are installed on the system...
- [[ -f ${EROOT%/}/usr/include/linux/autoconf.h ]] \
- || touch include/linux/autoconf.h || die
-
- # if K_DEFCONFIG isn't set, force to "defconfig"
- # needed by mips
- if [[ -z ${K_DEFCONFIG} ]]; then
- if kernel_is ge 2 6 16; then
- case ${CTARGET} in
- powerpc64*) K_DEFCONFIG="ppc64_defconfig";;
- powerpc*) K_DEFCONFIG="pmac32_defconfig";;
- *) K_DEFCONFIG="defconfig";;
- esac
- else
- K_DEFCONFIG="defconfig"
- fi
- fi
-
- # if there arent any installed headers, then there also isnt an asm
- # symlink in /usr/include/, and make defconfig will fail, so we have
- # to force an include path with $S.
- HOSTCFLAGS="${HOSTCFLAGS} -I${S}/include/"
- ln -sf asm-${KARCH} "${S}"/include/asm || die
- cross_pre_c_headers && return 0
-
- make ${K_DEFCONFIG} HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "defconfig failed (${K_DEFCONFIG})"
- if compile_headers_tweak_config; then
- yes "" | make oldconfig HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "2nd oldconfig failed"
- fi
- make prepare HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "prepare failed"
- make prepare-all HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "prepare failed"
- fi
-}
-
-# @FUNCTION: compile_headers_tweak_config
-# @USAGE:
-# @DESCRIPTION:
-# some targets can be very very picky, so let's finesse the
-# .config based upon any info we may have
-
-compile_headers_tweak_config() {
- case ${CTARGET} in
- sh*)
- sed -i '/CONFIG_CPU_SH/d' .config || die
- echo "CONFIG_CPU_SH${CTARGET:2:1}=y" >> .config
- return 0;;
- esac
-
- # no changes, so lets do nothing
- return 1
-}
-
# install functions
# @FUNCTION: install_universal
@@ -856,36 +779,12 @@ install_universal() {
install_headers() {
local ddir=$(kernel_header_destdir)
- # 2.6.18 introduces headers_install which means we dont need any
- # of this crap anymore :D
- if kernel_is ge 2 6 18; then
- env_setup_xmakeopts
- emake headers_install INSTALL_HDR_PATH="${ED%/}"${ddir}/.. ${xmakeopts}
-
- # let other packages install some of these headers
- rm -rf "${ED%/}"${ddir}/scsi || die #glibc/uclibc/etc...
- return 0
- fi
-
- # Do not use "linux/*" as that can cause problems with very long
- # $S values where the cmdline to cp is too long
- pushd "${S}" >/dev/null || die
- dodir ${ddir}/linux
- cp -pPR "${S}"/include/linux "${ED%/}"${ddir}/ || die
- rm -rf "${ED%/}"${ddir}/linux/modules || die
-
- dodir ${ddir}/asm
- cp -pPR "${S}"/include/asm/* "${ED%/}"${ddir}/asm || die
-
- if kernel_is 2 6; then
- dodir ${ddir}/asm-generic
- cp -pPR "${S}"/include/asm-generic/* "${ED%/}"${ddir}/asm-generic || die
- fi
-
- # clean up
- find "${D}" -name '*.orig' -exec rm -f {} \; || die
+ env_setup_xmakeopts
+ emake headers_install INSTALL_HDR_PATH="${ED%/}"${ddir}/.. ${xmakeopts}
- popd >/dev/null || die
+ # let other packages install some of these headers
+ rm -rf "${ED%/}"${ddir}/scsi || die #glibc/uclibc/etc...
+ return 0
}
# @FUNCTION: install_sources
@@ -1479,7 +1378,6 @@ kernel-2_src_prepare() {
kernel-2_src_compile() {
cd "${S}" || die
- [[ ${ETYPE} == headers ]] && compile_headers
if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then
einfo ">>> Running deblob script ..."
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 0b6df1bf5919..4e08949a3854 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -80,6 +80,15 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}"
# There are also a couple of variables which are set by this, and shouldn't be
# set by hand. These are as follows:
+# @ECLASS-VARIABLE: KERNEL_MAKEFILE
+# @INTERNAL
+# @DESCRIPTION:
+# According to upstream documentation, by default, when make looks for the makefile, it tries
+# the following names, in order: GNUmakefile, makefile and Makefile. Set this variable to the
+# proper Makefile name or the eclass will search in this order for it.
+# See https://www.gnu.org/software/make/manual/make.html
+: ${KERNEL_MAKEFILE:=""}
+
# @ECLASS-VARIABLE: KV_FULL
# @OUTPUT_VARIABLE
# @DESCRIPTION:
@@ -195,9 +204,10 @@ getfilevar() {
unset ARCH
# We use nonfatal because we want the caller to take care of things #373151
+ # Pass need-config= to make to avoid config check in kernel Makefile.
[[ ${EAPI:-0} == [0123] ]] && nonfatal() { "$@"; }
echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \
- nonfatal emake -C "${basedname}" M="${T}" ${BUILD_FIXES} -s -f - 2>/dev/null
+ nonfatal emake -C "${basedname}" M="${T}" need-config= ${BUILD_FIXES} -s -f - 2>/dev/null
ARCH=${myARCH}
fi
@@ -510,7 +520,9 @@ get_version() {
qeinfo " ${KV_DIR}"
fi
- if [ ! -s "${KV_DIR}/Makefile" ]
+ kernel_get_makefile
+
+ if [[ ! -s ${KERNEL_MAKEFILE} ]]
then
if [ -z "${get_version_warning_done}" ]; then
get_version_warning_done=1
@@ -526,9 +538,6 @@ get_version() {
# do we pass KBUILD_OUTPUT on the CLI?
local OUTPUT_DIR=${KBUILD_OUTPUT}
- # keep track of it
- KERNEL_MAKEFILE="${KV_DIR}/Makefile"
-
if [[ -z ${OUTPUT_DIR} ]]; then
# Decide the function used to extract makefile variables.
local mkfunc=$(get_makefile_extract_function "${KERNEL_MAKEFILE}")
@@ -954,20 +963,19 @@ linux-info_pkg_setup() {
linux-info_get_any_version
- if kernel_is 2 4; then
- if [ "$( gcc-major-version )" -eq "4" ] ; then
- echo
- ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with"
- ewarn "linux-2.4 (or modules building against a linux-2.4 kernel)!"
- echo
- ewarn "Either switch to another gcc-version (via gcc-config) or use a"
- ewarn "newer kernel that supports >=sys-devel/gcc-4."
- echo
- ewarn "Also, be aware that bug reports about gcc-4 not working"
- ewarn "with linux-2.4 based ebuilds will be closed as INVALID!"
- echo
- fi
- fi
-
[ -n "${CONFIG_CHECK}" ] && check_extra_config;
}
+
+# @FUNCTION: kernel_get_makefile
+# @DESCRIPTION:
+# Support the possibility that the Makefile could be one of the following and should
+# be checked in the order described here:
+# https://www.gnu.org/software/make/manual/make.html
+# Order of checking and valid Makefiles names: GNUMakefile, makefile, Makefile
+kernel_get_makefile() {
+
+ [[ -s ${KV_DIR}/GNUMakefile ]] && KERNEL_MAKEFILE="${KV_DIR}/GNUMakefile" && return
+ [[ -s ${KV_DIR}/makefile ]] && KERNEL_MAKEFILE="${KV_DIR}/makefile" && return
+ [[ -s ${KV_DIR}/Makefile ]] && KERNEL_MAKEFILE="${KV_DIR}/Makefile" && return
+
+}
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index ca7bb2e219f5..943efa5cd9be 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -673,6 +673,11 @@ linux-mod_src_compile() {
[[ -n ${KERNEL_DIR} ]] && addpredict "${KERNEL_DIR}/null.dwo"
+ # Set CROSS_COMPILE in the environment.
+ # This allows it to be overridden in local Makefiles.
+ # https://bugs.gentoo.org/550428
+ local -x CROSS_COMPILE=${CROSS_COMPILE-${CHOST}-}
+
BUILD_TARGETS=${BUILD_TARGETS:-clean module}
strip_modulenames;
cd "${S}"
@@ -705,12 +710,11 @@ linux-mod_src_compile() {
# inside the variables gets used as targets for Make, which then
# fails.
eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" \
- CROSS_COMPILE=${CHOST}- \
LDFLAGS=\"$(get_abi_LDFLAGS)\" \
${BUILD_FIXES} \
${BUILD_PARAMS} \
${BUILD_TARGETS} " \
- || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}"
+ || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}"
cd "${OLDPWD}"
touch "${srcdir}"/.built
fi
diff --git a/eclass/mozcoreconf-v5.eclass b/eclass/mozcoreconf-v5.eclass
index d50d9444cb82..af2044770da0 100644
--- a/eclass/mozcoreconf-v5.eclass
+++ b/eclass/mozcoreconf-v5.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
# @ECLASS: mozcoreconf-v5.eclass
@@ -17,7 +17,7 @@
if [[ ! ${_MOZCORECONF} ]]; then
PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,sqlite,ssl,threads'
+PYTHON_REQ_USE='ncurses,sqlite,ssl,threads(+)'
inherit multilib toolchain-funcs flag-o-matic python-any-r1 versionator
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index 67cad9875a12..483f8d10c721 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -496,6 +496,7 @@ multilib_toolchain_setup() {
FC
LD
NM
+ OBJCOPY
OBJDUMP
PKG_CONFIG
RANLIB
@@ -544,6 +545,7 @@ multilib_toolchain_setup() {
export FC="$(tc-getFC) $(get_abi_CFLAGS)"
export LD="$(tc-getLD) $(get_abi_LDFLAGS)"
export NM="$(tc-getNM)" # Avoid 'nm', use '${CHOST}-nm'
+ export OBJCOPY="$(tc-getOBJCOPY)" # Avoid 'objcopy', use '${CHOST}-objcopy'
export OBJDUMP="$(tc-getOBJDUMP)" # Avoid 'objdump', use '${CHOST}-objdump'
export PKG_CONFIG="$(tc-getPKG_CONFIG)"
export RANLIB="$(tc-getRANLIB)" # Avoid 'ranlib', use '${CHOST}-ranlib'
diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass
index acaa5077217f..5e37a7d0b471 100644
--- a/eclass/postgres-multi.eclass
+++ b/eclass/postgres-multi.eclass
@@ -11,6 +11,7 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_compile src_install src_test
# @AUTHOR:
# Aaron W. Swenson <titanofold@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: multibuild postgres
# @BLURB: An eclass to build PostgreSQL-related packages against multiple slots
# @DESCRIPTION:
# postgres-multi enables ebuilds, particularly PostgreSQL extensions, to
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index 2765fc46081f..a0895e27abd9 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -37,6 +37,12 @@ readonly QT5_BUILD_TYPE
# SRC_URI and EGIT_REPO_URI. Must be set before inheriting the eclass.
: ${QT5_MODULE:=${PN}}
+# @ECLASS-VARIABLE: QT5_PV
+# @DESCRIPTION:
+# 3-component version for use in dependency declarations on other dev-qt/ pkgs.
+QT5_PV=$(ver_cut 1-3)
+readonly QT5_PV
+
# @ECLASS-VARIABLE: _QT5_P
# @INTERNAL
# @DESCRIPTION:
@@ -109,7 +115,7 @@ BDEPEND="
virtual/pkgconfig
"
if [[ ${PN} != qttest ]]; then
- DEPEND+=" test? ( ~dev-qt/qttest-$(ver_cut 1-3) )"
+ DEPEND+=" test? ( =dev-qt/qttest-${QT5_PV}* )"
fi
###### Phase functions ######
@@ -122,13 +128,15 @@ EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test pkg_
qt5-build_src_prepare() {
qt5_prepare_env
- if [[ -n ${KDE_ORG_COMMIT} ]]; then
+ if [[ ${QT5_BUILD_TYPE} == live ]] || [[ -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
+ if [[ -n ${KDE_ORG_COMMIT} ]]; then
+ einfo "Preparing KDE Qt5PatchCollection snapshot at ${KDE_ORG_COMMIT}"
+ mkdir -p .git || die # need to fake a git repository for configure
+ fi
+ sed -e "/^MODULE_VERSION/s/5\.15\.[3456789]/${QT5_PV}/" -i .qmake.conf || die
fi
if [[ ${QT5_MODULE} == qtbase ]]; then
@@ -166,8 +174,10 @@ qt5-build_src_configure() {
if [[ ${QT5_MODULE} == qtbase ]]; then
qt5_base_configure
fi
- if [[ ${QT5_MODULE} == qttools ]] && [[ -z ${QT5_TARGET_SUBDIRS[@]} ]]; then
- qt5_tools_configure
+ if [[ ${QT5_MODULE} == qttools ]]; then
+ if [[ ${EAPI} != 7 || -z ${QT5_TARGET_SUBDIRS[@]} ]]; then
+ qt5_tools_configure
+ fi
fi
qt5_foreach_target_subdir qt5_qmake
@@ -643,7 +653,10 @@ qt5_base_configure() {
# @FUNCTION: qt5_tools_configure
# @INTERNAL
# @DESCRIPTION:
-# Disables modules other than ${PN} belonging to qttools.
+# Most of qttools require files that are only generated when qmake is
+# run in the root directory. Related bugs: 676948, 716514.
+# Runs qt5_qmake in root directory to create qttools-config.pri and copy to
+# ${QT5_BUILD_DIR}, disabling modules other than ${PN} belonging to qttools.
qt5_tools_configure() {
# configure arguments
local qmakeargs=(
@@ -659,13 +672,23 @@ qt5_tools_configure() {
-no-feature-winrtrunner
)
- local i
+ local i module=${PN}
+ case ${PN} in
+ linguist-tools) module=linguist ;;
+ *) ;;
+ esac
for i in assistant designer linguist pixeltool qdbus qdoc qtdiag qtpaths qtplugininfo; do
- [[ ${PN} == ${i} ]] || qmakeargs+=( -no-feature-${i} )
+ [[ ${module} != ${i} ]] && qmakeargs+=( -no-feature-${i} )
done
# allow the ebuild to override what we set here
myqmakeargs=( "${qmakeargs[@]}" "${myqmakeargs[@]}" )
+
+ if [[ ${EAPI} != 7 ]]; then
+ mkdir -p "${QT5_BUILD_DIR}" || die
+ qt5_qmake "${QT5_BUILD_DIR}"
+ cp qttools-config.pri "${QT5_BUILD_DIR}" || die
+ fi
}
# @FUNCTION: qt5_qmake_args