From 6b9ad6410884e4046c7c584bbaea45b5848d07b5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 21 Jul 2018 19:01:17 +0100 Subject: gentoo resync : 21.07.2018 --- eclass/Manifest.gz | Bin 38391 -> 38399 bytes eclass/apache-2.eclass | 18 ++++++++++----- eclass/distutils-r1.eclass | 22 ++++++++++++++++--- eclass/eutils.eclass | 2 +- eclass/linux-info.eclass | 18 +++++++-------- eclass/ruby-ng-gnome2.eclass | 10 ++++++++- eclass/ruby-single.eclass | 4 ++-- eclass/ruby-utils.eclass | 4 ++-- eclass/texlive-module.eclass | 51 +++++++++++++++++++++++++++++++++---------- 9 files changed, 94 insertions(+), 35 deletions(-) (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index 57c4b4d317f3..5edb79a9d218 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz differ diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass index b2d72f479c7b..ab09ce367c14 100644 --- a/eclass/apache-2.eclass +++ b/eclass/apache-2.eclass @@ -9,7 +9,7 @@ # This eclass handles apache-2.x ebuild functions such as LoadModule generation # and inter-module dependency checking. -inherit autotools eutils flag-o-matic multilib ssl-cert user toolchain-funcs versionator +inherit autotools eutils flag-o-matic multilib ssl-cert user toolchain-funcs eapi7-ver [[ ${CATEGORY}/${PN} != www-servers/apache ]] \ && die "Do not use this eclass with anything else than www-servers/apache ebuilds!" @@ -21,7 +21,7 @@ case ${EAPI:-0} in esac # settings which are version specific go in here: -case $(get_version_component_range 1-2) in +case $(ver_cut 1-2) in 2.4) DEFAULT_MPM_THREADED="event" #509922 CDEPEND=">=dev-libs/apr-1.5.1:= @@ -119,7 +119,7 @@ _apache2_set_mpms() { REQUIRED_USE+=" )" done - if [[ "${PV}" != 2.2* ]] ; then + if [[ "$(ver_cut 1-2)" != 2.2 ]] ; then REQUIRED_USE+=" apache2_mpms_prefork? ( !apache2_modules_http2 )" fi } @@ -277,7 +277,9 @@ setup_modules() { elog "through the following environment variables:" elog elog " SUEXEC_SAFEPATH: Default PATH for suexec (default: '${EPREFIX}/usr/local/bin:${EPREFIX}/usr/bin:${EPREFIX}/bin')" - elog " SUEXEC_LOGFILE: Path to the suexec logfile (default: '${EPREFIX}/var/log/apache2/suexec_log')" + if { ver_test ${PV} -ge 2.4.34 && ! use suexec-syslog ; } || ver_test ${PV} -lt 2.4.34 ; then + elog " SUEXEC_LOGFILE: Path to the suexec logfile (default: '${EPREFIX}/var/log/apache2/suexec_log')" + fi elog " SUEXEC_CALLER: Name of the user Apache is running as (default: apache)" elog " SUEXEC_DOCROOT: Directory in which suexec will run scripts (default: '${EPREFIX}/var/www')" elog " SUEXEC_MINUID: Minimum UID, which is allowed to run scripts via suexec (default: 1000)" @@ -287,7 +289,13 @@ setup_modules() { elog MY_CONF+=( --with-suexec-safepath="${SUEXEC_SAFEPATH:-${EPREFIX}/usr/local/bin:${EPREFIX}/usr/bin:${EPREFIX}/bin}" ) - MY_CONF+=( --with-suexec-logfile="${SUEXEC_LOGFILE:-${EPREFIX}/var/log/apache2/suexec_log}" ) + if ver_test ${PV} -ge 2.4.34 ; then + MY_CONF+=( $(use_with !suexec-syslog suexec-logfile "${SUEXEC_LOGFILE:-${EPREFIX}/var/log/apache2/suexec_log}") ) + MY_CONF+=( $(use_with suexec-syslog) ) + MY_CONF+=( $(use_with suexec-caps suexec-capabilities) ) + else + MY_CONF+=( --with-suexec-logfile="${SUEXEC_LOGFILE:-${EPREFIX}/var/log/apache2/suexec_log}" ) + fi MY_CONF+=( --with-suexec-bin="${EPREFIX}/usr/sbin/suexec" ) MY_CONF+=( --with-suexec-userdir=${SUEXEC_USERDIR:-public_html} ) MY_CONF+=( --with-suexec-caller=${SUEXEC_CALLER:-apache} ) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 975383acc09b..85f8f4cb3be9 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -80,10 +80,10 @@ if [[ ! ${_DISTUTILS_R1} ]]; then [[ ${EAPI} == [45] ]] && inherit eutils [[ ${EAPI} == [56] ]] && inherit xdg-utils -inherit toolchain-funcs +inherit multiprocessing toolchain-funcs if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then - inherit multiprocessing python-r1 + inherit python-r1 else inherit python-single-r1 fi @@ -454,7 +454,23 @@ distutils-r1_python_compile() { _distutils-r1_copy_egg_info - esetup.py build "${@}" + local build_args=() + # distutils is parallel-capable since py3.5 + # to avoid breaking stable ebuilds, enable it only if either: + # a. we're dealing with EAPI 7 + # b. we're dealing with Python 3.7 or PyPy3 + if python_is_python3 && [[ ${EPYTHON} != python3.4 ]]; then + if [[ ${EAPI} != [56] || ${EPYTHON} != python3.[56] ]]; then + local jobs=$(makeopts_jobs "${MAKEOPTS}" INF) + if [[ ${jobs} == INF ]]; then + local nproc=$(get_nproc) + jobs=$(( nproc + 1 )) + fi + build_args+=( -j "${jobs}" ) + fi + fi + + esetup.py build "${build_args[@]}" "${@}" } # @FUNCTION: _distutils-r1_wrap_scripts diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 81621df78e63..9b4767e1874a 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -148,7 +148,6 @@ make_wrapper() { ( echo '#!/bin/sh' - [[ -n ${chdir} ]] && printf 'cd "%s"\n' "${EPREFIX}${chdir}" if [[ -n ${libdir} ]] ; then local var if [[ ${CHOST} == *-darwin* ]] ; then @@ -164,6 +163,7 @@ make_wrapper() { fi EOF fi + [[ -n ${chdir} ]] && printf 'cd "%s" &&\n' "${EPREFIX}${chdir}" # We don't want to quote ${bin} so that people can pass complex # things as ${bin} ... "./someprog --args" printf 'exec %s "$@"\n' "${bin/#\//${EPREFIX}/}" diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 96f94e4072ae..6cd64457edd2 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -115,7 +115,7 @@ IUSE="kernel_linux" # Overwritable environment Var's # --------------------------------------- -KERNEL_DIR="${KERNEL_DIR:-${ROOT}usr/src/linux}" +KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}" # Bug fixes @@ -554,7 +554,7 @@ get_version() { # caught before this if they are. if [[ -z ${OUTPUT_DIR} ]] ; then # Try to locate a kernel that is most relevant for us. - for OUTPUT_DIR in "${SYSROOT}" "${ROOT}" "" ; do + for OUTPUT_DIR in "${SYSROOT}" "${ROOT%/}" "" ; do OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build" if [[ -e ${OUTPUT_DIR} ]] ; then break @@ -615,19 +615,19 @@ get_running_version() { KV_FULL=$(uname -r) - if [[ -f ${ROOT}/lib/modules/${KV_FULL}/source/Makefile && -f ${ROOT}/lib/modules/${KV_FULL}/build/Makefile ]]; then - KERNEL_DIR=$(readlink -f ${ROOT}/lib/modules/${KV_FULL}/source) - KBUILD_OUTPUT=$(readlink -f ${ROOT}/lib/modules/${KV_FULL}/build) + if [[ -f ${ROOT%/}/lib/modules/${KV_FULL}/source/Makefile && -f ${ROOT%/}/lib/modules/${KV_FULL}/build/Makefile ]]; then + KERNEL_DIR=$(readlink -f ${ROOT%/}/lib/modules/${KV_FULL}/source) + KBUILD_OUTPUT=$(readlink -f ${ROOT%/}/lib/modules/${KV_FULL}/build) unset KV_FULL get_version return $? - elif [[ -f ${ROOT}/lib/modules/${KV_FULL}/source/Makefile ]]; then - KERNEL_DIR=$(readlink -f ${ROOT}/lib/modules/${KV_FULL}/source) + elif [[ -f ${ROOT%/}/lib/modules/${KV_FULL}/source/Makefile ]]; then + KERNEL_DIR=$(readlink -f ${ROOT%/}/lib/modules/${KV_FULL}/source) unset KV_FULL get_version return $? - elif [[ -f ${ROOT}/lib/modules/${KV_FULL}/build/Makefile ]]; then - KERNEL_DIR=$(readlink -f ${ROOT}/lib/modules/${KV_FULL}/build) + elif [[ -f ${ROOT%/}/lib/modules/${KV_FULL}/build/Makefile ]]; then + KERNEL_DIR=$(readlink -f ${ROOT%/}/lib/modules/${KV_FULL}/build) unset KV_FULL get_version return $? diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass index 2166cbfacce7..8a3ce33c0dc8 100644 --- a/eclass/ruby-ng-gnome2.eclass +++ b/eclass/ruby-ng-gnome2.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-ng-gnome2.eclass @@ -11,6 +11,14 @@ # This eclass simplifies installation of the various pieces of # ruby-gnome2 since they share a very common installation procedure. +case "${EAPI:-0}" in + 0|1|2|3|4|5|6) + ;; + *) + die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" + ;; +esac + RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN#ruby-}}" RUBY_FAKEGEM_TASK_TEST="" RUBY_FAKEGEM_TASK_DOC="" diff --git a/eclass/ruby-single.eclass b/eclass/ruby-single.eclass index c42b8911ef2d..c2c893903277 100644 --- a/eclass/ruby-single.eclass +++ b/eclass/ruby-single.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-single.eclass @@ -25,7 +25,7 @@ case "${EAPI:-0}" in 0|1|2|3) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; - 4|5|6) + 4|5|6|7) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass index 2ecef93d3172..6098a7ed7645 100644 --- a/eclass/ruby-utils.eclass +++ b/eclass/ruby-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-utils.eclass @@ -28,7 +28,7 @@ if [[ ! ${_RUBY_UTILS} ]]; then # provide for a better first installation experience. # All RUBY_TARGETS -RUBY_TARGETS_PREFERENCE="ruby23 ruby22 " +RUBY_TARGETS_PREFERENCE="ruby23 " # All other active ruby targets RUBY_TARGETS_PREFERENCE+="ruby24 ruby25" diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass index 9dd2303635d4..882811774779 100644 --- a/eclass/texlive-module.eclass +++ b/eclass/texlive-module.eclass @@ -64,13 +64,15 @@ # @DESCRIPTION: # Array variable specifying any patches to be applied. -inherit texlive-common eutils - case "${EAPI:-0}" in 0|1|2) die "EAPI='${EAPI}' is not supported anymore" ;; + 3|4|5) + inherit texlive-common eutils + ;; *) + inherit texlive-common ;; esac @@ -82,19 +84,30 @@ IUSE="source" # Starting from TeX Live 2009, upstream provides .tar.xz modules. PKGEXT=tar.xz -DEPEND="${COMMON_DEPEND} - app-arch/xz-utils" +case "${EAPI:-0}" in + 0|1|2|3|4|5|6) + DEPEND="${COMMON_DEPEND} + app-arch/xz-utils" + ;; + *) + # We do not need anything from SYSROOT: + # Everything is built from the texlive install in / + # Generated files are noarch + BDEPEND="${COMMON_DEPEND} + app-arch/xz-utils" + ;; +esac for i in ${TEXLIVE_MODULE_CONTENTS}; do SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.${PKGEXT}" done # Forge doc SRC_URI -[ -n "${PN##*documentation*}" ] && [ -n "${TEXLIVE_MODULE_DOC_CONTENTS}" ] && SRC_URI="${SRC_URI} doc? (" +[ -n "${TEXLIVE_MODULE_DOC_CONTENTS}" ] && SRC_URI="${SRC_URI} doc? (" for i in ${TEXLIVE_MODULE_DOC_CONTENTS}; do SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.${PKGEXT}" done -[ -n "${PN##*documentation*}" ] && [ -n "${TEXLIVE_MODULE_DOC_CONTENTS}" ] && SRC_URI="${SRC_URI} )" +[ -n "${TEXLIVE_MODULE_DOC_CONTENTS}" ] && SRC_URI="${SRC_URI} )" # Forge source SRC_URI if [ -n "${TEXLIVE_MODULE_SRC_CONTENTS}" ] ; then @@ -107,7 +120,7 @@ fi RDEPEND="${COMMON_DEPEND}" -[ -z "${PN##*documentation*}" ] || IUSE="${IUSE} doc" +IUSE="${IUSE} doc" # @ECLASS-VARIABLE: TEXLIVE_MODULE_OPTIONAL_ENGINE # @DESCRIPTION: @@ -147,8 +160,15 @@ texlive-module_src_unpack() { # Apply patches from the PATCHES array and user patches, if any. texlive-module_src_prepare() { - [[ ${#PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}" - epatch_user + case "${EAPI:-0}" in + 0|1|2|3|4|5) + [[ ${#PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}" + epatch_user + ;; + *) + die "texlive-module_src_prepare is not to be used in EAPI ${EAPI}" + ;; + esac } # @FUNCTION: texlive-module_add_format @@ -327,7 +347,7 @@ texlive-module_src_install() { done dodir /usr/share - if [ -z "${PN##*documentation*}" ] || use doc; then + if use doc; then [ -d texmf-doc ] && cp -pR texmf-doc "${ED}/usr/share/" else [ -d texmf/doc ] && rm -rf texmf/doc @@ -396,5 +416,12 @@ texlive-module_pkg_postrm() { etexmf-update } -EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install \ - pkg_postinst pkg_postrm +case "${EAPI:-0}" in + 0|1|2|3|4|5) + EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install \ + pkg_postinst pkg_postrm + ;; + *) + EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm + ;; +esac -- cgit v1.2.3