bump(profiles): sync with upstream

Packages updated:
  eclass
  licenses
  profiles
  scripts
This commit is contained in:
David Michael 2018-10-09 14:07:43 +00:00
parent 58dd711534
commit f1cd664d69
338 changed files with 5444 additions and 5224 deletions

View File

@ -4,12 +4,13 @@
# @ECLASS: apache-2.eclass
# @MAINTAINER:
# polynomial-c@gentoo.org
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: Provides a common set of functions for apache-2.x ebuilds
# @DESCRIPTION:
# 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 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 +22,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 +120,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 +278,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')"
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 +290,13 @@ setup_modules() {
elog
MY_CONF+=( --with-suexec-safepath="${SUEXEC_SAFEPATH:-${EPREFIX}/usr/local/bin:${EPREFIX}/usr/bin:${EPREFIX}/bin}" )
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+=( $(usex suexec-syslog $(usex suexec-caps --enable-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} )
@ -618,11 +627,14 @@ apache-2_src_install() {
# set some sane permissions for suexec
if use suexec ; then
local needs_adjustment="$(ver_test ${PV} -ge 2.4.34 && { { ! use suexec-syslog || ! use suexec-caps ; } && echo true || echo false ; } || echo true)"
if ${needs_adjustment} ; then
fowners 0:${SUEXEC_CALLER:-apache} /usr/sbin/suexec
fperms 4710 /usr/sbin/suexec
# provide legacy symlink for suexec, bug 177697
dosym /usr/sbin/suexec /usr/sbin/suexec2
fi
fi
# empty dirs
for i in /var/lib/dav /var/log/apache2 /var/cache/apache2 ; do

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Original author: Seemant Kulleen
# -r1 author: David Seifert
# @SUPPORTED_EAPIS: 6
# @BLURB: An eclass to streamline the construction of ebuilds for new aspell dicts
# @DESCRIPTION:
# The aspell-dict-r1 eclass is designed to streamline the construction of

View File

@ -6,6 +6,7 @@
# gx86-multilib team <multilib@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 4 5
# @BLURB: autotools-utils wrapper for multilib builds
# @DESCRIPTION:
# The autotools-multilib.eclass provides a glue between

View File

@ -1,10 +1,11 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: autotools-utils.eclass
# @MAINTAINER:
# Maciej Mrozowski <reavertm@gentoo.org>
# Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 2 3 4 5
# @BLURB: common ebuild functions for autotools-based packages
# @DESCRIPTION:
# autotools-utils.eclass is autotools.eclass(5) and base.eclass(5) wrapper
@ -89,7 +90,7 @@
case ${EAPI:-0} in
6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";;
2|3|4|5) ;;
4|5) ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
@ -281,8 +282,6 @@ autotools-utils_src_configure() {
[[ -z ${myeconfargs+1} || $(declare -p myeconfargs) == 'declare -a'* ]] \
|| die 'autotools-utils.eclass: myeconfargs has to be an array.'
[[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX=
# Common args
local econfargs=()
@ -338,32 +337,13 @@ autotools-utils_src_install() {
emake DESTDIR="${D}" "$@" install || die "emake install failed"
popd > /dev/null || die
# Move docs installed by autotools (in EAPI < 4).
if [[ ${EAPI} == [23] ]] \
&& path_exists "${D}${EPREFIX}"/usr/share/doc/${PF}/*; then
if [[ $(find "${D}${EPREFIX}"/usr/share/doc/${PF}/* -type d) ]]; then
eqawarn "autotools-utils: directories in docdir require at least EAPI 4"
else
mkdir "${T}"/temp-docdir
mv "${D}${EPREFIX}"/usr/share/doc/${PF}/* "${T}"/temp-docdir/ \
|| die "moving docs to tempdir failed"
dodoc "${T}"/temp-docdir/* || die "docdir dodoc failed"
rm -r "${T}"/temp-docdir || die
fi
fi
# XXX: support installing them from builddir as well?
if declare -p DOCS &>/dev/null; then
# an empty list == don't install anything
if [[ ${DOCS[@]} ]]; then
if [[ ${EAPI} == [23] ]]; then
dodoc "${DOCS[@]}" || die
else
# dies by itself
dodoc -r "${DOCS[@]}"
fi
fi
else
local f
# same list as in PMS

View File

@ -4,6 +4,7 @@
# @ECLASS: autotools.eclass
# @MAINTAINER:
# base-system@gentoo.org
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: Regenerates auto* build scripts
# @DESCRIPTION:
# This eclass is for safely handling autotooled software packages that need to
@ -25,6 +26,11 @@ fi
if [[ -z ${_AUTOTOOLS_ECLASS} ]]; then
_AUTOTOOLS_ECLASS=1
case ${EAPI:-0} in
0|1|2|3|4|5|6|7) ;;
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
esac
inherit libtool
# @ECLASS-VARIABLE: WANT_AUTOCONF
@ -118,7 +124,10 @@ RDEPEND=""
# their own DEPEND string.
: ${AUTOTOOLS_AUTO_DEPEND:=yes}
if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then
DEPEND=${AUTOTOOLS_DEPEND}
case ${EAPI:-0} in
0|1|2|3|4|5|6) DEPEND=${AUTOTOOLS_DEPEND} ;;
7) BDEPEND=${AUTOTOOLS_DEPEND} ;;
esac
fi
__AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass

View File

@ -22,6 +22,7 @@
# QA Team <qa@gentoo.org>
# @AUTHOR:
# Original author: Dan Armak <danarmak@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5
# @BLURB: The base eclass defines some default functions and variables.
# @DESCRIPTION:
# The base eclass defines some default functions and variables.
@ -33,9 +34,9 @@ inherit eutils
BASE_EXPF="src_unpack src_compile src_install"
case "${EAPI:-0}" in
6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";;
0|1) ;;
2|3|4|5) BASE_EXPF+=" src_prepare src_configure" ;;
*) ;;
*) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";;
esac
EXPORT_FUNCTIONS ${BASE_EXPF}

View File

@ -4,6 +4,7 @@
# @ECLASS: bash-completion-r1.eclass
# @MAINTAINER:
# mgorny@gentoo.org
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: A few quick functions to install bash-completion files
# @EXAMPLE:
#

View File

@ -38,7 +38,9 @@ mkmake() {
tc-export CC CXX LD RANLIB
${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= STRIP= "$@"
set -- ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= STRIP= "$@"
echo "${@}"
"${@}"
}
# @FUNCTION: mkinstall
@ -51,7 +53,9 @@ mkinstall() {
# STRIP= will replace the default value of -s, leaving to portage the
# task of stripping executables.
${BMAKE} ${mymakeopts} NO_WERROR= STRIP= MANSUBDIR= DESTDIR="${D}" "$@" install
set -- ${BMAKE} ${mymakeopts} NO_WERROR= STRIP= MANSUBDIR= DESTDIR="${D}" "$@" install
echo "${@}"
"${@}"
}
# @FUNCTION: dummy_mk

View File

@ -9,6 +9,7 @@
# Mark Lee <bzr-gentoo-overlay@lazymalevolence.com>
# Ulrich Müller <ulm@gentoo.org>
# Christian Faulhammer <fauli@gentoo.org>
# @SUPPORTED_EAPIS: 2 3 4 5 6 7
# @BLURB: generic fetching functions for the Bazaar VCS
# @DESCRIPTION:
# The bzr.eclass provides functions to fetch and unpack sources from

View File

@ -6,13 +6,18 @@
# rust@gentoo.org
# @AUTHOR:
# Doug Goldstein <cardoe@gentoo.org>
# @SUPPORTED_EAPIS: 6 7
# @BLURB: common functions and variables for cargo builds
if [[ -z ${_CARGO_ECLASS} ]]; then
_CARGO_ECLASS=1
CARGO_DEPEND=""
[[ ${CATEGORY}/${PN} != dev-util/cargo ]] && CARGO_DEPEND="virtual/cargo"
case ${EAPI} in
6) : ;;
6) : DEPEND="${DEPEND} ${CARGO_DEPEND}";;
7) : BDEPEND="${BDEPEND} ${CARGO_DEPEND}";;
*) die "EAPI=${EAPI:-0} is not supported" ;;
esac
@ -22,8 +27,6 @@ EXPORT_FUNCTIONS src_unpack src_compile src_install
IUSE="${IUSE} debug"
[[ ${CATEGORY}/${PN} != dev-util/cargo ]] && DEPEND=">=dev-util/cargo-0.13.0"
ECARGO_HOME="${WORKDIR}/cargo_home"
ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
@ -36,7 +39,7 @@ cargo_crate_uris() {
local name version url pretag
name="${crate%-*}"
version="${crate##*-}"
pretag="[a-zA-Z]+"
pretag="^[a-zA-Z]+"
if [[ $version =~ $pretag ]]; then
version="${name##*-}-${version}"
name="${name%-*}"
@ -119,7 +122,7 @@ cargo_src_compile() {
export CARGO_HOME="${ECARGO_HOME}"
cargo build -v -j $(makeopts_jobs) $(usex debug "" --release) \
cargo build -j $(makeopts_jobs) $(usex debug "" --release) \
|| die "cargo build failed"
}

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Bo Ørsted Andresen <zlin@gentoo.org>
# Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: Provides a uniform way of handling ebuild which have very high build requirements
# @DESCRIPTION:
# This eclass provides a uniform way of handling ebuilds which have very high
@ -62,7 +63,7 @@ if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then
EXPORT_FUNCTIONS pkg_setup
case "${EAPI:-0}" in
0|1|2|3) ;;
4|5|6) EXPORT_FUNCTIONS pkg_pretend ;;
4|5|6|7) EXPORT_FUNCTIONS pkg_pretend ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac

View File

@ -106,8 +106,7 @@ chromium_pkg_die() {
fi
# Prevent user problems like bug #348235.
eshopts_push -s extglob
if is-flagq '-g?(gdb)?([1-9])'; then
if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then
ewarn
ewarn "You have enabled debug info (i.e. -g or -ggdb in your CFLAGS/CXXFLAGS)."
ewarn "This produces very large build files causes the linker to consume large"
@ -116,7 +115,6 @@ chromium_pkg_die() {
ewarn "Please try removing -g{,gdb} before reporting a bug."
ewarn
fi
eshopts_pop
# ccache often causes bogus compile failures, especially when the cache gets
# corrupted.

View File

@ -6,6 +6,7 @@
# gx86-multilib team <multilib@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: cmake-utils wrapper for multilib builds
# @DESCRIPTION:
# The cmake-multilib.eclass provides a glue between cmake-utils.eclass(5)

View File

@ -112,8 +112,7 @@ esac
inherit toolchain-funcs ninja-utils flag-o-matic multiprocessing xdg-utils
case ${EAPI} in
7) ;;
*) inherit eapi7-ver eutils multilib ;;
5|6) inherit eutils multilib ;;
esac
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
@ -226,9 +225,18 @@ _cmake_generator_to_use() {
ninja)
# if ninja is enabled but not installed, the build could fail
# this could happen if ninja is manually enabled (eg. make.conf) but not installed
case ${EAPI} in
5|6)
if ! ROOT=/ has_version dev-util/ninja; then
die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR."
fi
;;
*)
if ! has_version -b dev-util/ninja; then
die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR."
fi
;;
esac
generator_name="Ninja"
;;
emake)
@ -508,23 +516,14 @@ cmake-utils_src_configure() {
# Prepare Gentoo override rules (set valid compiler, append CPPFLAGS etc.)
local build_rules=${BUILD_DIR}/gentoo_rules.cmake
# Since cmake-3.4.0_rc1 "<FLAGS>" no longer contains includes and thus
# we need to add "<INCLUDES>"
local includes=
if [[ ${PN} == cmake ]] ; then
if $(ver_test $(ver_cut 1-3 ${PV}) -ge 3.4.0) ; then
includes="<INCLUDES>"
fi
elif ROOT=/ has_version \>=dev-util/cmake-3.4.0_rc1 ; then
includes="<INCLUDES>"
fi
cat > "${build_rules}" <<- _EOF_ || die
SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE)
SET (CMAKE_ASM-ATT_COMPILE_OBJECT "<CMAKE_ASM-ATT_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c -x assembler <SOURCE>" CACHE STRING "ASM-ATT compile command" FORCE)
SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE)
SET (CMAKE_ASM-ATT_COMPILE_OBJECT "<CMAKE_ASM-ATT_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c -x assembler <SOURCE>" CACHE STRING "ASM-ATT compile command" FORCE)
SET (CMAKE_ASM-ATT_LINK_FLAGS "-nostdlib" CACHE STRING "ASM-ATT link flags" FORCE)
SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> ${includes} ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE)
SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE)
_EOF_
local myCC=$(tc-getCC) myCXX=$(tc-getCXX) myFC=$(tc-getFC)
@ -611,6 +610,7 @@ cmake-utils_src_configure() {
SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries")
SET (CMAKE_INSTALL_INFODIR "${EPREFIX}/usr/share/info" CACHE PATH "")
SET (CMAKE_INSTALL_MANDIR "${EPREFIX}/usr/share/man" CACHE PATH "")
SET (CMAKE_USER_MAKE_RULES_OVERRIDE "${build_rules}" CACHE FILEPATH "Gentoo override rules")
_EOF_
[[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
@ -669,7 +669,6 @@ cmake-utils_src_configure() {
"${mycmakeargs_local[@]}"
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
$([[ ${EAPI} == 5 ]] && echo -DCMAKE_INSTALL_DO_STRIP=OFF)
-DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}"
-DCMAKE_TOOLCHAIN_FILE="${toolchain_file}"
"${MYCMAKEARGS}"
)

View File

@ -1,11 +1,21 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
inherit flag-o-matic toolchain-funcs versionator
case "${EAPI:-0}" in
0|1|2|3|4)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
5|6|7)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
;;
esac
# @ECLASS: cuda.eclass
# @MAINTAINER:
# Justin Lecher <jlec@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: Common functions for cuda packages
# @DESCRIPTION:
# This eclass contains functions to be used with cuda package. Currently it is
@ -17,6 +27,9 @@ inherit flag-o-matic toolchain-funcs versionator
if [[ -z ${_CUDA_ECLASS} ]]; then
inherit flag-o-matic toolchain-funcs
[[ ${EAPI} == [56] ]] && inherit eapi7-ver
# @ECLASS-VARIABLE: NVCCFLAGS
# @DESCRIPTION:
# nvcc compiler flags (see nvcc --help), which should be used like
@ -43,7 +56,7 @@ if [[ -z ${_CUDA_ECLASS} ]]; then
cuda_gccdir() {
debug-print-function ${FUNCNAME} "$@"
local gcc_bindir ver args="" flag ret
local dirs gcc_bindir ver vers="" flag
# Currently we only support the gnu compiler suite
if ! tc-is-gcc ; then
@ -51,7 +64,7 @@ cuda_gccdir() {
return 2
fi
while [ "$1" ]; do
while [[ "$1" ]]; do
case $1 in
-f)
flag="--compiler-bindir "
@ -62,34 +75,50 @@ cuda_gccdir() {
shift
done
if ! args=$(cuda-config -s); then
if ! vers="$(cuda-config -s)"; then
eerror "Could not execute cuda-config"
eerror "Make sure >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 is installed"
die "cuda-config not found"
else
args=$(version_sort ${args})
if [[ -z ${args} ]]; then
fi
if [[ -z ${vers} ]]; then
die "Could not determine supported gcc versions from cuda-config"
fi
# Try the current gcc version first
ver=$(gcc-version)
if [[ -n "${ver}" ]] && [[ ${vers} =~ ${ver} ]]; then
dirs=( ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver}*/ )
gcc_bindir="${dirs[${#dirs[@]}-1]}"
fi
if [[ -z ${gcc_bindir} ]]; then
ver=$(best_version "sys-devel/gcc")
ver=$(ver_cut 1-2 "${ver##*sys-devel/gcc-}")
if [[ -n "${ver}" ]] && [[ ${vers} =~ ${ver} ]]; then
dirs=( ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver}*/ )
gcc_bindir="${dirs[${#dirs[@]}-1]}"
fi
fi
for ver in ${args}; do
has_version "=sys-devel/gcc-${ver}*" && \
gcc_bindir="$(ls -d ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver}* | tail -n 1)"
for ver in ${vers}; do
if has_version "=sys-devel/gcc-${ver}*"; then
dirs=( ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver}*/ )
gcc_bindir="${dirs[${#dirs[@]}-1]}"
fi
done
if [[ -n ${gcc_bindir} ]]; then
if [[ -n ${flag} ]]; then
ret="${flag}\"${gcc_bindir}\""
echo "${flag}\"${gcc_bindir%/}\""
else
ret="${gcc_bindir}"
echo "${gcc_bindir%/}"
fi
echo ${ret}
return 0
else
eerror "Only gcc version(s) ${args} are supported,"
eerror "Only gcc version(s) ${vers} are supported,"
eerror "of which none is installed"
die "Only gcc version(s) ${args} are supported"
die "Only gcc version(s) ${vers} are supported"
return 1
fi
}
@ -115,13 +144,46 @@ cuda_sanitize() {
export NVCCFLAGS
}
# @FUNCTION: cuda_pkg_setup
# @FUNCTION: cuda_add_sandbox
# @USAGE: [-w]
# @DESCRIPTION:
# Call cuda_src_prepare for EAPIs not supporting src_prepare
cuda_pkg_setup() {
# Add nvidia dev nodes to the sandbox predict list.
# with -w, add to the sandbox write list.
cuda_add_sandbox() {
debug-print-function ${FUNCNAME} "$@"
cuda_src_prepare
local i
for i in /dev/nvidia*; do
if [[ $1 == '-w' ]]; then
addwrite $i
else
addpredict $i
fi
done
}
# @FUNCTION: cuda_toolkit_version
# @DESCRIPTION:
# echo the installed version of dev-util/nvidia-cuda-toolkit
cuda_toolkit_version() {
debug-print-function ${FUNCNAME} "$@"
local v
v="$(best_version dev-util/nvidia-cuda-toolkit)"
v="${v##*cuda-toolkit-}"
ver_cut 1-2 "${v}"
}
# @FUNCTION: cuda_cudnn_version
# @DESCRIPTION:
# echo the installed version of dev-libs/cudnn
cuda_cudnn_version() {
debug-print-function ${FUNCNAME} "$@"
local v
v="$(best_version dev-libs/cudnn)"
v="${v##*cudnn-}"
ver_cut 1-2 "${v}"
}
# @FUNCTION: cuda_src_prepare
@ -133,13 +195,7 @@ cuda_src_prepare() {
cuda_sanitize
}
case "${EAPI:-0}" in
0|1)
EXPORT_FUNCTIONS pkg_setup ;;
2|3|4|5|6)
EXPORT_FUNCTIONS src_prepare ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
EXPORT_FUNCTIONS src_prepare
_CUDA_ECLASS=1
fi

View File

