mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-05 17:32:09 +01:00
eclass: sync some smaller or unused changes from upstream
This commit is contained in:
parent
4e80b6423c
commit
759703f8c3
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/alternatives.eclass,v 1.18 2013/09/21 01:03:42 ottxor Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: alternatives.eclass
|
||||
# @AUTHOR:
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
# Eclass for building dev-java/ant-* packages
|
||||
#
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||
# Author Vlastimil Babka <caster@gentoo.org>
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/ant-tasks.eclass,v 1.17 2015/04/28 20:35:40 chewi Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: ant-tasks.eclass
|
||||
# @MAINTAINER:
|
||||
@ -63,12 +60,12 @@ ANT_TASK_PV="${PV}"
|
||||
if [[ ${PV} == *beta2* ]]; then
|
||||
MY_PV=${PV/_beta2/beta}
|
||||
UPSTREAM_PREFIX="http://people.apache.org/dist/ant/v1.7.1beta2/src"
|
||||
GENTOO_PREFIX="http://dev.gentoo.org/~caster/distfiles"
|
||||
GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
|
||||
ANT_TASK_PV=$(get_version_component_range 1-3)
|
||||
elif [[ ${PV} == *_rc* ]]; then
|
||||
MY_PV=${PV/_rc/RC}
|
||||
UPSTREAM_PREFIX="http://dev.gentoo.org/~caster/distfiles"
|
||||
GENTOO_PREFIX="http://dev.gentoo.org/~caster/distfiles"
|
||||
UPSTREAM_PREFIX="https://dev.gentoo.org/~caster/distfiles"
|
||||
GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
|
||||
ANT_TASK_PV=$(get_version_component_range 1-3)
|
||||
else
|
||||
# default for final releases
|
||||
@ -76,13 +73,13 @@ else
|
||||
UPSTREAM_PREFIX="mirror://apache/ant/source"
|
||||
case ${PV} in
|
||||
1.9.*)
|
||||
GENTOO_PREFIX="http://dev.gentoo.org/~tomwij/files/dist"
|
||||
GENTOO_PREFIX="https://dev.gentoo.org/~tomwij/files/dist"
|
||||
;;
|
||||
1.8.4)
|
||||
GENTOO_PREFIX="http://dev.gentoo.org/~sera/distfiles"
|
||||
GENTOO_PREFIX="https://dev.gentoo.org/~sera/distfiles"
|
||||
;;
|
||||
*)
|
||||
GENTOO_PREFIX="http://dev.gentoo.org/~caster/distfiles"
|
||||
GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.41 2015/06/07 19:22:36 pacho Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: apache-2.eclass
|
||||
# @MAINTAINER:
|
||||
@ -16,8 +16,8 @@ inherit autotools eutils flag-o-matic multilib ssl-cert user toolchain-funcs ver
|
||||
&& die "Do not use this eclass with anything else than www-servers/apache ebuilds!"
|
||||
|
||||
case ${EAPI:-0} in
|
||||
0|1|2|3)
|
||||
die "This eclass requires >=EAPI-4"
|
||||
0|1|2|3|4)
|
||||
die "This eclass requires >=EAPI-5"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -71,7 +71,7 @@ esac
|
||||
[[ -n "$GENTOO_PATCH_A" ]] || GENTOO_PATCH_A="${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2"
|
||||
|
||||
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~${GENTOO_DEVELOPER}/dist/apache/${GENTOO_PATCH_A}"
|
||||
https://dev.gentoo.org/~${GENTOO_DEVELOPER}/dist/apache/${GENTOO_PATCH_A}"
|
||||
|
||||
# @VARIABLE: IUSE_MPMS_FORK
|
||||
# @DESCRIPTION:
|
||||
@ -89,7 +89,7 @@ SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
|
||||
# built-in modules
|
||||
|
||||
IUSE_MPMS="${IUSE_MPMS_FORK} ${IUSE_MPMS_THREAD}"
|
||||
IUSE="${IUSE} debug doc ldap selinux ssl static suexec threads"
|
||||
IUSE="${IUSE} debug doc ldap libressl selinux ssl static suexec threads"
|
||||
|
||||
for module in ${IUSE_MODULES} ; do
|
||||
IUSE="${IUSE} apache2_modules_${module}"
|
||||
@ -106,7 +106,10 @@ DEPEND="dev-lang/perl
|
||||
apache2_modules_deflate? ( sys-libs/zlib )
|
||||
apache2_modules_mime? ( app-misc/mime-types )
|
||||
ldap? ( =net-nds/openldap-2* )
|
||||
ssl? ( >=dev-libs/openssl-0.9.8m )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.2:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
!=www-servers/apache-1*"
|
||||
RDEPEND+=" ${DEPEND}
|
||||
selinux? ( sec-policy/selinux-apache )"
|
||||
@ -365,7 +368,7 @@ check_upgrade() {
|
||||
eerror "(${EROOT}etc/apache2/apache2-builtin-mods) exists on your"
|
||||
eerror "system."
|
||||
eerror
|
||||
eerror "Please read http://www.gentoo.org/doc/en/apache-upgrading.xml"
|
||||
eerror "Please read https://wiki.gentoo.org/wiki/Project:Apache/Upgrading"
|
||||
eerror "for detailed information how to convert this file to the new"
|
||||
eerror "APACHE2_MODULES USE_EXPAND variable."
|
||||
eerror
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.26 2013/06/22 00:06:53 vapier Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: apache-module.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/aspell-dict.eclass,v 1.44 2014/01/05 11:39:48 pacho Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: aspell-dict.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v 1.23 2014/05/02 16:16:37 mgorny Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: autotools-multilib.eclass
|
||||
# @MAINTAINER:
|
||||
@ -21,6 +21,7 @@
|
||||
|
||||
# EAPI=4 is required for meaningful MULTILIB_USEDEP.
|
||||
case ${EAPI:-0} in
|
||||
6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";;
|
||||
4|5) ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.75 2015/06/07 12:55:46 mgorny Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: autotools-utils.eclass
|
||||
# @MAINTAINER:
|
||||
@ -89,6 +89,7 @@
|
||||
# Keep variable names synced with cmake-utils and the other way around!
|
||||
|
||||
case ${EAPI:-0} in
|
||||
6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";;
|
||||
2|3|4|5) ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
@ -1,6 +1,22 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.59 2014/07/11 08:21:58 ulm Exp $
|
||||
# $Id$
|
||||
|
||||
# DEPRECATED
|
||||
# This eclass has been deprecated and must not be used by any new
|
||||
# ebuilds or eclasses. Replacements for particular phase functions
|
||||
# in EAPI 2+:
|
||||
#
|
||||
# base_src_unpack() - default (or unpacker_src_unpack if unpacker.eclass
|
||||
# was inherited)
|
||||
# base_src_prepare() - inherit eutils, inline:
|
||||
# epatch "${PATCHES[@]}" # if PATCHES defined as array
|
||||
# epatch ${PATCHES} # if PATCHES defined as string
|
||||
# epatch_user
|
||||
# base_src_configure() - default
|
||||
# base_src_compile() - default
|
||||
# base_src_install() - default
|
||||
# base_src_install_docs() - einstalldocs from eutils.eclass
|
||||
|
||||
# @ECLASS: base.eclass
|
||||
# @MAINTAINER:
|
||||
@ -18,6 +34,7 @@ inherit eutils
|
||||
|
||||
BASE_EXPF="src_unpack src_compile src_install"
|
||||
case "${EAPI:-0}" in
|
||||
6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";;
|
||||
2|3|4|5) BASE_EXPF+=" src_prepare src_configure" ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion-r1.eclass,v 1.14 2014/09/02 15:28:05 mgorny Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: bash-completion-r1.eclass
|
||||
# @MAINTAINER:
|
||||
@ -26,7 +26,7 @@
|
||||
inherit toolchain-funcs
|
||||
|
||||
case ${EAPI:-0} in
|
||||
0|1|2|3|4|5) ;;
|
||||
0|1|2|3|4|5|6) ;;
|
||||
*) die "EAPI ${EAPI} unsupported (yet)."
|
||||
esac
|
||||
|
||||
@ -41,12 +41,13 @@ _bash-completion-r1_get_bashdir() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
|
||||
local path="$($(tc-getPKG_CONFIG) --variable=$1 bash-completion)"
|
||||
local path
|
||||
path=$($(tc-getPKG_CONFIG) --variable="${1}" bash-completion) || die
|
||||
# we need to return unprefixed, so strip from what pkg-config returns
|
||||
# to us, bug #477692
|
||||
echo "${path#${EPREFIX}}"
|
||||
else
|
||||
echo $2
|
||||
echo "${2}"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -129,6 +130,7 @@ bashcomp_alias() {
|
||||
shift
|
||||
|
||||
for f; do
|
||||
dosym "${base}" "$(_bash-completion-r1_get_bashcompdir)/${f}"
|
||||
dosym "${base}" "$(_bash-completion-r1_get_bashcompdir)/${f}" \
|
||||
|| return
|
||||
done
|
||||
}
|
||||
|
||||
@ -1,101 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion.eclass,v 1.29 2013/07/05 17:39:10 ulm Exp $
|
||||
|
||||
# DEPRECATED
|
||||
# This eclass has been superseded by bash-completion-r1 eclass.
|
||||
# Please modify your ebuilds to use that one instead.
|
||||
|
||||
# @ECLASS: bash-completion.eclass
|
||||
# @MAINTAINER:
|
||||
# shell-tools@gentoo.org.
|
||||
# @AUTHOR:
|
||||
# Original author: Aaron Walker <ka0ttic@gentoo.org>
|
||||
# @BLURB: An Interface for installing contributed bash-completion scripts
|
||||
# @DESCRIPTION:
|
||||
# Simple eclass that provides an interface for installing
|
||||
# contributed (ie not included in bash-completion proper)
|
||||
# bash-completion scripts.
|
||||
#
|
||||
# Note: this eclass has been deprecated in favor of bash-completion-r1. Please
|
||||
# use that one instead.
|
||||
|
||||
# @ECLASS-VARIABLE: BASHCOMPLETION_NAME
|
||||
# @DESCRIPTION:
|
||||
# Install the completion script with this name (see also dobashcompletion)
|
||||
|
||||
# @ECLASS-VARIABLE: BASHCOMPFILES
|
||||
# @DESCRIPTION:
|
||||
# Space delimited list of files to install if dobashcompletion is called without
|
||||
# arguments.
|
||||
|
||||
inherit eutils
|
||||
|
||||
EXPORT_FUNCTIONS pkg_postinst
|
||||
|
||||
IUSE="bash-completion"
|
||||
|
||||
# Allow eclass to be inherited by eselect without a circular dependency
|
||||
if [[ ${CATEGORY}/${PN} != app-admin/eselect ]]; then
|
||||
RDEPEND="bash-completion? ( app-admin/eselect )"
|
||||
fi
|
||||
PDEPEND="bash-completion? ( app-shells/bash-completion )"
|
||||
|
||||
# @FUNCTION: dobashcompletion
|
||||
# @USAGE: [file] [new_file]
|
||||
# @DESCRIPTION:
|
||||
# The first argument is the location of the bash-completion script to install,
|
||||
# and is required if BASHCOMPFILES is not set. The second argument is the name
|
||||
# the script will be installed as. If BASHCOMPLETION_NAME is set, it overrides
|
||||
# the second argument. If no second argument is given and BASHCOMPLETION_NAME
|
||||
# is not set, it will default to ${PN}.
|
||||
dobashcompletion() {
|
||||
local f
|
||||
|
||||
eqawarn "bash-completion.eclass has been deprecated."
|
||||
eqawarn "Please update your ebuilds to use bash-completion-r1 instead."
|
||||
|
||||
if [[ -z ${1} && -z ${BASHCOMPFILES} ]]; then
|
||||
die "Usage: dobashcompletion [file] [new file]"
|
||||
fi
|
||||
|
||||
if use bash-completion; then
|
||||
insinto /usr/share/bash-completion
|
||||
if [[ -n ${1} ]]; then
|
||||
[[ -z ${BASHCOMPLETION_NAME} ]] && BASHCOMPLETION_NAME="${2:-${PN}}"
|
||||
newins "${1}" "${BASHCOMPLETION_NAME}" || die "Failed to install ${1}"
|
||||
else
|
||||
set -- ${BASHCOMPFILES}
|
||||
for f in "$@"; do
|
||||
if [[ -e ${f} ]]; then
|
||||
doins "${f}" || die "Failed to install ${f}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: bash-completion_pkg_postinst
|
||||
# @DESCRIPTION:
|
||||
# The bash-completion pkg_postinst function, which is exported
|
||||
bash-completion_pkg_postinst() {
|
||||
local f
|
||||
|
||||
if use bash-completion ; then
|
||||
elog "The following bash-completion scripts have been installed:"
|
||||
if [[ -n ${BASHCOMPLETION_NAME} ]]; then
|
||||
elog " ${BASHCOMPLETION_NAME}"
|
||||
else
|
||||
set -- ${BASHCOMPFILES}
|
||||
for f in "$@"; do
|
||||
elog " $(basename ${f})"
|
||||
done
|
||||
fi
|
||||
elog
|
||||
elog "To enable command-line completion on a per-user basis run:"
|
||||
elog " eselect bashcomp enable <script>"
|
||||
elog
|
||||
elog "To enable command-line completion system-wide run:"
|
||||
elog " eselect bashcomp enable --global <script>"
|
||||
fi
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.12 2013/08/09 16:26:59 aballier Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: bsdmk.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.21 2014/11/13 07:15:54 ulm Exp $
|
||||
# $Id$
|
||||
#
|
||||
# @ECLASS: bzr.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/cannadic.eclass,v 1.17 2012/09/15 16:16:53 zmedico Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: cannadic.eclass
|
||||
# @AUTHOR:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/cdrom.eclass,v 1.6 2014/07/11 08:21:58 ulm Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: cdrom.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/chromium.eclass,v 1.12 2015/06/04 18:49:42 kensington Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: chromium.eclass
|
||||
# @MAINTAINER:
|
||||
@ -33,7 +33,11 @@ chromium_suid_sandbox_check_kernel_config() {
|
||||
ERROR_NET_NS="NET_NS is required for sandbox to work"
|
||||
ERROR_USER_NS="USER_NS is required for sandbox to work"
|
||||
ERROR_SECCOMP_FILTER="SECCOMP_FILTER is required for sandbox to work"
|
||||
CONFIG_CHECK="~PID_NS ~NET_NS ~SECCOMP_FILTER ~USER_NS"
|
||||
# Warn if the kernel does not support features needed for the browser to work
|
||||
# (bug #552576, bug #556286).
|
||||
ERROR_ADVISE_SYSCALLS="CONFIG_ADVISE_SYSCALLS is required for the renderer (bug #552576)"
|
||||
ERROR_COMPAT_VDSO="CONFIG_COMPAT_VDSO causes segfaults (bug #556286)"
|
||||
CONFIG_CHECK="~PID_NS ~NET_NS ~SECCOMP_FILTER ~USER_NS ~ADVISE_SYSCALLS ~!COMPAT_VDSO"
|
||||
check_extra_config
|
||||
fi
|
||||
}
|
||||
@ -136,7 +140,7 @@ chromium_pkg_postinst() {
|
||||
elog "Depending on your desktop environment, you may need"
|
||||
elog "to install additional packages to get icons on the Downloads page."
|
||||
elog
|
||||
elog "For KDE, the required package is kde-apps/oxygen-icons."
|
||||
elog "For KDE, the required package is kde-frameworks/oxygen-icons."
|
||||
elog
|
||||
elog "For other desktop environments, try one of the following:"
|
||||
elog " - x11-themes/gnome-icon-theme"
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/clutter.eclass,v 1.7 2012/09/27 10:42:17 tetromino Exp $
|
||||
|
||||
# @ECLASS: clutter.eclass
|
||||
# @MAINTAINER:
|
||||
# GNOME Herd <gnome@gentoo.org>
|
||||
# @AUTHOR:
|
||||
# Nirbheek Chauhan <nirbheek@gentoo.org>
|
||||
# @BLURB: Sets SRC_URI, LICENSE, etc and exports src_install
|
||||
|
||||
inherit versionator
|
||||
|
||||
HOMEPAGE="http://www.clutter-project.org/"
|
||||
|
||||
RV=($(get_version_components))
|
||||
SRC_URI="http://www.clutter-project.org/sources/${PN}/${RV[0]}.${RV[1]}/${P}.tar.bz2"
|
||||
|
||||
# All official clutter packages use LGPL-2.1 or later
|
||||
LICENSE="${LICENSE:-LGPL-2.1+}"
|
||||
|
||||
# This will be used by all clutter packages
|
||||
DEPEND="virtual/pkgconfig"
|
||||
|
||||
# @ECLASS-VARIABLE: CLUTTER_LA_PUNT
|
||||
# @DESCRIPTION:
|
||||
# Set to anything except 'no' to remove *all* .la files before installing.
|
||||
# Not to be used without due consideration, sometimes .la files *are* needed.
|
||||
CLUTTER_LA_PUNT="${CLUTTER_LA_PUNT:-"no"}"
|
||||
|
||||
# @ECLASS-VARIABLE: DOCS
|
||||
# @DESCRIPTION:
|
||||
# This variable holds relative paths of files to be dodoc-ed.
|
||||
# By default, it contains the standard list of autotools doc files
|
||||
DOCS="${DOCS:-AUTHORS ChangeLog NEWS README TODO}"
|
||||
|
||||
# @ECLASS-VARIABLE: EXAMPLES
|
||||
# @DESCRIPTION:
|
||||
# This variable holds relative paths of files to be added as examples when the
|
||||
# "examples" USE-flag exists, and is switched on. Bash expressions can be used
|
||||
# since the variable is eval-ed before substitution. Empty by default.
|
||||
EXAMPLES="${EXAMPLES:-""}"
|
||||
|
||||
# @FUNCTION: clutter_src_install
|
||||
# @DESCRIPTION:
|
||||
# Runs emake install, dodoc, and installs examples
|
||||
clutter_src_install() {
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
dodoc ${DOCS} || die "dodoc failed"
|
||||
|
||||
# examples
|
||||
if has examples ${IUSE} && use examples; then
|
||||
insinto /usr/share/doc/${PF}/examples
|
||||
|
||||
# We use eval to be able to use globs and other bash expressions
|
||||
for example in $(eval echo ${EXAMPLES}); do
|
||||
# If directory
|
||||
if [[ ${example: -1} == "/" ]]; then
|
||||
doins -r ${example} || die "doins ${example} failed!"
|
||||
else
|
||||
doins ${example} || die "doins ${example} failed!"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Delete all .la files
|
||||
if [[ "${CLUTTER_LA_PUNT}" != "no" ]]; then
|
||||
find "${D}" -name '*.la' -exec rm -f '{}' + || die
|
||||
fi
|
||||
}
|
||||
|
||||
EXPORT_FUNCTIONS src_install
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-multilib.eclass,v 1.7 2014/05/09 10:48:59 mgorny Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: cmake-multilib.eclass
|
||||
# @MAINTAINER:
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
# EAPI=5 is required for meaningful MULTILIB_USEDEP.
|
||||
case ${EAPI:-0} in
|
||||
5) ;;
|
||||
5|6) ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-3.eclass,v 1.1 2014/12/19 06:52:10 gienah Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: common-lisp-3.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-common-2.eclass,v 1.5 2012/06/02 19:16:31 zmedico Exp $
|
||||
# $Id$
|
||||
#
|
||||
# Author Matthew Kennedy <mkennedy@gentoo.org>
|
||||
#
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-common-3.eclass,v 1.4 2012/06/02 19:16:31 zmedico Exp $
|
||||
# $Id$
|
||||
#
|
||||
# Author Matthew Kennedy <mkennedy@gentoo.org>
|
||||
#
|
||||
@ -32,7 +32,7 @@ do-debian-credits() {
|
||||
# The following `impl-*-timestamp-hack' functions SHOULD NOT be used
|
||||
# outside of this eclass.
|
||||
|
||||
# Bug http://bugs.gentoo.org/show_bug.cgi?id=16162 should remove the
|
||||
# Bug https://bugs.gentoo.org/show_bug.cgi?id=16162 should remove the
|
||||
# need for this hack.
|
||||
|
||||
impl-save-timestamp-hack() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-common.eclass,v 1.15 2012/06/02 19:16:31 zmedico Exp $
|
||||
# $Id$
|
||||
#
|
||||
# Author Matthew Kennedy <mkennedy@gentoo.org>
|
||||
#
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp.eclass,v 1.14 2011/12/27 17:55:12 fauli Exp $
|
||||
# $Id$
|
||||
#
|
||||
# Author Matthew Kennedy <mkennedy@gentoo.org>
|
||||
#
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/confutils.eclass,v 1.23 2012/09/15 16:16:53 zmedico Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: confutils.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/cron.eclass,v 1.16 2013/09/05 10:44:22 zx2c4 Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: cron
|
||||
# @ECLASS: cron.eclass
|
||||
# @MAINTAINER:
|
||||
# cron-bugs@gentoo.org
|
||||
# @AUTHOR:
|
||||
@ -156,6 +156,6 @@ cron_pkg_postinst() {
|
||||
|
||||
einfo "You may wish to read the Gentoo Linux Cron Guide, which can be"
|
||||
einfo "found online at:"
|
||||
einfo " http://www.gentoo.org/doc/en/cron-guide.xml"
|
||||
einfo " https://www.gentoo.org/doc/en/cron-guide.xml"
|
||||
echo
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/cuda.eclass,v 1.7 2015/05/25 10:07:33 jlec Exp $
|
||||
# $Id$
|
||||
|
||||
inherit flag-o-matic toolchain-funcs versionator
|
||||
|
||||
@ -16,6 +16,8 @@ inherit flag-o-matic toolchain-funcs versionator
|
||||
# @EXAMPLE:
|
||||
# inherit cuda
|
||||
|
||||
if [[ -z ${_CUDA_ECLASS} ]]; then
|
||||
|
||||
# @ECLASS-VARIABLE: NVCCFLAGS
|
||||
# @DESCRIPTION:
|
||||
# nvcc compiler flags (see nvcc --help), which should be used like
|
||||
@ -40,6 +42,8 @@ inherit flag-o-matic toolchain-funcs versionator
|
||||
# -> --compiler-bindir="/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"
|
||||
# @CODE
|
||||
cuda_gccdir() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local gcc_bindir ver args="" flag ret
|
||||
|
||||
# Currently we only support the gnu compiler suite
|
||||
@ -96,6 +100,8 @@ cuda_gccdir() {
|
||||
# Correct NVCCFLAGS by adding the necessary reference to gcc bindir and
|
||||
# passing CXXFLAGS to underlying compiler without disturbing nvcc.
|
||||
cuda_sanitize() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local rawldflags=$(raw-ldflags)
|
||||
# Be verbose if wanted
|
||||
[[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v"
|
||||
@ -114,6 +120,8 @@ cuda_sanitize() {
|
||||
# @DESCRIPTION:
|
||||
# Call cuda_src_prepare for EAPIs not supporting src_prepare
|
||||
cuda_pkg_setup() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
cuda_src_prepare
|
||||
}
|
||||
|
||||
@ -121,14 +129,18 @@ cuda_pkg_setup() {
|
||||
# @DESCRIPTION:
|
||||
# Sanitise and export NVCCFLAGS by default
|
||||
cuda_src_prepare() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
cuda_sanitize
|
||||
}
|
||||
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
0|1)
|
||||
EXPORT_FUNCTIONS pkg_setup ;;
|
||||
2|3|4|5)
|
||||
2|3|4|5|6)
|
||||
EXPORT_FUNCTIONS src_prepare ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
_CUDA_ECLASS=1
|
||||
fi
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.84 2014/07/11 08:21:58 ulm Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: cvs.eclass
|
||||
# @MAINTAINER:
|
||||
@ -566,7 +566,7 @@ cvs_src_unpack() {
|
||||
# Implement some of base_src_unpack's functionality; note however
|
||||
# that base.eclass may not have been inherited!
|
||||
if [[ -n ${PATCHES} ]] ; then
|
||||
debug-print "${FUNCNAME}: PATCHES=${PATCHES,} S=${S}, autopatching"
|
||||
debug-print "${FUNCNAME}: PATCHES=${PATCHES}, S=${S}, autopatching"
|
||||
cd "${S}"
|
||||
epatch ${PATCHES}
|
||||
# Make sure we don't try to apply patches more than once,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.18 2015/01/01 21:09:28 slyfox Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: darcs.eclass
|
||||
# @MAINTAINER:
|
||||
@ -126,7 +126,7 @@ darcs_fetch() {
|
||||
|
||||
# in case EDARCS_DARCS_DIR is a symlink to a dir, get the real
|
||||
# dir's path, otherwise addwrite() doesn't work.
|
||||
pushd .
|
||||
pushd . || die
|
||||
cd -P "${EDARCS_TOP_DIR}" > /dev/null
|
||||
EDARCS_TOP_DIR="`/bin/pwd`"
|
||||
|
||||
@ -159,7 +159,7 @@ darcs_fetch() {
|
||||
export EDARCS_PATCHCOUNT=$(darcs_patchcount)
|
||||
einfo " patches in repo: ${EDARCS_PATCHCOUNT}"
|
||||
|
||||
popd
|
||||
popd || die
|
||||
}
|
||||
|
||||
# @FUNCTION: darcs_src_unpack
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v 1.12 2014/08/08 17:57:28 ottxor Exp $
|
||||
# $Id$
|
||||
# This is a common location for functions that aid the use of sys-libs/db
|
||||
#
|
||||
# Bugs: maintainer-needed@gentoo.org
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.49 2013/07/21 09:23:45 pacho Exp $
|
||||
# This is a common location for functions used in the sys-libs/db ebuilds
|
||||
#
|
||||
# Bugs: maintainer-needed@gentoo.org
|
||||
# $Id$
|
||||
|
||||
inherit eutils multilib
|
||||
# @ECLASS: db.eclass
|
||||
# @MAINTAINER:
|
||||
# base-system@gentoo.org
|
||||
# @BLURB: Internal eclass used by sys-libs/db ebuilds
|
||||
|
||||
inherit eutils multilib multiprocessing
|
||||
|
||||
IUSE="doc test examples"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.47 2012/04/20 07:22:47 patrick Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: depend.apache.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.35 2015/06/18 14:22:59 grknight Exp $
|
||||
# $Id$
|
||||
|
||||
# @DEAD
|
||||
# @ECLASS: depend.php.eclass
|
||||
# @MAINTAINER:
|
||||
# Gentoo PHP team <php-bugs@gentoo.org>
|
||||
@ -14,33 +15,12 @@
|
||||
# This eclass provides functions that allow ebuilds to depend on php5 and check
|
||||
# for specific PHP features, SAPIs etc. Also provides dodoc-php wrapper to install
|
||||
# documentation for PHP packages to php-specific location.
|
||||
# This eclass is deprecated and is set to be removed 30 days after bug 552836 is resolved
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
# PHP5-only depend functions
|
||||
|
||||
# @FUNCTION: need_php5_cli
|
||||
# @DESCRIPTION:
|
||||
# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5
|
||||
# with cli SAPI.
|
||||
need_php5_cli() {
|
||||
eqawarn "(need_php5_cli) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
DEPEND="${DEPEND} =dev-lang/php-5*"
|
||||
RDEPEND="${RDEPEND} =dev-lang/php-5*"
|
||||
PHP_VERSION="5"
|
||||
}
|
||||
|
||||
# @FUNCTION: need_php5_httpd
|
||||
# @DESCRIPTION:
|
||||
# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5
|
||||
# with either cgi or apache2 SAPI.
|
||||
need_php5_httpd() {
|
||||
eqawarn "(need_php5_httpd) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
DEPEND="${DEPEND} =virtual/httpd-php-5*"
|
||||
RDEPEND="${RDEPEND} =virtual/httpd-php-5*"
|
||||
PHP_VERSION="5"
|
||||
}
|
||||
|
||||
# @FUNCTION: need_php5
|
||||
# @DESCRIPTION:
|
||||
# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5
|
||||
@ -72,16 +52,6 @@ uses_php5() {
|
||||
|
||||
# general PHP depend functions
|
||||
|
||||
# @FUNCTION: need_php_cli
|
||||
# @DESCRIPTION:
|
||||
# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP
|
||||
# (any version) with cli SAPI.
|
||||
need_php_cli() {
|
||||
eqawarn "(need_php_cli) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
DEPEND="${DEPEND} dev-lang/php"
|
||||
RDEPEND="${RDEPEND} dev-lang/php"
|
||||
}
|
||||
|
||||
# @FUNCTION: need_php_httpd
|
||||
# @DESCRIPTION:
|
||||
# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP
|
||||
@ -101,20 +71,6 @@ need_php() {
|
||||
PHP_SHARED_CAT="php"
|
||||
}
|
||||
|
||||
# @FUNCTION: need_php_by_category
|
||||
# @DESCRIPTION:
|
||||
# Set this after setting DEPEND/RDEPEND in your ebuild to depend on PHP version
|
||||
# determined by ${CATEGORY} - any PHP version or PHP5 for dev-php or
|
||||
# dev-php5, respectively.
|
||||
need_php_by_category() {
|
||||
eqawarn "(need_php_by_category) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
case "${CATEGORY}" in
|
||||
dev-php) need_php ;;
|
||||
*) die "Version of PHP required by packages in category ${CATEGORY} unknown"
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
# @FUNCTION: has_php
|
||||
# @DESCRIPTION:
|
||||
# Call this function from your pkg_setup, src_compile, src_install etc. if you
|
||||
@ -133,50 +89,6 @@ has_php() {
|
||||
uses_php${PHP_VERSION}
|
||||
}
|
||||
|
||||
# @FUNCTION: require_php_sapi_from
|
||||
# @USAGE: <list of SAPIs>
|
||||
# @DESCRIPTION:
|
||||
# Call this function from pkg_setup if your package only works with
|
||||
# specific SAPI(s) and specify a list of PHP SAPI USE flags that are
|
||||
# required (one or more from cli, cgi, apache2) as arguments.
|
||||
# Returns if any of the listed SAPIs have been installed, dies if none
|
||||
# of them is available.
|
||||
#
|
||||
# Unfortunately, if you want to be really sure that the required SAPI is
|
||||
# provided by PHP, you will have to use this function or similar ones (like
|
||||
# require_php_cli or require_php_cgi) in pkg_setup until we are able to
|
||||
# depend on USE flags being enabled. The above described need_php[45]_cli
|
||||
# and need_php[45]_httpd functions cannot guarantee these requirements.
|
||||
# See Bug 2272 for details.
|
||||
require_php_sapi_from() {
|
||||
eqawarn "(require_php_sapi_from) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
has_php
|
||||
|
||||
local has_sapi="0"
|
||||
local x
|
||||
|
||||
einfo "Checking for compatible SAPI(s)"
|
||||
|
||||
for x in $@ ; do
|
||||
if built_with_use =${PHP_PKG} ${x} ; then
|
||||
einfo " Discovered compatible SAPI ${x}"
|
||||
has_sapi="1"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "${has_sapi}" == "1" ]] ; then
|
||||
return
|
||||
fi
|
||||
|
||||
eerror
|
||||
eerror "${PHP_PKG} needs to be re-installed with one of the following"
|
||||
eerror "USE flags enabled:"
|
||||
eerror
|
||||
eerror " $@"
|
||||
eerror
|
||||
die "No compatible PHP SAPIs found"
|
||||
}
|
||||
|
||||
# @FUNCTION: require_php_with_use
|
||||
# @USAGE: <list of USE flags>
|
||||
# @DESCRIPTION:
|
||||
@ -246,101 +158,6 @@ require_php_with_use() {
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: require_php_with_any_use
|
||||
# @USAGE: <list of USE flags>
|
||||
# @DESCRIPTION:
|
||||
# Call this function from pkg_setup if your package requires PHP compiled with
|
||||
# any of specified USE flags. Returns if any of the listed USE flags are enabled.
|
||||
# Dies if all of the listed USE flags are disabled.
|
||||
require_php_with_any_use() {
|
||||
eqawarn "(require_php_with_any_use) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
has_php
|
||||
|
||||
local missing_use=""
|
||||
local x
|
||||
|
||||
einfo "Checking for required PHP feature(s) ..."
|
||||
|
||||
for x in $@ ; do
|
||||
if built_with_use =${PHP_PKG} ${x} ; then
|
||||
einfo " USE flag ${x} is enabled, ok ..."
|
||||
return
|
||||
else
|
||||
missing_use="${missing_use} ${x}"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -z "${missing_use}" ]] ; then
|
||||
if [[ -z "${PHPCHECKNODIE}" ]] ; then
|
||||
return
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "${PHPCHECKNODIE}" ]] ; then
|
||||
eerror
|
||||
eerror "${PHP_PKG} needs to be re-installed with any of the following"
|
||||
eerror "USE flags enabled:"
|
||||
eerror
|
||||
eerror " $@"
|
||||
eerror
|
||||
die "Missing PHP USE flags found"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# ========================================================================
|
||||
# has_*() functions
|
||||
#
|
||||
# These functions return 0 if the condition is satisfied, 1 otherwise
|
||||
# ========================================================================
|
||||
|
||||
# @FUNCTION: has_zts
|
||||
# @DESCRIPTION:
|
||||
# Check if our PHP was compiled with ZTS (Zend Thread Safety) enabled.
|
||||
# @RETURN: 0 if true, 1 otherwise
|
||||
has_zts() {
|
||||
eqawarn "(has_zts) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
has_php
|
||||
|
||||
if built_with_use =${PHP_PKG} apache2 threads ; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
# @FUNCTION: has_debug
|
||||
# @DESCRIPTION:
|
||||
# Check if our PHP was built with debug support enabled.
|
||||
# @RETURN: 0 if true, 1 otherwise
|
||||
has_debug() {
|
||||
eqawarn "(has_debug) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
has_php
|
||||
|
||||
if built_with_use =${PHP_PKG} debug ; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
# @FUNCTION: has_concurrentmodphp
|
||||
# @DESCRIPTION:
|
||||
# Check if our PHP was built with the concurrentmodphp support enabled.
|
||||
# @RETURN: 0 if true, 1 otherwise
|
||||
has_concurrentmodphp() {
|
||||
eqawarn "(has_concurrentmodphp) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
has_php
|
||||
|
||||
if built_with_use =${PHP_PKG} apache2 concurrentmodphp ; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
# ========================================================================
|
||||
# require_*() functions
|
||||
@ -348,68 +165,6 @@ has_concurrentmodphp() {
|
||||
# These functions die() if PHP was built without the required features
|
||||
# ========================================================================
|
||||
|
||||
# @FUNCTION: require_pdo
|
||||
# @DESCRIPTION:
|
||||
# Require a PHP built with PDO support (PHP5 only).
|
||||
# This function is now redundant and DEPRECATED since
|
||||
# pdo-external use flag and pecl-pdo-* ebuilds were removed.
|
||||
# You should use require_php_with_use pdo instead now.
|
||||
# @RETURN: die if feature is missing
|
||||
require_pdo() {
|
||||
eqawarn "(require_pdo) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
has_php
|
||||
|
||||
# Was PHP5 compiled with internal PDO support?
|
||||
if built_with_use =${PHP_PKG} pdo ; then
|
||||
return
|
||||
else
|
||||
eerror
|
||||
eerror "No PDO extension for PHP found."
|
||||
eerror "Please note that PDO only exists for PHP 5."
|
||||
eerror "Please install a PDO extension for PHP 5."
|
||||
eerror "You must install >=dev-lang/php-5.1 with USE=\"pdo\"."
|
||||
eerror
|
||||
die "No PDO extension for PHP 5 found"
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: require_php_cli
|
||||
# @DESCRIPTION:
|
||||
# Determines which installed PHP version has the CLI SAPI enabled.
|
||||
# Useful for PEAR stuff, or anything which needs to run PHP script
|
||||
# depending on the CLI SAPI.
|
||||
# @RETURN: die if feature is missing
|
||||
require_php_cli() {
|
||||
eqawarn "(require_php_cli) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
# If PHP_PKG is set, then we have remembered our PHP settings
|
||||
# from last time
|
||||
if [[ -n ${PHP_PKG} ]] ; then
|
||||
return
|
||||
fi
|
||||
|
||||
local PHP_PACKAGE_FOUND=""
|
||||
|
||||
if has_version '=dev-lang/php-5*' ; then
|
||||
PHP_PACKAGE_FOUND="1"
|
||||
pkg="$(best_version '=dev-lang/php-5*')"
|
||||
if built_with_use =${pkg} cli ; then
|
||||
PHP_VERSION="5"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z ${PHP_PACKAGE_FOUND} ]] ; then
|
||||
die "Unable to find an installed dev-lang/php package"
|
||||
fi
|
||||
|
||||
if [[ -z ${PHP_VERSION} ]] ; then
|
||||
die "No PHP CLI installed. Re-emerge dev-lang/php with USE=cli."
|
||||
fi
|
||||
|
||||
# If we get here, then PHP_VERSION tells us which version of PHP we
|
||||
# want to use
|
||||
uses_php${PHP_VERSION}
|
||||
}
|
||||
|
||||
# @FUNCTION: require_php_cgi
|
||||
# @DESCRIPTION:
|
||||
# Determines which installed PHP version has the CGI SAPI enabled.
|
||||
@ -445,103 +200,12 @@ require_php_cgi() {
|
||||
uses_php${PHP_VERSION}
|
||||
}
|
||||
|
||||
# @FUNCTION: require_sqlite
|
||||
# @DESCRIPTION:
|
||||
# Require a PHP built with SQLite support
|
||||
# @RETURN: die if feature is missing
|
||||
require_sqlite() {
|
||||
eqawarn "(require_sqlite) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
has_php
|
||||
|
||||
# Has our PHP been built with SQLite support?
|
||||
if built_with_use =${PHP_PKG} sqlite ; then
|
||||
return
|
||||
fi
|
||||
|
||||
# If we get here, then we don't have any SQLite support for PHP installed
|
||||
eerror
|
||||
eerror "No SQLite extension for PHP found."
|
||||
eerror "Please install an SQLite extension for PHP,"
|
||||
eerror "this is done best by simply adding the"
|
||||
eerror "'sqlite' USE flag when emerging dev-lang/php."
|
||||
eerror
|
||||
die "No SQLite extension for PHP found"
|
||||
}
|
||||
|
||||
# @FUNCTION: require_gd
|
||||
# @DESCRIPTION:
|
||||
# Require a PHP built with GD support
|
||||
# @RETURN: die if feature is missing
|
||||
require_gd() {
|
||||
eqawarn "(require_gd) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
has_php
|
||||
|
||||
# Do we have the internal GD support installed?
|
||||
if built_with_use =${PHP_PKG} gd ; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Ok, maybe GD was built using the external library support?
|
||||
if built_with_use =${PHP_PKG} gd-external ; then
|
||||
return
|
||||
fi
|
||||
|
||||
# If we get here, then we have no GD support
|
||||
eerror
|
||||
eerror "No GD support for PHP found."
|
||||
eerror "Please install the GD support for PHP,"
|
||||
eerror "you must install dev-lang/php with either"
|
||||
eerror "the 'gd' or the 'gd-external' USE flags"
|
||||
eerror "turned on."
|
||||
eerror
|
||||
die "No GD support found for PHP"
|
||||
}
|
||||
|
||||
# ========================================================================
|
||||
# Misc functions
|
||||
#
|
||||
# These functions provide miscellaneous checks and functionality.
|
||||
# ========================================================================
|
||||
|
||||
# @FUNCTION: php_binary_extension
|
||||
# @DESCRIPTION:
|
||||
# Executes some checks needed when installing a binary PHP extension.
|
||||
php_binary_extension() {
|
||||
eqawarn "(php_binary_extension) Deprecated function call. Set to be removed on 2015-07-17"
|
||||
has_php
|
||||
|
||||
local PUSE_ENABLED=""
|
||||
|
||||
# Binary extensions do not support the change of PHP
|
||||
# API version, so they can't be installed when USE flags
|
||||
# are enabled which change the PHP API version, they also
|
||||
# don't provide correctly versioned symbols for our use
|
||||
|
||||
if has_debug ; then
|
||||
eerror
|
||||
eerror "You cannot install binary PHP extensions"
|
||||
eerror "when the 'debug' USE flag is enabled!"
|
||||
eerror "Please reemerge dev-lang/php with the"
|
||||
eerror "'debug' USE flag turned off."
|
||||
eerror
|
||||
PUSE_ENABLED="1"
|
||||
fi
|
||||
|
||||
if has_concurrentmodphp ; then
|
||||
eerror
|
||||
eerror "You cannot install binary PHP extensions when"
|
||||
eerror "the 'concurrentmodphp' USE flag is enabled!"
|
||||
eerror "Please reemerge dev-lang/php with the"
|
||||
eerror "'concurrentmodphp' USE flag turned off."
|
||||
eerror
|
||||
PUSE_ENABLED="1"
|
||||
fi
|
||||
|
||||
if [[ -n ${PUSE_ENABLED} ]] ; then
|
||||
die "'debug' and/or 'concurrentmodphp' USE flags turned on!"
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: dodoc-php
|
||||
# @USAGE: <list of docs>
|
||||
# @DESCRIPTION:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.85 2014/11/20 15:32:09 mgorny Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: distutils.eclass
|
||||
# @MAINTAINER:
|
||||
@ -18,6 +18,9 @@ fi
|
||||
inherit multilib
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
6)
|
||||
die "${ECLASS}.eclass is banned in EAPI ${EAPI}"
|
||||
;;
|
||||
0|1)
|
||||
EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
|
||||
;;
|
||||
|
||||
143
sdk_container/src/third_party/portage-stable/eclass/dotnet.eclass
vendored
Normal file
143
sdk_container/src/third_party/portage-stable/eclass/dotnet.eclass
vendored
Normal file
@ -0,0 +1,143 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: dotnet.eclass
|
||||
# @MAINTAINER: cynede@gentoo.org
|
||||
# @BLURB: common settings and functions for mono and dotnet related packages
|
||||
# @DESCRIPTION:
|
||||
# The dotnet eclass contains common environment settings that are useful for
|
||||
# dotnet packages. Currently, it provides no functions, just exports
|
||||
# MONO_SHARED_DIR and sets LC_ALL in order to prevent errors during compilation
|
||||
# of dotnet packages.
|
||||
|
||||
case ${EAPI:-0} in
|
||||
0) die "this eclass doesn't support EAPI 0" ;;
|
||||
1|2|3) ;;
|
||||
*) ;; #if [[ ${USE_DOTNET} ]]; then REQUIRED_USE="|| (${USE_DOTNET})"; fi;;
|
||||
esac
|
||||
|
||||
inherit eutils versionator mono-env
|
||||
|
||||
# @ECLASS-VARIABLE: USE_DOTNET
|
||||
# @DESCRIPTION:
|
||||
# Use flags added to IUSE
|
||||
|
||||
DEPEND+=" dev-lang/mono"
|
||||
|
||||
# SET default use flags according on DOTNET_TARGETS
|
||||
for x in ${USE_DOTNET}; do
|
||||
case ${x} in
|
||||
net45) if [[ ${DOTNET_TARGETS} == *net45* ]]; then IUSE+=" +net45"; else IUSE+=" net45"; fi;;
|
||||
net40) if [[ ${DOTNET_TARGETS} == *net40* ]]; then IUSE+=" +net40"; else IUSE+=" net40"; fi;;
|
||||
net35) if [[ ${DOTNET_TARGETS} == *net35* ]]; then IUSE+=" +net35"; else IUSE+=" net35"; fi;;
|
||||
net20) if [[ ${DOTNET_TARGETS} == *net20* ]]; then IUSE+=" +net20"; else IUSE+=" net20"; fi;;
|
||||
esac
|
||||
done
|
||||
|
||||
# @FUNCTION: dotnet_pkg_setup
|
||||
# @DESCRIPTION:
|
||||
# This function set FRAMEWORK.
|
||||
dotnet_pkg_setup() {
|
||||
for x in ${USE_DOTNET} ; do
|
||||
case ${x} in
|
||||
net45) if use net45; then F="4.5"; fi;;
|
||||
net40) if use net40; then F="4.0"; fi;;
|
||||
net35) if use net35; then F="3.5"; fi;;
|
||||
net20) if use net20; then F="2.0"; fi;;
|
||||
esac
|
||||
if [[ -z ${FRAMEWORK} ]]; then
|
||||
if [[ ${F} ]]; then
|
||||
FRAMEWORK="${F}";
|
||||
fi
|
||||
else
|
||||
version_is_at_least "${F}" "${FRAMEWORK}" || FRAMEWORK="${F}"
|
||||
fi
|
||||
done
|
||||
if [[ -z ${FRAMEWORK} ]]; then
|
||||
FRAMEWORK="4.0"
|
||||
fi
|
||||
einfo " -- USING .NET ${FRAMEWORK} FRAMEWORK -- "
|
||||
}
|
||||
|
||||
# >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
|
||||
# shared dir to ${T} so that ${T}/.wapi can be used during the install process.
|
||||
export MONO_SHARED_DIR="${T}"
|
||||
|
||||
# Building mono, nant and many other dotnet packages is known to fail if LC_ALL
|
||||
# variable is not set to C. To prevent this all mono related packages will be
|
||||
# build with LC_ALL=C (see bugs #146424, #149817)
|
||||
export LC_ALL=C
|
||||
|
||||
# Monodevelop-using applications need this to be set or they will try to create config
|
||||
# files in the user's ~ dir.
|
||||
|
||||
export XDG_CONFIG_HOME="${T}"
|
||||
|
||||
# Fix bug 83020:
|
||||
# "Access Violations Arise When Emerging Mono-Related Packages with MONO_AOT_CACHE"
|
||||
|
||||
unset MONO_AOT_CACHE
|
||||
|
||||
# @FUNCTION: exbuild
|
||||
# @DESCRIPTION:
|
||||
# Run xbuild with Release configuration and configurated FRAMEWORK.
|
||||
exbuild() {
|
||||
elog "xbuild ""$@"" /p:Configuration=Release /tv:4.0 /p:TargetFrameworkVersion=v""${FRAMEWORK}"" || die"
|
||||
xbuild "$@" /p:Configuration=Release /tv:4.0 /p:TargetFrameworkVersion=v"${FRAMEWORK}" || die
|
||||
}
|
||||
|
||||
# @FUNCTION: egacinstall
|
||||
# @DESCRIPTION:
|
||||
# Install package to GAC.
|
||||
egacinstall() {
|
||||
use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
|
||||
gacutil -i "${1}" \
|
||||
-root "${ED}"/usr/$(get_libdir) \
|
||||
-gacdir /usr/$(get_libdir) \
|
||||
-package ${2:-${GACPN:-${PN}}} \
|
||||
|| die "installing ${1} into the Global Assembly Cache failed"
|
||||
}
|
||||
|
||||
# @FUNCTION: dotnet_multilib_comply
|
||||
# @DESCRIPTION:
|
||||
# multilib comply
|
||||
dotnet_multilib_comply() {
|
||||
use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
|
||||
local dir finddirs=() mv_command=${mv_command:-mv}
|
||||
if [[ -d "${ED}/usr/lib" && "$(get_libdir)" != "lib" ]]
|
||||
then
|
||||
if ! [[ -d "${ED}"/usr/"$(get_libdir)" ]]
|
||||
then
|
||||
mkdir "${ED}"/usr/"$(get_libdir)" || die "Couldn't mkdir ${ED}/usr/$(get_libdir)"
|
||||
fi
|
||||
${mv_command} "${ED}"/usr/lib/* "${ED}"/usr/"$(get_libdir)"/ || die "Moving files into correct libdir failed"
|
||||
rm -rf "${ED}"/usr/lib
|
||||
for dir in "${ED}"/usr/"$(get_libdir)"/pkgconfig "${ED}"/usr/share/pkgconfig
|
||||
do
|
||||
|
||||
if [[ -d "${dir}" && "$(find "${dir}" -name '*.pc')" != "" ]]
|
||||
then
|
||||
pushd "${dir}" &> /dev/null
|
||||
sed -i -r -e 's:/(lib)([^a-zA-Z0-9]|$):/'"$(get_libdir)"'\2:g' \
|
||||
*.pc \
|
||||
|| die "Sedding some sense into pkgconfig files failed."
|
||||
popd "${dir}" &> /dev/null
|
||||
fi
|
||||
done
|
||||
if [[ -d "${ED}/usr/bin" ]]
|
||||
then
|
||||
for exe in "${ED}/usr/bin"/*
|
||||
do
|
||||
if [[ "$(file "${exe}")" == *"shell script text"* ]]
|
||||
then
|
||||
sed -r -i -e ":/lib(/|$): s:/lib(/|$):/$(get_libdir)\1:" \
|
||||
"${exe}" || die "Sedding some sense into ${exe} failed"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
EXPORT_FUNCTIONS pkg_setup
|
||||
@ -1,10 +1,10 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.93 2015/05/25 12:52:56 ulm Exp $
|
||||
# $Id$
|
||||
#
|
||||
# @ECLASS: elisp-common.eclass
|
||||
# @MAINTAINER:
|
||||
# Gentoo GNU Emacs project <emacs@gentoo.org>
|
||||
# Gentoo GNU Emacs project <gnu-emacs@gentoo.org>
|
||||
# @AUTHOR:
|
||||
# Matthew Kennedy <mkennedy@gentoo.org>
|
||||
# Jeremy Maitin-Shepard <jbms@attbi.com>
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/embassy.eclass,v 1.19 2012/09/15 16:16:53 zmedico Exp $
|
||||
|
||||
# Author Olivier Fisette <ribosome@gentoo.org>
|
||||
|
||||
# This eclass is used to install EMBASSY programs (EMBOSS add-ons).
|
||||
|
||||
# The inheriting ebuild should provide a "DESCRIPTION", "KEYWORDS" and, if
|
||||
# necessary, add "(R|P)DEPEND"encies. Additionnaly, the inheriting ebuild's
|
||||
# name must begin by "embassy-". Also, before inheriting, the ebuild should
|
||||
# specify what version of EMBOSS is required by setting EBOV.
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
# The EMBASSY package name, retrieved from the inheriting ebuild's name
|
||||
EN=${PN:8}
|
||||
# The full name and version of the EMBASSY package (excluding the Gentoo
|
||||
# revision number)
|
||||
EF="$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}"
|
||||
|
||||
HOMEPAGE="http://emboss.sourceforge.net/"
|
||||
LICENSE="LGPL-2 GPL-2"
|
||||
SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz
|
||||
ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
IUSE="X png"
|
||||
|
||||
DEPEND="=sci-biology/emboss-${EBOV}*
|
||||
!<sci-biology/emboss-${EBOV}
|
||||
X? ( x11-libs/libX11 )
|
||||
png? ( sys-libs/zlib
|
||||
media-libs/libpng
|
||||
>=media-libs/gd-1.8
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/EMBOSS-${EBOV}/embassy/${EF}
|
||||
|
||||
embassy_src_unpack() {
|
||||
unpack ${A}
|
||||
mkdir EMBOSS-${EBOV}/embassy
|
||||
mv ${EF} EMBOSS-${EBOV}/embassy/
|
||||
cp /usr/$(get_libdir)/libplplot.la EMBOSS-${EBOV}/plplot/
|
||||
cp /usr/$(get_libdir)/libeplplot.la EMBOSS-${EBOV}/plplot/
|
||||
cp /usr/$(get_libdir)/libajax.la EMBOSS-${EBOV}/ajax/
|
||||
cp /usr/$(get_libdir)/libajaxg.la EMBOSS-${EBOV}/ajax/
|
||||
cp /usr/$(get_libdir)/libnucleus.la EMBOSS-${EBOV}/nucleus/
|
||||
if [ -e "${FILESDIR}"/${PF}.patch ]; then
|
||||
cd "${S}"
|
||||
epatch "${FILESDIR}"/${PF}.patch
|
||||
fi
|
||||
}
|
||||
|
||||
embassy_src_compile() {
|
||||
local PREFIX="${ROOT}/usr"
|
||||
local EXTRA_CONF
|
||||
! use X && EXTRA_CONF="${EXTRA_CONF} --without-x"
|
||||
! use png && EXTRA_CONF="${EXTRA_CONF} --without-pngdriver"
|
||||
./configure \
|
||||
"--bindir=${PREFIX}/bin" \
|
||||
"--sbindir=${PREFIX}/sbin" \
|
||||
"--libexecdir=${PREFIX}/libexec" \
|
||||
"--sysconfdir=${ROOT}/etc" \
|
||||
"--sharedstatedir=${ROOT}/var" \
|
||||
"--localstatedir=${ROOT}/var" \
|
||||
"--libdir=${PREFIX}/$(get_libdir)" \
|
||||
"--includedir=${PREFIX}/include" \
|
||||
"--datarootdir=${PREFIX}/share" \
|
||||
"--datadir=${PREFIX}/share" \
|
||||
"--infodir=${PREFIX}/share/info" \
|
||||
"--localedir=${PREFIX}/share/locale" \
|
||||
"--mandir=${PREFIX}/share/man" \
|
||||
${EXTRA_CONF} || die
|
||||
emake || die "Before reporting this error as a bug, please make sure you compiled
|
||||
EMBOSS and the EMBASSY packages with the same \"USE\" flags. Failure to
|
||||
do so may prevent the compilation of some EMBASSY packages, or cause
|
||||
runtime problems with some EMBASSY programs. For example, if you
|
||||
compile EMBOSS with \"png\" support and then try to build DOMAINATRIX
|
||||
without \"png\" support, compilation will fail when linking the binaries."
|
||||
}
|
||||
|
||||
embassy_src_install() {
|
||||
emake DESTDIR="${D}" install || die "Install failed"
|
||||
dodoc AUTHORS ChangeLog NEWS README
|
||||
dodir /usr/share
|
||||
mv "${D}"/usr/local/share/* "${D}"/usr/share/
|
||||
rmdir "${D}"/usr/local/share
|
||||
rmdir "${D}"/usr/local
|
||||
}
|
||||
|
||||
EXPORT_FUNCTIONS src_unpack src_compile src_install
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/emboss-r1.eclass,v 1.1 2015/03/28 16:45:24 jlec Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: emboss-r1.eclass
|
||||
# @MAINTAINER:
|
||||
@ -26,11 +26,12 @@
|
||||
# inherit emboss-r1
|
||||
|
||||
# @ECLASS-VARIABLE: EBO_DESCRIPTION
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Should be set. Completes the generic description of the embassy module as follows:
|
||||
#
|
||||
# EMBOSS integrated version of ${EBO_DESCRIPTION},
|
||||
# e.g.
|
||||
# EMBOSS integrated version of ${EBO_DESCRIPTION}, e.g.
|
||||
#
|
||||
# "EMBOSS integrated version of applications from the CBS group"
|
||||
#
|
||||
# Defaults to the upstream name of the module.
|
||||
@ -80,7 +81,7 @@ if [[ ${PN} == embassy-* ]]; then
|
||||
S="${WORKDIR}"/${EF}
|
||||
fi
|
||||
|
||||
# @FUNCTION: emboss_src_prepare
|
||||
# @FUNCTION: emboss-r1_src_prepare
|
||||
# @DESCRIPTION:
|
||||
# Does the following things
|
||||
#
|
||||
@ -96,7 +97,7 @@ emboss-r1_src_prepare() {
|
||||
autotools-utils_src_prepare
|
||||
}
|
||||
|
||||
# @FUNCTION: emboss_src_configure
|
||||
# @FUNCTION: emboss-r1_src_configure
|
||||
# @DESCRIPTION:
|
||||
# runs econf with following options.
|
||||
#
|
||||
|
||||
@ -1,96 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.24 2014/05/09 07:13:47 mgorny Exp $
|
||||
|
||||
#
|
||||
# Original Author: Mike Doty <kingtaco@gentoo.org>
|
||||
# Adapted from emul-libs.eclass
|
||||
# Purpose: Providing a template for the app-emulation/emul-linux-* packages
|
||||
#
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
3|4|5)
|
||||
EXPORT_FUNCTIONS src_prepare src_install
|
||||
;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
DESCRIPTION="Provides precompiled 32bit libraries"
|
||||
#HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"
|
||||
HOMEPAGE="http://dev.gentoo.org/~pacho/emul.html"
|
||||
SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.xz"
|
||||
|
||||
IUSE="+development"
|
||||
|
||||
RESTRICT="strip"
|
||||
S=${WORKDIR}
|
||||
|
||||
QA_PREBUILT="*"
|
||||
|
||||
SLOT="0"
|
||||
|
||||
DEPEND=">=sys-apps/findutils-4.2.26"
|
||||
RDEPEND=""
|
||||
|
||||
emul-linux-x86_src_prepare() {
|
||||
ALLOWED=${ALLOWED:-^${S}/etc/env.d}
|
||||
use development && ALLOWED="${ALLOWED}|/usr/lib32/pkgconfig"
|
||||
find "${S}" ! -type d ! '(' -name '*.so' -o -name '*.so.[0-9]*' -o -name '*.h' ')' | egrep -v "${ALLOWED}" | xargs -d $'\n' rm -f || die 'failed to remove everything but *.so*'
|
||||
}
|
||||
|
||||
emul-linux-x86_src_install() {
|
||||
for dir in etc/env.d etc/revdep-rebuild ; do
|
||||
if [[ -d "${S}"/${dir} ]] ; then
|
||||
for f in "${S}"/${dir}/* ; do
|
||||
mv -f "$f"{,-emul}
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
# remove void directories
|
||||
find "${S}" -depth -type d -print0 | xargs -0 rmdir 2&>/dev/null
|
||||
|
||||
cp -pPR "${S}"/* "${ED}"/ || die "copying files failed!"
|
||||
|
||||
# Do not hardcode lib32, bug #429726
|
||||
local x86_libdir=$(get_abi_LIBDIR x86)
|
||||
if [[ ${x86_libdir} != "lib32" ]] ; then
|
||||
ewarn "Moving lib32/ to ${x86_libdir}/; some libs might not work"
|
||||
mv "${D}"/usr/lib32 "${D}"/usr/${x86_libdir} || die
|
||||
if [[ -d ${D}/lib32 ]] ; then
|
||||
mv "${D}"/lib32 "${D}"/${x86_libdir} || die
|
||||
fi
|
||||
|
||||
pushd "${D}"/usr/${x86_libdir} >/dev/null
|
||||
|
||||
# Fix linker script paths.
|
||||
local ldscripts
|
||||
if ldscripts=( $(grep -ls '^GROUP.*/lib32/' *.so) ) ; then
|
||||
sed -i \
|
||||
-e "s:/lib32/:/${x86_libdir}/:" \
|
||||
"${ldscripts[@]}" || die
|
||||
fi
|
||||
|
||||
# Rewrite symlinks (if need be).
|
||||
local sym tgt
|
||||
while read sym ; do
|
||||
tgt=$(readlink "${sym}")
|
||||
ln -sf "${tgt/lib32/${x86_libdir}}" "${sym}" || die
|
||||
done < <(find -xtype l)
|
||||
|
||||
popd >/dev/null
|
||||
fi
|
||||
|
||||
# Since header wrapping is added as part of gx86-multilib support,
|
||||
# all packages involved install their own copies of i686* headers
|
||||
# when built with abi_x86_32.
|
||||
if [[ -d "${D}"/usr/include ]] && use abi_x86_32; then
|
||||
rm -r "${D}"/usr/include || die
|
||||
fi
|
||||
# The same goes for ${CHOST}- multilib tool prefixing.
|
||||
if path_exists "${D}"/usr/bin/i686-pc-linux-gnu-* && use abi_x86_32; then
|
||||
rm "${D}"/usr/bin/i686-pc-linux-gnu-* || die
|
||||
fi
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.106 2014/07/11 08:21:58 ulm Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: enlightenment.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/fcaps.eclass,v 1.11 2015/02/18 16:11:53 vapier Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: fcaps.eclass
|
||||
# @MAINTAINER:
|
||||
@ -162,6 +162,9 @@ fcaps() {
|
||||
: $(( ++notfound ))
|
||||
continue
|
||||
;;
|
||||
# ENOTSUP and EOPNOTSUPP might be the same value which means
|
||||
# strerror() on them is unstable -- we can get both. #559608
|
||||
*"Not supported"*|\
|
||||
*"Operation not supported"*)
|
||||
local fstype=$(stat -f -c %T "${file}")
|
||||
ewarn "Could not set caps on '${file}' due to missing filesystem support:"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/fdo-mime.eclass,v 1.14 2011/08/22 04:46:31 vapier Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: fdo-mime.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/findlib.eclass,v 1.11 2011/08/22 04:46:31 vapier Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: findlib.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/fixheadtails.eclass,v 1.13 2014/07/11 08:21:58 ulm Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: fixheadtails.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/font-ebdftopcf.eclass,v 1.7 2011/12/27 17:55:12 fauli Exp $
|
||||
# $Id$
|
||||
|
||||
# Author: Robin H. Johnson <robbat2@gentoo.org>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.58 2015/02/21 07:20:22 yngwin Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: font.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.20 2013/07/29 20:13:57 jlec Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: fortran-2.eclass
|
||||
# @MAINTAINER:
|
||||
@ -27,6 +27,15 @@
|
||||
#
|
||||
# FORTRAN_NEED_OPENMP=1
|
||||
|
||||
inherit eutils toolchain-funcs
|
||||
|
||||
case ${EAPI:-0} in
|
||||
0|1|2|3|4|5|6) EXPORT_FUNCTIONS pkg_setup ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
if [[ ! ${_FORTRAN_2_CLASS} ]]; then
|
||||
|
||||
# @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP
|
||||
# @DESCRIPTION:
|
||||
# Set to "1" in order to automatically have the eclass abort if the fortran
|
||||
@ -54,29 +63,52 @@
|
||||
# If unset, we always depend on virtual/fortran.
|
||||
: ${FORTRAN_NEEDED:=always}
|
||||
|
||||
inherit eutils toolchain-funcs
|
||||
|
||||
for _f_use in ${FORTRAN_NEEDED}; do
|
||||
case ${_f_use} in
|
||||
always)
|
||||
DEPEND+=" virtual/fortran"
|
||||
RDEPEND+=" virtual/fortran"
|
||||
break
|
||||
;;
|
||||
no)
|
||||
break
|
||||
;;
|
||||
test)
|
||||
DEPEND+=" ${_f_use}? ( virtual/fortran )"
|
||||
;;
|
||||
*)
|
||||
DEPEND+=" ${_f_use}? ( virtual/fortran )"
|
||||
RDEPEND+=" ${_f_use}? ( virtual/fortran )"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
RDEPEND="${DEPEND}"
|
||||
unset _f_use
|
||||
|
||||
# @FUNCTION: fortran_int64_abi_fflags
|
||||
# @DESCRIPTION:
|
||||
# Return the Fortran compiler flag to enable 64 bit integers for
|
||||
# array indices
|
||||
# @CODE
|
||||
fortran_int64_abi_fflags() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
_FC=$(tc-getFC)
|
||||
if [[ ${_FC} == *gfortran* ]]; then
|
||||
echo "-fdefault-integer-8"
|
||||
elif [[ ${_FC} == ifort ]]; then
|
||||
echo "-integer-size 64"
|
||||
else
|
||||
die "Compiler flag for 64bit interger for ${_FC} unknown"
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: _fortran_write_testsuite
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# writes fortran test code
|
||||
_fortran_write_testsuite() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
local filebase=${T}/test-fortran
|
||||
|
||||
# f77 code
|
||||
@ -103,6 +135,8 @@ _fortran_write_testsuite() {
|
||||
# Takes fortran compiler as first argument and dialect as second.
|
||||
# Checks whether the passed fortran compiler speaks the fortran dialect
|
||||
_fortran_compile_test() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
local filebase=${T}/test-fortran
|
||||
local fcomp=${1}
|
||||
local fdia=${2}
|
||||
@ -128,6 +162,8 @@ _fortran_compile_test() {
|
||||
# @DESCRIPTION:
|
||||
# See if the fortran supports OpenMP.
|
||||
_fortran-has-openmp() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
local flag
|
||||
local filebase=${T}/test-fc-openmp
|
||||
local fcode=${filebase}.f
|
||||
@ -155,13 +191,15 @@ _fortran-has-openmp() {
|
||||
# @DESCRIPTION:
|
||||
# Detailed description how to handle fortran support
|
||||
_fortran_die_msg() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
echo
|
||||
eerror "Please install currently selected gcc version with USE=fortran."
|
||||
eerror "If you intend to use a different compiler then gfortran, please"
|
||||
eerror "set FC variable accordingly and take care that the necessary"
|
||||
eerror "fortran dialects are supported."
|
||||
echo
|
||||
die "Currently no working fortran compiler is available"
|
||||
die "Currently no working fortran compiler is available (see ${T}/_fortran_compile_test.log for information)"
|
||||
}
|
||||
|
||||
# @FUNCTION: _fortran_test_function
|
||||
@ -170,6 +208,8 @@ _fortran_die_msg() {
|
||||
# Internal test function for working fortran compiler.
|
||||
# It is called in fortran-2_pkg_setup.
|
||||
_fortran_test_function() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
local dialect
|
||||
|
||||
: ${F77:=$(tc-getFC)}
|
||||
@ -208,23 +248,23 @@ _fortran_test_function() {
|
||||
# _The_ fortran-2_pkg_setup() code
|
||||
_fortran-2_pkg_setup() {
|
||||
for _f_use in ${FORTRAN_NEEDED}; do
|
||||
case ${_f_use} in
|
||||
always)
|
||||
case ${_f_use} in
|
||||
always)
|
||||
_fortran_test_function && break
|
||||
;;
|
||||
no)
|
||||
einfo "Forcing fortran support off"
|
||||
break
|
||||
;;
|
||||
*)
|
||||
if use ${_f_use}; then
|
||||
_fortran_test_function && break
|
||||
;;
|
||||
no)
|
||||
einfo "Forcing fortran support off"
|
||||
break
|
||||
;;
|
||||
*)
|
||||
if use ${_f_use}; then
|
||||
_fortran_test_function && break
|
||||
else
|
||||
unset FC
|
||||
unset F77
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
unset FC
|
||||
unset F77
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
@ -234,6 +274,8 @@ _fortran-2_pkg_setup() {
|
||||
# Setup functionality,
|
||||
# checks for a valid fortran compiler and optionally for its openmp support.
|
||||
fortran-2_pkg_setup() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
case ${EAPI:-0} in
|
||||
0|1|2|3)
|
||||
eqawarn "Support for EAPI < 4 will be removed from the"
|
||||
@ -241,7 +283,7 @@ fortran-2_pkg_setup() {
|
||||
eqawarn "Please migrate your package to a higher EAPI"
|
||||
eqawarn "or file a bug at https://bugs.gentoo.org"
|
||||
_fortran-2_pkg_setup ;;
|
||||
4|5)
|
||||
*)
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
_fortran-2_pkg_setup
|
||||
fi
|
||||
@ -249,8 +291,5 @@ fortran-2_pkg_setup() {
|
||||
esac
|
||||
}
|
||||
|
||||
case ${EAPI:-0} in
|
||||
0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
_FORTRAN_2_ECLASS=1
|
||||
fi
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/fox.eclass,v 1.17 2012/09/27 16:35:41 axs Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: fox.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/freebsd.eclass,v 1.38 2015/06/05 16:38:21 mgorny Exp $
|
||||
# $Id$
|
||||
#
|
||||
# Diego Pettenò <flameeyes@gentoo.org>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/freedict.eclass,v 1.21 2014/01/05 11:39:48 pacho Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: freedict.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.44 2011/12/27 17:55:12 fauli Exp $
|
||||
# $Id$
|
||||
|
||||
# Variables to specify in an ebuild which uses this eclass:
|
||||
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
|
||||
@ -111,7 +111,7 @@ games-mods_get_rdepend() {
|
||||
|
||||
case ${EAPI:-0} in
|
||||
0|1) echo -n "${pkgs[@]}" ;;
|
||||
2)
|
||||
[23456])
|
||||
local p
|
||||
if [[ ${1} == "--ded" ]] ; then
|
||||
echo -n "${DED_PKGS}"
|
||||
@ -124,6 +124,7 @@ games-mods_get_rdepend() {
|
||||
done
|
||||
fi
|
||||
;;
|
||||
*) die "EAPI ${EAPI} not supported"
|
||||
esac
|
||||
|
||||
[[ ${#pkgs[@]} -gt 1 ]] && echo -n " )"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.160 2015/02/20 10:22:42 ulm Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: games
|
||||
# @ECLASS: games.eclass
|
||||
# @MAINTAINER:
|
||||
# Games team <games@gentoo.org>
|
||||
# @BLURB: Standardizing the install of games.
|
||||
@ -19,6 +19,11 @@
|
||||
#
|
||||
# For a general guide on writing games ebuilds, see:
|
||||
# https://wiki.gentoo.org/wiki/Project:Games/Ebuild_howto
|
||||
#
|
||||
# WARNING: This eclass is DEPRECATED and must not be used by new games
|
||||
# ebuilds, bug #574082. When writing game ebuilds, no specific eclass
|
||||
# is needed. For more details, see the QA team policies page:
|
||||
# https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Policies#Games
|
||||
|
||||
|
||||
if [[ -z ${_GAMES_ECLASS} ]]; then
|
||||
@ -29,7 +34,7 @@ inherit base multilib toolchain-funcs eutils user
|
||||
case ${EAPI:-0} in
|
||||
0|1) EXPORT_FUNCTIONS pkg_setup src_compile pkg_preinst pkg_postinst ;;
|
||||
2|3|4|5) EXPORT_FUNCTIONS pkg_setup src_configure src_compile pkg_preinst pkg_postinst ;;
|
||||
*) die "no support for EAPI=${EAPI} yet" ;;
|
||||
*) die "games.eclass is banned in EAPI=${EAPI}, see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Policies#Games" ;;
|
||||
esac
|
||||
|
||||
if [[ ${CATEGORY}/${PN} != "games-misc/games-envd" ]] ; then
|
||||
@ -247,14 +252,14 @@ prepgamesdirs() {
|
||||
find "${D}/${dir}" -type f -print0 | xargs -0 chmod $mode
|
||||
|
||||
# common trees should not be games owned #264872 #537580
|
||||
fowners root:root "${dir}"
|
||||
fowners root:0 "${dir}"
|
||||
fperms 755 "${dir}"
|
||||
if [[ ${dir} == "${GAMES_PREFIX}" \
|
||||
|| ${dir} == "${GAMES_PREFIX_OPT}" ]] ; then
|
||||
for d in $(get_libdir) bin ; do
|
||||
# check if dirs exist to avoid "nonfatal" option
|
||||
if [[ -e ${D}/${dir}/${d} ]] ; then
|
||||
fowners root:root "${dir}/${d}"
|
||||
fowners root:0 "${dir}/${d}"
|
||||
fperms 755 "${dir}/${d}"
|
||||
fi
|
||||
done
|
||||
@ -343,7 +348,7 @@ games_pkg_postinst() {
|
||||
esac
|
||||
echo
|
||||
einfo "For more info about Gentoo gaming in general, see our website:"
|
||||
einfo " http://games.gentoo.org/"
|
||||
einfo " https://games.gentoo.org/"
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gdesklets.eclass,v 1.21 2011/08/22 04:46:31 vapier Exp $
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gdesklets.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.41 2015/03/28 13:32:40 slyfox Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: ghc-package.eclass
|
||||
# @MAINTAINER:
|
||||
@ -64,7 +64,9 @@ ghc-getghcpkgbin() {
|
||||
|
||||
# @FUNCTION: ghc-version
|
||||
# @DESCRIPTION:
|
||||
# returns the version of ghc
|
||||
# returns upstream version of ghc
|
||||
# as reported by '--numeric-version'
|
||||
# Examples: "7.10.2", "7.9.20141222"
|
||||
_GHC_VERSION_CACHE=""
|
||||
ghc-version() {
|
||||
if [[ -z "${_GHC_VERSION_CACHE}" ]]; then
|
||||
@ -73,6 +75,22 @@ ghc-version() {
|
||||
echo "${_GHC_VERSION_CACHE}"
|
||||
}
|
||||
|
||||
# @FUNCTION: ghc-pm-version
|
||||
# @DESCRIPTION:
|
||||
# returns package manager(PM) version of ghc
|
||||
# as reported by '$(best_version)'
|
||||
# Examples: "PM:7.10.2", "PM:7.10.2_rc1", "PM:7.8.4-r4"
|
||||
_GHC_PM_VERSION_CACHE=""
|
||||
ghc-pm-version() {
|
||||
local pm_ghc_p
|
||||
|
||||
if [[ -z "${_GHC_PM_VERSION_CACHE}" ]]; then
|
||||
pm_ghc_p=$(best_version dev-lang/ghc)
|
||||
_GHC_PM_VERSION_CACHE="PM:${pm_ghc_p#dev-lang/ghc-}"
|
||||
fi
|
||||
echo "${_GHC_PM_VERSION_CACHE}"
|
||||
}
|
||||
|
||||
# @FUNCTION: ghc-cabal-version
|
||||
# @DESCRIPTION:
|
||||
# return version of the Cabal library bundled with ghc
|
||||
@ -102,6 +120,15 @@ ghc-sanecabal() {
|
||||
done
|
||||
return 1
|
||||
}
|
||||
# @FUNCTION: ghc-is-dynamic
|
||||
# @DESCRIPTION:
|
||||
# checks if ghc is built against dynamic libraries
|
||||
# binaries linked against GHC library (and using plugin loading)
|
||||
# have to be linked the same way:
|
||||
# https://ghc.haskell.org/trac/ghc/ticket/10301
|
||||
ghc-is-dynamic() {
|
||||
$(ghc-getghc) --info | grep "GHC Dynamic" | grep -q "YES"
|
||||
}
|
||||
|
||||
# @FUNCTION: ghc-supports-shared-libraries
|
||||
# @DESCRIPTION:
|
||||
@ -198,7 +225,8 @@ ghc-package-exists() {
|
||||
}
|
||||
|
||||
# @FUNCTION: check-for-collisions
|
||||
# @DESCRIPTION: makes sure no packages
|
||||
# @DESCRIPTION:
|
||||
# makes sure no packages
|
||||
# have the same version as initial package setup
|
||||
check-for-collisions() {
|
||||
local localpkgconf=$1
|
||||
@ -211,8 +239,8 @@ check-for-collisions() {
|
||||
local collided=`$(ghc-getghcpkgbin) -f ${initial_pkg_db} list --simple-output "${checked_pkg}"`
|
||||
|
||||
if [[ -n ${collided} ]]; then
|
||||
eerror "Package ${checked_pkg} is shipped with $(ghc-version)."
|
||||
eerror "Ebuild author forgot CABAL_CORE_LIB_GHC_PV entry."
|
||||
eerror "Cabal package '${checked_pkg}' is shipped with '$(ghc-pm-version)' ('$(ghc-version)')."
|
||||
eerror "Ebuild author forgot an entry in CABAL_CORE_LIB_GHC_PV='${CABAL_CORE_LIB_GHC_PV}'."
|
||||
eerror "Found in ${initial_pkg_db}."
|
||||
die
|
||||
fi
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gkrellm-plugin.eclass,v 1.4 2012/05/02 18:31:42 jdhore Exp $
|
||||
# $Id$
|
||||
|
||||
#
|
||||
# Original Author: Jim Ramsay <lack@gentoo.org>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnat.eclass,v 1.43 2015/03/31 18:43:33 ulm Exp $
|
||||
# $Id$
|
||||
#
|
||||
# Author: George Shapovalov <george@gentoo.org>
|
||||
# Belongs to: ada herd <ada@gentoo.org>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.64 2015/03/31 18:43:33 ulm Exp $
|
||||
# $Id$
|
||||
#
|
||||
# Authors: George Shapovalov <george@gentoo.org>
|
||||
# Steve Arnold <nerdboy@gentoo.org>
|
||||
@ -246,7 +246,7 @@ do_gnat_config() {
|
||||
elog "Ada handling in Gentoo allows you to have multiple gnat variants"
|
||||
elog "installed in parallel and automatically manage Ada libs."
|
||||
elog "Please take a look at the Ada project page for some documentation:"
|
||||
elog "http://www.gentoo.org/proj/en/prog_lang/ada/index.xml"
|
||||
elog "https://www.gentoo.org/proj/en/prog_lang/ada/index.xml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnome-games.eclass,v 1.2 2013/08/25 18:12:24 eva Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gnome-games
|
||||
# @ECLASS: gnome-games.eclass
|
||||
# @MAINTAINER:
|
||||
# Gnome team <gnome@gentoo.org>
|
||||
# @AUTHOR:
|
||||
@ -95,7 +95,7 @@ gnome-games_pkg_preinst() {
|
||||
games_pkg_preinst
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome-games_pkg_preinst
|
||||
# @FUNCTION: gnome-games_pkg_postinst
|
||||
# @DESCRIPTION:
|
||||
# Set proper phase defaults
|
||||
gnome-games_pkg_postinst() {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnome-python-common-r1.eclass,v 1.2 2014/09/27 16:15:19 pacho Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gnome-python-common-r1
|
||||
# @ECLASS: gnome-python-common-r1.eclass
|
||||
# @MAINTAINER:
|
||||
# GNOME team <gnome@gentoo.org>
|
||||
# @AUTHOR:
|
||||
@ -80,7 +80,7 @@ gnome-python-common-r1_src_configure() {
|
||||
)
|
||||
|
||||
ECONF_SOURCE=${S} \
|
||||
python_parallel_foreach_impl \
|
||||
python_foreach_impl \
|
||||
gnome2_src_configure "${myconf[@]}" "${@}"
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnome.org.eclass,v 1.15 2011/09/12 15:54:53 pacho Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gnome.org.eclass
|
||||
# @MAINTAINER:
|
||||
@ -27,7 +27,7 @@ else
|
||||
fi
|
||||
|
||||
# Even though xz-utils are in @system, they must still be added to DEPEND; see
|
||||
# http://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
|
||||
# https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
|
||||
if [[ ${GNOME_TARBALL_SUFFIX} == "xz" ]]; then
|
||||
DEPEND="${DEPEND} app-arch/xz-utils"
|
||||
fi
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.38 2014/11/23 21:46:29 mgorny Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gnome2-utils.eclass
|
||||
# @MAINTAINER:
|
||||
@ -15,10 +15,11 @@
|
||||
# * GConf schemas management
|
||||
# * scrollkeeper (old Gnome help system) management
|
||||
|
||||
inherit multilib
|
||||
[[ ${EAPI:-0} == [012345] ]] && inherit multilib
|
||||
inherit eutils xdg-utils
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
0|1|2|3|4|5) ;;
|
||||
0|1|2|3|4|5|6) ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
@ -90,23 +91,16 @@ DEPEND=">=sys-apps/sed-4"
|
||||
# Reset various variables inherited from root's evironment to a reasonable
|
||||
# default for ebuilds to help avoid access violations and test failures.
|
||||
gnome2_environment_reset() {
|
||||
xdg_environment_reset
|
||||
|
||||
# Respected by >=glib-2.30.1-r1
|
||||
export G_HOME="${T}"
|
||||
|
||||
# GST_REGISTRY is to work around gst utilities trying to read/write /root
|
||||
export GST_REGISTRY="${T}/registry.xml"
|
||||
|
||||
# XXX: code for resetting XDG_* directories should probably be moved into
|
||||
# a separate function in a non-gnome eclass
|
||||
export XDG_DATA_HOME="${T}/.local/share"
|
||||
export XDG_CONFIG_HOME="${T}/.config"
|
||||
export XDG_CACHE_HOME="${T}/.cache"
|
||||
export XDG_RUNTIME_DIR="${T}/run"
|
||||
mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" \
|
||||
"${XDG_RUNTIME_DIR}"
|
||||
# This directory needs to be owned by the user, and chmod 0700
|
||||
# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
chmod 0700 "${XDG_RUNTIME_DIR}"
|
||||
# Ensure we don't rely on dconf/gconf while building, bug #511946
|
||||
export GSETTINGS_BACKEND="memory"
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_gconf_savelist
|
||||
@ -116,9 +110,9 @@ gnome2_environment_reset() {
|
||||
# This function should be called from pkg_preinst.
|
||||
gnome2_gconf_savelist() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
||||
pushd "${ED}" &> /dev/null
|
||||
pushd "${ED}" > /dev/null || die
|
||||
export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
|
||||
popd &> /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_gconf_install
|
||||
@ -210,9 +204,9 @@ gnome2_gconf_uninstall() {
|
||||
# This function should be called from pkg_preinst.
|
||||
gnome2_icon_savelist() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
||||
pushd "${ED}" &> /dev/null
|
||||
pushd "${ED}" > /dev/null || die
|
||||
export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
|
||||
popd &> /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_icon_cache_update
|
||||
@ -331,9 +325,9 @@ gnome2_omf_fix() {
|
||||
# This function should be called from pkg_preinst.
|
||||
gnome2_scrollkeeper_savelist() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
||||
pushd "${ED}" &> /dev/null
|
||||
pushd "${ED}" > /dev/null || die
|
||||
export GNOME2_ECLASS_SCROLLS=$(find 'usr/share/omf' -type f -name "*.omf" 2> /dev/null)
|
||||
popd &> /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_scrollkeeper_update
|
||||
@ -366,9 +360,9 @@ gnome2_scrollkeeper_update() {
|
||||
# This function should be called from pkg_preinst.
|
||||
gnome2_schemas_savelist() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
||||
pushd "${ED}" &>/dev/null
|
||||
pushd "${ED}" > /dev/null || die
|
||||
export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' -name '*.gschema.xml' 2>/dev/null)
|
||||
popd &>/dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_schemas_update
|
||||
@ -402,9 +396,9 @@ gnome2_schemas_update() {
|
||||
# This function should be called from pkg_preinst.
|
||||
gnome2_gdk_pixbuf_savelist() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
||||
pushd "${ED}" 1>/dev/null
|
||||
pushd "${ED}" > /dev/null || die
|
||||
export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find usr/lib*/gdk-pixbuf-2.0 -type f 2>/dev/null)
|
||||
popd 1>/dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_gdk_pixbuf_update
|
||||
@ -431,7 +425,7 @@ gnome2_gdk_pixbuf_update() {
|
||||
fi
|
||||
|
||||
ebegin "Updating gdk-pixbuf loader cache"
|
||||
local tmp_file=$(mktemp -t tmp.XXXXXXXXXX_gdkpixbuf)
|
||||
local tmp_file=$(emktemp)
|
||||
${updater} 1> "${tmp_file}" &&
|
||||
chmod 0644 "${tmp_file}" &&
|
||||
cp -f "${tmp_file}" "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" &&
|
||||
@ -447,7 +441,10 @@ gnome2_query_immodules_gtk2() {
|
||||
local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-2.0
|
||||
[[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0
|
||||
|
||||
"${updater}" --update-cache
|
||||
ebegin "Updating gtk2 input method module cache"
|
||||
GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \
|
||||
"${updater}" --update-cache
|
||||
eend $?
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_query_immodules_gtk3
|
||||
@ -458,7 +455,33 @@ gnome2_query_immodules_gtk3() {
|
||||
local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-3.0
|
||||
[[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0
|
||||
|
||||
"${updater}" --update-cache
|
||||
ebegin "Updating gtk3 input method module cache"
|
||||
GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \
|
||||
"${updater}" --update-cache
|
||||
eend $?
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_giomodule_cache_update
|
||||
# @USAGE: gnome2_giomodule_cache_update
|
||||
# @DESCRIPTION:
|
||||
# Updates glib's gio modules cache.
|
||||
# This function should be called from pkg_postinst and pkg_postrm.
|
||||
gnome2_giomodule_cache_update() {
|
||||
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
|
||||
local updater="${EROOT}/usr/bin/${CHOST}-gio-querymodules"
|
||||
|
||||
if [[ ! -x ${updater} ]]; then
|
||||
updater="${EROOT}/usr/bin/gio-querymodules"
|
||||
fi
|
||||
|
||||
if [[ ! -x ${updater} ]]; then
|
||||
debug-print "${updater} is not executable"
|
||||
return
|
||||
fi
|
||||
|
||||
ebegin "Updating GIO modules cache"
|
||||
${updater} "${EROOT%/}"/usr/$(get_libdir)/gio/modules
|
||||
eend $?
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_disable_deprecation_warning
|
||||
@ -479,8 +502,8 @@ gnome2_disable_deprecation_warning() {
|
||||
fi
|
||||
|
||||
LC_ALL=C sed -r -i \
|
||||
-e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(NULL):g' \
|
||||
-e 's:-DGSEAL_ENABLE+[A-Z_]:$(NULL):g' \
|
||||
-e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(/bin/true):g' \
|
||||
-e 's:-DGSEAL_ENABLE(=[A-Za-z0-9_]*)?:$(/bin/true):g' \
|
||||
-i "${makefile}"
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
@ -490,7 +513,7 @@ gnome2_disable_deprecation_warning() {
|
||||
fi
|
||||
done < <(find "${S}" -name "Makefile.in" \
|
||||
-o -name "Makefile.am" -o -name "Makefile.decl" \
|
||||
| sort; echo configure)
|
||||
| sort; [[ -f "${S}"/configure ]] && echo configure)
|
||||
# TODO: sedding configure.ac can trigger maintainer mode; bug #439602
|
||||
# -o -name "configure.ac" -o -name "configure.in" \
|
||||
# | sort; echo configure)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.131 2015/04/18 13:19:47 pacho Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gnome2.eclass
|
||||
# @MAINTAINER:
|
||||
@ -10,7 +10,7 @@
|
||||
# Exports portage base functions used by ebuilds written for packages using the
|
||||
# GNOME framework. For additional functions, see gnome2-utils.eclass.
|
||||
|
||||
inherit eutils fdo-mime libtool gnome.org gnome2-utils
|
||||
inherit eutils libtool gnome.org gnome2-utils xdg
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
4|5)
|
||||
@ -22,7 +22,8 @@ esac
|
||||
# @ECLASS-VARIABLE: G2CONF
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Extra configure opts passed to econf
|
||||
# Extra configure opts passed to econf.
|
||||
# Deprecated, pass extra arguments to gnome2_src_configure.
|
||||
G2CONF=${G2CONF:-""}
|
||||
|
||||
# @ECLASS-VARIABLE: GNOME2_LA_PUNT
|
||||
@ -56,6 +57,10 @@ ELTCONF=${ELTCONF:-""}
|
||||
# to handle it properly. It will enable minimal debug with USE=-debug.
|
||||
# Note that this is most commonly found in configure.ac as GNOME_DEBUG_CHECK.
|
||||
|
||||
# @ECLASS-VARIABLE: GNOME2_ECLASS_GIO_MODULES
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# Array containing glib GIO modules
|
||||
|
||||
if [[ ${GCONF_DEBUG} != "no" ]]; then
|
||||
IUSE="debug"
|
||||
@ -74,6 +79,8 @@ gnome2_src_unpack() {
|
||||
# Prepare environment for build, fix build of scrollkeeper documentation,
|
||||
# run elibtoolize.
|
||||
gnome2_src_prepare() {
|
||||
xdg_src_prepare
|
||||
|
||||
# Prevent assorted access violations and test failures
|
||||
gnome2_environment_reset
|
||||
|
||||
@ -84,18 +91,24 @@ gnome2_src_prepare() {
|
||||
gnome2_disable_deprecation_warning
|
||||
|
||||
# Run libtoolize
|
||||
# Everything is fatal EAPI 4 onwards
|
||||
nonfatal elibtoolize ${ELTCONF}
|
||||
elibtoolize ${ELTCONF}
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_src_configure
|
||||
# @DESCRIPTION:
|
||||
# Gnome specific configure handling
|
||||
gnome2_src_configure() {
|
||||
# Deprecated for a long time now, see Gnome team policies
|
||||
if [[ -n ${G2CONF} ]] ; then
|
||||
eqawarn "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure"
|
||||
fi
|
||||
|
||||
local g2conf=()
|
||||
|
||||
# Update the GNOME configuration options
|
||||
if [[ ${GCONF_DEBUG} != 'no' ]] ; then
|
||||
if use debug ; then
|
||||
G2CONF="--enable-debug=yes ${G2CONF}"
|
||||
g2conf+=( --enable-debug=yes )
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -108,54 +121,59 @@ gnome2_src_configure() {
|
||||
# Preserve old behavior for older EAPI.
|
||||
if grep -q "enable-gtk-doc" "${ECONF_SOURCE:-.}"/configure ; then
|
||||
if has ${EAPI:-0} 4 && in_iuse doc ; then
|
||||
G2CONF="$(use_enable doc gtk-doc) ${G2CONF}"
|
||||
g2conf+=( $(use_enable doc gtk-doc) )
|
||||
else
|
||||
G2CONF="--disable-gtk-doc ${G2CONF}"
|
||||
g2conf+=( --disable-gtk-doc )
|
||||
fi
|
||||
fi
|
||||
|
||||
# Pass --disable-maintainer-mode when needed
|
||||
if grep -q "^[[:space:]]*AM_MAINTAINER_MODE(\[enable\])" \
|
||||
"${ECONF_SOURCE:-.}"/configure.*; then
|
||||
G2CONF="--disable-maintainer-mode ${G2CONF}"
|
||||
g2conf+=( --disable-maintainer-mode )
|
||||
fi
|
||||
|
||||
# Pass --disable-scrollkeeper when possible
|
||||
if grep -q "disable-scrollkeeper" "${ECONF_SOURCE:-.}"/configure; then
|
||||
G2CONF="--disable-scrollkeeper ${G2CONF}"
|
||||
g2conf+=( --disable-scrollkeeper )
|
||||
fi
|
||||
|
||||
# Pass --disable-silent-rules when possible (not needed for eapi5), bug #429308
|
||||
if has ${EAPI:-0} 4; then
|
||||
if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then
|
||||
G2CONF="--disable-silent-rules ${G2CONF}"
|
||||
g2conf+=( --disable-silent-rules )
|
||||
fi
|
||||
fi
|
||||
|
||||
# Pass --disable-schemas-install when possible
|
||||
if grep -q "disable-schemas-install" "${ECONF_SOURCE:-.}"/configure; then
|
||||
G2CONF="--disable-schemas-install ${G2CONF}"
|
||||
g2conf+=( --disable-schemas-install )
|
||||
fi
|
||||
|
||||
# Pass --disable-schemas-compile when possible
|
||||
if grep -q "disable-schemas-compile" "${ECONF_SOURCE:-.}"/configure; then
|
||||
G2CONF="--disable-schemas-compile ${G2CONF}"
|
||||
g2conf+=( --disable-schemas-compile )
|
||||
fi
|
||||
|
||||
# Pass --disable-update-mimedb when possible
|
||||
if grep -q "disable-update-mimedb" "${ECONF_SOURCE:-.}"/configure; then
|
||||
g2conf+=( --disable-update-mimedb )
|
||||
fi
|
||||
|
||||
# Pass --enable-compile-warnings=minimum as we don't want -Werror* flags, bug #471336
|
||||
if grep -q "enable-compile-warnings" "${ECONF_SOURCE:-.}"/configure; then
|
||||
G2CONF="--enable-compile-warnings=minimum ${G2CONF}"
|
||||
g2conf+=( --enable-compile-warnings=minimum )
|
||||
fi
|
||||
|
||||
# Pass --docdir with proper directory, bug #482646
|
||||
if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then
|
||||
G2CONF="--docdir="${EPREFIX}"/usr/share/doc/${PF} ${G2CONF}"
|
||||
g2conf+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} )
|
||||
fi
|
||||
|
||||
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
|
||||
addwrite "$(unset HOME; echo ~)/.gnome2"
|
||||
|
||||
econf ${G2CONF} "$@"
|
||||
econf ${g2conf[@]} ${G2CONF} "$@"
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_src_compile
|
||||
@ -226,11 +244,21 @@ gnome2_src_install() {
|
||||
# @DESCRIPTION:
|
||||
# Finds Icons, GConf and GSettings schemas for later handling in pkg_postinst
|
||||
gnome2_pkg_preinst() {
|
||||
xdg_pkg_preinst
|
||||
gnome2_gconf_savelist
|
||||
gnome2_icon_savelist
|
||||
gnome2_schemas_savelist
|
||||
gnome2_scrollkeeper_savelist
|
||||
gnome2_gdk_pixbuf_savelist
|
||||
|
||||
local f
|
||||
|
||||
GNOME2_ECLASS_GIO_MODULES=()
|
||||
while IFS= read -r -d '' f; do
|
||||
GNOME2_ECLASS_GIO_MODULES+=( ${f} )
|
||||
done < <(cd "${D}" && find usr/$(get_libdir)/gio/modules -type f -print0 2>/dev/null)
|
||||
|
||||
export GNOME2_ECLASS_GIO_MODULES
|
||||
}
|
||||
|
||||
# @FUNCTION: gnome2_pkg_postinst
|
||||
@ -238,13 +266,16 @@ gnome2_pkg_preinst() {
|
||||
# Handle scrollkeeper, GConf, GSettings, Icons, desktop and mime
|
||||
# database updates.
|
||||
gnome2_pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
gnome2_gconf_install
|
||||
fdo-mime_desktop_database_update
|
||||
fdo-mime_mime_database_update
|
||||
gnome2_icon_cache_update
|
||||
gnome2_schemas_update
|
||||
gnome2_scrollkeeper_update
|
||||
gnome2_gdk_pixbuf_update
|
||||
|
||||
if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then
|
||||
gnome2_giomodule_cache_update
|
||||
fi
|
||||
}
|
||||
|
||||
# # FIXME Handle GConf schemas removal
|
||||
@ -256,9 +287,12 @@ gnome2_pkg_postinst() {
|
||||
# @DESCRIPTION:
|
||||
# Handle scrollkeeper, GSettings, Icons, desktop and mime database updates.
|
||||
gnome2_pkg_postrm() {
|
||||
fdo-mime_desktop_database_update
|
||||
fdo-mime_mime_database_update
|
||||
xdg_pkg_postrm
|
||||
gnome2_icon_cache_update
|
||||
gnome2_schemas_update
|
||||
gnome2_scrollkeeper_update
|
||||
|
||||
if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then
|
||||
gnome2_giomodule_cache_update
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnuconfig.eclass,v 1.36 2014/11/15 06:20:07 vapier Exp $
|
||||
# $Id$
|
||||
#
|
||||
# THIS ECLASS IS DEAD: It has been integrated into portage
|
||||
#
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep-2.eclass,v 1.7 2012/05/29 08:05:05 phajdan.jr Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gnustep-2.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep-base.eclass,v 1.27 2012/06/22 12:41:51 voyageur Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gnustep-base.eclass
|
||||
# @MAINTAINER:
|
||||
@ -62,6 +62,8 @@ gnustep-base_src_prepare() {
|
||||
GNUmakefile
|
||||
eend $?
|
||||
fi
|
||||
|
||||
has ${EAPI:-0} 6 && default
|
||||
}
|
||||
|
||||
gnustep-base_src_configure() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/go-mono.eclass,v 1.15 2013/07/27 16:18:00 pacho Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: go-mono.eclass
|
||||
# @MAINTAINER:
|
||||
@ -65,8 +65,7 @@ then
|
||||
fi
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
virtual/pkgconfig
|
||||
userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
|
||||
virtual/pkgconfig"
|
||||
|
||||
# @FUNCTION: go-mono_src_unpack
|
||||
# @DESCRIPTION:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gpe.eclass,v 1.4 2012/05/02 18:31:42 jdhore Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gpe.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-bad.eclass,v 1.46 2012/12/02 17:16:20 eva Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gst-plugins10-bad.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-base.eclass,v 1.25 2012/12/02 17:16:20 eva Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gst-plugins-base.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-good.eclass,v 1.29 2012/12/02 17:16:20 eva Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gst-plugins-good.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-ugly.eclass,v 1.25 2012/12/02 17:16:20 eva Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gst-plugins-ugly.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins10.eclass,v 1.12 2014/04/05 09:19:19 tetromino Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gst-plugins10.eclass
|
||||
# @MAINTAINER:
|
||||
@ -79,7 +79,7 @@ else
|
||||
fi
|
||||
|
||||
# Even though xz-utils are in @system, they must still be added to DEPEND; see
|
||||
# http://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
|
||||
# https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
|
||||
if [[ ${GST_TARBALL_SUFFIX} == "xz" ]]; then
|
||||
DEPEND="${DEPEND} app-arch/xz-utils"
|
||||
fi
|
||||
@ -254,7 +254,7 @@ gst-plugins10_src_configure() {
|
||||
einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
|
||||
econf \
|
||||
--with-package-name="Gentoo GStreamer ebuild" \
|
||||
--with-package-origin="http://www.gentoo.org" \
|
||||
--with-package-origin="https://www.gentoo.org" \
|
||||
${gst_conf} $@
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gstreamer.eclass,v 1.3 2014/12/28 22:55:58 eva Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gstreamer.eclass
|
||||
# @MAINTAINER:
|
||||
@ -23,7 +23,7 @@
|
||||
# plugin, consider adding media-plugins/gst-plugins-meta dependency, but
|
||||
# also list any packages that provide explicitly requested plugins.
|
||||
|
||||
inherit eutils multilib multilib-minimal toolchain-funcs versionator
|
||||
inherit eutils multilib multilib-minimal toolchain-funcs versionator xdg-utils
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
5)
|
||||
@ -58,7 +58,7 @@ esac
|
||||
: ${GST_TARBALL_SUFFIX:="xz"}
|
||||
|
||||
# Even though xz-utils are in @system, they must still be added to DEPEND; see
|
||||
# http://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
|
||||
# https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
|
||||
if [[ ${GST_TARBALL_SUFFIX} == "xz" ]]; then
|
||||
DEPEND="${DEPEND} app-arch/xz-utils"
|
||||
fi
|
||||
@ -132,11 +132,7 @@ DEPEND="${DEPEND} ${RDEPEND}"
|
||||
# >=dev-lang/orc-0.4.23 rely on environment variables to find a place to
|
||||
# allocate files to mmap.
|
||||
gstreamer_environment_reset() {
|
||||
export XDG_RUNTIME_DIR="${T}/run"
|
||||
mkdir -p "${XDG_RUNTIME_DIR}"
|
||||
# This directory needs to be owned by the user, and chmod 0700
|
||||
# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
chmod 0700 "${XDG_RUNTIME_DIR}"
|
||||
xdg_environment_reset
|
||||
}
|
||||
|
||||
# @FUNCTION: gstreamer_get_plugins
|
||||
@ -236,7 +232,7 @@ gstreamer_multilib_src_configure() {
|
||||
einfo "Configuring to build ${GST_PLUGINS_BUILD} plugin(s) ..."
|
||||
econf \
|
||||
--with-package-name="Gentoo GStreamer ebuild" \
|
||||
--with-package-origin="http://www.gentoo.org" \
|
||||
--with-package-origin="https://www.gentoo.org" \
|
||||
"${gst_conf[@]}" "${@}"
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gtk-sharp-module.eclass,v 1.37 2014/01/19 21:13:08 moult Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: gtk-sharp-module.eclass
|
||||
# @MAINTAINER:
|
||||
@ -87,13 +87,23 @@ 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.*)
|
||||
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"
|
||||
@ -126,7 +136,7 @@ case ${GTK_SHARP_MODULE} in
|
||||
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-gapi-${GTK_SHARP_REQUIRED_VERSION}*"
|
||||
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!"
|
||||
@ -275,8 +285,13 @@ S="${WORKDIR}/${TARBALL}-${PV}"
|
||||
# @ECLASS-VARIABLE: SRC_URI
|
||||
# @DESCRIPTION:
|
||||
# Default value: mirror://gnome/sources/${TARBALL}/${PV_MAJOR}/${TARBALL}-${PV}.tar.bz2
|
||||
SRC_URI="${SRC_URI}
|
||||
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>
|
||||
@ -522,13 +537,13 @@ gtk-sharp-module_src_configure() {
|
||||
# @FUNCTION: gtk-sharp-module_src_compile
|
||||
# @DESCRIPTION:
|
||||
# Calls emake in the subdir of the module.
|
||||
# Sets CSC=/usr/bin/gmcs. Deletes top_srcdir Makefiles to prevent recursing in
|
||||
# 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/gmcs || die "emake failed"
|
||||
emake CSC=/usr/bin/mcs || die "emake failed"
|
||||
}
|
||||
|
||||
# @FUNCTION: gtk-sharp-module_src_install
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.51 2015/04/04 20:33:05 slyfox Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: haskell-cabal.eclass
|
||||
# @MAINTAINER:
|
||||
@ -103,7 +103,13 @@ if [[ -n "${CABAL_USE_HADDOCK}" ]]; then
|
||||
IUSE="${IUSE} doc"
|
||||
# don't require depend on itself to build docs.
|
||||
# ebuild bootstraps docs from just built binary
|
||||
[[ ${CATEGORY}/${PN} = "dev-haskell/haddock" ]] || DEPEND="${DEPEND} doc? ( dev-haskell/haddock )"
|
||||
#
|
||||
# starting from ghc-7.10.2 we install haddock bundled with
|
||||
# ghc to keep links to base and ghc library, otherwise
|
||||
# newer haddock versions change index format and can't
|
||||
# read index files for packages coming with ghc.
|
||||
[[ ${CATEGORY}/${PN} = "dev-haskell/haddock" ]] || \
|
||||
DEPEND="${DEPEND} doc? ( || ( dev-haskell/haddock >=dev-lang/ghc-7.10.2 ) )"
|
||||
fi
|
||||
|
||||
if [[ -n "${CABAL_USE_HSCOLOUR}" ]]; then
|
||||
@ -172,6 +178,8 @@ cabal-version() {
|
||||
cabal-bootstrap() {
|
||||
local setupmodule
|
||||
local cabalpackage
|
||||
local setup_bootstrap_args=()
|
||||
|
||||
if [[ -f "${S}/Setup.lhs" ]]; then
|
||||
setupmodule="${S}/Setup.lhs"
|
||||
elif [[ -f "${S}/Setup.hs" ]]; then
|
||||
@ -192,8 +200,16 @@ cabal-bootstrap() {
|
||||
cabalpackage=Cabal-$(cabal-version)
|
||||
einfo "Using cabal-$(cabal-version)."
|
||||
|
||||
if $(ghc-supports-threaded-runtime); then
|
||||
# Cabal has a bug that deadlocks non-threaded RTS:
|
||||
# https://bugs.gentoo.org/537500
|
||||
# https://github.com/haskell/cabal/issues/2398
|
||||
setup_bootstrap_args+=(-threaded)
|
||||
fi
|
||||
|
||||
make_setup() {
|
||||
set -- -package "${cabalpackage}" --make "${setupmodule}" \
|
||||
"${setup_bootstrap_args[@]}" \
|
||||
${HCFLAGS} \
|
||||
${GHC_BOOTSTRAP_FLAGS} \
|
||||
"$@" \
|
||||
@ -230,7 +246,7 @@ cabal-mksetup() {
|
||||
rm -vf "${setupdir}"/Setup.{lhs,hs}
|
||||
elog "Creating 'Setup.hs' for 'Simple' build type."
|
||||
|
||||
echo 'import Distribution.Simple; main = defaultMainWithHooks defaultUserHooks' \
|
||||
echo 'import Distribution.Simple; main = defaultMain' \
|
||||
> "${setup_src}" || die "failed to create default Setup.hs"
|
||||
}
|
||||
|
||||
@ -311,7 +327,15 @@ cabal-configure() {
|
||||
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
|
||||
|
||||
if [[ -n "${CABAL_USE_HADDOCK}" ]] && use doc; then
|
||||
cabalconf+=(--with-haddock=${EPREFIX}/usr/bin/haddock)
|
||||
# We use the bundled with GHC version if exists
|
||||
# Haddock is very picky about index files
|
||||
# it generates for ghc's base and other packages.
|
||||
local p=${EPREFIX}/usr/bin/haddock-ghc-$(ghc-version)
|
||||
if [[ -f $p ]]; then
|
||||
cabalconf+=(--with-haddock="${p}")
|
||||
else
|
||||
cabalconf+=(--with-haddock=${EPREFIX}/usr/bin/haddock)
|
||||
fi
|
||||
fi
|
||||
if [[ -n "${CABAL_USE_PROFILE}" ]] && use profile; then
|
||||
cabalconf+=(--enable-library-profiling)
|
||||
@ -469,12 +493,9 @@ cabal-pkg() {
|
||||
# CABAL_CORE_LIB_GHC_PV="7.10.* PM:7.8.4-r1".
|
||||
cabal-is-dummy-lib() {
|
||||
local bin_ghc_version=$(ghc-version)
|
||||
local pm_ghc_p=$(best_version dev-lang/ghc)
|
||||
local pm_ghc_version version
|
||||
local pm_ghc_version=$(ghc-pm-version)
|
||||
|
||||
pm_ghc_version=PM:${pm_ghc_p#dev-lang/ghc-}
|
||||
|
||||
for version in ${CABAL_CORE_LIB_GHC_PV[*]}; do
|
||||
for version in ${CABAL_CORE_LIB_GHC_PV}; do
|
||||
[[ "${bin_ghc_version}" == ${version} ]] && return 0
|
||||
[[ "${pm_ghc_version}" == ${version} ]] && return 0
|
||||
done
|
||||
@ -502,13 +523,13 @@ haskell-cabal_pkg_setup() {
|
||||
haskell-cabal_src_configure() {
|
||||
cabal-is-dummy-lib && return
|
||||
|
||||
pushd "${S}" > /dev/null
|
||||
pushd "${S}" > /dev/null || die
|
||||
|
||||
cabal-bootstrap
|
||||
|
||||
cabal-configure "$@"
|
||||
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# exported function: nice alias
|
||||
@ -571,15 +592,15 @@ cabal_src_compile() {
|
||||
}
|
||||
|
||||
haskell-cabal_src_compile() {
|
||||
pushd "${S}" > /dev/null
|
||||
pushd "${S}" > /dev/null || die
|
||||
|
||||
cabal_src_compile "$@"
|
||||
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
haskell-cabal_src_test() {
|
||||
pushd "${S}" > /dev/null
|
||||
pushd "${S}" > /dev/null || die
|
||||
|
||||
if cabal-is-dummy-lib; then
|
||||
einfo ">>> No tests for dummy library: ${CATEGORY}/${PF}"
|
||||
@ -590,7 +611,7 @@ haskell-cabal_src_test() {
|
||||
./setup "$@" || die "cabal test failed"
|
||||
fi
|
||||
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# exported function: cabal-style copy and register
|
||||
@ -614,11 +635,11 @@ cabal_src_install() {
|
||||
}
|
||||
|
||||
haskell-cabal_src_install() {
|
||||
pushd "${S}" > /dev/null
|
||||
pushd "${S}" > /dev/null || die
|
||||
|
||||
cabal_src_install
|
||||
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
haskell-cabal_pkg_postinst() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/horde.eclass,v 1.40 2011/12/27 17:55:12 fauli Exp $
|
||||
# $Id$
|
||||
#
|
||||
# Help manage the horde project http://www.horde.org/
|
||||
#
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/intel-sdp.eclass,v 1.22 2015/06/15 19:09:28 jlec Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: intel-sdp.eclass
|
||||
# @MAINTAINER:
|
||||
@ -8,6 +8,13 @@
|
||||
# Sci Team <sci@gentoo.org>
|
||||
# @BLURB: Handling of Intel's Software Development Products package management
|
||||
|
||||
if [[ ! ${_INTEL_SDP_ECLASS_} ]]; then
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
4|5) ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
# @ECLASS-VARIABLE: INTEL_DID
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
@ -42,7 +49,6 @@
|
||||
# Must be defined before inheriting the eclass
|
||||
|
||||
# @ECLASS-VARIABLE: INTEL_TARX
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# The package extention.
|
||||
# To find out its value, see the links to download in
|
||||
@ -78,7 +84,6 @@
|
||||
: ${INTEL_X86:=i486}
|
||||
|
||||
# @ECLASS-VARIABLE: INTEL_BIN_RPMS
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Functional name of rpm without any version/arch tag
|
||||
#
|
||||
@ -88,9 +93,9 @@
|
||||
# specify the full path
|
||||
#
|
||||
# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
|
||||
: ${INTEL_BIN_RPMS:=""}
|
||||
|
||||
# @ECLASS-VARIABLE: INTEL_DAT_RPMS
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Functional name of rpm of common data which are arch free
|
||||
# without any version tag
|
||||
@ -101,6 +106,7 @@
|
||||
# specify the full path
|
||||
#
|
||||
# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
|
||||
: ${INTEL_DAT_RPMS:=""}
|
||||
|
||||
# @ECLASS-VARIABLE: INTEL_SINGLE_ARCH
|
||||
# @DESCRIPTION:
|
||||
@ -144,13 +150,11 @@ _INTEL_SDP_YEAR=${INTEL_DPV%_update*}
|
||||
_INTEL_SDP_YEAR=${INTEL_DPV%_sp*}
|
||||
|
||||
# @ECLASS-VARIABLE: INTEL_SDP_DIR
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Full rootless path to installation dir
|
||||
INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}.${_INTEL_PV3}.${_INTEL_PV4}"
|
||||
|
||||
# @ECLASS-VARIABLE: INTEL_SDP_EDIR
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Full rooted path to installation dir
|
||||
INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
|
||||
@ -171,8 +175,10 @@ QA_PREBUILT="${INTEL_SDP_DIR}/*"
|
||||
# @DESCRIPTION:
|
||||
# Creating necessary links to use intel compiler with eclipse
|
||||
_isdp_link_eclipse_plugins() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
local c f
|
||||
pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
|
||||
pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null || die
|
||||
for c in cdt*; do
|
||||
local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
|
||||
if has_version "dev-util/eclipse-sdk:${ev}"; then
|
||||
@ -189,7 +195,7 @@ _isdp_link_eclipse_plugins() {
|
||||
done
|
||||
fi
|
||||
done
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: _isdp_big-warning
|
||||
@ -198,6 +204,8 @@ _isdp_link_eclipse_plugins() {
|
||||
# @DESCRIPTION:
|
||||
# warn user that we really require a license
|
||||
_isdp_big-warning() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
case ${1} in
|
||||
pre-check )
|
||||
echo ""
|
||||
@ -233,6 +241,8 @@ _isdp_big-warning() {
|
||||
# @DESCRIPTION:
|
||||
# Testing for valid license by asking for version information of the compiler
|
||||
_isdp_version_test() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
local comp comp_full arch warn
|
||||
case ${PN} in
|
||||
ifc )
|
||||
@ -272,8 +282,11 @@ _isdp_version_test() {
|
||||
|
||||
# @FUNCTION: _isdp_run-test
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# Test if installed compiler is working
|
||||
_isdp_run-test() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
|
||||
case ${PN} in
|
||||
ifc | icc )
|
||||
@ -287,11 +300,13 @@ _isdp_run-test() {
|
||||
|
||||
# @FUNCTION: intel-sdp_pkg_pretend
|
||||
# @DESCRIPTION:
|
||||
# @CODE
|
||||
#
|
||||
# * Check that the user has a (valid) license file before going on.
|
||||
#
|
||||
# * Check for space requirements being fullfilled
|
||||
# @CODE
|
||||
intel-sdp_pkg_pretend() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
local warn=1 dir dirs ret arch a p
|
||||
|
||||
: ${CHECKREQS_DISK_BUILD:=256M}
|
||||
@ -333,6 +348,7 @@ intel-sdp_pkg_pretend() {
|
||||
# @DESCRIPTION:
|
||||
# Setting up and sorting some internal variables
|
||||
intel-sdp_pkg_setup() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
local arch a p
|
||||
|
||||
if use x86; then
|
||||
@ -416,6 +432,8 @@ intel-sdp_src_unpack() {
|
||||
# @DESCRIPTION:
|
||||
# Install everything
|
||||
intel-sdp_src_install() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
if path_exists "${INTEL_SDP_DIR}"/uninstall*; then
|
||||
ebegin "Cleaning out uninstall information"
|
||||
find "${INTEL_SDP_DIR}"/uninstall* -delete || die
|
||||
@ -478,6 +496,8 @@ intel-sdp_src_install() {
|
||||
# @DESCRIPTION:
|
||||
# Add things to intel database
|
||||
intel-sdp_pkg_postinst() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
# add product registry to intel "database"
|
||||
local l r
|
||||
for r in ${INTEL_RPMS}; do
|
||||
@ -497,6 +517,8 @@ intel-sdp_pkg_postinst() {
|
||||
# @DESCRIPTION:
|
||||
# Sanitize intel database
|
||||
intel-sdp_pkg_postrm() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
# remove from intel "database"
|
||||
if [[ -e ${INTEL_SDP_DB} ]]; then
|
||||
local r
|
||||
@ -514,8 +536,6 @@ intel-sdp_pkg_postrm() {
|
||||
}
|
||||
|
||||
EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend
|
||||
case "${EAPI:-0}" in
|
||||
0|1|2|3)die "EAPI=${EAPI} is not supported anymore" ;;
|
||||
4|5) ;;
|
||||
*) die "EAPI=${EAPI} is not supported" ;;
|
||||
esac
|
||||
|
||||
_INTEL_SDP_ECLASS_=1
|
||||
fi
|
||||
|
||||
@ -1,20 +1,6 @@
|
||||
# eclass for ant based Java packages
|
||||
#
|
||||
# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
|
||||
# Copyright (c) 2004-2011, Gentoo Foundation
|
||||
# Changes:
|
||||
# May 2007:
|
||||
# Made bsfix make one pass for all things and add some glocal targets for
|
||||
# setting up the whole thing. Contributed by kiorky
|
||||
# (kiorky@cryptelium.net).
|
||||
# December 2006:
|
||||
# I pretty much rewrote the logic of the bsfix functions
|
||||
# and xml-rewrite.py because they were so slow
|
||||
# Petteri Räty (betelgeuse@gentoo.org)
|
||||
#
|
||||
# Licensed under the GNU General Public License, v2
|
||||
#
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.59 2015/01/23 22:48:10 monsieurp Exp $
|
||||
# Copyright 2004-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: java-ant-2.eclass
|
||||
# @MAINTAINER:
|
||||
@ -58,7 +44,8 @@ inherit java-utils-2 multilib
|
||||
# Setting this variable non-empty before inheriting java-ant-2 disables adding
|
||||
# dev-java/ant-core into DEPEND.
|
||||
if [[ -z "${JAVA_ANT_DISABLE_ANT_CORE_DEP}" ]]; then
|
||||
JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} >=dev-java/ant-core-1.8.2"
|
||||
JAVA_ANT_E_DEPEND+=" >=dev-java/ant-core-1.8.2"
|
||||
[[ "${EAPI:-0}" != 0 ]] && JAVA_ANT_E_DEPEND+=":0"
|
||||
fi
|
||||
|
||||
# add ant tasks specified in WANT_ANT_TASKS to DEPEND
|
||||
@ -167,7 +154,7 @@ java-ant_bsfix() {
|
||||
echo "QA Notice: Package is using java-ant, but doesn't depend on a Java VM"
|
||||
fi
|
||||
|
||||
pushd "${S}" >/dev/null
|
||||
pushd "${S}" >/dev/null || die
|
||||
|
||||
local find_args=""
|
||||
[[ "${JAVA_PKG_BSFIX_ALL}" == "yes" ]] || find_args="-maxdepth 1"
|
||||
@ -185,7 +172,7 @@ java-ant_bsfix() {
|
||||
|
||||
[[ "${bsfix_these// /}" ]] && eval java-ant_bsfix_files ${bsfix_these}
|
||||
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
_bsfix_die() {
|
||||
|
||||
@ -1,17 +1,14 @@
|
||||
# Eclass for Java packages from bare sources exported by Maven
|
||||
#
|
||||
# Copyright (c) 2004-2011, Gentoo Foundation
|
||||
#
|
||||
# Licensed under the GNU General Public License, v2
|
||||
#
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-mvn-src.eclass,v 1.2 2011/12/27 17:55:12 fauli Exp $
|
||||
# Copyright 2004-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
inherit java-pkg-simple
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @eclass-begin
|
||||
# @eclass-summary Eclass for Java packages from bare sources exported by Maven
|
||||
#
|
||||
# @ECLASS: java-mvn-src.eclass
|
||||
# @MAINTAINER:
|
||||
# java@gentoo.org
|
||||
# @AUTHOR:
|
||||
# Java maintainers (java@gentoo.org)
|
||||
# @BLURB: Eclass for Java packages from bare sources exported by Maven
|
||||
# @DESCRIPTION:
|
||||
# This class is intended to build pure Java packages from the sources exported
|
||||
# from the source:jar goal of Maven 2. These archives contain bare Java source
|
||||
# files, with no build instructions or additional resource files. They are
|
||||
@ -20,38 +17,30 @@ inherit java-pkg-simple
|
||||
# are often released together with binary packages, whereas the full build
|
||||
# environment might be contained in some revision control system or not
|
||||
# available at all.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-external GROUP_ID
|
||||
# @variable-default ${PN}
|
||||
#
|
||||
# The groupId of the artifact, in dotted notation.
|
||||
# -----------------------------------------------------------------------------
|
||||
inherit java-pkg-simple
|
||||
|
||||
# @ECLASS-VARIABLE: GROUP_ID
|
||||
# @DESCRIPTION:
|
||||
# The groupId of the artifact, in dotted notation. Default value is ${PN}.
|
||||
: ${GROUP_ID:=${PN}}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-external ARTIFACT_ID
|
||||
# @variable-default ${PN}
|
||||
#
|
||||
# The artifactId of the artifact.
|
||||
# -----------------------------------------------------------------------------
|
||||
# @ECLASS-VARIABLE: ARTIFACT_ID
|
||||
# @DESCRIPTION:
|
||||
# The artifactId of the artifact. Default value is ${PN}.
|
||||
: ${ARTIFACT_ID:=${PN}}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-external MAVEN2_REPOSITORIES
|
||||
# @variable-default http://repo2.maven.org/maven2 http://download.java.net/maven/2
|
||||
#
|
||||
# @ECLASS-VARIABLE: MAVEN2_REPOSITORIES
|
||||
# @DESCRIPTION:
|
||||
# The repositories to search for the artifacts. Must follow Maven2 layout.
|
||||
# -----------------------------------------------------------------------------
|
||||
# Default value is the following string:
|
||||
# "http://repo2.maven.org/maven2 http://download.java.net/maven/2"
|
||||
: ${MAVEN2_REPOSITORIES:="http://repo2.maven.org/maven2 http://download.java.net/maven/2"}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-internal RELATIVE_SRC_URI
|
||||
#
|
||||
# @ECLASS-VARIABLE: RELATIVE_SRC_URI
|
||||
# @DESCRIPTION:
|
||||
# The path of the source artifact relative to the root of the repository.
|
||||
# Will be set by the eclass to follow Maven 2 repository layout.
|
||||
# -----------------------------------------------------------------------------
|
||||
RELATIVE_SRC_URI=${GROUP_ID//./\/}/${ARTIFACT_ID}/${PV}/${ARTIFACT_ID}-${PV}-sources.jar
|
||||
|
||||
# Look for source jar in all listed repositories
|
||||
@ -59,7 +48,3 @@ for repo in ${MAVEN2_REPOSITORIES}; do
|
||||
SRC_URI="${SRC_URI} ${repo}/${RELATIVE_SRC_URI}"
|
||||
done
|
||||
unset repo
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# @eclass-end
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
@ -1,32 +1,27 @@
|
||||
# Base eclass for Java packages that needs to be OSGi compliant
|
||||
#
|
||||
# Copyright (c) 2007, Jean-Noël Rivasseau <elvanor@gmail.com>
|
||||
# Copyright (c) 2007-2011, Gentoo Foundation
|
||||
#
|
||||
# Licensed under the GNU General Public License, v2
|
||||
#
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-osgi.eclass,v 1.7 2011/12/27 17:55:12 fauli Exp $
|
||||
# Copyright 2007-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @eclass-begin
|
||||
# @eclass-shortdesc Java OSGi eclass
|
||||
# @eclass-maintainer java@gentoo.org
|
||||
#
|
||||
# This eclass provides functionality which is used by
|
||||
# packages that need to be OSGi compliant. This means
|
||||
# that the generated jars will have special headers in their manifests.
|
||||
# Currently this is used only by Eclipse-3.3 - later
|
||||
# we could extend this so that Gentoo Java system would be
|
||||
# fully OSGi compliant.
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
# @ECLASS: java-osgi.eclass
|
||||
# @MAINTAINER:
|
||||
# java@gentoo.org
|
||||
# @AUTHOR:
|
||||
# Java maintainers (java@gentoo.org)
|
||||
# @BLURB: Java OSGi eclass
|
||||
# @DESCRIPTION:
|
||||
# This eclass provides functionality which is used by packages that need to be
|
||||
# OSGi compliant. This means that the generated jars will have special headers
|
||||
# in their manifests. Currently this is used only by Eclipse-3.3 - later we
|
||||
# could extend this so that Gentoo Java system would be fully OSGi compliant.
|
||||
|
||||
inherit java-utils-2
|
||||
|
||||
# @ECLASS-VARIABLE: _OSGI_T
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# We define _OSGI_T so that it does not contain a slash at the end.
|
||||
# According to Paludis guys, there is currently a proposal for EAPIs that
|
||||
# would require all variables to end with a slash.
|
||||
|
||||
_OSGI_T="${T/%\//}"
|
||||
|
||||
# must get Diego to commit something like this to portability.eclass
|
||||
@ -41,18 +36,17 @@ _canonicalise() {
|
||||
fi
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @ebuild-function _java-osgi_plugin
|
||||
#
|
||||
# @FUNCTION: _java-osgi_plugin
|
||||
# @USAGE: <plugin name>
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# This is an internal function, not to be called directly.
|
||||
#
|
||||
# @example
|
||||
# @CODE
|
||||
# _java-osgi_plugin "JSch"
|
||||
# @CODE
|
||||
#
|
||||
# @param $1 - bundle name
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_java-osgi_plugin() {
|
||||
# We hardcode Gentoo as the vendor name
|
||||
|
||||
@ -62,21 +56,20 @@ _java-osgi_plugin() {
|
||||
EOF
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @ebuild-function _java-osgi_makejar
|
||||
#
|
||||
# @FUNCTION: _java-osgi_makejar
|
||||
# @USAGE: <jar name> <symbolic name> <bundle name> <header name>
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# This is an internal function, not to be called directly.
|
||||
#
|
||||
# @example
|
||||
# @CODE
|
||||
# _java-osgi_makejar "dist/${PN}.jar" "com.jcraft.jsch" "JSch" "com.jcraft.jsch, com.jcraft.jsch.jce;x-internal:=true"
|
||||
# @CODE
|
||||
#
|
||||
# @param $1 - name of jar to repackage with OSGi
|
||||
# @param $2 - bundle symbolic name
|
||||
# @param $3 - bundle name
|
||||
# @param $4 - export-package header
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_java-osgi_makejar() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
@ -109,9 +102,9 @@ _java-osgi_makejar() {
|
||||
rm -rf "${_OSGI_T}/tmp_jar"
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @ebuild-function java-osgi_dojar
|
||||
#
|
||||
# @FUNCTION: @java-osgi_dojar
|
||||
# @USAGE: <jar name> <symbolic name> <bundle name> <header name>
|
||||
# @DESCRIPTION:
|
||||
# Rewrites a jar, and produce an OSGi compliant jar from arguments given on the command line.
|
||||
# The arguments given correspond to the minimal set of headers
|
||||
# that must be present on a Manifest file of an OSGi package.
|
||||
@ -119,16 +112,14 @@ _java-osgi_makejar() {
|
||||
# that create the Manifest from a file.
|
||||
# It will call java-pkg_dojar at the end.
|
||||
#
|
||||
# @example
|
||||
# @CODE
|
||||
# java-osgi_dojar "dist/${PN}.jar" "com.jcraft.jsch" "JSch" "com.jcraft.jsch, com.jcraft.jsch.jce;x-internal:=true"
|
||||
# @CODE
|
||||
#
|
||||
# @param $1 - name of jar to repackage with OSGi
|
||||
# @param $2 - bundle symbolic name
|
||||
# @param $3 - bundle name
|
||||
# @param $4 - export-package-header
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
java-osgi_dojar() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
local jarName="$(basename ${1})"
|
||||
@ -136,9 +127,9 @@ java-osgi_dojar() {
|
||||
java-pkg_dojar "${_OSGI_T}/osgi/${jarName}"
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @ebuild-function java-osgi_newjar
|
||||
#
|
||||
# @FUNCTION: java-osgi_newjar
|
||||
# @USAGE: <jar name> <symbolic name> <bundle name> <header name>
|
||||
# @DESCRIPTION:
|
||||
# Rewrites a jar, and produce an OSGi compliant jar.
|
||||
# The arguments given correspond to the minimal set of headers
|
||||
# that must be present on a Manifest file of an OSGi package.
|
||||
@ -146,17 +137,15 @@ java-osgi_dojar() {
|
||||
# that create the Manifest from a file.
|
||||
# It will call java-pkg_newjar at the end.
|
||||
#
|
||||
# @example
|
||||
# @CODE
|
||||
# java-osgi_newjar "dist/${PN}.jar" "com.jcraft.jsch" "JSch" "com.jcraft.jsch, com.jcraft.jsch.jce;x-internal:=true"
|
||||
# @CODE
|
||||
#
|
||||
# @param $1 - name of jar to repackage with OSGi
|
||||
# @param $2 (optional) - name of the target jar. It will default to package name if not specified.
|
||||
# @param $3 - bundle symbolic name
|
||||
# @param $4 - bundle name
|
||||
# @param $5 - export-package header
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
java-osgi_newjar() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
local jarName="$(basename $1)"
|
||||
@ -170,21 +159,20 @@ java-osgi_newjar() {
|
||||
fi
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @ebuild-function _java-osgi_makejar-fromfile
|
||||
#
|
||||
# @FUNCTION:_java-osgi_makejar-fromfile
|
||||
# @USAGE: <jar to repackage with OSGi> <Manifest file> <bundle name> <version rewriting>
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# This is an internal function, not to be called directly.
|
||||
#
|
||||
# @example
|
||||
# @CODE
|
||||
# _java-osgi_makejar-fromfile "dist/${PN}.jar" "${FILESDIR}/MANIFEST.MF" "JSch" 1
|
||||
# @CODE
|
||||
#
|
||||
# @param $1 - name of jar to repackage with OSGi
|
||||
# @param $2 - path to the Manifest file
|
||||
# @param $3 - bundle name
|
||||
# @param $4 - automatic version rewriting (0 or 1)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_java-osgi_makejar-fromfile() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
@ -217,27 +205,26 @@ _java-osgi_makejar-fromfile() {
|
||||
rm -rf "${_OSGI_T}/tmp_jar"
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @ebuild-function java-osgi_newjar-fromfile()
|
||||
#
|
||||
# @FUNCTION: java-osgi_newjar-fromfile
|
||||
# @USAGE: <jar to repackage with OSGi> <Manifest file> <bundle name> <version rewriting>
|
||||
# @DESCRIPTION:
|
||||
# This function produces an OSGi compliant jar from a given manifest file.
|
||||
# The Manifest Bundle-Version header will be replaced by the current version
|
||||
# of the package, unless the --no-auto-version option is given.
|
||||
# It will call java-pkg_newjar at the end.
|
||||
#
|
||||
# @example
|
||||
# @CODE
|
||||
# java-osgi_newjar-fromfile "dist/${PN}.jar" "${FILESDIR}/MANIFEST.MF" "Standard Widget Toolkit for GTK 2.0"
|
||||
# @CODE
|
||||
#
|
||||
# @param $opt
|
||||
# --no-auto-version - This option disables automatic rewriting of the
|
||||
# version in the Manifest file#
|
||||
# version in the Manifest file
|
||||
#
|
||||
# @param $1 - name of jar to repackage with OSGi
|
||||
# @param $2 (optional) - name of the target jar. It will default to package name if not specified.
|
||||
# @param $3 - path to the Manifest file
|
||||
# @param $4 - bundle name
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
java-osgi_newjar-fromfile() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
local versionRewriting=1
|
||||
@ -257,26 +244,25 @@ java-osgi_newjar-fromfile() {
|
||||
fi
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @ebuild-function java-osgi_dojar-fromfile()
|
||||
#
|
||||
# @FUNCTION: java-osgi_dojar-fromfile()
|
||||
# @USAGE: <jar to repackage with OSGi> <Manifest file> <bundle name>
|
||||
# @DESCRIPTION:
|
||||
# This function produces an OSGi compliant jar from a given manifestfile.
|
||||
# The Manifest Bundle-Version header will be replaced by the current version
|
||||
# of the package, unless the --no-auto-version option is given.
|
||||
# It will call java-pkg_dojar at the end.
|
||||
#
|
||||
# @example
|
||||
# @CODE
|
||||
# java-osgi_dojar-fromfile "dist/${PN}.jar" "${FILESDIR}/MANIFEST.MF" "Standard Widget Toolkit for GTK 2.0"
|
||||
# @CODE
|
||||
#
|
||||
# @param $opt
|
||||
# --no-auto-version - This option disables automatic rewriting of the
|
||||
# version in the Manifest file
|
||||
#
|
||||
# @param $1 - name of jar to repackage with OSGi
|
||||
# @param $2 - path to the Manifest file
|
||||
# @param $3 - bundle name
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
java-osgi_dojar-fromfile() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
local versionRewriting=1
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
# Eclass for Java packages
|
||||
#
|
||||
# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
|
||||
# Copyright (c) 2004-2015, Gentoo Foundation
|
||||
#
|
||||
# Licensed under the GNU General Public License, v2
|
||||
#
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.41 2015/06/17 09:48:12 chewi Exp $
|
||||
# Copyright 2004-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: java-pkg-2.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,16 +1,6 @@
|
||||
# Eclass for optional Java packages
|
||||
#
|
||||
# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
|
||||
# Copyright (c) 2004-2011, Gentoo Foundation
|
||||
#
|
||||
# Licensed under the GNU General Public License, v2
|
||||
#
|
||||
# Major changes:
|
||||
# 20070805:
|
||||
# Removed phase hooks because Portage does proper env saving now.
|
||||
# <betelgeuse@gentoo.org>
|
||||
#
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-opt-2.eclass,v 1.16 2012/07/21 12:00:17 sera Exp $
|
||||
# Copyright 2004-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: java-pkg-opt-2.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,21 +1,14 @@
|
||||
# Eclass for simple bare-source Java packages
|
||||
#
|
||||
# Copyright (c) 2004-2015, Gentoo Foundation
|
||||
#
|
||||
# Licensed under the GNU General Public License, v2
|
||||
#
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-simple.eclass,v 1.6 2015/05/24 20:40:40 chewi Exp $
|
||||
# Copyright 2004-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
inherit java-utils-2
|
||||
|
||||
if ! has java-pkg-2 ${INHERITED}; then
|
||||
eerror "java-pkg-simple eclass can only be inherited AFTER java-pkg-2"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @eclass-begin
|
||||
# @eclass-summary Eclass for Java sources without build instructions
|
||||
#
|
||||
# @ECLASS: java-pkg-simple.eclass
|
||||
# @MAINTAINER:
|
||||
# java@gentoo.org
|
||||
# @AUTHOR:
|
||||
# Java maintainers (java@gentoo.org)
|
||||
# @BLURB: Eclass for packaging Java software with ease.
|
||||
# @DESCRIPTION:
|
||||
# This class is intended to build pure Java packages from Java sources
|
||||
# without the use of any build instructions shipped with the sources.
|
||||
# There is no support for resources besides the generated class files,
|
||||
@ -23,92 +16,75 @@ fi
|
||||
# the resulting jar, although these issues may be addressed by an
|
||||
# ebuild by putting corresponding files into the target directory
|
||||
# before calling the src_compile function of this eclass.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
inherit java-utils-2
|
||||
|
||||
if ! has java-pkg-2 ${INHERITED}; then
|
||||
eerror "java-pkg-simple eclass can only be inherited AFTER java-pkg-2"
|
||||
fi
|
||||
|
||||
EXPORT_FUNCTIONS src_compile src_install
|
||||
|
||||
# We are only interested in finding all java source files, wherever they may be.
|
||||
S="${WORKDIR}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-external JAVA_GENTOO_CLASSPATH
|
||||
# @variable-default ""
|
||||
#
|
||||
# @ECLASS-VARIABLE: JAVA_GENTOO_CLASSPATH
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Comma or space separated list of java packages to include in the
|
||||
# class path. The packages will also be registered as runtime
|
||||
# dependencies of this new package. Dependencies will be calculated
|
||||
# transitively. See "java-config -l" for appropriate package names.
|
||||
# -----------------------------------------------------------------------------
|
||||
# JAVA_GENTOO_CLASSPATH
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-external JAVA_CLASSPATH_EXTRA
|
||||
# @variable-default ""
|
||||
#
|
||||
# @CODE
|
||||
# JAVA_GENTOO_CLASSPATH="foo,bar-2"
|
||||
# @CODE
|
||||
|
||||
# @ECLASS-VARIABLE: JAVA_GENTOO_CLASSPATH_EXTRA
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Extra list of colon separated path elements to be put on the
|
||||
# classpath when compiling sources.
|
||||
# -----------------------------------------------------------------------------
|
||||
# JAVA_CLASSPATH_EXTRA
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-external JAVA_SRC_DIR
|
||||
# @variable-default ""
|
||||
#
|
||||
# @ECLASS-VARIABLE: JAVA_SRC_DIR
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Directories relative to ${S} which contain the sources of the
|
||||
# application. The default of "" will be treated mostly as ${S}
|
||||
# itself. For the generated source package (if source is listed in
|
||||
# ${JAVA_PKG_IUSE}), it is important that these directories are
|
||||
# actually the roots of the corresponding source trees.
|
||||
# -----------------------------------------------------------------------------
|
||||
# JAVA_SRC_DIR
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-external JAVA_ENCODING
|
||||
# @variable-default UTF-8
|
||||
#
|
||||
# The character encoding used in the source files
|
||||
# -----------------------------------------------------------------------------
|
||||
# @CODE
|
||||
# JAVA_SRC_DIR="src/java/org/gentoo"
|
||||
# @CODE
|
||||
|
||||
# @ECLASS-VARIABLE: JAVA_ENCODING
|
||||
# @DESCRIPTION:
|
||||
# The character encoding used in the source files.
|
||||
: ${JAVA_ENCODING:=UTF-8}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-external JAVAC_ARGS
|
||||
# @variable-default ""
|
||||
#
|
||||
# Additional arguments to be passed to javac
|
||||
# -----------------------------------------------------------------------------
|
||||
# JAVAC_ARGS
|
||||
# @ECLASS-VARIABLE: JAVAC_ARGS
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Additional arguments to be passed to javac.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-external JAVADOC_ARGS
|
||||
# @variable-default ""
|
||||
#
|
||||
# Additional arguments to be passed to javadoc
|
||||
# -----------------------------------------------------------------------------
|
||||
# JAVADOC_ARGS
|
||||
# @ECLASS-VARIABLE: JAVADOC_ARGS
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Additional arguments to be passed to javadoc.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# @variable-external JAVA_JAR_FILENAME
|
||||
# @variable-default ${PN}.jar
|
||||
#
|
||||
# The name of the jar file to create and install
|
||||
# -----------------------------------------------------------------------------
|
||||
# @ECLASS-VARIABLE: JAVA_JAR_FILENAME
|
||||
# @DESCRIPTION:
|
||||
# The name of the jar file to create and install.
|
||||
: ${JAVA_JAR_FILENAME:=${PN}.jar}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# @eclass-src_compile
|
||||
#
|
||||
# @FUNCTION: java-pkg-simple_src_compile
|
||||
# @DESCRIPTION:
|
||||
# src_compile for simple bare source java packages. Finds all *.java
|
||||
# sources in ${JAVA_SRC_DIR}, compiles them with the classpath
|
||||
# calculated from ${JAVA_GENTOO_CLASSPATH}, and packages the resulting
|
||||
# classes to ${JAVA_JAR_FILENAME}.
|
||||
#
|
||||
# variables:
|
||||
# JAVA_GENTOO_CLASSPATH - list java packages to put on the classpath.
|
||||
# JAVA_ENCODING - encoding of source files, used by javac and javadoc
|
||||
# JAVA_SRC_DIR - directories containing source files, relative to ${S}
|
||||
# JAVAC_ARGS - additional arguments to be passed to javac
|
||||
# JAVADOC_ARGS - additional arguments to be passed to javadoc
|
||||
# ------------------------------------------------------------------------------
|
||||
java-pkg-simple_src_compile() {
|
||||
local sources=sources.lst classes=target/classes apidoc=target/api
|
||||
|
||||
@ -117,7 +93,7 @@ java-pkg-simple_src_compile() {
|
||||
mkdir -p ${classes} || die "Could not create target directory"
|
||||
|
||||
# compile
|
||||
local classpath="${JAVA_CLASSPATH_EXTRA}" dependency
|
||||
local classpath="${JAVA_GENTOO_CLASSPATH_EXTRA}" dependency
|
||||
for dependency in ${JAVA_GENTOO_CLASSPATH}; do
|
||||
classpath="${classpath}:$(java-pkg_getjars ${dependency})" \
|
||||
|| die "getjars failed for ${dependency}"
|
||||
@ -126,16 +102,14 @@ java-pkg-simple_src_compile() {
|
||||
classpath=${classpath%:}
|
||||
classpath=${classpath#:}
|
||||
debug-print "CLASSPATH=${classpath}"
|
||||
java-pkg-simple_verbose-cmd \
|
||||
ejavac -d ${classes} -encoding ${JAVA_ENCODING} \
|
||||
ejavac -d ${classes} -encoding ${JAVA_ENCODING} \
|
||||
${classpath:+-classpath ${classpath}} ${JAVAC_ARGS} \
|
||||
@${sources}
|
||||
|
||||
# javadoc
|
||||
if has doc ${JAVA_PKG_IUSE} && use doc; then
|
||||
mkdir -p ${apidoc}
|
||||
java-pkg-simple_verbose-cmd \
|
||||
ejavadoc -d ${apidoc} \
|
||||
ejavadoc -d ${apidoc} \
|
||||
-encoding ${JAVA_ENCODING} -docencoding UTF-8 -charset UTF-8 \
|
||||
${classpath:+-classpath ${classpath}} ${JAVADOC_ARGS:- -quiet} \
|
||||
@${sources} || die "javadoc failed"
|
||||
@ -146,29 +120,24 @@ java-pkg-simple_src_compile() {
|
||||
if [[ -e ${classes}/META-INF/MANIFEST.MF ]]; then
|
||||
jar_args="cfm ${JAVA_JAR_FILENAME} ${classes}/META-INF/MANIFEST.MF"
|
||||
fi
|
||||
java-pkg-simple_verbose-cmd \
|
||||
jar ${jar_args} -C ${classes} . || die "jar failed"
|
||||
jar ${jar_args} -C ${classes} . || die "jar failed"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# @eclass-src_install
|
||||
#
|
||||
# @FUNCTION: java-pkg-simple_src_install
|
||||
# @DESCRIPTION:
|
||||
# src_install for simple single jar java packages. Simply packages the
|
||||
# contents from the target directory and installs it as
|
||||
# ${JAVA_JAR_FILENAME}. If the file target/META-INF/MANIFEST.MF exists,
|
||||
# it is used as the manifest of the created jar.
|
||||
# ------------------------------------------------------------------------------
|
||||
java-pkg-simple_src_install() {
|
||||
local sources=sources.lst classes=target/classes apidoc=target/api
|
||||
|
||||
# main jar
|
||||
java-pkg-simple_verbose-cmd \
|
||||
java-pkg_dojar ${JAVA_JAR_FILENAME}
|
||||
java-pkg_dojar ${JAVA_JAR_FILENAME}
|
||||
|
||||
# javadoc
|
||||
if has doc ${JAVA_PKG_IUSE} && use doc; then
|
||||
java-pkg-simple_verbose-cmd \
|
||||
java-pkg_dojavadoc ${apidoc}
|
||||
java-pkg_dojavadoc ${apidoc}
|
||||
fi
|
||||
|
||||
# dosrc
|
||||
@ -185,25 +154,6 @@ java-pkg-simple_src_install() {
|
||||
# take all directories actually containing any sources
|
||||
srcdirs="$(cut -d/ -f1 ${sources} | sort -u)"
|
||||
fi
|
||||
java-pkg-simple_verbose-cmd \
|
||||
java-pkg_dosrc ${srcdirs}
|
||||
java-pkg_dosrc ${srcdirs}
|
||||
fi
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# @internal-function java-pkg-simple_verbose-cmd
|
||||
#
|
||||
# Print a command before executing it. To give user some feedback
|
||||
# about what is going on, where the time is being spent, and also to
|
||||
# help debugging ebuilds.
|
||||
#
|
||||
# @param $@ - command to be called and its arguments
|
||||
# ------------------------------------------------------------------------------
|
||||
java-pkg-simple_verbose-cmd() {
|
||||
echo "$*"
|
||||
"$@"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# @eclass-end
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
@ -1,12 +1,6 @@
|
||||
# Base eclass for Java packages
|
||||
#
|
||||
# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
|
||||
# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
|
||||
# Copyright (c) 2004-2015, Gentoo Foundation
|
||||
#
|
||||
# Licensed under the GNU General Public License, v2
|
||||
#
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.164 2015/06/19 14:11:24 chewi Exp $
|
||||
# Copyright 2004-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: java-utils-2.eclass
|
||||
# @MAINTAINER:
|
||||
@ -126,6 +120,30 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
|
||||
# JAVA_PKG_WANT_TARGET=1.3 emerge bar
|
||||
# @CODE
|
||||
|
||||
# @ECLASS-VARIABLE: JAVA_PKG_DEBUG
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# A variable to be set with "yes" or "y", or ANY string of length non equal to
|
||||
# zero. When set, verbosity across java eclasses is increased and extra
|
||||
# logging is displayed.
|
||||
# @CODE
|
||||
# JAVA_PKG_DEBUG="yes"
|
||||
# @CODE
|
||||
|
||||
# @ECLASS-VARIABLE: JAVA_RM_FILES
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# An array containing a list of files to remove. If defined, this array will be
|
||||
# automatically handed over to java-pkg_rm_files for processing during the
|
||||
# src_prepare phase.
|
||||
#
|
||||
# @CODE
|
||||
# JAVA_RM_FILES=(
|
||||
# path/to/File1.java
|
||||
# DELETEME.txt
|
||||
# )
|
||||
# @CODE
|
||||
|
||||
# @VARIABLE: JAVA_PKG_COMPILER_DIR
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
@ -244,10 +262,46 @@ java-pkg_addres() {
|
||||
shift 2
|
||||
|
||||
pushd "${dir}" > /dev/null || die "pushd ${dir} failed"
|
||||
find -L -type f ! -path "./target/*" ! -path "./sources.lst" ! -name "MANIFEST.MF" ! -regex ".*\.\(class\|jar\|java\)" "${@}" -print0 | xargs -0 jar uf "${jar}" || die "jar failed"
|
||||
find -L -type f ! -path "./target/*" ! -path "./sources.lst" ! -name "MANIFEST.MF" ! -regex ".*\.\(class\|jar\|java\)" "${@}" -print0 | xargs -r0 jar uf "${jar}" || die "jar failed"
|
||||
popd > /dev/null || die "popd failed"
|
||||
}
|
||||
|
||||
# @FUNCTION: java-pkg_rm_files
|
||||
# @USAGE: java-pkg_rm_files File1.java File2.java ...
|
||||
# @DESCRIPTION:
|
||||
# Remove unneeded files in ${S}.
|
||||
#
|
||||
# Every now and then, you'll run into situations whereby a file needs removing,
|
||||
# be it a unit test or a regular java class.
|
||||
#
|
||||
# You can use this function by either:
|
||||
# - calling it yourself in java_prepare() and feeding java-pkg_rm_files with
|
||||
# the list of files you wish to remove.
|
||||
# - defining an array in the ebuild named JAVA_RM_FILES with the list of files
|
||||
# you wish to remove.
|
||||
#
|
||||
# Both way work and it is left to the developer's preferences. If the
|
||||
# JAVA_RM_FILES array is defined, it will be automatically handed over to
|
||||
# java-pkg_rm_files during the src_prepare phase.
|
||||
#
|
||||
# See java-utils-2_src_prepare.
|
||||
#
|
||||
# @CODE
|
||||
# java-pkg_rm_files File1.java File2.java
|
||||
# @CODE
|
||||
#
|
||||
# @param $* - list of files to remove.
|
||||
java-pkg_rm_files() {
|
||||
debug-print-function ${FUNCNAME} $*
|
||||
local IFS="\n"
|
||||
for filename in "$@"; do
|
||||
[[ ! -f "${filename}" ]] && die "${filename} is not a regular file. Aborting."
|
||||
einfo "Removing unneeded file ${filename}"
|
||||
rm -f "${S}/${filename}" || die "cannot remove ${filename}"
|
||||
eend $?
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: java-pkg_dojar
|
||||
# @USAGE: <jar1> [<jar2> ...]
|
||||
# @DESCRIPTION:
|
||||
@ -310,6 +364,15 @@ java-pkg_dojar() {
|
||||
fi
|
||||
done
|
||||
|
||||
# Extra logging if enabled.
|
||||
if [[ -n ${JAVA_PKG_DEBUG} ]]; then
|
||||
einfo "Verbose logging for \"${FUNCNAME}\" function"
|
||||
einfo "Jar file(s) destination: ${JAVA_PKG_JARDEST}"
|
||||
einfo "Jar file(s) created: ${@}"
|
||||
einfo "Complete command:"
|
||||
einfo "${FUNCNAME} ${@}"
|
||||
fi
|
||||
|
||||
java-pkg_do_write_
|
||||
}
|
||||
|
||||
@ -588,7 +651,6 @@ java-pkg_dojavadoc() {
|
||||
fi
|
||||
|
||||
# Actual installation
|
||||
|
||||
java-pkg_dohtml -r "${dir_to_install}"
|
||||
|
||||
# Let's make a symlink to the directory we have everything else under
|
||||
@ -598,6 +660,15 @@ java-pkg_dojavadoc() {
|
||||
debug-print "symlinking ${dest}/{api,${symlink}}"
|
||||
dosym ${dest}/{api,${symlink}} || die
|
||||
fi
|
||||
|
||||
# Extra logging if enabled.
|
||||
if [[ -n ${JAVA_PKG_DEBUG} ]]; then
|
||||
einfo "Verbose logging for \"${FUNCNAME}\" function"
|
||||
einfo "Documentation destination: ${dest}"
|
||||
einfo "Directory to install: ${dir_to_install}"
|
||||
einfo "Complete command:"
|
||||
einfo "${FUNCNAME} ${@}"
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: java-pkg_dosrc
|
||||
@ -649,7 +720,7 @@ java-pkg_dosrc() {
|
||||
if [[ ${result} != 12 && ${result} != 0 ]]; then
|
||||
die "failed to zip ${dir_name}"
|
||||
fi
|
||||
popd >/dev/null
|
||||
popd >/dev/null || die
|
||||
done
|
||||
|
||||
# Install the zip
|
||||
@ -657,6 +728,17 @@ java-pkg_dosrc() {
|
||||
doins ${zip_path} || die "Failed to install source"
|
||||
|
||||
JAVA_SOURCES="${JAVA_PKG_SOURCESPATH}/${zip_name}"
|
||||
|
||||
# Extra logging if enabled.
|
||||
if [[ -n ${JAVA_PKG_DEBUG} ]]; then
|
||||
einfo "Verbose logging for \"${FUNCNAME}\" function"
|
||||
einfo "Zip filename created: ${zip_name}"
|
||||
einfo "Zip file destination: ${JAVA_PKG_SOURCESPATH}"
|
||||
einfo "Directories zipped: ${@}"
|
||||
einfo "Complete command:"
|
||||
einfo "${FUNCNAME} ${@}"
|
||||
fi
|
||||
|
||||
java-pkg_do_write_
|
||||
}
|
||||
|
||||
@ -951,11 +1033,11 @@ java-pkg_jar-from() {
|
||||
java-pkg_record-jar_ --build-only "${target_pkg}" "${jar}"
|
||||
fi
|
||||
fi
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
# if no target was specified, we're ok
|
||||
if [[ -z "${target_jar}" ]] ; then
|
||||
return 0
|
||||
@ -1533,7 +1615,7 @@ java-pkg_get-target() {
|
||||
java-pkg_get-javac() {
|
||||
debug-print-function ${FUNCNAME} $*
|
||||
|
||||
|
||||
java-pkg_init-compiler_
|
||||
local compiler="${GENTOO_COMPILER}"
|
||||
|
||||
local compiler_executable
|
||||
@ -1552,18 +1634,15 @@ java-pkg_get-javac() {
|
||||
export JAVAC=${old_javac}
|
||||
|
||||
if [[ -z ${compiler_executable} ]]; then
|
||||
echo "JAVAC is empty or undefined in ${compiler_env}"
|
||||
return 1
|
||||
die "JAVAC is empty or undefined in ${compiler_env}"
|
||||
fi
|
||||
|
||||
# check that it's executable
|
||||
if [[ ! -x ${compiler_executable} ]]; then
|
||||
echo "${compiler_executable} doesn't exist, or isn't executable"
|
||||
return 1
|
||||
die "${compiler_executable} doesn't exist, or isn't executable"
|
||||
fi
|
||||
else
|
||||
echo "Could not find environment file for ${compiler}"
|
||||
return 1
|
||||
die "Could not find environment file for ${compiler}"
|
||||
fi
|
||||
fi
|
||||
echo ${compiler_executable}
|
||||
@ -1588,15 +1667,9 @@ java-pkg_javac-args() {
|
||||
debug-print "want target: ${want_target}"
|
||||
|
||||
if [[ -z "${want_source}" || -z "${want_target}" ]]; then
|
||||
debug-print "could not find valid -source/-target values for javac"
|
||||
echo "Could not find valid -source/-target values for javac"
|
||||
return 1
|
||||
die "Could not find valid -source/-target values for javac"
|
||||
else
|
||||
if java-pkg_is-vm-version-ge "1.4"; then
|
||||
echo "${source_str} ${target_str}"
|
||||
else
|
||||
echo "${target_str}"
|
||||
fi
|
||||
echo "${source_str} ${target_str}"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1729,8 +1802,8 @@ ejunit_() {
|
||||
if [[ "${junit}" == "junit-4" ]] ; then
|
||||
runner=org.junit.runner.JUnitCore
|
||||
fi
|
||||
debug-print "Calling: java -cp \"${cp}\" -Djava.awt.headless=true ${runner} ${@}"
|
||||
java -cp "${cp}" -Djava.awt.headless=true ${runner} "${@}" || die "Running junit failed"
|
||||
debug-print "Calling: java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${runner} ${@}"
|
||||
java -cp "${cp}" -Djava.io.tmpdir="${T}/" -Djava.awt.headless=true ${runner} "${@}" || die "Running junit failed"
|
||||
}
|
||||
|
||||
# @FUNCTION: ejunit
|
||||
@ -1783,18 +1856,21 @@ ejunit4() {
|
||||
# src_prepare Searches for bundled jars
|
||||
# Don't call directly, but via java-pkg-2_src_prepare!
|
||||
java-utils-2_src_prepare() {
|
||||
[[ ${EBUILD_PHASE} == prepare ]] &&
|
||||
java-pkg_func-exists java_prepare && java_prepare
|
||||
java-pkg_func-exists java_prepare && java_prepare
|
||||
|
||||
# Remember that eant will call this unless called via Portage
|
||||
if [[ ! -e "${T}/java-utils-2_src_prepare-run" ]] && is-java-strict; then
|
||||
# Check for files in JAVA_RM_FILES array.
|
||||
if [[ ${JAVA_RM_FILES[@]} ]]; then
|
||||
debug-print "$FUNCNAME: removing unneeded files"
|
||||
java-pkg_rm_files "${JAVA_RM_FILES[@]}"
|
||||
fi
|
||||
|
||||
if is-java-strict; then
|
||||
echo "Searching for bundled jars:"
|
||||
java-pkg_find-normal-jars || echo "None found."
|
||||
echo "Searching for bundled classes (no output if none found):"
|
||||
find "${WORKDIR}" -name "*.class"
|
||||
echo "Search done."
|
||||
fi
|
||||
touch "${T}/java-utils-2_src_prepare-run"
|
||||
}
|
||||
|
||||
# @FUNCTION: java-utils-2_pkg_preinst
|
||||
@ -1837,7 +1913,6 @@ eant() {
|
||||
|
||||
if [[ ${EBUILD_PHASE} = compile ]]; then
|
||||
java-ant-2_src_configure
|
||||
java-utils-2_src_prepare
|
||||
fi
|
||||
|
||||
if ! has java-ant-2 ${INHERITED}; then
|
||||
@ -1958,23 +2033,21 @@ eant() {
|
||||
ejavac() {
|
||||
debug-print-function ${FUNCNAME} $*
|
||||
|
||||
java-pkg_init-compiler_
|
||||
|
||||
local compiler_executable
|
||||
compiler_executable=$(java-pkg_get-javac)
|
||||
if [[ ${?} != 0 ]]; then
|
||||
eerror "There was a problem determining compiler: ${compiler_executable}"
|
||||
die "get-javac failed"
|
||||
fi
|
||||
|
||||
local javac_args
|
||||
javac_args="$(java-pkg_javac-args)"
|
||||
if [[ ${?} != 0 ]]; then
|
||||
eerror "There was a problem determining JAVACFLAGS: ${javac_args}"
|
||||
die "java-pkg_javac-args failed"
|
||||
|
||||
if [[ -n ${JAVA_PKG_DEBUG} ]]; then
|
||||
einfo "Verbose logging for \"${FUNCNAME}\" function"
|
||||
einfo "Compiler executable: ${compiler_executable}"
|
||||
einfo "Extra arguments: ${javac_args}"
|
||||
einfo "Complete command:"
|
||||
einfo "${compiler_executable} ${javac_args} ${@}"
|
||||
fi
|
||||
|
||||
[[ -n ${JAVA_PKG_DEBUG} ]] && echo ${compiler_executable} ${javac_args} "${@}"
|
||||
ebegin "Compiling"
|
||||
${compiler_executable} ${javac_args} "${@}" || die "ejavac failed"
|
||||
}
|
||||
|
||||
@ -1992,6 +2065,15 @@ ejavadoc() {
|
||||
javadoc_args="-Xdoclint:none"
|
||||
fi
|
||||
|
||||
if [[ -n ${JAVA_PKG_DEBUG} ]]; then
|
||||
einfo "Verbose logging for \"${FUNCNAME}\" function"
|
||||
einfo "Javadoc executable: javadoc"
|
||||
einfo "Extra arguments: ${javadoc_args}"
|
||||
einfo "Complete command:"
|
||||
einfo "javadoc ${javadoc_args} ${@}"
|
||||
fi
|
||||
|
||||
ebegin "Generating JavaDoc"
|
||||
javadoc ${javadoc_args} "${@}" || die "ejavadoc failed"
|
||||
}
|
||||
|
||||
@ -2069,7 +2151,7 @@ java-pkg_init() {
|
||||
}
|
||||
|
||||
# People do all kinds of weird things.
|
||||
# http://forums.gentoo.org/viewtopic-p-3943166.html
|
||||
# https://forums.gentoo.org/viewtopic-p-3943166.html
|
||||
local silence="${SILENCE_JAVA_OPTIONS_WARNING}"
|
||||
local accept="${I_WANT_GLOBAL_JAVA_OPTIONS}"
|
||||
if [[ -n ${_JAVA_OPTIONS} && -z ${accept} && -z ${silence} ]]; then
|
||||
@ -2170,7 +2252,7 @@ java-pkg_init-compiler_() {
|
||||
|
||||
if has ${compiler} ${JAVA_PKG_FILTER_COMPILER}; then
|
||||
if [[ -z ${JAVA_PKG_FORCE_COMPILER} ]]; then
|
||||
einfo "Filtering ${compiler}"
|
||||
einfo "Filtering ${compiler}" >&2
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
@ -2190,14 +2272,11 @@ java-pkg_init-compiler_() {
|
||||
continue
|
||||
fi
|
||||
|
||||
# -source was introduced in 1.3, so only check 1.3 and on
|
||||
if version_is_at_least "${desired_soure}" "1.3"; then
|
||||
# Verify that the compiler supports source
|
||||
local supported_source=$(source ${compiler_env} 1>/dev/null 2>&1; echo ${SUPPORTED_SOURCE})
|
||||
if ! has ${desired_source} ${supported_source}; then
|
||||
ewarn "${compiler} does not support -source ${desired_source}, skipping"
|
||||
continue
|
||||
fi
|
||||
# Verify that the compiler supports source
|
||||
local supported_source=$(source ${compiler_env} 1>/dev/null 2>&1; echo ${SUPPORTED_SOURCE})
|
||||
if ! has ${desired_source} ${supported_source}; then
|
||||
ewarn "${compiler} does not support -source ${desired_source}, skipping"
|
||||
continue
|
||||
fi
|
||||
|
||||
# if you get here, then the compiler should be good to go
|
||||
@ -2213,10 +2292,10 @@ java-pkg_init-compiler_() {
|
||||
# If it hasn't been defined already, default to javac
|
||||
if [[ -z ${GENTOO_COMPILER} ]]; then
|
||||
if [[ -n ${compilers} ]]; then
|
||||
einfo "No suitable compiler found: defaulting to JDK default for compilation"
|
||||
einfo "No suitable compiler found: defaulting to JDK default for compilation" >&2
|
||||
else
|
||||
# probably don't need to notify users about the default.
|
||||
:;#einfo "Defaulting to javac for compilation"
|
||||
:;#einfo "Defaulting to javac for compilation" >&2
|
||||
fi
|
||||
if java-config -g GENTOO_COMPILER 2> /dev/null; then
|
||||
export GENTOO_COMPILER=$(java-config -g GENTOO_COMPILER)
|
||||
@ -2224,7 +2303,7 @@ java-pkg_init-compiler_() {
|
||||
export GENTOO_COMPILER=javac
|
||||
fi
|
||||
else
|
||||
einfo "Using ${GENTOO_COMPILER} for compilation"
|
||||
einfo "Using ${GENTOO_COMPILER} for compilation" >&2
|
||||
fi
|
||||
|
||||
}
|
||||
@ -2273,62 +2352,54 @@ java-pkg_do_write_() {
|
||||
java-pkg_init_paths_
|
||||
# Create directory for package.env
|
||||
dodir "${JAVA_PKG_SHAREPATH}"
|
||||
if [[ -n "${JAVA_PKG_CLASSPATH}" || -n "${JAVA_PKG_LIBRARY}" || -f \
|
||||
"${JAVA_PKG_DEPEND_FILE}" || -f \
|
||||
"${JAVA_PKG_OPTIONAL_DEPEND_FILE}" ]]; then
|
||||
# Create package.env
|
||||
(
|
||||
echo "DESCRIPTION=\"${DESCRIPTION}\""
|
||||
echo "GENERATION=\"2\""
|
||||
echo "SLOT=\"${SLOT}\""
|
||||
echo "CATEGORY=\"${CATEGORY}\""
|
||||
echo "PVR=\"${PVR}\""
|
||||
|
||||
[[ -n "${JAVA_PKG_CLASSPATH}" ]] && echo "CLASSPATH=\"${JAVA_PKG_CLASSPATH}\""
|
||||
[[ -n "${JAVA_PKG_LIBRARY}" ]] && echo "LIBRARY_PATH=\"${JAVA_PKG_LIBRARY}\""
|
||||
[[ -n "${JAVA_PROVIDE}" ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\""
|
||||
[[ -f "${JAVA_PKG_DEPEND_FILE}" ]] \
|
||||
&& echo "DEPEND=\"$(sort -u "${JAVA_PKG_DEPEND_FILE}" | tr '\n' ':')\""
|
||||
[[ -f "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" ]] \
|
||||
&& echo "OPTIONAL_DEPEND=\"$(sort -u "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" | tr '\n' ':')\""
|
||||
echo "VM=\"$(echo ${RDEPEND} ${DEPEND} | sed -e 's/ /\n/g' | sed -n -e '/virtual\/\(jre\|jdk\)/ { p;q }')\"" # TODO cleanup !
|
||||
[[ -f "${JAVA_PKG_BUILD_DEPEND_FILE}" ]] \
|
||||
&& echo "BUILD_DEPEND=\"$(sort -u "${JAVA_PKG_BUILD_DEPEND_FILE}" | tr '\n' ':')\""
|
||||
) > "${JAVA_PKG_ENV}"
|
||||
# Create package.env
|
||||
(
|
||||
echo "DESCRIPTION=\"${DESCRIPTION}\""
|
||||
echo "GENERATION=\"2\""
|
||||
echo "SLOT=\"${SLOT}\""
|
||||
echo "CATEGORY=\"${CATEGORY}\""
|
||||
echo "PVR=\"${PVR}\""
|
||||
|
||||
# register target/source
|
||||
local target="$(java-pkg_get-target)"
|
||||
local source="$(java-pkg_get-source)"
|
||||
[[ -n ${target} ]] && echo "TARGET=\"${target}\"" >> "${JAVA_PKG_ENV}"
|
||||
[[ -n ${source} ]] && echo "SOURCE=\"${source}\"" >> "${JAVA_PKG_ENV}"
|
||||
[[ -n "${JAVA_PKG_CLASSPATH}" ]] && echo "CLASSPATH=\"${JAVA_PKG_CLASSPATH}\""
|
||||
[[ -n "${JAVA_PKG_LIBRARY}" ]] && echo "LIBRARY_PATH=\"${JAVA_PKG_LIBRARY}\""
|
||||
[[ -n "${JAVA_PROVIDE}" ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\""
|
||||
[[ -f "${JAVA_PKG_DEPEND_FILE}" ]] \
|
||||
&& echo "DEPEND=\"$(sort -u "${JAVA_PKG_DEPEND_FILE}" | tr '\n' ':')\""
|
||||
[[ -f "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" ]] \
|
||||
&& echo "OPTIONAL_DEPEND=\"$(sort -u "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" | tr '\n' ':')\""
|
||||
echo "VM=\"$(echo ${RDEPEND} ${DEPEND} | sed -e 's/ /\n/g' | sed -n -e '/virtual\/\(jre\|jdk\)/ { p;q }')\"" # TODO cleanup !
|
||||
[[ -f "${JAVA_PKG_BUILD_DEPEND_FILE}" ]] \
|
||||
&& echo "BUILD_DEPEND=\"$(sort -u "${JAVA_PKG_BUILD_DEPEND_FILE}" | tr '\n' ':')\""
|
||||
) > "${JAVA_PKG_ENV}"
|
||||
|
||||
# register javadoc info
|
||||
[[ -n ${JAVADOC_PATH} ]] && echo "JAVADOC_PATH=\"${JAVADOC_PATH}\"" \
|
||||
>> ${JAVA_PKG_ENV}
|
||||
# register source archives
|
||||
[[ -n ${JAVA_SOURCES} ]] && echo "JAVA_SOURCES=\"${JAVA_SOURCES}\"" \
|
||||
>> ${JAVA_PKG_ENV}
|
||||
# register target/source
|
||||
local target="$(java-pkg_get-target)"
|
||||
local source="$(java-pkg_get-source)"
|
||||
[[ -n ${target} ]] && echo "TARGET=\"${target}\"" >> "${JAVA_PKG_ENV}"
|
||||
[[ -n ${source} ]] && echo "SOURCE=\"${source}\"" >> "${JAVA_PKG_ENV}"
|
||||
|
||||
# register javadoc info
|
||||
[[ -n ${JAVADOC_PATH} ]] && echo "JAVADOC_PATH=\"${JAVADOC_PATH}\"" \
|
||||
>> ${JAVA_PKG_ENV}
|
||||
# register source archives
|
||||
[[ -n ${JAVA_SOURCES} ]] && echo "JAVA_SOURCES=\"${JAVA_SOURCES}\"" \
|
||||
>> ${JAVA_PKG_ENV}
|
||||
|
||||
echo "MERGE_VM=\"${GENTOO_VM}\"" >> "${JAVA_PKG_ENV}"
|
||||
[[ -n ${GENTOO_COMPILER} ]] && echo "MERGE_COMPILER=\"${GENTOO_COMPILER}\"" >> "${JAVA_PKG_ENV}"
|
||||
echo "MERGE_VM=\"${GENTOO_VM}\"" >> "${JAVA_PKG_ENV}"
|
||||
[[ -n ${GENTOO_COMPILER} ]] && echo "MERGE_COMPILER=\"${GENTOO_COMPILER}\"" >> "${JAVA_PKG_ENV}"
|
||||
|
||||
# extra env variables
|
||||
if [[ -n "${JAVA_PKG_EXTRA_ENV_VARS}" ]]; then
|
||||
cat "${JAVA_PKG_EXTRA_ENV}" >> "${JAVA_PKG_ENV}" || die
|
||||
# nested echo to remove leading/trailing spaces
|
||||
echo "ENV_VARS=\"$(echo ${JAVA_PKG_EXTRA_ENV_VARS})\"" \
|
||||
>> "${JAVA_PKG_ENV}" || die
|
||||
fi
|
||||
|
||||
# Strip unnecessary leading and trailing colons
|
||||
# TODO try to cleanup if possible
|
||||
sed -e "s/=\":/=\"/" -e "s/:\"$/\"/" -i "${JAVA_PKG_ENV}" || die "Did you forget to call java_init ?"
|
||||
else
|
||||
debug-print "JAVA_PKG_CLASSPATH, JAVA_PKG_LIBRARY, JAVA_PKG_DEPEND_FILE"
|
||||
debug-print "or JAVA_PKG_OPTIONAL_DEPEND_FILE not defined so can't"
|
||||
debug-print "write package.env."
|
||||
# extra env variables
|
||||
if [[ -n "${JAVA_PKG_EXTRA_ENV_VARS}" ]]; then
|
||||
cat "${JAVA_PKG_EXTRA_ENV}" >> "${JAVA_PKG_ENV}" || die
|
||||
# nested echo to remove leading/trailing spaces
|
||||
echo "ENV_VARS=\"$(echo ${JAVA_PKG_EXTRA_ENV_VARS})\"" \
|
||||
>> "${JAVA_PKG_ENV}" || die
|
||||
fi
|
||||
|
||||
# Strip unnecessary leading and trailing colons
|
||||
# TODO try to cleanup if possible
|
||||
sed -e "s/=\":/=\"/" -e "s/:\"$/\"/" -i "${JAVA_PKG_ENV}" || die "Did you forget to call java_init ?"
|
||||
}
|
||||
|
||||
# @FUNCTION: java-pkg_record-jar_
|
||||
@ -2408,9 +2479,9 @@ java-pkg_append_() {
|
||||
# @CODE
|
||||
# @RETURN: path to $1's parent directory
|
||||
java-pkg_expand_dir_() {
|
||||
pushd "$(dirname "${1}")" >/dev/null 2>&1
|
||||
pushd "$(dirname "${1}")" >/dev/null 2>&1 || die
|
||||
pwd
|
||||
popd >/dev/null 2>&1
|
||||
popd >/dev/null 2>&1 || die
|
||||
}
|
||||
|
||||
# @FUNCTION: java-pkg_func-exists
|
||||
@ -2581,10 +2652,6 @@ java-pkg_switch-vm() {
|
||||
export JAVA=$(java-config --java)
|
||||
export JAVAC=$(java-config --javac)
|
||||
JAVACFLAGS="$(java-pkg_javac-args)"
|
||||
if [[ ${?} != 0 ]]; then
|
||||
eerror "There was a problem determining JAVACFLAGS: ${JAVACFLAGS}"
|
||||
die "java-pkg_javac-args failed"
|
||||
fi
|
||||
[[ -n ${JAVACFLAGS_EXTRA} ]] && JAVACFLAGS="${JAVACFLAGS_EXTRA} ${JAVACFLAGS}"
|
||||
export JAVACFLAGS
|
||||
|
||||
@ -2739,7 +2806,7 @@ java-pkg_ensure-dep() {
|
||||
eqawarn "java-pkg_ensure-dep: ${dev_error}"
|
||||
# eerror "Because you have ${target_pkg} installed,"
|
||||
# eerror "the package will build without problems, but please"
|
||||
# eerror "report this to http://bugs.gentoo.org."
|
||||
# eerror "report this to https://bugs.gentoo.org."
|
||||
# fi
|
||||
elif [[ ${limit_to} != build && ! ( "${RDEPEND}${PDEPEND}" =~ ${stripped_pkg} ) ]]; then
|
||||
dev_error="The ebuild is attempting to use ${target_pkg}, which is not "
|
||||
@ -2750,7 +2817,7 @@ java-pkg_ensure-dep() {
|
||||
eqawarn "java-pkg_ensure-dep: ${dev_error}"
|
||||
# eerror "The package will build without problems, but may fail to run"
|
||||
# eerror "if you don't have ${target_pkg} installed,"
|
||||
# eerror "so please report this to http://bugs.gentoo.org."
|
||||
# eerror "so please report this to https://bugs.gentoo.org."
|
||||
# fi
|
||||
fi
|
||||
}
|
||||
@ -2798,3 +2865,13 @@ is-java-strict() {
|
||||
[[ -n ${JAVA_PKG_STRICT} ]]
|
||||
return $?
|
||||
}
|
||||
|
||||
# @FUNCTION: java-pkg_clean
|
||||
# @DESCRIPTION:
|
||||
# Java package cleaner function. This will remove all *.class and *.jar
|
||||
# files, removing any bundled dependencies.
|
||||
java-pkg_clean() {
|
||||
if [[ -z "${JAVA_PKG_NO_CLEAN}" ]]; then
|
||||
find "${@}" '(' -name '*.class' -o -name '*.jar' ')' -type f -delete -print || die
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-virtuals-2.eclass,v 1.10 2015/05/09 22:20:44 chewi Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: java-virtuals-2.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.49 2015/05/09 22:20:44 chewi Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: java-vm-2.eclass
|
||||
# @MAINTAINER:
|
||||
@ -84,8 +84,11 @@ java-vm-2_pkg_postinst() {
|
||||
fi
|
||||
fi
|
||||
|
||||
java-vm_check-nsplugin
|
||||
java_mozilla_clean_
|
||||
if [[ "${_install_mozilla_plugin_called}" = 1 ]]; then
|
||||
java-vm_check-nsplugin
|
||||
java_mozilla_clean_
|
||||
fi
|
||||
|
||||
fdo-mime_desktop_database_update
|
||||
}
|
||||
|
||||
@ -360,6 +363,8 @@ java_get_plugin_dir_() {
|
||||
# Register a netscape java-plugin.
|
||||
|
||||
install_mozilla_plugin() {
|
||||
_install_mozilla_plugin_called=1
|
||||
|
||||
local plugin="${1}"
|
||||
local variant="${2}"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.156 2015/06/15 14:04:44 kensington Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: kde4-base.eclass
|
||||
# @MAINTAINER:
|
||||
@ -168,7 +168,7 @@ fi
|
||||
# Setup packages inheriting this eclass
|
||||
case ${KDEBASE} in
|
||||
kde-base)
|
||||
HOMEPAGE="http://www.kde.org/"
|
||||
HOMEPAGE="https://www.kde.org/"
|
||||
LICENSE="GPL-2"
|
||||
if [[ ${KDE_BUILD_TYPE} = live && -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
|
||||
# Disable tests for live ebuilds by default
|
||||
@ -185,7 +185,7 @@ case ${KDEBASE} in
|
||||
esac
|
||||
;;
|
||||
kdevelop)
|
||||
HOMEPAGE="http://www.kdevelop.org/"
|
||||
HOMEPAGE="https://www.kdevelop.org/"
|
||||
LICENSE="GPL-2"
|
||||
;;
|
||||
esac
|
||||
@ -323,21 +323,21 @@ kdedepend="
|
||||
kderdepend=""
|
||||
|
||||
if [[ ${CATEGORY} == kde-apps ]]; then
|
||||
kderdepend+=" !kde-base/${PN}"
|
||||
kderdepend+=" !kde-base/${PN}:4"
|
||||
fi
|
||||
|
||||
# all packages needs oxygen icons for basic iconset
|
||||
if [[ ${PN} != oxygen-icons ]]; then
|
||||
kderdepend+=" kde-apps/oxygen-icons"
|
||||
kderdepend+=" kde-frameworks/oxygen-icons"
|
||||
fi
|
||||
|
||||
# add a dependency over kde-l10n
|
||||
# add a dependency over kde4-l10n
|
||||
if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then
|
||||
for _lingua in ${KDE_LINGUAS}; do
|
||||
# if our package has linguas, pull in kde-l10n with selected lingua enabled,
|
||||
# if our package has linguas, pull in kde4-l10n with selected lingua enabled,
|
||||
# but only for selected ones.
|
||||
# this can't be done on one line because if user doesn't use any localisation
|
||||
# then he is probably not interested in kde-l10n at all.
|
||||
# then he is probably not interested in kde4-l10n at all.
|
||||
kderdepend+="
|
||||
linguas_${_lingua}? ( $(add_kdeapps_dep kde4-l10n "linguas_${_lingua}(+)") )
|
||||
"
|
||||
@ -358,7 +358,11 @@ case ${KDE_HANDBOOK} in
|
||||
[[ ${PN} != kdelibs ]] && kderdepend+=" ${kdehandbookrdepend}"
|
||||
;;
|
||||
optional)
|
||||
IUSE+=" +handbook"
|
||||
if [[ ${PN} == kdesu ]] ; then
|
||||
IUSE+=" handbook"
|
||||
else
|
||||
IUSE+=" +handbook"
|
||||
fi
|
||||
kdedepend+=" handbook? ( ${kdehandbookdepend} )"
|
||||
[[ ${PN} != kdelibs ]] && kderdepend+=" handbook? ( ${kdehandbookrdepend} )"
|
||||
;;
|
||||
@ -430,39 +434,40 @@ _calculate_src_uri() {
|
||||
# KDEPIM 4.4, special case
|
||||
# TODO: Remove this part when KDEPIM 4.4 gets out of the tree
|
||||
SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;;
|
||||
4.4.20*)
|
||||
# KDEPIM 4.4 no-akonadi branch, special case
|
||||
# TODO: Remove this part when KDEPIM 4.4 gets out of the tree
|
||||
SRC_URI="https://dev.gentoo.org/~dilfridge/distfiles/${_kmname_pv}.tar.xz" ;;
|
||||
4.?.[6-9]? | 4.??.[6-9]?)
|
||||
# Unstable KDE SC releases
|
||||
SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.11.14)
|
||||
# Part of 4.14 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/4.14.3/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.11.17)
|
||||
# Part of 14.12.3 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/14.12.3/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.11.18)
|
||||
# Part of 15.04.0 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/15.04.0/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.11.19)
|
||||
# Part of 15.04.1 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/15.04.1/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.11.20)
|
||||
# Part of 15.04.2 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/15.04.2/src/${_kmname_pv}.tar.xz" ;;
|
||||
SRC_URI="mirror://kde/Attic/applications/15.04.1/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.11.22)
|
||||
# Part of 15.08.0 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/15.08.0/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.14.3)
|
||||
# Last SC release
|
||||
SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.14.6)
|
||||
# Part of 14.12.3 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/14.12.3/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.14.7)
|
||||
# Part of 15.04.0 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/15.04.0/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.14.8)
|
||||
# Part of 15.04.1 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/15.04.1/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.14.9)
|
||||
# Part of 15.04.2 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/15.04.2/src/${_kmname_pv}.tar.xz" ;;
|
||||
SRC_URI="mirror://kde/Attic/applications/15.04.1/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.14.10)
|
||||
# Part of 15.04.3 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/Attic/applications/15.04.3/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.14.14)
|
||||
# Part of 15.08.3 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/15.08.3/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.14.15)
|
||||
# Part of 15.12.0 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/15.12.0/src/${_kmname_pv}.tar.xz" ;;
|
||||
4.14.16)
|
||||
# Part of 15.12.1 actually, sigh. Not stable for next release!
|
||||
SRC_URI="mirror://kde/stable/applications/15.12.1/src/${_kmname_pv}.tar.xz" ;;
|
||||
15.04.3)
|
||||
# Files moved to Attic
|
||||
SRC_URI="mirror://kde/Attic/applications/15.04.3/src/${_kmname_pv}.tar.xz" ;;
|
||||
??.?.[6-9]? | ??.??.[4-9]?)
|
||||
# Unstable KDE Applications releases
|
||||
SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
|
||||
@ -497,6 +502,11 @@ _calculate_live_repo() {
|
||||
*)
|
||||
# branch
|
||||
branch_prefix="branches/KDE/$(get_kde_version)"
|
||||
|
||||
if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then
|
||||
branch_prefix="branches/Applications/$(get_kde_version)"
|
||||
fi
|
||||
|
||||
# @ECLASS-VARIABLE: ESVN_PROJECT_SUFFIX
|
||||
# @DESCRIPTION
|
||||
# Suffix appended to ESVN_PROJECT depending on fetched branch.
|
||||
@ -678,11 +688,11 @@ kde4-base_src_prepare() {
|
||||
fi
|
||||
|
||||
# Enable/disable handbooks for kde4-base packages
|
||||
# kde-l10n inherits kde4-base but is metpackage, so no check for doc
|
||||
# kde4-l10n inherits kde4-base but is metapackage, so no check for doc
|
||||
# kdelibs inherits kde4-base but handle installing the handbook itself
|
||||
if ! has kde4-meta ${INHERITED} && in_iuse handbook; then
|
||||
if [[ ${KDEBASE} == kde-base ]]; then
|
||||
if [[ ${PN} != kde-l10n && ${PN} != kdepim-l10n && ${PN} != kdelibs ]] && use !handbook; then
|
||||
if [[ ${PN} != kde4-l10n && ${PN} != kdepim-l10n && ${PN} != kdelibs ]] && use !handbook; then
|
||||
# documentation in kde4-functions
|
||||
: ${KDE_DOC_DIRS:=doc}
|
||||
local dir
|
||||
@ -902,12 +912,10 @@ kde4-base_pkg_postinst() {
|
||||
fi
|
||||
# for all 3rd party soft tell user that he SHOULD install kdebase-startkde or kdebase-runtime-meta
|
||||
if [[ ${KDEBASE} != kde-base ]] && \
|
||||
! has_version 'kde-apps/kdebase-runtime-meta' && \
|
||||
! has_version 'kde-base/kdebase-startkde'; then
|
||||
! has_version 'kde-apps/kdebase-runtime-meta'; then
|
||||
if [[ ${KDE_REQUIRED} == always ]] || ( [[ ${KDE_REQUIRED} == optional ]] && use kde ); then
|
||||
echo
|
||||
ewarn "WARNING! Your system configuration contains neither \"kde-base/kdebase-runtime-meta\""
|
||||
ewarn "nor \"kde-base/kdebase-startkde\". You need one of above."
|
||||
ewarn "WARNING! Your system configuration does not contain \"kde-apps/kdebase-runtime-meta\"."
|
||||
ewarn "With this setting you are unsupported by KDE team."
|
||||
ewarn "All missing features you report for misc packages will be probably ignored or closed as INVALID."
|
||||
fi
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.76 2015/03/29 10:29:42 johu Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: kde4-functions.eclass
|
||||
# @MAINTAINER:
|
||||
@ -36,7 +36,7 @@ esac
|
||||
# @DESCRIPTION:
|
||||
# This gets set to a non-zero value when a package is considered a kde or
|
||||
# kdevelop ebuild.
|
||||
if [[ ${CATEGORY} = kde-base || ${CATEGORY} = kde-apps ]]; then
|
||||
if [[ ${CATEGORY} = kde-base || ${CATEGORY} = kde-apps || ${CATEGORY} = kde-frameworks ]]; then
|
||||
debug-print "${ECLASS}: KDEBASE ebuild recognized"
|
||||
KDEBASE=kde-base
|
||||
elif [[ ${KMNAME-${PN}} = kdevelop ]]; then
|
||||
@ -292,10 +292,11 @@ add_kdeapps_dep() {
|
||||
ver=${KDE_OVERRIDE_MINIMAL}
|
||||
elif [[ ${KDEBASE} != kde-base ]]; then
|
||||
ver=${KDE_MINIMAL}
|
||||
# if building stable-live version depend just on the raw KDE version
|
||||
# to allow merging packages against more stable basic stuff
|
||||
elif [[ ${PV} == *.9999 ]]; then
|
||||
ver=$(get_kde_version)
|
||||
# if building kde-apps, live master or stable-live branch,
|
||||
# use the final SC version since there are no further general releases.
|
||||
# except when it is kdepim split packages, which rely on same-version deps
|
||||
elif [[ ${CATEGORY} == kde-apps || ${PV} == *9999 ]] && [[ ${KMNAME} != "kdepim" ]]; then
|
||||
ver=4.14.3
|
||||
else
|
||||
ver=${PV}
|
||||
fi
|
||||
@ -325,16 +326,15 @@ add_kdebase_dep() {
|
||||
ver=${3}
|
||||
elif [[ -n ${KDE_OVERRIDE_MINIMAL} ]]; then
|
||||
ver=${KDE_OVERRIDE_MINIMAL}
|
||||
elif [[ -n ${KDE_MINIMAL} ]]; then
|
||||
elif [[ ${KDEBASE} != kde-base ]]; then
|
||||
ver=${KDE_MINIMAL}
|
||||
# if building live version depend on the final release since there will
|
||||
# not be any more major development. this solves dep errors as not all
|
||||
# packages have kde-base live versions now
|
||||
|
||||
# depend on the last sane released version where the normal >=${PV} dep
|
||||
# is not possible
|
||||
elif [[ ${CATEGORY} == kde-apps || ${PV} == *9999 ]]; then
|
||||
# if building live master or kde-apps, use the final SC version
|
||||
# since there are no further general releases.
|
||||
elif [[ ${CATEGORY} == kde-apps || ${PV} == 9999 ]]; then
|
||||
ver=4.14.3
|
||||
# if building a live version branch (eg. 4.11.49.9999) use the major version
|
||||
elif [[ ${PV} == *.9999 ]]; then
|
||||
ver=$(get_kde_version)
|
||||
else
|
||||
ver=${PV}
|
||||
fi
|
||||
@ -352,7 +352,7 @@ _enable_selected_linguas_dir() {
|
||||
|
||||
[[ -d ${dir} ]] || die "linguas dir \"${dir}\" does not exist"
|
||||
comment_all_add_subdirectory "${dir}"
|
||||
pushd "${dir}" > /dev/null
|
||||
pushd "${dir}" > /dev/null || die
|
||||
|
||||
# fix all various crazy sr@Latn variations
|
||||
# this part is only ease for ebuilds, so there wont be any die when this
|
||||
@ -391,7 +391,7 @@ _enable_selected_linguas_dir() {
|
||||
done
|
||||
[[ -n ${linguas} ]] && echo ">>> Enabling languages: ${linguas}"
|
||||
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: get_kde_version
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta-pkg.eclass,v 1.14 2015/03/29 10:29:42 johu Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: kde4-meta-pkg.eclass
|
||||
# @MAINTAINER:
|
||||
@ -14,7 +14,7 @@ _KDE4_META_PKG_ECLASS=1
|
||||
|
||||
inherit kde4-functions
|
||||
|
||||
HOMEPAGE="http://www.kde.org/"
|
||||
HOMEPAGE="https://www.kde.org/"
|
||||
|
||||
LICENSE="metapackage"
|
||||
IUSE="aqua"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.78 2015/03/29 10:29:42 johu Exp $
|
||||
# $Id$
|
||||
#
|
||||
# @ECLASS: kde4-meta.eclass
|
||||
# @MAINTAINER:
|
||||
@ -28,7 +28,7 @@ case ${KMNAME} in
|
||||
case ${PN} in
|
||||
akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
|
||||
IUSE+=" +kontact"
|
||||
RDEPEND+=" kontact? ( $(add_kdebase_dep kontact) )"
|
||||
RDEPEND+=" kontact? ( $(add_kdeapps_dep kontact '' ${PV}) )"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@ -182,7 +182,7 @@ kde4-meta_src_extract() {
|
||||
else
|
||||
local abort tarball tarfile f extractlist postfix
|
||||
|
||||
if [[ ${PV} =~ 4.[47].[12345] ]]; then
|
||||
if [[ ${PV} =~ 4.4.11 ]]; then
|
||||
postfix="bz2"
|
||||
KMTARPARAMS+=" --bzip2"
|
||||
else
|
||||
@ -209,7 +209,7 @@ kde4-meta_src_extract() {
|
||||
done
|
||||
extractlist+=" $(_list_needed_subdirectories)"
|
||||
|
||||
pushd "${WORKDIR}" > /dev/null
|
||||
pushd "${WORKDIR}" > /dev/null || die
|
||||
|
||||
# @ECLASS-VARIABLE: KDE4_STRICTER
|
||||
# @DESCRIPTION:
|
||||
@ -223,7 +223,7 @@ kde4-meta_src_extract() {
|
||||
mv ${topdir} ${P} || die "Died while moving \"${topdir}\" to \"${P}\""
|
||||
fi
|
||||
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
|
||||
eend $?
|
||||
|
||||
@ -398,7 +398,7 @@ _change_cmakelists_parent_dirs() {
|
||||
kde4-meta_change_cmakelists() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
pushd "${S}" > /dev/null
|
||||
pushd "${S}" > /dev/null || die
|
||||
|
||||
comment_all_add_subdirectory ./
|
||||
|
||||
@ -547,7 +547,7 @@ kde4-meta_change_cmakelists() {
|
||||
;;
|
||||
esac
|
||||
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: kde4-meta_src_configure
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde5-functions.eclass,v 1.8 2015/06/08 12:27:32 mrueg Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: kde5-functions.eclass
|
||||
# @MAINTAINER:
|
||||
@ -19,25 +19,30 @@ inherit toolchain-funcs versionator
|
||||
# @DESCRIPTION:
|
||||
# Currently EAPI 5 is supported.
|
||||
case ${EAPI} in
|
||||
5) ;;
|
||||
5|6) ;;
|
||||
*) die "EAPI=${EAPI:-0} is not supported" ;;
|
||||
esac
|
||||
|
||||
# @ECLASS-VARIABLE: FRAMEWORKS_MINIMAL
|
||||
# @DESCRIPTION:
|
||||
# Minimal Frameworks version to require for the package.
|
||||
: ${FRAMEWORKS_MINIMAL:=5.10.0}
|
||||
: ${FRAMEWORKS_MINIMAL:=5.17.0}
|
||||
|
||||
# @ECLASS-VARIABLE: PLASMA_MINIMAL
|
||||
# @DESCRIPTION:
|
||||
# Minimal Plasma version to require for the package.
|
||||
: ${PLASMA_MINIMAL:=5.3.0}
|
||||
: ${PLASMA_MINIMAL:=5.4.1}
|
||||
|
||||
# @ECLASS-VARIABLE: KDE_APPS_MINIMAL
|
||||
# @DESCRIPTION:
|
||||
# Minimal KDE Applicaions version to require for the package.
|
||||
: ${KDE_APPS_MINIMAL:=14.12.0}
|
||||
|
||||
# @ECLASS-VARIABLE: KDE_GCC_MINIMAL
|
||||
# @DESCRIPTION:
|
||||
# Minimal GCC version to require for the package.
|
||||
: ${KDE_GCC_MINIMAL:=4.8}
|
||||
|
||||
# @ECLASS-VARIABLE: KDEBASE
|
||||
# @DESCRIPTION:
|
||||
# This gets set to a non-zero value when a package is considered a kde or
|
||||
@ -79,25 +84,28 @@ _check_gcc_version() {
|
||||
local version=$(gcc-version)
|
||||
local major=${version%.*}
|
||||
local minor=${version#*.}
|
||||
local min_major=${KDE_GCC_MINIMAL%.*}
|
||||
local min_minor=${KDE_GCC_MINIMAL#*.}
|
||||
|
||||
[[ ${major} -lt 4 ]] || \
|
||||
( [[ ${major} -eq 4 && ${minor} -lt 8 ]] ) \
|
||||
&& die "Sorry, but gcc-4.8 or later is required for KDE 5."
|
||||
[[ ${major} -lt ${min_major} ]] || \
|
||||
( [[ ${major} -eq ${min_major} && ${minor} -lt ${min_minor} ]] ) \
|
||||
&& die "Sorry, but gcc-${KDE_GCC_MINIMAL} or later is required for this package."
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: _add_kdecategory_dep
|
||||
# @FUNCTION: _add_category_dep
|
||||
# @INTERNAL
|
||||
# @DESCRIPTION:
|
||||
# Implementation of add_plasma_dep and add_frameworks_dep.
|
||||
_add_kdecategory_dep() {
|
||||
# Implementation of add_plasma_dep, add_frameworks_dep, add_kdeapps_dep,
|
||||
# and finally, add_qt_dep.
|
||||
_add_category_dep() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local category=${1}
|
||||
local package=${2}
|
||||
local use=${3}
|
||||
local version=${4}
|
||||
local slot=
|
||||
local slot=${5}
|
||||
|
||||
if [[ -n ${use} ]] ; then
|
||||
local use="[${use}]"
|
||||
@ -108,8 +116,10 @@ _add_kdecategory_dep() {
|
||||
local version="-$(get_version_component_range 1-3 ${version})"
|
||||
fi
|
||||
|
||||
if [[ ${SLOT} = 4 || ${SLOT} = 5 ]] && ! has kde5-meta-pkg ${INHERITED} ; then
|
||||
slot=":${SLOT}"
|
||||
if [[ -n ${slot} ]] ; then
|
||||
slot=":${slot}"
|
||||
elif [[ ${SLOT%\/*} = 4 || ${SLOT%\/*} = 5 ]] && ! has kde5-meta-pkg ${INHERITED} ; then
|
||||
slot=":${SLOT%\/*}"
|
||||
fi
|
||||
|
||||
echo " ${operator}${category}/${package}${version}${slot}${use}"
|
||||
@ -119,9 +129,11 @@ _add_kdecategory_dep() {
|
||||
# @USAGE: <package> [USE flags] [minimum version]
|
||||
# @DESCRIPTION:
|
||||
# Create proper dependency for kde-frameworks/ dependencies.
|
||||
# This takes 1 to 3 arguments. The first being the package name, the optional
|
||||
# This takes 1 to 4 arguments. The first being the package name, the optional
|
||||
# second is additional USE flags to append, and the optional third is the
|
||||
# version to use instead of the automatic version (use sparingly).
|
||||
# version to use instead of the automatic version (use sparingly). In addition,
|
||||
# the optional fourth argument defines slot+operator instead of automatic slot
|
||||
# (use even more sparingly).
|
||||
# The output of this should be added directly to DEPEND/RDEPEND, and may be
|
||||
# wrapped in a USE conditional (but not an || conditional without an extra set
|
||||
# of parentheses).
|
||||
@ -138,16 +150,18 @@ add_frameworks_dep() {
|
||||
version=${FRAMEWORKS_MINIMAL}
|
||||
fi
|
||||
|
||||
_add_kdecategory_dep kde-frameworks "${1}" "${2}" "${version}"
|
||||
_add_category_dep kde-frameworks "${1}" "${2}" "${version}" "${4}"
|
||||
}
|
||||
|
||||
# @FUNCTION: add_plasma_dep
|
||||
# @USAGE: <package> [USE flags] [minimum version]
|
||||
# @DESCRIPTION:
|
||||
# Create proper dependency for kde-base/ dependencies.
|
||||
# This takes 1 to 3 arguments. The first being the package name, the optional
|
||||
# This takes 1 to 4 arguments. The first being the package name, the optional
|
||||
# second is additional USE flags to append, and the optional third is the
|
||||
# version to use instead of the automatic version (use sparingly).
|
||||
# version to use instead of the automatic version (use sparingly). In addition,
|
||||
# the optional fourth argument defines slot+operator instead of automatic slot
|
||||
# (use even more sparingly).
|
||||
# The output of this should be added directly to DEPEND/RDEPEND, and may be
|
||||
# wrapped in a USE conditional (but not an || conditional without an extra set
|
||||
# of parentheses).
|
||||
@ -164,16 +178,18 @@ add_plasma_dep() {
|
||||
version=${PLASMA_MINIMAL}
|
||||
fi
|
||||
|
||||
_add_kdecategory_dep kde-plasma "${1}" "${2}" "${version}"
|
||||
_add_category_dep kde-plasma "${1}" "${2}" "${version}" "${4}"
|
||||
}
|
||||
|
||||
# @FUNCTION: add_kdeapps_dep
|
||||
# @USAGE: <package> [USE flags] [minimum version]
|
||||
# @DESCRIPTION:
|
||||
# Create proper dependency for kde-apps/ dependencies.
|
||||
# This takes 1 to 3 arguments. The first being the package name, the optional
|
||||
# This takes 1 to 4 arguments. The first being the package name, the optional
|
||||
# second is additional USE flags to append, and the optional third is the
|
||||
# version to use instead of the automatic version (use sparingly).
|
||||
# version to use instead of the automatic version (use sparingly). In addition,
|
||||
# the optional fourth argument defines slot+operator instead of automatic slot
|
||||
# (use even more sparingly).
|
||||
# The output of this should be added directly to DEPEND/RDEPEND, and may be
|
||||
# wrapped in a USE conditional (but not an || conditional without an extra set
|
||||
# of parentheses).
|
||||
@ -188,10 +204,40 @@ add_kdeapps_dep() {
|
||||
version=${PV}
|
||||
elif [[ -z "${version}" ]] ; then
|
||||
# In KDE applications world, 5.9999 > yy.mm.x
|
||||
[[ ${PV} = 5.9999 ]] && version=5.9999 || version=${KDE_APPS_MINIMAL}
|
||||
if [[ ${PV} = 5.9999 || ${PV} = 9999 ]]; then
|
||||
version=5.9999
|
||||
else
|
||||
version=${KDE_APPS_MINIMAL}
|
||||
fi
|
||||
fi
|
||||
|
||||
_add_kdecategory_dep kde-apps "${1}" "${2}" "${version}"
|
||||
_add_category_dep kde-apps "${1}" "${2}" "${version}" "${4}"
|
||||
}
|
||||
|
||||
# @FUNCTION: add_qt_dep
|
||||
# @USAGE: <package> [USE flags] [minimum version]
|
||||
# @DESCRIPTION:
|
||||
# Create proper dependency for dev-qt/ dependencies.
|
||||
# This takes 1 to 4 arguments. The first being the package name, the optional
|
||||
# second is additional USE flags to append, and the optional third is the
|
||||
# version to use instead of the automatic version (use sparingly). In addition,
|
||||
# the optional fourth argument defines slot+operator instead of automatic slot
|
||||
# (use even more sparingly).
|
||||
# The output of this should be added directly to DEPEND/RDEPEND, and may be
|
||||
# wrapped in a USE conditional (but not an || conditional without an extra set
|
||||
# of parentheses).
|
||||
add_qt_dep() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local version
|
||||
|
||||
if [[ -n ${3} ]]; then
|
||||
version=${3}
|
||||
elif [[ -z "${version}" ]] ; then
|
||||
version=${QT_MINIMAL}
|
||||
fi
|
||||
|
||||
_add_category_dep dev-qt "${1}" "${2}" "${version}" "${4}"
|
||||
}
|
||||
|
||||
# @FUNCTION: get_kde_version
|
||||
@ -218,7 +264,7 @@ punt_bogus_dep() {
|
||||
local prefix=${1}
|
||||
local dep=${2}
|
||||
|
||||
pcregrep -Mn "(?s)find_package\(\s*${prefix}.[^)]*?${dep}.*?\)" CMakeLists.txt > "${T}/bogus${dep}"
|
||||
pcregrep -Mni "(?s)find_package\s*\(\s*${prefix}.[^)]*?${dep}.*?\)" CMakeLists.txt > "${T}/bogus${dep}"
|
||||
|
||||
# pcregrep returns non-zero on no matches/error
|
||||
if [[ $? != 0 ]] ; then
|
||||
@ -232,7 +278,7 @@ punt_bogus_dep() {
|
||||
sed -e "${first},${last}s/${dep}//" -i CMakeLists.txt || die
|
||||
|
||||
if [[ ${length} = 1 ]] ; then
|
||||
sed -e "/find_package(\s*${prefix}\s*REQUIRED\s*COMPONENTS\s*)/d" -i CMakeLists.txt || die
|
||||
sed -e "/find_package\s*(\s*${prefix}\s*REQUIRED\s*COMPONENTS\s*)/I d" -i CMakeLists.txt || die
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
23
sdk_container/src/third_party/portage-stable/eclass/kde5-meta-pkg.eclass
vendored
Normal file
23
sdk_container/src/third_party/portage-stable/eclass/kde5-meta-pkg.eclass
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: kde5-meta-pkg.eclass
|
||||
# @MAINTAINER:
|
||||
# kde@gentoo.org
|
||||
# @BLURB: This eclass contains boilerplate for KDE 5 meta packages
|
||||
# @DESCRIPTION:
|
||||
# This eclass should only be used for defining meta packages for KDE 5.
|
||||
|
||||
if [[ -z ${_KDE5_META_PKG_ECLASS} ]]; then
|
||||
_KDE5_META_PKG_ECLASS=1
|
||||
|
||||
inherit kde5-functions
|
||||
|
||||
HOMEPAGE="https://www.kde.org/"
|
||||
LICENSE="metapackage"
|
||||
SLOT="5"
|
||||
|
||||
RDEPEND+=" !kde-apps/${PN}:4"
|
||||
|
||||
fi
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde5.eclass,v 1.10 2015/05/31 15:51:21 mrueg Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: kde5.eclass
|
||||
# @MAINTAINER:
|
||||
@ -19,7 +19,7 @@ _KDE5_ECLASS=1
|
||||
# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
|
||||
: ${VIRTUALX_REQUIRED:=manual}
|
||||
|
||||
inherit kde5-functions fdo-mime flag-o-matic gnome2-utils versionator virtualx eutils cmake-utils
|
||||
inherit cmake-utils eutils flag-o-matic gnome2-utils kde5-functions versionator virtualx xdg
|
||||
|
||||
if [[ ${KDE_BUILD_TYPE} = live ]]; then
|
||||
case ${KDE_SCM} in
|
||||
@ -33,7 +33,7 @@ EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_
|
||||
# @ECLASS-VARIABLE: QT_MINIMAL
|
||||
# @DESCRIPTION:
|
||||
# Minimal Qt version to require for the package.
|
||||
: ${QT_MINIMAL:=5.4.1}
|
||||
: ${QT_MINIMAL:=5.4.2}
|
||||
|
||||
# @ECLASS-VARIABLE: KDE_AUTODEPS
|
||||
# @DESCRIPTION:
|
||||
@ -64,6 +64,11 @@ else
|
||||
: ${KDE_DOXYGEN:=false}
|
||||
fi
|
||||
|
||||
# @ECLASS-VARIABLE: KDE_DOX_DIR
|
||||
# @DESCRIPTION:
|
||||
# Defaults to ".". Otherwise, use alternative KDE doxygen path.
|
||||
: ${KDE_DOX_DIR:=.}
|
||||
|
||||
# @ECLASS-VARIABLE: KDE_EXAMPLES
|
||||
# @DESCRIPTION:
|
||||
# If set to "false", unconditionally ignore a top-level examples subdirectory.
|
||||
@ -75,12 +80,21 @@ fi
|
||||
# If set to "false", do nothing.
|
||||
# Otherwise, add "+handbook" to IUSE, add the appropriate dependency, and
|
||||
# generate and install KDE handbook.
|
||||
# If set to "forceoptional", remove a KF5DocTools dependency from the root
|
||||
# CMakeLists.txt in addition to the above.
|
||||
: ${KDE_HANDBOOK:=false}
|
||||
|
||||
# @ECLASS-VARIABLE: KDE_DOC_DIR
|
||||
# @DESCRIPTION:
|
||||
# Defaults to "doc". Otherwise, use alternative KDE handbook path.
|
||||
: ${KDE_DOC_DIR:=doc}
|
||||
|
||||
# @ECLASS-VARIABLE: KDE_TEST
|
||||
# @DESCRIPTION:
|
||||
# If set to "false", do nothing.
|
||||
# For any other value, add test to IUSE and add a dependency on dev-qt/qttest:5.
|
||||
# If set to "forceoptional", remove a Qt5Test dependency from the root
|
||||
# CMakeLists.txt in addition to the above.
|
||||
if [[ ${CATEGORY} = kde-frameworks ]]; then
|
||||
: ${KDE_TEST:=true}
|
||||
else
|
||||
@ -102,9 +116,9 @@ fi
|
||||
: ${KDE_SELINUX_MODULE:=none}
|
||||
|
||||
if [[ ${KDEBASE} = kdevelop ]]; then
|
||||
HOMEPAGE="http://www.kdevelop.org/"
|
||||
HOMEPAGE="https://www.kdevelop.org/"
|
||||
else
|
||||
HOMEPAGE="http://www.kde.org/"
|
||||
HOMEPAGE="https://www.kde.org/"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
@ -134,18 +148,15 @@ case ${KDE_AUTODEPS} in
|
||||
RDEPEND+=" >=kde-frameworks/kf-env-3"
|
||||
COMMONDEPEND+=" >=dev-qt/qtcore-${QT_MINIMAL}:5"
|
||||
|
||||
if [[ ${CATEGORY} = kde-plasma ]]; then
|
||||
if [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma && ${PN} != polkit-kde-agent ]]; then
|
||||
RDEPEND+="
|
||||
!kde-apps/kde4-l10n[-minimal]
|
||||
!kde-base/kde-l10n:4[-minimal(-)]
|
||||
!kde-apps/kde4-l10n[-minimal(-)]
|
||||
!<kde-apps/kde4-l10n-15.08.0-r1
|
||||
"
|
||||
fi
|
||||
|
||||
if [[ ${KDE_BLOCK_SLOT4} = true && ${CATEGORY} = kde-apps ]]; then
|
||||
RDEPEND+="
|
||||
!kde-apps/${PN}:4
|
||||
!kde-base/${PN}
|
||||
"
|
||||
RDEPEND+=" !kde-apps/${PN}:4"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@ -247,15 +258,17 @@ _calculate_src_uri() {
|
||||
kde-frameworks)
|
||||
SRC_URI="mirror://kde/stable/frameworks/${PV%.*}/${_kmname}-${PV}.tar.xz" ;;
|
||||
kde-plasma)
|
||||
local plasmapv=$(get_version_component_range 1-3)
|
||||
|
||||
case ${PV} in
|
||||
5.?.[6-9]? )
|
||||
# Plasma 5 beta releases
|
||||
SRC_URI="mirror://kde/unstable/plasma/${PV}/${_kmname}-${PV}.tar.xz"
|
||||
SRC_URI="mirror://kde/unstable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz"
|
||||
RESTRICT+=" mirror"
|
||||
;;
|
||||
*)
|
||||
# Plasma 5 stable releases
|
||||
SRC_URI="mirror://kde/stable/plasma/${PV}/${_kmname}-${PV}.tar.xz" ;;
|
||||
SRC_URI="mirror://kde/stable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@ -275,13 +288,25 @@ _calculate_live_repo() {
|
||||
# (anonsvn) with anything else you might want to use.
|
||||
ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde}
|
||||
|
||||
local branch_prefix="KDE"
|
||||
local branch_prefix="trunk/KDE"
|
||||
|
||||
if [[ -n ${KMNAME} ]]; then
|
||||
branch_prefix="${KMNAME}"
|
||||
if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then
|
||||
branch_prefix="branches/Applications/$(get_version_component_range 1-2)"
|
||||
fi
|
||||
|
||||
ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${branch_prefix}/${PN}"
|
||||
if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then
|
||||
branch_prefix="branches/plasma/$(get_version_component_range 1-2)"
|
||||
fi
|
||||
|
||||
local _kmname
|
||||
|
||||
if [[ -n ${KMNAME} ]]; then
|
||||
_kmname=${KMNAME}
|
||||
else
|
||||
_kmname=${PN}
|
||||
fi
|
||||
|
||||
ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/${_kmname}"
|
||||
;;
|
||||
git)
|
||||
# @ECLASS-VARIABLE: EGIT_MIRROR
|
||||
@ -305,6 +330,10 @@ _calculate_live_repo() {
|
||||
_kmname=${PN}
|
||||
fi
|
||||
|
||||
if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then
|
||||
EGIT_BRANCH="Applications/$(get_version_component_range 1-2)"
|
||||
fi
|
||||
|
||||
if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then
|
||||
EGIT_BRANCH="Plasma/$(get_version_component_range 1-2)"
|
||||
fi
|
||||
@ -326,7 +355,9 @@ debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
|
||||
# Do some basic settings
|
||||
kde5_pkg_pretend() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
_check_gcc_version
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
_check_gcc_version
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: kde5_pkg_setup
|
||||
@ -334,7 +365,9 @@ kde5_pkg_pretend() {
|
||||
# Do some basic settings
|
||||
kde5_pkg_setup() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
_check_gcc_version
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
_check_gcc_version
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: kde5_src_unpack
|
||||
@ -363,50 +396,56 @@ kde5_src_unpack() {
|
||||
kde5_src_prepare() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
cmake-utils_src_prepare
|
||||
|
||||
# only build examples when required
|
||||
if ! use_if_iuse examples || ! use examples ; then
|
||||
comment_add_subdirectory examples
|
||||
cmake_comment_add_subdirectory examples
|
||||
fi
|
||||
|
||||
# only enable handbook when required
|
||||
if ! use_if_iuse handbook ; then
|
||||
comment_add_subdirectory doc
|
||||
cmake_comment_add_subdirectory ${KDE_DOC_DIR}
|
||||
|
||||
if [[ ${KDE_HANDBOOK} = forceoptional ]] ; then
|
||||
punt_bogus_dep KF5 DocTools
|
||||
fi
|
||||
fi
|
||||
|
||||
# enable only the requested translations
|
||||
# when required
|
||||
if [[ ${KDE_BUILD_TYPE} = release ]] ; then
|
||||
for lang in $(ls po 2> /dev/null) ; do
|
||||
if ! has ${lang} ${LINGUAS} ; then
|
||||
rm -rf po/${lang}
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${KDE_HANDBOOK} = true ]] ; then
|
||||
pushd doc > /dev/null
|
||||
for lang in $(ls) ; do
|
||||
if [[ -d po ]] ; then
|
||||
pushd po > /dev/null || die
|
||||
for lang in *; do
|
||||
if ! has ${lang} ${LINGUAS} ; then
|
||||
comment_add_subdirectory ${lang}
|
||||
if [[ ${lang} != CMakeLists.txt ]] ; then
|
||||
rm -rf ${lang}
|
||||
fi
|
||||
if [[ -e CMakeLists.txt ]] ; then
|
||||
cmake_comment_add_subdirectory ${lang}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
popd > /dev/null
|
||||
popd > /dev/null || die
|
||||
fi
|
||||
|
||||
if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && ${CATEGORY} != kde-apps ]] ; then
|
||||
pushd ${KDE_DOC_DIR} > /dev/null || die
|
||||
for lang in *; do
|
||||
if ! has ${lang} ${LINGUAS} ; then
|
||||
cmake_comment_add_subdirectory ${lang}
|
||||
fi
|
||||
done
|
||||
popd > /dev/null || die
|
||||
fi
|
||||
else
|
||||
rm -rf po
|
||||
fi
|
||||
|
||||
# in frameworks, tests = manual tests so never
|
||||
# build them
|
||||
# in frameworks, tests = manual tests so never build them
|
||||
if [[ ${CATEGORY} = kde-frameworks ]]; then
|
||||
comment_add_subdirectory tests
|
||||
fi
|
||||
|
||||
if [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then
|
||||
# only build unit tests when required
|
||||
if ! use_if_iuse test ; then
|
||||
comment_add_subdirectory autotests
|
||||
comment_add_subdirectory tests
|
||||
fi
|
||||
cmake_comment_add_subdirectory tests
|
||||
fi
|
||||
|
||||
case ${KDE_PUNT_BOGUS_DEPS} in
|
||||
@ -421,7 +460,20 @@ kde5_src_prepare() {
|
||||
;;
|
||||
esac
|
||||
|
||||
cmake-utils_src_prepare
|
||||
# only build unit tests when required
|
||||
if ! use_if_iuse test ; then
|
||||
if [[ ${KDE_TEST} = forceoptional ]] ; then
|
||||
punt_bogus_dep Qt5 Test
|
||||
# if forceoptional, also cover non-kde categories
|
||||
cmake_comment_add_subdirectory autotests
|
||||
cmake_comment_add_subdirectory test
|
||||
cmake_comment_add_subdirectory tests
|
||||
elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then
|
||||
cmake_comment_add_subdirectory autotests
|
||||
cmake_comment_add_subdirectory test
|
||||
cmake_comment_add_subdirectory tests
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: kde5_src_configure
|
||||
@ -460,7 +512,7 @@ kde5_src_compile() {
|
||||
|
||||
# Build doxygen documentation if applicable
|
||||
if use_if_iuse doc ; then
|
||||
kgenapidox . || die
|
||||
kgenapidox ${KDE_DOX_DIR} || die
|
||||
fi
|
||||
}
|
||||
|
||||
@ -485,7 +537,7 @@ kde5_src_test() {
|
||||
unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
|
||||
|
||||
if [[ ${VIRTUALX_REQUIRED} = always || ${VIRTUALX_REQUIRED} = test ]]; then
|
||||
VIRTUALX_COMMAND="_test_runner" virtualmake
|
||||
virtx _test_runner
|
||||
else
|
||||
_test_runner
|
||||
fi
|
||||
@ -507,6 +559,12 @@ kde5_src_install() {
|
||||
fi
|
||||
|
||||
cmake-utils_src_install
|
||||
|
||||
# We don't want ${PREFIX}/share/doc/HTML to be compressed,
|
||||
# because then khelpcenter can't find the docs
|
||||
if [[ -d ${ED}/${PREFIX}/share/doc/HTML ]]; then
|
||||
docompress -x ${PREFIX}/share/doc/HTML
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: kde5_pkg_preinst
|
||||
@ -516,6 +574,7 @@ kde5_pkg_preinst() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
gnome2_icon_savelist
|
||||
xdg_pkg_preinst
|
||||
}
|
||||
|
||||
# @FUNCTION: kde5_pkg_postinst
|
||||
@ -525,7 +584,7 @@ kde5_pkg_postinst() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
gnome2_icon_cache_update
|
||||
fdo-mime_desktop_database_update
|
||||
xdg_pkg_postinst
|
||||
}
|
||||
|
||||
# @FUNCTION: kde5_pkg_postrm
|
||||
@ -535,7 +594,7 @@ kde5_pkg_postrm() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
gnome2_icon_cache_update
|
||||
fdo-mime_desktop_database_update
|
||||
xdg_pkg_postrm
|
||||
}
|
||||
|
||||
fi
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/l10n.eclass,v 1.2 2012/07/26 09:34:55 yngwin Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: l10n.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/latex-package.eclass,v 1.41 2015/05/17 11:10:22 ulm Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: latex-package.eclass
|
||||
# @MAINTAINER:
|
||||
@ -51,16 +51,18 @@
|
||||
# you must either grab each file individually, or find a place to mirror an
|
||||
# archive of them. (iBiblio)
|
||||
#
|
||||
# It inherits base.
|
||||
# It inherits base and eutils in EAPI 5 and earlier.
|
||||
|
||||
inherit base
|
||||
case ${EAPI:-0} in
|
||||
0|1|2|3|4|5) inherit base eutils ;;
|
||||
6) ;;
|
||||
*) die "Unknown EAPI ${EAPI} for ${ECLASS}" ;;
|
||||
esac
|
||||
|
||||
RDEPEND="virtual/latex-base"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-apps/texinfo-4.2-r5"
|
||||
HOMEPAGE="http://www.tug.org/"
|
||||
SRC_URI="ftp://tug.ctan.org/macros/latex/"
|
||||
S=${WORKDIR}/${P}
|
||||
TEXMF="/usr/share/texmf-site"
|
||||
|
||||
# @ECLASS-VARIABLE: SUPPLIER
|
||||
@ -69,17 +71,12 @@ TEXMF="/usr/share/texmf-site"
|
||||
# DESCRIPTION above)
|
||||
SUPPLIER="misc"
|
||||
|
||||
# @FUNCTION: latex-package_has_tetex3
|
||||
# @RETURN: true if at least one of (>=tetex-3 or >=ptex-3.1.8 or >=texlive-core-2007) is installed, else false
|
||||
# @DESCRIPTION:
|
||||
# It is often used to know if the current TeX installation supports gentoo's
|
||||
# texmf-update or if the package has to do it the old way
|
||||
# Kept for backwards compatibility
|
||||
latex-package_has_tetex_3() {
|
||||
if has_version '>=app-text/tetex-3' || has_version '>=app-text/ptex-3.1.8' || has_version '>=app-text/texlive-core-2007' ; then
|
||||
true
|
||||
else
|
||||
false
|
||||
fi
|
||||
case ${EAPI:-0} in
|
||||
0|1|2|3|4|5) return 0 ;;
|
||||
*) die "${FUNCNAME} no longer supported in EAPI ${EAPI}" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# @FUNCTION: latex-package_src_doinstall
|
||||
@ -127,11 +124,18 @@ latex-package_src_doinstall() {
|
||||
done
|
||||
;;
|
||||
"tex" | "dtx")
|
||||
for i in `find . -maxdepth 1 -type f -name "*.${1}"`
|
||||
do
|
||||
einfo "Making documentation: $i"
|
||||
texi2dvi -q -c --language=latex $i &> /dev/null
|
||||
if ! in_iuse doc || use doc ; then
|
||||
for i in `find . -maxdepth 1 -type f -name "*.${1}"`
|
||||
do
|
||||
einfo "Making documentation: $i"
|
||||
if pdflatex --interaction=batchmode $i &> /dev/null ; then
|
||||
pdflatex --interaction=batchmode $i &> /dev/null || die
|
||||
else
|
||||
einfo "pdflatex failed, trying texi2dvi"
|
||||
texi2dvi -q -c --language=latex $i &> /dev/null || die
|
||||
fi
|
||||
done
|
||||
fi
|
||||
;;
|
||||
"tfm" | "vf" | "afm")
|
||||
for i in `find . -maxdepth 1 -type f -name "*.${1}"`
|
||||
@ -190,7 +194,7 @@ latex-package_src_compile() {
|
||||
for i in `find \`pwd\` -maxdepth 1 -type f -name "*.ins"`
|
||||
do
|
||||
einfo "Extracting from $i"
|
||||
latex --interaction=batchmode $i &> /dev/null
|
||||
latex --interaction=batchmode $i &> /dev/null || die
|
||||
done
|
||||
}
|
||||
|
||||
@ -228,11 +232,7 @@ latex-package_pkg_postrm() {
|
||||
# Rehashes the kpathsea database, according to the current TeX installation
|
||||
latex-package_rehash() {
|
||||
debug-print function $FUNCNAME $*
|
||||
if latex-package_has_tetex_3 ; then
|
||||
texmf-update
|
||||
else
|
||||
texconfig rehash
|
||||
fi
|
||||
texmf-update
|
||||
}
|
||||
|
||||
EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/leechcraft.eclass,v 1.17 2015/01/11 20:40:24 maksbotan Exp $
|
||||
# $Id$
|
||||
#
|
||||
# @ECLASS: leechcraft.eclass
|
||||
# @MAINTAINER:
|
||||
@ -19,7 +19,7 @@
|
||||
#
|
||||
# Thanks for original eclass to Andrian Nord <NightNord@niifaq.ru>.
|
||||
#
|
||||
# Only EAPI >1 supported
|
||||
# Only EAPI >3 supported
|
||||
|
||||
case ${EAPI:-0} in
|
||||
4|5) ;;
|
||||
@ -68,15 +68,13 @@ EXPORT_FUNCTIONS "pkg_pretend"
|
||||
leechcraft_pkg_pretend() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
# 0.5.85 and later requires at least gcc 4.6
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
# All in-tree versions require at least gcc 4.6
|
||||
[[ $(gcc-major-version) -lt 4 ]] || \
|
||||
( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) \
|
||||
&& die "Sorry, but gcc 4.6 or higher is required."
|
||||
fi
|
||||
if version_is_at_least 0.6.66 || ( [[ ${PN} == lc-monocle ]] && version_is_at_least 0.6.65 ); then
|
||||
# 0.6.65 monocle and all later plugins require at least gcc 4.8
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
if version_is_at_least 0.6.66 || ( [[ ${PN} == lc-monocle ]] && version_is_at_least 0.6.65 ); then
|
||||
[[ $(gcc-major-version) -lt 4 ]] || \
|
||||
( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 8 ]] ) \
|
||||
&& die "Sorry, but gcc 4.8 or higher is required."
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.116 2014/01/14 20:50:23 mpagano Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: linux-mod.eclass
|
||||
# @MAINTAINER:
|
||||
# kernel-misc@gentoo.org
|
||||
# kernel@gentoo.org
|
||||
# @AUTHOR:
|
||||
# John Mylchreest <johnm@gentoo.org>,
|
||||
# Stefan Schweizer <genstef@gentoo.org>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/makeedit.eclass,v 1.13 2011/08/22 04:46:32 vapier Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: makeedit.eclass
|
||||
# @AUTHOR:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.24 2014/07/25 23:18:34 ottxor Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: mercurial.eclass
|
||||
# @MAINTAINER:
|
||||
@ -112,7 +112,7 @@ mercurial_fetch() {
|
||||
die "failed to create ${EHG_STORE_DIR}/${EHG_PROJECT}"
|
||||
chmod -f g+rw "${EHG_STORE_DIR}/${EHG_PROJECT}" || \
|
||||
echo "Warning: failed to chmod g+rw ${EHG_PROJECT}"
|
||||
cd "${EHG_STORE_DIR}/${EHG_PROJECT}" || \
|
||||
pushd "${EHG_STORE_DIR}/${EHG_PROJECT}" > /dev/null || \
|
||||
die "failed to cd to ${EHG_STORE_DIR}/${EHG_PROJECT}"
|
||||
|
||||
# Clone/update repository:
|
||||
@ -122,12 +122,13 @@ mercurial_fetch() {
|
||||
rm -rf "${module}"
|
||||
die "failed to clone ${EHG_REPO_URI}"
|
||||
}
|
||||
cd "${module}"
|
||||
elif [[ -z "${EHG_OFFLINE}" ]]; then
|
||||
einfo "Updating ${EHG_STORE_DIR}/${EHG_PROJECT}/${module} from ${EHG_REPO_URI}"
|
||||
cd "${module}" || die "failed to cd to ${module}"
|
||||
pushd "${module}" > /dev/null || die "failed to cd to ${module}"
|
||||
${EHG_PULL_CMD} "${EHG_REPO_URI}" || die "update failed"
|
||||
popd > /dev/null || die
|
||||
fi
|
||||
popd > /dev/null || die
|
||||
|
||||
# Checkout working copy:
|
||||
einfo "Creating working directory in ${sourcedir} (target revision: ${EHG_REVISION})"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mono-env.eclass,v 1.2 2013/06/16 10:07:01 pacho Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: mono-env.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.15 2011/08/22 04:46:32 vapier Exp $
|
||||
# $Id$
|
||||
|
||||
# @ECLASS: mono.eclass
|
||||
# @MAINTAINER:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mozconfig-3.eclass,v 1.37 2013/08/28 15:23:12 axs Exp $
|
||||
# $Id$
|
||||
#
|
||||
# mozconfig.eclass: the new mozilla.eclass
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user