summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-07-19 22:05:27 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-07-19 22:05:27 +0100
commit121ed4eec41fbf03e1998d09eede1bf449da63b9 (patch)
treece9341d77d1507f67d4a3a1472da9011b5baa0a8 /eclass
parentdd762ff83c330186ee2ede002e08b2f780cddd51 (diff)
gentoo resync : 19.07.2019
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37120 -> 37134 bytes
-rw-r--r--eclass/cmake-utils.eclass2
-rw-r--r--eclass/db.eclass70
-rw-r--r--eclass/distutils-r1.eclass2
-rw-r--r--eclass/elisp.eclass36
-rw-r--r--eclass/kde5-functions.eclass22
-rw-r--r--eclass/kde5.eclass3
-rw-r--r--eclass/mozcoreconf-v6.eclass6
-rw-r--r--eclass/ruby-ng.eclass10
-rw-r--r--eclass/subversion.eclass40
-rw-r--r--eclass/toolchain-funcs.eclass15
-rw-r--r--eclass/usr-ldscript.eclass163
-rw-r--r--eclass/vdr-plugin-2.eclass4
-rw-r--r--eclass/wxwidgets.eclass29
-rw-r--r--eclass/xfconf.eclass161
15 files changed, 282 insertions, 281 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index a56d9badcf85..c34c2448c8bb 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index ea1858e9735f..109b584afb39 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -612,7 +612,7 @@ cmake-utils_src_configure() {
fi
fi
- if [[ ${EPREFIX} ]]; then
+ if use prefix-guest; then
cat >> "${build_rules}" <<- _EOF_ || die
# in Prefix we need rpath and must ensure cmake gets our default linker path
# right ... except for Darwin hosts
diff --git a/eclass/db.eclass b/eclass/db.eclass
index 5227601c456f..01c2f9d9f1fc 100644
--- a/eclass/db.eclass
+++ b/eclass/db.eclass
@@ -20,47 +20,49 @@ db_fix_so() {
has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
LIB="${EROOT}/usr/$(get_libdir)"
- cd "${LIB}"
+ cd "${LIB}" || die
# first clean up old symlinks
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so' -exec rm \{} \;
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so.[23]' -exec rm \{} \;
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*a' -exec rm \{} \;
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so' -delete || die
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so.[23]' -delete || die
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*a' -delete || die
# now rebuild all the correct ones
+ local ext
for ext in so a; do
for name in libdb libdb_{cxx,tcl,java,sql,stl}; do
- target=`find . -maxdepth 1 -type f -name "${name}-*.${ext}" |sort -n |tail -n 1`
- [ -n "${target}" ] && ln -sf ${target//.\//} ${name}.${ext}
+ target="$(find . -maxdepth 1 -type f -name "${name}-*.${ext}" |sort -V |tail -n 1)"
+ [[ -n "${target}" ]] && ln -sf ${target//.\//} ${name}.${ext}
done;
done;
# db[23] gets some extra-special stuff
- if [ -f libdb1.so.2 ]; then
+ if [[ -f libdb1.so.2 ]]; then
ln -sf libdb1.so.2 libdb.so.2
ln -sf libdb1.so.2 libdb1.so
ln -sf libdb1.so.2 libdb-1.so
fi
# what do we do if we ever get 3.3 ?
+ local i
for i in libdb libdb_{cxx,tcl,java,sql,stl}; do
- if [ -f $i-3.2.so ]; then
- ln -sf $i-3.2.so $i-3.so
- ln -sf $i-3.2.so $i.so.3
+ if [[ -f ${i}-3.2.so ]]; then
+ ln -sf ${i}-3.2.so ${i}-3.so
+ ln -sf ${i}-3.2.so ${i}.so.3
fi
done
# do the same for headers now
# but since there are only two of them, just overwrite them
cd "${EROOT}"/usr/include
- target=`find . -maxdepth 1 -type d -name 'db[0-9]*' | sort -n |cut -d/ -f2- | tail -n1`
- if [ -n "${target}" ] && [ -e "${target}/db.h" ] && ( ! [[ -e db.h ]] || [[ -h db.h ]] ); then
+ target="$(find . -maxdepth 1 -type d -name 'db[0-9]*' | sort -V |cut -d/ -f2- | tail -n1)"
+ if [[ -n "${target}" ]] && [[ -e "${target}/db.h" ]] && ( ! [[ -e db.h ]] || [[ -h db.h ]] ); then
einfo "Creating db.h symlinks to ${target}"
ln -sf "${target}"/db.h .
ln -sf "${target}"/db_185.h .
- elif [ ! -e "${target}/db.h" ]; then
- if [ -n "${target}" ]; then
+ elif [[ ! -e "${target}/db.h" ]]; then
+ if [[ -n "${target}" ]]; then
ewarn "Could not find ${target}/db.h"
- elif [ -h db.h ]; then
+ elif [[ -h db.h ]]; then
einfo "Apparently you just removed the last instance of $PN. Removing the symlinks"
rm -f db.h db_185.h
fi
@@ -72,7 +74,7 @@ db_src_install_doc() {
# not everybody wants this wad of documentation as it is primarily API docs
if use doc; then
dodir /usr/share/doc/${PF}/html
- mv "${ED}"/usr/docs/* "${ED}"/usr/share/doc/${PF}/html/
+ mv "${ED}"/usr/docs/* "${ED}"/usr/share/doc/${PF}/html/ || die
rm -rf "${ED}"/usr/docs
else
rm -rf "${ED}"/usr/docs
@@ -84,16 +86,17 @@ db_src_install_doc() {
db_src_install_examples() {
has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
if use examples ; then
- local langs="c cxx stl"
+ local langs=( c cxx stl )
[[ "${IUSE/java}" != "${IUSE}" ]] \
&& use java \
- && langs="${langs} java"
- for i in $langs ; do
+ && langs+=( java )
+ local i
+ for i in ${langs[@]} ; do
destdir="/usr/share/doc/${PF}/"
src="${S}/../examples_${i}/"
- if [ -f "${src}" ]; then
+ if [[ -f "${src}" ]]; then
dodir "${destdir}"
- cp -ra "${src}" "${ED}${destdir}/"
+ cp -ra "${src}" "${ED}${destdir}/" || die
fi
done
fi
@@ -102,6 +105,7 @@ db_src_install_examples() {
db_src_install_usrbinslot() {
has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
# slot all program names to avoid overwriting
+ local fname
for fname in "${ED}"/usr/bin/db*
do
dn="$(dirname "${fname}")"
@@ -116,7 +120,7 @@ db_src_install_headerslot() {
has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
# install all headers in a slotted location
dodir /usr/include/db${SLOT}
- mv "${ED}"/usr/include/*.h "${ED}"/usr/include/db${SLOT}/
+ mv "${ED}"/usr/include/*.h "${ED}"/usr/include/db${SLOT}/ || die
}
db_src_install_usrlibcleanup() {
@@ -125,24 +129,24 @@ db_src_install_usrlibcleanup() {
# Clean out the symlinks so that they will not be recorded in the
# contents (bug #60732)
- if [ "${ED}" = "" ]; then
- die "Calling clean_links while \$ED not defined"
+ if [[ "${ED}" = "" ]]; then
+ die "Calling clean_links while \${ED} not defined"
fi
- if [ -e "${LIB}"/libdb.a ] && [ ! -e "${LIB}"/libdb-${SLOT}.a ]; then
+ if [[ -e "${LIB}"/libdb.a ]] && [[ ! -e "${LIB}"/libdb-${SLOT}.a ]]; then
einfo "Moving libdb.a to a versioned name"
- mv "${LIB}/libdb.a" "${LIB}/libdb-${SLOT}.a"
+ mv "${LIB}/libdb.a" "${LIB}/libdb-${SLOT}.a" || die
fi
- if [ -e "${LIB}"/libdb_cxx.a ] && [ ! -e "${LIB}"/libdb_cxx-${SLOT}.a ]; then
+ if [[ -e "${LIB}"/libdb_cxx.a ]] && [[ ! -e "${LIB}"/libdb_cxx-${SLOT}.a ]]; then
einfo "Moving libdb_cxx.a to a versioned name"
- mv "${LIB}/libdb_cxx.a" "${LIB}/libdb_cxx-${SLOT}.a"
+ mv "${LIB}/libdb_cxx.a" "${LIB}/libdb_cxx-${SLOT}.a" || die
fi
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so' -exec rm \{} \;
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so.[23]' -exec rm \{} \;
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so' -delete || die
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so.[23]' -delete || die
einfo "removing unversioned static archives"
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*a' -exec rm \{} \;
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*a' -delete || die
rm -f \
"${ED}"/usr/include/{db,db_185}.h \
@@ -162,7 +166,7 @@ db_src_test() {
ewarn "This can take 6+ hours on modern machines"
# Fix stuff that fails with relative paths, and upstream moving files
# around...
- local test_parallel=''
+ local test_parallel='' t
for t in \
"${S}"/test/parallel.tcl \
"${S}"/../test/parallel.tcl \
@@ -188,7 +192,7 @@ db_src_test() {
echo "run_parallel $(makeopts_jobs) run_std" >> testrunner.tcl
tclsh testrunner.tcl
- egrep -qs '^FAIL' ALL.OUT* && die "Some tests failed, please see ${S}/ALL.OUT*"
+ grep -Eqs '^FAIL' ALL.OUT* && die "Some tests failed, please see ${S}/ALL.OUT*"
else
eerror "You must have USE=tcl to run the sys-libs/db testsuite."
fi
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 66920d1f7553..7c56a0c8a136 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -590,7 +590,7 @@ distutils-r1_python_install() {
esetup.py install --root="${root}" "${args[@]}"
- local forbidden_package_names=( examples test tests )
+ local forbidden_package_names=( examples test tests .pytest_cache )
local p
for p in "${forbidden_package_names[@]}"; do
if [[ -d ${root}$(python_get_sitedir)/${p} ]]; then
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index 55635398d54b..c885345a7a83 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: elisp.eclass
@@ -9,7 +9,7 @@
# Jeremy Maitin-Shepard <jbms@attbi.com>
# Christian Faulhammer <fauli@gentoo.org>
# Ulrich Müller <ulm@gentoo.org>
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
+# @SUPPORTED_EAPIS: 4 5 6 7
# @BLURB: Eclass for Emacs Lisp packages
# @DESCRIPTION:
#
@@ -67,21 +67,17 @@
inherit elisp-common
case ${EAPI:-0} in
- 0|1|2|3|4|5) inherit epatch ;;
+ 4|5) inherit epatch ;;
6|7) ;;
- *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-case ${EAPI:-0} in
- 0|1) EXPORT_FUNCTIONS src_{unpack,compile,install} \
- pkg_{setup,postinst,postrm} ;;
- *) EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
- pkg_{setup,postinst,postrm} ;;
-esac
+EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
+ pkg_{setup,postinst,postrm}
RDEPEND=">=virtual/emacs-${NEED_EMACS:-23}"
-case ${EAPI:-0} in
- 0|1|2|3|4|5|6) DEPEND="${RDEPEND}" ;;
+case ${EAPI} in
+ 4|5|6) DEPEND="${RDEPEND}" ;;
*) BDEPEND="${RDEPEND}" ;;
esac
@@ -102,8 +98,7 @@ elisp_pkg_setup() {
# @FUNCTION: elisp_src_unpack
# @DESCRIPTION:
# Unpack the sources; also handle the case of a single *.el file in
-# WORKDIR for packages distributed that way. For EAPIs without
-# src_prepare, call elisp_src_prepare.
+# WORKDIR for packages distributed that way.
elisp_src_unpack() {
[[ -n ${A} ]] && unpack ${A}
@@ -112,11 +107,6 @@ elisp_src_unpack() {
mv ${P}.el ${PN}.el || die
[[ -d ${S} ]] || S=${WORKDIR}
fi
-
- case ${EAPI:-0} in
- 0|1) [[ -d ${S} ]] && cd "${S}"
- elisp_src_prepare ;;
- esac
}
# @FUNCTION: elisp_src_prepare
@@ -136,15 +126,15 @@ elisp_src_prepare() {
else
die "Cannot find ${patch}"
fi
- case ${EAPI:-0} in
- 0|1|2|3|4|5) epatch "${file}" ;;
+ case ${EAPI} in
+ 4|5) epatch "${file}" ;;
*) eapply "${file}" ;;
esac
done
# apply any user patches
- case ${EAPI:-0} in
- 0|1|2|3|4|5) epatch_user ;;
+ case ${EAPI} in
+ 4|5) epatch_user ;;
*) eapply_user ;;
esac
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index d2f85c077c0a..2b2455e249e4 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -36,19 +36,31 @@ export KDE_BUILD_TYPE
case ${CATEGORY} in
kde-frameworks)
[[ ${KDE_BUILD_TYPE} = live ]] && : ${FRAMEWORKS_MINIMAL:=9999}
+ [[ ${PV} = 5.57* ]] && : ${QT_MINIMAL:=5.11.1}
;;
kde-plasma)
- [[ ${PV} = 5.15.5 ]] && : ${QT_MINIMAL:=5.11.1}
- [[ ${PV} = 5.16* ]] && : ${FRAMEWORKS_MINIMAL:=5.58.0}
+ if [[ ${PV} = 5.15.5 ]]; then
+ : ${FRAMEWORKS_MINIMAL:=5.57.0}
+ : ${QT_MINIMAL:=5.11.1}
+ fi
+ [[ ${PV} = 5.16.3 ]] && : ${FRAMEWORKS_MINIMAL:=5.58.0}
+ [[ ${PV} = 5.16* ]] && : ${FRAMEWORKS_MINIMAL:=5.60.0}
[[ ${KDE_BUILD_TYPE} = live ]] && : ${FRAMEWORKS_MINIMAL:=9999}
- : ${QT_MINIMAL:=5.12.3}
+ ;;
+ kde-apps)
+ if [[ ${PV} = 18.12.3 ]]; then
+ : ${FRAMEWORKS_MINIMAL:=5.57.0}
+ : ${PLASMA_MINIMAL:=5.14.5}
+ : ${QT_MINIMAL:=5.11.1}
+ fi
+ [[ ${PV} = 19.04.3 ]] && : ${FRAMEWORKS_MINIMAL:=5.60.0}
;;
esac
# @ECLASS-VARIABLE: QT_MINIMAL
# @DESCRIPTION:
# Minimum version of Qt to require. This affects add_qt_dep.
-: ${QT_MINIMAL:=5.11.1}
+: ${QT_MINIMAL:=5.12.3}
# @ECLASS-VARIABLE: FRAMEWORKS_MINIMAL
# @DESCRIPTION:
@@ -58,7 +70,7 @@ esac
# @ECLASS-VARIABLE: PLASMA_MINIMAL
# @DESCRIPTION:
# Minimum version of Plasma to require. This affects add_plasma_dep.
-: ${PLASMA_MINIMAL:=5.14.5}
+: ${PLASMA_MINIMAL:=5.15.5}
# @ECLASS-VARIABLE: KDE_APPS_MINIMAL
# @DESCRIPTION:
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index f58d991bc584..a7a08f97a5e2 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -302,6 +302,9 @@ _calculate_src_uri() {
kross)
_kmname="portingAids/${_kmname}"
;;
+ kdewebkit)
+ [[ ${PV} = 5.57.0 ]] || _kmname="portingAids/${_kmname}"
+ ;;
esac
case ${CATEGORY} in
diff --git a/eclass/mozcoreconf-v6.eclass b/eclass/mozcoreconf-v6.eclass
index b844a3591c8a..b5c3537eaf4d 100644
--- a/eclass/mozcoreconf-v6.eclass
+++ b/eclass/mozcoreconf-v6.eclass
@@ -196,7 +196,11 @@ mozconfig_init() {
fi
# Strip optimization so it does not end up in compile string
- filter-flags '-O* -ggdb3'
+ filter-flags '-O*'
+
+ if is-flagq '-g*' ; then
+ mozconfig_annotate 'elf-hack broken with -g* flags' --disable-elf-hack
+ fi
# Strip over-aggressive CFLAGS
use custom-cflags || strip-flags
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index 21cbc5d99595..90c36cd86e40 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -531,16 +531,6 @@ _each_ruby_check_install() {
local sitedir=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["sitedir"]')
local sitelibdir=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]')
- # Look for wrong files in sitedir
- # if [[ -d "${D}${sitedir}" ]]; then
- # local f=$(find "${D}${sitedir}" -mindepth 1 -maxdepth 1 -not -wholename "${D}${sitelibdir}")
- # if [[ -n ${f} ]]; then
- # eerror "Found files in sitedir, outsite sitelibdir:"
- # eerror "${f}"
- # die "Misplaced files in sitedir"
- # fi
- # fi
-
# The current implementation lacks libruby (i.e.: jruby)
[[ -z ${libruby_soname} ]] && return 0
diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index 39d85f7c89c1..4dd2b48c6ce6 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: subversion.eclass
@@ -6,35 +6,39 @@
# Akinori Hattori <hattya@gentoo.org>
# @AUTHOR:
# Original Author: Akinori Hattori <hattya@gentoo.org>
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
-# @BLURB: The subversion eclass is written to fetch software sources from subversion repositories
+# @SUPPORTED_EAPIS: 4 5 6 7
+# @BLURB: Fetch software sources from subversion repositories
# @DESCRIPTION:
# The subversion eclass provides functions to fetch, patch and bootstrap
# software sources from subversion repositories.
ESVN="${ECLASS}"
-case "${EAPI:-0}" in
- 0|1)
- inherit eutils
- EXPORT_FUNCTIONS src_unpack pkg_preinst
- DEPEND="dev-vcs/subversion"
- ;;
- 2|3|4|5)
+case ${EAPI:-0} in
+ 4|5)
inherit eutils
EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
- DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
;;
6|7)
+ inherit estack
EXPORT_FUNCTIONS src_unpack pkg_preinst
- DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
;;
*)
- die "EAPI ${EAPI} is not supported in subversion.eclass"
+ die "${ESVN}: EAPI ${EAPI:-0} is not supported"
;;
esac
-DEPEND+=" net-misc/rsync"
+DEPEND="|| (
+ dev-vcs/subversion[http]
+ dev-vcs/subversion[webdav-neon]
+ dev-vcs/subversion[webdav-serf]
+ )
+ net-misc/rsync"
+
+case ${EAPI} in
+ 4|5|6) ;;
+ *) BDEPEND="${DEPEND}"; DEPEND="" ;;
+esac
# @ECLASS-VARIABLE: ESVN_STORE_DIR
# @DESCRIPTION:
@@ -434,12 +438,9 @@ subversion_wc_info() {
# @FUNCTION: subversion_src_unpack
# @DESCRIPTION:
-# Default src_unpack. Fetch and, in older EAPIs, bootstrap.
+# Default src_unpack. Fetch.
subversion_src_unpack() {
subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
- if has "${EAPI:-0}" 0 1; then
- subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
- fi
}
# @FUNCTION: subversion_src_prepare
@@ -458,10 +459,9 @@ subversion_src_prepare() {
# want the logs to stick around if packages are uninstalled without messing with
# config protection.
subversion_pkg_preinst() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
local pkgdate=$(date "+%Y%m%d %H:%M:%S")
if [[ -n ${ESCM_LOGDIR} ]]; then
- local dir="${EROOT}/${ESCM_LOGDIR}/${CATEGORY}"
+ local dir="${EROOT%/}${ESCM_LOGDIR}/${CATEGORY}"
if [[ ! -d ${dir} ]]; then
mkdir -p "${dir}" || eerror "Failed to create '${dir}' for logging svn revision"
fi
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 2e027015c684..7bd90bb4e4a0 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -950,18 +950,11 @@ tc-enables-ssp-all() {
# @FUNCTION: gen_usr_ldscript
# @USAGE: [-a] <list of libs to create linker scripts for>
# @DESCRIPTION:
-# This function generate linker scripts in /usr/lib for dynamic
-# libs in /lib. This is to fix linking problems when you have
-# the .so in /lib, and the .a in /usr/lib. What happens is that
-# in some cases when linking dynamic, the .a in /usr/lib is used
-# instead of the .so in /lib due to gcc/libtool tweaking ld's
-# library search path. This causes many builds to fail.
-# See bug #4411 for more info.
-#
-# Note that you should in general use the unversioned name of
-# the library (libfoo.so), as ldconfig should usually update it
-# correctly to point to the latest version of the library present.
+# This function is deprecated. Use the version from
+# usr-ldscript.eclass instead.
gen_usr_ldscript() {
+ ewarn "${FUNCNAME}: Please migrate to usr-ldscript.eclass"
+
local lib libdir=$(get_libdir) output_format="" auto=false suffix=$(get_libname)
[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
diff --git a/eclass/usr-ldscript.eclass b/eclass/usr-ldscript.eclass
new file mode 100644
index 000000000000..7e406267b644
--- /dev/null
+++ b/eclass/usr-ldscript.eclass
@@ -0,0 +1,163 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: usr-ldscript.eclass
+# @MAINTAINER:
+# Toolchain Ninjas <toolchain@gentoo.org>
+# @SUPPORTED_EAPIS: 4 5 6 7
+# @BLURB: Defines the gen_usr_ldscript function.
+
+if [[ -z ${_USR_LDSCRIPT_ECLASS} ]]; then
+_USR_LDSCRIPT_ECLASS=1
+
+case ${EAPI:-0} in
+ 4|5|6|7) ;;
+ *) die "EAPI=${EAPI} is not supported" ;;
+esac
+
+inherit multilib toolchain-funcs
+
+IUSE="split-usr"
+
+# @FUNCTION: gen_usr_ldscript
+# @USAGE: [-a] <list of libs to create linker scripts for>
+# @DESCRIPTION:
+# This function generate linker scripts in /usr/lib for dynamic
+# libs in /lib. This is to fix linking problems when you have
+# the .so in /lib, and the .a in /usr/lib. What happens is that
+# in some cases when linking dynamic, the .a in /usr/lib is used
+# instead of the .so in /lib due to gcc/libtool tweaking ld's
+# library search path. This causes many builds to fail.
+# See bug #4411 for more info.
+#
+# Note that you should in general use the unversioned name of
+# the library (libfoo.so), as ldconfig should usually update it
+# correctly to point to the latest version of the library present.
+gen_usr_ldscript() {
+ local lib libdir=$(get_libdir) output_format="" auto=false suffix=$(get_libname)
+
+ tc-is-static-only && return
+
+ # We only care about stuffing / for the native ABI. #479448
+ if [[ $(type -t multilib_is_native_abi) == "function" ]] ; then
+ multilib_is_native_abi || return 0
+ fi
+
+ # Eventually we'd like to get rid of this func completely #417451
+ case ${CTARGET:-${CHOST}} in
+ *-darwin*) ;;
+ *-android*) return 0 ;;
+ *linux*|*-freebsd*|*-openbsd*|*-netbsd*)
+ use prefix && return 0
+ use split-usr || return 0
+ ;;
+ *) return 0 ;;
+ esac
+
+ # Just make sure it exists
+ dodir /usr/${libdir}
+
+ if [[ $1 == "-a" ]] ; then
+ auto=true
+ shift
+ dodir /${libdir}
+ fi
+
+ # OUTPUT_FORMAT gives hints to the linker as to what binary format
+ # is referenced ... makes multilib saner
+ local flags=( ${CFLAGS} ${LDFLAGS} -Wl,--verbose )
+ if $(tc-getLD) --version | grep -q 'GNU gold' ; then
+ # If they're using gold, manually invoke the old bfd. #487696
+ local d="${T}/bfd-linker"
+ mkdir -p "${d}"
+ ln -sf $(which ${CHOST}-ld.bfd) "${d}"/ld
+ flags+=( -B"${d}" )
+ fi
+ output_format=$($(tc-getCC) "${flags[@]}" 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ for lib in "$@" ; do
+ local tlib
+ if ${auto} ; then
+ lib="lib${lib}${suffix}"
+ else
+ # Ensure /lib/${lib} exists to avoid dangling scripts/symlinks.
+ # This especially is for AIX where $(get_libname) can return ".a",
+ # so /lib/${lib} might be moved to /usr/lib/${lib} (by accident).
+ [[ -r ${ED%/}/${libdir}/${lib} ]] || continue
+ #TODO: better die here?
+ fi
+
+ case ${CTARGET:-${CHOST}} in
+ *-darwin*)
+ if ${auto} ; then
+ tlib=$(scanmacho -qF'%S#F' "${ED%/}"/usr/${libdir}/${lib})
+ else
+ tlib=$(scanmacho -qF'%S#F' "${ED%/}"/${libdir}/${lib})
+ fi
+ [[ -z ${tlib} ]] && die "unable to read install_name from ${lib}"
+ tlib=${tlib##*/}
+
+ if ${auto} ; then
+ mv "${ED%/}"/usr/${libdir}/${lib%${suffix}}.*${suffix#.} "${ED%/}"/${libdir}/ || die
+ # some install_names are funky: they encode a version
+ if [[ ${tlib} != ${lib%${suffix}}.*${suffix#.} ]] ; then
+ mv "${ED%/}"/usr/${libdir}/${tlib%${suffix}}.*${suffix#.} "${ED%/}"/${libdir}/ || die
+ fi
+ rm -f "${ED%/}"/${libdir}/${lib}
+ fi
+
+ # Mach-O files have an id, which is like a soname, it tells how
+ # another object linking against this lib should reference it.
+ # Since we moved the lib from usr/lib into lib this reference is
+ # wrong. Hence, we update it here. We don't configure with
+ # libdir=/lib because that messes up libtool files.
+ # Make sure we don't lose the specific version, so just modify the
+ # existing install_name
+ if [[ ! -w "${ED%/}/${libdir}/${tlib}" ]] ; then
+ chmod u+w "${ED%/}/${libdir}/${tlib}" # needed to write to it
+ local nowrite=yes
+ fi
+ install_name_tool \
+ -id "${EPREFIX}"/${libdir}/${tlib} \
+ "${ED%/}"/${libdir}/${tlib} || die "install_name_tool failed"
+ [[ -n ${nowrite} ]] && chmod u-w "${ED%/}/${libdir}/${tlib}"
+ # Now as we don't use GNU binutils and our linker doesn't
+ # understand linker scripts, just create a symlink.
+ pushd "${ED%/}/usr/${libdir}" > /dev/null
+ ln -snf "../../${libdir}/${tlib}" "${lib}"
+ popd > /dev/null
+ ;;
+ *)
+ if ${auto} ; then
+ tlib=$(scanelf -qF'%S#F' "${ED%/}"/usr/${libdir}/${lib})
+ [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}"
+ mv "${ED%/}"/usr/${libdir}/${lib}* "${ED%/}"/${libdir}/ || die
+ # some SONAMEs are funky: they encode a version before the .so
+ if [[ ${tlib} != ${lib}* ]] ; then
+ mv "${ED%/}"/usr/${libdir}/${tlib}* "${ED%/}"/${libdir}/ || die
+ fi
+ rm -f "${ED%/}"/${libdir}/${lib}
+ else
+ tlib=${lib}
+ fi
+ cat > "${ED%/}/usr/${libdir}/${lib}" <<-END_LDSCRIPT
+ /* GNU ld script
+ Since Gentoo has critical dynamic libraries in /lib, and the static versions
+ in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we
+ run into linking problems. This "fake" dynamic lib is a linker script that
+ redirects the linker to the real lib. And yes, this works in the cross-
+ compiling scenario as the sysroot-ed linker will prepend the real path.
+
+ See bug https://bugs.gentoo.org/4411 for more info.
+ */
+ ${output_format}
+ GROUP ( ${EPREFIX}/${libdir}/${tlib} )
+ END_LDSCRIPT
+ ;;
+ esac
+ fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}"
+ done
+}
+
+fi # _USR_LDSCRIPT_ECLASS
diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
index ec754ceb710b..5a0792efe933 100644
--- a/eclass/vdr-plugin-2.eclass
+++ b/eclass/vdr-plugin-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: vdr-plugin-2.eclass
@@ -9,7 +9,7 @@
# Joerg Bornkessel <hd_brummy@gentoo.org>
# Christian Ruppert <idl0r@gentoo.org>
# (undisclosed contributors)
-# @SUPPORTED_EAPIS: 4 5 6
+# @SUPPORTED_EAPIS: 4 5 6 7
# @BLURB: common vdr plugin ebuild functions
# @DESCRIPTION:
# Eclass for easing maintenance of vdr plugin ebuilds
diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass
index 1cd6e49505df..9b37074d3b62 100644
--- a/eclass/wxwidgets.eclass
+++ b/eclass/wxwidgets.eclass
@@ -4,7 +4,7 @@
# @ECLASS: wxwidgets.eclass
# @MAINTAINER:
# wxwidgets@gentoo.org
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: Manages build configuration for wxGTK-using packages.
# @DESCRIPTION:
# This eclass sets up the proper environment for ebuilds using the wxGTK
@@ -23,9 +23,11 @@
if [[ -z ${_WXWIDGETS_ECLASS} ]]; then
-case ${EAPI} in
+inherit flag-o-matic
+
+case ${EAPI:-0} in
0|1|2|3|4|5)
- inherit eutils flag-o-matic multilib
+ inherit eutils multilib
# This was used to set up a sane default for ebuilds so they could
# avoid calling need-wxwidgets if they didn't need a particular build.
@@ -56,12 +58,9 @@ case ${EAPI} in
unset _wxdebug
unset _wxconf
;;
- 6)
- inherit flag-o-matic multilib
- ;;
- *)
- die "EAPI=${EAPI:-0} is not supported"
- ;;
+ 6) inherit multilib ;; # compatibility only, not needed by eclass
+ 7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported" ;;
esac
# @FUNCTION: setup-wxwidgets
@@ -130,10 +129,14 @@ setup-wxwidgets() {
echo
}
-# deprecated
-need-wxwidgets() {
- setup-wxwidgets
-}
+case ${EAPI:-0} in
+ 0|1|2|3|4|5|6)
+ # deprecated
+ need-wxwidgets() {
+ setup-wxwidgets
+ }
+ ;;
+esac
_WXWIDGETS_ECLASS=1
fi
diff --git a/eclass/xfconf.eclass b/eclass/xfconf.eclass
deleted file mode 100644
index 57bb96db229e..000000000000
--- a/eclass/xfconf.eclass
+++ /dev/null
@@ -1,161 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# Removal on 2019-06-02.
-
-# @ECLASS: xfconf.eclass
-# @MAINTAINER:
-# XFCE maintainers <xfce@gentoo.org>
-# @SUPPORTED_EAPIS: 5
-# @BLURB: Default XFCE ebuild layout
-# @DESCRIPTION:
-# Default XFCE ebuild layout
-
-# @ECLASS-VARIABLE: EAUTORECONF
-# @DESCRIPTION:
-# Run eautoreconf instead of elibtoolize if the variable is set
-
-if [[ -n ${EAUTORECONF} ]] ; then
- AUTOTOOLS_AUTO_DEPEND=yes
-else
- : ${AUTOTOOLS_AUTO_DEPEND:=no}
-fi
-
-# @ECLASS-VARIABLE: XFCONF
-# @DESCRIPTION:
-# This should be an array defining arguments for econf
-
-unset _xfconf_live
-[[ $PV == *9999* ]] && _xfconf_live=git-2
-
-inherit ${_xfconf_live} autotools eutils gnome2-utils libtool xdg-utils
-
-EGIT_BOOTSTRAP=autogen.sh
-EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}"
-
-_xfconf_deps=""
-_xfconf_m4=">=dev-util/xfce4-dev-tools-4.10"
-
-[[ -n $_xfconf_live ]] && _xfconf_deps+=" dev-util/gtk-doc ${_xfconf_m4}"
-[[ -n $EAUTORECONF ]] && _xfconf_deps+=" ${_xfconf_m4}"
-
-RDEPEND=""
-DEPEND="${_xfconf_deps}"
-
-unset _xfconf_deps
-unset _xfconf_m4
-
-case ${EAPI:-0} in
- 5) ;;
- *) die "Unknown EAPI." ;;
-esac
-
-[[ -n $_xfconf_live ]] && _xfconf_live=src_unpack
-
-EXPORT_FUNCTIONS ${_xfconf_live} src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
-
-# @FUNCTION: xfconf_use_debug
-# @DESCRIPTION:
-# If IUSE has debug, return --enable-debug=minimum.
-# If USE debug is enabled, return --enable-debug which is the same as --enable-debug=yes.
-# If USE debug is enabled and the XFCONF_FULL_DEBUG variable is set, return --enable-debug=full.
-xfconf_use_debug() {
- if has debug ${IUSE}; then
- if use debug; then
- if [[ -n $XFCONF_FULL_DEBUG ]]; then
- echo "--enable-debug=full"
- else
- echo "--enable-debug"
- fi
- else
- echo "--enable-debug=minimum"
- fi
- else
- ewarn "${FUNCNAME} called without debug in IUSE"
- fi
-}
-
-# @FUNCTION: xfconf_src_unpack
-# @DESCRIPTION:
-# Run git-2_src_unpack if required
-xfconf_src_unpack() {
- NOCONFIGURE=1 git-2_src_unpack
-}
-
-# @FUNCTION: xfconf_src_prepare
-# @DESCRIPTION:
-# Process PATCHES with epatch and run epatch_user followed by run of
-# elibtoolize, or eautoreconf if EAUTORECONF is set.
-xfconf_src_prepare() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
- epatch_user
-
- if [[ -n $EAUTORECONF ]]; then
- AT_M4DIR=${EPREFIX}/usr/share/xfce4/dev-tools/m4macros eautoreconf
- else
- elibtoolize
- fi
-}
-
-# @FUNCTION: xfconf_src_configure
-# @DESCRIPTION:
-# Run econf with opts from the XFCONF array
-xfconf_src_configure() {
- debug-print-function ${FUNCNAME} "$@"
- [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode )
- econf "${XFCONF[@]}"
-}
-
-# @FUNCTION: xfconf_src_install
-# @DESCRIPTION:
-# Run emake install to DESTDIR, einstalldocs to process DOCS and
-# prune_libtool_files --all to always remove libtool files (.la)
-xfconf_src_install() {
- debug-print-function ${FUNCNAME} "$@"
-
- # FIXME
- if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then
- touch ChangeLog
- fi
-
- emake DESTDIR="${D}" "$@" install
-
- einstalldocs
-
- prune_libtool_files --all
-}
-
-# @FUNCTION: xfconf_pkg_preinst
-# @DESCRIPTION:
-# Run gnome2_icon_savelist
-xfconf_pkg_preinst() {
- debug-print-function ${FUNCNAME} "$@"
- gnome2_icon_savelist
-}
-
-# @FUNCTION: xfconf_pkg_postinst
-# @DESCRIPTION:
-# Run xdg_{desktop,mimeinfo}_database_update and gnome2_icon_cache_update
-xfconf_pkg_postinst() {
- debug-print-function ${FUNCNAME} "$@"
- xdg_desktop_database_update
- xdg_mimeinfo_database_update
- if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
- gnome2_icon_cache_update
- fi
-}
-
-# @FUNCTION: xfconf_pkg_postrm
-# @DESCRIPTION:
-# Run xdg_{desktop,mimeinfo}_database_update and gnome2_icon_cache_update
-xfconf_pkg_postrm() {
- debug-print-function ${FUNCNAME} "$@"
- xdg_desktop_database_update
- xdg_mimeinfo_database_update
- if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
- gnome2_icon_cache_update
- fi
-}