@ -1,10 +1,14 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# This is a common location for functions that aid the use of sys-libs/db
#
# Bugs: maintainer-needed@gentoo.org
inherit versionator multilib
# multilib is used for get_libname in all EAPI
case "${EAPI:-0}" in
0|1|2|3|4|5|6) inherit eapi7-ver multilib ;;
*) inherit multilib ;;
esac
#Convert a version to a db slot
db_ver_to_slot() {
@ -38,7 +42,7 @@ db_findver() {
fi
PKG="$(best_version $1)"
VER="$(get_version_component_range 1-2 "${PKG/*db-/}")"
VER="$(ver_cut 1-2 "${PKG/*db-/}")"
if [ -d "${EPREFIX}"/usr/include/db$(db_ver_to_slot "$VER") ]; then
#einfo "Found db version ${VER}" >&2
echo -n "$VER"

View File

@ -4,6 +4,7 @@
# @ECLASS: depend.apache.eclass
# @MAINTAINER:
# apache-devs@gentoo.org
# @SUPPORTED_EAPIS: 0 2 3 4 5 6
# @BLURB: Functions to allow ebuilds to depend on apache
# @DESCRIPTION:
# This eclass handles depending on apache in a sane way and provides information

View File

@ -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: desktop.eclass
@ -174,7 +174,7 @@ make_desktop_entry() {
icon=${icon%.*}
fi
cat <<-EOF > "${desktop}"
cat <<-EOF > "${desktop}" || die
[Desktop Entry]
Name=${name}
Type=Application
@ -190,7 +190,9 @@ make_desktop_entry() {
ewarn "make_desktop_entry: update your 5th arg to read Path=${fields}"
fields="Path=${fields}"
fi
[[ -n ${fields} ]] && printf '%b\n' "${fields}" >> "${desktop}"
if [[ -n ${fields} ]]; then
printf '%b\n' "${fields}" >> "${desktop}" || die
fi
(
# wrap the env here so that the 'insinto' call
@ -217,7 +219,7 @@ make_session_desktop() {
local desktop=${T}/${wm:-${PN}}.desktop
shift 2
cat <<-EOF > "${desktop}"
cat <<-EOF > "${desktop}" || die
[Desktop Entry]
Name=${title}
Comment=This session logs you into ${title}
@ -244,20 +246,16 @@ domenu() {
(
# wrap the env here so that the 'insinto' call
# doesn't corrupt the env of the caller
local i j ret=0
local i ret=0
insopts -m 0644
insinto /usr/share/applications
for i in "$@" ; do
if [[ -f ${i} ]] ; then
doins "${i}"
((ret+=$?))
elif [[ -d ${i} ]] ; then
for j in "${i}"/*.desktop ; do
doins "${j}"
((ret+=$?))
done
if [[ -d ${i} ]] ; then
doins "${i}"/*.desktop
((ret|=$?))
else
((++ret))
doins "${i}"
((ret|=$?))
fi
done
exit ${ret}

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# Based on the work of: Krzysztof Pawlik <nelchael@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: A simple eclass to build Python packages using distutils.
# @DESCRIPTION:
# A simple eclass providing functions to build Python packages using
@ -80,10 +81,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 +455,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

View File

@ -3,6 +3,7 @@
# @ECLASS: dotnet.eclass
# @MAINTAINER: cynede@gentoo.org
# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
# @BLURB: common settings and functions for mono and dotnet related packages
# @DESCRIPTION:
# The dotnet eclass contains common environment settings that are useful for

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Ulrich Müller <ulm@gentoo.org>
# Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
# @BLURB: Testing implementation of EAPI 7 version manipulators
# @DESCRIPTION:
# A stand-alone implementation of the version manipulation functions

View File

@ -9,6 +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
# @BLURB: Eclass for Emacs Lisp packages
# @DESCRIPTION:
#

View File

@ -10,6 +10,7 @@
# Original author: Author Olivier Fisette <ofisette@gmail.com>
# Next gen author: Justin Lecher <jlec@gentoo.org>
# Next gen author: Ted Tanberry <ted.tanberry@gmail.com>
# @SUPPORTED_EAPIS: 6
# @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
# @DESCRIPTION:
# The inheriting ebuild must set at least EAPI=6 and provide EBO_DESCRIPTION before the inherit line.

View File

@ -1,6 +1,12 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @DEAD
# Joonas Niilola <juippis@gmail.com> (18 Aug 2018)
# Outdated, unmaintained, not being used by any package in the tree,
# has unattended bugs open.
# Bug: #666460. Removal in ~30 days.
# @ECLASS: enlightenment.eclass
# @MAINTAINER:
# maintainer-needed@gentoo.org

View File

@ -4,6 +4,7 @@
# @ECLASS: epatch.eclass
# @MAINTAINER:
# base-system@gentoo.org
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
# @BLURB: easy patch application functions
# @DESCRIPTION:
# An eclass providing epatch and epatch_user functions to easily apply
@ -18,8 +19,6 @@ case ${EAPI:-0} in
die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";;
esac
inherit estack
# @VARIABLE: EPATCH_SOURCE
# @DESCRIPTION:
# Default directory to search for patches.
@ -210,13 +209,14 @@ epatch() {
# Let people filter things dynamically
if [[ -n ${EPATCH_EXCLUDE}${EPATCH_USER_EXCLUDE} ]] ; then
# let people use globs in the exclude
eshopts_push -o noglob
local prev_noglob=$(shopt -p -o noglob)
set -o noglob
local ex
for ex in ${EPATCH_EXCLUDE} ; do
if [[ ${patchname} == ${ex} ]] ; then
einfo " Skipping ${patchname} due to EPATCH_EXCLUDE ..."
eshopts_pop
${prev_noglob}
continue 2
fi
done
@ -224,12 +224,12 @@ epatch() {
for ex in ${EPATCH_USER_EXCLUDE} ; do
if [[ ${patchname} == ${ex} ]] ; then
einfo " Skipping ${patchname} due to EPATCH_USER_EXCLUDE ..."
eshopts_pop
${prev_noglob}
continue 2
fi
done
eshopts_pop
${prev_noglob}
fi
if [[ ${SINGLE_PATCH} == "yes" ]] ; then

View File

@ -25,19 +25,6 @@ case ${EAPI:-0} in
;;
esac
# @FUNCTION: eqawarn
# @USAGE: [message]
# @DESCRIPTION:
# Proxy to ewarn for package managers that don't provide eqawarn and use the PM
# implementation if available. Reuses PORTAGE_ELOG_CLASSES as set by the dev
# profile.
if ! declare -F eqawarn >/dev/null ; then
eqawarn() {
has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@"
:
}
fi
# @FUNCTION: emktemp
# @USAGE: [temp dir]
# @DESCRIPTION:
@ -148,7 +135,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 +150,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}/}"
@ -181,33 +168,11 @@ make_wrapper() {
fi
}
# @FUNCTION: path_exists
# @USAGE: [-a|-o] <paths>
# @DESCRIPTION:
# Check if the specified paths exist. Works for all types of paths
# (files/dirs/etc...). The -a and -o flags control the requirements
# of the paths. They correspond to "and" and "or" logic. So the -a
# flag means all the paths must exist while the -o flag means at least
# one of the paths must exist. The default behavior is "and". If no
# paths are specified, then the return value is "false".
path_exists() {
local opt=$1
[[ ${opt} == -[ao] ]] && shift || opt="-a"
# no paths -> return false
# same behavior as: [[ -e "" ]]
[[ $# -eq 0 ]] && return 1
local p r=0
for p in "$@" ; do
[[ -e ${p} ]]
: $(( r += $? ))
done
case ${opt} in
-a) return $(( r != 0 )) ;;
-o) return $(( r == $# )) ;;
esac
eerror "path_exists has been removed. Please see the following post"
eerror "for a replacement snippet:"
eerror "https://blogs.gentoo.org/mgorny/2018/08/09/inlining-path_exists/"
die "path_exists is banned"
}
# @FUNCTION: use_if_iuse
@ -415,4 +380,23 @@ in_iuse() {
;;
esac
case ${EAPI:-0} in
0|1|2|3|4|5|6)
# @FUNCTION: eqawarn
# @USAGE: [message]
# @DESCRIPTION:
# Proxy to ewarn for package managers that don't provide eqawarn and use the PM
# implementation if available. Reuses PORTAGE_ELOG_CLASSES as set by the dev
# profile.
if ! declare -F eqawarn >/dev/null ; then
eqawarn() {
has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@"
:
}
fi
;;
esac
fi

View File

@ -34,6 +34,9 @@ setup-allowed-flags() {
# CPPFLAGS and LDFLAGS
'-[DUILR]*' '-Wl,*'
# Linker choice flag
'-fuse-ld'
)
# allow a bunch of flags that negate features / control ABI

View File

@ -6,6 +6,11 @@
# fonts@gentoo.org
# @BLURB: Eclass to make font installation uniform
case ${EAPI:-0} in
0|1|2|3|4|5|6) ;;
*) die "EAPI ${EAPI} is not supported by font.eclass." ;;
esac
inherit eutils
EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm

View File

@ -8,6 +8,7 @@
# @AUTHOR:
# Author Justin Lecher <jlec@gentoo.org>
# Test functions provided by Sebastien Fabbro and Kacper Kowalik
# @SUPPORTED_EAPIS: 4 5 6
# @BLURB: Simplify fortran compiler management
# @DESCRIPTION:
# If you need a fortran compiler, then you should be inheriting this eclass.

View File

@ -6,6 +6,7 @@
# maintainer-needed@gentoo.org
# @AUTHOR:
# Original author: Seemant Kulleen
# @SUPPORTED_EAPIS: 6
# @BLURB: Ease the installation of freedict translation dictionaries
# @DESCRIPTION:
# This eclass exists to ease the installation of freedict translation

View File

@ -4,6 +4,7 @@
# @ECLASS: games.eclass
# @MAINTAINER:
# Games team <games@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5
# @BLURB: Standardizing the install of games.
# @DESCRIPTION:
# This eclass makes sure that games are consistently handled in gentoo.

View File

@ -1,9 +1,10 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: git-2.eclass
# @MAINTAINER:
# maintainer-needed@gentoo.org
# @SUPPORTED_EAPIS: 0 1 2 3 4 5
# @BLURB: Eclass for fetching and unpacking git repositories.
# @DESCRIPTION:
# Eclass for easing maintenance of live ebuilds using git as remote repository.
@ -11,9 +12,10 @@
#
# This eclass is DEPRECATED. Please use git-r3 instead.
if [[ ${EAPI} == 6 ]]; then
die "${ECLASS}.eclass is banned in EAPI ${EAPI}"
fi
case ${EAPI:-0} in
0|1|2|3|4|5) ;;
*) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";;
esac
# This eclass support all EAPIs.
EXPORT_FUNCTIONS src_unpack

View File

@ -4,6 +4,7 @@
# @ECLASS: git-r3.eclass
# @MAINTAINER:
# Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 4 5 6 7
# @BLURB: Eclass for fetching and unpacking git repositories.
# @DESCRIPTION:
# Third generation eclass for easing maintenance of live ebuilds using
@ -121,8 +122,6 @@ fi
# URIs are completely unsecured and their use (even if only as
# a fallback) renders the ebuild completely vulnerable to MITM attacks.
#
# It can be overridden via env using ${PN}_LIVE_REPO variable.
#
# Can be a whitespace-separated list or an array.
#
# Example:
@ -151,8 +150,6 @@ fi
# @DESCRIPTION:
# The branch name to check out. If unset, the upstream default (HEAD)
# will be used.
#
# It can be overridden via env using ${PN}_LIVE_BRANCH variable.
# @ECLASS-VARIABLE: EGIT_COMMIT
# @DEFAULT_UNSET
@ -161,8 +158,6 @@ fi
# commit from the branch will be used. Note that if set to a commit
# not on HEAD branch, EGIT_BRANCH needs to be set to a branch on which
# the commit is available.
#
# It can be overridden via env using ${PN}_LIVE_COMMIT variable.
# @ECLASS-VARIABLE: EGIT_COMMIT_DATE
# @DEFAULT_UNSET
@ -177,8 +172,6 @@ fi
# (assuming that merges are done correctly). In other words, each merge
# will be considered alike a single commit with date corresponding
# to the merge commit date.
#
# It can be overridden via env using ${PN}_LIVE_COMMIT_DATE variable.
# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
# @DESCRIPTION:
@ -261,6 +254,7 @@ _git-r3_env_setup() {
esc_pn=${PN//[-+]/_}
[[ ${esc_pn} == [0-9]* ]] && esc_pn=_${esc_pn}
# note: deprecated, use EGIT_OVERRIDE_* instead
livevar=${esc_pn}_LIVE_REPO
EGIT_REPO_URI=${!livevar-${EGIT_REPO_URI}}
[[ ${!livevar} ]] \
@ -585,6 +579,8 @@ git-r3_fetch() {
local -x GIT_DIR
_git-r3_set_gitdir "${repos[0]}"
einfo "Repository id: ${GIT_DIR##*/}"
# prepend the local mirror if applicable
if [[ ${EGIT_MIRROR_URI} ]]; then
repos=(
@ -617,10 +613,11 @@ git-r3_fetch() {
COMMIT_DATE:commit_date
)
local localvar livevar live_warn=
local localvar livevar live_warn= override_vars=()
for localvar in "${varmap[@]}"; do
livevar=EGIT_OVERRIDE_${localvar%:*}_${override_name}
localvar=${localvar#*:}
override_vars+=( "${livevar}" )
if [[ -n ${!livevar} ]]; then
[[ ${localvar} == repos ]] && repos=()
@ -632,6 +629,13 @@ git-r3_fetch() {
if [[ ${live_warn} ]]; then
ewarn "No support will be provided."
else
einfo "To override fetched repository properties, use:"
local x
for x in "${override_vars[@]}"; do
einfo " ${x}"
done
einfo
fi
fi

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Original author: Jim Ramsay
# EAPI 6 author: David Seifert
# @SUPPORTED_EAPIS: 6
# @BLURB: Provides src_install used by (almost) all gkrellm plugins
# @DESCRIPTION:
# - Sets up default dependencies

View File

@ -8,6 +8,7 @@
# Author: Michał Górny <mgorny@gentoo.org>
# Based on the work of: Arun raghaven <ford_prefect@gentoo.org>
# which in turn was based on the work of Jim Ramsay <lack@gentoo.org>
# @SUPPORTED_EAPIS: 5
# @BLURB: Common functionality for building gnome-python* bindings
# @DESCRIPTION:
# This eclass provides python-r1 support for the GNOME2 library Python

View File

@ -4,6 +4,7 @@
# @ECLASS: gnome2-utils.eclass
# @MAINTAINER:
# gnome@gentoo.org
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
# @BLURB: Auxiliary functions commonly used by Gnome packages.
# @DESCRIPTION:
# This eclass provides a set of auxiliary functions needed by most Gnome

View File

@ -4,6 +4,7 @@
# @ECLASS: gnome2.eclass
# @MAINTAINER:
# gnome@gentoo.org
# @SUPPORTED_EAPIS: 4 5 6
# @BLURB: Provides phases for Gnome/Gtk+ based packages.
# @DESCRIPTION:
# Exports portage base functions used by ebuilds written for packages using the

View File

@ -1,9 +1,10 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: gnustep-2.eclass
# @MAINTAINER:
# GNUstep Herd <gnustep@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: eclass for GNUstep Apps, Frameworks, and Bundles build
# @DESCRIPTION:
# This eclass sets up GNUstep environment to properly install

View File

@ -1,9 +1,10 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: gnustep-base.eclass
# @MAINTAINER:
# GNUstep Herd <gnustep@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: Internal handling of GNUstep pacakges
# @DESCRIPTION:
# Inner gnustep eclass, should only be inherited directly by gnustep-base
@ -62,7 +63,7 @@ gnustep-base_src_prepare() {
eend $?
fi
has ${EAPI:-0} 6 && default
! has ${EAPI:-0} 0 1 2 3 4 5 && default
}
gnustep-base_src_configure() {

View File

@ -1,142 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @DEAD
# Michał Górny <mgorny@gentoo.org> (17 Jun 2018)
# This eclass was used for old versions of Mono applications, and all
# versions using it have been removed already. It's not maintained,
# uses obsolete (even removed) eclasses, outdated URIs, it has
# documentation problems. Removal in 30 days.
# @ECLASS: go-mono.eclass
# @MAINTAINER:
# dotnet@gentoo.org
# @BLURB: Common functionality for go-mono.org apps
# @DESCRIPTION:
# Common functionality needed by all go-mono.org apps.
inherit base versionator mono
PRE_URI="http://mono.ximian.com/monobuild/preview/sources"
GIT_PN="${PN/mono-debugger/debugger}"
ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src/mono"
GO_MONO_SUB_BRANCH=${GO_MONO_SUB_BRANCH}
if [[ "${PV%_rc*}" != "${PV}" ]]
then
GO_MONO_P="${P%_rc*}"
SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
S="${WORKDIR}/${GO_MONO_P}"
elif [[ "${PV%_pre*}" != "${PV}" ]]
then
GO_MONO_P="${P%_pre*}"
SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
S="${WORKDIR}/${GO_MONO_P}"
elif [[ "${PV}" == "9999" ]]
then
GO_MONO_P=${P}
EGIT_REPO_URI="https://github.com/mono/${GIT_PN}.git"
SRC_URI=""
inherit autotools git
elif [[ "${PV%.9999}" != "${PV}" ]]
then
GO_MONO_P=${P}
EGIT_REPO_URI="https://github.com/mono/${GIT_PN}.git"
EGIT_BRANCH="mono-$(get_version_component_range 1)-$(get_version_component_range 2)${GO_MONO_SUB_BRANCH}"
SRC_URI=""
inherit autotools git
else
GO_MONO_P=${P}
SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
fi
NO_MONO_DEPEND=( "dev-lang/mono" "dev-dotnet/libgdiplus" "dev-dotnet/gluezilla" )
if [[ "$(get_version_component_range 3)" != "9999" ]]
then
GO_MONO_REL_PV="$(get_version_component_range 1-2)"
else
GO_MONO_REL_PV="${PV}"
fi
if ! has "${CATEGORY}/${PN}" "${NO_MONO_DEPEND[@]}"
then
RDEPEND=">=dev-lang/mono-${GO_MONO_REL_PV}"
DEPEND="${RDEPEND}"
fi
DEPEND="${DEPEND}
virtual/pkgconfig"
# @FUNCTION: go-mono_src_unpack
# @DESCRIPTION:
# Runs default()
go-mono_src_unpack() {
if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]]
then
default
git_src_unpack
else
default
fi
}
# @FUNCTION: go-mono_src_prepare
# @DESCRIPTION:
# Runs autopatch from base.eclass, if PATCHES is set.
go-mono_src_prepare() {
if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]]
then
base_src_prepare
[[ "$EAUTOBOOTSTRAP" != "no" ]] && eautoreconf
else
base_src_prepare
fi
}
# @FUNCTION: go-mono_src_configure
# @DESCRIPTION:
# Runs econf, disabling static libraries and dependency-tracking.
go-mono_src_configure() {
econf --disable-dependency-tracking \
--disable-static \
"$@"
}
# @FUNCTION: go-mono_src_compile
# @DESCRIPTION:
# Runs emake.
go-mono_src_compile() {
emake "$@" || die "emake failed"
}
# @ECLASS-VARIABLE: DOCS
# @DESCRIPTION:
# Insert path of docs you want installed. If more than one,
# consider using an array.
# @FUNCTION: go-mono_src_install
# @DESCRIPTION:
# Rune emake, installs common doc files, if DOCS is
# set, installs those. Gets rid of .la files.
go-mono_src_install () {
emake -j1 DESTDIR="${D}" "$@" install || die "install failed"
mono_multilib_comply
local commondoc=( AUTHORS ChangeLog README TODO )
for docfile in "${commondoc[@]}"
do
[[ -e "${docfile}" ]] && dodoc "${docfile}"
done
if [[ "${DOCS[@]}" ]]
then
dodoc "${DOCS[@]}" || die "dodoc DOCS failed"
fi
find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
}
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install

View File

@ -4,6 +4,7 @@
# @ECLASS: golang-base.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: Eclass that provides base functions for Go packages.
# @DESCRIPTION:
# This eclass provides base functions for software written in the Go

View File

@ -4,6 +4,7 @@
# @ECLASS: golang-build.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: Eclass for compiling go packages.
# @DESCRIPTION:
# This eclass provides default src_compile, src_test and src_install

View File

@ -4,6 +4,7 @@
# @ECLASS: golang-vcs-snapshot.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: support eclass for unpacking VCS snapshot tarballs for
# software written in the Go programming language
# @DESCRIPTION:

View File

@ -4,6 +4,7 @@
# @ECLASS: golang-vcs.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: Eclass for fetching and unpacking go repositories.
# @DESCRIPTION:
# This eclass is written to ease the maintenance of live ebuilds

View File

@ -10,6 +10,7 @@
# Saleem Abdulrasool <compnerd@gentoo.org>
# foser <foser@gentoo.org>
# zaheerm <zaheerm@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: Helps building core & split gstreamer plugins.
# @DESCRIPTION:
# Eclass to make external gst-plugins emergable on a per-plugin basis

View File

@ -1,568 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @DEAD
# Michał Górny <mgorny@gentoo.org> (17 Jun 2018)
# This eclass was used for old versions of split gtk-sharp modules,
# and all packages/versions using it have been removed already.
# It's not maintained, uses obsolete eclasses, outdated URIs,
# it has documentation problems. Removal in 30 days.
# @ECLASS: gtk-sharp-module.eclass
# @MAINTAINER:
# dotnet@gentoo.org
# @BLURB: Manages the modules of the gtk-, gnome-, and gnome-desktop-sharp tarballs
# @DESCRIPTION:
# This eclass provides phase functions and helper functions for the modules
# of the gtk-sharp, gnome-sharp and gnome-desktop-sharp tarballs.
# PLEASE TAKE NOTE: ONLY FOR EAPI-2 EBUILDS
WANT_AUTOMAKE=none
WANT_AUTOCONF=none
inherit eutils mono multilib libtool autotools base versionator
case ${EAPI:-0} in
2|3|4|5) ;;
*) die "Unknown EAPI." ;;
esac
# @ECLASS-VARIABLE: GTK_SHARP_MODULE
# @DESCRIPTION:
# The name of the Gtk# module.
# Default value: ${PN/-sharp/}
GTK_SHARP_MODULE=${GTK_SHARP_MODULE:=${PN/-sharp/}}
# @ECLASS-VARIABLE: GTK_SHARP_MODULE_DIR
# @DESCRIPTION:
# The subdirectory of S in which GTK_SHARP_MODULE is installed.
# Default value: ${PN/-sharp/}
GTK_SHARP_MODULE_DIR=${GTK_SHARP_MODULE_DIR:=${PN/-sharp/}}
# @ECLASS-VARIABLE: GTK_SHARP_REQUIRED_VERSION
# @DESCRIPTION:
# The version of the gtk-sharp tarball this package requires.
# Optional.
GTK_SHARP_REQUIRED_VERSION="${GTK_SHARP_REQUIRED_VERSION}"
# @ECLASS-VARIABLE: gapi_users_list
# @DESCRIPTION:
# List of modules that use one of gapi2-codegen, gapi2-fixup or gapi2-parser
# No ebuild-serviceable parts inside.
gapi_users_list="art gnome gnomevfs ${gnome_desktop_sharp_module_list} atk gtk gdk glade pango"
# @ECLASS-VARIABLE: PV_MAJOR
# @DESCRIPTION:
# The first two components of the PV variable.
PV_MAJOR=$(get_version_component_range 1-2)
# @FUNCTION: add_bdepend
# @USAGE: <package atom>
# @DESCRIPTION:
# Adds to the DEPEND variable
add_bdepend() {
[[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument"
DEPEND="${DEPEND} $@"
}
# @FUNCTION: add_rdepend
# @USAGE: <package atom>
# @DESCRIPTION:
# Adds to the RDEPEND variable
add_rdepend() {
[[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument"
RDEPEND="${RDEPEND} $@"
}
# @FUNCTION: add_depend
# @USAGE: <package atom>
# @DESCRIPTION:
# Adds to the DEPEND and RDEPEND variables
add_depend() {
[[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument"
DEPEND="${DEPEND} $@"
RDEPEND="${RDEPEND} $@"
}
# @ECLASS-VARIABLE: TARBALL
# @DESCRIPTION:
# The GtkSharp modules are currently divided into three seperate tarball
# distributions. The TARBALL variable holds the name of the tarball
# to which GTK_SHARP_MODULE belongs.
case ${GTK_SHARP_MODULE} in
glib|glade|gtk|gdk|atk|pango|gtk-dotnet|gtk-gapi|gtk-docs)
TARBALL="gtk-sharp"
case ${PVR} in
2.12.10*)
SRC_URI="mirror://gentoo/${TARBALL}-2.12.7.patch.bz2"
#Upstream: https://bugzilla.novell.com/show_bug.cgi?id=$bugno
#Upstream bug #470390 for the gtk-sharp-2.12.7.patch
PATCHES=(
"${WORKDIR}/${TARBALL}-2.12.7.patch"
)
;;
2.12.11*)
SRC_URI="mirror://gentoo/${TARBALL}-2.12.11.patch.bz2"
PATCHES=(
"${WORKDIR}/${TARBALL}-2.12.11.patch"
)
;;
esac
case ${PVR} in
2.12.1*)
EAUTORECONF="YES"
add_bdepend "=sys-devel/automake-1.10*"
add_bdepend ">=sys-devel/autoconf-2.61"
;;
esac
;;
art|gnome|gnomevfs|gconf)
TARBALL="gnome-sharp"
add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
has "${GTK_SHARP_MODULE}" "${gapi_users_list}" && \
add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*"
case ${PVR} in
2.24.1*)
SRC_URI="mirror://gentoo/${TARBALL}-2.24.1.patch.bz2"
# Upstream bug: https://bugzilla.novell.com/show_bug.cgi?id=483251
PATCHES=(
"${WORKDIR}/${TARBALL}-2.24.1.patch"
)
EAUTORECONF="YES"
add_bdepend "=sys-devel/automake-1.10*"
add_bdepend ">=sys-devel/autoconf-2.61"
;;
2.24.2*)
add_depend ">=dev-lang/mono-2.7"
;;
esac
;;
gnome-desktop|gnome-print|gnome-panel|gtkhtml|gtksourceview|nautilusburn|rsvg|vte|wnck)
TARBALL="gnome-desktop-sharp"
add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
add_depend "=dev-dotnet/gnome-sharp-2.24*"
add_depend "gnome-base/gnome-desktop:2"
add_bdepend "|| ( >=dev-dotnet/gtk-sharp-2.12.21 =dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}* )"
;;
*)
eerror "Huh? Sonny boy, looks like your GTK_SHARP_MODULE is not on the approved list. BAILING!"
die "How did we get here!!?"
;;
esac
case ${PF} in
#gtk-sharp tarball
gtk-sharp-docs*)
add_depend ">=dev-lang/mono-2.0"
;;
gtk-sharp-gapi*)
add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
add_depend "dev-perl/XML-LibXML"
;;
gtk-sharp-*)
add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
add_depend "~dev-dotnet/glib-sharp-${PV}"
add_depend "~dev-dotnet/atk-sharp-${PV}"
add_depend "~dev-dotnet/gdk-sharp-${PV}"
add_depend "~dev-dotnet/pango-sharp-${PV}"
;;
gdk-sharp-*)
add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
add_depend "~dev-dotnet/glib-sharp-${PV}"
add_depend "x11-libs/gtk+:2"
add_depend "~dev-dotnet/pango-sharp-${PV}"
add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
;;
atk-sharp-*)
add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
add_depend "~dev-dotnet/glib-sharp-${PV}"
add_depend "dev-libs/atk"
add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
;;
glib-sharp-*)
add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
add_depend "dev-libs/glib:2"
;;
pango-sharp-*)
add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
add_depend "~dev-dotnet/glib-sharp-${PV}"
add_depend "x11-libs/pango"
add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
;;
gtk-dotnet-*)
add_depend "~dev-dotnet/glib-sharp-${PV}"
add_depend "~dev-dotnet/gdk-sharp-${PV}"
add_depend "~dev-dotnet/pango-sharp-${PV}"
add_depend "~dev-dotnet/gtk-sharp-${PV}"
add_depend "dev-lang/mono[-minimal]"
add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2"
;;
glade-sharp-*)
add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}"
add_depend "~dev-dotnet/glib-sharp-${PV}"
add_depend "~dev-dotnet/atk-sharp-${PV}"
add_depend "~dev-dotnet/gdk-sharp-${PV}"
add_depend "~dev-dotnet/gtk-sharp-${PV}"
add_depend "~dev-dotnet/pango-sharp-${PV}"
add_depend ">=gnome-base/libglade-2.3.6:2.0"
;;
#gnome-sharp tarball
art-sharp-*)
add_depend ">=media-libs/libart_lgpl-2.3.20"
;;
gnome-sharp-*)
add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}"
add_depend "~dev-dotnet/gnomevfs-sharp-${PV}"
add_depend "~dev-dotnet/art-sharp-${PV}"
add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}"
add_depend ">=x11-libs/gtk+-2.14.0:2"
;;
gconf-sharp-*)
add_depend ">=gnome-base/gconf-${PV_MAJOR}:2"
add_depend "=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}*"
add_depend "~dev-dotnet/gnome-sharp-${PV}"
add_depend "~dev-dotnet/art-sharp-${PV}"
;;
gnomevfs-sharp-*)
add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}:2"
;;
#gnome-desktop-sharp tarball
gnome-desktop-sharp-*)
# NOTE: libgnome-desktop-2.so has been known to make binary-
# incompatible changes, requiring .so bumps. gnome-desktop-sharp
# is locked to a specific .so.n version, so strict dependencies
# may be required in the future (as it has in the past).
add_depend ">=gnome-base/gnome-desktop-${PV_MAJOR}:2"
;;
gnome-panel-sharp-*)
add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}"
;;
gnome-print-sharp-*)
add_depend "gnome-base/libgnomeprint:2.2"
add_depend "gnome-base/libgnomeprintui:2.2"
;;
gtkhtml-sharp-*)
#NOTE: gtkhtml dependency must follow gtkhtml-sharp version.
#i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24
# gtkhtml-sharp-2.16.0 >=gtkhtml-3.16
# See bug 249540 for unpleasant side effects.
add_depend ">=gnome-extra/gtkhtml-$(($(get_version_component_range 1) + 1 )).$(get_version_component_range 2):3.14"
;;
gtksourceview-sharp-*)
add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0"
;;
nautilusburn-sharp-*)
add_depend ">=gnome-extra/nautilus-cd-burner-2.24.0"
;;
rsvg-sharp-*)
add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}:2"
;;
vte-sharp-*)
add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}:0"
;;
wnck-sharp-*)
add_depend ">=x11-libs/libwnck-${PV_MAJOR}:1"
;;
esac
# @ECLASS-VARIABLE: DESCRIPTION
# @DESCRIPTION:
# Default value: GtkSharp's ${GTK_SHARP_MODULE} module of the ${TARBALL} tarball
DESCRIPTION="GtkSharp's ${GTK_SHARP_MODULE} module of the ${TARBALL} tarball"
# @ECLASS-VARIABLE: HOMEPAGE
# @DESCRIPTION:
# Default value: http://www.mono-project.com/GtkSharp
HOMEPAGE="http://www.mono-project.com/GtkSharp"
# @ECLASS-VARIABLE: LICENSE
# @DESCRIPTION:
# Default value: LGPL-2.1
LICENSE="LGPL-2.1"
add_depend ">=dev-lang/mono-2.0.1"
add_bdepend ">=sys-apps/sed-4"
add_bdepend "virtual/pkgconfig"
add_bdepend ">=app-shells/bash-3.1"
IUSE="debug"
# @ECLASS-VARIABLE: S
# @DESCRIPTION:
# Default value: ${WORKDIR}/${TARBALL}-${PV}
S="${WORKDIR}/${TARBALL}-${PV}"
# @ECLASS-VARIABLE: SRC_URI
# @DESCRIPTION:
# Default value: mirror://gnome/sources/${TARBALL}/${PV_MAJOR}/${TARBALL}-${PV}.tar.bz2
if [[ ${TARBALL} == "gtk-sharp" ]]; then
SRC_URI="${SRC_URI}
http://download.mono-project.com/sources/gtk-sharp212/${TARBALL}-${PV}.tar.bz2"
else
SRC_URI="${SRC_URI}
mirror://gnome/sources/${TARBALL}/${PV_MAJOR}/${TARBALL}-${PV}.tar.bz2"
fi
# @FUNCTION: get_sharp_apis
# @USAGE: <type> <pkgconfig-package>
# @RETURN: .NET API files
# @DESCRIPTION:
# Given a valid pkg-config package, will return a list of API xml files.
# <type> can be either --prefixed or --bare. If prefixed, each API file
# will be prefixed with -I:
get_sharp_apis() {
[[ ${#@} -eq 2 ]] || die "${FUNCNAME} needs two arguments"
get_sharp_assemblies "$@"
}
# @FUNCTION: get_sharp_assemblies
# @USAGE: <type> <pkgconfig-package>
# @RETURN: .NET .dll assemblies
# @DESCRIPTION:
# Given a valid pkg-config package, will return a list of .dll assemblies.
# <type> can be either --prefixed or --bare. If prefixed, each .dll file
# will be prefixed with -r:
get_sharp_assemblies() {
[[ ${#@} -eq 2 ]] || die "${FUNCNAME} needs two arguments"
local string config=libs prefix="-r:"
local -a rvalue
[[ "${FUNCNAME[1]}" = "get_sharp_apis" ]] && config=cflags && prefix="-I:"
for string in $(pkg-config --${config} ${2} 2> /dev/null)
do
rvalue+=( ${string#-?:} )
done
case $1 in
--bare)
:
;;
--prefixed)
for (( i=0 ; i< ${#rvalue[@]} ; i++ ))
do
rvalue[$i]=${prefix}${rvalue[$i]}
done
;;
*)
die "${FUNCNAME}: Unknown parameter"
;;
esac
echo "${rvalue[@]}"
}
# @FUNCTION: phase_hook
# @USAGE: <prefix>
# @DESCRIPTION:
# Looks for functions named <prefix>_caller_suffix and executes them.
# _caller_suffix is the calling function with the prefix
# gtk-sharp-module removed.
phase_hook() {
[[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs one argument"
if [[ "$(type -t ${1}${FUNCNAME[1]#gtk-sharp-module})" = "function" ]]
then
ebegin "Phase-hook: Running ${1}${FUNCNAME[1]#gtk-sharp-module}"
${1}${FUNCNAME[1]#gtk-sharp-module}
eend 0
fi
}
# @FUNCTION: ac_path_prog_override
# @USAGE: <PROG> [path]
# @DESCRIPTION:
# Override AC_PATH_PROG() autoconf macros. Path will be set to " " if
# not specified.
ac_path_prog_override() {
if [[ ${#@} -lt 1 || ${#@} -gt 2 ]]
then
eerror "${FUNCNAME[0]} requires at least one parameter and takes at most two:"
eerror "AC_PATH_PROG(PARAM1, param2)"
die "${FUNCNAME[0]} requires at least one parameter and takes at most two:"
fi
export ac_cv_path_${1}="${2:- }"
}
# @FUNCTION: pkg_check_modules_override
# @USAGE: <GROUP> [package1] [package2]
# @DESCRIPTION:
# Will export the appropriate variables to override PKG_CHECK_MODULES autoconf
# macros, with the string " " by default. If packages are specified, they will
# be looked up with pkg-config and the appropriate LIBS and CFLAGS substituted.
# LIBS and CFLAGS can also be specified per-package with the following syntax:
# @CODE
# package=LIBS%CFLAGS
# @CODE
# = and % have no effect unless both are specified.
# Here is an example:
# @CODE
# pkg_check_modules_override GASH "gtk+-2.0=-jule%" gobject-2.0
# @CODE
# The above example will do:
# export GASH_CFLAGS+=" -jule"
# export GASH_LIBS+=" "
# export GASH_CFLAGS+=" $(pkg-config --cflags gobject-2.0)"
# export GASH_LIBS+=" $(pkg-config --libs gobject-2.0)"
#
# NOTE: If a package is not found, the string " " will be inserted in place of
# <GROUP>_CFLAGS and <GROUP>_LIBS
pkg_check_modules_override() {
local package
local group="${1}"
local packages="${*:2}"
export ${group}_CFLAGS=" "
export ${group}_LIBS=" "
if [[ ${#@} -lt 1 ]]
then
eerror "${FUNCNAME[0]} requires at least one parameter: GROUP"
eerror "PKG_CHECK_MODULES(GROUP, package1 package2 etc)"
die "${FUNCNAME[0]} requires at least one parameter: GROUP"
fi
for package in $packages
do
if [[ ${package/=} != ${package} && ${package/\%} != ${package} ]]
then
package_cflag_libs=${package##*=}
export ${group}_CFLAGS+=" ${package_cflag_libs%%\%*}"
export ${group}_LIBS+=" ${package_cflag_libs##*\%}"
else
if pkg-config --exists $package
then
export ${group}_CFLAGS+=" $(pkg-config --cflags $package)"
export ${group}_LIBS+=" $(pkg-config --libs $package)"
else
export ${group}_CFLAGS+=" "
export ${group}_LIBS+=" "
fi
fi
done
}
# @FUNCTION: gtk-sharp-tarball-post_src_prepare
# @DESCRIPTION:
# Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to
# local assemblies to the installed ones. Is only called by src_prepare when
# $GTK_SHARP_MODULE is a member of $gtk_sharp_module_list.
gtk-sharp-tarball-post_src_prepare() {
has "${EAPI:-0}" 2 && ! use prefix && EPREFIX=
cd "${S}/${GTK_SHARP_MODULE_DIR}"
sed -i \
-e "s; \$(srcdir)/../glib/glib-api.xml; $(get_sharp_apis --bare glib-sharp-2.0);" \
-e "s; ../pango/pango-api.xml; $(get_sharp_apis --bare pango-sharp-2.0);" \
-e "s; ../atk/atk-api.xml; $(get_sharp_apis --bare atk-sharp-2.0);" \
-e "s; ../gdk/gdk-api.xml; $(get_sharp_apis --bare gdk-sharp-2.0);" \
-e "s; ../gtk/gtk-api.xml; $(get_sharp_apis --bare gtk-sharp-2.0);" \
-e "s; \.\./glib/glib-sharp.dll; $(get_sharp_assemblies --bare glib-sharp-2.0);g" \
-e "s; \.\./pango/pango-sharp.dll; $(get_sharp_assemblies --bare pango-sharp-2.0);g" \
-e "s; \.\./atk/atk-sharp.dll; $(get_sharp_assemblies --bare atk-sharp-2.0);g" \
-e "s; \.\./gdk/gdk-sharp.dll; $(get_sharp_assemblies --bare gdk-sharp-2.0);g" \
-e "s; \.\./gtk/gtk-sharp.dll; $(get_sharp_assemblies --bare gtk-sharp-2.0);g" \
-e "s;\$(RUNTIME) \$(top_builddir)/parser/gapi-fixup.exe;${EPREFIX}/usr/bin/gapi2-fixup;" \
-e "s;\$(RUNTIME) \$(top_builddir)/generator/gapi_codegen.exe;${EPREFIX}/usr/bin/gapi2-codegen;" \
-e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \
-e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \
$(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles"
}
# @FUNCTION: gnome-sharp-tarball-post_src_prepare
# @DESCRIPTION:
# Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to
# local assemblies to the installed ones. Is only called by src_prepare when
# $GTK_SHARP_MODULE is a member of $gnome_sharp_module_list.
gnome-sharp-tarball-post_src_prepare() {
cd "${S}/${GTK_SHARP_MODULE_DIR}"
sed -i \
-e "s; ../gnomevfs/gnome-vfs-api.xml; $(get_sharp_apis --bare gnome-vfs-sharp-2.0);" \
-e "s; ../art/art-api.xml; $(get_sharp_apis --bare art-sharp-2.0);" \
-e "s; \.\./art/art-sharp.dll; $(get_sharp_assemblies --bare art-sharp-2.0);g" \
-e "s; \.\./gnomevfs/gnome-vfs-sharp.dll; $(get_sharp_assemblies --bare gnome-vfs-sharp-2.0);g" \
-e "s;/r:\$(top_builddir)/art/art-sharp.dll;$(get_sharp_assemblies --prefixed art-sharp-2.0);" \
-e "s;/r:\$(top_builddir)/gnome/gnome-sharp.dll;$(get_sharp_assemblies --prefixed gnome-sharp-2.0);" \
$(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles"
}
# @FUNCTION: gtk-sharp-module_src_prepare
# @DESCRIPTION:
# Runs autopatch from base.eclass, eautoreconf if EAUTORECONF is set to any
# value.
# Contains a phase_hook, runs very last.
# phase_hook prefix trigger: ${TARBALL}-tarball-post
# Is exported.
gtk-sharp-module_src_prepare() {
base_src_prepare
# @ECLASS-VARIABLE: EAUTORECONF
# @DESCRIPTION:
# If set, EAUTORECONF will be run during src_prepare.
[[ ${EAUTORECONF} ]] && eautoreconf
phase_hook ${TARBALL}-tarball-post
elibtoolize
}
# @FUNCTION: gtk-sharp-tarball_src_configure
# @DESCRIPTION:
# Sets some environment variables that will allow us to make the dependencies
# for each ebuild be only its own dependencies, without patching configure.
# Is only called by gtk-sharp-module_src_configure when $GTK_SHARP_MODULE
# is a member of $gtk_sharp_module_list.
gtk-sharp-tarball_src_configure() {
pkg_check_modules_override GLIB gobject-2.0
pkg_check_modules_override GIO gio-2.0
pkg_check_modules_override PANGO pango
pkg_check_modules_override ATK atk
pkg_check_modules_override GTK gtk+-2.0
pkg_check_modules_override GLADE libglade-2.0
}
# @FUNCTION: gnome-sharp-tarball_src_configure
# @DESCRIPTION:
# Sets some environment variables that will allow us to make the dependencies
# for each ebuild be only its own dependencies. Without patching configure.
# Is only called by gtk-sharp-module_src_configure when $GTK_SHARP_MODULE
# is a member of $gnome_sharp_module_list.
gnome-sharp-tarball_src_configure() {
has "${EAPI:-0}" 2 && ! use prefix && EPREFIX=
pkg_check_modules_override GLADESHARP glade-sharp-2.0
pkg_check_modules_override GAPI gapi-2.0
ac_path_prog_override GAPI_PARSER "${EPREFIX}"/usr/bin/gapi2-parser
ac_path_prog_override GAPI_CODEGEN "${EPREFIX}"/usr/bin/gapi2-codegen
ac_path_prog_override GAPI_FIXUP "${EPREFIX}"/usr/bin/gapi2-fixup
}
# @FUNCTION: gtk-sharp-module_src_configure
# @USAGE: [econf-arguments]
# @DESCRIPTION:
# Calls econf with some default values.
# Contains a phase_hook, run before econf.
# phase_hook prefix trigger: ${TARBALL}-tarball
# Is exported.
gtk-sharp-module_src_configure() {
phase_hook ${TARBALL}-tarball
econf --disable-static \
--disable-dependency-tracking \
--disable-maintainer-mode \
$(use debug &&echo "--enable-debug" ) \
${@} || die "econf failed"
}
# @FUNCTION: gtk-sharp-module_src_compile
# @DESCRIPTION:
# Calls emake in the subdir of the module.
# Sets CSC=/usr/bin/mcs. Deletes top_srcdir Makefiles to prevent recursing in
# case we missed some dll references.
# Is exported.
gtk-sharp-module_src_compile() {
rm -f "${S}"/Makefile* &> /dev/null
cd "${S}/${GTK_SHARP_MODULE_DIR}"
emake CSC=/usr/bin/mcs || die "emake failed"
}
# @FUNCTION: gtk-sharp-module_src_install
# @DESCRIPTION:
# Installs the module. Fixes up lib paths so they're multilib-safe.
# Gets rid of .la files.
# Is exported.
gtk-sharp-module_src_install() {
cd "${S}/${GTK_SHARP_MODULE_DIR}"
emake DESTDIR="${D}" install || die "emake install failed"
mono_multilib_comply
find "${D}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
[[ $(find "${D}" -type f|wc -l) -lt 3 ]] && die "Too few files. This smells like a failed install."
}
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install

View File

@ -4,6 +4,7 @@
# @ECLASS: java-vm-2.eclass
# @MAINTAINER:
# java@gentoo.org
# @SUPPORTED_EAPIS: 5 6
# @BLURB: Java Virtual Machine eclass
# @DESCRIPTION:
# This eclass provides functionality which assists with installing

View File

@ -41,17 +41,15 @@ case ${CATEGORY} in
: ${FRAMEWORKS_MINIMAL:=5.43.0}
: ${QT_MINIMAL:=5.9.1}
fi
if [[ ${KDE_BUILD_TYPE} = live && ${PV} != 5.12* ]]; then
[[ ${PV} = 5.12* ]] && : ${QT_MINIMAL:=5.9.4}
if [[ ${KDE_BUILD_TYPE} = live && ${PV} != 5.??.49* ]]; then
: ${FRAMEWORKS_MINIMAL:=9999}
: ${QT_MINIMAL:=5.10.1}
fi
: ${QT_MINIMAL:=5.11.1}
;;
kde-apps)
if [[ ${PV} = 17.12.3* ]]; then
: ${FRAMEWORKS_MINIMAL:=5.43.0}
: ${QT_MINIMAL:=5.9.1}
fi
[[ ${PV} = 18.04.2* ]] && : ${FRAMEWORKS_MINIMAL:=5.44.0}
[[ ${PV} = 18.04.3 ]] && : ${FRAMEWORKS_MINIMAL:=5.46.0}
: ${FRAMEWORKS_MINIMAL:=5.49.0}
;;
esac
@ -92,17 +90,6 @@ fi
debug-print "${ECLASS}: ${KDEBASE} ebuild recognized"
# @ECLASS-VARIABLE: KDE_SCM
# @DESCRIPTION:
# SCM to use if KDE_BUILD_TYPE is determined to be "live".
# Currently, only git is supported.
: ${KDE_SCM:=git}
case ${KDE_SCM} in
git) ;;
*) die "KDE_SCM: ${KDE_SCM} is not supported" ;;
esac
# @FUNCTION: _check_gcc_version
# @INTERNAL
# @DESCRIPTION:

View File

@ -38,9 +38,7 @@ case ${EAPI} in
esac
if [[ ${KDE_BUILD_TYPE} = live ]]; then
case ${KDE_SCM} in
git) inherit git-r3 ;;
esac
inherit git-r3
fi
if [[ -v KDE_GCC_MINIMAL ]]; then
@ -49,6 +47,13 @@ fi
EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
# @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS
# @DESCRIPTION:
# If set to "false", do nothing.
# For any other value, assume the package is using KDEInstallDirs macro and switch
# KDE_INSTALL_USE_QT_SYS_PATHS to ON.
: ${ECM_KDEINSTALLDIRS:=true}
# @ECLASS-VARIABLE: KDE_AUTODEPS
# @DESCRIPTION:
# If set to "false", do nothing.
@ -387,8 +392,6 @@ _calculate_live_repo() {
SRC_URI=""
case ${KDE_SCM} in
git)
# @ECLASS-VARIABLE: EGIT_MIRROR
# @DESCRIPTION:
# This variable allows easy overriding of default kde mirror service
@ -419,8 +422,6 @@ _calculate_live_repo() {
fi
EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}"
;;
esac
}
case ${KDE_BUILD_TYPE} in
@ -486,11 +487,7 @@ kde5_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
if [[ ${KDE_BUILD_TYPE} = live ]]; then
case ${KDE_SCM} in
git)
git-r3_src_unpack
;;
esac
else
default
fi
@ -506,12 +503,12 @@ kde5_src_prepare() {
cmake-utils_src_prepare
# only build examples when required
if ! use_if_iuse examples || ! use examples ; then
if ! { in_iuse examples && use examples; } ; then
cmake_comment_add_subdirectory examples
fi
# only enable handbook when required
if ! use_if_iuse handbook ; then
if in_iuse handbook && ! use handbook ; then
cmake_comment_add_subdirectory ${KDE_DOC_DIR}
if [[ ${KDE_HANDBOOK} = forceoptional ]] ; then
@ -571,7 +568,7 @@ kde5_src_prepare() {
fi
# only build unit tests when required
if ! use_if_iuse test ; then
if ! { in_iuse test && use test; } ; then
if [[ ${KDE_TEST} = forceoptional ]] ; then
punt_bogus_dep Qt5 Test
# if forceoptional, also cover non-kde categories
@ -615,7 +612,7 @@ kde5_src_configure() {
debug-print-function ${FUNCNAME} "$@"
# we rely on cmake-utils.eclass to append -DNDEBUG too
if ! use_if_iuse debug; then
if in_iuse debug && ! use debug; then
append-cppflags -DQT_NO_DEBUG
fi
@ -629,11 +626,11 @@ kde5_src_configure() {
fi
fi
if ! use_if_iuse handbook && [[ ${KDE_HANDBOOK} = optional ]] ; then
if in_iuse handbook && ! use handbook && [[ ${KDE_HANDBOOK} = optional ]] ; then
cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON )
fi
if ! use_if_iuse designer && [[ ${KDE_DESIGNERPLUGIN} != false ]] ; then
if in_iuse designer && ! use designer && [[ ${KDE_DESIGNERPLUGIN} != false ]] ; then
cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DesignerPlugin=ON )
fi
@ -641,8 +638,12 @@ kde5_src_configure() {
cmakeargs+=( -DBUILD_QCH=$(usex doc) )
fi
if [[ ${ECM_KDEINSTALLDIRS} != false ]] ; then
cmakeargs+=(
# install mkspecs in the same directory as qt stuff
cmakeargs+=(-DKDE_INSTALL_USE_QT_SYS_PATHS=ON)
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
)
fi
# allow the ebuild to override what we set here
mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")

View File

@ -8,6 +8,7 @@
# John Mylchreest <johnm@gentoo.org>
# Mike Pagano <mpagano@gentoo.org>
# <so many, many others, please add yourself>
# @SUPPORTED_EAPIS: 2 3 4 5 6
# @BLURB: Eclass for kernel packages
# @DESCRIPTION:
# This is the kernel.eclass rewrite for a clean base regarding the 2.6
@ -192,11 +193,10 @@
PYTHON_COMPAT=( python{2_6,2_7} )
inherit eutils toolchain-funcs versionator multilib python-any-r1
inherit toolchain-funcs python-any-r1
[[ ${EAPI:-0} == [012345] ]] && inherit epatch
[[ ${EAPI:-0} == [0123456] ]] && inherit estack eapi7-ver
case ${EAPI:-0} in
0|1)
EXPORT_FUNCTIONS src_{unpack,compile,install,test} \
pkg_{setup,preinst,postinst,postrm} ;;
2|3|4|5|6)
EXPORT_FUNCTIONS src_{unpack,prepare,compile,install,test} \
pkg_{setup,preinst,postinst,postrm} ;;
@ -216,8 +216,6 @@ fi
HOMEPAGE="https://www.kernel.org/ https://www.gentoo.org/ ${HOMEPAGE}"
: ${LICENSE:="GPL-2"}
has "${EAPI:-0}" 0 1 2 && ED=${D} EPREFIX= EROOT=${ROOT}
# This is the latest KV_PATCH of the deblob tool available from the
# libre-sources upstream. If you bump this, you MUST regenerate the Manifests
# for ALL kernel-2 consumer packages where deblob is available.
@ -326,7 +324,7 @@ detect_version() {
OKV=${OKV/-r*}
OKV=${OKV/_p*}
KV_MAJOR=$(get_version_component_range 1 ${OKV})
KV_MAJOR=$(ver_cut 1 ${OKV})
# handle if OKV is X.Y or X.Y.Z (e.g. 3.0 or 3.0.1)
local OKV_ARRAY
IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
@ -334,17 +332,17 @@ detect_version() {
# if KV_MAJOR >= 3, then we have no more KV_MINOR
#if [[ ${KV_MAJOR} -lt 3 ]]; then
if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then
KV_MINOR=$(get_version_component_range 2 ${OKV})
KV_PATCH=$(get_version_component_range 3 ${OKV})
KV_MINOR=$(ver_cut 2 ${OKV})
KV_PATCH=$(ver_cut 3 ${OKV})
if [[ ${KV_MAJOR}${KV_MINOR}${KV_PATCH} -ge 269 ]]; then
KV_EXTRA=$(get_version_component_range 4- ${OKV})
KV_EXTRA=$(ver_cut 4- ${OKV})
KV_EXTRA=${KV_EXTRA/[-_]*}
else
KV_PATCH=$(get_version_component_range 3- ${OKV})
KV_PATCH=$(ver_cut 3- ${OKV})
fi
else
KV_PATCH=$(get_version_component_range 2 ${OKV})
KV_EXTRA=$(get_version_component_range 3- ${OKV})
KV_PATCH=$(ver_cut 2 ${OKV})
KV_EXTRA=$(ver_cut 3- ${OKV})
KV_EXTRA=${KV_EXTRA/[-_]*}
fi
@ -602,10 +600,12 @@ if [[ ${ETYPE} == sources ]]; then
>=sys-devel/binutils-2.11.90.0.31
)"
RDEPEND="!build? (
>=sys-libs/ncurses-5.2
sys-devel/make
dev-lang/perl
sys-devel/bc
sys-devel/bison
sys-devel/flex
sys-devel/make
>=sys-libs/ncurses-5.2
virtual/libelf
)"
@ -645,12 +645,7 @@ if [[ ${ETYPE} == sources ]]; then
DEBLOB_CHECK_A="deblob-check-${DEBLOB_PV}"
DEBLOB_HOMEPAGE="https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/tags/"
DEBLOB_URI_PATH="${DEBLOB_PV}${K_DEBLOB_TAG}"
if ! has "${EAPI:-0}" 0 1 ; then
DEBLOB_CHECK_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/deblob-check -> ${DEBLOB_CHECK_A}"
else
DEBLOB_CHECK_URI="mirror://gentoo/${DEBLOB_CHECK_A}"
fi
DEBLOB_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/${DEBLOB_A}"
HOMEPAGE="${HOMEPAGE} ${DEBLOB_HOMEPAGE}"
@ -1075,9 +1070,9 @@ postinst_sources() {
fi
# warn sparc users that they need to do cross-compiling with >= 2.6.25(bug #214765)
KV_MAJOR=$(get_version_component_range 1 ${OKV})
KV_MINOR=$(get_version_component_range 2 ${OKV})
KV_PATCH=$(get_version_component_range 3 ${OKV})
KV_MAJOR=$(ver_cut 1 ${OKV})
KV_MINOR=$(ver_cut 2 ${OKV})
KV_PATCH=$(ver_cut 3 ${OKV})
if [[ "$(tc-arch)" = "sparc" ]]; then
if [[ $(gcc-major-version) -lt 4 && $(gcc-minor-version) -lt 4 ]]; then
if [[ ${KV_MAJOR} -ge 3 || ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.24 ]] ; then
@ -1478,10 +1473,6 @@ kernel-2_src_unpack() {
# we run misc `make` functions below
[[ $(type -t kernel-2_hook_premake) == "function" ]] && kernel-2_hook_premake
case ${EAPI:-0} in
0|1) kernel-2_src_prepare ;;
esac
debug-print "Doing unpack_set_extraversion"
[[ -z ${K_NOSETEXTRAVERSION} ]] && unpack_set_extraversion

View File

@ -4,6 +4,7 @@
# @ECLASS: kodi-addon.eclass
# @MAINTAINER:
# candrews@gentoo.org
# @SUPPORTED_EAPIS: 4 5 6
# @BLURB: Helper for correct building and (importantly) installing Kodi addon packages.
# @DESCRIPTION:
# Provides a src_configure function for correct CMake configuration

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Matthew Turk <satai@gentoo.org>
# Martin Ehmsen <ehmsen@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: An eclass for easy installation of LaTeX packages
# @DESCRIPTION:
# This eClass is designed to be easy to use and implement. The vast majority of

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# 0xd34df00d@gmail.com
# NightNord@niifaq.ru
# @SUPPORTED_EAPIS: 6
# @BLURB: Common functions and setup utilities for the LeechCraft app
# @DESCRIPTION:
# The leechcraft eclass contains a common set of functions and steps

View File

@ -0,0 +1,196 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: libretro-core.eclass
# @MAINTAINER:
# candrews@gentoo.org
# @AUTHOR:
# Cecil Curry <leycec@gmail.com>
# Craig Andrews <candrews@gentoo.org>
# @SUPPORTED_EAPIS: 6 7
# @BLURB: Simplify libretro core ebuilds
# @DESCRIPTION:
# The libretro eclass is designed to streamline the construction of
# ebuilds for Libretro core ebuilds.
#
# Libretro cores can be found under https://github.com/libretro/
#
# They all use the same basic make based build system, are located
# in the same github account, and do not release named or numbered
# versions (so ebuild versions for git commits are keys).
# This eclass covers those commonalities reducing much duplication
# between the ebuilds.
# @EXAMPLE:
# @CODE
# EAPI=7
#
# LIBRETRO_CORE_NAME="2048"
# LIBRETRO_COMMIT_SHA="45655d3662e4cbcd8afb28e2ee3f5494a75888de"
# KEYWORDS="~amd64 ~x86"
# inherit libretro-core
#
# DESCRIPTION="Port of 2048 puzzle game to the libretro API"
# LICENSE="Unlicense"
# SLOT="0"
# @CODE
if [[ -z ${_LIBRETRO_CORE_ECLASS} ]]; then
_LIBRETRO_CORE_ECLASS=1
IUSE="debug"
# @ECLASS-VARIABLE: LIBRETRO_CORE_NAME
# @REQUIRED
# @DESCRIPTION:
# Name of this Libretro core. The libretro-core_src_install() phase function
# will install the shared library "${S}/${LIBRETRO_CORE_NAME}_libretro.so" as a
# Libretro core. Defaults to the name of the current package excluding the
# "libretro-" prefix (e.g., "mgba" for the package "libretro-mgba").
: ${LIBRETRO_CORE_NAME:=${PN#libretro-}}
# @ECLASS-VARIABLE: LIBRETRO_COMMIT_SHA
# @DESCRIPTION:
# Commit SHA used for SRC_URI will die if not set in <9999 ebuilds.
# Needs to be set before inherit.
# @ECLASS-VARIABLE: LIBRETRO_REPO_NAME
# @REQUIRED
# @DESCRIPTION:
# Contains the real repo name of the core formatted as "repouser/reponame".
# Needs to be set before inherit. Otherwise defaults to "libretro/${PN}"
: ${LIBRETRO_REPO_NAME:="libretro/libretro-${LIBRETRO_CORE_NAME}"}
: ${HOMEPAGE:="https://github.com/${LIBRETRO_REPO_NAME}"}
if [[ ${PV} == *9999 ]]; then
: ${EGIT_REPO_URI:="https://github.com/${LIBRETRO_REPO_NAME}.git"}
inherit git-r3
else
[[ -z "${LIBRETRO_COMMIT_SHA}" ]] && die "LIBRETRO_COMMIT_SHA must be set before inherit."
S="${WORKDIR}/${LIBRETRO_REPO_NAME##*/}-${LIBRETRO_COMMIT_SHA}"
: ${SRC_URI:="https://github.com/${LIBRETRO_REPO_NAME}/archive/${LIBRETRO_COMMIT_SHA}.tar.gz -> ${P}.tar.gz"}
fi
inherit flag-o-matic
# @ECLASS-VARIABLE: LIBRETRO_CORE_LIB_FILE
# @REQUIRED
# @DESCRIPTION:
# Absolute path of this Libretro core's shared library.
: ${LIBRETRO_CORE_LIB_FILE:="${S}/${LIBRETRO_CORE_NAME}_libretro.so"}
case "${EAPI:-0}" in
6|7)
EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install
;;
*)
die "EAPI=${EAPI} is not supported" ;;
esac
# @FUNCTION: libretro-core_src_unpack
# @DESCRIPTION:
# The libretro-core src_unpack function which is exported.
#
# This function retrieves the remote Libretro core info files.
libretro-core_src_unpack() {
# If this is a live ebuild, retrieve this core's remote repository.
if [[ ${PV} == *9999 ]]; then
git-r3_src_unpack
# Add used commit SHA for version information, the above could also work.
LIBRETRO_COMMIT_SHA=$(git -C "${WORKDIR}/${P}" rev-parse HEAD)
# Else, unpack this core's local tarball.
else
default_src_unpack
fi
}
# @FUNCTION: libretro-core_src_prepare
# @DESCRIPTION:
# The libretro-core src_prepare function which is exported.
#
# This function prepares the source by making custom modifications.
libretro-core_src_prepare() {
default_src_prepare
# Populate COMMIT for GIT_VERSION
local custom_libretro_commit_sha="\" ${LIBRETRO_COMMIT_SHA:0:7}\""
local makefile
local flags_modified=0
local shopt_saved=$(shopt -p nullglob)
shopt -s nullglob
for makefile in "${S}"/[Mm]akefile* "${S}"/target-libretro/[Mm]akefile*; do
# * Convert CRLF to LF
# * Expand *FLAGS to prevent potential self-references
# * Where LDFLAGS directly define the link version
# script append LDFLAGS and LIBS
# * Where SHARED is used to provide shared linking
# flags ensure final link command includes LDFLAGS
# and LIBS
# * Always use $(CFLAGS) when calling $(CC)
# * Add short-rev to Makefile
sed \
-e 's/\r$//g' \
-e "/flags.*=/s:-O[[:digit:]]:${CFLAGS}:g" \
-e "/CFLAGS.*=/s:-O[[:digit:]]:${CFLAGS}:g" \
-e "/.*,--version-script=.*/s:$: ${LDFLAGS} ${LIBS}:g" \
-e "/\$(CC)/s:\(\$(SHARED)\):\1 ${LDFLAGS} ${LIBS}:" \
-e 's:\(\$(CC)\):\1 \$(CFLAGS):g' \
-e "s/GIT_VERSION\s.=.*$/GIT_VERSION=${custom_libretro_commit_sha}/g" \
-i "${makefile}" || die "Failed to use custom cflags in ${makefile}"
done
${shopt_saved}
export OPTFLAGS="${CFLAGS}"
}
# @VARIABLE: myemakeargs
# @DEFAULT_UNSET
# @DESCRIPTION:
# Optional emake arguments as a bash array. Should be defined before calling
# src_compile.
# @CODE
# src_compile() {
# local myemakeargs=(
# $(usex neon "HAVE_NEON=1" "")
# )
# libretro-core_src_compile
# }
# @CODE
# @FUNCTION: libretro-core_src_compile
# @DESCRIPTION:
# The libretro-core src_compile function which is exported.
#
# This function compiles the shared library for this Libretro core.
libretro-core_src_compile() {
# most (if not all) libretro makefiles use DEBUG=1
# to enable additional debug features.
emake CC=$(tc-getCC) CXX=$(tc-getCXX) \
$(usex debug "DEBUG=1" "") "${myemakeargs[@]}" \
$([[ -f makefile.libretro ]] && echo '-f makefile.libretro') \
$([[ -f Makefile.libretro ]] && echo '-f Makefile.libretro')
}
# @FUNCTION: libretro-core_src_install
# @DESCRIPTION:
# The libretro-core src_install function which is exported.
#
# This function installs the shared library for this Libretro core.
libretro-core_src_install() {
# Absolute path of the directory containing Libretro shared libraries.
local libretro_lib_dir="/usr/$(get_libdir)/libretro"
# If this core's shared library exists, install that.
if [[ -f "${LIBRETRO_CORE_LIB_FILE}" ]]; then
exeinto "${libretro_lib_dir}"
doexe "${LIBRETRO_CORE_LIB_FILE}"
else
# Basename of this library.
local lib_basename="${LIBRETRO_CORE_LIB_FILE##*/}"
# Absolute path to which this library was installed.
local lib_file_target="${ED}${libretro_lib_dir}/${lib_basename}"
# If this library was *NOT* installed, fail.
[[ -f "${lib_file_target}" ]] ||
die "Libretro core shared library \"${lib_file_target}\" not installed."
fi
}
fi # end _LIBRETRO_CORE_ECLASS guard

View File

@ -1,9 +1,10 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: libtool.eclass
# @MAINTAINER:
# base-system@gentoo.org
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: quickly update bundled libtool code
# @DESCRIPTION:
# This eclass patches ltmain.sh distributed with libtoolized packages with the
@ -16,7 +17,11 @@
if [[ -z ${_LIBTOOL_ECLASS} ]]; then
_LIBTOOL_ECLASS=1
DEPEND=">=app-portage/elt-patches-20170422"
case ${EAPI:-0} in
0|1|2|3|4|5|6) DEPEND=">=app-portage/elt-patches-20170815" ;;
7) BDEPEND=">=app-portage/elt-patches-20170815" ;;
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
esac
inherit toolchain-funcs

View File

@ -106,13 +106,16 @@
# KBUILD_OUTPUT is used. This should be used for referencing .config.
# And to ensure all the weirdness with crosscompile
inherit toolchain-funcs versionator
inherit toolchain-funcs
[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
EXPORT_FUNCTIONS pkg_setup
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
@ -238,6 +241,10 @@ linux_config_qa_check() {
ewarn "QA: You called $f before any linux_config_exists!"
ewarn "QA: The return value of $f will NOT guaranteed later!"
fi
if ! use kernel_linux; then
die "$f called on non-Linux system, please fix the ebuild"
fi
}
# @FUNCTION: linux_config_src_exists
@ -246,7 +253,7 @@ linux_config_qa_check() {
# It returns true if .config exists in a build directory otherwise false
linux_config_src_exists() {
export _LINUX_CONFIG_EXISTS_DONE=1
[[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]
use kernel_linux && [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]
}
# @FUNCTION: linux_config_bin_exists
@ -255,7 +262,7 @@ linux_config_src_exists() {
# It returns true if .config exists in /proc, otherwise false
linux_config_bin_exists() {
export _LINUX_CONFIG_EXISTS_DONE=1
[[ -s /proc/config.gz ]]
use kernel_linux && [[ -s /proc/config.gz ]]
}
# @FUNCTION: linux_config_exists
@ -288,6 +295,10 @@ linux_config_path() {
# This function verifies that the current kernel is configured (it checks against the existence of .config)
# otherwise it dies.
require_configured_kernel() {
if ! use kernel_linux; then
die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
fi
if ! linux_config_src_exists; then
qeerror "Could not find a usable .config in the kernel source directory."
qeerror "Please ensure that ${KERNEL_DIR} points to a configured set of Linux sources."
@ -295,6 +306,7 @@ require_configured_kernel() {
qeerror "it points to the necessary object directory so that it might find .config."
die "Kernel not configured; no .config found in ${KV_OUT_DIR}"
fi
get_version || die "Unable to determine configured kernel version"
}
# @FUNCTION: linux_chkconfig_present
@ -366,6 +378,10 @@ linux_chkconfig_string() {
# Note: duplicated in kernel-2.eclass
kernel_is() {
if ! use kernel_linux; then
die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
fi
# if we haven't determined the version yet, we need to.
linux-info_get_any_version
@ -390,8 +406,13 @@ kernel_is() {
get_localversion() {
local lv_list i x
local shopt_save=$(shopt -p nullglob)
shopt -s nullglob
local files=( ${1}/localversion* )
${shopt_save}
# ignore files with ~ in it.
for i in $(ls ${1}/localversion* 2>/dev/null); do
for i in "${files[@]}"; do
[[ -n ${i//*~*} ]] && lv_list="${lv_list} ${i}"
done
@ -431,6 +452,10 @@ get_version_warning_done=
# KBUILD_OUTPUT (in a decreasing priority list, we look for the env var, makefile var or the
# symlink /lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build).
get_version() {
if ! use kernel_linux; then
die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
fi
local tmplocal
# no need to execute this twice assuming KV_FULL is populated.
@ -523,20 +548,6 @@ get_version() {
return 1
fi
# and in newer versions we can also pull LOCALVERSION if it is set.
# but before we do this, we need to find if we use a different object directory.
# This *WILL* break if the user is using localversions, but we assume it was
# 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
OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build"
if [[ -e ${OUTPUT_DIR} ]] ; then
break
fi
done
fi
[ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}"
if [ -n "${KV_OUT_DIR}" ];
then
@ -570,6 +581,20 @@ get_version() {
KV_LOCAL=$tmplocal
fi
# and in newer versions we can also pull LOCALVERSION if it is set.
# but before we do this, we need to find if we use a different object directory.
# This *WILL* break if the user is using localversions, but we assume it was
# 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
OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}${KV_LOCAL}/build"
if [[ -e ${OUTPUT_DIR} ]] ; then
break
fi
done
fi
# And we should set KV_FULL to the full expanded version
KV_FULL="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}${KV_LOCAL}"
@ -584,21 +609,25 @@ get_version() {
# It gets the version of the current running kernel and the result is the same as get_version() if the
# function can find the sources.
get_running_version() {
if ! use kernel_linux; then
die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
fi
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 $?
@ -606,9 +635,9 @@ get_running_version() {
# This handles a variety of weird kernel versions. Make sure to update
# tests/linux-info_get_running_version.sh if you want to change this.
local kv_full=${KV_FULL//[-+_]*}
KV_MAJOR=$(get_version_component_range 1 ${kv_full})
KV_MINOR=$(get_version_component_range 2 ${kv_full})
KV_PATCH=$(get_version_component_range 3 ${kv_full})
KV_MAJOR=$(ver_cut 1 ${kv_full})
KV_MINOR=$(ver_cut 2 ${kv_full})
KV_PATCH=$(ver_cut 3 ${kv_full})
KV_EXTRA="${KV_FULL#${KV_MAJOR}.${KV_MINOR}${KV_PATCH:+.${KV_PATCH}}}"
: ${KV_PATCH:=0}
fi
@ -623,10 +652,15 @@ get_running_version() {
# This attempts to find the version of the sources, and otherwise falls back to
# the version of the running kernel.
linux-info_get_any_version() {
get_version
if [[ $? -ne 0 ]]; then
if ! use kernel_linux; then
die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
fi
if ! get_version; then
ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version"
get_running_version
if ! get_running_version; then
die "Unable to determine any Linux Kernel version, please report a bug"
fi
fi
}
@ -638,9 +672,12 @@ linux-info_get_any_version() {
# @DESCRIPTION:
# This function verifies that the current kernel sources have been already prepared otherwise it dies.
check_kernel_built() {
if ! use kernel_linux; then
die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
fi
# if we haven't determined the version yet, we need to
require_configured_kernel
get_version
local versionh_path
if kernel_is -ge 3 7; then
@ -668,9 +705,12 @@ check_kernel_built() {
# @DESCRIPTION:
# This function verifies that the current kernel support modules (it checks CONFIG_MODULES=y) otherwise it dies.
check_modules_supported() {
if ! use kernel_linux; then
die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
fi
# if we haven't determined the version yet, we need too.
require_configured_kernel
get_version
if ! linux_chkconfig_builtin "MODULES"; then
eerror "These sources do not support loading external modules."
@ -683,8 +723,10 @@ check_modules_supported() {
# @FUNCTION: check_extra_config
# @DESCRIPTION:
# It checks the kernel config options specified by CONFIG_CHECK. It dies only when a required config option (i.e.
# the prefix ~ is not used) doesn't satisfy the directive.
# the prefix ~ is not used) doesn't satisfy the directive. Ignored on non-Linux systems.
check_extra_config() {
use kernel_linux || return
local config negate die error reworkmodulenames
local soft_errors_count=0 hard_errors_count=0 config_required=0
# store the value of the QA check, because otherwise we won't catch usages
@ -823,9 +865,12 @@ check_extra_config() {
}
check_zlibinflate() {
if ! use kernel_linux; then
die "${FUNCNAME}() called on non-Linux system, please fix the ebuild"
fi
# if we haven't determined the version yet, we need to
require_configured_kernel
get_version
# although I restructured this code - I really really really dont support it!
@ -843,13 +888,11 @@ check_zlibinflate() {
ebegin "checking ZLIB_INFLATE"
linux_chkconfig_builtin CONFIG_ZLIB_INFLATE
eend $?
[ "$?" != 0 ] && die
eend $? || die
ebegin "checking ZLIB_DEFLATE"
linux_chkconfig_builtin CONFIG_ZLIB_DEFLATE
eend $?
[ "$?" != 0 ] && die
eend $? || die
local LINENO_START
local LINENO_END
@ -900,6 +943,8 @@ check_zlibinflate() {
# Force a get_version() call when inherited from linux-mod.eclass and then check if the kernel is configured
# to support the options specified in CONFIG_CHECK (if not null)
linux-info_pkg_setup() {
use kernel_linux || return
linux-info_get_any_version
if kernel_is 2 4; then

View File

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: linux-mod.eclass
@ -150,7 +150,7 @@ RDEPEND="${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} kernel_linux? ( vir
DEPEND="${RDEPEND}
${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (}
sys-apps/sed
kernel_linux? ( virtual/linux-sources )
kernel_linux? ( virtual/linux-sources virtual/libelf )
${MODULES_OPTIONAL_USE:+)}"
# eclass utilities
@ -244,7 +244,7 @@ update_depmod() {
ebegin "Updating module dependencies for ${KV_FULL}"
if [ -r "${KV_OUT_DIR}"/System.map ]
then
depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT}" ${KV_FULL}
depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT:-/}" ${KV_FULL}
eend $?
else
ewarn
@ -263,8 +263,8 @@ update_depmod() {
move_old_moduledb() {
debug-print-function ${FUNCNAME} $*
local OLDDIR="${ROOT}"/usr/share/module-rebuild/
local NEWDIR="${ROOT}"/var/lib/module-rebuild/
local OLDDIR="${ROOT%/}"/usr/share/module-rebuild
local NEWDIR="${ROOT%/}"/var/lib/module-rebuild
if [[ -f "${OLDDIR}"/moduledb ]]; then
[[ ! -d "${NEWDIR}" ]] && mkdir -p "${NEWDIR}"
@ -283,7 +283,7 @@ move_old_moduledb() {
update_moduledb() {
debug-print-function ${FUNCNAME} $*
local MODULEDB_DIR="${ROOT}"/var/lib/module-rebuild/
local MODULEDB_DIR="${ROOT%/}"/var/lib/module-rebuild
move_old_moduledb
if [[ ! -f "${MODULEDB_DIR}"/moduledb ]]; then
@ -306,7 +306,7 @@ update_moduledb() {
remove_moduledb() {
debug-print-function ${FUNCNAME} $*
local MODULEDB_DIR="${ROOT}"/var/lib/module-rebuild/
local MODULEDB_DIR="${ROOT%/}"/var/lib/module-rebuild
move_old_moduledb
if grep -qs ${CATEGORY}/${PN}-${PVR} "${MODULEDB_DIR}"/moduledb ; then
@ -731,8 +731,8 @@ linux-mod_pkg_preinst() {
debug-print-function ${FUNCNAME} $*
[ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return
[ -d "${D}lib/modules" ] && UPDATE_DEPMOD=true || UPDATE_DEPMOD=false
[ -d "${D}lib/modules" ] && UPDATE_MODULEDB=true || UPDATE_MODULEDB=false
[ -d "${D%/}/lib/modules" ] && UPDATE_DEPMOD=true || UPDATE_DEPMOD=false
[ -d "${D%/}/lib/modules" ] && UPDATE_MODULEDB=true || UPDATE_MODULEDB=false
}
# @FUNCTION: linux-mod_pkg_postinst

View File

@ -6,6 +6,7 @@
# Michał Górny <mgorny@gentoo.org>
# @AUTHOR:
# Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 6
# @BLURB: Utility functions to build against slotted LLVM
# @DESCRIPTION:
# The llvm.eclass provides utility functions that can be used to build
@ -78,7 +79,7 @@ if [[ ! ${_LLVM_ECLASS} ]]; then
# @INTERNAL
# @DESCRIPTION:
# Correct values of LLVM slots, newest first.
declare -g -r _LLVM_KNOWN_SLOTS=( 7 6 5 4 )
declare -g -r _LLVM_KNOWN_SLOTS=( 8 7 6 5 4 )
# @FUNCTION: get_llvm_prefix
# @USAGE: [<max_slot>]

View File

@ -4,6 +4,7 @@
# @ECLASS: ltprune.eclass
# @MAINTAINER:
# Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
# @BLURB: Smart .la file pruning
# @DESCRIPTION:
# A function to locate and remove unnecessary .la files.

View File

@ -6,6 +6,7 @@
# mate@gentoo.org
# @AUTHOR:
# Authors: NP-Hardass <NP-Hardass@gentoo.org> based upon the gnome.org eclass.
# @SUPPORTED_EAPIS: 6
# @BLURB: Helper eclass for mate-desktop.org hosted archives
# @DESCRIPTION:
# Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Authors: NP-Hardass <NP-Hardass@gentoo.org> based upon the gnome2
# and autotools-utils eclasses
# @SUPPORTED_EAPIS: 6
# @BLURB: Provides phases for MATE based packages.
# @DESCRIPTION:
# Exports portage base functions used by ebuilds written for packages using the

View File

@ -1,10 +1,11 @@
# Copyright 2017 Gentoo Foundation
# Copyright 2017-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: meson.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
# Mike Gilbert <floppym@gentoo.org>
# @SUPPORTED_EAPIS: 6 7
# @BLURB: common ebuild functions for meson-based packages
# @DESCRIPTION:
# This eclass contains the default phase functions for packages which
@ -34,7 +35,7 @@
# @CODE
case ${EAPI:-0} in
6) ;;
6|7) ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
@ -59,7 +60,7 @@ EXPORT_FUNCTIONS src_configure src_compile src_test src_install
if [[ -z ${_MESON_ECLASS} ]]; then
_MESON_ECLASS=1
MESON_DEPEND=">=dev-util/meson-0.40.0
MESON_DEPEND=">=dev-util/meson-0.45.1
>=dev-util/ninja-1.7.2"
# @ECLASS-VARIABLE: MESON_AUTO_DEPEND
@ -69,7 +70,11 @@ MESON_DEPEND=">=dev-util/meson-0.40.0
# their own DEPEND string.
: ${MESON_AUTO_DEPEND:=yes}
if [[ ${MESON_AUTO_DEPEND} != "no" ]] ; then
if [[ ${EAPI:-0} == [0123456] ]]; then
DEPEND=${MESON_DEPEND}
else
BDEPEND=${MESON_DEPEND}
fi
fi
__MESON_AUTO_DEPEND=${MESON_AUTO_DEPEND} # See top of eclass

View File

@ -4,6 +4,7 @@
# @ECLASS: mozconfig-v6.45.eclass
# @MAINTAINER:
# mozilla team <mozilla@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6
# @DESCRIPTION:
# This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey)

View File

@ -4,6 +4,7 @@
# @ECLASS: mozconfig-v6.52.eclass
# @MAINTAINER:
# mozilla team <mozilla@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6
# @DESCRIPTION:
# This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey)

View File

@ -4,6 +4,7 @@
# @ECLASS: mozconfig-v6.58.eclass
# @MAINTAINER:
# mozilla team <mozilla@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6
# @DESCRIPTION:
# This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey)

View File

@ -1,9 +1,10 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# @ECLASS: mozconfig-v6.58.eclass
# @ECLASS: mozconfig-v6.60.eclass
# @MAINTAINER:
# mozilla team <mozilla@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6
# @DESCRIPTION:
# This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey)
@ -73,18 +74,8 @@ inherit flag-o-matic toolchain-funcs mozcoreconf-v6
# Set the variable to "enabled" if the use flag should be enabled by default.
# Set the variable to any value if the use flag should exist but not be default-enabled.
# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_QT5
# @DESCRIPTION:
# Set this variable before the inherit line, when an ebuild can provide
# optional qt5 support via IUSE="qt5". Currently this would include
# ebuilds for firefox, but thunderbird and seamonkey could follow in the future.
#
# Leave the variable UNSET if qt5 support should not be available.
# Set the variable to "enabled" if the use flag should be enabled by default.
# Set the variable to any value if the use flag should exist but not be default-enabled.
# use-flags common among all mozilla ebuilds
IUSE="${IUSE} dbus debug neon pulseaudio selinux startup-notification system-harfbuzz
IUSE="${IUSE} clang dbus debug neon pulseaudio selinux startup-notification system-harfbuzz
system-icu system-jpeg system-libevent system-sqlite system-libvpx"
# some notes on deps:
@ -110,7 +101,7 @@ RDEPEND=">=app-text/hunspell-1.5.4:=
>=x11-libs/pixman-0.19.2
>=dev-libs/glib-2.26:2
>=sys-libs/zlib-1.2.3
>=virtual/libffi-3.0.10
>=virtual/libffi-3.0.10:=
virtual/ffmpeg
x11-libs/libX11
x11-libs/libXcomposite
@ -122,7 +113,7 @@ RDEPEND=">=app-text/hunspell-1.5.4:=
system-icu? ( >=dev-libs/icu-59.1:= )
system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
system-libevent? ( >=dev-libs/libevent-2.0:0= )
system-sqlite? ( >=dev-db/sqlite-3.20.1:3[secure-delete,debug=] )
system-sqlite? ( >=dev-db/sqlite-3.23.1:3[secure-delete,debug=] )
system-libvpx? ( >=media-libs/libvpx-1.5.0:0=[postproc] )
system-harfbuzz? ( >=media-libs/harfbuzz-1.4.2:0= >=media-gfx/graphite2-1.3.9-r1 )
"
@ -162,17 +153,21 @@ fi
DEPEND="app-arch/zip
app-arch/unzip
>=sys-devel/binutils-2.16.1
>=sys-devel/binutils-2.30
sys-apps/findutils
clang? (
>=sys-devel/llvm-4.0.1[gold]
>=sys-devel/lld-4.0.1
)
pulseaudio? ( media-sound/pulseaudio )
elibc_glibc? ( || (
( >=dev-lang/rust-1.24.0[-extended(-)] >=dev-util/cargo-0.25.0 )
>=dev-lang/rust-1.24.0[extended]
( >=dev-lang/rust-bin-1.24.0 >=dev-util/cargo-0.25.0 )
) )
elibc_musl? ( || ( >=dev-lang/rust-1.24.0
>=dev-util/cargo-0.25.0
) )
elibc_glibc? (
virtual/cargo
virtual/rust
)
elibc_musl? (
virtual/cargo
virtual/rust
)
${RDEPEND}"
RDEPEND+="
@ -198,22 +193,39 @@ RDEPEND+="
# }
mozconfig_config() {
if use clang && ! tc-is-clang ; then
# Force clang
einfo "Enforcing the use of clang due to USE=clang ..."
CC=${CHOST}-clang
CXX=${CHOST}-clang++
strip-unsupported-flags
elif ! use clang && ! tc-is-gcc ; then
# Force gcc
einfo "Enforcing the use of gcc due to USE=-clang ..."
CC=${CHOST}-gcc
CXX=${CHOST}-g++
strip-unsupported-flags
fi
# Migrated from mozcoreconf-2
mozconfig_annotate 'system_libs' \
--with-system-zlib \
--with-system-bz2
# Stylo is only broken on x86 builds
use x86 && mozconfig_annotate 'Upstream bug 1341234' --disable-stylo
# Stylo is horribly broken on arm, renders GUI unusable
use arm && mozconfig_annotate 'breaks UI on arm' --disable-stylo
# Must pass release in order to properly select linker
mozconfig_annotate 'Enable by Gentoo' --enable-release
# Must pass --enable-gold if using ld.gold
if tc-ld-is-gold ; then
mozconfig_annotate 'tc-ld-is-gold=true' --enable-gold
# Avoid auto-magic on linker
if use clang ; then
# This is upstream's default
mozconfig_annotate "forcing ld=lld due to USE=clang" --enable-linker=lld
elif tc-ld-is-gold ; then
mozconfig_annotate "linker is set to gold" --enable-linker=gold
else
mozconfig_annotate 'tc-ld-is-gold=false' --disable-gold
mozconfig_annotate "linker is set to bfd" --enable-linker=bfd
fi
if has bindist ${IUSE}; then
@ -294,21 +306,6 @@ mozconfig_config() {
toolkit_comment="gtk2 use flag"
fi
fi
if [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]]; then
if use qt5; then
toolkit="cairo-qt"
toolkit_comment="qt5 use flag"
# need to specify these vars because the qt5 versions are not found otherwise,
# and setting --with-qtdir overrides the pkg-config include dirs
local i
for i in qmake moc rcc; do
echo "export HOST_${i^^}=\"$(qt5_get_bindir)/${i}\"" \
>> "${S}"/.mozconfig || die
done
echo 'unset QTDIR' >> "${S}"/.mozconfig || die
mozconfig_annotate '+qt5' --disable-gio
fi
fi
mozconfig_annotate "${toolkit_comment}" --enable-default-toolkit=${toolkit}
# Instead of the standard --build= and --host=, mozilla uses --host instead
@ -324,9 +321,6 @@ mozconfig_config() {
mozconfig_annotate '-pulseaudio' --enable-alsa
fi
# For testing purpose only
mozconfig_annotate 'Sandbox' --enable-content-sandbox
mozconfig_use_enable system-sqlite
mozconfig_use_with system-jpeg
mozconfig_use_with system-icu
@ -334,13 +328,24 @@ mozconfig_config() {
mozconfig_use_with system-harfbuzz
mozconfig_use_with system-harfbuzz system-graphite2
if use clang ; then
# https://bugzilla.mozilla.org/show_bug.cgi?id=1423822
mozconfig_annotate 'elf-hack is broken when using Clang' --disable-elf-hack
elif use arm ; then
mozconfig_annotate 'elf-hack is broken on arm' --disable-elf-hack
fi
# Modifications to better support ARM, bug 553364
if use neon ; then
mozconfig_annotate '' --with-fpu=neon
if ! tc-is-clang ; then
# thumb options aren't supported when using clang, bug 666966
mozconfig_annotate '' --with-thumb=yes
mozconfig_annotate '' --with-thumb-interwork=no
fi
if [[ ${CHOST} == armv* ]] ; then
fi
if [[ ${CHOST} == armv*h* ]] ; then
mozconfig_annotate '' --with-float-abi=hard
if ! use system-libvpx ; then
sed -i -e "s|softfp|hard|" \

View File

@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# @ECLASS: mozcoreconf-v5.eclass
# @ECLASS: mozcoreconf-v6.eclass
# @MAINTAINER:
# Mozilla team <mozilla@gentoo.org>
# @BLURB: core options and configuration functions for mozilla
@ -16,9 +16,6 @@
if [[ ! ${_MOZCORECONF} ]]; then
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE='ncurses,sqlite,ssl,threads'
inherit multilib toolchain-funcs flag-o-matic python-any-r1 versionator
IUSE="${IUSE} custom-cflags custom-optimization"
@ -112,6 +109,11 @@ moz_pkgsetup() {
fi
python-any-r1_pkg_setup
# workaround to set python3 into PYTHON3 until mozilla doesn't need py2
if [[ "${PYTHON_COMPAT[@]}" != "${PYTHON_COMPAT[@]#python3*}" ]]; then
export PYTHON3=${PYTHON}
python_export python2_7 PYTHON EPYTHON
fi
}
# @FUNCTION: mozconfig_init
@ -124,6 +126,7 @@ mozconfig_init() {
declare FF=$([[ ${PN} == firefox ]] && echo true || echo false)
declare SM=$([[ ${PN} == seamonkey ]] && echo true || echo false)
declare TB=$([[ ${PN} == thunderbird ]] && echo true || echo false)
declare TRB=$([[ ${PN} == torbrowser ]] && echo true || echo false)
####################################
#
@ -139,14 +142,19 @@ mozconfig_init() {
*firefox)
cp browser/config/mozconfig .mozconfig \
|| die "cp browser/config/mozconfig failed" ;;
*torbrowser)
cp browser/config/mozconfig .mozconfig \
|| die "cp browser/config/mozconfig failed" ;;
seamonkey)
# Must create the initial mozconfig to enable application
: >.mozconfig || die "initial mozconfig creation failed"
mozconfig_annotate "" --enable-application=suite ;;
# NOTE--this is not compatible with mozilla prior to v60
mozconfig_annotate "" --enable-application=comm/suite ;;
*thunderbird)
# Must create the initial mozconfig to enable application
: >.mozconfig || die "initial mozconfig creation failed"
mozconfig_annotate "" --enable-application=mail ;;
# NOTE--this is not compatible with mozilla prior to v60
mozconfig_annotate "" --enable-application=comm/mail ;;
esac
####################################
@ -156,7 +164,7 @@ mozconfig_init() {
####################################
# Set optimization level
if [[ $(gcc-major-version) -ge 7 ]]; then
if [[ $(gcc-major-version) -eq 7 ]]; then
mozconfig_annotate "Workaround known breakage" --enable-optimize=-O2
elif [[ ${ARCH} == hppa ]]; then
mozconfig_annotate "more than -O0 causes a segfault on hppa" --enable-optimize=-O0
@ -196,7 +204,14 @@ mozconfig_init() {
case "${ARCH}" in
arm)
# Reduce the memory requirements for linking
if use clang ; then
# Nothing to do
:;
elif tc-ld-is-gold ; then
append-ldflags -Wl,--no-keep-memory
else
append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
fi
;;
alpha)
# Historically we have needed to add -fPIC manually for 64-bit.
@ -211,7 +226,14 @@ mozconfig_init() {
ppc64)
append-flags -fPIC -mminimal-toc
# Reduce the memory requirements for linking
if use clang ; then
# Nothing to do
:;
elif tc-ld-is-gold ; then
append-ldflags -Wl,--no-keep-memory
else
append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
fi
;;
esac

View File

@ -91,5 +91,35 @@ xpi_install() {
doins -r "${x}"/* || die "failed to copy extension"
}
xpi_copy() {
local emid
# You must tell xpi_install which xpi to use
[[ ${#} -ne 1 ]] && die "$FUNCNAME takes exactly one argument, please specify an xpi to unpack"
x="${1}"
#cd ${x}
# determine id for extension
if [[ -f "${x}"/install.rdf ]]; then
emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \
|| die "failed to determine extension id from install.rdf"
elif [[ -f "${x}"/manifest.json ]]; then
emid="$( sed -n 's/.*"id": "\([^"]*\)",.*/\1/p' "${x}"/manifest.json )" \
|| die "failed to determine extension id from manifest.json"
else
die "failed to determine extension id"
fi
if [[ -n ${MOZEXTENSION_TARGET} ]]; then
insinto "${MOZILLA_FIVE_HOME}"/${MOZEXTENSION_TARGET%/}
elif $(mozversion_extension_location) ; then
insinto "${MOZILLA_FIVE_HOME}"/browser/extensions
else
insinto "${MOZILLA_FIVE_HOME}"/extensions
fi
newins "${DISTDIR%/}"/${x##*/}.xpi ${emid}.xpi
}
_MOZEXTENSION=1
fi

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Nirbheek Chauhan <nirbheek@gentoo.org>
# Ian Stakenvicius <axs@gentoo.org>
# @SUPPORTED_EAPIS: 2 3 4 5 6
# @BLURB: Handle language packs for mozilla products
# @DESCRIPTION:
# Sets IUSE according to MOZ_LANGS (language packs available). Also exports
@ -123,13 +124,18 @@ esac
# shouldn't (ie it is an alpha or beta package)
: ${MOZ_FORCE_UPSTREAM_L10N:=""}
# @ECLASS-VARIABLE: MOZ_TOO_REGIONALIZED_FOR_L10N
# @INTERNAL
# @DESCRIPTION:
# Upstream identifiers that should not contain region subtags in L10N
MOZ_TOO_REGIONALIZED_FOR_L10N=( fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO nn-NO pa-IN sv-SE )
# @ECLASS-VARIABLE: MOZ_INSTALL_L10N_XPIFILE
# @DESCRIPTION:
# Install langpacks as .xpi file instead of unpacked directory.
# Leave unset to install unpacked
: ${MOZ_INSTALL_L10N_XPIFILE:=""}
# Add l10n_* to IUSE according to available language packs
# No language packs for alphas and betas
if ! [[ -n ${MOZ_GENERATE_LANGPACKS} ]] ; then
@ -364,8 +370,13 @@ mozlinguas_src_install() {
done
popd > /dev/null || die
fi
for x in "${mozlinguas[@]}"; do
if [[ -n ${MOZ_INSTALL_L10N_XPIFILE} ]]; then
xpi_copy "${WORKDIR}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}"
else
xpi_install "${WORKDIR}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}"
fi
done
}

View File

@ -6,6 +6,7 @@
# Michał Górny <mgorny@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 4 5 6 7
# @BLURB: A generic eclass for building multiple variants of packages.
# @DESCRIPTION:
# The multibuild eclass aims to provide a generic framework for building

View File

@ -6,6 +6,7 @@
# gx86-multilib team <multilib@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 4 5 6 7
# @BLURB: flags and utility functions for building multilib packages
# @DESCRIPTION:
# The multilib-build.eclass exports USE flags and utility functions

View File

@ -4,6 +4,7 @@
# @ECLASS: multilib-minimal.eclass
# @MAINTAINER:
# Multilib team <multilib@gentoo.org>
# @SUPPORTED_EAPIS: 4 5 6 7
# @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions
# @DESCRIPTION:
#

View File

@ -351,9 +351,10 @@ multilib_env() {
;;
esac
;;
mips64*)
mips64*|mipsisa64*)
export CFLAGS_o32=${CFLAGS_o32--mabi=32}
export CHOST_o32=${CTARGET/mips64/mips}
export CHOST_o32=${CHOST_o32/mipsisa64/mipsisa32}
export CTARGET_o32=${CHOST_o32}
export LIBDIR_o32="lib"

View File

@ -8,6 +8,7 @@
# - Robin H. Johnson <robbat2@gentoo.org>
# - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
# - Brian Evans <grknight@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: This eclass provides common functions for mysql ebuilds
# @DESCRIPTION:
# The mysql-multilib-r1.eclass is the base eclass to build the mysql and
@ -149,7 +150,7 @@ if [[ ${MY_EXTRAS_VER} != "live" && ${MY_EXTRAS_VER} != "none" ]]; then
fi
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
HOMEPAGE="http://www.mysql.com/"
HOMEPAGE="https://www.mysql.com/"
LICENSE="GPL-2"
SLOT="0/${SUBSLOT:-0}"

View File

@ -8,6 +8,7 @@
# - Robin H. Johnson <robbat2@gentoo.org>
# - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
# - Brian Evans <grknight@gentoo.org>
# @SUPPORTED_EAPIS: 4 5
# @BLURB: This eclass provides most of the functions for mysql ebuilds
# @DESCRIPTION:
# The mysql-v2.eclass is the base eclass to build the mysql and
@ -189,17 +190,17 @@ if [[ ${MY_EXTRAS_VER} != "live" && ${MY_EXTRAS_VER} != "none" ]]; then
fi
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
HOMEPAGE="http://www.mysql.com/"
HOMEPAGE="https://www.mysql.com/"
if [[ ${PN} == "mariadb" ]]; then
HOMEPAGE="http://mariadb.org/"
HOMEPAGE="https://mariadb.org/"
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
fi
if [[ ${PN} == "mariadb-galera" ]]; then
HOMEPAGE="http://mariadb.org/"
HOMEPAGE="https://mariadb.org/"
DESCRIPTION="An enhanced, drop-in replacement for MySQL with Galera Replication"
fi
if [[ ${PN} == "percona-server" ]]; then
HOMEPAGE="http://www.percona.com/software/percona-server"
HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server"
DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
fi
LICENSE="GPL-2"

View File

@ -4,6 +4,7 @@
# @ECLASS: netsurf.eclass
# @MAINTAINER:
# Michael Weber <xmw@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: Handle buildsystem of www.netsurf-browser.org components
# @DESCRIPTION:
# Handle unpacking and usage of separate buildsystem tarball and manage

View File

@ -8,6 +8,7 @@
# @AUTHOR:
# Michał Górny <mgorny@gentoo.org>
# Mike Gilbert <floppym@gentoo.org>
# @SUPPORTED_EAPIS: 2 4 5 6 7
# @BLURB: common bits to run dev-util/ninja builder
# @DESCRIPTION:
# This eclass provides a single function -- eninja -- that can be used

View File

@ -6,6 +6,7 @@
# ml@gentoo.org
# @AUTHOR:
# Original Author: Alexis Ballier <aballier@gentoo.org>
# @SUPPORTED_EAPIS: 3 4 5 6 7
# @BLURB: Provides common ebuild phases for oasis-based packages.
# @DESCRIPTION:
# Provides common ebuild phases for oasis-based packages.

View File

@ -4,6 +4,7 @@
# @ECLASS: obs-service.eclass
# @MAINTAINER:
# maintainer-needed@gentoo.org
# @SUPPORTED_EAPIS: 4 5
# @BLURB: Reduces code duplication in the Open Build Service services.
# @DESCRIPTION:
# This eclass makes it easier to package Open Build Service services. Based on

View File

@ -6,6 +6,7 @@
# The office team <openoffice@gentoo.org>
# @AUTHOR:
# Tomáš Chvátal <scarabeus@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: Eclass for installing libreoffice/openoffice extensions
# @DESCRIPTION:
# Eclass for easing maintenance of libreoffice/openoffice extensions.

View File

@ -6,6 +6,7 @@
# Gentoo ML Project <ml@gentoo.org>
# @AUTHOR:
# Alexis Ballier <aballier@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: Provides functions for installing opam packages.
# @DESCRIPTION:
# Provides dependencies on opam and ocaml, opam-install and a default

View File

@ -4,6 +4,7 @@
# @ECLASS: out-of-source.eclass
# @MAINTAINER:
# Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 6 7
# @BLURB: convenient wrapper to build autotools packages out-of-source
# @DESCRIPTION:
# This eclass provides a minimalistic wrapper interface to easily

View File

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: pax-utils.eclass
@ -50,8 +50,8 @@ PAX_MARKINGS=${PAX_MARKINGS:="PT XT"}
# to https://pax.grsecurity.net/ for details on what these flags are all about.
#
# Please confirm any relaxation of restrictions with the Gentoo Hardened team.
# Either ask on the gentoo-hardened mailing list, or CC/assign hardened@g.o on
# the bug report.
# Either ask on the gentoo-hardened mailing list, or CC/assign
# hardened@gentoo.org on the bug report.
pax-mark() {
local f # loop over paxables
local flags # pax flags

View File

@ -3,6 +3,7 @@
# Author: Michael Cummings <mcummings@gentoo.org>
# Maintained by the Perl herd <perl@gentoo.org>
# @SUPPORTED_EAPIS: 5
# If the ebuild doesn't override this, ensure we do not depend on the perl subslot value
: ${GENTOO_DEPEND_ON_PERL_SUBSLOT:="no"}

View File

@ -8,6 +8,7 @@
# Seemant Kulleen <seemant@gentoo.org>
# Andreas K. Huettel <dilfridge@gentoo.org>
# Kent Fredric <kentnl@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: helper functions eclass for perl modules
# @DESCRIPTION:
# The perl-functions eclass is designed to allow easier installation of perl

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Seemant Kulleen <seemant@gentoo.org>
# Andreas K. Hüttel <dilfridge@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: eclass for installing Perl module distributions
# @DESCRIPTION:
# The perl-module eclass is designed to allow easier installation of Perl
@ -161,7 +162,7 @@ if [[ ${EAPI:-0} == 5 ]]; then
[[ -z "${SRC_URI}" && -n "${MODULE_AUTHOR}" ]] && \
SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}"
[[ -z "${HOMEPAGE}" ]] && \
HOMEPAGE="http://search.cpan.org/dist/${MODULE_NAME}/"
HOMEPAGE="https://metacpan.org/release/${MODULE_NAME}"
SRC_TEST="skip"
else
@ -174,7 +175,7 @@ else
[[ -z "${SRC_URI}" && -n "${DIST_AUTHOR}" ]] && \
SRC_URI="mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${DIST_SECTION:+${DIST_SECTION}/}${DIST_A}"
[[ -z "${HOMEPAGE}" ]] && \
HOMEPAGE="http://search.cpan.org/dist/${DIST_NAME}/"
HOMEPAGE="http://metacpan.org/release/${DIST_NAME}"
[[ -z "${DIST_EXAMPLES}" ]] || IUSE+=" examples"
fi

View File

@ -10,6 +10,7 @@
# Author: Luca Longinotti <chtekk@gentoo.org>
# Author: Jakub Moc <jakub@gentoo.org> (documentation)
# Author: Ole Markus With <olemarkus@gentoo.org>
# @SUPPORTED_EAPIS: 4 5
# @BLURB: A unified interface for compiling and installing standalone PHP extensions.
# @DESCRIPTION:
# This eclass provides a unified interface for compiling and installing standalone

View File

@ -4,6 +4,7 @@
# @ECLASS: php-ext-source-r3.eclass
# @MAINTAINER:
# Gentoo PHP team <php-bugs@gentoo.org>
# @SUPPORTED_EAPIS: 6
# @BLURB: Compile and install standalone PHP extensions.
# @DESCRIPTION:
# A unified interface for compiling and installing standalone PHP

View File

@ -6,6 +6,7 @@
# Gentoo PHP Team <php-bugs@gentoo.org>
# @AUTHOR:
# Author: Brian Evans <grknight@gentoo.org>
# @SUPPORTED_EAPIS: 6
# @BLURB: Provides means for an easy installation of PEAR packages.
# @DESCRIPTION:
# This eclass provides means for an easy installation of PEAR packages.

View File

@ -9,6 +9,7 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_compile src_install src_test
# @MAINTAINER:
# PostgreSQL <pgsql-bugs@gentoo.org>
# @AUTHOR: Aaron W. Swenson <titanofold@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: An eclass to build PostgreSQL-related packages against multiple slots
# @DESCRIPTION:
# postgres-multi enables ebuilds, particularly PostgreSQL extensions, to

View File

@ -8,6 +8,7 @@ EXPORT_FUNCTIONS pkg_setup
# @MAINTAINER:
# PostgreSQL <pgsql-bugs@gentoo.org>
# @AUTHOR: Aaron W. Swenson <titanofold@gentoo.org>
# @SUPPORTED_EAPIS: 5 6
# @BLURB: An eclass for PostgreSQL-related packages
# @DESCRIPTION:
# This eclass provides common utility functions that many

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# Based on work of: Krzysztof Pawlik <nelchael@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: An eclass for packages having build-time dependency on Python.
# @DESCRIPTION:
# A minimal eclass for packages which need any Python interpreter

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# Based on work of: Krzysztof Pawlik <nelchael@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: A common, simple eclass for Python packages.
# @DESCRIPTION:
# A common eclass providing helper functions to build and install

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# Based on work of: Krzysztof Pawlik <nelchael@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: An eclass for Python packages not installed for multiple implementations.
# @DESCRIPTION:
# An extension of the python-r1 eclass suite for packages which

View File

@ -7,6 +7,7 @@
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# Based on work of: Krzysztof Pawlik <nelchael@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: Utility functions for packages with Python parts.
# @DESCRIPTION:
# A utility eclass providing functions to query Python implementations,
@ -43,7 +44,7 @@ _PYTHON_ALL_IMPLS=(
jython2_7
pypy pypy3
python2_7
python3_4 python3_5 python3_6
python3_4 python3_5 python3_6 python3_7
)
readonly _PYTHON_ALL_IMPLS
@ -79,7 +80,7 @@ _python_impl_supported() {
# keep in sync with _PYTHON_ALL_IMPLS!
# (not using that list because inline patterns shall be faster)
case "${impl}" in
python2_7|python3_[456]|jython2_7)
python2_7|python3_[4567]|jython2_7)
return 0
;;
pypy1_[89]|pypy2_0|python2_[56]|python3_[123])

View File

@ -24,6 +24,7 @@ inherit estack toolchain-funcs
# Echoes the directory where Qt4 binaries are installed.
# EPREFIX is already prepended to the returned path.
qt4_get_bindir() {
[[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later"
has "${EAPI:-0}" 0 1 2 && use !prefix && EPREFIX=
local qtbindir=${EPREFIX}$(qt4_get_libdir)/bin
@ -38,6 +39,7 @@ qt4_get_bindir() {
# @DESCRIPTION:
# Echoes the directory where Qt4 headers are installed.
qt4_get_headerdir() {
[[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later"
echo /usr/include/qt4
}
@ -45,6 +47,7 @@ qt4_get_headerdir() {
# @DESCRIPTION:
# Echoes the directory where Qt4 libraries are installed.
qt4_get_libdir() {
[[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later"
echo /usr/$(get_libdir)/qt4
}
@ -52,6 +55,7 @@ qt4_get_libdir() {
# @DESCRIPTION:
# Echoes the directory where Qt4 mkspecs are installed.
qt4_get_mkspecsdir() {
[[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later"
echo /usr/share/qt4/mkspecs
}
@ -59,6 +63,7 @@ qt4_get_mkspecsdir() {
# @DESCRIPTION:
# Echoes the directory where Qt4 plugins are installed.
qt4_get_plugindir() {
[[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later"
echo $(qt4_get_libdir)/plugins
}
@ -161,6 +166,7 @@ qmake-utils_find_pro_file() {
eqmake4() {
debug-print-function ${FUNCNAME} "$@"
[[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later"
has "${EAPI:-0}" 0 1 2 && use !prefix && EPREFIX=
ebegin "Running qmake"

View File

@ -1,847 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: qt4-build-multilib.eclass
# @MAINTAINER:
# qt@gentoo.org
# @AUTHOR:
# Davide Pesavento <pesa@gentoo.org>
# @BLURB: Eclass for Qt4 split ebuilds with multilib support.
# @DESCRIPTION:
# This eclass contains various functions that are used when building Qt4.
# Requires EAPI 5.
case ${EAPI} in
5) : ;;
*) die "qt4-build-multilib.eclass: unsupported EAPI=${EAPI:-0}" ;;
esac
inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs
HOMEPAGE="https://www.qt.io/"
LICENSE="|| ( LGPL-2.1 LGPL-3 GPL-3 ) FDL-1.3"
SLOT="4"
case ${PV} in
4.?.9999)
# git stable branch
QT4_BUILD_TYPE="live"
EGIT_BRANCH=${PV%.9999}
;;
*)
# official stable release
QT4_BUILD_TYPE="release"
MY_P=qt-everywhere-opensource-src-${PV/_/-}
SRC_URI="http://download.qt.io/official_releases/qt/${PV%.*}/${PV}/${MY_P}.tar.gz"
S=${WORKDIR}/${MY_P}
;;
esac
EGIT_REPO_URI=(
"git://code.qt.io/qt/qt.git"
"https://code.qt.io/git/qt/qt.git"
"https://github.com/qtproject/qt.git"
)
[[ ${QT4_BUILD_TYPE} == live ]] && inherit git-r3
if [[ ${PN} != qttranslations ]]; then
IUSE="aqua debug pch"
[[ ${PN} != qtxmlpatterns ]] && IUSE+=" +exceptions"
fi
DEPEND="
dev-lang/perl
virtual/pkgconfig[${MULTILIB_USEDEP}]
"
RDEPEND="
dev-qt/qtchooser
"
# src_{configure,compile,test,install} are inherited from multilib-minimal
EXPORT_FUNCTIONS src_unpack src_prepare pkg_postinst pkg_postrm
multilib_src_configure() { qt4_multilib_src_configure; }
multilib_src_compile() { qt4_multilib_src_compile; }
multilib_src_test() { qt4_multilib_src_test; }
multilib_src_install() { qt4_multilib_src_install; }
multilib_src_install_all() { qt4_multilib_src_install_all; }
# @ECLASS-VARIABLE: PATCHES
# @DEFAULT_UNSET
# @DESCRIPTION:
# Array variable containing all the patches to be applied. This variable
# is expected to be defined in the global scope of ebuilds. Make sure to
# specify the full path. This variable is used in src_prepare phase.
#
# Example:
# @CODE
# PATCHES=(
# "${FILESDIR}/mypatch.patch"
# "${FILESDIR}/mypatch2.patch"
# )
# @CODE
# @ECLASS-VARIABLE: QT4_TARGET_DIRECTORIES
# @DEFAULT_UNSET
# @DESCRIPTION:
# Space-separated list of directories that will be configured,
# compiled, and installed. All paths must be relative to ${S}.
# @ECLASS-VARIABLE: QCONFIG_ADD
# @DEFAULT_UNSET
# @DESCRIPTION:
# List of options that must be added to QT_CONFIG in qconfig.pri
# @ECLASS-VARIABLE: QCONFIG_REMOVE
# @DEFAULT_UNSET
# @DESCRIPTION:
# List of options that must be removed from QT_CONFIG in qconfig.pri
# @ECLASS-VARIABLE: QCONFIG_DEFINE
# @DEFAULT_UNSET
# @DESCRIPTION:
# List of macros that must be defined in QtCore/qconfig.h
###### Phase functions ######
# @FUNCTION: qt4-build-multilib_src_unpack
# @DESCRIPTION:
# Unpacks the sources.
qt4-build-multilib_src_unpack() {
if tc-is-gcc; then
if [[ $(gcc-major-version) -lt 4 ]] || \
[[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ]]; then
ewarn
ewarn "Using a GCC version lower than 4.4 is not supported"
ewarn
fi
fi
if [[ ${PN} == qtwebkit ]]; 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 "For more info check out https://bugs.gentoo.org/307861"
ewarn
fi
eshopts_pop
fi
case ${QT4_BUILD_TYPE} in
live) git-r3_src_unpack ;;
release) default ;;
esac
}
# @FUNCTION: qt4-build-multilib_src_prepare
# @DESCRIPTION:
# Prepare the sources before the configure phase. Strip CFLAGS if necessary, and fix
# the build system in order to respect CFLAGS/CXXFLAGS/LDFLAGS specified in make.conf.
qt4-build-multilib_src_prepare() {
if [[ ${PN} != qtcore ]]; then
# avoid unnecessary qmake recompilations
sed -i -e 's/^if true;/if false;/' configure \
|| die "sed failed (skip qmake bootstrap)"
fi
# skip X11 tests in non-gui packages to avoid spurious dependencies
if has ${PN} qtbearer qtcore qtdbus qtscript qtsql qttest qttranslations qtxmlpatterns; then
sed -i -e '/^if.*PLATFORM_X11.*CFG_GUI/,/^fi$/d' configure \
|| die "sed failed (skip X11 tests)"
fi
# Qt4 is not safe to build with C++14 (the new gcc-6 default).
# Upstream has addressed this for Qt5, but while we continue to
# support Qt4, we need to ensure everything is built in C++98 mode.
# See bugs 582522, 582618, 583662, 583744.
append-cxxflags -std=gnu++98
if [[ ${PN} == qtcore ]]; then
# Bug 373061
# qmake bus errors with -O2 or -O3 but -O1 works
if [[ ${CHOST} == *86*-apple-darwin* ]]; then
replace-flags -O[23] -O1
fi
# Bug 503500
# undefined reference with -Os and --as-needed
if use x86 || use_if_iuse abi_x86_32; then
replace-flags -Os -O2
fi
fi
if [[ ${PN} == qtdeclarative ]]; then
# Bug 551560
# gcc-4.8 ICE with -Os, fixed in 4.9
if use x86 && tc-is-gcc && [[ $(gcc-version) == 4.8 ]]; then
replace-flags -Os -O2
fi
fi
if [[ ${PN} == qtwebkit ]]; then
# Bug 550780
# various ICEs with graphite-related flags, gcc-5 works
if [[ $(gcc-major-version) -lt 5 ]]; then
filter-flags -fgraphite-identity -floop-strip-mine
fi
fi
# Bug 261632
if use ppc64; then
append-flags -mminimal-toc
fi
# Teach configure about gcc-6 and later
sed -i -e 's:5\*|:[5-9]*|:' \
configure || die "sed gcc version failed"
# Read also AR from the environment
sed -i -e 's/^SYSTEM_VARIABLES="/&AR /' \
configure || die "sed SYSTEM_VARIABLES failed"
# Reset QMAKE_*FLAGS_{RELEASE,DEBUG} variables,
# or they will override the user's flags (via .qmake.cache)
sed -i -e '/^SYSTEM_VARIABLES=/ i \
QMakeVar set QMAKE_CFLAGS_RELEASE\
QMakeVar set QMAKE_CFLAGS_DEBUG\
QMakeVar set QMAKE_CXXFLAGS_RELEASE\
QMakeVar set QMAKE_CXXFLAGS_DEBUG\
QMakeVar set QMAKE_LFLAGS_RELEASE\
QMakeVar set QMAKE_LFLAGS_DEBUG\n' \
configure || die "sed QMAKE_*FLAGS_{RELEASE,DEBUG} failed"
# Drop -nocache from qmake invocation in all configure tests, to ensure that the
# correct toolchain and build flags are picked up from config.tests/.qmake.cache
find config.tests/unix -name '*.test' -type f -execdir \
sed -i -e '/bin\/qmake/s/-nocache//' '{}' + || die "sed -nocache failed"
# compile.test needs additional patching so that it doesn't create another cache file
# inside the test subdir, which would incorrectly override config.tests/.qmake.cache
sed -i -e '/echo.*QT_BUILD_TREE.*\.qmake\.cache/d' \
-e '/bin\/qmake/s/ "$SRCDIR/ "QT_BUILD_TREE=$OUTDIR"&/' \
config.tests/unix/compile.test || die "sed compile.test failed"
# Delete references to the obsolete /usr/X11R6 directory
# On prefix, this also prevents looking at non-prefix stuff
sed -i -re '/^QMAKE_(LIB|INC)DIR(_X11|_OPENGL|)\s+/ s/=.*/=/' \
mkspecs/common/linux.conf \
mkspecs/$(qt4_get_mkspec)/qmake.conf \
|| die "sed QMAKE_(LIB|INC)DIR failed"
if use_if_iuse aqua; then
sed -i \
-e '/^CONFIG/s:app_bundle::' \
-e '/^CONFIG/s:plugin_no_soname:plugin_with_soname absolute_library_soname:' \
mkspecs/$(qt4_get_mkspec)/qmake.conf \
|| die "sed failed (aqua)"
# we are crazy and build cocoa + qt3support
if { ! in_iuse qt3support || use qt3support; } && [[ ${CHOST##*-darwin} -ge 9 ]]; then
sed -i -e "/case \"\$PLATFORM,\$CFG_MAC_COCOA\" in/,/;;/ s|CFG_QT3SUPPORT=\"no\"|CFG_QT3SUPPORT=\"yes\"|" \
configure || die "sed failed (cocoa + qt3support)"
fi
fi
if [[ ${CHOST} == *-darwin* ]]; then
# Set FLAGS and remove -arch, since our gcc-apple is multilib crippled (by design)
sed -i \
-e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
-e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
-e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=-headerpad_max_install_names ${LDFLAGS}:" \
-e "s:-arch\s\w*::g" \
mkspecs/common/g++-macx.conf \
|| die "sed g++-macx.conf failed"
# Fix configure's -arch settings that appear in qmake/Makefile and also
# fix arch handling (automagically duplicates our -arch arg and breaks
# pch). Additionally disable Xarch support.
sed -i \
-e "s:-arch i386::" \
-e "s:-arch ppc::" \
-e "s:-arch x86_64::" \
-e "s:-arch ppc64::" \
-e "s:-arch \$i::" \
-e "/if \[ ! -z \"\$NATIVE_64_ARCH\" \]; then/,/fi/ d" \
-e "s:CFG_MAC_XARCH=yes:CFG_MAC_XARCH=no:g" \
-e "s:-Xarch_x86_64::g" \
-e "s:-Xarch_ppc64::g" \
configure mkspecs/common/gcc-base-macx.conf mkspecs/common/g++-macx.conf \
|| die "sed -arch/-Xarch failed"
# On Snow Leopard don't fall back to 10.5 deployment target.
if [[ ${CHOST} == *-apple-darwin10 ]]; then
sed -i \
-e "s:QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET.*:QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.6:g" \
-e "s:-mmacosx-version-min=10.[0-9]:-mmacosx-version-min=10.6:g" \
configure mkspecs/common/g++-macx.conf \
|| die "sed deployment target failed"
fi
fi
if [[ ${CHOST} == *-solaris* ]]; then
sed -i -e '/^QMAKE_LFLAGS_THREAD/a QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,' \
mkspecs/$(qt4_get_mkspec)/qmake.conf || die
fi
# apply patches
[[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
epatch_user
}
qt4_multilib_src_configure() {
qt4_prepare_env
qt4_symlink_tools_to_build_dir
# toolchain setup ('local -x' because of bug 532510)
local -x \
AR="$(tc-getAR) cqs" \
CC=$(tc-getCC) \
CXX=$(tc-getCXX) \
LD=$(tc-getCXX) \
MAKEFLAGS=${MAKEOPTS} \
OBJCOPY=$(tc-getOBJCOPY) \
OBJDUMP=$(tc-getOBJDUMP) \
STRIP=$(tc-getSTRIP)
# convert tc-arch to the values supported by Qt
local arch=$(tc-arch)
case ${arch} in
amd64|x64-*) arch=x86_64 ;;
arm64|hppa) arch=generic ;;
ppc*-macos) arch=ppc ;;
ppc*) arch=powerpc ;;
sparc*) arch=sparc ;;
x86-macos) arch=x86 ;;
x86*) arch=i386 ;;
esac
# configure arguments
local conf=(
# installation paths
-prefix "${QT4_PREFIX}"
-bindir "${QT4_BINDIR}"
-libdir "${QT4_LIBDIR}"
-docdir "${QT4_DOCDIR}"
-headerdir "${QT4_HEADERDIR}"
-plugindir "${QT4_PLUGINDIR}"
-importdir "${QT4_IMPORTDIR}"
-datadir "${QT4_DATADIR}"
-translationdir "${QT4_TRANSLATIONDIR}"
-sysconfdir "${QT4_SYSCONFDIR}"
-examplesdir "${QT4_EXAMPLESDIR}"
-demosdir "${QT4_DEMOSDIR}"
# debug/release
$(use_if_iuse debug && echo -debug || echo -release)
-no-separate-debug-info
# licensing stuff
-opensource -confirm-license
# build shared libraries
-shared
# skip recursive processing of .pro files at the end of configure
# (we run qmake by ourselves), thus saving quite a bit of time
-dont-process
# always enable large file support
-largefile
# exceptions USE flag
$(in_iuse exceptions && qt_use exceptions || echo -exceptions)
# build STL support
-stl
# architecture/platform (mkspec)
-arch ${arch}
-platform $(qt4_get_mkspec)
# instruction set support
$(is-flagq -mno-mmx && echo -no-mmx)
$(is-flagq -mno-3dnow && echo -no-3dnow)
$(is-flagq -mno-sse && echo -no-sse)
$(is-flagq -mno-sse2 && echo -no-sse2)
$(is-flagq -mno-sse3 && echo -no-sse3)
$(is-flagq -mno-ssse3 && echo -no-ssse3)
$(is-flagq -mno-sse4.1 && echo -no-sse4.1)
$(is-flagq -mno-sse4.2 && echo -no-sse4.2)
$(is-flagq -mno-avx && echo -no-avx)
$(is-flagq -mfpu=* && ! is-flagq -mfpu=*neon* && echo -no-neon)
# bug 367045
$([[ ${CHOST} == *86*-apple-darwin* ]] && echo -no-ssse3)
# prefer system libraries
-system-zlib
# exclude examples and demos from default build
-nomake examples
-nomake demos
# disable rpath on non-prefix (bugs 380415 and 417169)
$(usex prefix '' -no-rpath)
# print verbose information about each configure test
-verbose
# precompiled headers don't work on hardened, where the flag is masked
$(in_iuse pch && qt_use pch || echo -no-pch)
# enable linker optimizations to reduce relocations, except on Solaris
# where this flag seems to introduce major breakage to applications,
# mostly to be seen as a core dump with the message:
# "QPixmap: Must construct a QApplication before a QPaintDevice"
$([[ ${CHOST} != *-solaris* ]] && echo -reduce-relocations)
)
if use_if_iuse aqua; then
if [[ ${CHOST##*-darwin} -ge 9 ]]; then
conf+=(
# on (snow) leopard use the new (frameworked) cocoa code
-cocoa -framework
# add hint for the framework location
-F"${QT4_LIBDIR}"
)
else
conf+=(-no-framework)
fi
fi
conf+=(
# module-specific options
"${myconf[@]}"
)
einfo "Configuring with: ${conf[@]}"
"${S}"/configure "${conf[@]}" || die "configure failed"
# configure is stupid and assigns QMAKE_LFLAGS twice,
# thus the previous -rpath-link flag gets overwritten
# and some packages (e.g. qthelp) fail to link
sed -i -e '/^QMAKE_LFLAGS =/ s:$: $$QMAKE_LFLAGS:' \
.qmake.cache || die "sed .qmake.cache failed"
qt4_qmake
qt4_foreach_target_subdir qt4_qmake
}
qt4_multilib_src_compile() {
qt4_prepare_env
qt4_foreach_target_subdir emake
}
qt4_multilib_src_test() {
qt4_prepare_env
qt4_foreach_target_subdir emake -j1 check
}
qt4_multilib_src_install() {
qt4_prepare_env
qt4_foreach_target_subdir emake INSTALL_ROOT="${D}" install
if [[ ${PN} == qtcore ]]; then
set -- emake INSTALL_ROOT="${D}" install_{mkspecs,qmake}
einfo "Running $*"
"$@"
# install env.d file
cat > "${T}/44qt4-${CHOST}" <<-_EOF_
LDPATH="${QT4_LIBDIR}"
_EOF_
doenvd "${T}/44qt4-${CHOST}"
# install qtchooser configuration file
cat > "${T}/qt4-${CHOST}.conf" <<-_EOF_
${QT4_BINDIR}
${QT4_LIBDIR}
_EOF_
(
insinto /etc/xdg/qtchooser
doins "${T}/qt4-${CHOST}.conf"
)
if multilib_is_native_abi; then
# convenience symlinks
dosym qt4-"${CHOST}".conf /etc/xdg/qtchooser/4.conf
dosym qt4-"${CHOST}".conf /etc/xdg/qtchooser/qt4.conf
fi
fi
# move pkgconfig directory to the correct location
if [[ -d ${D}${QT4_LIBDIR}/pkgconfig ]]; then
mv "${D}${QT4_LIBDIR}"/pkgconfig "${ED}usr/$(get_libdir)" || die
fi
qt4_install_module_qconfigs
qt4_symlink_framework_headers
}
qt4_multilib_src_install_all() {
if [[ ${PN} == qtcore ]]; then
# include gentoo-qconfig.h at the beginning of Qt{,Core}/qconfig.h
if use aqua && [[ ${CHOST#*-darwin} -ge 9 ]]; then
sed -i -e '1i #include <QtCore/Gentoo/gentoo-qconfig.h>\n' \
"${D}${QT4_LIBDIR}"/QtCore.framework/Headers/qconfig.h \
|| die "sed failed (qconfig.h)"
dosym "${QT4_HEADERDIR#${EPREFIX}}"/Gentoo \
"${QT4_LIBDIR#${EPREFIX}}"/QtCore.framework/Headers/Gentoo
else
sed -i -e '1i #include <Gentoo/gentoo-qconfig.h>\n' \
"${D}${QT4_HEADERDIR}"/Qt{,Core}/qconfig.h \
|| die "sed failed (qconfig.h)"
fi
dodir "${QT4_DATADIR#${EPREFIX}}"/mkspecs/gentoo
mv "${D}${QT4_DATADIR}"/mkspecs/{qconfig.pri,gentoo/} || die
fi
# install private headers of a few modules
if has ${PN} qtcore qtdeclarative qtgui qtscript; then
local moduledir=${PN#qt}
local modulename=Qt$(tr 'a-z' 'A-Z' <<< ${moduledir:0:1})${moduledir:1}
[[ ${moduledir} == core ]] && moduledir=corelib
einfo "Installing private headers into ${QT4_HEADERDIR}/${modulename}/private"
insinto "${QT4_HEADERDIR#${EPREFIX}}"/${modulename}/private
find "${S}"/src/${moduledir} -type f -name '*_p.h' -exec doins '{}' + || die
fi
prune_libtool_files
}
# @FUNCTION: qt4-build-multilib_pkg_postinst
# @DESCRIPTION:
# Regenerate configuration after installation or upgrade/downgrade.
qt4-build-multilib_pkg_postinst() {
qt4_regenerate_global_qconfigs
}
# @FUNCTION: qt4-build-multilib_pkg_postrm
# @DESCRIPTION:
# Regenerate configuration when a module is completely removed.
qt4-build-multilib_pkg_postrm() {
qt4_regenerate_global_qconfigs
}
###### Public helpers ######
# @FUNCTION: qt_use
# @USAGE: <flag> [feature] [enableval]
# @DESCRIPTION:
# <flag> is the name of a flag in IUSE.
#
# Outputs "-${enableval}-${feature}" if <flag> is enabled, "-no-${feature}"
# otherwise. If [feature] is not specified, <flag> is used in its place.
# If [enableval] is not specified, the "-${enableval}" prefix is omitted.
qt_use() {
[[ $# -ge 1 ]] || die "${FUNCNAME}() requires at least one argument"
usex "$1" "${3:+-$3}-${2:-$1}" "-no-${2:-$1}"
}
# @FUNCTION: qt_native_use
# @USAGE: <flag> [feature] [enableval]
# @DESCRIPTION:
# <flag> is the name of a flag in IUSE.
#
# Outputs "-${enableval}-${feature}" if <flag> is enabled and we are currently
# building for the native ABI, "-no-${feature}" otherwise. If [feature] is not
# specified, <flag> is used in its place. If [enableval] is not specified,
# the "-${enableval}" prefix is omitted.
qt_native_use() {
[[ $# -ge 1 ]] || die "${FUNCNAME}() requires at least one argument"
multilib_is_native_abi && qt_use "$@" || echo "-no-${2:-$1}"
}
###### Internal functions ######
# @FUNCTION: qt4_prepare_env
# @INTERNAL
# @DESCRIPTION:
# Prepares the environment for building Qt.
qt4_prepare_env() {
# setup installation directories
# note: keep paths in sync with qmake-utils.eclass
QT4_PREFIX=${EPREFIX}/usr
QT4_HEADERDIR=${QT4_PREFIX}/include/qt4
QT4_LIBDIR=${QT4_PREFIX}/$(get_libdir)/qt4
QT4_BINDIR=${QT4_LIBDIR}/bin
QT4_PLUGINDIR=${QT4_LIBDIR}/plugins
QT4_IMPORTDIR=${QT4_LIBDIR}/imports
QT4_DATADIR=${QT4_PREFIX}/share/qt4
QT4_DOCDIR=${QT4_PREFIX}/share/doc/qt-${PV}
QT4_TRANSLATIONDIR=${QT4_DATADIR}/translations
QT4_EXAMPLESDIR=${QT4_DATADIR}/examples
QT4_DEMOSDIR=${QT4_DATADIR}/demos
QT4_SYSCONFDIR=${EPREFIX}/etc/qt4
# are these still needed?
QMAKE_LIBDIR_QT=${QT4_LIBDIR}
export XDG_CONFIG_HOME="${T}"
# can confuse qmake if set (bug 583352)
unset QMAKESPEC
}
# @FUNCTION: qt4_foreach_target_subdir
# @INTERNAL
# @DESCRIPTION:
# Executes the given command inside each directory listed in QT4_TARGET_DIRECTORIES.
qt4_foreach_target_subdir() {
local ret=0 subdir=
for subdir in ${QT4_TARGET_DIRECTORIES}; do
mkdir -p "${subdir}" || die
pushd "${subdir}" >/dev/null || die
einfo "Running $* ${subdir:+in ${subdir}}"
"$@"
((ret+=$?))
popd >/dev/null || die
done
return ${ret}
}
# @FUNCTION: qt4_symlink_tools_to_build_dir
# @INTERNAL
# @DESCRIPTION:
# Symlinks qtcore tools to BUILD_DIR,
# so that they can be used when building other modules.
qt4_symlink_tools_to_build_dir() {
local tool= tools=()
if [[ ${PN} != qtcore ]]; then
tools+=(qmake moc rcc uic)
fi
mkdir -p "${BUILD_DIR}"/bin || die
pushd "${BUILD_DIR}"/bin >/dev/null || die
for tool in "${tools[@]}"; do
[[ -e ${QT4_BINDIR}/${tool} ]] || continue
ln -s "${QT4_BINDIR}/${tool}" . || die "failed to symlink ${tool}"
done
popd >/dev/null || die
}
# @FUNCTION: qt4_qmake
# @INTERNAL
# @DESCRIPTION:
# Helper function that runs qmake in the current target subdir.
# Intended to be called by qt4_foreach_target_subdir().
qt4_qmake() {
local projectdir=${PWD/#${BUILD_DIR}/${S}}
"${BUILD_DIR}"/bin/qmake \
"${projectdir}" \
CONFIG+=nostrip \
LIBS+=-L"${QT4_LIBDIR}" \
"${myqmakeargs[@]}" \
|| die "qmake failed (${projectdir#${S}/})"
}
# @FUNCTION: qt4_install_module_qconfigs
# @INTERNAL
# @DESCRIPTION:
# Creates and installs gentoo-specific ${PN}-qconfig.{h,pri} files.
qt4_install_module_qconfigs() {
local x
if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} ]]; then
for x in QCONFIG_ADD QCONFIG_REMOVE; do
[[ -n ${!x} ]] && echo ${x}=${!x} >> "${BUILD_DIR}"/${PN}-qconfig.pri
done
insinto ${QT4_DATADIR#${EPREFIX}}/mkspecs/gentoo
doins "${BUILD_DIR}"/${PN}-qconfig.pri
fi
if [[ -n ${QCONFIG_DEFINE} ]]; then
for x in ${QCONFIG_DEFINE}; do
echo "#define ${x}" >> "${BUILD_DIR}"/gentoo-${PN}-qconfig.h
done
insinto ${QT4_HEADERDIR#${EPREFIX}}/Gentoo
doins "${BUILD_DIR}"/gentoo-${PN}-qconfig.h
fi
}
# @FUNCTION: qt4_regenerate_global_qconfigs
# @INTERNAL
# @DESCRIPTION:
# Generates Gentoo-specific qconfig.{h,pri} according to the build configuration.
# Don't call die here because dying in pkg_post{inst,rm} only makes things worse.
qt4_regenerate_global_qconfigs() {
if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${PN} == qtcore ]]; then
local x qconfig_add qconfig_remove qconfig_new
for x in "${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
[[ -f ${x} ]] || continue
qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=//p' "${x}")"
qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' "${x}")"
done
if [[ -e "${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/qconfig.pri ]]; then
# start with the qconfig.pri that qtcore installed
if ! cp "${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/qconfig.pri \
"${ROOT}${QT4_DATADIR}"/mkspecs/qconfig.pri; then
eerror "cp qconfig failed."
return 1
fi
# generate list of QT_CONFIG entries from the existing list
# including qconfig_add and excluding qconfig_remove
for x in $(sed -n 's/^QT_CONFIG +=//p' \
"${ROOT}${QT4_DATADIR}"/mkspecs/qconfig.pri) ${qconfig_add}; do
has ${x} ${qconfig_remove} || qconfig_new+=" ${x}"
done
# replace the existing QT_CONFIG list with qconfig_new
if ! sed -i -e "s/QT_CONFIG +=.*/QT_CONFIG += ${qconfig_new}/" \
"${ROOT}${QT4_DATADIR}"/mkspecs/qconfig.pri; then
eerror "Sed for QT_CONFIG failed"
return 1
fi
# create Gentoo/qconfig.h
if [[ ! -e ${ROOT}${QT4_HEADERDIR}/Gentoo ]]; then
if ! mkdir -p "${ROOT}${QT4_HEADERDIR}"/Gentoo; then
eerror "mkdir ${QT4_HEADERDIR}/Gentoo failed"
return 1
fi
fi
: > "${ROOT}${QT4_HEADERDIR}"/Gentoo/gentoo-qconfig.h
for x in "${ROOT}${QT4_HEADERDIR}"/Gentoo/gentoo-*-qconfig.h; do
[[ -f ${x} ]] || continue
cat "${x}" >> "${ROOT}${QT4_HEADERDIR}"/Gentoo/gentoo-qconfig.h
done
else
rm -f "${ROOT}${QT4_DATADIR}"/mkspecs/qconfig.pri
rm -f "${ROOT}${QT4_HEADERDIR}"/Gentoo/gentoo-qconfig.h
rmdir "${ROOT}${QT4_DATADIR}"/mkspecs \
"${ROOT}${QT4_DATADIR}" \
"${ROOT}${QT4_HEADERDIR}"/Gentoo \
"${ROOT}${QT4_HEADERDIR}" 2>/dev/null
fi
fi
}
# @FUNCTION: qt4_symlink_framework_headers
# @DESCRIPTION:
# On OS X we need to add some symlinks when frameworks are being
# used, to avoid complications with some more or less stupid packages.
qt4_symlink_framework_headers() {
if use_if_iuse aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
local frw dest f h rdir
# Some packages tend to include <Qt/...>
dodir "${QT4_HEADERDIR#${EPREFIX}}"/Qt
# Fake normal headers when frameworks are installed... eases life later
# on, make sure we use relative links though, as some ebuilds assume
# these dirs exist in src_install to add additional files
f=${QT4_HEADERDIR}
h=${QT4_LIBDIR}
while [[ -n ${f} && ${f%%/*} == ${h%%/*} ]] ; do
f=${f#*/}
h=${h#*/}
done
rdir=${h}
f="../"
while [[ ${h} == */* ]] ; do
f="${f}../"
h=${h#*/}
done
rdir="${f}${rdir}"
for frw in "${D}${QT4_LIBDIR}"/*.framework; do
[[ -e "${frw}"/Headers ]] || continue
f=$(basename ${frw})
dest="${QT4_HEADERDIR#${EPREFIX}}"/${f%.framework}
dosym "${rdir}"/${f}/Headers "${dest}"
# Link normal headers as well.
for hdr in "${D}${QT4_LIBDIR}/${f}"/Headers/*; do
h=$(basename ${hdr})
dosym "../${rdir}"/${f}/Headers/${h} \
"${QT4_HEADERDIR#${EPREFIX}}"/Qt/${h}
done
done
fi
}
# @FUNCTION: qt4_get_mkspec
# @INTERNAL
# @DESCRIPTION:
# Returns the right mkspec for the current CHOST/CXX combination.
qt4_get_mkspec() {
local spec=
case ${CHOST} in
*-linux*)
spec=linux ;;
*-darwin*)
use_if_iuse aqua &&
spec=macx || # mac with carbon/cocoa
spec=darwin ;; # darwin/mac with X11
*-freebsd*|*-dragonfly*)
spec=freebsd ;;
*-netbsd*)
spec=netbsd ;;
*-openbsd*)
spec=openbsd ;;
*-aix*)
spec=aix ;;
hppa*-hpux*)
spec=hpux ;;
ia64*-hpux*)
spec=hpuxi ;;
*-solaris*)
spec=solaris ;;
*)
die "qt4-build-multilib.eclass: unsupported CHOST '${CHOST}'" ;;
esac
case $(tc-getCXX) in
*g++*)
spec+=-g++ ;;
*clang*)
if [[ -d ${S}/mkspecs/unsupported/${spec}-clang ]]; then
spec=unsupported/${spec}-clang
else
ewarn "${spec}-clang mkspec does not exist, falling back to ${spec}-g++"
spec+=-g++
fi ;;
*icpc*)
if [[ -d ${S}/mkspecs/${spec}-icc ]]; then
spec+=-icc
else
ewarn "${spec}-icc mkspec does not exist, falling back to ${spec}-g++"
spec+=-g++
fi ;;
*)
die "qt4-build-multilib.eclass: unsupported compiler '$(tc-getCXX)'" ;;
esac
# Add -64 for 64-bit prefix profiles
if use amd64-linux || use ppc64-linux ||
use x64-macos ||
use sparc64-solaris || use x64-solaris
then
[[ -d ${S}/mkspecs/${spec}-64 ]] && spec+=-64
fi
echo ${spec}
}

View File

@ -1,139 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: qt4-r2.eclass
# @MAINTAINER:
# qt@gentoo.org
# @BLURB: Eclass for Qt4-based packages, second edition.
# @DESCRIPTION:
# This eclass contains various functions that may be useful when
# dealing with packages using Qt4 libraries. Supports only EAPIs
# 2, 3, 4, and 5. Use qmake-utils.eclass in EAPI 6 and later.
case ${EAPI} in
2|3|4|5) : ;;
6) die "qt4-r2.eclass is banned in EAPI 6 and later" ;;
*) die "qt4-r2.eclass: unsupported EAPI=${EAPI:-0}" ;;
esac
inherit base eutils qmake-utils
export XDG_CONFIG_HOME="${T}"
# @ECLASS-VARIABLE: DOCS
# @DEFAULT_UNSET
# @DESCRIPTION:
# Array containing documents passed to dodoc command.
# Paths can be absolute or relative to ${S}.
#
# Example: DOCS=( ChangeLog README "${WORKDIR}/doc_folder/" )
# @ECLASS-VARIABLE: HTML_DOCS
# @DEFAULT_UNSET
# @DESCRIPTION:
# Array containing documents passed to dohtml command.
# Paths can be absolute or relative to ${S}.
#
# Example: HTML_DOCS=( "doc/document.html" "${WORKDIR}/html_folder/" )
# @ECLASS-VARIABLE: LANGS
# @DEFAULT_UNSET
# @DESCRIPTION:
# In case your Qt4 application provides various translations, use this variable
# to specify them in order to populate "linguas_*" IUSE automatically. Make sure
# that you set this variable before inheriting qt4-r2 eclass.
#
# Example: LANGS="de el it ja"
for x in ${LANGS}; do
IUSE+=" linguas_${x}"
done
# @ECLASS-VARIABLE: LANGSLONG
# @DEFAULT_UNSET
# @DESCRIPTION:
# Same as LANGS, but this variable is for LINGUAS that must be in long format.
# Remember to set this variable before inheriting qt4-r2 eclass.
# Look at ${PORTDIR}/profiles/desc/linguas.desc for details.
#
# Example: LANGSLONG="en_GB ru_RU"
for x in ${LANGSLONG}; do
IUSE+=" linguas_${x%_*}"
done
unset x
# @ECLASS-VARIABLE: PATCHES
# @DEFAULT_UNSET
# @DESCRIPTION:
# Array variable containing all the patches to be applied. This variable
# is expected to be defined in the global scope of ebuilds. Make sure to
# specify the full path. This variable is used in src_prepare phase.
#
# Example:
# @CODE
# PATCHES=(
# "${FILESDIR}/mypatch.patch"
# "${FILESDIR}/mypatch2.patch"
# )
# @CODE
# @FUNCTION: qt4-r2_src_unpack
# @DESCRIPTION:
# Default src_unpack function for packages that depend on qt4. If you have to
# override src_unpack in your ebuild (probably you don't need to), call
# qt4-r2_src_unpack in it.
qt4-r2_src_unpack() {
debug-print-function $FUNCNAME "$@"
base_src_unpack "$@"
}
# @FUNCTION: qt4-r2_src_prepare
# @DESCRIPTION:
# Default src_prepare function for packages that depend on qt4. If you have to
# override src_prepare in your ebuild, you should call qt4-r2_src_prepare in it,
# otherwise autopatcher will not work!
qt4-r2_src_prepare() {
debug-print-function $FUNCNAME "$@"
base_src_prepare "$@"
}
# @FUNCTION: qt4-r2_src_configure
# @DESCRIPTION:
# Default src_configure function for packages that depend on qt4. If you have to
# override src_configure in your ebuild, call qt4-r2_src_configure in it.
qt4-r2_src_configure() {
debug-print-function $FUNCNAME "$@"
local project_file=$(qmake-utils_find_pro_file)
if [[ -n ${project_file} ]]; then
eqmake4 "${project_file}"
else
base_src_configure "$@"
fi
}
# @FUNCTION: qt4-r2_src_compile
# @DESCRIPTION:
# Default src_compile function for packages that depend on qt4. If you have to
# override src_compile in your ebuild (probably you don't need to), call
# qt4-r2_src_compile in it.
qt4-r2_src_compile() {
debug-print-function $FUNCNAME "$@"
base_src_compile "$@"
}
# @FUNCTION: qt4-r2_src_install
# @DESCRIPTION:
# Default src_install function for qt4-based packages. Installs compiled code,
# and documentation (via DOCS and HTML_DOCS variables).
qt4-r2_src_install() {
debug-print-function $FUNCNAME "$@"
base_src_install INSTALL_ROOT="${D}" "$@"
einstalldocs
}
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install

View File

@ -6,6 +6,7 @@
# Pacho Ramos <pacho@gentoo.org>
# @AUTHOR:
# Author: Pacho Ramos <pacho@gentoo.org>
# @SUPPORTED_EAPIS: 4 5 6 7
# @BLURB: install a doc file shown via elog messages
# @DESCRIPTION:
# An eclass for installing a README.gentoo doc file recording tips

View File

@ -6,6 +6,7 @@
# Pacho Ramos <pacho@gentoo.org>
# @AUTHOR:
# Author: Pacho Ramos <pacho@gentoo.org>
# @SUPPORTED_EAPIS: 4 5
# @BLURB: install a doc file shown via elog messages
# @DESCRIPTION:
# An eclass for installing a README.gentoo doc file recording tips

Some files were not shown because too many files have changed in this diff Show More