mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 01:46:58 +02:00
bump(eclass): sync with upstream
This commit is contained in:
parent
d17c94b539
commit
57fc6031e6
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,9 @@
|
|||||||
# Eclass for building dev-java/ant-* packages
|
# Eclass for building dev-java/ant-* packages
|
||||||
#
|
#
|
||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||||
# Author Vlastimil Babka <caster@gentoo.org>
|
# Author Vlastimil Babka <caster@gentoo.org>
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/ant-tasks.eclass,v 1.13 2012/06/01 12:19:42 sera Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/ant-tasks.eclass,v 1.15 2013/08/28 21:28:33 tomwij Exp $
|
||||||
|
|
||||||
# we set ant-core dep ourselves, restricted
|
# we set ant-core dep ourselves, restricted
|
||||||
JAVA_ANT_DISABLE_ANT_CORE_DEP=true
|
JAVA_ANT_DISABLE_ANT_CORE_DEP=true
|
||||||
@ -25,21 +25,21 @@ EXPORT_FUNCTIONS src_unpack src_compile src_install
|
|||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# @variable-preinherit ANT_TASK_JDKVER
|
# @variable-preinherit ANT_TASK_JDKVER
|
||||||
# @variable-default 1.4
|
# @variable-default 1.5
|
||||||
#
|
#
|
||||||
# Affects the >=virtual/jdk version set in DEPEND string. Defaults to 1.4, can
|
# Affects the >=virtual/jdk version set in DEPEND string. Defaults to 1.5, can
|
||||||
# be overriden from ebuild BEFORE inheriting this eclass.
|
# be overriden from ebuild BEFORE inheriting this eclass.
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
ANT_TASK_JDKVER=${ANT_TASK_JDKVER-1.4}
|
ANT_TASK_JDKVER=${ANT_TASK_JDKVER-1.5}
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# @variable-preinherit ANT_TASK_JREVER
|
# @variable-preinherit ANT_TASK_JREVER
|
||||||
# @variable-default 1.4
|
# @variable-default 1.5
|
||||||
#
|
#
|
||||||
# Affects the >=virtual/jre version set in DEPEND string. Defaults to 1.4, can
|
# Affects the >=virtual/jre version set in DEPEND string. Defaults to 1.5, can
|
||||||
# be overriden from ebuild BEFORE inheriting this eclass.
|
# be overriden from ebuild BEFORE inheriting this eclass.
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
ANT_TASK_JREVER=${ANT_TASK_JREVER-1.4}
|
ANT_TASK_JREVER=${ANT_TASK_JREVER-1.5}
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# @variable-internal ANT_TASK_NAME
|
# @variable-internal ANT_TASK_NAME
|
||||||
@ -90,6 +90,9 @@ else
|
|||||||
MY_PV=${PV}
|
MY_PV=${PV}
|
||||||
UPSTREAM_PREFIX="mirror://apache/ant/source"
|
UPSTREAM_PREFIX="mirror://apache/ant/source"
|
||||||
case ${PV} in
|
case ${PV} in
|
||||||
|
1.9.*)
|
||||||
|
GENTOO_PREFIX="http://dev.gentoo.org/~tomwij/files/dist"
|
||||||
|
;;
|
||||||
1.8.4)
|
1.8.4)
|
||||||
GENTOO_PREFIX="http://dev.gentoo.org/~sera/distfiles"
|
GENTOO_PREFIX="http://dev.gentoo.org/~sera/distfiles"
|
||||||
;;
|
;;
|
||||||
@ -111,7 +114,6 @@ SRC_URI="${UPSTREAM_PREFIX}/${MY_P}-src.tar.bz2
|
|||||||
${GENTOO_PREFIX}/ant-${PV}-gentoo.tar.bz2"
|
${GENTOO_PREFIX}/ant-${PV}-gentoo.tar.bz2"
|
||||||
LICENSE="Apache-2.0"
|
LICENSE="Apache-2.0"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
RDEPEND="~dev-java/ant-core-${PV}"
|
RDEPEND="~dev-java/ant-core-${PV}"
|
||||||
DEPEND="${RDEPEND}"
|
DEPEND="${RDEPEND}"
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/aolserver.eclass,v 1.9 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.29 2012/05/23 03:24:44 flameeyes Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.31 2013/04/28 16:15:33 zmedico Exp $
|
||||||
|
|
||||||
# @ECLASS: apache-2.eclass
|
# @ECLASS: apache-2.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -550,12 +550,6 @@ apache-2_src_install() {
|
|||||||
# because the default webroot is a copy of the files that exist elsewhere and we
|
# because the default webroot is a copy of the files that exist elsewhere and we
|
||||||
# don't want them to be managed/removed by portage when apache is upgraded.
|
# don't want them to be managed/removed by portage when apache is upgraded.
|
||||||
apache-2_pkg_postinst() {
|
apache-2_pkg_postinst() {
|
||||||
# fix previously wrong set permissions Bug#398899
|
|
||||||
einfo "Sanitizing directory permissions ..."
|
|
||||||
for i in /var/lib/dav /var/log/apache2 /var/cache/apache2 ; do
|
|
||||||
chmod 0750 ${i}
|
|
||||||
done
|
|
||||||
|
|
||||||
if use ssl && [[ ! -e "${ROOT}/etc/ssl/apache2/server.pem" ]]; then
|
if use ssl && [[ ! -e "${ROOT}/etc/ssl/apache2/server.pem" ]]; then
|
||||||
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Apache HTTP Server}"
|
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Apache HTTP Server}"
|
||||||
install_cert /etc/ssl/apache2/server
|
install_cert /etc/ssl/apache2/server
|
||||||
@ -575,7 +569,7 @@ apache-2_pkg_postinst() {
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
elog "Attention: cgi and cgid modules are now handled via APACHE2_MODULES flags"
|
elog "Attention: cgi and cgid modules are now handled via APACHE2_MODULES flags"
|
||||||
elog "in /etc/make.conf. Make sure to enable those in order to compile them."
|
elog "in make.conf. Make sure to enable those in order to compile them."
|
||||||
elog "In general, you should use 'cgid' with threaded MPMs and 'cgi' otherwise."
|
elog "In general, you should use 'cgid' with threaded MPMs and 'cgi' otherwise."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
# Copyright 1999-2011 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.25 2011/12/27 17:55:12 fauli Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.26 2013/06/22 00:06:53 vapier Exp $
|
||||||
|
|
||||||
# @ECLASS: apache-module.eclass
|
# @ECLASS: apache-module.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -176,7 +176,7 @@ apache-module_src_install() {
|
|||||||
debug-print-function $FUNCNAME $*
|
debug-print-function $FUNCNAME $*
|
||||||
|
|
||||||
local CD_DIR=$(apache_cd_dir)
|
local CD_DIR=$(apache_cd_dir)
|
||||||
cd "${CD_DIR}" || die "cd ${CD_DIR} failed"
|
pushd "${CD_DIR}" >/dev/null || die "cd ${CD_DIR} failed"
|
||||||
|
|
||||||
local MOD_FILE=$(apache_mod_file)
|
local MOD_FILE=$(apache_mod_file)
|
||||||
|
|
||||||
@ -207,6 +207,8 @@ apache-module_src_install() {
|
|||||||
[[ -n "${OTHER_DOCS}" ]] && dodoc ${OTHER_DOCS}
|
[[ -n "${OTHER_DOCS}" ]] && dodoc ${OTHER_DOCS}
|
||||||
[[ -n "${HTML_DOCS}" ]] && dohtml ${HTML_DOCS}
|
[[ -n "${HTML_DOCS}" ]] && dohtml ${HTML_DOCS}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
popd >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: apache-module_pkg_postinst
|
# @FUNCTION: apache-module_pkg_postinst
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v 1.8 2013/02/01 21:39:50 mgorny Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v 1.17 2013/06/28 12:42:48 mgorny Exp $
|
||||||
|
|
||||||
# @ECLASS: autotools-multilib.eclass
|
# @ECLASS: autotools-multilib.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -10,18 +10,18 @@
|
|||||||
# The autotools-multilib.eclass is an autotools-utils.eclass(5) wrapper
|
# The autotools-multilib.eclass is an autotools-utils.eclass(5) wrapper
|
||||||
# introducing support for building for more than one ABI (multilib).
|
# introducing support for building for more than one ABI (multilib).
|
||||||
#
|
#
|
||||||
# Inheriting this eclass sets IUSE=multilib and exports autotools-utils
|
# Inheriting this eclass sets the USE flags and exports autotools-utils
|
||||||
# phase function wrappers which build the package for each supported ABI
|
# phase function wrappers which build the package for each supported ABI
|
||||||
# if the flag is enabled. Otherwise, it works like regular
|
# when the relevant flag is enabled. Other than that, it works like
|
||||||
# autotools-utils.
|
# regular autotools-utils.
|
||||||
#
|
#
|
||||||
# Note that the multilib support requires out-of-source builds to be
|
# Note that the multilib support requires out-of-source builds to be
|
||||||
# enabled. Thus, it is impossible to use AUTOTOOLS_IN_SOURCE_BUILD with
|
# enabled. Thus, it is impossible to use AUTOTOOLS_IN_SOURCE_BUILD with
|
||||||
# it.
|
# it.
|
||||||
|
|
||||||
# EAPI=5 is required for meaningful MULTILIB_USEDEP.
|
# EAPI=4 is required for meaningful MULTILIB_USEDEP.
|
||||||
case ${EAPI:-0} in
|
case ${EAPI:-0} in
|
||||||
5) ;;
|
4|5) ;;
|
||||||
*) die "EAPI=${EAPI} is not supported" ;;
|
*) die "EAPI=${EAPI} is not supported" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -31,54 +31,38 @@ fi
|
|||||||
|
|
||||||
inherit autotools-utils multilib-build
|
inherit autotools-utils multilib-build
|
||||||
|
|
||||||
EXPORT_FUNCTIONS src_configure src_compile src_test src_install
|
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
|
||||||
|
|
||||||
|
autotools-multilib_src_prepare() {
|
||||||
|
autotools-utils_src_prepare "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
autotools-multilib_src_configure() {
|
autotools-multilib_src_configure() {
|
||||||
multilib_parallel_foreach_abi autotools-utils_src_configure
|
multilib_parallel_foreach_abi autotools-utils_src_configure "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
autotools-multilib_src_compile() {
|
autotools-multilib_src_compile() {
|
||||||
multilib_foreach_abi autotools-utils_src_compile
|
multilib_foreach_abi autotools-utils_src_compile "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
autotools-multilib_src_test() {
|
autotools-multilib_src_test() {
|
||||||
multilib_foreach_abi autotools-utils_src_test
|
multilib_foreach_abi autotools-utils_src_test "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
autotools-multilib_src_install() {
|
autotools-multilib_src_install() {
|
||||||
autotools-multilib_secure_install() {
|
autotools-multilib_secure_install() {
|
||||||
autotools-utils_src_install
|
autotools-utils_src_install "${@}"
|
||||||
|
|
||||||
|
# Do multilib magic only when >1 ABI is used.
|
||||||
|
if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
|
||||||
|
multilib_prepare_wrappers
|
||||||
# Make sure all headers are the same for each ABI.
|
# Make sure all headers are the same for each ABI.
|
||||||
autotools-multilib_cksum() {
|
multilib_check_headers
|
||||||
find "${ED}"usr/include -type f \
|
|
||||||
-exec cksum {} + | sort -k2
|
|
||||||
}
|
|
||||||
|
|
||||||
local cksum=$(autotools-multilib_cksum)
|
|
||||||
local cksum_file=${T}/.autotools-multilib_cksum
|
|
||||||
|
|
||||||
if [[ -f ${cksum_file} ]]; then
|
|
||||||
local cksum_prev=$(< "${cksum_file}")
|
|
||||||
|
|
||||||
if [[ ${cksum} != ${cksum_prev} ]]; then
|
|
||||||
echo "${cksum}" > "${cksum_file}.new"
|
|
||||||
|
|
||||||
eerror "Header files have changed between ABIs."
|
|
||||||
|
|
||||||
if type -p diff &>/dev/null; then
|
|
||||||
eerror "$(diff -du "${cksum_file}" "${cksum_file}.new")"
|
|
||||||
else
|
|
||||||
eerror "Old checksums in: ${cksum_file}"
|
|
||||||
eerror "New checksums in: ${cksum_file}.new"
|
|
||||||
fi
|
|
||||||
|
|
||||||
die "Header checksum mismatch, aborting."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "${cksum}" > "${cksum_file}"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
multilib_foreach_abi autotools-multilib_secure_install
|
multilib_foreach_abi autotools-multilib_secure_install "${@}"
|
||||||
|
|
||||||
|
# merge the wrappers
|
||||||
|
multilib_install_wrappers
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.61 2012/12/14 08:40:18 mgorny Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.70 2013/06/29 08:17:06 mgorny Exp $
|
||||||
|
|
||||||
# @ECLASS: autotools-utils.eclass
|
# @ECLASS: autotools-utils.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -37,8 +37,8 @@
|
|||||||
# CDEPEND="
|
# CDEPEND="
|
||||||
# media-libs/libpng:0
|
# media-libs/libpng:0
|
||||||
# qt4? (
|
# qt4? (
|
||||||
# x11-libs/qt-core:4
|
# dev-qt/qtcore:4
|
||||||
# x11-libs/qt-gui:4
|
# dev-qt/qtgui:4
|
||||||
# )
|
# )
|
||||||
# tiff? ( media-libs/tiff:0 )
|
# tiff? ( media-libs/tiff:0 )
|
||||||
# "
|
# "
|
||||||
@ -136,22 +136,6 @@ EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Specify location of autotools' configure script. By default it uses ${S}.
|
# Specify location of autotools' configure script. By default it uses ${S}.
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: myeconfargs
|
|
||||||
# @DEFAULT_UNSET
|
|
||||||
# @DESCRIPTION:
|
|
||||||
# Optional econf arguments as Bash array. Should be defined before calling src_configure.
|
|
||||||
# @CODE
|
|
||||||
# src_configure() {
|
|
||||||
# local myeconfargs=(
|
|
||||||
# --disable-readline
|
|
||||||
# --with-confdir="/etc/nasty foo confdir/"
|
|
||||||
# $(use_enable debug cnddebug)
|
|
||||||
# $(use_enable threads multithreading)
|
|
||||||
# )
|
|
||||||
# autotools-utils_src_configure
|
|
||||||
# }
|
|
||||||
# @CODE
|
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: DOCS
|
# @ECLASS-VARIABLE: DOCS
|
||||||
# @DEFAULT_UNSET
|
# @DEFAULT_UNSET
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -184,6 +168,26 @@ EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
|
|||||||
# PATCHES=( "${FILESDIR}"/${P}-mypatch.patch )
|
# PATCHES=( "${FILESDIR}"/${P}-mypatch.patch )
|
||||||
# @CODE
|
# @CODE
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: AUTOTOOLS_PRUNE_LIBTOOL_FILES
|
||||||
|
# @DEFAULT_UNSET
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Sets the mode of pruning libtool files. The values correspond to
|
||||||
|
# prune_libtool_files parameters, with leading dashes stripped.
|
||||||
|
#
|
||||||
|
# Defaults to pruning the libtool files when static libraries are not
|
||||||
|
# installed or can be linked properly without them. Libtool files
|
||||||
|
# for modules (plugins) will be kept in case plugin loader needs them.
|
||||||
|
#
|
||||||
|
# If set to 'modules', the .la files for modules will be removed
|
||||||
|
# as well. This is often the preferred option.
|
||||||
|
#
|
||||||
|
# If set to 'all', all .la files will be removed unconditionally. This
|
||||||
|
# option is discouraged and shall be used only if 'modules' does not
|
||||||
|
# remove the files.
|
||||||
|
#
|
||||||
|
# If set to 'none', no .la files will be pruned ever. Use in corner
|
||||||
|
# cases only.
|
||||||
|
|
||||||
# Determine using IN or OUT source build
|
# Determine using IN or OUT source build
|
||||||
_check_build_dir() {
|
_check_build_dir() {
|
||||||
: ${ECONF_SOURCE:=${S}}
|
: ${ECONF_SOURCE:=${S}}
|
||||||
@ -407,6 +411,22 @@ autotools-utils_src_prepare() {
|
|||||||
#
|
#
|
||||||
# IUSE="static-libs" passes --enable-shared and either --disable-static/--enable-static
|
# IUSE="static-libs" passes --enable-shared and either --disable-static/--enable-static
|
||||||
# to econf respectively.
|
# to econf respectively.
|
||||||
|
|
||||||
|
# @VARIABLE: myeconfargs
|
||||||
|
# @DEFAULT_UNSET
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Optional econf arguments as Bash array. Should be defined before calling src_configure.
|
||||||
|
# @CODE
|
||||||
|
# src_configure() {
|
||||||
|
# local myeconfargs=(
|
||||||
|
# --disable-readline
|
||||||
|
# --with-confdir="/etc/nasty foo confdir/"
|
||||||
|
# $(use_enable debug cnddebug)
|
||||||
|
# $(use_enable threads multithreading)
|
||||||
|
# )
|
||||||
|
# autotools-utils_src_configure
|
||||||
|
# }
|
||||||
|
# @CODE
|
||||||
autotools-utils_src_configure() {
|
autotools-utils_src_configure() {
|
||||||
debug-print-function ${FUNCNAME} "$@"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
@ -486,13 +506,16 @@ autotools-utils_src_install() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# XXX: support installing them from builddir as well?
|
# XXX: support installing them from builddir as well?
|
||||||
if [[ ${DOCS} ]]; then
|
if declare -p DOCS &>/dev/null; then
|
||||||
|
# an empty list == don't install anything
|
||||||
|
if [[ ${DOCS[@]} ]]; then
|
||||||
if [[ ${EAPI} == [23] ]]; then
|
if [[ ${EAPI} == [23] ]]; then
|
||||||
dodoc "${DOCS[@]}" || die
|
dodoc "${DOCS[@]}" || die
|
||||||
else
|
else
|
||||||
# dies by itself
|
# dies by itself
|
||||||
dodoc -r "${DOCS[@]}"
|
dodoc -r "${DOCS[@]}"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
local f
|
local f
|
||||||
# same list as in PMS
|
# same list as in PMS
|
||||||
@ -508,7 +531,10 @@ autotools-utils_src_install() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove libtool files and unnecessary static libs
|
# Remove libtool files and unnecessary static libs
|
||||||
prune_libtool_files
|
local prune_ltfiles=${AUTOTOOLS_PRUNE_LIBTOOL_FILES}
|
||||||
|
if [[ ${prune_ltfiles} != none ]]; then
|
||||||
|
prune_libtool_files ${prune_ltfiles:+--${prune_ltfiles}}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: autotools-utils_src_test
|
# @FUNCTION: autotools-utils_src_test
|
||||||
@ -519,7 +545,12 @@ autotools-utils_src_test() {
|
|||||||
|
|
||||||
_check_build_dir
|
_check_build_dir
|
||||||
pushd "${BUILD_DIR}" > /dev/null || die
|
pushd "${BUILD_DIR}" > /dev/null || die
|
||||||
# Run default src_test as defined in ebuild.sh
|
|
||||||
default_src_test
|
if make -n check "${@}" &>/dev/null; then
|
||||||
|
emake check "${@}" || die 'emake check failed.'
|
||||||
|
elif make -n test "${@}" &>/dev/null; then
|
||||||
|
emake test "${@}" || die 'emake test failed.'
|
||||||
|
fi
|
||||||
|
|
||||||
popd > /dev/null || die
|
popd > /dev/null || die
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.151 2013/01/28 04:13:00 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.156 2013/04/28 21:55:32 vapier Exp $
|
||||||
|
|
||||||
# @ECLASS: autotools.eclass
|
# @ECLASS: autotools.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -38,12 +38,15 @@ inherit libtool multiprocessing
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# CONSTANT!
|
# CONSTANT!
|
||||||
# The latest major version/slot of automake available on each arch. #312315
|
# The latest major version/slot of automake available on each arch. #312315
|
||||||
|
# We should list both the latest stable, and the latest unstable. #465732
|
||||||
|
# This way the stable builds will still work, but the unstable are allowed
|
||||||
|
# to build & test things for us ahead of time (if they have it installed).
|
||||||
# If a newer slot is stable on any arch, and is NOT reflected in this list,
|
# If a newer slot is stable on any arch, and is NOT reflected in this list,
|
||||||
# then circular dependencies may arise during emerge @system bootstraps.
|
# then circular dependencies may arise during emerge @system bootstraps.
|
||||||
# Do NOT change this variable in your ebuilds!
|
# Do NOT change this variable in your ebuilds!
|
||||||
# If you want to force a newer minor version, you can specify the correct
|
# If you want to force a newer minor version, you can specify the correct
|
||||||
# WANT value by using a colon: <PV>:<WANT_AUTOMAKE>
|
# WANT value by using a colon: <PV>:<WANT_AUTOMAKE>
|
||||||
_LATEST_AUTOMAKE=( 1.11.1:1.11 1.12:1.12 )
|
_LATEST_AUTOMAKE=( 1.12:1.12 1.13:1.13 )
|
||||||
|
|
||||||
_automake_atom="sys-devel/automake"
|
_automake_atom="sys-devel/automake"
|
||||||
_autoconf_atom="sys-devel/autoconf"
|
_autoconf_atom="sys-devel/autoconf"
|
||||||
@ -242,7 +245,7 @@ _at_uses_pkg() {
|
|||||||
egrep -q "${args[@]}" configure.??
|
egrep -q "${args[@]}" configure.??
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
_at_uses_autoheader() { _at_uses_pkg AC_CONFIG_HEADERS; }
|
_at_uses_autoheader() { _at_uses_pkg A{C,M}_CONFIG_HEADER{S,}; }
|
||||||
_at_uses_automake() { _at_uses_pkg AM_INIT_AUTOMAKE; }
|
_at_uses_automake() { _at_uses_pkg AM_INIT_AUTOMAKE; }
|
||||||
_at_uses_gettext() { _at_uses_pkg AM_GNU_GETTEXT_VERSION; }
|
_at_uses_gettext() { _at_uses_pkg AM_GNU_GETTEXT_VERSION; }
|
||||||
_at_uses_glibgettext() { _at_uses_pkg AM_GLIB_GNU_GETTEXT; }
|
_at_uses_glibgettext() { _at_uses_pkg AM_GLIB_GNU_GETTEXT; }
|
||||||
@ -485,8 +488,8 @@ autotools_run_tool() {
|
|||||||
# Keep a list of all the macros we might use so that we only
|
# Keep a list of all the macros we might use so that we only
|
||||||
# have to run the trace code once. Order doesn't matter.
|
# have to run the trace code once. Order doesn't matter.
|
||||||
ALL_AUTOTOOLS_MACROS=(
|
ALL_AUTOTOOLS_MACROS=(
|
||||||
AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT
|
A{C,M}_PROG_LIBTOOL LT_INIT
|
||||||
AC_CONFIG_HEADERS
|
A{C,M}_CONFIG_HEADER{S,}
|
||||||
AC_CONFIG_SUBDIRS
|
AC_CONFIG_SUBDIRS
|
||||||
AC_CONFIG_AUX_DIR AC_CONFIG_MACRO_DIR
|
AC_CONFIG_AUX_DIR AC_CONFIG_MACRO_DIR
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion-r1.eclass,v 1.3 2012/09/27 16:35:41 axs Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion-r1.eclass,v 1.10 2013/09/10 19:12:17 ssuominen Exp $
|
||||||
|
|
||||||
# @ECLASS: bash-completion-r1.eclass
|
# @ECLASS: bash-completion-r1.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -9,7 +9,12 @@
|
|||||||
# @EXAMPLE:
|
# @EXAMPLE:
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# EAPI=4
|
# EAPI=5
|
||||||
|
#
|
||||||
|
# src_configure() {
|
||||||
|
# econf \
|
||||||
|
# --with-bash-completion-dir="$(get_bashcompdir)"
|
||||||
|
# }
|
||||||
#
|
#
|
||||||
# src_install() {
|
# src_install() {
|
||||||
# default
|
# default
|
||||||
@ -18,11 +23,76 @@
|
|||||||
# }
|
# }
|
||||||
# @CODE
|
# @CODE
|
||||||
|
|
||||||
|
inherit toolchain-funcs
|
||||||
|
|
||||||
case ${EAPI:-0} in
|
case ${EAPI:-0} in
|
||||||
0|1|2|3|4|5) ;;
|
0|1|2|3|4|5) ;;
|
||||||
*) die "EAPI ${EAPI} unsupported (yet)."
|
*) die "EAPI ${EAPI} unsupported (yet)."
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# @FUNCTION: _bash-completion-r1_get_bashdir
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# First argument is name of the string in bash-completion.pc
|
||||||
|
# Second argument is the fallback directory if the string is not found
|
||||||
|
# @EXAMPLE:
|
||||||
|
# _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions
|
||||||
|
_bash-completion-r1_get_bashdir() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
if $(tc-getPKG_CONFIG) --exists bash-completion; then
|
||||||
|
local path="$($(tc-getPKG_CONFIG) --variable=$1 bash-completion)"
|
||||||
|
# we need to return unprefixed, so strip from what pkg-config returns
|
||||||
|
# to us, bug #477692
|
||||||
|
echo "${path#${EPREFIX}}"
|
||||||
|
else
|
||||||
|
echo $2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: _bash-completion-r1_get_bashcompdir
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Get unprefixed bash-completion completions directory.
|
||||||
|
_bash-completion-r1_get_bashcompdir() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
if has_version '>=app-shells/bash-completion-2.1-r1'; then
|
||||||
|
_bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions
|
||||||
|
else
|
||||||
|
_bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: _bash-completion-r1_get_helpersdir
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Get unprefixed bash-completion helpers directory.
|
||||||
|
_bash-completion-r1_get_bashhelpersdir() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
_bash-completion-r1_get_bashdir helpersdir /usr/share/bash-completion/helpers
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: get_bashcompdir
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Get the bash-completion completions directory.
|
||||||
|
get_bashcompdir() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
echo "${EPREFIX}$(_bash-completion-r1_get_bashcompdir)"
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: get_bashhelpersdir
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Get the bash-completion helpers directory.
|
||||||
|
get_bashhelpersdir() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
echo "${EPREFIX}$(_bash-completion-r1_get_bashhelpersdir)"
|
||||||
|
}
|
||||||
|
|
||||||
# @FUNCTION: dobashcomp
|
# @FUNCTION: dobashcomp
|
||||||
# @USAGE: file [...]
|
# @USAGE: file [...]
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -32,7 +102,7 @@ dobashcomp() {
|
|||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
(
|
(
|
||||||
insinto /usr/share/bash-completion
|
insinto "$(_bash-completion-r1_get_bashcompdir)"
|
||||||
doins "${@}"
|
doins "${@}"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -46,7 +116,7 @@ newbashcomp() {
|
|||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
(
|
(
|
||||||
insinto /usr/share/bash-completion
|
insinto "$(_bash-completion-r1_get_bashcompdir)"
|
||||||
newins "${@}"
|
newins "${@}"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
# Copyright 1999-2011 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion.eclass,v 1.28 2011/09/08 19:06:46 mgorny Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion.eclass,v 1.29 2013/07/05 17:39:10 ulm Exp $
|
||||||
|
|
||||||
# @DEPRECATED
|
# DEPRECATED
|
||||||
# This eclass has been superseded by bash-completion-r1 eclass.
|
# This eclass has been superseded by bash-completion-r1 eclass.
|
||||||
# Please modify your ebuilds to use that one instead.
|
# Please modify your ebuilds to use that one instead.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
# Copyright 1999-2011 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.11 2011/12/27 17:55:12 fauli Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.12 2013/08/09 16:26:59 aballier Exp $
|
||||||
|
|
||||||
# @ECLASS: bsdmk.eclass
|
# @ECLASS: bsdmk.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -74,7 +74,7 @@ dummy_mk() {
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# The bsdmk src_compile function, which is exported
|
# The bsdmk src_compile function, which is exported
|
||||||
bsdmk_src_compile() {
|
bsdmk_src_compile() {
|
||||||
mkmake || die "make failed"
|
mkmake "$@" || die "make failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: bsdmk_src_install
|
# @FUNCTION: bsdmk_src_install
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.19 2012/09/18 06:41:45 ulm Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.20 2013/07/11 18:38:59 ulm Exp $
|
||||||
#
|
#
|
||||||
# @ECLASS: bzr.eclass
|
# @ECLASS: bzr.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -41,6 +41,11 @@ esac
|
|||||||
# The directory to store all fetched Bazaar live sources.
|
# The directory to store all fetched Bazaar live sources.
|
||||||
: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/bzr-src}
|
: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/bzr-src}
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: EBZR_UNPACK_DIR
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# The working directory where the sources are copied to.
|
||||||
|
: ${EBZR_UNPACK_DIR:=${WORKDIR}/${P}}
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
|
# @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# The Bazaar command to initialise a shared repository.
|
# The Bazaar command to initialise a shared repository.
|
||||||
@ -261,13 +266,14 @@ bzr_fetch() {
|
|||||||
if [[ -n ${EBZR_WORKDIR_CHECKOUT} ]]; then
|
if [[ -n ${EBZR_WORKDIR_CHECKOUT} ]]; then
|
||||||
einfo "checking out ..."
|
einfo "checking out ..."
|
||||||
${EBZR_CHECKOUT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} \
|
${EBZR_CHECKOUT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} \
|
||||||
. "${WORKDIR}/${P}" || die "${EBZR}: checkout failed"
|
. "${EBZR_UNPACK_DIR}" || die "${EBZR}: checkout failed"
|
||||||
else
|
else
|
||||||
einfo "exporting ..."
|
einfo "exporting ..."
|
||||||
${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} \
|
${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} \
|
||||||
"${WORKDIR}/${P}" . || die "${EBZR}: export failed"
|
"${EBZR_UNPACK_DIR}" . || die "${EBZR}: export failed"
|
||||||
fi
|
fi
|
||||||
einfo "revision ${EBZR_REVISION:-${EBZR_REVNO}} is now in ${WORKDIR}/${P}"
|
einfo \
|
||||||
|
"revision ${EBZR_REVISION:-${EBZR_REVNO}} is now in ${EBZR_UNPACK_DIR}"
|
||||||
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.23 2010/01/11 20:26:53 armin76 Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2012/01/11
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/check-kernel.eclass,v 1.9 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/chromium.eclass,v 1.7 2012/09/11 08:15:08 phajdan.jr Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/chromium.eclass,v 1.8 2013/08/11 02:42:54 floppym Exp $
|
||||||
|
|
||||||
# @ECLASS: chromium.eclass
|
# @ECLASS: chromium.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -11,7 +11,9 @@
|
|||||||
|
|
||||||
inherit eutils fdo-mime gnome2-utils linux-info
|
inherit eutils fdo-mime gnome2-utils linux-info
|
||||||
|
|
||||||
EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm
|
if [[ ${CHROMIUM_EXPORT_PHASES} != no ]]; then
|
||||||
|
EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${PN} == chromium ]]; then
|
if [[ ${PN} == chromium ]]; then
|
||||||
IUSE+=" custom-cflags"
|
IUSE+=" custom-cflags"
|
||||||
|
58
sdk_container/src/third_party/portage-stable/eclass/cmake-multilib.eclass
vendored
Normal file
58
sdk_container/src/third_party/portage-stable/eclass/cmake-multilib.eclass
vendored
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-multilib.eclass,v 1.3 2013/09/06 17:11:52 axs Exp $
|
||||||
|
|
||||||
|
# @ECLASS: cmake-multilib.eclass
|
||||||
|
# @MAINTAINER:
|
||||||
|
# Michał Górny <mgorny@gentoo.org>
|
||||||
|
# @BLURB: cmake-utils wrapper for multilib builds
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# The cmake-multilib.eclass is a cmake-utils.eclass(5) wrapper
|
||||||
|
# introducing support for building for more than one ABI (multilib).
|
||||||
|
#
|
||||||
|
# Inheriting this eclass sets IUSE and exports cmake-utils phase
|
||||||
|
# function wrappers which build the package for each supported ABI
|
||||||
|
# if the appropriate flag is enabled.
|
||||||
|
#
|
||||||
|
# Note that the multilib support requires out-of-source builds to be
|
||||||
|
# enabled. Thus, it is impossible to use CMAKE_IN_SOURCE_BUILD with
|
||||||
|
# it.
|
||||||
|
|
||||||
|
# EAPI=5 is required for meaningful MULTILIB_USEDEP.
|
||||||
|
case ${EAPI:-0} in
|
||||||
|
5) ;;
|
||||||
|
*) die "EAPI=${EAPI} is not supported" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then
|
||||||
|
die "${ECLASS}: multilib support requires out-of-source builds."
|
||||||
|
fi
|
||||||
|
|
||||||
|
inherit cmake-utils multilib-build
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS src_configure src_compile src_test src_install
|
||||||
|
|
||||||
|
cmake-multilib_src_configure() {
|
||||||
|
multilib_parallel_foreach_abi cmake-utils_src_configure "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
cmake-multilib_src_compile() {
|
||||||
|
multilib_foreach_abi cmake-utils_src_compile "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
cmake-multilib_src_test() {
|
||||||
|
multilib_foreach_abi cmake-utils_src_test "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
cmake-multilib_src_install() {
|
||||||
|
cmake-multilib_secure_install() {
|
||||||
|
cmake-utils_src_install "${@}"
|
||||||
|
|
||||||
|
# Make sure all headers are the same for each ABI.
|
||||||
|
multilib_prepare_wrappers
|
||||||
|
multilib_check_headers
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_foreach_abi cmake-multilib_secure_install "${@}"
|
||||||
|
multilib_install_wrappers
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.91 2013/01/17 20:18:28 creffett Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.100 2013/07/24 20:57:38 scarabeus Exp $
|
||||||
|
|
||||||
# @ECLASS: cmake-utils.eclass
|
# @ECLASS: cmake-utils.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -12,12 +12,14 @@
|
|||||||
# Original author: Zephyrus (zephyrus@mirach.it)
|
# Original author: Zephyrus (zephyrus@mirach.it)
|
||||||
# @BLURB: common ebuild functions for cmake-based packages
|
# @BLURB: common ebuild functions for cmake-based packages
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# The cmake-utils eclass is base.eclass(5) wrapper that makes creating ebuilds for
|
# The cmake-utils eclass makes creating ebuilds for cmake-based packages much easier.
|
||||||
# cmake-based packages much easier.
|
|
||||||
# It provides all inherited features (DOCS, HTML_DOCS, PATCHES) along with out-of-source
|
# It provides all inherited features (DOCS, HTML_DOCS, PATCHES) along with out-of-source
|
||||||
# builds (default), in-source builds and an implementation of the well-known use_enable
|
# builds (default), in-source builds and an implementation of the well-known use_enable
|
||||||
# and use_with functions for CMake.
|
# and use_with functions for CMake.
|
||||||
|
|
||||||
|
if [[ ${___ECLASS_ONCE_CMAKE_UTILS} != "recur -_+^+_- spank" ]] ; then
|
||||||
|
___ECLASS_ONCE_CMAKE_UTILS="recur -_+^+_- spank"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: WANT_CMAKE
|
# @ECLASS-VARIABLE: WANT_CMAKE
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Specify if cmake-utils eclass should depend on cmake optionaly or not.
|
# Specify if cmake-utils eclass should depend on cmake optionaly or not.
|
||||||
@ -28,8 +30,8 @@ WANT_CMAKE="${WANT_CMAKE:-always}"
|
|||||||
|
|
||||||
# @ECLASS-VARIABLE: CMAKE_MIN_VERSION
|
# @ECLASS-VARIABLE: CMAKE_MIN_VERSION
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Specify the minimum required CMake version. Default is 2.8.4
|
# Specify the minimum required CMake version.
|
||||||
CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.8}"
|
CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.9}"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST
|
# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -44,9 +46,16 @@ CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-yes}"
|
|||||||
|
|
||||||
# @ECLASS-VARIABLE: CMAKE_MAKEFILE_GENERATOR
|
# @ECLASS-VARIABLE: CMAKE_MAKEFILE_GENERATOR
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Specify a makefile generator to be used by cmake. At this point only "make"
|
# Specify a makefile generator to be used by cmake.
|
||||||
# and "ninja" is supported.
|
# At this point only "emake" and "ninja" are supported.
|
||||||
CMAKE_MAKEFILE_GENERATOR="${CMAKE_MAKEFILE_GENERATOR:-make}"
|
CMAKE_MAKEFILE_GENERATOR="${CMAKE_MAKEFILE_GENERATOR:-emake}"
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: CMAKE_WARN_UNUSED_CLI
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Warn about variables that are declared on the command line
|
||||||
|
# but not used. Might give false-positives.
|
||||||
|
# "no" to disable (default) or anything else to enable.
|
||||||
|
CMAKE_WARN_UNUSED_CLI="${CMAKE_WARN_UNUSED_CLI:-no}"
|
||||||
|
|
||||||
CMAKEDEPEND=""
|
CMAKEDEPEND=""
|
||||||
case ${WANT_CMAKE} in
|
case ${WANT_CMAKE} in
|
||||||
@ -57,16 +66,30 @@ case ${WANT_CMAKE} in
|
|||||||
CMAKEDEPEND+="${WANT_CMAKE}? ( "
|
CMAKEDEPEND+="${WANT_CMAKE}? ( "
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
inherit toolchain-funcs multilib flag-o-matic base
|
inherit toolchain-funcs multilib flag-o-matic eutils
|
||||||
|
|
||||||
CMAKE_EXPF="src_compile src_test src_install"
|
CMAKE_EXPF="src_compile src_test src_install"
|
||||||
case ${EAPI:-0} in
|
case ${EAPI:-0} in
|
||||||
2|3|4|5) CMAKE_EXPF+=" src_configure" ;;
|
2|3|4|5) CMAKE_EXPF+=" src_prepare src_configure" ;;
|
||||||
1|0) ;;
|
1|0) eerror "cmake-utils no longer supports EAPI 0-1." && die
|
||||||
*) die "Unknown EAPI, Bug eclass maintainers." ;;
|
;;
|
||||||
|
*) die "Unknown EAPI, bug eclass maintainers." ;;
|
||||||
esac
|
esac
|
||||||
EXPORT_FUNCTIONS ${CMAKE_EXPF}
|
EXPORT_FUNCTIONS ${CMAKE_EXPF}
|
||||||
|
|
||||||
|
case ${CMAKE_MAKEFILE_GENERATOR} in
|
||||||
|
emake)
|
||||||
|
CMAKEDEPEND+=" sys-devel/make"
|
||||||
|
;;
|
||||||
|
ninja)
|
||||||
|
CMAKEDEPEND+=" dev-util/ninja"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
eerror "Unknown value for \${CMAKE_MAKEFILE_GENERATOR}"
|
||||||
|
die "Value ${CMAKE_MAKEFILE_GENERATOR} is not supported"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ ${PN} != cmake ]]; then
|
if [[ ${PN} != cmake ]]; then
|
||||||
CMAKEDEPEND+=" >=dev-util/cmake-${CMAKE_MIN_VERSION}"
|
CMAKEDEPEND+=" >=dev-util/cmake-${CMAKE_MIN_VERSION}"
|
||||||
fi
|
fi
|
||||||
@ -195,10 +218,22 @@ _check_build_dir() {
|
|||||||
|
|
||||||
# Determine which generator to use
|
# Determine which generator to use
|
||||||
_generator_to_use() {
|
_generator_to_use() {
|
||||||
if [[ ${CMAKE_MAKEFILE_GENERATOR} = "ninja" ]]; then
|
local generator_name
|
||||||
has_version dev-util/ninja && echo "Ninja" && return
|
|
||||||
fi
|
case ${CMAKE_MAKEFILE_GENERATOR} in
|
||||||
echo "Unix Makefiles"
|
ninja)
|
||||||
|
generator_name="Ninja"
|
||||||
|
;;
|
||||||
|
emake)
|
||||||
|
generator_name="Unix Makefiles"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
eerror "Unknown value for \${CMAKE_MAKEFILE_GENERATOR}"
|
||||||
|
die "Value ${CMAKE_MAKEFILE_GENERATOR} is not supported"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo ${generator_name}
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: cmake-utils_use_with
|
# @FUNCTION: cmake-utils_use_with
|
||||||
@ -219,6 +254,16 @@ cmake-utils_use_with() { _use_me_now WITH_ "$@" ; }
|
|||||||
# and -DENABLE_FOO=OFF if it is disabled.
|
# and -DENABLE_FOO=OFF if it is disabled.
|
||||||
cmake-utils_use_enable() { _use_me_now ENABLE_ "$@" ; }
|
cmake-utils_use_enable() { _use_me_now ENABLE_ "$@" ; }
|
||||||
|
|
||||||
|
# @FUNCTION: cmake-utils_use_find_package
|
||||||
|
# @USAGE: <USE flag> [flag name]
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Based on use_enable. See ebuild(5).
|
||||||
|
#
|
||||||
|
# `cmake-utils_use_find_package foo LibFoo` echoes -DCMAKE_DISABLE_FIND_PACKAGE_LibFoo=OFF
|
||||||
|
# if foo is enabled and -DCMAKE_DISABLE_FIND_PACKAGE_LibFoo=ON if it is disabled.
|
||||||
|
# This can be used to make find_package optional (since cmake-2.8.6).
|
||||||
|
cmake-utils_use_find_package() { _use_me_now_inverted CMAKE_DISABLE_FIND_PACKAGE_ "$@" ; }
|
||||||
|
|
||||||
# @FUNCTION: cmake-utils_use_disable
|
# @FUNCTION: cmake-utils_use_disable
|
||||||
# @USAGE: <USE flag> [flag name]
|
# @USAGE: <USE flag> [flag name]
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -315,6 +360,35 @@ _modify-cmakelists() {
|
|||||||
_EOF_
|
_EOF_
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enable_cmake-utils_src_prepare() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
debug-print "$FUNCNAME: PATCHES=$PATCHES"
|
||||||
|
|
||||||
|
pushd "${S}" > /dev/null
|
||||||
|
[[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
|
||||||
|
|
||||||
|
debug-print "$FUNCNAME: applying user patches"
|
||||||
|
epatch_user
|
||||||
|
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# @VARIABLE: mycmakeargs
|
||||||
|
# @DEFAULT_UNSET
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Optional cmake defines as a bash array. Should be defined before calling
|
||||||
|
# src_configure.
|
||||||
|
# @CODE
|
||||||
|
# src_configure() {
|
||||||
|
# local mycmakeargs=(
|
||||||
|
# $(cmake-utils_use_with openconnect)
|
||||||
|
# )
|
||||||
|
# cmake-utils_src_configure
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
enable_cmake-utils_src_configure() {
|
enable_cmake-utils_src_configure() {
|
||||||
debug-print-function ${FUNCNAME} "$@"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
@ -359,6 +433,7 @@ enable_cmake-utils_src_configure() {
|
|||||||
SET (CMAKE_CXX_COMPILER $(type -P $(tc-getCXX)) CACHE FILEPATH "C++ compiler" FORCE)
|
SET (CMAKE_CXX_COMPILER $(type -P $(tc-getCXX)) CACHE FILEPATH "C++ compiler" FORCE)
|
||||||
SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
|
SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
|
||||||
SET (CMAKE_RANLIB $(type -P $(tc-getRANLIB)) CACHE FILEPATH "Archive index generator" FORCE)
|
SET (CMAKE_RANLIB $(type -P $(tc-getRANLIB)) CACHE FILEPATH "Archive index generator" FORCE)
|
||||||
|
SET (PKG_CONFIG_EXECUTABLE $(type -P $(tc-getPKG_CONFIG)) CACHE FILEPATH "pkg-config executable" FORCE)
|
||||||
_EOF_
|
_EOF_
|
||||||
|
|
||||||
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
|
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
|
||||||
@ -404,11 +479,17 @@ enable_cmake-utils_src_configure() {
|
|||||||
local mycmakeargs_local=("${mycmakeargs[@]}")
|
local mycmakeargs_local=("${mycmakeargs[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ${CMAKE_WARN_UNUSED_CLI} == no ]] ; then
|
||||||
|
local warn_unused_cli="--no-warn-unused-cli"
|
||||||
|
else
|
||||||
|
local warn_unused_cli=""
|
||||||
|
fi
|
||||||
|
|
||||||
# Common configure parameters (overridable)
|
# Common configure parameters (overridable)
|
||||||
# NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
|
# NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
|
||||||
# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
|
# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
|
||||||
local cmakeargs=(
|
local cmakeargs=(
|
||||||
--no-warn-unused-cli
|
${warn_unused_cli}
|
||||||
-C "${common_config}"
|
-C "${common_config}"
|
||||||
-G "$(_generator_to_use)"
|
-G "$(_generator_to_use)"
|
||||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}"
|
-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}"
|
||||||
@ -433,6 +514,40 @@ enable_cmake-utils_src_compile() {
|
|||||||
cmake-utils_src_make "$@"
|
cmake-utils_src_make "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: ninja_src_make
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Build the package using ninja generator
|
||||||
|
ninja_src_make() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
[[ -e build.ninja ]] || die "Makefile not found. Error during configure stage."
|
||||||
|
|
||||||
|
if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
|
||||||
|
# TODO: get load average from portage (-l option)
|
||||||
|
ninja ${MAKEOPTS} -v "$@" || die
|
||||||
|
else
|
||||||
|
ninja "$@" || die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: emake_src_make
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Build the package using make generator
|
||||||
|
emake_src_make() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
|
||||||
|
|
||||||
|
if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
|
||||||
|
emake VERBOSE=1 "$@" || die
|
||||||
|
else
|
||||||
|
emake "$@" || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
# @FUNCTION: cmake-utils_src_make
|
# @FUNCTION: cmake-utils_src_make
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Function for building the package. Automatically detects the build type.
|
# Function for building the package. Automatically detects the build type.
|
||||||
@ -442,24 +557,9 @@ cmake-utils_src_make() {
|
|||||||
|
|
||||||
_check_build_dir
|
_check_build_dir
|
||||||
pushd "${BUILD_DIR}" > /dev/null
|
pushd "${BUILD_DIR}" > /dev/null
|
||||||
if [[ $(_generator_to_use) = Ninja ]]; then
|
|
||||||
# first check if Makefile exist otherwise die
|
${CMAKE_MAKEFILE_GENERATOR}_src_make $@
|
||||||
[[ -e build.ninja ]] || die "Makefile not found. Error during configure stage."
|
|
||||||
if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
|
|
||||||
#TODO get load average from portage (-l option)
|
|
||||||
ninja ${MAKEOPTS} -v "$@"
|
|
||||||
else
|
|
||||||
ninja "$@"
|
|
||||||
fi || die "ninja failed!"
|
|
||||||
else
|
|
||||||
# first check if Makefile exist otherwise die
|
|
||||||
[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
|
|
||||||
if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
|
|
||||||
emake VERBOSE=1 "$@" || die "Make failed!"
|
|
||||||
else
|
|
||||||
emake "$@" || die "Make failed!"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -468,14 +568,26 @@ enable_cmake-utils_src_install() {
|
|||||||
|
|
||||||
_check_build_dir
|
_check_build_dir
|
||||||
pushd "${BUILD_DIR}" > /dev/null
|
pushd "${BUILD_DIR}" > /dev/null
|
||||||
if [[ $(_generator_to_use) = Ninja ]]; then
|
DESTDIR="${D}" ${CMAKE_MAKEFILE_GENERATOR} install "$@" || die "died running ${CMAKE_MAKEFILE_GENERATOR} install"
|
||||||
DESTDIR=${D} ninja install "$@" || die "died running ninja install"
|
|
||||||
base_src_install_docs
|
|
||||||
else
|
|
||||||
base_src_install "$@"
|
|
||||||
fi
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
|
pushd "${S}" > /dev/null
|
||||||
|
#Install docs, copied from base_src_install_docs
|
||||||
|
local x
|
||||||
|
|
||||||
|
if [[ "$(declare -p DOCS 2>/dev/null 2>&1)" == "declare -a"* ]]; then
|
||||||
|
for x in "${DOCS[@]}"; do
|
||||||
|
debug-print "$FUNCNAME: docs: creating document from ${x}"
|
||||||
|
dodoc "${x}" || die "dodoc failed"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" == "declare -a"* ]]; then
|
||||||
|
for x in "${HTML_DOCS[@]}"; do
|
||||||
|
debug-print "$FUNCNAME: docs: creating html document from ${x}"
|
||||||
|
dohtml -r "${x}" || die "dohtml failed"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Backward compatibility, for non-array variables
|
# Backward compatibility, for non-array variables
|
||||||
if [[ -n "${DOCS}" ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
|
if [[ -n "${DOCS}" ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
|
||||||
dodoc ${DOCS} || die "dodoc failed"
|
dodoc ${DOCS} || die "dodoc failed"
|
||||||
@ -483,6 +595,8 @@ enable_cmake-utils_src_install() {
|
|||||||
if [[ -n "${HTML_DOCS}" ]] && [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
|
if [[ -n "${HTML_DOCS}" ]] && [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
|
||||||
dohtml -r ${HTML_DOCS} || die "dohtml failed"
|
dohtml -r ${HTML_DOCS} || die "dohtml failed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_cmake-utils_src_test() {
|
enable_cmake-utils_src_test() {
|
||||||
@ -516,6 +630,13 @@ enable_cmake-utils_src_test() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: cmake-utils_src_prepare
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Apply ebuild and user patches.
|
||||||
|
cmake-utils_src_prepare() {
|
||||||
|
_execute_optionaly "src_prepare" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
# @FUNCTION: cmake-utils_src_configure
|
# @FUNCTION: cmake-utils_src_configure
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# General function for configuring with cmake. Default behaviour is to start an
|
# General function for configuring with cmake. Default behaviour is to start an
|
||||||
@ -556,3 +677,5 @@ _execute_optionaly() {
|
|||||||
use ${WANT_CMAKE} && enable_cmake-utils_${phase} "$@"
|
use ${WANT_CMAKE} && enable_cmake-utils_${phase} "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
# Copyright 1999-2011 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/cron.eclass,v 1.15 2011/08/22 04:46:31 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/cron.eclass,v 1.16 2013/09/05 10:44:22 zx2c4 Exp $
|
||||||
|
|
||||||
# @ECLASS: cron
|
# @ECLASS: cron
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -27,8 +27,7 @@ SLOT="0"
|
|||||||
|
|
||||||
DEPEND=">=sys-apps/sed-4.0.5"
|
DEPEND=">=sys-apps/sed-4.0.5"
|
||||||
|
|
||||||
RDEPEND="virtual/mta
|
RDEPEND=">=sys-process/cronbase-0.3.2"
|
||||||
>=sys-process/cronbase-0.3.2"
|
|
||||||
for pn in vixie-cron bcron cronie dcron fcron; do
|
for pn in vixie-cron bcron cronie dcron fcron; do
|
||||||
[[ ${pn} == "${PN}" ]] || RDEPEND="${RDEPEND} !sys-process/${pn}"
|
[[ ${pn} == "${PN}" ]] || RDEPEND="${RDEPEND} !sys-process/${pn}"
|
||||||
done
|
done
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/cuda.eclass,v 1.1 2013/01/11 08:31:49 jlec Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/cuda.eclass,v 1.3 2013/08/11 16:20:23 jlec Exp $
|
||||||
|
|
||||||
inherit toolchain-funcs versionator
|
inherit flag-o-matic toolchain-funcs versionator
|
||||||
|
|
||||||
# @ECLASS: cuda.eclass
|
# @ECLASS: cuda.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -96,15 +96,19 @@ cuda_gccdir() {
|
|||||||
# Correct NVCCFLAGS by adding the necessary reference to gcc bindir and
|
# Correct NVCCFLAGS by adding the necessary reference to gcc bindir and
|
||||||
# passing CXXFLAGS to underlying compiler without disturbing nvcc.
|
# passing CXXFLAGS to underlying compiler without disturbing nvcc.
|
||||||
cuda_sanitize() {
|
cuda_sanitize() {
|
||||||
|
local rawldflags=$(raw-ldflags)
|
||||||
# Be verbose if wanted
|
# Be verbose if wanted
|
||||||
[[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v"
|
[[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v"
|
||||||
|
|
||||||
# Tell nvcc where to find a compatible compiler
|
# Tell nvcc where to find a compatible compiler
|
||||||
|
if has_version \<=dev-util/nvidia-cuda-toolkit-5.5; then
|
||||||
NVCCFLAGS+=" $(cuda_gccdir -f)"
|
NVCCFLAGS+=" $(cuda_gccdir -f)"
|
||||||
|
fi
|
||||||
|
|
||||||
# Tell nvcc which flags should be used for underlying C compiler
|
# Tell nvcc which flags should be used for underlying C compiler
|
||||||
NVCCFLAGS+=" --compiler-options=\"${CXXFLAGS}\""
|
NVCCFLAGS+=" --compiler-options=\"${CXXFLAGS}\" --linker-options=\"${rawldflags// /,}\""
|
||||||
|
|
||||||
|
debug-print "Using ${NVCCFLAGS} for cuda"
|
||||||
export NVCCFLAGS
|
export NVCCFLAGS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.81 2013/01/22 07:29:02 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.82 2013/06/18 04:31:44 ottxor Exp $
|
||||||
|
|
||||||
# @ECLASS: cvs.eclass
|
# @ECLASS: cvs.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -301,10 +301,10 @@ cvs_fetch() {
|
|||||||
|
|
||||||
# Our server string (i.e. CVSROOT) without the password so it can
|
# Our server string (i.e. CVSROOT) without the password so it can
|
||||||
# be put in Root
|
# be put in Root
|
||||||
|
local connection="${ECVS_AUTH}"
|
||||||
if [[ ${ECVS_AUTH} == "no" ]] ; then
|
if [[ ${ECVS_AUTH} == "no" ]] ; then
|
||||||
local server="${ECVS_USER}@${ECVS_SERVER}"
|
local server="${ECVS_USER}@${ECVS_SERVER}"
|
||||||
else
|
else
|
||||||
local connection="${ECVS_AUTH}"
|
|
||||||
[[ -n ${ECVS_PROXY} ]] && connection+=";proxy=${ECVS_PROXY}"
|
[[ -n ${ECVS_PROXY} ]] && connection+=";proxy=${ECVS_PROXY}"
|
||||||
[[ -n ${ECVS_PROXY_PORT} ]] && connection+=";proxyport=${ECVS_PROXY_PORT}"
|
[[ -n ${ECVS_PROXY_PORT} ]] && connection+=";proxyport=${ECVS_PROXY_PORT}"
|
||||||
local server=":${connection}:${ECVS_USER}@${ECVS_SERVER}"
|
local server=":${connection}:${ECVS_USER}@${ECVS_SERVER}"
|
||||||
@ -340,15 +340,15 @@ cvs_fetch() {
|
|||||||
chown "${ECVS_RUNAS}" "${T}/cvspass"
|
chown "${ECVS_RUNAS}" "${T}/cvspass"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The server string with the password in it, for login
|
# The server string with the password in it, for login (only used for pserver)
|
||||||
cvsroot_pass=":${ECVS_AUTH}:${ECVS_USER}:${ECVS_PASS}@${ECVS_SERVER}"
|
cvsroot_pass=":${connection}:${ECVS_USER}:${ECVS_PASS}@${ECVS_SERVER}"
|
||||||
|
|
||||||
# Ditto without the password, for checkout/update after login, so
|
# Ditto without the password, for checkout/update after login, so
|
||||||
# that the CVS/Root files don't contain the password in plaintext
|
# that the CVS/Root files don't contain the password in plaintext
|
||||||
if [[ ${ECVS_AUTH} == "no" ]] ; then
|
if [[ ${ECVS_AUTH} == "no" ]] ; then
|
||||||
cvsroot_nopass="${ECVS_USER}@${ECVS_SERVER}"
|
cvsroot_nopass="${ECVS_USER}@${ECVS_SERVER}"
|
||||||
else
|
else
|
||||||
cvsroot_nopass=":${ECVS_AUTH}:${ECVS_USER}@${ECVS_SERVER}"
|
cvsroot_nopass=":${connection}:${ECVS_USER}@${ECVS_SERVER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Commands to run
|
# Commands to run
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v 1.10 2011/12/27 17:55:12 fauli Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v 1.11 2013/07/21 09:23:45 pacho Exp $
|
||||||
# This is a common location for functions that aid the use of sys-libs/db
|
# This is a common location for functions that aid the use of sys-libs/db
|
||||||
#
|
#
|
||||||
# Bugs: pauldv@gentoo.org
|
# Bugs: maintainer-needed@gentoo.org
|
||||||
|
|
||||||
inherit versionator multilib
|
inherit versionator multilib
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.47 2012/10/08 19:59:59 robbat2 Exp $
|
# $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
|
# This is a common location for functions used in the sys-libs/db ebuilds
|
||||||
#
|
#
|
||||||
# Bugs: pauldv@gentoo.org
|
# Bugs: maintainer-needed@gentoo.org
|
||||||
|
|
||||||
inherit eutils multilib
|
inherit eutils multilib
|
||||||
|
|
||||||
@ -168,6 +168,7 @@ db_src_test() {
|
|||||||
sed -ri \
|
sed -ri \
|
||||||
-e '/regsub .test_path ./s,(regsub),#\1,g' \
|
-e '/regsub .test_path ./s,(regsub),#\1,g' \
|
||||||
-e '/regsub .src_root ./s,(regsub),#\1,g' \
|
-e '/regsub .src_root ./s,(regsub),#\1,g' \
|
||||||
|
-e '/regsub .tcl_utils ./s,(regsub),#\1,g' \
|
||||||
"${test_parallel}"
|
"${test_parallel}"
|
||||||
cd "${S}"
|
cd "${S}"
|
||||||
for t in \
|
for t in \
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/db4-fix.eclass,v 1.7 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.74 2013/08/01 13:02:32 mgorny Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.80 2013/09/17 17:33:39 mgorny Exp $
|
||||||
|
|
||||||
# @ECLASS: distutils-r1
|
# @ECLASS: distutils-r1
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -308,10 +308,31 @@ distutils_install_for_testing() {
|
|||||||
esetup.py "${add_args[@]}"
|
esetup.py "${add_args[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
_disable_ez_setup() {
|
# @FUNCTION: _distutils-r1_disable_ez_setup
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Stub out ez_setup.py and distribute_setup.py to prevent packages
|
||||||
|
# from trying to download a local copy of setuptools.
|
||||||
|
_distutils-r1_disable_ez_setup() {
|
||||||
local stub="def use_setuptools(*args, **kwargs): pass"
|
local stub="def use_setuptools(*args, **kwargs): pass"
|
||||||
[[ -f ez_setup.py ]] && echo "${stub}" > ez_setup.py
|
if [[ -f ez_setup.py ]]; then
|
||||||
[[ -f distribute_setup.py ]] && echo "${stub}" > distribute_setup.py
|
echo "${stub}" > ez_setup.py || die
|
||||||
|
fi
|
||||||
|
if [[ -f distribute_setup.py ]]; then
|
||||||
|
echo "${stub}" > distribute_setup.py || die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: _distutils-r1_copy_egg_info
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Copy egg-info files to the ${BUILD_DIR} (that's going to become
|
||||||
|
# egg-base in esetup.py). This way, we respect whatever's in upstream
|
||||||
|
# egg-info.
|
||||||
|
_distutils-r1_copy_egg_info() {
|
||||||
|
mkdir -p "${BUILD_DIR}" || die
|
||||||
|
# stupid freebsd can't do 'cp -t ${BUILD_DIR} {} +'
|
||||||
|
find -name '*.egg-info' -type d -exec cp -pr {} "${BUILD_DIR}"/ ';' || die
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: distutils-r1_python_prepare_all
|
# @FUNCTION: distutils-r1_python_prepare_all
|
||||||
@ -336,8 +357,7 @@ distutils-r1_python_prepare_all() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prevent packages from downloading their own copy of setuptools
|
_distutils-r1_disable_ez_setup
|
||||||
_disable_ez_setup
|
|
||||||
|
|
||||||
if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
|
if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
|
||||||
then
|
then
|
||||||
@ -375,6 +395,8 @@ distutils-r1_python_configure() {
|
|||||||
distutils-r1_python_compile() {
|
distutils-r1_python_compile() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
_distutils-r1_copy_egg_info
|
||||||
|
|
||||||
esetup.py "${@}"
|
esetup.py "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -387,39 +409,48 @@ distutils-r1_python_test() {
|
|||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: _distutils-r1_rename_scripts
|
# @FUNCTION: _distutils-r1_wrap_scripts
|
||||||
# @USAGE: <path>
|
# @USAGE: <path>
|
||||||
# @INTERNAL
|
# @INTERNAL
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Renames installed Python scripts to be implementation-suffixed.
|
# Moves and wraps all installed scripts/executables as necessary.
|
||||||
# ${EPYTHON} needs to be set to the implementation name.
|
_distutils-r1_wrap_scripts() {
|
||||||
#
|
|
||||||
# All executable scripts having shebang referencing ${EPYTHON}
|
|
||||||
# in given path will be renamed.
|
|
||||||
_distutils-r1_rename_scripts() {
|
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
local path=${1}
|
local path=${1}
|
||||||
[[ ${path} ]] || die "${FUNCNAME}: no path given"
|
[[ ${path} ]] || die "${FUNCNAME}: no path given"
|
||||||
|
|
||||||
|
if ! _python_want_python_exec2; then
|
||||||
|
local PYTHON_SCRIPTDIR=${EPREFIX}/usr/bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "${path}/usr/bin" || die
|
||||||
local f
|
local f
|
||||||
while IFS= read -r -d '' f; do
|
while IFS= read -r -d '' f; do
|
||||||
debug-print "${FUNCNAME}: found executable at ${f#${D}/}"
|
local basename=${f##*/}
|
||||||
|
debug-print "${FUNCNAME}: found executable at ${f#${path}/}"
|
||||||
|
|
||||||
local shebang
|
local shebang
|
||||||
read -r shebang < "${f}"
|
read -r shebang < "${f}"
|
||||||
if [[ ${shebang} == '#!'*${EPYTHON}* ]]
|
if [[ ${shebang} == '#!'*${EPYTHON}* ]]; then
|
||||||
then
|
|
||||||
debug-print "${FUNCNAME}: matching shebang: ${shebang}"
|
debug-print "${FUNCNAME}: matching shebang: ${shebang}"
|
||||||
|
|
||||||
local newf=${f}-${EPYTHON}
|
if ! _python_want_python_exec2; then
|
||||||
debug-print "${FUNCNAME}: renaming to ${newf#${D}/}"
|
local newf=${f%/*}/${basename}-${EPYTHON}
|
||||||
|
debug-print "${FUNCNAME}: renaming to ${newf#${path}}"
|
||||||
mv "${f}" "${newf}" || die
|
mv "${f}" "${newf}" || die
|
||||||
|
|
||||||
debug-print "${FUNCNAME}: installing wrapper at ${f#${D}/}"
|
|
||||||
_python_ln_rel "${path}${EPREFIX}"/usr/bin/python-exec "${f}" || die
|
|
||||||
fi
|
fi
|
||||||
done < <(find "${path}" -type f -executable -print0)
|
|
||||||
|
debug-print "${FUNCNAME}: installing wrapper at /usr/bin/${basename}"
|
||||||
|
_python_ln_rel "${path}${EPREFIX}"$(_python_get_wrapper_path) \
|
||||||
|
"${path}${EPREFIX}/usr/bin/${basename}" || die
|
||||||
|
elif _python_want_python_exec2; then
|
||||||
|
debug-print "${FUNCNAME}: non-matching shebang: ${shebang}"
|
||||||
|
|
||||||
|
debug-print "${FUNCNAME}: moving to /usr/bin/${basename}"
|
||||||
|
mv "${f}" "${path}${EPREFIX}/usr/bin/${basename}" || die
|
||||||
|
fi
|
||||||
|
done < <(find "${path}${PYTHON_SCRIPTDIR}" -type f -print0)
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: distutils-r1_python_install
|
# @FUNCTION: distutils-r1_python_install
|
||||||
@ -452,15 +483,23 @@ distutils-r1_python_install() {
|
|||||||
|
|
||||||
local root=${D}/_${EPYTHON}
|
local root=${D}/_${EPYTHON}
|
||||||
[[ ${DISTUTILS_SINGLE_IMPL} ]] && root=${D}
|
[[ ${DISTUTILS_SINGLE_IMPL} ]] && root=${D}
|
||||||
|
flags+=( --root="${root}" )
|
||||||
|
|
||||||
esetup.py install "${flags[@]}" --root="${root}" "${@}"
|
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]] && _python_want_python_exec2
|
||||||
|
then
|
||||||
|
local PYTHON_SCRIPTDIR
|
||||||
|
python_export PYTHON_SCRIPTDIR
|
||||||
|
flags+=( --install-scripts="${PYTHON_SCRIPTDIR}" )
|
||||||
|
fi
|
||||||
|
|
||||||
|
esetup.py install "${flags[@]}" "${@}"
|
||||||
|
|
||||||
if [[ -d ${root}$(python_get_sitedir)/tests ]]; then
|
if [[ -d ${root}$(python_get_sitedir)/tests ]]; then
|
||||||
die "Package installs 'tests' package, file collisions likely."
|
die "Package installs 'tests' package, file collisions likely."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
|
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
|
||||||
_distutils-r1_rename_scripts "${root}"
|
_distutils-r1_wrap_scripts "${root}"
|
||||||
multibuild_merge_root "${root}" "${D}"
|
multibuild_merge_root "${root}" "${D}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -471,25 +510,7 @@ distutils-r1_python_install() {
|
|||||||
distutils-r1_python_install_all() {
|
distutils-r1_python_install_all() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
if declare -p DOCS &>/dev/null; then
|
einstalldocs
|
||||||
# an empty list == don't install anything
|
|
||||||
if [[ ${DOCS[@]} ]]; then
|
|
||||||
dodoc -r "${DOCS[@]}"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
local f
|
|
||||||
# same list as in PMS
|
|
||||||
for f in README* ChangeLog AUTHORS NEWS TODO CHANGES \
|
|
||||||
THANKS BUGS FAQ CREDITS CHANGELOG; do
|
|
||||||
if [[ -s ${f} ]]; then
|
|
||||||
dodoc "${f}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if declare -p HTML_DOCS &>/dev/null; then
|
|
||||||
dohtml -r "${HTML_DOCS[@]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if declare -p EXAMPLES &>/dev/null; then
|
if declare -p EXAMPLES &>/dev/null; then
|
||||||
local INSDESTTREE=/usr/share/doc/${PF}/examples
|
local INSDESTTREE=/usr/share/doc/${PF}/examples
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/ebook.eclass,v 1.27 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,242 +0,0 @@
|
|||||||
# Copyright 1999-2004 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/eclipse-ext.eclass,v 1.13 2006/04/17 03:47:44 nichoj Exp $
|
|
||||||
|
|
||||||
# Original Author: Karl Trygve Kalleberg <karltk@gentoo.org>
|
|
||||||
# Maintainers:
|
|
||||||
# Development Tools Team <dev-tools@gentoo.org>
|
|
||||||
# Java Team <java@gentoo.org>
|
|
||||||
|
|
||||||
inherit eutils multilib
|
|
||||||
|
|
||||||
|
|
||||||
# Must be listed in oldest->newest order!
|
|
||||||
known_eclipse_slots="2 3 3.1"
|
|
||||||
|
|
||||||
# These should not be reinitialized if previously set
|
|
||||||
# (check allows require-slot in pkg_setup)
|
|
||||||
|
|
||||||
[ -z "${eclipse_ext_type}" ] && \
|
|
||||||
eclipse_ext_type="source"
|
|
||||||
|
|
||||||
[ -z "${eclipse_ext_slot}" ] && \
|
|
||||||
eclipse_ext_slot="0"
|
|
||||||
|
|
||||||
[ -z "${eclipse_ext_basedir}" ] && \
|
|
||||||
eclipse_ext_basedir="/usr/$(get_libdir)/eclipse-extensions-${eclipse_ext_slot}/eclipse"
|
|
||||||
|
|
||||||
[ -z "${eclipse_ext_platformdir}" ] && \
|
|
||||||
eclipse_ext_platformdir="/usr/$(get_libdir)/eclipse-${eclipse_ext_slot}"
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# @private _find-optimum-slot
|
|
||||||
#
|
|
||||||
# Look for a given SLOT. If not found return the least highest SLOT
|
|
||||||
# available.
|
|
||||||
#
|
|
||||||
# @param $1 - SLOT of Eclipse SDK that is most desired
|
|
||||||
# @return 0 - all is well, non-zero otherwise
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
function _find-optimum-slot {
|
|
||||||
local found=false
|
|
||||||
|
|
||||||
for x in ${known_eclipse_slots} ; do
|
|
||||||
if [ "$1" == "$x" ] ; then
|
|
||||||
found=true
|
|
||||||
fi
|
|
||||||
if [ "${found}" == "true" ] && [ -d /usr/$(get_libdir)/eclipse-${x} ] ; then
|
|
||||||
echo $x
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo ""
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# @public require-slot
|
|
||||||
#
|
|
||||||
# Ensure that an Eclipse SDK is actually available for the given slot;
|
|
||||||
# sets internal state to install for selected slot.
|
|
||||||
#
|
|
||||||
# @param $1 - SLOT of Eclipse SDK that required for this ebuild
|
|
||||||
# alternatively
|
|
||||||
# @return 0 - all is well, non-zero otherwise
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
function eclipse-ext_require-slot {
|
|
||||||
|
|
||||||
local slot=$(_find-optimum-slot $1)
|
|
||||||
|
|
||||||
if [ -z "${slot}" ] ; then
|
|
||||||
eerror "Cannot find any Eclipse SDK supporting slot $1"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${slot}" != "$1" ] ; then
|
|
||||||
ewarn "Slot $1 could not be satisfied, installing for ${slot} instead"
|
|
||||||
fi
|
|
||||||
|
|
||||||
eclipse_ext_slot=${slot}
|
|
||||||
eclipse_ext_basedir="/usr/$(get_libdir)/eclipse-extensions-${eclipse_ext_slot}/eclipse"
|
|
||||||
eclipse_ext_platformdir="/usr/$(get_libdir)/eclipse-${eclipse_ext_slot}"
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# @public create-plugin-layout
|
|
||||||
#
|
|
||||||
# Create directory infrastructure for binary-only plugins so that the installed
|
|
||||||
# Eclipse SDK will see them. Sets internal state for installing as source or
|
|
||||||
# binary.
|
|
||||||
#
|
|
||||||
# @param $1 - type of ebuild, "source" or "binary"
|
|
||||||
# @return - nothing
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
function eclipse-ext_create-ext-layout {
|
|
||||||
local type=$1
|
|
||||||
if [ "${type}" == "binary" ] ; then
|
|
||||||
eclipse_ext_basedir="/opt/eclipse-extensions-${eclipse_ext_slot}/eclipse"
|
|
||||||
dodir ${eclipse_ext_basedir}/{features,plugins}
|
|
||||||
touch ${D}/${eclipse_ext_basedir}/.eclipseextension
|
|
||||||
else
|
|
||||||
eclipse_ext_basedir="/usr/$(get_libdir)/eclipse-extensions-${eclipse_ext_slot}/eclipse"
|
|
||||||
dodir ${eclipse_ext_basedir}/{features,plugins}
|
|
||||||
touch ${D}/${eclipse_ext_basedir}/.eclipseextension
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# @public install-features
|
|
||||||
#
|
|
||||||
# Installs one or multiple features into the plugin directory for the required
|
|
||||||
# Eclipse SDK.
|
|
||||||
#
|
|
||||||
# Note: You must call require-slot prior to calling install-features. If your
|
|
||||||
# ebuild is for a binary-only plugin, you must also call create-plugin-layout
|
|
||||||
# prior to calling install-features.
|
|
||||||
#
|
|
||||||
# @param $* - feature directories
|
|
||||||
# @return 0 - if all is well
|
|
||||||
# 1 - if require-slot was not called
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
function eclipse-ext_install-features {
|
|
||||||
if [ ${eclipse_ext_slot} == 0 ] ; then
|
|
||||||
eerror "You must call require-slot prior to calling ${FUNCNAME}!"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for x in $* ; do
|
|
||||||
if [ -d "$x" ] && [ -f $x/feature.xml ] ; then
|
|
||||||
cp -a $x ${D}/${eclipse_ext_basedir}/features
|
|
||||||
else
|
|
||||||
eerror "$x not a feature directory!"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# @public install-plugins
|
|
||||||
#
|
|
||||||
# Installs one or multiple plugins into the plugin directory for the required
|
|
||||||
# Eclipse SDK.
|
|
||||||
#
|
|
||||||
# Note: You must call require-slot prior to calling install-features. If your
|
|
||||||
# ebuild is for a binary-only plugin, you must also call create-plugin-layout
|
|
||||||
# prior to calling install-features.
|
|
||||||
#
|
|
||||||
# @param $* - plugin directories
|
|
||||||
# @return - nothing
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
function eclipse-ext_install-plugins {
|
|
||||||
if [ ${eclipse_ext_slot} == 0 ] ; then
|
|
||||||
eerror "You must call require-slot prior to calling ${FUNCNAME}!"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for x in $* ; do
|
|
||||||
if [ -d "$x" ] && ( [ -f "$x/plugin.xml" ] || [ -f "$x/fragment.xml" ] ) ; then
|
|
||||||
cp -a $x ${D}/${eclipse_ext_basedir}/plugins
|
|
||||||
else
|
|
||||||
eerror "$x not a plugin directory!"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# TODO really should have a page hosted on gentoo's infra
|
|
||||||
function eclipse-ext_pkg_postinst() {
|
|
||||||
einfo "For tips, tricks and general info on running Eclipse on Gentoo, go to:"
|
|
||||||
einfo "http://gentoo-wiki.com/Eclipse"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# @public get-classpath
|
|
||||||
#
|
|
||||||
# Tries to parse out a classpath string from a build.properties file. Is very
|
|
||||||
# stupid: Assumes it's a one-liner on the form classpath = comma:separated:
|
|
||||||
#
|
|
||||||
# @param $1 - name of the file (typically build.properties)
|
|
||||||
# @param $2 - name of the one-liner env var (default 'classpath')
|
|
||||||
# @return - echo of space-separated classpath entries.
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
eclipse-ext_get-classpath() {
|
|
||||||
local file=$1
|
|
||||||
local envvar="classpath"
|
|
||||||
|
|
||||||
if [ "$1" == "build.properties" ] ; then
|
|
||||||
if [ ! -z "$2" ] ; then
|
|
||||||
envvar="$2"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$(cat ${FILESDIR}/build.properties-${PV} | sed "s/.*=//" | tr ';' ' ')"
|
|
||||||
}
|
|
||||||
|
|
||||||
_path-dissecter() {
|
|
||||||
echo $1 | sed -r "s/.*\/([^/]+)_([0-9.]+)\/(.*)/\\${2}/"
|
|
||||||
}
|
|
||||||
|
|
||||||
_get-plugin-name() {
|
|
||||||
_path-dissecter $1 1
|
|
||||||
}
|
|
||||||
|
|
||||||
_get-plugin-version() {
|
|
||||||
_path-dissecter $1 2
|
|
||||||
}
|
|
||||||
|
|
||||||
_get-plugin-content() {
|
|
||||||
_path-dissecter $1 3
|
|
||||||
}
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# @public resolve-jars
|
|
||||||
#
|
|
||||||
# Takes a space-separated list of plugin_version/subdirs/file.jar entries and
|
|
||||||
# tries to resolve the version for the plugin against the chosen eclipse version
|
|
||||||
# (set by require-slot).
|
|
||||||
#
|
|
||||||
# Note: You must call require-slot prior to calling resolve-jars.
|
|
||||||
#
|
|
||||||
# @param $1 - string with space-separated plugin/jarfile
|
|
||||||
# @return - echo of :-separated resolved files
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
eclipse-ext_resolve-jars() {
|
|
||||||
local resolved=""
|
|
||||||
|
|
||||||
for x in $1 ; do
|
|
||||||
local jarfile=$(_get-plugin-content $x)
|
|
||||||
local name="$(_get-plugin-name $x)"
|
|
||||||
local x=$(echo ${eclipse_ext_platformdir}/plugins/${name}_*/${jarfile})
|
|
||||||
if [ -f ${x} ] ; then
|
|
||||||
resolved="${resolved}:$x"
|
|
||||||
else
|
|
||||||
:
|
|
||||||
#echo "Warning: did not find ${name}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo ${resolved}
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_FUNCTIONS pkg_postinst
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.83 2013/01/04 21:22:43 ulm Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.86 2013/09/04 19:16:40 ulm Exp $
|
||||||
#
|
#
|
||||||
# @ECLASS: elisp-common.eclass
|
# @ECLASS: elisp-common.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -23,7 +23,9 @@
|
|||||||
#
|
#
|
||||||
# When relying on the emacs USE flag, you need to add
|
# When relying on the emacs USE flag, you need to add
|
||||||
#
|
#
|
||||||
|
# @CODE
|
||||||
# emacs? ( virtual/emacs )
|
# emacs? ( virtual/emacs )
|
||||||
|
# @CODE
|
||||||
#
|
#
|
||||||
# to your DEPEND/RDEPEND line and use the functions provided here to
|
# to your DEPEND/RDEPEND line and use the functions provided here to
|
||||||
# bring the files to the correct locations.
|
# bring the files to the correct locations.
|
||||||
@ -35,7 +37,9 @@
|
|||||||
# tested with function elisp-need-emacs(), which would typically be
|
# tested with function elisp-need-emacs(), which would typically be
|
||||||
# called from pkg_setup(), as in the following example:
|
# called from pkg_setup(), as in the following example:
|
||||||
#
|
#
|
||||||
|
# @CODE
|
||||||
# elisp-need-emacs 23 || die "Emacs version too low"
|
# elisp-need-emacs 23 || die "Emacs version too low"
|
||||||
|
# @CODE
|
||||||
#
|
#
|
||||||
# Please note that such tests should be limited to packages that are
|
# Please note that such tests should be limited to packages that are
|
||||||
# known to fail with lower Emacs versions; the standard case is to
|
# known to fail with lower Emacs versions; the standard case is to
|
||||||
@ -50,7 +54,9 @@
|
|||||||
# directory is added to the load-path which makes sure that all files
|
# directory is added to the load-path which makes sure that all files
|
||||||
# are loadable.
|
# are loadable.
|
||||||
#
|
#
|
||||||
# elisp-compile *.el || die
|
# @CODE
|
||||||
|
# elisp-compile *.el
|
||||||
|
# @CODE
|
||||||
#
|
#
|
||||||
# Function elisp-make-autoload-file() can be used to generate a file
|
# Function elisp-make-autoload-file() can be used to generate a file
|
||||||
# with autoload definitions for the lisp functions. It takes the output
|
# with autoload definitions for the lisp functions. It takes the output
|
||||||
@ -70,16 +76,20 @@
|
|||||||
# choose something else, but remember to tell elisp-site-file-install()
|
# choose something else, but remember to tell elisp-site-file-install()
|
||||||
# (see below) the change, as it defaults to ${PN}.
|
# (see below) the change, as it defaults to ${PN}.
|
||||||
#
|
#
|
||||||
# elisp-install ${PN} *.el *.elc || die
|
# @CODE
|
||||||
|
# elisp-install ${PN} *.el *.elc
|
||||||
|
# @CODE
|
||||||
#
|
#
|
||||||
# To let the Emacs support be activated by Emacs on startup, you need
|
# To let the Emacs support be activated by Emacs on startup, you need
|
||||||
# to provide a site file (shipped in ${FILESDIR}) which contains the
|
# to provide a site file (shipped in ${FILESDIR}) which contains the
|
||||||
# startup code (have a look in the documentation of your software).
|
# startup code (have a look in the documentation of your software).
|
||||||
# Normally this would look like this:
|
# Normally this would look like this:
|
||||||
#
|
#
|
||||||
|
# @CODE
|
||||||
# (add-to-list 'load-path "@SITELISP@")
|
# (add-to-list 'load-path "@SITELISP@")
|
||||||
# (add-to-list 'auto-mode-alist '("\\.csv\\'" . csv-mode))
|
# (add-to-list 'auto-mode-alist '("\\.csv\\'" . csv-mode))
|
||||||
# (autoload 'csv-mode "csv-mode" "Major mode for csv files." t)
|
# (autoload 'csv-mode "csv-mode" "Major mode for csv files." t)
|
||||||
|
# @CODE
|
||||||
#
|
#
|
||||||
# If your Emacs support files are installed in a subdirectory of
|
# If your Emacs support files are installed in a subdirectory of
|
||||||
# /usr/share/emacs/site-lisp/ (which is strongly recommended), you need
|
# /usr/share/emacs/site-lisp/ (which is strongly recommended), you need
|
||||||
@ -108,11 +118,15 @@
|
|||||||
# Best practice is to define a SITEFILE variable in the global scope of
|
# Best practice is to define a SITEFILE variable in the global scope of
|
||||||
# your ebuild (e.g., right after S or RDEPEND):
|
# your ebuild (e.g., right after S or RDEPEND):
|
||||||
#
|
#
|
||||||
|
# @CODE
|
||||||
# SITEFILE="50${PN}-gentoo.el"
|
# SITEFILE="50${PN}-gentoo.el"
|
||||||
|
# @CODE
|
||||||
#
|
#
|
||||||
# Which is then installed by
|
# Which is then installed by
|
||||||
#
|
#
|
||||||
# elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
|
# @CODE
|
||||||
|
# elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||||||
|
# @CODE
|
||||||
#
|
#
|
||||||
# in src_install(). Any characters after the "-gentoo" part and before
|
# in src_install(). Any characters after the "-gentoo" part and before
|
||||||
# the extension will be stripped from the destination file's name.
|
# the extension will be stripped from the destination file's name.
|
||||||
@ -126,6 +140,7 @@
|
|||||||
# After that you need to recreate the start-up file of Emacs after
|
# After that you need to recreate the start-up file of Emacs after
|
||||||
# emerging and unmerging by using
|
# emerging and unmerging by using
|
||||||
#
|
#
|
||||||
|
# @CODE
|
||||||
# pkg_postinst() {
|
# pkg_postinst() {
|
||||||
# elisp-site-regen
|
# elisp-site-regen
|
||||||
# }
|
# }
|
||||||
@ -133,6 +148,7 @@
|
|||||||
# pkg_postrm() {
|
# pkg_postrm() {
|
||||||
# elisp-site-regen
|
# elisp-site-regen
|
||||||
# }
|
# }
|
||||||
|
# @CODE
|
||||||
#
|
#
|
||||||
# When having optional Emacs support, you should prepend "use emacs &&"
|
# When having optional Emacs support, you should prepend "use emacs &&"
|
||||||
# to above calls of elisp-site-regen().
|
# to above calls of elisp-site-regen().
|
||||||
@ -168,20 +184,33 @@ EMACSFLAGS="-batch -q --no-site-file"
|
|||||||
BYTECOMPFLAGS="-L ."
|
BYTECOMPFLAGS="-L ."
|
||||||
|
|
||||||
# @FUNCTION: elisp-emacs-version
|
# @FUNCTION: elisp-emacs-version
|
||||||
|
# @RETURN: exit status of Emacs
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Output version of currently active Emacs.
|
# Output version of currently active Emacs.
|
||||||
|
|
||||||
elisp-emacs-version() {
|
elisp-emacs-version() {
|
||||||
local ret
|
local version ret
|
||||||
# The following will work for at least versions 18-24.
|
# The following will work for at least versions 18-24.
|
||||||
echo "(princ emacs-version)" >"${T}"/emacs-version.el
|
echo "(princ emacs-version)" >"${T}"/emacs-version.el
|
||||||
${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el
|
version=$(
|
||||||
|
# EMACS could be a microemacs variant that ignores the -batch
|
||||||
|
# option and would therefore hang, waiting for user interaction.
|
||||||
|
# Redirecting stdin and unsetting TERM and DISPLAY will cause
|
||||||
|
# most of them to exit with an error.
|
||||||
|
unset TERM DISPLAY
|
||||||
|
${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el </dev/null
|
||||||
|
)
|
||||||
ret=$?
|
ret=$?
|
||||||
rm -f "${T}"/emacs-version.el
|
rm -f "${T}"/emacs-version.el
|
||||||
if [[ ${ret} -ne 0 ]]; then
|
if [[ ${ret} -ne 0 ]]; then
|
||||||
eerror "elisp-emacs-version: Failed to run ${EMACS}"
|
eerror "elisp-emacs-version: Failed to run ${EMACS}"
|
||||||
fi
|
|
||||||
return ${ret}
|
return ${ret}
|
||||||
|
fi
|
||||||
|
if [[ -z ${version} ]]; then
|
||||||
|
eerror "elisp-emacs-version: Could not determine Emacs version"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo "${version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: elisp-need-emacs
|
# @FUNCTION: elisp-need-emacs
|
||||||
@ -223,7 +252,7 @@ elisp-need-emacs() {
|
|||||||
elisp-compile() {
|
elisp-compile() {
|
||||||
ebegin "Compiling GNU Emacs Elisp files"
|
ebegin "Compiling GNU Emacs Elisp files"
|
||||||
${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@"
|
${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@"
|
||||||
eend $? "elisp-compile: batch-byte-compile failed"
|
eend $? "elisp-compile: batch-byte-compile failed" || die
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: elisp-make-autoload-file
|
# @FUNCTION: elisp-make-autoload-file
|
||||||
@ -259,7 +288,7 @@ elisp-make-autoload-file() {
|
|||||||
--eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
|
--eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
|
||||||
-f batch-update-autoloads "${@-.}"
|
-f batch-update-autoloads "${@-.}"
|
||||||
|
|
||||||
eend $? "elisp-make-autoload-file: batch-update-autoloads failed"
|
eend $? "elisp-make-autoload-file: batch-update-autoloads failed" || die
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: elisp-install
|
# @FUNCTION: elisp-install
|
||||||
@ -275,7 +304,7 @@ elisp-install() {
|
|||||||
insinto "${SITELISP}/${subdir}"
|
insinto "${SITELISP}/${subdir}"
|
||||||
doins "$@"
|
doins "$@"
|
||||||
)
|
)
|
||||||
eend $? "elisp-install: doins failed"
|
eend $? "elisp-install: doins failed" || die
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: elisp-site-file-install
|
# @FUNCTION: elisp-site-file-install
|
||||||
@ -305,7 +334,7 @@ elisp-site-file-install() {
|
|||||||
)
|
)
|
||||||
ret=$?
|
ret=$?
|
||||||
rm -f "${sf}"
|
rm -f "${sf}"
|
||||||
eend ${ret} "elisp-site-file-install: doins failed"
|
eend ${ret} "elisp-site-file-install: doins failed" || die
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: elisp-site-regen
|
# @FUNCTION: elisp-site-regen
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.56 2013/01/04 21:22:43 ulm Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.57 2013/03/16 08:55:30 ulm Exp $
|
||||||
#
|
#
|
||||||
# @ECLASS: elisp.eclass
|
# @ECLASS: elisp.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -151,7 +151,7 @@ elisp_src_configure() { :; }
|
|||||||
# GNU Info files from them.
|
# GNU Info files from them.
|
||||||
|
|
||||||
elisp_src_compile() {
|
elisp_src_compile() {
|
||||||
elisp-compile *.el || die
|
elisp-compile *.el
|
||||||
if [[ -n ${ELISP_TEXINFO} ]]; then
|
if [[ -n ${ELISP_TEXINFO} ]]; then
|
||||||
makeinfo ${ELISP_TEXINFO} || die
|
makeinfo ${ELISP_TEXINFO} || die
|
||||||
fi
|
fi
|
||||||
@ -165,9 +165,9 @@ elisp_src_compile() {
|
|||||||
# ELISP_TEXINFO and documentation listed in the DOCS variable.
|
# ELISP_TEXINFO and documentation listed in the DOCS variable.
|
||||||
|
|
||||||
elisp_src_install() {
|
elisp_src_install() {
|
||||||
elisp-install ${PN} *.el *.elc || die
|
elisp-install ${PN} *.el *.elc
|
||||||
if [[ -n ${SITEFILE} ]]; then
|
if [[ -n ${SITEFILE} ]]; then
|
||||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
|
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${ELISP_TEXINFO} ]]; then
|
if [[ -n ${ELISP_TEXINFO} ]]; then
|
||||||
set -- ${ELISP_TEXINFO}
|
set -- ${ELISP_TEXINFO}
|
||||||
@ -177,6 +177,9 @@ elisp_src_install() {
|
|||||||
if [[ -n ${DOCS} ]]; then
|
if [[ -n ${DOCS} ]]; then
|
||||||
dodoc ${DOCS} || die
|
dodoc ${DOCS} || die
|
||||||
fi
|
fi
|
||||||
|
if declare -f readme.gentoo_create_doc >/dev/null; then
|
||||||
|
readme.gentoo_create_doc
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: elisp_pkg_postinst
|
# @FUNCTION: elisp_pkg_postinst
|
||||||
@ -186,6 +189,9 @@ elisp_src_install() {
|
|||||||
|
|
||||||
elisp_pkg_postinst() {
|
elisp_pkg_postinst() {
|
||||||
elisp-site-regen
|
elisp-site-regen
|
||||||
|
if declare -f readme.gentoo_print_elog >/dev/null; then
|
||||||
|
readme.gentoo_print_elog
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: elisp_pkg_postrm
|
# @FUNCTION: elisp_pkg_postrm
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2004 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/embassy-2.10.eclass,v 1.8 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/embassy-2.9.eclass,v 1.10 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2010 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/emul-libs.eclass,v 1.9 2010/01/14 21:46:51 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# Scheduled for removal on 2012/01/14.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.16 2013/01/12 16:53:56 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.19 2013/06/28 02:37:48 vapier Exp $
|
||||||
|
|
||||||
#
|
#
|
||||||
# Original Author: Mike Doty <kingtaco@gentoo.org>
|
# Original Author: Mike Doty <kingtaco@gentoo.org>
|
||||||
@ -8,37 +8,21 @@
|
|||||||
# Purpose: Providing a template for the app-emulation/emul-linux-* packages
|
# Purpose: Providing a template for the app-emulation/emul-linux-* packages
|
||||||
#
|
#
|
||||||
|
|
||||||
inherit multilib versionator
|
inherit multilib
|
||||||
|
|
||||||
if version_is_at_least 20110129; then
|
|
||||||
IUSE="development"
|
|
||||||
else
|
|
||||||
IUSE=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "${EAPI:-0}" in
|
case "${EAPI:-0}" in
|
||||||
0|1)
|
3|4|5)
|
||||||
EXPORT_FUNCTIONS src_unpack src_install
|
EXPORT_FUNCTIONS src_prepare src_install
|
||||||
;;
|
|
||||||
2|3|4|5)
|
|
||||||
EXPORT_FUNCTIONS src_unpack src_prepare src_install
|
|
||||||
;;
|
;;
|
||||||
*) die "EAPI=${EAPI} is not supported" ;;
|
*) die "EAPI=${EAPI} is not supported" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if version_is_at_least 20110722; then
|
|
||||||
SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.xz"
|
|
||||||
else
|
|
||||||
if version_is_at_least 20110129; then
|
|
||||||
SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.bz2"
|
|
||||||
else
|
|
||||||
SRC_URI="mirror://gentoo/${PN}-${PV}.tar.bz2"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
DESCRIPTION="Provides precompiled 32bit libraries"
|
DESCRIPTION="Provides precompiled 32bit libraries"
|
||||||
#HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"
|
#HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"
|
||||||
HOMEPAGE="http://dev.gentoo.org/~pacho/emul.html"
|
HOMEPAGE="http://dev.gentoo.org/~pacho/emul.html"
|
||||||
|
SRC_URI="http://dev.gentoo.org/~pacho/emul/${P}.tar.xz"
|
||||||
|
|
||||||
|
IUSE="+development"
|
||||||
|
|
||||||
RESTRICT="strip"
|
RESTRICT="strip"
|
||||||
S=${WORKDIR}
|
S=${WORKDIR}
|
||||||
@ -50,20 +34,13 @@ SLOT="0"
|
|||||||
DEPEND=">=sys-apps/findutils-4.2.26"
|
DEPEND=">=sys-apps/findutils-4.2.26"
|
||||||
RDEPEND=""
|
RDEPEND=""
|
||||||
|
|
||||||
emul-linux-x86_src_unpack() {
|
|
||||||
unpack ${A}
|
|
||||||
cd "${S}"
|
|
||||||
has ${EAPI:-0} 0 1 && emul-linux-x86_src_prepare
|
|
||||||
}
|
|
||||||
|
|
||||||
emul-linux-x86_src_prepare() {
|
emul-linux-x86_src_prepare() {
|
||||||
ALLOWED=${ALLOWED:-^${S}/etc/env.d}
|
ALLOWED=${ALLOWED:-^${S}/etc/env.d}
|
||||||
has development "${IUSE//+}" && use development && ALLOWED="${ALLOWED}|/usr/lib32/pkgconfig"
|
use development && ALLOWED="${ALLOWED}|/usr/lib32/pkgconfig"
|
||||||
find "${S}" ! -type d ! '(' -name '*.so' -o -name '*.so.[0-9]*' ')' | egrep -v "${ALLOWED}" | xargs -d $'\n' rm -f || die 'failed to remove everything but *.so*'
|
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() {
|
emul-linux-x86_src_install() {
|
||||||
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
|
|
||||||
for dir in etc/env.d etc/revdep-rebuild ; do
|
for dir in etc/env.d etc/revdep-rebuild ; do
|
||||||
if [[ -d "${S}"/${dir} ]] ; then
|
if [[ -d "${S}"/${dir} ]] ; then
|
||||||
for f in "${S}"/${dir}/* ; do
|
for f in "${S}"/${dir}/* ; do
|
||||||
@ -89,9 +66,12 @@ emul-linux-x86_src_install() {
|
|||||||
pushd "${D}"/usr/${x86_libdir} >/dev/null
|
pushd "${D}"/usr/${x86_libdir} >/dev/null
|
||||||
|
|
||||||
# Fix linker script paths.
|
# Fix linker script paths.
|
||||||
|
local ldscripts
|
||||||
|
if ldscripts=( $(grep -ls '^GROUP.*/lib32/' *.so) ) ; then
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s:/lib32/:/${x86_libdir}/:" \
|
-e "s:/lib32/:/${x86_libdir}/:" \
|
||||||
$(grep -ls '^GROUP.*/lib32/' *.so) || die
|
"${ldscripts[@]}" || die
|
||||||
|
fi
|
||||||
|
|
||||||
# Rewrite symlinks (if need be).
|
# Rewrite symlinks (if need be).
|
||||||
local sym tgt
|
local sym tgt
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.98 2012/11/26 06:58:19 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.101 2013/08/31 13:04:51 tommy Exp $
|
||||||
|
|
||||||
# @ECLASS: enlightenment.eclass
|
# @ECLASS: enlightenment.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -19,6 +19,11 @@ inherit eutils libtool
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# if defined, the package is Cython bindings (implies E_PYTHON)
|
# if defined, the package is Cython bindings (implies E_PYTHON)
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: E_ECONF
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Array of flags to pass to econf (obsoletes MY_ECONF)
|
||||||
|
E_ECONF=()
|
||||||
|
|
||||||
# E_STATE's:
|
# E_STATE's:
|
||||||
# release [default]
|
# release [default]
|
||||||
# KEYWORDS arch
|
# KEYWORDS arch
|
||||||
@ -41,12 +46,20 @@ inherit eutils libtool
|
|||||||
# S EURI_STATE
|
# S EURI_STATE
|
||||||
|
|
||||||
E_LIVE_SERVER_DEFAULT_SVN="http://svn.enlightenment.org/svn/e/trunk"
|
E_LIVE_SERVER_DEFAULT_SVN="http://svn.enlightenment.org/svn/e/trunk"
|
||||||
|
E_LIVE_SERVER_DEFAULT_GIT="git://git.enlightenment.org"
|
||||||
|
|
||||||
E_STATE="release"
|
E_STATE="release"
|
||||||
if [[ ${PV} == *9999* ]] ; then
|
if [[ ${PV} == *9999* ]] ; then
|
||||||
|
if [[ ${EGIT_URI_APPEND} ]] ; then
|
||||||
|
E_LIVE_SERVER=${E_LIVE_SERVER:-${E_LIVE_SERVER_DEFAULT_GIT}}
|
||||||
|
EGIT_URI_APPEND=${EGIT_URI_APPEND:-${PN}}
|
||||||
|
EGIT_PROJECT="enlightenment/${EGIT_SUB_PROJECT}/${EGIT_URI_APPEND}"
|
||||||
|
EGIT_REPO_URI=${EGIT_SERVER:-${E_LIVE_SERVER_DEFAULT_GIT}}/${EGIT_SUB_PROJECT}/${EGIT_URI_APPEND}.git
|
||||||
|
E_S_APPEND=${EGIT_URI_APPEND}
|
||||||
|
E_LIVE_SOURCE="git"
|
||||||
|
inherit git-2
|
||||||
|
else
|
||||||
E_LIVE_SERVER=${E_LIVE_SERVER:-${E_LIVE_SERVER_DEFAULT_SVN}}
|
E_LIVE_SERVER=${E_LIVE_SERVER:-${E_LIVE_SERVER_DEFAULT_SVN}}
|
||||||
E_STATE="live"
|
|
||||||
WANT_AUTOTOOLS="yes"
|
|
||||||
|
|
||||||
ESVN_URI_APPEND=${ESVN_URI_APPEND:-${PN}}
|
ESVN_URI_APPEND=${ESVN_URI_APPEND:-${PN}}
|
||||||
ESVN_PROJECT="enlightenment/${ESVN_SUB_PROJECT}"
|
ESVN_PROJECT="enlightenment/${ESVN_SUB_PROJECT}"
|
||||||
@ -54,6 +67,10 @@ if [[ ${PV} == *9999* ]] ; then
|
|||||||
E_S_APPEND=${ESVN_URI_APPEND}
|
E_S_APPEND=${ESVN_URI_APPEND}
|
||||||
E_LIVE_SOURCE="svn"
|
E_LIVE_SOURCE="svn"
|
||||||
inherit subversion
|
inherit subversion
|
||||||
|
fi
|
||||||
|
E_STATE="live"
|
||||||
|
WANT_AUTOTOOLS="yes"
|
||||||
|
|
||||||
elif [[ -n ${E_SNAP_DATE} ]] ; then
|
elif [[ -n ${E_SNAP_DATE} ]] ; then
|
||||||
E_STATE="snap"
|
E_STATE="snap"
|
||||||
else
|
else
|
||||||
@ -113,6 +130,7 @@ enlightenment_src_unpack() {
|
|||||||
if [[ ${E_STATE} == "live" ]] ; then
|
if [[ ${E_STATE} == "live" ]] ; then
|
||||||
case ${E_LIVE_SOURCE} in
|
case ${E_LIVE_SOURCE} in
|
||||||
svn) subversion_src_unpack;;
|
svn) subversion_src_unpack;;
|
||||||
|
git) git-2_src_unpack;;
|
||||||
*) die "eek!";;
|
*) die "eek!";;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
@ -142,9 +160,9 @@ enlightenment_src_prepare() {
|
|||||||
enlightenment_src_configure() {
|
enlightenment_src_configure() {
|
||||||
# gstreamer sucks, work around it doing stupid stuff
|
# gstreamer sucks, work around it doing stupid stuff
|
||||||
export GST_REGISTRY="${S}/registry.xml"
|
export GST_REGISTRY="${S}/registry.xml"
|
||||||
has static-libs ${IUSE} && MY_ECONF+=" $(use_enable static-libs static)"
|
has static-libs ${IUSE} && E_ECONF+=( $(use_enable static-libs static) )
|
||||||
|
|
||||||
econf ${MY_ECONF}
|
econf ${MY_ECONF} "${E_ECONF[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
enlightenment_src_compile() {
|
enlightenment_src_compile() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.424 2013/06/21 23:57:03 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.427 2013/09/14 19:00:10 mgorny Exp $
|
||||||
|
|
||||||
# @ECLASS: eutils.eclass
|
# @ECLASS: eutils.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -356,7 +356,7 @@ EPATCH_FORCE="no"
|
|||||||
# epatch is designed to greatly simplify the application of patches. It can
|
# epatch is designed to greatly simplify the application of patches. It can
|
||||||
# process patch files directly, or directories of patches. The patches may be
|
# process patch files directly, or directories of patches. The patches may be
|
||||||
# compressed (bzip/gzip/etc...) or plain text. You generally need not specify
|
# compressed (bzip/gzip/etc...) or plain text. You generally need not specify
|
||||||
# the -p option as epatch will automatically attempt -p0 to -p5 until things
|
# the -p option as epatch will automatically attempt -p0 to -p4 until things
|
||||||
# apply successfully.
|
# apply successfully.
|
||||||
#
|
#
|
||||||
# If you do not specify any patches/dirs, then epatch will default to the
|
# If you do not specify any patches/dirs, then epatch will default to the
|
||||||
@ -1645,6 +1645,43 @@ prune_libtool_files() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
einstalldocs() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
local dodoc_opts=-r
|
||||||
|
has ${EAPI} 0 1 2 3 && dodoc_opts=
|
||||||
|
|
||||||
|
if ! declare -p DOCS &>/dev/null ; then
|
||||||
|
local d
|
||||||
|
for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \
|
||||||
|
THANKS BUGS FAQ CREDITS CHANGELOG ; do
|
||||||
|
if [[ -s ${d} ]] ; then
|
||||||
|
dodoc "${d}" || die
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
elif [[ $(declare -p DOCS) == "declare -a"* ]] ; then
|
||||||
|
if [[ ${DOCS[@]} ]] ; then
|
||||||
|
dodoc ${dodoc_opts} "${DOCS[@]}" || die
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ ${DOCS} ]] ; then
|
||||||
|
dodoc ${dodoc_opts} ${DOCS} || die
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(declare -p HTML_DOCS 2>/dev/null) == "declare -a"* ]] ; then
|
||||||
|
if [[ ${HTML_DOCS[@]} ]] ; then
|
||||||
|
dohtml -r "${HTML_DOCS[@]}" || die
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ ${HTML_DOCS} ]] ; then
|
||||||
|
dohtml -r ${HTML_DOCS} || die
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
check_license() { die "you no longer need this as portage supports ACCEPT_LICENSE itself"; }
|
check_license() { die "you no longer need this as portage supports ACCEPT_LICENSE itself"; }
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/fcaps.eclass,v 1.3 2013/01/30 07:15:49 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/fcaps.eclass,v 1.8 2013/06/27 01:18:57 vapier Exp $
|
||||||
|
|
||||||
# @ECLASS: fcaps.eclass
|
# @ECLASS: fcaps.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -33,6 +33,7 @@ ___ECLASS_ONCE_FCAPS="recur -_+^+_- spank"
|
|||||||
|
|
||||||
IUSE="+filecaps"
|
IUSE="+filecaps"
|
||||||
|
|
||||||
|
# We can't use libcap-ng atm due to #471414.
|
||||||
DEPEND="filecaps? ( sys-libs/libcap )"
|
DEPEND="filecaps? ( sys-libs/libcap )"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: FILECAPS
|
# @ECLASS-VARIABLE: FILECAPS
|
||||||
@ -111,7 +112,7 @@ fcaps() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Process every file!
|
# Process every file!
|
||||||
local file out
|
local file
|
||||||
for file ; do
|
for file ; do
|
||||||
[[ ${file} != /* ]] && file="${root}${file}"
|
[[ ${file} != /* ]] && file="${root}${file}"
|
||||||
|
|
||||||
@ -124,24 +125,66 @@ fcaps() {
|
|||||||
# by people.
|
# by people.
|
||||||
chmod ${caps_mode} "${file}" || die
|
chmod ${caps_mode} "${file}" || die
|
||||||
|
|
||||||
if ! out=$(LC_ALL=C setcap "${caps}" "${file}" 2>&1) ; then
|
# Set/verify funcs for sys-libs/libcap.
|
||||||
if [[ ${out} != *"Operation not supported"* ]] ; then
|
_libcap() { setcap "${caps}" "${file}" ; }
|
||||||
|
_libcap_verify() { setcap -v "${caps}" "${file}" >/dev/null ; }
|
||||||
|
|
||||||
|
# Set/verify funcs for sys-libs/libcap-ng.
|
||||||
|
# Note: filecap only supports =ep mode.
|
||||||
|
# It also expects a different form:
|
||||||
|
# setcap cap_foo,cap_bar
|
||||||
|
# filecap foo bar
|
||||||
|
_libcap_ng() {
|
||||||
|
local caps=",${caps%=ep}"
|
||||||
|
filecap "${file}" "${caps//,cap_}"
|
||||||
|
}
|
||||||
|
_libcap_ng_verify() {
|
||||||
|
# libcap-ng has a crappy interface
|
||||||
|
local rcaps icaps caps=",${caps%=ep}"
|
||||||
|
rcaps=$(filecap "${file}" | \
|
||||||
|
sed -nr \
|
||||||
|
-e "s:^.{${#file}} +::" \
|
||||||
|
-e 's:, +:\n:g' \
|
||||||
|
-e 2p | \
|
||||||
|
LC_ALL=C sort)
|
||||||
|
[[ ${PIPESTATUS[0]} -eq 0 ]] || return 1
|
||||||
|
icaps=$(echo "${caps//,cap_}" | LC_ALL=C sort)
|
||||||
|
[[ ${rcaps} == ${icaps} ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
local out cmd notfound=0
|
||||||
|
for cmd in _libcap _libcap_ng ; do
|
||||||
|
if ! out=$(LC_ALL=C ${cmd} 2>&1) ; then
|
||||||
|
case ${out} in
|
||||||
|
*"command not found"*)
|
||||||
|
: $(( ++notfound ))
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
*"Operation not supported"*)
|
||||||
|
local fstype=$(stat -f -c %T "${file}")
|
||||||
|
ewarn "Could not set caps on '${file}' due to missing filesystem support:"
|
||||||
|
ewarn "* enable XATTR support for '${fstype}' in your kernel (if configurable)"
|
||||||
|
ewarn "* mount the fs with the user_xattr option (if not the default)"
|
||||||
|
ewarn "* enable the relevant FS_SECURITY option (if configurable)"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
eerror "Setting caps '${caps}' on file '${file}' failed:"
|
eerror "Setting caps '${caps}' on file '${file}' failed:"
|
||||||
eerror "${out}"
|
eerror "${out}"
|
||||||
die "could not set caps"
|
die "could not set caps"
|
||||||
else
|
;;
|
||||||
local fstype=$(stat -f -c %T "${file}")
|
esac
|
||||||
ewarn "Could not set caps on '${file}' due to missing filesystem support."
|
|
||||||
ewarn "Make sure you enable XATTR support for '${fstype}' in your kernel."
|
|
||||||
ewarn "You might also have to enable the relevant FS_SECURITY option."
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
# Sanity check that everything took.
|
# Sanity check that everything took.
|
||||||
setcap -v "${caps}" "${file}" >/dev/null \
|
${cmd}_verify || die "Checking caps '${caps}' on '${file}' failed"
|
||||||
|| die "Checking caps '${caps}' on '${file}' failed"
|
|
||||||
|
|
||||||
# Everything worked. Move on to the next file.
|
# Everything worked. Move on to the next file.
|
||||||
continue
|
continue 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ ${notfound} -eq 2 ]] && [[ -z ${__FCAPS_WARNED} ]] ; then
|
||||||
|
__FCAPS_WARNED="true"
|
||||||
|
ewarn "Could not find cap utils; make sure libcap or libcap-ng is available."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.187 2013/01/12 14:32:31 jlec Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.188 2013/09/05 05:28:01 vapier Exp $
|
||||||
|
|
||||||
# @ECLASS: flag-o-matic.eclass
|
# @ECLASS: flag-o-matic.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -325,7 +325,9 @@ filter-mfpmath() {
|
|||||||
orig_mfpmath=$(get-flag -mfpmath)
|
orig_mfpmath=$(get-flag -mfpmath)
|
||||||
# get the value of the current -mfpmath flag
|
# get the value of the current -mfpmath flag
|
||||||
new_math=$(get-flag mfpmath)
|
new_math=$(get-flag mfpmath)
|
||||||
new_math=" ${new_math//,/ } "
|
# convert "both" to something we can filter
|
||||||
|
new_math=${new_math/both/387,sse}
|
||||||
|
new_math=" ${new_math//[,+]/ } "
|
||||||
# figure out which math values are to be removed
|
# figure out which math values are to be removed
|
||||||
prune_math=""
|
prune_math=""
|
||||||
for prune_math in "$@" ; do
|
for prune_math in "$@" ; do
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.54 2011/08/29 01:28:10 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.57 2013/07/25 13:13:18 pva Exp $
|
||||||
|
|
||||||
# @ECLASS: font.eclass
|
# @ECLASS: font.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -54,8 +54,8 @@ IUSE="X"
|
|||||||
DEPEND="X? (
|
DEPEND="X? (
|
||||||
x11-apps/mkfontdir
|
x11-apps/mkfontdir
|
||||||
media-fonts/encodings
|
media-fonts/encodings
|
||||||
)
|
)"
|
||||||
>=media-libs/fontconfig-2.4.0"
|
RDEPEND=""
|
||||||
|
|
||||||
# @FUNCTION: font_xfont_config
|
# @FUNCTION: font_xfont_config
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -210,10 +210,12 @@ font_pkg_postinst() {
|
|||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${ROOT} == / ]]; then
|
if has_version media-libs/fontconfig && [[ ${ROOT} == / ]]; then
|
||||||
ebegin "Updating global fontcache"
|
ebegin "Updating global fontcache"
|
||||||
fc-cache -fs
|
fc-cache -fs
|
||||||
eend $?
|
eend $?
|
||||||
|
else
|
||||||
|
einfo "Skipping fontcache update (media-libs/fontconfig is not installed or ROOT != /)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,9 +229,11 @@ font_pkg_postrm() {
|
|||||||
find "${EROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
|
find "${EROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
|
||||||
| xargs -0 chmod -v 0644 2>/dev/null
|
| xargs -0 chmod -v 0644 2>/dev/null
|
||||||
|
|
||||||
if [[ ${ROOT} == / ]]; then
|
if has_version media-libs/fontconfig && [[ ${ROOT} == / ]]; then
|
||||||
ebegin "Updating global fontcache"
|
ebegin "Updating global fontcache"
|
||||||
fc-cache -fs
|
fc-cache -fs
|
||||||
eend $?
|
eend $?
|
||||||
|
else
|
||||||
|
einfo "Skipping fontcache update (media-libs/fontconfig is not installed or ROOT != /)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.16 2012/11/28 13:03:30 jlec Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.20 2013/07/29 20:13:57 jlec Exp $
|
||||||
|
|
||||||
# @ECLASS: fortran-2.eclass
|
# @ECLASS: fortran-2.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -44,8 +44,8 @@
|
|||||||
# @ECLASS-VARIABLE: FORTRAN_NEEDED
|
# @ECLASS-VARIABLE: FORTRAN_NEEDED
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# If your package has an optional fortran support, set this variable
|
# If your package has an optional fortran support, set this variable
|
||||||
# to the space seperated list of USE triggering the fortran
|
# to the space separated list of USE triggering the fortran
|
||||||
# dependence.
|
# dependency.
|
||||||
#
|
#
|
||||||
# e.g. FORTRAN_NEEDED=lapack would result in
|
# e.g. FORTRAN_NEEDED=lapack would result in
|
||||||
#
|
#
|
||||||
@ -109,11 +109,13 @@ _fortran_compile_test() {
|
|||||||
local fcode=${filebase}.f${fdia}
|
local fcode=${filebase}.f${fdia}
|
||||||
local ret
|
local ret
|
||||||
|
|
||||||
[[ $# -lt 1 ]] && die "_fortran_compile_test() needs at least one arguments"
|
[[ $# -lt 1 ]] && \
|
||||||
|
die "_fortran_compile_test() needs at least one argument"
|
||||||
|
|
||||||
[[ -f ${fcode} ]] || _fortran_write_testsuite
|
[[ -f ${fcode} ]] || _fortran_write_testsuite
|
||||||
|
|
||||||
${fcomp} "${fcode}" -o "${fcode}.x" &>> "${T}"/_fortran_compile_test.log
|
${fcomp} "${fcode}" -o "${fcode}.x" \
|
||||||
|
>> "${T}"/_fortran_compile_test.log 2>&1
|
||||||
ret=$?
|
ret=$?
|
||||||
|
|
||||||
rm -f "${fcode}.x"
|
rm -f "${fcode}.x"
|
||||||
@ -121,7 +123,7 @@ _fortran_compile_test() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: _fortran-has-openmp
|
# @FUNCTION: _fortran-has-openmp
|
||||||
# @RETURN: compilers return value
|
# @RETURN: return code of the compiler
|
||||||
# @INTERNAL
|
# @INTERNAL
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# See if the fortran supports OpenMP.
|
# See if the fortran supports OpenMP.
|
||||||
@ -138,7 +140,8 @@ _fortran-has-openmp() {
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
for flag in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do
|
for flag in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do
|
||||||
${_fc} ${flag} "${fcode}" -o "${fcode}.x" &>> "${T}"/_fortran_compile_test.log
|
${_fc} ${flag} "${fcode}" -o "${fcode}.x" \
|
||||||
|
&>> "${T}"/_fortran_compile_test.log
|
||||||
ret=$?
|
ret=$?
|
||||||
(( ${ret} )) || break
|
(( ${ret} )) || break
|
||||||
done
|
done
|
||||||
@ -155,8 +158,8 @@ _fortran_die_msg() {
|
|||||||
echo
|
echo
|
||||||
eerror "Please install currently selected gcc version with USE=fortran."
|
eerror "Please install currently selected gcc version with USE=fortran."
|
||||||
eerror "If you intend to use a different compiler then gfortran, please"
|
eerror "If you intend to use a different compiler then gfortran, please"
|
||||||
eerror "set FC variable accordingly and take care that the neccessary"
|
eerror "set FC variable accordingly and take care that the necessary"
|
||||||
eerror "fortran dialects are support."
|
eerror "fortran dialects are supported."
|
||||||
echo
|
echo
|
||||||
die "Currently no working fortran compiler is available"
|
die "Currently no working fortran compiler is available"
|
||||||
}
|
}
|
||||||
@ -164,7 +167,8 @@ _fortran_die_msg() {
|
|||||||
# @FUNCTION: _fortran_test_function
|
# @FUNCTION: _fortran_test_function
|
||||||
# @INTERNAL
|
# @INTERNAL
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Internal testfunction for working fortran compiler. It is called in fortran-2_pkg_setup
|
# Internal test function for working fortran compiler.
|
||||||
|
# It is called in fortran-2_pkg_setup.
|
||||||
_fortran_test_function() {
|
_fortran_test_function() {
|
||||||
local dialect
|
local dialect
|
||||||
|
|
||||||
@ -173,9 +177,12 @@ _fortran_test_function() {
|
|||||||
: ${FORTRAN_STANDARD:=77}
|
: ${FORTRAN_STANDARD:=77}
|
||||||
for dialect in ${FORTRAN_STANDARD}; do
|
for dialect in ${FORTRAN_STANDARD}; do
|
||||||
case ${dialect} in
|
case ${dialect} in
|
||||||
77) _fortran_compile_test $(tc-getF77) || _fortran_die_msg ;;
|
77) _fortran_compile_test $(tc-getF77) || \
|
||||||
90|95) _fortran_compile_test $(tc-getFC) 90 || _fortran_die_msg ;;
|
_fortran_die_msg ;;
|
||||||
2003) _fortran_compile_test $(tc-getFC) 03 || _fortran_die_msg ;;
|
90|95) _fortran_compile_test $(tc-getFC) 90 || \
|
||||||
|
_fortran_die_msg ;;
|
||||||
|
2003) _fortran_compile_test $(tc-getFC) 03 || \
|
||||||
|
_fortran_die_msg ;;
|
||||||
2008) die "Future" ;;
|
2008) die "Future" ;;
|
||||||
*) die "${dialect} is not a Fortran dialect." ;;
|
*) die "${dialect} is not a Fortran dialect." ;;
|
||||||
esac
|
esac
|
||||||
@ -195,10 +202,11 @@ _fortran_test_function() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: fortran-2_pkg_setup
|
# @FUNCTION: _fortran-2_pkg_setup
|
||||||
|
# @INTERNAL
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support.
|
# _The_ fortran-2_pkg_setup() code
|
||||||
fortran-2_pkg_setup() {
|
_fortran-2_pkg_setup() {
|
||||||
for _f_use in ${FORTRAN_NEEDED}; do
|
for _f_use in ${FORTRAN_NEEDED}; do
|
||||||
case ${_f_use} in
|
case ${_f_use} in
|
||||||
always)
|
always)
|
||||||
@ -220,7 +228,29 @@ fortran-2_pkg_setup() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# @FUNCTION: fortran-2_pkg_setup
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Setup functionality,
|
||||||
|
# checks for a valid fortran compiler and optionally for its openmp support.
|
||||||
|
fortran-2_pkg_setup() {
|
||||||
|
case ${EAPI:-0} in
|
||||||
|
0|1|2|3)
|
||||||
|
eqawarn "Support for EAPI < 4 will be removed from the"
|
||||||
|
eqawarn "fortran-2.eclass in until 2013-09-30."
|
||||||
|
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
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
case ${EAPI:-0} in
|
case ${EAPI:-0} in
|
||||||
0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;;
|
0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;;
|
||||||
*) die "EAPI=${EAPI} is not supported" ;;
|
*) die "EAPI=${EAPI} is not supported" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -1,216 +0,0 @@
|
|||||||
# Copyright 1999-2004 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/fortran.eclass,v 1.21 2009/03/07 10:02:33 maekke Exp $
|
|
||||||
#
|
|
||||||
# Author: Danny van Dyk <kugelfang@gentoo.org>
|
|
||||||
#
|
|
||||||
|
|
||||||
inherit eutils autotools
|
|
||||||
|
|
||||||
DESCRIPTION="Based on the ${ECLASS} eclass"
|
|
||||||
|
|
||||||
IUSE="debug"
|
|
||||||
|
|
||||||
#DEPEND="virtual/fortran" # Let's aim for this...
|
|
||||||
|
|
||||||
# Which Fortran Compiler has been selected ?
|
|
||||||
export FORTRANC
|
|
||||||
|
|
||||||
# These are the options to ./configure / econf that enable the usage
|
|
||||||
# of a specific Fortran Compiler. If your package uses a different
|
|
||||||
# option that the one listed here, overwrite it in your ebuild.
|
|
||||||
g77_CONF="--with-f77"
|
|
||||||
f2c_CONF="--with-f2c"
|
|
||||||
|
|
||||||
# This function prints the necessary options for the currently selected
|
|
||||||
# Fortran Compiler.
|
|
||||||
fortran_conf() {
|
|
||||||
echo $(eval echo \${$(echo -n ${FORTRANC})_CONF})
|
|
||||||
}
|
|
||||||
|
|
||||||
# need_fortran(<profiles>):
|
|
||||||
# profiles = <profile> ... <profile>
|
|
||||||
#
|
|
||||||
# profile:
|
|
||||||
# * gfortran - GCC Fortran 95
|
|
||||||
# * g77 - GCC Fortran 77
|
|
||||||
# * f2c - Fortran 2 C Translator
|
|
||||||
# * ifc - Intel Fortran Compiler
|
|
||||||
# * f95 - Sun Studio Fortran Compiler
|
|
||||||
#
|
|
||||||
# Checks if at least one of <profiles> is installed.
|
|
||||||
# Checks also if F77 (the fortran compiler to use) is available
|
|
||||||
# on the System.
|
|
||||||
need_fortran() {
|
|
||||||
if [ -z "$*" ]; then
|
|
||||||
eerror "Call need_fortran with at least one argument !"
|
|
||||||
fi
|
|
||||||
local AVAILABLE
|
|
||||||
local PROFILE
|
|
||||||
for PROFILE in $@; do
|
|
||||||
case ${PROFILE} in
|
|
||||||
gfortran)
|
|
||||||
if [ -x "$(type -P gfortran 2> /dev/null)" ]; then
|
|
||||||
AVAILABLE="${AVAILABLE} gfortran"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
g77)
|
|
||||||
if [ -x "$(type -P g77 2> /dev/null)" ]; then
|
|
||||||
AVAILABLE="${AVAILABLE} g77"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
f2c)
|
|
||||||
if [ -x "$(type -P f2c 2> /dev/null)" ]; then
|
|
||||||
AVAILABLE="${AVAILABLE} f2c"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
ifc)
|
|
||||||
case ${ARCH} in
|
|
||||||
x86|ia64|amd64)
|
|
||||||
if [ -x "$(type -P ifort 2> /dev/null)" ]; then
|
|
||||||
AVAILABLE="${AVAILABLE} ifort"
|
|
||||||
elif [ -x "$(type -P ifc 2> /dev/null)" ]; then
|
|
||||||
AVAILABLE="${AVAILABLE} ifc"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
f95)
|
|
||||||
case ${ARCH} in
|
|
||||||
x86|amd64)
|
|
||||||
if [ -x "$(type -P f95 2> /dev/null)" ]; then
|
|
||||||
AVAILABLE="${AVAILABLE} f95"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
AVAILABLE="${AVAILABLE/^[[:space:]]}"
|
|
||||||
use debug && echo ${AVAILABLE}
|
|
||||||
if [ -z "${AVAILABLE}" ]; then
|
|
||||||
eerror "None of the needed Fortran Compilers ($@) is installed."
|
|
||||||
eerror "To install one of these, choose one of the following steps:"
|
|
||||||
i=1
|
|
||||||
for PROFILE in $@; do
|
|
||||||
case ${PROFILE} in
|
|
||||||
gfortran)
|
|
||||||
eerror "[${i}] USE=\"fortran\" emerge =sys-devel/gcc-4*"
|
|
||||||
;;
|
|
||||||
g77)
|
|
||||||
eerror "[${i}] USE=\"fortran\" emerge =sys-devel/gcc-3*"
|
|
||||||
;;
|
|
||||||
f2c)
|
|
||||||
eerror "[${i}] emerge dev-lang/f2c"
|
|
||||||
;;
|
|
||||||
ifc)
|
|
||||||
case ${ARCH} in
|
|
||||||
x86|ia64)
|
|
||||||
eerror "[${i}] emerge dev-lang/ifc"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
f95)
|
|
||||||
case ${ARCH} in
|
|
||||||
x86|amd64)
|
|
||||||
eerror "[${i}] emerge dev-lang/sunstudio"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
i=$((i + 1))
|
|
||||||
done
|
|
||||||
die "Install a Fortran Compiler !"
|
|
||||||
else
|
|
||||||
einfo "You need one of these Fortran Compilers: $@"
|
|
||||||
einfo "Installed are: ${AVAILABLE}"
|
|
||||||
if [ -n "${F77}" -o -n "${FC}" -o -n "${F2C}" ]; then
|
|
||||||
if [ -n "${F77}" ]; then
|
|
||||||
FC="${F77}" # F77 overwrites FC
|
|
||||||
fi
|
|
||||||
if [ -n "${FC}" -a -n "${F2C}" ]; then
|
|
||||||
ewarn "Using ${FC} and f2c is impossible. Disabling F2C !"
|
|
||||||
F2C="" # Disabling f2c
|
|
||||||
MY_FORTRAN="$(basename ${FC})" # set MY_FORTRAN to filename of
|
|
||||||
# the Fortran Compiler
|
|
||||||
else
|
|
||||||
if [ -n "${F2C}" ]; then
|
|
||||||
MY_FORTRAN="$(basename ${F2C})"
|
|
||||||
elif [ -n "${FC}" ]; then
|
|
||||||
MY_FORTRAN="$(basename ${FC})"
|
|
||||||
else
|
|
||||||
MY_FORTRAN="$(basename ${F77})"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# default to gfortran if available, g77 if not
|
|
||||||
use debug && echo "MY_FORTRAN: \"${MY_FORTRAN}\""
|
|
||||||
if hasq gfortran ${AVAILABLE}; then
|
|
||||||
MY_FORTRAN=${MY_FORTRAN:=gfortran}
|
|
||||||
elif hasq g77 ${AVAILABLE}; then
|
|
||||||
MY_FORTRAN=${MY_FORTRAN:=g77}
|
|
||||||
else
|
|
||||||
# Default to the first valid Fortran compiler
|
|
||||||
for i in ${AVAILABLE}; do
|
|
||||||
MY_FORTRAN=$i
|
|
||||||
break
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
use debug && echo "MY_FORTRAN: \"${MY_FORTRAN}\""
|
|
||||||
|
|
||||||
if ! hasq ${MY_FORTRAN} ${AVAILABLE}; then
|
|
||||||
eerror "Current Fortran Compiler is set to ${MY_FORTRAN}, which is not usable with this package !"
|
|
||||||
die "Wrong Fortran Compiler !"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case ${MY_FORTRAN} in
|
|
||||||
gfortran|g77|ifc|ifort|f2c|f95)
|
|
||||||
FORTRANC="${MY_FORTRAN}"
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
use debug && echo "FORTRANC: \"${FORTRANC}\""
|
|
||||||
}
|
|
||||||
|
|
||||||
# patch_fortran():
|
|
||||||
# Apply necessary patches for ${FORTRANC}
|
|
||||||
patch_fortran() {
|
|
||||||
if [[ -z "${FORTRANC}" || ! -d "${FILESDIR}" ]]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
local PATCHES=$(find ${FILESDIR} -name "${P}-${FORTRANC}-*")
|
|
||||||
einfo "Applying patches for selected FORTRAN compiler: ${FORTRANC}"
|
|
||||||
local PATCH
|
|
||||||
if [ -n "${PATCHES}" ]; then
|
|
||||||
for PATCH in ${PATCHES}; do
|
|
||||||
epatch ${PATCH}
|
|
||||||
done
|
|
||||||
eautoreconf
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# fortran_pkg_setup():
|
|
||||||
# Set FORTRAN to indicate the list of Fortran Compiler that
|
|
||||||
# can be used for the ebuild.
|
|
||||||
# If not set in ebuild, FORTRAN will default to f77
|
|
||||||
fortran_pkg_setup() {
|
|
||||||
need_fortran ${FORTRAN:="gfortran g77"}
|
|
||||||
}
|
|
||||||
|
|
||||||
# fortran_src_unpack():
|
|
||||||
# Run patch_fortran if no new src_unpack() is defined.
|
|
||||||
fortran_src_unpack() {
|
|
||||||
unpack ${A}
|
|
||||||
cd "${S}"
|
|
||||||
patch_fortran
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_FUNCTIONS pkg_setup src_unpack
|
|
@ -1,11 +1,15 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
# Copyright 1999-2011 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/freebsd.eclass,v 1.24 2012/11/24 11:22:44 aballier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/freebsd.eclass,v 1.35 2013/08/28 15:56:11 aballier Exp $
|
||||||
#
|
#
|
||||||
# Diego Pettenò <flameeyes@gentoo.org>
|
# Diego Pettenò <flameeyes@gentoo.org>
|
||||||
|
|
||||||
inherit versionator eutils flag-o-matic bsdmk
|
inherit versionator eutils flag-o-matic bsdmk
|
||||||
|
|
||||||
|
# Drop patch level from ${PV}
|
||||||
|
MY_PV=${PV/_p*}
|
||||||
|
PLEVEL=${PV##*_p}
|
||||||
|
|
||||||
LICENSE="BSD"
|
LICENSE="BSD"
|
||||||
HOMEPAGE="http://www.freebsd.org/"
|
HOMEPAGE="http://www.freebsd.org/"
|
||||||
|
|
||||||
@ -25,9 +29,42 @@ SYS="freebsd-sys-${PV}"
|
|||||||
INCLUDE="freebsd-include-${PV}"
|
INCLUDE="freebsd-include-${PV}"
|
||||||
RESCUE="freebsd-rescue-${PV}"
|
RESCUE="freebsd-rescue-${PV}"
|
||||||
CDDL="freebsd-cddl-${PV}"
|
CDDL="freebsd-cddl-${PV}"
|
||||||
|
SECURE="freebsd-secure-${PV}"
|
||||||
|
|
||||||
# Release version (5.3, 5.4, 6.0, etc)
|
# Release version (5.3, 5.4, 6.0, etc)
|
||||||
RV="$(get_version_component_range 1-2)"
|
RV="$(get_version_component_range 1-2 ${MY_PV})"
|
||||||
|
|
||||||
|
# SVN ebuild support.
|
||||||
|
# 9.1.0.9999 --> release/9.1.0
|
||||||
|
# 9.1.9999 --> releng/9.1
|
||||||
|
# 9.9999 --> stable/9
|
||||||
|
# 9999 --> head
|
||||||
|
#
|
||||||
|
# svn revision can be specified by patch level:
|
||||||
|
# freebsd-lib-9.9999_p247000 --> set svn -r 247000
|
||||||
|
|
||||||
|
if [[ ${MY_PV} == *9999* ]]; then
|
||||||
|
inherit subversion
|
||||||
|
|
||||||
|
# Set SVN revision using patch level.
|
||||||
|
[[ ${PV} == *_p* ]] && ESVN_REVISION="${PLEVEL}"
|
||||||
|
|
||||||
|
case ${MY_PV%.9999} in
|
||||||
|
*.*.*) BRANCH="release";;
|
||||||
|
*.*) BRANCH="releng" ;;
|
||||||
|
9999) BRANCH="head" ;;
|
||||||
|
*) BRANCH="stable" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [[ ${BRANCH} == head ]] ; then
|
||||||
|
SVN_SUB_URI="${BRANCH}"
|
||||||
|
else
|
||||||
|
SVN_SUB_URI="${BRANCH}/${MY_PV%.9999}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ESVN_REPO_URI="svn://svn.freebsd.org/base/${SVN_SUB_URI}"
|
||||||
|
ESVN_PROJECT="freebsd-${BRANCH}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${PN} != "freebsd-share" ]] && [[ ${PN} != freebsd-sources ]]; then
|
if [[ ${PN} != "freebsd-share" ]] && [[ ${PN} != freebsd-sources ]]; then
|
||||||
IUSE="profile"
|
IUSE="profile"
|
||||||
@ -90,13 +127,24 @@ freebsd_rename_libraries() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
freebsd_src_unpack() {
|
freebsd_src_unpack() {
|
||||||
|
if [[ ${MY_PV} == *9999* ]]; then
|
||||||
|
S="${WORKDIR}" subversion_src_unpack
|
||||||
|
else
|
||||||
unpack ${A}
|
unpack ${A}
|
||||||
|
fi
|
||||||
cd "${S}"
|
cd "${S}"
|
||||||
|
|
||||||
dummy_mk ${REMOVE_SUBDIRS}
|
dummy_mk ${REMOVE_SUBDIRS}
|
||||||
|
|
||||||
freebsd_do_patches
|
freebsd_do_patches
|
||||||
freebsd_rename_libraries
|
freebsd_rename_libraries
|
||||||
|
|
||||||
|
# Starting from FreeBSD 9.2, its install command supports the -l option and
|
||||||
|
# they now use it. Emulate it if we are on a system that does not have it.
|
||||||
|
if [[ ${RV} > 9.1 ]] && ! has_version '>=sys-freebsd/freebsd-ubin-9.2_beta1' ; then
|
||||||
|
export INSTALL_LINK="ln -f"
|
||||||
|
export INSTALL_SYMLINK="ln -fs"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
freebsd_src_compile() {
|
freebsd_src_compile() {
|
||||||
@ -105,9 +153,6 @@ freebsd_src_compile() {
|
|||||||
|
|
||||||
mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= NO_FSCHG="
|
mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= NO_FSCHG="
|
||||||
|
|
||||||
# Many things breaks when using ricer flags here
|
|
||||||
[[ -z "${NOFLAGSTRIP}" ]] && strip-flags
|
|
||||||
|
|
||||||
# Make sure to use FreeBSD definitions while crosscompiling
|
# Make sure to use FreeBSD definitions while crosscompiling
|
||||||
[[ -z "${BMAKE}" ]] && BMAKE="$(freebsd_get_bmake)"
|
[[ -z "${BMAKE}" ]] && BMAKE="$(freebsd_get_bmake)"
|
||||||
|
|
||||||
@ -117,7 +162,51 @@ freebsd_src_compile() {
|
|||||||
mkmake obj || die
|
mkmake obj || die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bsdmk_src_compile
|
bsdmk_src_compile "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Helper function to make a multilib build with FreeBSD Makefiles.
|
||||||
|
# Usage:
|
||||||
|
# MULTIBUILD_VARIANTS=( $(get_all_abis) )
|
||||||
|
# multibuild_foreach_variant freebsd_multilib_multibuild_wrapper my_function
|
||||||
|
#
|
||||||
|
# Important note: To use this function you _have_ to:
|
||||||
|
# - inherit multilib.eclass and multibuild.eclass
|
||||||
|
# - set MULTIBUILD_VARIANTS
|
||||||
|
|
||||||
|
freebsd_multilib_multibuild_wrapper() {
|
||||||
|
# Get the ABI from multibuild.eclass
|
||||||
|
# This assumes MULTIBUILD_VARIANTS contains only valid ABIs.
|
||||||
|
local ABI=${MULTIBUILD_VARIANT}
|
||||||
|
|
||||||
|
# First, save the variables: CFLAGS, CXXFLAGS, LDFLAGS, LDADD and mymakeopts.
|
||||||
|
for i in CFLAGS CXXFLAGS LDFLAGS LDADD mymakeopts ; do
|
||||||
|
export ${i}_SAVE="${!i}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Setup the variables specific to this ABI.
|
||||||
|
multilib_toolchain_setup "${ABI}"
|
||||||
|
|
||||||
|
local target="$(tc-arch-kernel ${CHOST})"
|
||||||
|
mymakeopts="${mymakeopts} TARGET=${target} MACHINE=${target} MACHINE_ARCH=${target} SHLIBDIR=/usr/$(get_libdir) LIBDIR=/usr/$(get_libdir)"
|
||||||
|
if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
|
||||||
|
mymakeopts="${mymakeopts} COMPAT_32BIT="
|
||||||
|
fi
|
||||||
|
|
||||||
|
einfo "Building for ABI=${ABI} and TARGET=${target}"
|
||||||
|
|
||||||
|
export MAKEOBJDIRPREFIX="${BUILD_DIR}"
|
||||||
|
if [ ! -d "${MAKEOBJDIRPREFIX}" ] ; then
|
||||||
|
mkdir "${MAKEOBJDIRPREFIX}" || die "Could not create ${MAKEOBJDIRPREFIX}."
|
||||||
|
fi
|
||||||
|
|
||||||
|
CTARGET="${CHOST}" "$@"
|
||||||
|
|
||||||
|
# Restore the variables now.
|
||||||
|
for i in CFLAGS CXXFLAGS LDFLAGS LDADD mymakeopts ; do
|
||||||
|
ii="${i}_SAVE"
|
||||||
|
export ${i}="${!ii}"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
freebsd_src_install() {
|
freebsd_src_install() {
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/games-etmod.eclass,v 1.15 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,144 +0,0 @@
|
|||||||
# Copyright 1999-2004 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/games-q3mod.eclass,v 1.36 2007/03/07 15:23:39 wolf31o2 Exp $
|
|
||||||
|
|
||||||
inherit games
|
|
||||||
|
|
||||||
EXPORT_FUNCTIONS src_install pkg_postinst
|
|
||||||
|
|
||||||
DESCRIPTION="Quake III - ${MOD_DESC}"
|
|
||||||
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="-* amd64 ~ppc x86"
|
|
||||||
IUSE="dedicated"
|
|
||||||
|
|
||||||
DEPEND="app-arch/unzip"
|
|
||||||
RDEPEND="|| ( games-fps/quake3 games-fps/quake3-bin )
|
|
||||||
amd64? ( app-emulation/emul-linux-x86-baselibs )
|
|
||||||
dedicated? ( app-misc/screen )"
|
|
||||||
|
|
||||||
S=${WORKDIR}
|
|
||||||
|
|
||||||
games-q3mod_src_install() {
|
|
||||||
[[ -z ${MOD_NAME} ]] && die "what is the name of this q3mod ?"
|
|
||||||
|
|
||||||
local bdir=${GAMES_PREFIX_OPT}/quake3
|
|
||||||
local mdir=${bdir}/${MOD_NAME}
|
|
||||||
MOD_BINS=${MOD_BINS:-${MOD_NAME}}
|
|
||||||
|
|
||||||
if [[ -d ${MOD_NAME} ]] ; then
|
|
||||||
dodir "${bdir}"
|
|
||||||
mv ${MOD_NAME} "${D}/${bdir}/"
|
|
||||||
fi
|
|
||||||
if [[ -d baseq3 ]] ; then
|
|
||||||
dodir "${bdir}"
|
|
||||||
mv baseq3 "${D}/${bdir}/"
|
|
||||||
fi
|
|
||||||
if [[ ! -z $(ls "${S}"/* 2> /dev/null) ]] ; then
|
|
||||||
dodir "${mdir}"
|
|
||||||
mv "${S}"/* "${D}/${mdir}/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use dedicated; then
|
|
||||||
games-q3mod_make_q3ded_exec
|
|
||||||
newgamesbin "${T}"/q3${MOD_NAME}-ded.bin q3${MOD_BINS}-ded
|
|
||||||
fi
|
|
||||||
games-q3mod_make_quake3_exec
|
|
||||||
newgamesbin "${T}"/quake3-${MOD_NAME}.bin quake3-${MOD_BINS}
|
|
||||||
|
|
||||||
if use dedicated; then
|
|
||||||
games-q3mod_make_init.d
|
|
||||||
newinitd "${T}"/q3${MOD_NAME}-ded.init.d q3${MOD_BINS}-ded
|
|
||||||
games-q3mod_make_conf.d
|
|
||||||
newconfd "${T}"/q3${MOD_NAME}-ded.conf.d q3${MOD_BINS}-ded
|
|
||||||
fi
|
|
||||||
|
|
||||||
dodir "${GAMES_SYSCONFDIR}"/quake3
|
|
||||||
|
|
||||||
dodir "${bdir}"/q3a-homedir
|
|
||||||
dosym "${bdir}"/q3a-homedir "${GAMES_PREFIX}"/.q3a
|
|
||||||
keepdir "${bdir}"/q3a-homedir
|
|
||||||
prepgamesdirs
|
|
||||||
chmod g+rw "${D}/${mdir}" "${D}/${bdir}"/q3a-homedir
|
|
||||||
chmod -R g+rw "${D}/${GAMES_SYSCONFDIR}"/quake3
|
|
||||||
}
|
|
||||||
|
|
||||||
games-q3mod_pkg_postinst() {
|
|
||||||
local samplecfg=${FILESDIR}/server.cfg
|
|
||||||
local realcfg=${GAMES_PREFIX_OPT}/quake3/${MOD_NAME}/server.cfg
|
|
||||||
if [[ -e ${samplecfg} ]] && [[ ! -e ${realcfg} ]] ; then
|
|
||||||
cp "${samplecfg}" "${realcfg}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
einfo "To play this mod: quake3-${MOD_BINS}"
|
|
||||||
use dedicated && \
|
|
||||||
einfo "To launch a dedicated server: q3${MOD_BINS}-ded" && \
|
|
||||||
einfo "To launch server at startup: /etc/init.d/q3${MOD_NAME}-ded"
|
|
||||||
|
|
||||||
games_pkg_postinst
|
|
||||||
}
|
|
||||||
|
|
||||||
games-q3mod_make_q3ded_exec() {
|
|
||||||
cat << EOF > "${T}"/q3${MOD_NAME}-ded.bin
|
|
||||||
#!/bin/sh
|
|
||||||
exec "${GAMES_BINDIR}"/q3ded-bin +set fs_game ${MOD_NAME} +set dedicated 1 +exec server.cfg \${@}
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
games-q3mod_make_quake3_exec() {
|
|
||||||
cat << EOF > "${T}"/quake3-${MOD_NAME}.bin
|
|
||||||
#!/bin/sh
|
|
||||||
exec "${GAMES_BINDIR}"/quake3-bin +set fs_game ${MOD_NAME} \${@}
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
games-q3mod_make_init.d() {
|
|
||||||
cat << EOF > "${T}"/q3${MOD_NAME}-ded.init.d
|
|
||||||
#!/sbin/runscript
|
|
||||||
$(<"${PORTDIR}"/header.txt)
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need net
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
ebegin "Starting ${MOD_NAME} dedicated"
|
|
||||||
screen -A -m -d -S q3${MOD_BINS}-ded su - ${GAMES_USER_DED} -c "${GAMES_BINDIR}/q3${MOD_BINS}-ded \${${MOD_NAME}_OPTS}"
|
|
||||||
eend \$?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping ${MOD_NAME} dedicated"
|
|
||||||
local pid=\`screen -list | grep q3${MOD_BINS}-ded | awk -F . '{print \$1}' | sed -e s/.//\`
|
|
||||||
if [[ -z "\${pid}" ]] ; then
|
|
||||||
eend 1 "Lost screen session"
|
|
||||||
else
|
|
||||||
pid=\`pstree -p \${pid} | sed -e 's:^.*q3ded::'\`
|
|
||||||
pid=\${pid:1:\${#pid}-2}
|
|
||||||
if [[ -z "\${pid}" ]] ; then
|
|
||||||
eend 1 "Lost q3ded session"
|
|
||||||
else
|
|
||||||
kill \${pid}
|
|
||||||
eend \$? "Could not kill q3ded"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
status() {
|
|
||||||
screen -list | grep q3${MOD_BINS}-ded
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
games-q3mod_make_conf.d() {
|
|
||||||
if [[ -e ${FILESDIR}/${MOD_NAME}.conf.d ]] ; then
|
|
||||||
cp "${FILESDIR}"/${MOD_NAME}.conf.d "${T}"/q3${MOD_NAME}-ded.conf.d
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
cat << EOF > "${T}"/q3${MOD_NAME}-ded.conf.d
|
|
||||||
$(<"${PORTDIR}"/header.txt)
|
|
||||||
|
|
||||||
# Any extra options you want to pass to the dedicated server
|
|
||||||
${MOD_NAME}_OPTS="+set vm_game 0 +set sv_pure 1 +set bot_enable 0 +set com_hunkmegs 64 +set net_port 27960"
|
|
||||||
EOF
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/games-ut2k4mod.eclass,v 1.12 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.153 2012/09/27 16:35:41 axs Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.154 2013/04/08 07:36:25 mr_bones_ Exp $
|
||||||
|
|
||||||
# devlist: games@gentoo.org
|
# devlist: games@gentoo.org
|
||||||
#
|
#
|
||||||
@ -39,12 +39,21 @@ games_get_libdir() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
egamesconf() {
|
egamesconf() {
|
||||||
|
# handle verbose build log pre-EAPI5
|
||||||
|
local _gamesconf
|
||||||
|
if has "${EAPI:-0}" 0 1 2 3 4 ; then
|
||||||
|
if grep -q -s disable-silent-rules "${ECONF_SOURCE:-.}"/configure ; then
|
||||||
|
_gamesconf="--disable-silent-rules"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
econf \
|
econf \
|
||||||
--prefix="${GAMES_PREFIX}" \
|
--prefix="${GAMES_PREFIX}" \
|
||||||
--libdir="$(games_get_libdir)" \
|
--libdir="$(games_get_libdir)" \
|
||||||
--datadir="${GAMES_DATADIR}" \
|
--datadir="${GAMES_DATADIR}" \
|
||||||
--sysconfdir="${GAMES_SYSCONFDIR}" \
|
--sysconfdir="${GAMES_SYSCONFDIR}" \
|
||||||
--localstatedir="${GAMES_STATEDIR}" \
|
--localstatedir="${GAMES_STATEDIR}" \
|
||||||
|
${_gamesconf} \
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,6 +132,8 @@ gamesenv() {
|
|||||||
LDPATH="${libdirs:1}"
|
LDPATH="${libdirs:1}"
|
||||||
PATH="${GAMES_BINDIR}"
|
PATH="${GAMES_BINDIR}"
|
||||||
EOF
|
EOF
|
||||||
|
gamesowners "${ROOT}"/etc/env.d/${GAMES_ENVD}
|
||||||
|
gamesperms "${ROOT}"/etc/env.d/${GAMES_ENVD}
|
||||||
}
|
}
|
||||||
|
|
||||||
games_pkg_setup() {
|
games_pkg_setup() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.36 2013/01/06 13:06:35 slyfox Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.37 2013/05/11 12:46:32 slyfox Exp $
|
||||||
|
|
||||||
# @ECLASS: ghc-package.eclass
|
# @ECLASS: ghc-package.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -102,6 +102,21 @@ ghc-supports-threaded-runtime() {
|
|||||||
$(ghc-getghc) --info | grep "RTS ways" | grep -q "thr"
|
$(ghc-getghc) --info | grep "RTS ways" | grep -q "thr"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: ghc-supports-smp
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# checks if ghc is built with support for multiple cores runtime
|
||||||
|
ghc-supports-smp() {
|
||||||
|
$(ghc-getghc) --info | grep "Support SMP" | grep -q "YES"
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: ghc-supports-dynamic-by-default
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# checks if ghc link against shared haskell libraries by default
|
||||||
|
ghc-supports-dynamic-by-default() {
|
||||||
|
$(ghc-getghc) --info | grep "Dynamic by default" | grep -q "YES"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# @FUNCTION: ghc-extractportageversion
|
# @FUNCTION: ghc-extractportageversion
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# extract the version of a portage-installed package
|
# extract the version of a portage-installed package
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.30 2013/01/09 17:26:55 axs Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.32 2013/09/08 22:54:24 mgorny Exp $
|
||||||
|
|
||||||
# @ECLASS: git-2.eclass
|
# @ECLASS: git-2.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -11,6 +11,15 @@
|
|||||||
# Eclass for easing maitenance of live ebuilds using git as remote repository.
|
# Eclass for easing maitenance of live ebuilds using git as remote repository.
|
||||||
# Eclass support working with git submodules and branching.
|
# Eclass support working with git submodules and branching.
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: EGIT_USE_GIT_R3
|
||||||
|
# @DEFAULT_UNSET
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Use git-r3 backend instead of classic git-2 behavior. This is intended
|
||||||
|
# for early testing of git-r3 and is to be set in make.conf.
|
||||||
|
|
||||||
|
# (since we override src_unpack this doesn't hurt)
|
||||||
|
inherit git-r3
|
||||||
|
|
||||||
# This eclass support all EAPIs
|
# This eclass support all EAPIs
|
||||||
EXPORT_FUNCTIONS src_unpack
|
EXPORT_FUNCTIONS src_unpack
|
||||||
|
|
||||||
@ -572,12 +581,54 @@ git-2_cleanup() {
|
|||||||
unset EGIT_LOCAL_NONBARE
|
unset EGIT_LOCAL_NONBARE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
git-2_r3_wrapper() {
|
||||||
|
ewarn "Using git-r3 backend in git-2. Not everything is supported."
|
||||||
|
ewarn "Expect random failures and have fun testing."
|
||||||
|
|
||||||
|
if [[ ${EGIT_SOURCEDIR} ]]; then
|
||||||
|
EGIT_CHECKOUT_DIR=${EGIT_SOURCEDIR}
|
||||||
|
unset EGIT_SOURCEDIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${EGIT_MASTER} ]]; then
|
||||||
|
: ${EGIT_BRANCH:=${EGIT_MASTER}}
|
||||||
|
unset EGIT_MASTER
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${EGIT_HAS_SUBMODULES} ]]; then
|
||||||
|
unset EGIT_HAS_SUBMODULES
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${EGIT_PROJECT} ]]; then
|
||||||
|
unset EGIT_PROJECT
|
||||||
|
fi
|
||||||
|
|
||||||
|
local boots unp
|
||||||
|
if [[ ${EGIT_NOUNPACK} ]]; then
|
||||||
|
unp=1
|
||||||
|
unset EGIT_NOUNPACK
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${EGIT_BOOTSTRAP} ]]; then
|
||||||
|
boots=1
|
||||||
|
unset EGIT_BOOTSTRAP
|
||||||
|
fi
|
||||||
|
|
||||||
|
git-r3_src_unpack
|
||||||
|
|
||||||
|
[[ ${boots} ]] && EGIT_BOOTSTRAP=${boots} git-2_bootstrap
|
||||||
|
[[ ${unp} ]] && EGIT_NOUNPACK=1
|
||||||
|
}
|
||||||
|
|
||||||
# @FUNCTION: git-2_src_unpack
|
# @FUNCTION: git-2_src_unpack
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Default git src_unpack function.
|
# Default git src_unpack function.
|
||||||
git-2_src_unpack() {
|
git-2_src_unpack() {
|
||||||
debug-print-function ${FUNCNAME} "$@"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
if [[ ${EGIT_USE_GIT_R3} ]]; then
|
||||||
|
git-2_r3_wrapper
|
||||||
|
else
|
||||||
git-2_init_variables
|
git-2_init_variables
|
||||||
git-2_prepare_storedir
|
git-2_prepare_storedir
|
||||||
git-2_migrate_repository
|
git-2_migrate_repository
|
||||||
@ -589,6 +640,7 @@ git-2_src_unpack() {
|
|||||||
git-2_bootstrap
|
git-2_bootstrap
|
||||||
git-2_cleanup
|
git-2_cleanup
|
||||||
echo ">>> Unpacked to ${EGIT_SOURCEDIR}"
|
echo ">>> Unpacked to ${EGIT_SOURCEDIR}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Users can specify some SRC_URI and we should
|
# Users can specify some SRC_URI and we should
|
||||||
# unpack the files too.
|
# unpack the files too.
|
||||||
|
686
sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass
vendored
Normal file
686
sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass
vendored
Normal file
@ -0,0 +1,686 @@
|
|||||||
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.5 2013/09/13 15:08:37 mgorny Exp $
|
||||||
|
|
||||||
|
# @ECLASS: git-r3.eclass
|
||||||
|
# @MAINTAINER:
|
||||||
|
# Michał Górny <mgorny@gentoo.org>
|
||||||
|
# @BLURB: Eclass for fetching and unpacking git repositories.
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Third generation eclass for easing maitenance of live ebuilds using
|
||||||
|
# git as remote repository. The eclass supports lightweight (shallow)
|
||||||
|
# clones and bare clones of submodules.
|
||||||
|
|
||||||
|
case "${EAPI:-0}" in
|
||||||
|
0|1|2|3|4|5)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [[ ! ${_GIT_R3} ]]; then
|
||||||
|
|
||||||
|
inherit eutils
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS src_unpack
|
||||||
|
|
||||||
|
if [[ ! ${_GIT_R3} ]]; then
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: EGIT3_STORE_DIR
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Storage directory for git sources.
|
||||||
|
#
|
||||||
|
# EGIT3_STORE_DIR=${DISTDIR}/git3-src
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: EGIT_REPO_URI
|
||||||
|
# @REQUIRED
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# URIs to the repository, e.g. git://foo, https://foo. If multiple URIs
|
||||||
|
# are provided, the eclass will consider them as fallback URIs to try
|
||||||
|
# if the first URI does not work.
|
||||||
|
#
|
||||||
|
# It can be overriden via env using ${PN}_LIVE_REPO variable.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# @CODE
|
||||||
|
# EGIT_REPO_URI="git://a/b.git https://c/d.git"
|
||||||
|
# @CODE
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: EVCS_OFFLINE
|
||||||
|
# @DEFAULT_UNSET
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# If non-empty, this variable prevents any online operations.
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: EGIT_BRANCH
|
||||||
|
# @DEFAULT_UNSET
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# The branch name to check out. If unset, the upstream default (HEAD)
|
||||||
|
# will be used.
|
||||||
|
#
|
||||||
|
# It can be overriden via env using ${PN}_LIVE_BRANCH variable.
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: EGIT_COMMIT
|
||||||
|
# @DEFAULT_UNSET
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# The tag name or commit identifier to check out. If unset, newest
|
||||||
|
# commit from the branch will be used. If set, EGIT_BRANCH will
|
||||||
|
# be ignored.
|
||||||
|
#
|
||||||
|
# It can be overriden via env using ${PN}_LIVE_COMMIT variable.
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# The directory to check the git sources out to.
|
||||||
|
#
|
||||||
|
# EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: EGIT_NONSHALLOW
|
||||||
|
# @DEFAULT_UNSET
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Disable performing shallow fetches/clones. Shallow clones have
|
||||||
|
# a fair number of limitations. Therefore, if you'd like the eclass to
|
||||||
|
# perform complete clones instead, set this to a non-null value.
|
||||||
|
#
|
||||||
|
# This variable is to be set in make.conf. Ebuilds are not allowed
|
||||||
|
# to set it.
|
||||||
|
|
||||||
|
# @FUNCTION: _git-r3_env_setup
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Set the eclass variables as necessary for operation. This can involve
|
||||||
|
# setting EGIT_* to defaults or ${PN}_LIVE_* variables.
|
||||||
|
_git-r3_env_setup() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
local esc_pn livevar
|
||||||
|
esc_pn=${PN//[-+]/_}
|
||||||
|
|
||||||
|
livevar=${esc_pn}_LIVE_REPO
|
||||||
|
EGIT_REPO_URI=${!livevar:-${EGIT_REPO_URI}}
|
||||||
|
[[ ${!livevar} ]] \
|
||||||
|
&& ewarn "Using ${livevar}, no support will be provided"
|
||||||
|
|
||||||
|
livevar=${esc_pn}_LIVE_BRANCH
|
||||||
|
EGIT_BRANCH=${!livevar:-${EGIT_BRANCH}}
|
||||||
|
[[ ${!livevar} ]] \
|
||||||
|
&& ewarn "Using ${livevar}, no support will be provided"
|
||||||
|
|
||||||
|
livevar=${esc_pn}_LIVE_COMMIT
|
||||||
|
EGIT_COMMIT=${!livevar:-${EGIT_COMMIT}}
|
||||||
|
[[ ${!livevar} ]] \
|
||||||
|
&& ewarn "Using ${livevar}, no support will be provided"
|
||||||
|
|
||||||
|
# Migration helpers. Remove them when git-2 is removed.
|
||||||
|
|
||||||
|
if [[ ${EGIT_SOURCEDIR} ]]; then
|
||||||
|
eerror "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR. While updating"
|
||||||
|
eerror "your ebuild, please check whether the variable is necessary at all"
|
||||||
|
eerror "since the default has been changed from \${S} to \${WORKDIR}/\${P}."
|
||||||
|
eerror "Therefore, proper setting of S may be sufficient."
|
||||||
|
die "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${EGIT_MASTER} ]]; then
|
||||||
|
eerror "EGIT_MASTER has been removed. Instead, the upstream default (HEAD)"
|
||||||
|
eerror "is used by the eclass. Please remove the assignment or use EGIT_BRANCH"
|
||||||
|
eerror "as necessary."
|
||||||
|
die "EGIT_MASTER has been removed."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${EGIT_HAS_SUBMODULES} ]]; then
|
||||||
|
eerror "EGIT_HAS_SUBMODULES has been removed. The eclass no longer needs"
|
||||||
|
eerror "to switch the clone type in order to support submodules and therefore"
|
||||||
|
eerror "submodules are detected and fetched automatically."
|
||||||
|
die "EGIT_HAS_SUBMODULES is no longer necessary."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${EGIT_PROJECT} ]]; then
|
||||||
|
eerror "EGIT_PROJECT has been removed. Instead, the eclass determines"
|
||||||
|
eerror "the local clone path using path in canonical EGIT_REPO_URI."
|
||||||
|
eerror "If the current algorithm causes issues for you, please report a bug."
|
||||||
|
die "EGIT_PROJECT is no longer necessary."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${EGIT_BOOTSTRAP} ]]; then
|
||||||
|
eerror "EGIT_BOOTSTRAP has been removed. Please create proper src_prepare()"
|
||||||
|
eerror "instead."
|
||||||
|
die "EGIT_BOOTSTRAP has been removed."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${EGIT_NOUNPACK} ]]; then
|
||||||
|
eerror "EGIT_NOUNPACK has been removed. The eclass no longer calls default"
|
||||||
|
eerror "unpack function. If necessary, please declare proper src_unpack()."
|
||||||
|
die "EGIT_NOUNPACK has been removed."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: _git-r3_set_gitdir
|
||||||
|
# @USAGE: <repo-uri>
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Obtain the local repository path and set it as GIT_DIR. Creates
|
||||||
|
# a new repository if necessary.
|
||||||
|
#
|
||||||
|
# <repo-uri> may be used to compose the path. It should therefore be
|
||||||
|
# a canonical URI to the repository.
|
||||||
|
_git-r3_set_gitdir() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
local repo_name=${1#*://*/}
|
||||||
|
|
||||||
|
# strip common prefixes to make paths more likely to match
|
||||||
|
# e.g. git://X/Y.git vs https://X/git/Y.git
|
||||||
|
# (but just one of the prefixes)
|
||||||
|
case "${repo_name}" in
|
||||||
|
# cgit can proxy requests to git
|
||||||
|
cgit/*) repo_name=${repo_name#cgit/};;
|
||||||
|
# pretty common
|
||||||
|
git/*) repo_name=${repo_name#git/};;
|
||||||
|
# gentoo.org
|
||||||
|
gitroot/*) repo_name=${repo_name#gitroot/};;
|
||||||
|
# google code, sourceforge
|
||||||
|
p/*) repo_name=${repo_name#p/};;
|
||||||
|
# kernel.org
|
||||||
|
pub/scm/*) repo_name=${repo_name#pub/scm/};;
|
||||||
|
esac
|
||||||
|
# ensure a .git suffix, same reason
|
||||||
|
repo_name=${repo_name%.git}.git
|
||||||
|
# now replace all the slashes
|
||||||
|
repo_name=${repo_name//\//_}
|
||||||
|
|
||||||
|
local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
|
||||||
|
: ${EGIT3_STORE_DIR:=${distdir}/git3-src}
|
||||||
|
|
||||||
|
GIT_DIR=${EGIT3_STORE_DIR}/${repo_name}
|
||||||
|
|
||||||
|
if [[ ! -d ${EGIT3_STORE_DIR} ]]; then
|
||||||
|
(
|
||||||
|
addwrite /
|
||||||
|
mkdir -m0755 -p "${EGIT3_STORE_DIR}"
|
||||||
|
) || die "Unable to create ${EGIT3_STORE_DIR}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
addwrite "${EGIT3_STORE_DIR}"
|
||||||
|
if [[ ! -d ${GIT_DIR} ]]; then
|
||||||
|
mkdir "${GIT_DIR}" || die
|
||||||
|
git init --bare || die
|
||||||
|
|
||||||
|
# avoid auto-unshallow :)
|
||||||
|
touch "${GIT_DIR}"/shallow || die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: _git-r3_set_submodules
|
||||||
|
# @USAGE: <file-contents>
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Parse .gitmodules contents passed as <file-contents>
|
||||||
|
# as in "$(cat .gitmodules)"). Composes a 'submodules' array that
|
||||||
|
# contains in order (name, URL, path) for each submodule.
|
||||||
|
_git-r3_set_submodules() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
local data=${1}
|
||||||
|
|
||||||
|
# ( name url path ... )
|
||||||
|
submodules=()
|
||||||
|
|
||||||
|
local l
|
||||||
|
while read l; do
|
||||||
|
# submodule.<path>.path=<path>
|
||||||
|
# submodule.<path>.url=<url>
|
||||||
|
[[ ${l} == submodule.*.url=* ]] || continue
|
||||||
|
|
||||||
|
l=${l#submodule.}
|
||||||
|
local subname=${l%%.url=*}
|
||||||
|
|
||||||
|
submodules+=(
|
||||||
|
"${subname}"
|
||||||
|
"$(echo "${data}" | git config -f /dev/fd/0 \
|
||||||
|
submodule."${subname}".url)"
|
||||||
|
"$(echo "${data}" | git config -f /dev/fd/0 \
|
||||||
|
submodule."${subname}".path)"
|
||||||
|
)
|
||||||
|
done < <(echo "${data}" | git config -f /dev/fd/0 -l)
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: _git-r3_smart_fetch
|
||||||
|
# @USAGE: <git-fetch-args>...
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Try fetching without '--depth' and switch to '--depth 1' if that
|
||||||
|
# will involve less objects fetched.
|
||||||
|
_git-r3_smart_fetch() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
local sed_regexp='.*Counting objects: \([0-9]*\), done\..*'
|
||||||
|
|
||||||
|
# start the main fetch
|
||||||
|
local cmd=( git fetch --progress "${@}" )
|
||||||
|
echo "${cmd[@]}" >&2
|
||||||
|
|
||||||
|
# we copy the output to the 'sed' pipe for parsing. whenever sed finds
|
||||||
|
# the process count, it quits quickly to avoid delays in writing it.
|
||||||
|
# then, we start a dummy 'cat' to keep the pipe alive
|
||||||
|
|
||||||
|
"${cmd[@]}" 2>&1 \
|
||||||
|
| tee >(
|
||||||
|
sed -n -e "/${sed_regexp}/{s/${sed_regexp}/\1/p;q}" \
|
||||||
|
> "${T}"/git-r3_main.count
|
||||||
|
exec cat >/dev/null
|
||||||
|
) &
|
||||||
|
local main_pid=${!}
|
||||||
|
|
||||||
|
# start the helper process
|
||||||
|
_git-r3_sub_fetch() {
|
||||||
|
# wait for main fetch to get object count; if the server doesn't
|
||||||
|
# output it, we won't even launch the parallel process
|
||||||
|
while [[ ! -s ${T}/git-r3_main.count ]]; do
|
||||||
|
sleep 0.25
|
||||||
|
done
|
||||||
|
|
||||||
|
# ok, let's see if parallel fetch gives us smaller count
|
||||||
|
# --dry-run will prevent it from writing to the local clone
|
||||||
|
# and sed should terminate git with SIGPIPE
|
||||||
|
local sub_count=$(git fetch --progress --dry-run --depth 1 "${@}" 2>&1 \
|
||||||
|
| sed -n -e "/${sed_regexp}/{s/${sed_regexp}/\1/p;q}")
|
||||||
|
local main_count=$(<"${T}"/git-r3_main.count)
|
||||||
|
|
||||||
|
# let's be real sure that '--depth 1' will be good for us.
|
||||||
|
# note that we have purely objects counts, and '--depth 1'
|
||||||
|
# may involve much bigger objects
|
||||||
|
if [[ ${main_count} && ${main_count} -ge $(( sub_count * 3/2 )) ]]
|
||||||
|
then
|
||||||
|
# signal that we want shallow fetch instead,
|
||||||
|
# and terminate the non-shallow fetch process
|
||||||
|
touch "${T}"/git-r3_want_shallow || die
|
||||||
|
kill ${main_pid} &>/dev/null
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
_git-r3_sub_fetch "${@}" &
|
||||||
|
local sub_pid=${!}
|
||||||
|
|
||||||
|
# wait for main process to terminate, either of its own
|
||||||
|
# or by signal from subprocess
|
||||||
|
wait ${main_pid}
|
||||||
|
local main_ret=${?}
|
||||||
|
|
||||||
|
# wait for subprocess to terminate, killing it if necessary.
|
||||||
|
# if main fetch finished before it, there's no point in keeping
|
||||||
|
# it alive. if main fetch was killed by it, it's done anyway
|
||||||
|
kill ${sub_pid} &>/dev/null
|
||||||
|
wait ${sub_pid}
|
||||||
|
|
||||||
|
# now see if subprocess wanted to tell us something...
|
||||||
|
if [[ -f ${T}/git-r3_want_shallow ]]; then
|
||||||
|
rm "${T}"/git-r3_want_shallow || die
|
||||||
|
|
||||||
|
# if fetch finished already (wasn't killed), ignore it
|
||||||
|
[[ ${main_ret} -eq 0 ]] && return 0
|
||||||
|
|
||||||
|
# otherwise, restart as shallow fetch
|
||||||
|
einfo "Restarting fetch using --depth 1 to save bandwidth ..."
|
||||||
|
local cmd=( git fetch --progress --depth 1 "${@}" )
|
||||||
|
echo "${cmd[@]}" >&2
|
||||||
|
"${cmd[@]}"
|
||||||
|
main_ret=${?}
|
||||||
|
fi
|
||||||
|
|
||||||
|
return ${main_ret}
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: git-r3_fetch
|
||||||
|
# @USAGE: [<repo-uri> [<remote-ref> [<local-id>]]]
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Fetch new commits to the local clone of repository.
|
||||||
|
#
|
||||||
|
# <repo-uri> specifies the repository URIs to fetch from, as a space-
|
||||||
|
# -separated list. The first URI will be used as repository group
|
||||||
|
# identifier and therefore must be used consistently. When not
|
||||||
|
# specified, defaults to ${EGIT_REPO_URI}.
|
||||||
|
#
|
||||||
|
# <remote-ref> specifies the remote ref or commit id to fetch.
|
||||||
|
# It is preferred to use 'refs/heads/<branch-name>' for branches
|
||||||
|
# and 'refs/tags/<tag-name>' for tags. Other options are 'HEAD'
|
||||||
|
# for upstream default branch and hexadecimal commit SHA1. Defaults
|
||||||
|
# to the first of EGIT_COMMIT, EGIT_BRANCH or literal 'HEAD' that
|
||||||
|
# is set to a non-null value.
|
||||||
|
#
|
||||||
|
# <local-id> specifies the local branch identifier that will be used to
|
||||||
|
# locally store the fetch result. It should be unique to multiple
|
||||||
|
# fetches within the repository that can be performed at the same time
|
||||||
|
# (including parallel merges). It defaults to ${CATEGORY}/${PN}/${SLOT}.
|
||||||
|
# This default should be fine unless you are fetching multiple trees
|
||||||
|
# from the same repository in the same ebuild.
|
||||||
|
#
|
||||||
|
# The fetch operation will affect the EGIT_STORE only. It will not touch
|
||||||
|
# the working copy, nor export any environment variables.
|
||||||
|
# If the repository contains submodules, they will be fetched
|
||||||
|
# recursively.
|
||||||
|
git-r3_fetch() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
local repos=( ${1:-${EGIT_REPO_URI}} )
|
||||||
|
local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
|
||||||
|
local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
|
||||||
|
local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
|
||||||
|
local local_ref=refs/heads/${local_id}/__main__
|
||||||
|
|
||||||
|
[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
|
||||||
|
|
||||||
|
local -x GIT_DIR
|
||||||
|
_git-r3_set_gitdir ${repos[0]}
|
||||||
|
|
||||||
|
# try to fetch from the remote
|
||||||
|
local r success
|
||||||
|
for r in ${repos[@]}; do
|
||||||
|
einfo "Fetching ${remote_ref} from ${r} ..."
|
||||||
|
|
||||||
|
local is_branch lookup_ref
|
||||||
|
if [[ ${remote_ref} == refs/heads/* || ${remote_ref} == HEAD ]]
|
||||||
|
then
|
||||||
|
is_branch=1
|
||||||
|
lookup_ref=${remote_ref}
|
||||||
|
else
|
||||||
|
# ls-remote by commit is going to fail anyway,
|
||||||
|
# so we may as well pass refs/tags/ABCDEF...
|
||||||
|
lookup_ref=refs/tags/${remote_ref}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# first, try ls-remote to see if ${remote_ref} is a real ref
|
||||||
|
# and not a commit id. if it succeeds, we can pass ${remote_ref}
|
||||||
|
# to 'fetch'. otherwise, we will just fetch everything
|
||||||
|
|
||||||
|
# split on whitespace
|
||||||
|
local ref=(
|
||||||
|
$(git ls-remote "${r}" "${lookup_ref}" || echo __FAIL__)
|
||||||
|
)
|
||||||
|
|
||||||
|
# normally, ref[0] is a hash, so we can do magic strings here
|
||||||
|
[[ ${ref[0]} == __FAIL__ ]] && continue
|
||||||
|
|
||||||
|
local nonshallow=${EGIT_NONSHALLOW}
|
||||||
|
local ref_param=()
|
||||||
|
if [[ ! ${ref[0]} ]]; then
|
||||||
|
nonshallow=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 1. if we need a non-shallow clone and we have a shallow one,
|
||||||
|
# we need to unshallow it explicitly.
|
||||||
|
# 2. if we want a shallow clone, we just pass '--depth 1'
|
||||||
|
# to the first fetch in the repo. passing '--depth'
|
||||||
|
# to further requests usually results in more data being
|
||||||
|
# downloaded than without it.
|
||||||
|
# 3. if we update a shallow clone, we try without '--depth'
|
||||||
|
# first since that usually transfers less data. however,
|
||||||
|
# we use git-r3_smart_fetch that can switch into '--depth 1'
|
||||||
|
# if that looks beneficial.
|
||||||
|
|
||||||
|
local fetch_command=( git fetch )
|
||||||
|
if [[ ${nonshallow} ]]; then
|
||||||
|
if [[ -f ${GIT_DIR}/shallow ]]; then
|
||||||
|
ref_param+=( --unshallow )
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# 'git show-ref --heads' returns 1 when there are no branches
|
||||||
|
if ! git show-ref --heads -q; then
|
||||||
|
ref_param+=( --depth 1 )
|
||||||
|
else
|
||||||
|
fetch_command=( _git-r3_smart_fetch )
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# now, another important thing. we may only fetch a remote
|
||||||
|
# branch directly to a local branch. Otherwise, we need to fetch
|
||||||
|
# the commit and re-create the branch on top of it.
|
||||||
|
|
||||||
|
if [[ ${ref[0]} ]]; then
|
||||||
|
if [[ ${is_branch} ]]; then
|
||||||
|
ref_param+=( -f "${remote_ref}:${local_id}/__main__" )
|
||||||
|
else
|
||||||
|
ref_param+=( "refs/tags/${remote_ref}" )
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if ${remote_ref} is branch or tag, ${ref[@]} will contain
|
||||||
|
# the respective commit id. otherwise, it will be an empty
|
||||||
|
# array, so the following won't evaluate to a parameter.
|
||||||
|
set -- "${fetch_command[@]}" --no-tags "${r}" "${ref_param[@]}"
|
||||||
|
echo "${@}" >&2
|
||||||
|
if "${@}"; then
|
||||||
|
if [[ ! ${is_branch} ]]; then
|
||||||
|
set -- git branch -f "${local_id}/__main__" \
|
||||||
|
"${ref[0]:-${remote_ref}}"
|
||||||
|
echo "${@}" >&2
|
||||||
|
if ! "${@}"; then
|
||||||
|
die "Creating branch for ${remote_ref} failed (wrong ref?)."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
success=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[[ ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI"
|
||||||
|
|
||||||
|
# recursively fetch submodules
|
||||||
|
if git cat-file -e "${local_ref}":.gitmodules &>/dev/null; then
|
||||||
|
local submodules
|
||||||
|
_git-r3_set_submodules \
|
||||||
|
"$(git cat-file -p "${local_ref}":.gitmodules || die)"
|
||||||
|
|
||||||
|
while [[ ${submodules[@]} ]]; do
|
||||||
|
local subname=${submodules[0]}
|
||||||
|
local url=${submodules[1]}
|
||||||
|
local path=${submodules[2]}
|
||||||
|
local commit=$(git rev-parse "${local_ref}:${path}")
|
||||||
|
|
||||||
|
if [[ ! ${commit} ]]; then
|
||||||
|
die "Unable to get commit id for submodule ${subname}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
git-r3_fetch "${url}" "${commit}" "${local_id}/${subname}"
|
||||||
|
|
||||||
|
submodules=( "${submodules[@]:3}" ) # shift
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: git-r3_checkout
|
||||||
|
# @USAGE: [<repo-uri> [<checkout-path> [<local-id>]]]
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Check the previously fetched tree to the working copy.
|
||||||
|
#
|
||||||
|
# <repo-uri> specifies the repository URIs, as a space-separated list.
|
||||||
|
# The first URI will be used as repository group identifier
|
||||||
|
# and therefore must be used consistently with git-r3_fetch.
|
||||||
|
# The remaining URIs are not used and therefore may be omitted.
|
||||||
|
# When not specified, defaults to ${EGIT_REPO_URI}.
|
||||||
|
#
|
||||||
|
# <checkout-path> specifies the path to place the checkout. It defaults
|
||||||
|
# to ${EGIT_CHECKOUT_DIR} if set, otherwise to ${WORKDIR}/${P}.
|
||||||
|
#
|
||||||
|
# <local-id> needs to specify the local identifier that was used
|
||||||
|
# for respective git-r3_fetch.
|
||||||
|
#
|
||||||
|
# The checkout operation will write to the working copy, and export
|
||||||
|
# the repository state into the environment. If the repository contains
|
||||||
|
# submodules, they will be checked out recursively.
|
||||||
|
git-r3_checkout() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
local repos=( ${1:-${EGIT_REPO_URI}} )
|
||||||
|
local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
|
||||||
|
local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
|
||||||
|
|
||||||
|
local -x GIT_DIR GIT_WORK_TREE
|
||||||
|
_git-r3_set_gitdir ${repos[0]}
|
||||||
|
GIT_WORK_TREE=${out_dir}
|
||||||
|
mkdir -p "${GIT_WORK_TREE}"
|
||||||
|
|
||||||
|
einfo "Checking out ${repos[0]} to ${out_dir} ..."
|
||||||
|
|
||||||
|
if ! git cat-file -e refs/heads/"${local_id}"/__main__
|
||||||
|
then
|
||||||
|
if [[ ${EVCS_OFFLINE} ]]; then
|
||||||
|
die "No local clone of ${repos[0]}. Unable to work with EVCS_OFFLINE."
|
||||||
|
else
|
||||||
|
die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -- git checkout -f "${local_id}"/__main__ .
|
||||||
|
echo "${@}" >&2
|
||||||
|
"${@}" || die "git checkout ${local_id}/__main__ failed"
|
||||||
|
|
||||||
|
# diff against previous revision (if any)
|
||||||
|
local new_commit_id=$(git rev-parse --verify "${local_id}"/__main__)
|
||||||
|
local old_commit_id=$(
|
||||||
|
git rev-parse --verify "${local_id}"/__old__ 2>/dev/null
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ ! ${old_commit_id} ]]; then
|
||||||
|
echo "GIT NEW branch -->"
|
||||||
|
echo " repository: ${repos[0]}"
|
||||||
|
echo " at the commit: ${new_commit_id}"
|
||||||
|
else
|
||||||
|
echo "GIT update -->"
|
||||||
|
echo " repository: ${repos[0]}"
|
||||||
|
# write out message based on the revisions
|
||||||
|
if [[ "${old_commit_id}" != "${new_commit_id}" ]]; then
|
||||||
|
echo " updating from commit: ${old_commit_id}"
|
||||||
|
echo " to commit: ${new_commit_id}"
|
||||||
|
|
||||||
|
git --no-pager diff --stat \
|
||||||
|
${old_commit_id}..${new_commit_id}
|
||||||
|
else
|
||||||
|
echo " at the commit: ${new_commit_id}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
git branch -f "${local_id}"/{__old__,__main__} || die
|
||||||
|
|
||||||
|
# recursively checkout submodules
|
||||||
|
if [[ -f ${GIT_WORK_TREE}/.gitmodules ]]; then
|
||||||
|
local submodules
|
||||||
|
_git-r3_set_submodules \
|
||||||
|
"$(<"${GIT_WORK_TREE}"/.gitmodules)"
|
||||||
|
|
||||||
|
while [[ ${submodules[@]} ]]; do
|
||||||
|
local subname=${submodules[0]}
|
||||||
|
local url=${submodules[1]}
|
||||||
|
local path=${submodules[2]}
|
||||||
|
|
||||||
|
git-r3_checkout "${url}" "${GIT_WORK_TREE}/${path}" \
|
||||||
|
"${local_id}/${subname}"
|
||||||
|
|
||||||
|
submodules=( "${submodules[@]:3}" ) # shift
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# keep this *after* submodules
|
||||||
|
export EGIT_DIR=${GIT_DIR}
|
||||||
|
export EGIT_VERSION=${new_commit_id}
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: git-r3_peek_remote_ref
|
||||||
|
# @USAGE: [<repo-uri> [<remote-ref>]]
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Peek the reference in the remote repository and print the matching
|
||||||
|
# (newest) commit SHA1.
|
||||||
|
#
|
||||||
|
# <repo-uri> specifies the repository URIs to fetch from, as a space-
|
||||||
|
# -separated list. When not specified, defaults to ${EGIT_REPO_URI}.
|
||||||
|
#
|
||||||
|
# <remote-ref> specifies the remote ref to peek. It is preferred to use
|
||||||
|
# 'refs/heads/<branch-name>' for branches and 'refs/tags/<tag-name>'
|
||||||
|
# for tags. Alternatively, 'HEAD' may be used for upstream default
|
||||||
|
# branch. Defaults to the first of EGIT_COMMIT, EGIT_BRANCH or literal
|
||||||
|
# 'HEAD' that is set to a non-null value.
|
||||||
|
#
|
||||||
|
# The operation will be done purely on the remote, without using local
|
||||||
|
# storage. If commit SHA1 is provided as <remote-ref>, the function will
|
||||||
|
# fail due to limitations of git protocol.
|
||||||
|
#
|
||||||
|
# On success, the function returns 0 and writes hexadecimal commit SHA1
|
||||||
|
# to stdout. On failure, the function returns 1.
|
||||||
|
git-r3_peek_remote_ref() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
local repos=( ${1:-${EGIT_REPO_URI}} )
|
||||||
|
local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
|
||||||
|
local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
|
||||||
|
|
||||||
|
[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
|
||||||
|
|
||||||
|
local r success
|
||||||
|
for r in ${repos[@]}; do
|
||||||
|
einfo "Peeking ${remote_ref} on ${r} ..." >&2
|
||||||
|
|
||||||
|
local is_branch lookup_ref
|
||||||
|
if [[ ${remote_ref} == refs/heads/* || ${remote_ref} == HEAD ]]
|
||||||
|
then
|
||||||
|
is_branch=1
|
||||||
|
lookup_ref=${remote_ref}
|
||||||
|
else
|
||||||
|
# ls-remote by commit is going to fail anyway,
|
||||||
|
# so we may as well pass refs/tags/ABCDEF...
|
||||||
|
lookup_ref=refs/tags/${remote_ref}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# split on whitespace
|
||||||
|
local ref=(
|
||||||
|
$(git ls-remote "${r}" "${lookup_ref}")
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ ${ref[0]} ]]; then
|
||||||
|
echo "${ref[0]}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
git-r3_src_fetch() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
[[ ${EVCS_OFFLINE} ]] && return
|
||||||
|
|
||||||
|
if [[ ! ${EGIT3_STORE_DIR} && ${EGIT_STORE_DIR} ]]; then
|
||||||
|
ewarn "You have set EGIT_STORE_DIR but not EGIT3_STORE_DIR. Please consider"
|
||||||
|
ewarn "setting EGIT3_STORE_DIR for git-r3.eclass. It is recommended to use"
|
||||||
|
ewarn "a different directory than EGIT_STORE_DIR to ease removing old clones"
|
||||||
|
ewarn "when git-2 eclass becomes deprecated."
|
||||||
|
fi
|
||||||
|
|
||||||
|
_git-r3_env_setup
|
||||||
|
git-r3_fetch
|
||||||
|
}
|
||||||
|
|
||||||
|
git-r3_src_unpack() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
_git-r3_env_setup
|
||||||
|
git-r3_src_fetch
|
||||||
|
git-r3_checkout
|
||||||
|
}
|
||||||
|
|
||||||
|
# https://bugs.gentoo.org/show_bug.cgi?id=482666
|
||||||
|
git-r3_pkg_outofdate() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
|
local new_commit_id=$(git-r3_peek_remote_ref)
|
||||||
|
ewarn "old: ${EGIT_VERSION}"
|
||||||
|
ewarn "new: ${new_commit_id}"
|
||||||
|
[[ ${new_commit_id} && ${old_commit_id} ]] || return 2
|
||||||
|
|
||||||
|
[[ ${EGIT_VERSION} != ${new_commit_id} ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
_GIT_R3=1
|
||||||
|
fi
|
@ -1,10 +1,12 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.60 2013/01/15 11:23:43 jlec Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.62 2013/08/02 15:41:17 mgorny Exp $
|
||||||
|
|
||||||
# @DEPRECATED
|
# @DEAD
|
||||||
# This eclass has been superseded by git-2 eclass.
|
# Michał Górny <mgorny@gentoo.org> (2 Aug 2013)
|
||||||
# Please modify your ebuilds to use that one instead.
|
# This eclass has been superseded by git-2 eclass and will be removed
|
||||||
|
# on 2013-09-02. Please modify your ebuilds to use git-2 instead.
|
||||||
|
# Bug #479474.
|
||||||
|
|
||||||
# @ECLASS: git.eclass
|
# @ECLASS: git.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.55 2012/09/15 16:16:53 zmedico Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.56 2013/08/02 17:38:57 george Exp $
|
||||||
#
|
#
|
||||||
# Author: George Shapovalov <george@gentoo.org>
|
# Author: George Shapovalov <george@gentoo.org>
|
||||||
# Belongs to: ada herd <ada@gentoo.org>
|
# Belongs to: ada herd <ada@gentoo.org>
|
||||||
@ -337,9 +337,16 @@ gnatbuild_src_unpack() {
|
|||||||
|
|
||||||
cd "${S}"
|
cd "${S}"
|
||||||
# patching gcc sources, following the toolchain
|
# patching gcc sources, following the toolchain
|
||||||
if [[ -d "${FILESDIR}"/${SLOT} ]] ; then
|
# first, the common patches
|
||||||
EPATCH_MULTI_MSG="Applying Gentoo patches ..." \
|
if [[ -d "${FILESDIR}"/patches ]] && [[ ! -z $(ls "${FILESDIR}"/patches/*.patch 2>/dev/null) ]] ; then
|
||||||
epatch "${FILESDIR}"/${SLOT}/*.patch
|
EPATCH_MULTI_MSG="Applying common Gentoo patches ..." \
|
||||||
|
epatch "${FILESDIR}"/patches/*.patch
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
# then per SLOT
|
||||||
|
if [[ -d "${FILESDIR}"/patches/${SLOT} ]] && [[ ! -z $(ls "${FILESDIR}"/patches/${SLOT}/*.patch 2>/dev/null) ]] ; then
|
||||||
|
EPATCH_MULTI_MSG="Applying SLOT-specific Gentoo patches ..." \
|
||||||
|
epatch "${FILESDIR}"/patches/${SLOT}/*.patch
|
||||||
fi
|
fi
|
||||||
# Replacing obsolete head/tail with POSIX compliant ones
|
# Replacing obsolete head/tail with POSIX compliant ones
|
||||||
ht_fix_file */configure
|
ht_fix_file */configure
|
||||||
|
116
sdk_container/src/third_party/portage-stable/eclass/gnome-games.eclass
vendored
Normal file
116
sdk_container/src/third_party/portage-stable/eclass/gnome-games.eclass
vendored
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
# 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 $
|
||||||
|
|
||||||
|
# @ECLASS: gnome-games
|
||||||
|
# @MAINTAINER:
|
||||||
|
# Gnome team <gnome@gentoo.org>
|
||||||
|
# @AUTHOR:
|
||||||
|
# Author: Pacho Ramos <pacho@gentoo.org>
|
||||||
|
# @BLURB: An eclass to build gnome-games.
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# An eclass to build gnome-games using proper phases from gnome2 and
|
||||||
|
# games eclasses.
|
||||||
|
|
||||||
|
case "${EAPI:-0}" in
|
||||||
|
0|1)
|
||||||
|
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
|
||||||
|
;;
|
||||||
|
2|3|4|5)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
inherit autotools games gnome2
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
|
||||||
|
|
||||||
|
if [[ ! ${_GNOME_GAMES} ]]; then
|
||||||
|
|
||||||
|
DEPEND=">=dev-util/intltool-0.50.2-r1"
|
||||||
|
RDEPEND="!gnome-extra/gnome-games"
|
||||||
|
|
||||||
|
# @FUNCTION: gnome-games_pkg_setup
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Set proper phase defaults
|
||||||
|
gnome-games_pkg_setup() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
games_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: gnome-games_src_prepare
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Set proper phase defaults
|
||||||
|
gnome-games_src_prepare() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
# Fix intltoolize broken file:
|
||||||
|
# https://bugs.launchpad.net/intltool/+bug/398571
|
||||||
|
intltoolize --force --copy --automake || die "intltoolize failed"
|
||||||
|
eautoreconf
|
||||||
|
|
||||||
|
gnome2_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: gnome-games_src_configure
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Set proper phase defaults, relying on gnome2_src_configure
|
||||||
|
# and passing extra arguments from egamesconf (games.eclass)
|
||||||
|
gnome-games_src_configure() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
gnome2_src_configure \
|
||||||
|
--prefix="${GAMES_PREFIX}" \
|
||||||
|
--libdir="$(games_get_libdir)" \
|
||||||
|
--sysconfdir="${GAMES_SYSCONFDIR}" \
|
||||||
|
--localstatedir=/var \
|
||||||
|
--localedir=/usr/share/locale \
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: gnome-games_src_compile
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Set proper phase defaults
|
||||||
|
gnome-games_src_compile() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
gnome2_src_compile
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: gnome-games_src_install
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Set proper phase defaults
|
||||||
|
gnome-games_src_install() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
gnome2_src_install
|
||||||
|
prepgamesdirs
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: gnome-games_pkg_preinst
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Set proper phase defaults
|
||||||
|
gnome-games_pkg_preinst() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
gnome2_pkg_preinst
|
||||||
|
games_pkg_preinst
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: gnome-games_pkg_preinst
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Set proper phase defaults
|
||||||
|
gnome-games_pkg_postinst() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
gnome2_pkg_postinst
|
||||||
|
games_pkg_postinst
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: gnome-games_pkg_postrm
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Set proper phase defaults
|
||||||
|
gnome-games_pkg_postrm() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
gnome2_pkg_postrm
|
||||||
|
}
|
||||||
|
|
||||||
|
_GNOME_GAMES=1
|
||||||
|
fi
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.31 2012/10/27 22:24:10 tetromino Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.33 2013/09/15 19:29:11 pacho Exp $
|
||||||
|
|
||||||
# @ECLASS: gnome2-utils.eclass
|
# @ECLASS: gnome2-utils.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -15,6 +15,8 @@
|
|||||||
# * GConf schemas management
|
# * GConf schemas management
|
||||||
# * scrollkeeper (old Gnome help system) management
|
# * scrollkeeper (old Gnome help system) management
|
||||||
|
|
||||||
|
inherit multilib
|
||||||
|
|
||||||
case "${EAPI:-0}" in
|
case "${EAPI:-0}" in
|
||||||
0|1|2|3|4|5) ;;
|
0|1|2|3|4|5) ;;
|
||||||
*) die "EAPI=${EAPI} is not supported" ;;
|
*) die "EAPI=${EAPI} is not supported" ;;
|
||||||
@ -50,6 +52,12 @@ esac
|
|||||||
# Path to glib-compile-schemas
|
# Path to glib-compile-schemas
|
||||||
: ${GLIB_COMPILE_SCHEMAS:="/usr/bin/glib-compile-schemas"}
|
: ${GLIB_COMPILE_SCHEMAS:="/usr/bin/glib-compile-schemas"}
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: GDK_PIXBUF_UPDATE_BIN
|
||||||
|
# @INTERNAL
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Path to gdk-pixbuf-query-loaders
|
||||||
|
: ${GDK_PIXBUF_UPDATE_BIN:="/usr/bin/gdk-pixbuf-query-loaders"}
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: GNOME2_ECLASS_SCHEMAS
|
# @ECLASS-VARIABLE: GNOME2_ECLASS_SCHEMAS
|
||||||
# @INTERNAL
|
# @INTERNAL
|
||||||
# @DEFAULT_UNSET
|
# @DEFAULT_UNSET
|
||||||
@ -74,6 +82,12 @@ esac
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# List of GSettings schemas provided by the package
|
# List of GSettings schemas provided by the package
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: GNOME2_ECLASS_GDK_PIXBUF_LOADERS
|
||||||
|
# @INTERNAL
|
||||||
|
# @DEFAULT_UNSET
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# List of gdk-pixbuf loaders provided by the package
|
||||||
|
|
||||||
DEPEND=">=sys-apps/sed-4"
|
DEPEND=">=sys-apps/sed-4"
|
||||||
|
|
||||||
|
|
||||||
@ -387,11 +401,54 @@ gnome2_schemas_update() {
|
|||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: gnome2_gdk_pixbuf_savelist
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Find if there is any gdk-pixbuf loader to install and save the list in
|
||||||
|
# GNOME2_ECLASS_GDK_PIXBUF_LOADERS variable.
|
||||||
|
# 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
|
||||||
|
export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find "usr/$(get_libdir)/gdk-pixbuf-2.0" -type f 2>/dev/null)
|
||||||
|
popd 1>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: gnome2_gdk_pixbuf_update
|
||||||
|
# @USAGE: gnome2_gdk_pixbuf_update
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Updates gdk-pixbuf loader cache if GNOME2_ECLASS_GDK_PIXBUF_LOADERS has some.
|
||||||
|
# This function should be called from pkg_postinst and pkg_postrm.
|
||||||
|
gnome2_gdk_pixbuf_update() {
|
||||||
|
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
|
||||||
|
local updater="${EROOT}${GDK_PIXBUF_UPDATE_BIN}"
|
||||||
|
|
||||||
|
if [[ ! -x ${updater} ]]; then
|
||||||
|
debug-print "${updater} is not executable"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z ${GNOME2_ECLASS_GDK_PIXBUF_LOADERS} ]]; then
|
||||||
|
debug-print "gdk-pixbuf loader cache does not need an update"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
ebegin "Updating gdk-pixbuf loader cache"
|
||||||
|
local tmp_file=$(mktemp -t tmp.XXXXXXXXXX_gdkpixbuf)
|
||||||
|
${updater} 1> "${tmp_file}" &&
|
||||||
|
chmod 0644 "${tmp_file}" &&
|
||||||
|
mv -f "${tmp_file}" "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache"
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# @FUNCTION: gnome2_query_immodules_gtk2
|
# @FUNCTION: gnome2_query_immodules_gtk2
|
||||||
# @USAGE: gnome2_query_immodules_gtk2
|
# @USAGE: gnome2_query_immodules_gtk2
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Updates gtk2 immodules/gdk-pixbuf loaders listing.
|
# Updates gtk2 immodules/gdk-pixbuf loaders listing.
|
||||||
gnome2_query_immodules_gtk2() {
|
gnome2_query_immodules_gtk2() {
|
||||||
|
if has_version ">=x11-libs/gtk+-2.24.20:2"; then
|
||||||
|
"${EPREFIX}/usr/bin/gtk-query-immodules-2.0" --update-cache
|
||||||
|
else
|
||||||
local GTK2_CONFDIR="/etc/gtk-2.0/$(get_abi_CHOST)"
|
local GTK2_CONFDIR="/etc/gtk-2.0/$(get_abi_CHOST)"
|
||||||
|
|
||||||
local query_exec="${EPREFIX}/usr/bin/gtk-query-immodules-2.0"
|
local query_exec="${EPREFIX}/usr/bin/gtk-query-immodules-2.0"
|
||||||
@ -415,6 +472,7 @@ gnome2_query_immodules_gtk2() {
|
|||||||
ewarn "Cannot update gtk.immodules, file generation failed"
|
ewarn "Cannot update gtk.immodules, file generation failed"
|
||||||
fi
|
fi
|
||||||
rm "${tmp_file}"
|
rm "${tmp_file}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: gnome2_query_immodules_gtk3
|
# @FUNCTION: gnome2_query_immodules_gtk3
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.120 2013/01/16 23:01:02 eva Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.123 2013/09/03 21:54:38 eva Exp $
|
||||||
|
|
||||||
# @ECLASS: gnome2.eclass
|
# @ECLASS: gnome2.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -122,7 +122,7 @@ gnome2_src_configure() {
|
|||||||
# Remember to drop 'doc' USE flag from your package if it was only used to
|
# Remember to drop 'doc' USE flag from your package if it was only used to
|
||||||
# rebuild docs.
|
# rebuild docs.
|
||||||
# Preserve old behavior for older EAPI.
|
# Preserve old behavior for older EAPI.
|
||||||
if grep -q "enable-gtk-doc" ${ECONF_SOURCE:-.}/configure ; then
|
if grep -q "enable-gtk-doc" "${ECONF_SOURCE:-.}"/configure ; then
|
||||||
if has ${EAPI:-0} 0 1 2 3 4 && in_iuse doc ; then
|
if has ${EAPI:-0} 0 1 2 3 4 && in_iuse doc ; then
|
||||||
G2CONF="$(use_enable doc gtk-doc) ${G2CONF}"
|
G2CONF="$(use_enable doc gtk-doc) ${G2CONF}"
|
||||||
else
|
else
|
||||||
@ -132,32 +132,37 @@ gnome2_src_configure() {
|
|||||||
|
|
||||||
# Pass --disable-maintainer-mode when needed
|
# Pass --disable-maintainer-mode when needed
|
||||||
if grep -q "^[[:space:]]*AM_MAINTAINER_MODE(\[enable\])" \
|
if grep -q "^[[:space:]]*AM_MAINTAINER_MODE(\[enable\])" \
|
||||||
${ECONF_SOURCE:-.}/configure.*; then
|
"${ECONF_SOURCE:-.}"/configure.*; then
|
||||||
G2CONF="--disable-maintainer-mode ${G2CONF}"
|
G2CONF="--disable-maintainer-mode ${G2CONF}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pass --disable-scrollkeeper when possible
|
# Pass --disable-scrollkeeper when possible
|
||||||
if grep -q "disable-scrollkeeper" ${ECONF_SOURCE:-.}/configure; then
|
if grep -q "disable-scrollkeeper" "${ECONF_SOURCE:-.}"/configure; then
|
||||||
G2CONF="--disable-scrollkeeper ${G2CONF}"
|
G2CONF="--disable-scrollkeeper ${G2CONF}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pass --disable-silent-rules when possible (not needed for eapi5), bug #429308
|
# Pass --disable-silent-rules when possible (not needed for eapi5), bug #429308
|
||||||
if has ${EAPI:-0} 0 1 2 3 4; then
|
if has ${EAPI:-0} 0 1 2 3 4; then
|
||||||
if grep -q "disable-silent-rules" ${ECONF_SOURCE:-.}/configure; then
|
if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then
|
||||||
G2CONF="--disable-silent-rules ${G2CONF}"
|
G2CONF="--disable-silent-rules ${G2CONF}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pass --disable-schemas-install when possible
|
# Pass --disable-schemas-install when possible
|
||||||
if grep -q "disable-schemas-install" ${ECONF_SOURCE:-.}/configure; then
|
if grep -q "disable-schemas-install" "${ECONF_SOURCE:-.}"/configure; then
|
||||||
G2CONF="--disable-schemas-install ${G2CONF}"
|
G2CONF="--disable-schemas-install ${G2CONF}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pass --disable-schemas-compile when possible
|
# Pass --disable-schemas-compile when possible
|
||||||
if grep -q "disable-schemas-compile" ${ECONF_SOURCE:-.}/configure; then
|
if grep -q "disable-schemas-compile" "${ECONF_SOURCE:-.}"/configure; then
|
||||||
G2CONF="--disable-schemas-compile ${G2CONF}"
|
G2CONF="--disable-schemas-compile ${G2CONF}"
|
||||||
fi
|
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}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
|
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
|
||||||
addwrite "$(unset HOME; echo ~)/.gnome2"
|
addwrite "$(unset HOME; echo ~)/.gnome2"
|
||||||
|
|
||||||
@ -253,6 +258,7 @@ gnome2_pkg_preinst() {
|
|||||||
gnome2_icon_savelist
|
gnome2_icon_savelist
|
||||||
gnome2_schemas_savelist
|
gnome2_schemas_savelist
|
||||||
gnome2_scrollkeeper_savelist
|
gnome2_scrollkeeper_savelist
|
||||||
|
gnome2_gdk_pixbuf_savelist
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: gnome2_pkg_postinst
|
# @FUNCTION: gnome2_pkg_postinst
|
||||||
@ -266,6 +272,7 @@ gnome2_pkg_postinst() {
|
|||||||
gnome2_icon_cache_update
|
gnome2_icon_cache_update
|
||||||
gnome2_schemas_update
|
gnome2_schemas_update
|
||||||
gnome2_scrollkeeper_update
|
gnome2_scrollkeeper_update
|
||||||
|
gnome2_gdk_pixbuf_update
|
||||||
}
|
}
|
||||||
|
|
||||||
# # FIXME Handle GConf schemas removal
|
# # FIXME Handle GConf schemas removal
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/go-mono.eclass,v 1.14 2012/05/02 18:31:42 jdhore Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/go-mono.eclass,v 1.15 2013/07/27 16:18:00 pacho Exp $
|
||||||
|
|
||||||
# @ECLASS: go-mono.eclass
|
# @ECLASS: go-mono.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -60,7 +60,7 @@ fi
|
|||||||
|
|
||||||
if ! has "${CATEGORY}/${PN}" "${NO_MONO_DEPEND[@]}"
|
if ! has "${CATEGORY}/${PN}" "${NO_MONO_DEPEND[@]}"
|
||||||
then
|
then
|
||||||
RDEPEND="=dev-lang/mono-${GO_MONO_REL_PV}*"
|
RDEPEND=">=dev-lang/mono-${GO_MONO_REL_PV}"
|
||||||
DEPEND="${RDEPEND}"
|
DEPEND="${RDEPEND}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins.eclass,v 1.35 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
||||||
|
|
||||||
PVP=(${PV//[-\._]/ })
|
|
||||||
PV_MAJ_MIN=${PVP[0]}.${PVP[1]}
|
|
||||||
SLOT=${PV_MAJ_MIN}
|
|
||||||
|
|
||||||
gst-plugins_pkg_postrm() {
|
|
||||||
gst-register-${SLOT}
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_FUNCTIONS pkg_postrm
|
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/gtk-sharp-component.eclass,v 1.31 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.38 2013/01/06 13:06:35 slyfox Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.41 2013/07/29 12:31:35 slyfox Exp $
|
||||||
|
|
||||||
# @ECLASS: haskell-cabal.eclass
|
# @ECLASS: haskell-cabal.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -33,25 +33,25 @@
|
|||||||
# on cabal, but still use this eclass (e.g. haskell-updater).
|
# on cabal, but still use this eclass (e.g. haskell-updater).
|
||||||
# test-suite -- add support for cabal test-suites (introduced in Cabal-1.8)
|
# test-suite -- add support for cabal test-suites (introduced in Cabal-1.8)
|
||||||
|
|
||||||
inherit ghc-package multilib
|
inherit eutils ghc-package multilib
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: CABAL_EXTRA_CONFIGURE_FLAGS
|
# @ECLASS-VARIABLE: CABAL_EXTRA_CONFIGURE_FLAGS
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# User-specified additional parameters passed to 'setup configure'.
|
# User-specified additional parameters passed to 'setup configure'.
|
||||||
# example: /etc/make.conf: CABAL_EXTRA_CONFIGURE_FLAGS=--enable-shared
|
# example: /etc/portage/make.conf: CABAL_EXTRA_CONFIGURE_FLAGS=--enable-shared
|
||||||
: ${CABAL_EXTRA_CONFIGURE_FLAGS:=}
|
: ${CABAL_EXTRA_CONFIGURE_FLAGS:=}
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: CABAL_EXTRA_BUILD_FLAGS
|
# @ECLASS-VARIABLE: CABAL_EXTRA_BUILD_FLAGS
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# User-specified additional parameters passed to 'setup build'.
|
# User-specified additional parameters passed to 'setup build'.
|
||||||
# example: /etc/make.conf: CABAL_EXTRA_BUILD_FLAGS=-v
|
# example: /etc/portage/make.conf: CABAL_EXTRA_BUILD_FLAGS=-v
|
||||||
: ${CABAL_EXTRA_BUILD_FLAGS:=}
|
: ${CABAL_EXTRA_BUILD_FLAGS:=}
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: GHC_BOOTSTRAP_FLAGS
|
# @ECLASS-VARIABLE: GHC_BOOTSTRAP_FLAGS
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# User-specified additional parameters for ghc when building
|
# User-specified additional parameters for ghc when building
|
||||||
# _only_ 'setup' binary bootstrap.
|
# _only_ 'setup' binary bootstrap.
|
||||||
# example: /etc/make.conf: GHC_BOOTSTRAP_FLAGS=-dynamic to make
|
# example: /etc/portage/make.conf: GHC_BOOTSTRAP_FLAGS=-dynamic to make
|
||||||
# linking 'setup' faster.
|
# linking 'setup' faster.
|
||||||
: ${GHC_BOOTSTRAP_FLAGS:=}
|
: ${GHC_BOOTSTRAP_FLAGS:=}
|
||||||
|
|
||||||
@ -242,6 +242,37 @@ cabal-hscolour-haddock() {
|
|||||||
./setup "$@" --hyperlink-source || die "setup haddock --hyperlink-source failed"
|
./setup "$@" --hyperlink-source || die "setup haddock --hyperlink-source failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cabal-die-if-nonempty() {
|
||||||
|
local breakage_type=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
[[ "${#@}" == 0 ]] && return 0
|
||||||
|
eerror "Detected ${breakage_type} packages: ${@}"
|
||||||
|
die "//==-- Please, run 'haskell-updater' to fix ${breakage_type} packages --==//"
|
||||||
|
}
|
||||||
|
|
||||||
|
cabal-show-brokens() {
|
||||||
|
# pretty-printer
|
||||||
|
$(ghc-getghcpkg) check 2>&1 \
|
||||||
|
| egrep -v '^Warning: haddock-(html|interfaces): ' \
|
||||||
|
| egrep -v '^Warning: include-dirs: '
|
||||||
|
|
||||||
|
cabal-die-if-nonempty 'broken' \
|
||||||
|
$($(ghc-getghcpkg) check --simple-output)
|
||||||
|
}
|
||||||
|
|
||||||
|
cabal-show-old() {
|
||||||
|
cabal-die-if-nonempty 'outdated' \
|
||||||
|
$("${EPREFIX}"/usr/sbin/haskell-updater --quiet --upgrade --list-only)
|
||||||
|
}
|
||||||
|
|
||||||
|
cabal-show-brokens-and-die() {
|
||||||
|
cabal-show-brokens
|
||||||
|
cabal-show-old
|
||||||
|
|
||||||
|
die "$@"
|
||||||
|
}
|
||||||
|
|
||||||
cabal-configure() {
|
cabal-configure() {
|
||||||
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
|
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
|
||||||
|
|
||||||
@ -306,7 +337,7 @@ cabal-configure() {
|
|||||||
|
|
||||||
if $(ghc-supports-shared-libraries); then
|
if $(ghc-supports-shared-libraries); then
|
||||||
# maybe a bit lower
|
# maybe a bit lower
|
||||||
if version_is_at_least "7.7.20121114" "$(ghc-version)"; then
|
if $(ghc-supports-dynamic-by-default); then
|
||||||
cabalconf="${cabalconf} --enable-shared"
|
cabalconf="${cabalconf} --enable-shared"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -325,7 +356,7 @@ cabal-configure() {
|
|||||||
${CABAL_EXTRA_CONFIGURE_FLAGS} \
|
${CABAL_EXTRA_CONFIGURE_FLAGS} \
|
||||||
"$@"
|
"$@"
|
||||||
echo ./setup "$@"
|
echo ./setup "$@"
|
||||||
./setup "$@" || die "setup configure failed"
|
./setup "$@" || cabal-show-brokens-and-die "setup configure failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
cabal-build() {
|
cabal-build() {
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/iiimf.eclass,v 1.16 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/intel-sdp.eclass,v 1.9 2013/01/23 11:14:33 jlec Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/intel-sdp.eclass,v 1.14 2013/07/29 09:50:09 jlec Exp $
|
||||||
|
|
||||||
# @ECLASS: intel-sdp.eclass
|
# @ECLASS: intel-sdp.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -41,17 +41,34 @@
|
|||||||
#
|
#
|
||||||
# Must be defined before inheriting the eclass
|
# 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
|
||||||
|
# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
|
||||||
|
#
|
||||||
|
# e.g. tar.gz
|
||||||
|
#
|
||||||
|
# Must be defined before inheriting the eclass
|
||||||
|
: ${INTEL_TARX:=tgz}
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: INTEL_SUBDIR
|
# @ECLASS-VARIABLE: INTEL_SUBDIR
|
||||||
# @DEFAULT_UNSET
|
# @DEFAULT_UNSET
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# The package sub-directory where it will end-up in /opt/intel
|
# The package sub-directory where it will end-up in /opt/intel
|
||||||
# To find out its value, you have to do a raw install from the Intel tar ball
|
# To find out its value, you have to do a raw install from the Intel tar ball
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: INTEL_RPMS_DIRS
|
# @ECLASS-VARIABLE: INTEL_SKIP_LICENSE
|
||||||
|
# @DEFAULT_UNSET
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# List of subdirectories in the main archive which contains the
|
# Possibility to skip the mandatory check for licenses. Only set this if there
|
||||||
# rpms to extract.
|
# is really no fix.
|
||||||
: ${INTEL_RPMS_DIRS:=rpm}
|
|
||||||
|
# @ECLASS-VARIABLE: INTEL_RPMS_DIR
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Main subdirectory which contains the rpms to extract.
|
||||||
|
: ${INTEL_RPMS_DIR:=rpm}
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: INTEL_X86
|
# @ECLASS-VARIABLE: INTEL_X86
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -66,6 +83,11 @@
|
|||||||
# Functional name of rpm without any version/arch tag
|
# Functional name of rpm without any version/arch tag
|
||||||
#
|
#
|
||||||
# e.g. compilerprof
|
# e.g. compilerprof
|
||||||
|
#
|
||||||
|
# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
|
||||||
|
# specify the full path
|
||||||
|
#
|
||||||
|
# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: INTEL_DAT_RPMS
|
# @ECLASS-VARIABLE: INTEL_DAT_RPMS
|
||||||
# @DEFAULT_UNSET
|
# @DEFAULT_UNSET
|
||||||
@ -74,6 +96,16 @@
|
|||||||
# without any version tag
|
# without any version tag
|
||||||
#
|
#
|
||||||
# e.g. openmp
|
# e.g. openmp
|
||||||
|
#
|
||||||
|
# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
|
||||||
|
# specify the full path
|
||||||
|
#
|
||||||
|
# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: INTEL_SINGLE_ARCH
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Unset, if only the multilib package will be provided by intel
|
||||||
|
: ${INTEL_SINGLE_ARCH:=true}
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: INTEL_SDP_DB
|
# @ECLASS-VARIABLE: INTEL_SDP_DB
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -88,17 +120,20 @@ _INTEL_PV3=$(get_version_component_range 3)
|
|||||||
_INTEL_PV4=$(get_version_component_range 4)
|
_INTEL_PV4=$(get_version_component_range 4)
|
||||||
_INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
|
_INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
|
||||||
|
|
||||||
SRC_URI="
|
if [ ${INTEL_SINGLE_ARCH} == true ]; then
|
||||||
amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.tgz ) )
|
SRC_URI="
|
||||||
amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.tgz ) )
|
amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX} ) )
|
||||||
x86? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.tgz )"
|
amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} ) )
|
||||||
|
x86? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )"
|
||||||
|
else
|
||||||
|
SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}"
|
||||||
|
fi
|
||||||
|
|
||||||
LICENSE="Intel-SDP"
|
LICENSE="Intel-SDP"
|
||||||
# Future work, #394411
|
# Future work, #394411
|
||||||
#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
|
#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
IUSE="examples multilib"
|
IUSE="examples multilib"
|
||||||
KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
|
|
||||||
|
|
||||||
RESTRICT="mirror"
|
RESTRICT="mirror"
|
||||||
|
|
||||||
@ -239,6 +274,7 @@ _isdp_version_test() {
|
|||||||
# @INTERNAL
|
# @INTERNAL
|
||||||
# Test if installed compiler is working
|
# Test if installed compiler is working
|
||||||
_isdp_run-test() {
|
_isdp_run-test() {
|
||||||
|
if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
|
||||||
case ${PN} in
|
case ${PN} in
|
||||||
ifc | icc )
|
ifc | icc )
|
||||||
_isdp_version_test ;;
|
_isdp_version_test ;;
|
||||||
@ -246,6 +282,7 @@ _isdp_run-test() {
|
|||||||
debug-print "No test available for ${PN}"
|
debug-print "No test available for ${PN}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: intel-sdp_pkg_pretend
|
# @FUNCTION: intel-sdp_pkg_pretend
|
||||||
@ -260,6 +297,7 @@ intel-sdp_pkg_pretend() {
|
|||||||
: ${CHECKREQS_DISK_BUILD:=256M}
|
: ${CHECKREQS_DISK_BUILD:=256M}
|
||||||
check-reqs_pkg_pretend
|
check-reqs_pkg_pretend
|
||||||
|
|
||||||
|
if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
|
||||||
if echo ${INTEL_LICENSE_FILE} | grep -q @; then
|
if echo ${INTEL_LICENSE_FILE} | grep -q @; then
|
||||||
einfo "Looks like you are using following license server:"
|
einfo "Looks like you are using following license server:"
|
||||||
einfo " ${INTEL_LICENSE_FILE}"
|
einfo " ${INTEL_LICENSE_FILE}"
|
||||||
@ -285,6 +323,10 @@ intel-sdp_pkg_pretend() {
|
|||||||
_isdp_big-warning pre-check
|
_isdp_big-warning pre-check
|
||||||
die "Could not find license file"
|
die "Could not find license file"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
eqawarn "The ebuild doesn't check for a license!"
|
||||||
|
eqawarn "This shouldn't be done unless there is a serious reason."
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: intel-sdp_pkg_setup
|
# @FUNCTION: intel-sdp_pkg_setup
|
||||||
@ -304,14 +346,23 @@ intel-sdp_pkg_setup() {
|
|||||||
INTEL_ARCH="intel64 ia32"
|
INTEL_ARCH="intel64 ia32"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
INTEL_RPMS=""
|
INTEL_RPMS=()
|
||||||
|
INTEL_RPMS_FULL=()
|
||||||
for p in ${INTEL_BIN_RPMS}; do
|
for p in ${INTEL_BIN_RPMS}; do
|
||||||
for a in ${arch}; do
|
for a in ${arch}; do
|
||||||
INTEL_RPMS+=" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm"
|
if [ ${p} == $(basename ${p}) ]; then
|
||||||
|
INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
|
||||||
|
else
|
||||||
|
INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
for p in ${INTEL_DAT_RPMS}; do
|
for p in ${INTEL_DAT_RPMS}; do
|
||||||
INTEL_RPMS+=" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm"
|
if [ ${p} == $(basename ${p}) ]; then
|
||||||
|
INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )
|
||||||
|
else
|
||||||
|
INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
case "${EAPI:-0}" in
|
case "${EAPI:-0}" in
|
||||||
@ -323,22 +374,31 @@ intel-sdp_pkg_setup() {
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Unpacking necessary rpms from tarball, extract them and rearrange the output.
|
# Unpacking necessary rpms from tarball, extract them and rearrange the output.
|
||||||
intel-sdp_src_unpack() {
|
intel-sdp_src_unpack() {
|
||||||
local l r subdir rb t list=()
|
local l r subdir rb t list=() debug_list
|
||||||
|
|
||||||
for t in ${A}; do
|
for t in ${A}; do
|
||||||
for r in ${INTEL_RPMS}; do
|
for r in ${INTEL_RPMS[@]}; do
|
||||||
for subdir in ${INTEL_RPMS_DIRS}; do
|
rpmdir=${t%%.*}/${INTEL_RPMS_DIR}
|
||||||
rpmdir=${t%%.*}/${subdir}
|
list+=( ${rpmdir}/${r} )
|
||||||
list+=( ${rpmdir}/${r})
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for r in ${INTEL_RPMS_FULL[@]}; do
|
||||||
|
list+=( ${t%%.*}/${r} )
|
||||||
done
|
done
|
||||||
tar xf "${DISTDIR}"/${t} ${list[@]} 2> /dev/null || die
|
|
||||||
|
debug_list="$(IFS=$'\n'; echo ${list[@]} )"
|
||||||
|
|
||||||
|
debug-print "Adding to decompression list:"
|
||||||
|
debug-print ${debug_list}
|
||||||
|
|
||||||
|
tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log
|
||||||
|
|
||||||
for r in ${list[@]}; do
|
for r in ${list[@]}; do
|
||||||
rb=$(basename ${r})
|
rb=$(basename ${r})
|
||||||
l=.${rb}_$(date +'%d%m%y_%H%M%S').log
|
l=.${rb}_$(date +'%d%m%y_%H%M%S').log
|
||||||
einfo "Unpacking ${rb}"
|
einfo "Unpacking ${rb}"
|
||||||
rpm2tar -O ${r} | tar xvf - | sed -e \
|
rpm2tar -O ${r} | tar xvf - | sed -e \
|
||||||
"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
|
"s:^\.:${EROOT#/}:g" > ${l}; assert "unpacking ${r} failed"
|
||||||
mv ${l} opt/intel/ || die "failed moving extract log file"
|
mv ${l} opt/intel/ || die "failed moving extract log file"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#
|
#
|
||||||
# Licensed under the GNU General Public License, v2
|
# Licensed under the GNU General Public License, v2
|
||||||
#
|
#
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.55 2012/09/14 05:04:50 ferringb Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.56 2013/04/20 18:23:57 sera Exp $
|
||||||
|
|
||||||
inherit java-utils-2 multilib
|
inherit java-utils-2 multilib
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ inherit java-utils-2 multilib
|
|||||||
# construct ant-speficic DEPEND
|
# construct ant-speficic DEPEND
|
||||||
# add ant-core into DEPEND, unless disabled
|
# add ant-core into DEPEND, unless disabled
|
||||||
if [[ -z "${JAVA_ANT_DISABLE_ANT_CORE_DEP}" ]]; then
|
if [[ -z "${JAVA_ANT_DISABLE_ANT_CORE_DEP}" ]]; then
|
||||||
JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} >=dev-java/ant-core-1.7.0"
|
JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} >=dev-java/ant-core-1.8.2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add ant tasks specified in WANT_ANT_TASKS to DEPEND
|
# add ant tasks specified in WANT_ANT_TASKS to DEPEND
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-gnome.eclass,v 1.5 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# Licensed under the GNU General Public License, v2
|
# Licensed under the GNU General Public License, v2
|
||||||
#
|
#
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.152 2013/01/16 19:06:15 sera Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.154 2013/08/27 05:32:28 radhermit Exp $
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# @eclass-begin
|
# @eclass-begin
|
||||||
@ -2331,10 +2331,10 @@ java-pkg_init_paths_() {
|
|||||||
debug-print-function ${FUNCNAME} $*
|
debug-print-function ${FUNCNAME} $*
|
||||||
|
|
||||||
local pkg_name
|
local pkg_name
|
||||||
if [[ "$SLOT" == "0" ]] ; then
|
if [[ "${SLOT%/*}" == "0" ]] ; then
|
||||||
JAVA_PKG_NAME="${PN}"
|
JAVA_PKG_NAME="${PN}"
|
||||||
else
|
else
|
||||||
JAVA_PKG_NAME="${PN}-${SLOT}"
|
JAVA_PKG_NAME="${PN}-${SLOT%/*}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
JAVA_PKG_SHAREPATH="${DESTTREE}/share/${JAVA_PKG_NAME}"
|
JAVA_PKG_SHAREPATH="${DESTTREE}/share/${JAVA_PKG_NAME}"
|
||||||
@ -2724,7 +2724,7 @@ java-pkg_die() {
|
|||||||
echo "!!! When you file a bug report, please include the following information:" >&2
|
echo "!!! When you file a bug report, please include the following information:" >&2
|
||||||
echo "GENTOO_VM=${GENTOO_VM} CLASSPATH=\"${CLASSPATH}\" JAVA_HOME=\"${JAVA_HOME}\"" >&2
|
echo "GENTOO_VM=${GENTOO_VM} CLASSPATH=\"${CLASSPATH}\" JAVA_HOME=\"${JAVA_HOME}\"" >&2
|
||||||
echo "JAVACFLAGS=\"${JAVACFLAGS}\" COMPILER=\"${GENTOO_COMPILER}\"" >&2
|
echo "JAVACFLAGS=\"${JAVACFLAGS}\" COMPILER=\"${GENTOO_COMPILER}\"" >&2
|
||||||
echo "and of course, the output of emerge --info" >&2
|
echo "and of course, the output of emerge --info =${P}" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils.eclass,v 1.12 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,16 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/java.eclass,v 1.33 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
||||||
|
|
||||||
EXPORT_FUNCTIONS pkg_prerm
|
|
||||||
|
|
||||||
java_pkg_prerm() {
|
|
||||||
if java-config -J | grep -q ${P} ; then
|
|
||||||
ewarn "It appears you are removing your default system VM!"
|
|
||||||
ewarn "Please run java-config -L then java-config -S to set a new system VM!"
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde-dist.eclass,v 1.77 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed 2011/11/01.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2010 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.176 2010/01/11 20:51:39 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# KDE 3 is gone from the tree. Scheduled for removal after 2012/01/12.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2010 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde-meta.eclass,v 1.92 2010/01/11 20:51:39 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# KDE 3 is gone from the tree. Scheduled for removal after 2012/01/12.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,8 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde-source.eclass,v 1.26 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# This eclass was only for very old cvs versions of KDE, no longer used by
|
|
||||||
# anything. Scheduled for removal after 2011/06/04.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2010 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.226 2010/01/11 20:51:39 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# KDE 3 is gone from the tree. Scheduled for removal after 2012/01/12.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.122 2013/02/02 16:58:00 dilfridge Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.131 2013/08/15 15:36:26 kensington Exp $
|
||||||
|
|
||||||
# @ECLASS: kde4-base.eclass
|
# @ECLASS: kde4-base.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -10,8 +10,11 @@
|
|||||||
# The kde4-base.eclass provides support for building KDE4 based ebuilds
|
# The kde4-base.eclass provides support for building KDE4 based ebuilds
|
||||||
# and KDE4 applications.
|
# and KDE4 applications.
|
||||||
#
|
#
|
||||||
# NOTE: KDE 4 ebuilds currently support EAPI "3". This will be reviewed
|
# NOTE: KDE 4 ebuilds currently support EAPIs 4 and 5. This will be
|
||||||
# over time as new EAPI versions are approved.
|
# reviewed over time as new EAPI versions are approved.
|
||||||
|
|
||||||
|
if [[ ${___ECLASS_ONCE_KDE4_BASE} != "recur -_+^+_- spank" ]] ; then
|
||||||
|
___ECLASS_ONCE_KDE4_BASE="recur -_+^+_- spank"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: KDE_SELINUX_MODULE
|
# @ECLASS-VARIABLE: KDE_SELINUX_MODULE
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -106,25 +109,25 @@ unset export_fns
|
|||||||
|
|
||||||
# @ECLASS-VARIABLE: DECLARATIVE_REQUIRED
|
# @ECLASS-VARIABLE: DECLARATIVE_REQUIRED
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Is qt-declarative required? Possible values are 'always', 'optional' and 'never'.
|
# Is qtdeclarative required? Possible values are 'always', 'optional' and 'never'.
|
||||||
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
|
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
|
||||||
DECLARATIVE_REQUIRED="${DECLARATIVE_REQUIRED:-never}"
|
DECLARATIVE_REQUIRED="${DECLARATIVE_REQUIRED:-never}"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: QTHELP_REQUIRED
|
# @ECLASS-VARIABLE: QTHELP_REQUIRED
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Is qt-assistant required? Possible values are 'always', 'optional' and 'never'.
|
# Is qthelp required? Possible values are 'always', 'optional' and 'never'.
|
||||||
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
|
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
|
||||||
QTHELP_REQUIRED="${QTHELP_REQUIRED:-never}"
|
QTHELP_REQUIRED="${QTHELP_REQUIRED:-never}"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: OPENGL_REQUIRED
|
# @ECLASS-VARIABLE: OPENGL_REQUIRED
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'.
|
# Is qtopengl required? Possible values are 'always', 'optional' and 'never'.
|
||||||
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
|
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
|
||||||
OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}"
|
OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: MULTIMEDIA_REQUIRED
|
# @ECLASS-VARIABLE: MULTIMEDIA_REQUIRED
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Is qt-multimedia required? Possible values are 'always', 'optional' and 'never'.
|
# Is qtmultimedia required? Possible values are 'always', 'optional' and 'never'.
|
||||||
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
|
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
|
||||||
MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}"
|
MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}"
|
||||||
|
|
||||||
@ -176,7 +179,7 @@ case ${KDEBASE} in
|
|||||||
# packages that will never be mirrored. (As they only will ever be in
|
# packages that will never be mirrored. (As they only will ever be in
|
||||||
# the overlay).
|
# the overlay).
|
||||||
case ${PV} in
|
case ${PV} in
|
||||||
*9999* | 4.?.[6-9]?)
|
*9999* | 4.?.[6-9]? | 4.??.[6-9]?)
|
||||||
RESTRICT+=" mirror"
|
RESTRICT+=" mirror"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -190,16 +193,11 @@ esac
|
|||||||
# @ECLASS-VARIABLE: QT_MINIMAL
|
# @ECLASS-VARIABLE: QT_MINIMAL
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Determine version of qt we enforce as minimal for the package.
|
# Determine version of qt we enforce as minimal for the package.
|
||||||
if version_is_at_least 4.8.50 "${KDE_MINIMAL}"; then
|
QT_MINIMAL="${QT_MINIMAL:-4.8.0}"
|
||||||
# Upstream has added an *undeclared* dependency on Qt 4.8...
|
|
||||||
QT_MINIMAL="${QT_MINIMAL:-4.8.0}"
|
|
||||||
else
|
|
||||||
QT_MINIMAL="${QT_MINIMAL:-4.7.4}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Declarative dependencies
|
# Declarative dependencies
|
||||||
qtdeclarativedepend="
|
qtdeclarativedepend="
|
||||||
>=x11-libs/qt-declarative-${QT_MINIMAL}:4
|
>=dev-qt/qtdeclarative-${QT_MINIMAL}:4
|
||||||
"
|
"
|
||||||
case ${DECLARATIVE_REQUIRED} in
|
case ${DECLARATIVE_REQUIRED} in
|
||||||
always)
|
always)
|
||||||
@ -215,7 +213,7 @@ unset qtdeclarativedepend
|
|||||||
|
|
||||||
# QtHelp dependencies
|
# QtHelp dependencies
|
||||||
qthelpdepend="
|
qthelpdepend="
|
||||||
>=x11-libs/qt-assistant-${QT_MINIMAL}:4
|
>=dev-qt/qthelp-${QT_MINIMAL}:4
|
||||||
"
|
"
|
||||||
case ${QTHELP_REQUIRED} in
|
case ${QTHELP_REQUIRED} in
|
||||||
always)
|
always)
|
||||||
@ -230,7 +228,7 @@ unset qthelpdepend
|
|||||||
|
|
||||||
# OpenGL dependencies
|
# OpenGL dependencies
|
||||||
qtopengldepend="
|
qtopengldepend="
|
||||||
>=x11-libs/qt-opengl-${QT_MINIMAL}:4
|
>=dev-qt/qtopengl-${QT_MINIMAL}:4
|
||||||
"
|
"
|
||||||
case ${OPENGL_REQUIRED} in
|
case ${OPENGL_REQUIRED} in
|
||||||
always)
|
always)
|
||||||
@ -246,7 +244,7 @@ unset qtopengldepend
|
|||||||
|
|
||||||
# MultiMedia dependencies
|
# MultiMedia dependencies
|
||||||
qtmultimediadepend="
|
qtmultimediadepend="
|
||||||
>=x11-libs/qt-multimedia-${QT_MINIMAL}:4
|
>=dev-qt/qtmultimedia-${QT_MINIMAL}:4
|
||||||
"
|
"
|
||||||
case ${MULTIMEDIA_REQUIRED} in
|
case ${MULTIMEDIA_REQUIRED} in
|
||||||
always)
|
always)
|
||||||
@ -280,15 +278,18 @@ unset cppuintdepend
|
|||||||
# Qt accessibility classes are needed in various places, bug 325461
|
# Qt accessibility classes are needed in various places, bug 325461
|
||||||
kdecommondepend="
|
kdecommondepend="
|
||||||
dev-lang/perl
|
dev-lang/perl
|
||||||
>=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl]
|
>=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility]
|
||||||
>=x11-libs/qt-dbus-${QT_MINIMAL}:4
|
>=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl]
|
||||||
>=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus]
|
>=dev-qt/qtdbus-${QT_MINIMAL}:4
|
||||||
>=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility]
|
|| (
|
||||||
>=x11-libs/qt-script-${QT_MINIMAL}:4
|
( >=dev-qt/qtgui-4.8.5:4[accessibility,dbus(+)] dev-qt/designer:4[-phonon] )
|
||||||
>=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support]
|
<dev-qt/qtgui-4.8.5:4[accessibility,dbus(+)]
|
||||||
>=x11-libs/qt-svg-${QT_MINIMAL}:4
|
)
|
||||||
>=x11-libs/qt-test-${QT_MINIMAL}:4
|
>=dev-qt/qtscript-${QT_MINIMAL}:4
|
||||||
>=x11-libs/qt-webkit-${QT_MINIMAL}:4
|
>=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support]
|
||||||
|
>=dev-qt/qtsvg-${QT_MINIMAL}:4
|
||||||
|
>=dev-qt/qttest-${QT_MINIMAL}:4
|
||||||
|
>=dev-qt/qtwebkit-${QT_MINIMAL}:4
|
||||||
!aqua? (
|
!aqua? (
|
||||||
x11-libs/libXext
|
x11-libs/libXext
|
||||||
x11-libs/libXt
|
x11-libs/libXt
|
||||||
@ -335,8 +336,8 @@ if [[ ${PN} != oxygen-icons ]]; then
|
|||||||
kderdepend+=" $(add_kdebase_dep oxygen-icons)"
|
kderdepend+=" $(add_kdebase_dep oxygen-icons)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add a dependency over kde-l10n if EAPI4 or better is around
|
# add a dependency over kde-l10n
|
||||||
if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} && ${EAPI:-0} != 3 ]]; then
|
if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then
|
||||||
for _lingua in ${KDE_LINGUAS}; do
|
for _lingua in ${KDE_LINGUAS}; do
|
||||||
# if our package has lignuas, pull in kde-l10n with selected lingua enabled,
|
# if our package has lignuas, pull in kde-l10n with selected lingua enabled,
|
||||||
# but only for selected ones.
|
# but only for selected ones.
|
||||||
@ -378,15 +379,20 @@ case ${KDE_SELINUX_MODULE} in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# We always need the aqua useflag because otherwise we cannot = refer to it inside
|
||||||
|
# add_kdebase_dep. This was always kind of a bug, but came to light with EAPI=5
|
||||||
|
# (where referring to a use flag not in IUSE masks the ebuild).
|
||||||
|
# The only alternative would be to prohibit using add_kdebase_dep if KDE_REQUIRED=never
|
||||||
|
IUSE+=" aqua"
|
||||||
|
|
||||||
case ${KDE_REQUIRED} in
|
case ${KDE_REQUIRED} in
|
||||||
always)
|
always)
|
||||||
IUSE+=" aqua"
|
|
||||||
[[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" ${kdecommondepend}"
|
[[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" ${kdecommondepend}"
|
||||||
[[ -n ${kdedepend} ]] && DEPEND+=" ${kdedepend}"
|
[[ -n ${kdedepend} ]] && DEPEND+=" ${kdedepend}"
|
||||||
[[ -n ${kderdepend} ]] && RDEPEND+=" ${kderdepend}"
|
[[ -n ${kderdepend} ]] && RDEPEND+=" ${kderdepend}"
|
||||||
;;
|
;;
|
||||||
optional)
|
optional)
|
||||||
IUSE+=" aqua kde"
|
IUSE+=" kde"
|
||||||
[[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" kde? ( ${kdecommondepend} )"
|
[[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" kde? ( ${kdecommondepend} )"
|
||||||
[[ -n ${kdedepend} ]] && DEPEND+=" kde? ( ${kdedepend} )"
|
[[ -n ${kdedepend} ]] && DEPEND+=" kde? ( ${kdedepend} )"
|
||||||
[[ -n ${kderdepend} ]] && RDEPEND+=" kde? ( ${kderdepend} )"
|
[[ -n ${kderdepend} ]] && RDEPEND+=" kde? ( ${kderdepend} )"
|
||||||
@ -417,13 +423,7 @@ _calculate_src_uri() {
|
|||||||
|
|
||||||
# calculate tarball module name
|
# calculate tarball module name
|
||||||
if [[ -n ${KMNAME} ]]; then
|
if [[ -n ${KMNAME} ]]; then
|
||||||
# fixup kdebase-apps name
|
_kmname="${KMNAME}"
|
||||||
case ${KMNAME} in
|
|
||||||
kdebase-apps)
|
|
||||||
_kmname="kdebase" ;;
|
|
||||||
*)
|
|
||||||
_kmname="${KMNAME}" ;;
|
|
||||||
esac
|
|
||||||
else
|
else
|
||||||
_kmname=${PN}
|
_kmname=${PN}
|
||||||
fi
|
fi
|
||||||
@ -435,10 +435,10 @@ _calculate_src_uri() {
|
|||||||
# KDEPIM 4.4, special case
|
# KDEPIM 4.4, special case
|
||||||
# TODO: Remove this part when KDEPIM 4.4 gets out of the tree
|
# 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" ;;
|
SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;;
|
||||||
4.[89].8[05] | 4.[89].9[0235678])
|
4.?.[6-9]? | 4.??.[6-9]?)
|
||||||
# Unstable KDE SC releases
|
# Unstable KDE SC releases
|
||||||
SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
|
SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
|
||||||
4.[1234567].[12345])
|
4.[1-7].[12345])
|
||||||
# Stable KDE SC with old .bz2 support
|
# Stable KDE SC with old .bz2 support
|
||||||
SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
|
SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
|
||||||
*)
|
*)
|
||||||
@ -448,7 +448,7 @@ _calculate_src_uri() {
|
|||||||
;;
|
;;
|
||||||
kdevelop|kdevelop-php*|kdevplatform)
|
kdevelop|kdevelop-php*|kdevplatform)
|
||||||
case ${KDEVELOP_VERSION} in
|
case ${KDEVELOP_VERSION} in
|
||||||
4.[12].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;;
|
4.[123].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;;
|
||||||
*) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;;
|
*) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@ -594,15 +594,11 @@ kde4-base_pkg_setup() {
|
|||||||
# In theory should be in pkg_pretend but we check it only for kdelibs there
|
# In theory should be in pkg_pretend but we check it only for kdelibs there
|
||||||
# and for others we do just quick scan in pkg_setup because pkg_pretend
|
# and for others we do just quick scan in pkg_setup because pkg_pretend
|
||||||
# executions consume quite some time.
|
# executions consume quite some time.
|
||||||
# We can only do this for EAPI 4 or later because the MERGE_TYPE variable
|
|
||||||
# is otherwise undefined.
|
|
||||||
if [[ ${EAPI:-0} != 3 ]]; then
|
|
||||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||||
[[ $(gcc-major-version) -lt 4 ]] || \
|
[[ $(gcc-major-version) -lt 4 ]] || \
|
||||||
( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \
|
( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \
|
||||||
&& die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)."
|
&& die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)."
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
KDEDIR=/usr
|
KDEDIR=/usr
|
||||||
: ${PREFIX:=/usr}
|
: ${PREFIX:=/usr}
|
||||||
@ -624,7 +620,6 @@ kde4-base_src_unpack() {
|
|||||||
if [[ ${KDE_BUILD_TYPE} = live ]]; then
|
if [[ ${KDE_BUILD_TYPE} = live ]]; then
|
||||||
case ${KDE_SCM} in
|
case ${KDE_SCM} in
|
||||||
svn)
|
svn)
|
||||||
migrate_store_dir
|
|
||||||
subversion_src_unpack
|
subversion_src_unpack
|
||||||
;;
|
;;
|
||||||
git)
|
git)
|
||||||
@ -838,9 +833,9 @@ kde4-base_src_install() {
|
|||||||
|
|
||||||
cmake-utils_src_install
|
cmake-utils_src_install
|
||||||
|
|
||||||
# In EAPI 4+, we don't want ${PREFIX}/share/doc/HTML to be compressed,
|
# We don't want ${PREFIX}/share/doc/HTML to be compressed,
|
||||||
# because then khelpcenter can't find the docs
|
# because then khelpcenter can't find the docs
|
||||||
[[ ${EAPI:-0} != 3 && -d ${ED}/${PREFIX}/share/doc/HTML ]] &&
|
[[ -d ${ED}/${PREFIX}/share/doc/HTML ]] &&
|
||||||
docompress -x ${PREFIX}/share/doc/HTML
|
docompress -x ${PREFIX}/share/doc/HTML
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -901,3 +896,5 @@ kde4-base_pkg_postrm() {
|
|||||||
fdo-mime_mime_database_update
|
fdo-mime_mime_database_update
|
||||||
buildsycoca
|
buildsycoca
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.62 2012/09/27 16:35:41 axs Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.67 2013/08/15 15:10:05 kensington Exp $
|
||||||
|
|
||||||
inherit versionator
|
inherit versionator
|
||||||
|
|
||||||
@ -12,11 +12,14 @@ inherit versionator
|
|||||||
# This eclass contains all functions shared by the different eclasses,
|
# This eclass contains all functions shared by the different eclasses,
|
||||||
# for KDE 4 ebuilds.
|
# for KDE 4 ebuilds.
|
||||||
|
|
||||||
|
if [[ ${___ECLASS_ONCE_KDE4_FUNCTIONS} != "recur -_+^+_- spank" ]] ; then
|
||||||
|
___ECLASS_ONCE_KDE4_FUNCTIONS="recur -_+^+_- spank"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: EAPI
|
# @ECLASS-VARIABLE: EAPI
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Currently kde4 eclasses support EAPI 3 and 4.
|
# Currently kde4 eclasses support EAPI 4 and 5.
|
||||||
case ${EAPI:-0} in
|
case ${EAPI:-0} in
|
||||||
3|4|5) : ;;
|
4|5) : ;;
|
||||||
*) die "EAPI=${EAPI} is not supported" ;;
|
*) die "EAPI=${EAPI} is not supported" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -54,28 +57,19 @@ export KDE_BUILD_TYPE
|
|||||||
if [[ ${KDE_BUILD_TYPE} == live ]]; then
|
if [[ ${KDE_BUILD_TYPE} == live ]]; then
|
||||||
case "${KMNAME}" in
|
case "${KMNAME}" in
|
||||||
kdebase-workspace)
|
kdebase-workspace)
|
||||||
KDE_SCM="git"
|
|
||||||
EGIT_REPONAME=${EGIT_REPONAME:=kde-workspace}
|
EGIT_REPONAME=${EGIT_REPONAME:=kde-workspace}
|
||||||
;;
|
;;
|
||||||
kdebase-runtime)
|
kdebase-runtime)
|
||||||
KDE_SCM="git"
|
|
||||||
EGIT_REPONAME=${EGIT_REPONAME:=kde-runtime}
|
EGIT_REPONAME=${EGIT_REPONAME:=kde-runtime}
|
||||||
;;
|
;;
|
||||||
kdebase-apps)
|
|
||||||
KDE_SCM="git"
|
|
||||||
EGIT_REPONAME=${EGIT_REPONAME:=kde-baseapps}
|
|
||||||
;;
|
|
||||||
kde-workspace|kde-runtime|kde-baseapps)
|
|
||||||
KDE_SCM="git"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: KDE_SCM
|
# @ECLASS-VARIABLE: KDE_SCM
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# If this is a live package which scm does it use
|
# If this is a live package which scm does it use
|
||||||
# Everything else uses svn by default
|
# Everything else uses git by default
|
||||||
KDE_SCM="${KDE_SCM:-svn}"
|
KDE_SCM="${KDE_SCM:-git}"
|
||||||
case ${KDE_SCM} in
|
case ${KDE_SCM} in
|
||||||
svn|git) ;;
|
svn|git) ;;
|
||||||
*) die "KDE_SCM: ${KDE_SCM} is not supported" ;;
|
*) die "KDE_SCM: ${KDE_SCM} is not supported" ;;
|
||||||
@ -224,60 +218,6 @@ enable_selected_doc_linguas() {
|
|||||||
[[ -n "${linguas}" ]] && einfo "Enabling handbook translations:${linguas}"
|
[[ -n "${linguas}" ]] && einfo "Enabling handbook translations:${linguas}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: migrate_store_dir
|
|
||||||
# @DESCRIPTION:
|
|
||||||
# Universal store dir migration
|
|
||||||
# * performs split of kdebase to kdebase-apps when needed
|
|
||||||
# * moves playground/extragear kde4-base-style to toplevel dir
|
|
||||||
migrate_store_dir() {
|
|
||||||
if [[ ${KDE_SCM} != svn ]]; then
|
|
||||||
die "migrate_store_dir() only makes sense for subversion"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local cleandir="${ESVN_STORE_DIR}/KDE"
|
|
||||||
|
|
||||||
if [[ -d ${cleandir} ]]; then
|
|
||||||
ewarn "'${cleandir}' has been found. Moving contents to new location."
|
|
||||||
addwrite "${ESVN_STORE_DIR}"
|
|
||||||
# Split kdebase
|
|
||||||
local module
|
|
||||||
if pushd "${cleandir}"/kdebase/kdebase > /dev/null; then
|
|
||||||
for module in `find . -maxdepth 1 -type d -name [a-z0-9]\*`; do
|
|
||||||
module="${module#./}"
|
|
||||||
mkdir -p "${ESVN_STORE_DIR}/kdebase-${module}" && mv -f "${module}" "${ESVN_STORE_DIR}/kdebase-${module}" || \
|
|
||||||
die "Failed to move to '${ESVN_STORE_DIR}/kdebase-${module}'."
|
|
||||||
done
|
|
||||||
popd > /dev/null
|
|
||||||
rm -fr "${cleandir}/kdebase" || \
|
|
||||||
die "Failed to remove ${cleandir}/kdebase. You need to remove it manually."
|
|
||||||
fi
|
|
||||||
# Move the rest
|
|
||||||
local pkg
|
|
||||||
for pkg in "${cleandir}"/*; do
|
|
||||||
mv -f "${pkg}" "${ESVN_STORE_DIR}"/ || eerror "Failed to move '${pkg}'"
|
|
||||||
done
|
|
||||||
rmdir "${cleandir}" || die "Could not move obsolete KDE store dir. Please move '${cleandir}' contents to appropriate location (possibly ${ESVN_STORE_DIR}) and manually remove '${cleandir}' in order to continue."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! has kde4-meta ${INHERITED}; then
|
|
||||||
case ${KMNAME} in
|
|
||||||
extragear*|playground*)
|
|
||||||
local scmlocalpath="${ESVN_STORE_DIR}"/"${KMNAME}"/"${PN}"
|
|
||||||
if [[ -d "${scmlocalpath}" ]]; then
|
|
||||||
local destdir="${ESVN_STORE_DIR}"/"${ESVN_PROJECT}"/"`basename "${ESVN_REPO_URI}"`"
|
|
||||||
ewarn "'${scmlocalpath}' has been found."
|
|
||||||
ewarn "Moving contents to new location: ${destdir}"
|
|
||||||
addwrite "${ESVN_STORE_DIR}"
|
|
||||||
mkdir -p "${ESVN_STORE_DIR}"/"${ESVN_PROJECT}" && mv -f "${scmlocalpath}" "${destdir}" \
|
|
||||||
|| die "Failed to move to '${scmlocalpath}'"
|
|
||||||
# Try cleaning empty directories
|
|
||||||
rmdir "`dirname "${scmlocalpath}"`" 2> /dev/null
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Functions handling KMLOADLIBS and KMSAVELIBS
|
# Functions handling KMLOADLIBS and KMSAVELIBS
|
||||||
|
|
||||||
# @FUNCTION: save_library_dependencies
|
# @FUNCTION: save_library_dependencies
|
||||||
@ -483,3 +423,5 @@ get_kde_version() {
|
|||||||
(( micro < 50 )) && echo ${major}.${minor} || echo ${major}.$((minor + 1))
|
(( micro < 50 )) && echo ${major}.${minor} || echo ${major}.$((minor + 1))
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta-pkg.eclass,v 1.10 2013/02/02 16:58:00 dilfridge Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta-pkg.eclass,v 1.12 2013/04/07 17:33:18 kensington Exp $
|
||||||
|
|
||||||
# @ECLASS: kde4-meta-pkg.eclass
|
# @ECLASS: kde4-meta-pkg.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -9,6 +9,9 @@
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# This eclass should only be used for defining meta packages for KDE4.
|
# This eclass should only be used for defining meta packages for KDE4.
|
||||||
|
|
||||||
|
if [[ ${___ECLASS_ONCE_KDE4_META_PKG} != "recur -_+^+_- spank" ]] ; then
|
||||||
|
___ECLASS_ONCE_KDE4_META_PKG="recur -_+^+_- spank"
|
||||||
|
|
||||||
inherit kde4-functions
|
inherit kde4-functions
|
||||||
|
|
||||||
HOMEPAGE="http://www.kde.org/"
|
HOMEPAGE="http://www.kde.org/"
|
||||||
@ -17,3 +20,5 @@ LICENSE="metapackage"
|
|||||||
IUSE="aqua"
|
IUSE="aqua"
|
||||||
|
|
||||||
SLOT=4
|
SLOT=4
|
||||||
|
|
||||||
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.68 2012/09/04 14:08:24 johu Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.74 2013/08/21 19:08:18 kensington Exp $
|
||||||
#
|
#
|
||||||
# @ECLASS: kde4-meta.eclass
|
# @ECLASS: kde4-meta.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -12,6 +12,9 @@
|
|||||||
# You must define KMNAME to use this eclass, and do so before inheriting it. All other variables are optional.
|
# You must define KMNAME to use this eclass, and do so before inheriting it. All other variables are optional.
|
||||||
# Do not include the same item in more than one of KMMODULE, KMMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY.
|
# Do not include the same item in more than one of KMMODULE, KMMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY.
|
||||||
|
|
||||||
|
if [[ ${___ECLASS_ONCE_KDE4_META} != "recur -_+^+_- spank" ]] ; then
|
||||||
|
___ECLASS_ONCE_KDE4_META="recur -_+^+_- spank"
|
||||||
|
|
||||||
[[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
|
[[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
|
||||||
|
|
||||||
inherit kde4-base versionator
|
inherit kde4-base versionator
|
||||||
@ -21,9 +24,6 @@ EXPORT_FUNCTIONS ${KDEMETA_EXPF}
|
|||||||
|
|
||||||
# Add dependencies that all packages in a certain module share.
|
# Add dependencies that all packages in a certain module share.
|
||||||
case ${KMNAME} in
|
case ${KMNAME} in
|
||||||
kdebase|kdebase-apps|kde-baseapps|kdebase-workspace|kde-workspace|kdebase-runtime|kde-runtime|kdegraphics)
|
|
||||||
COMMONDEPEND+=" >=media-libs/qimageblitz-0.0.4"
|
|
||||||
;;
|
|
||||||
kdepim|kdepim-runtime)
|
kdepim|kdepim-runtime)
|
||||||
case ${PN} in
|
case ${PN} in
|
||||||
akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
|
akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
|
||||||
@ -32,11 +32,6 @@ case ${KMNAME} in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
kdegames)
|
|
||||||
if [[ ${PN} != libkdegames ]]; then
|
|
||||||
COMMONDEPEND+=" $(add_kdebase_dep libkdegames)"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
DEPEND+=" ${COMMONDEPEND}"
|
DEPEND+=" ${COMMONDEPEND}"
|
||||||
@ -128,7 +123,6 @@ kde4-meta_src_unpack() {
|
|||||||
if [[ ${KDE_BUILD_TYPE} = live ]]; then
|
if [[ ${KDE_BUILD_TYPE} = live ]]; then
|
||||||
case "${KDE_SCM}" in
|
case "${KDE_SCM}" in
|
||||||
svn)
|
svn)
|
||||||
migrate_store_dir
|
|
||||||
S="${WORKDIR}/${P}"
|
S="${WORKDIR}/${P}"
|
||||||
mkdir -p "${S}"
|
mkdir -p "${S}"
|
||||||
ESVN_RESTRICT="export" subversion_src_unpack
|
ESVN_RESTRICT="export" subversion_src_unpack
|
||||||
@ -196,16 +190,7 @@ kde4-meta_src_extract() {
|
|||||||
KMTARPARAMS+=" --xz"
|
KMTARPARAMS+=" --xz"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case ${KMNAME} in
|
|
||||||
kdebase-apps)
|
|
||||||
# kdebase/apps -> kdebase-apps
|
|
||||||
tarball="kdebase-${PV}.tar.${postfix}"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Create tarball name from module name (this is the default)
|
|
||||||
tarball="${KMNAME}-${PV}.tar.${postfix}"
|
tarball="${KMNAME}-${PV}.tar.${postfix}"
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Full path to source tarball
|
# Full path to source tarball
|
||||||
tarfile="${DISTDIR}/${tarball}"
|
tarfile="${DISTDIR}/${tarball}"
|
||||||
@ -283,18 +268,21 @@ kde4-meta_create_extractlists() {
|
|||||||
# Note that this actually doesn't include KMEXTRA handling.
|
# Note that this actually doesn't include KMEXTRA handling.
|
||||||
# In those cases you should care to add the relevant files to KMEXTRACTONLY
|
# In those cases you should care to add the relevant files to KMEXTRACTONLY
|
||||||
case ${KMNAME} in
|
case ${KMNAME} in
|
||||||
kdebase | kdebase-apps | kde-baseapps)
|
kde-baseapps)
|
||||||
KMEXTRACTONLY+="
|
KMEXTRACTONLY+="
|
||||||
|
CTestConfig.cmake
|
||||||
config-apps.h.cmake
|
config-apps.h.cmake
|
||||||
ConfigureChecks.cmake"
|
ConfigureChecks.cmake"
|
||||||
;;
|
;;
|
||||||
kdebase-runtime | kde-runtime)
|
kde-runtime)
|
||||||
KMEXTRACTONLY+="
|
KMEXTRACTONLY+="
|
||||||
|
cmake/modules/
|
||||||
CTestConfig.cmake
|
CTestConfig.cmake
|
||||||
config-runtime.h.cmake"
|
config-runtime.h.cmake"
|
||||||
;;
|
;;
|
||||||
kdebase-workspace | kde-workspace)
|
kde-workspace)
|
||||||
KMEXTRACTONLY+="
|
KMEXTRACTONLY+="
|
||||||
|
cmake/modules/
|
||||||
config-unix.h.cmake
|
config-unix.h.cmake
|
||||||
ConfigureChecks.cmake
|
ConfigureChecks.cmake
|
||||||
config-workspace.h.cmake
|
config-workspace.h.cmake
|
||||||
@ -302,13 +290,6 @@ kde4-meta_create_extractlists() {
|
|||||||
startkde.cmake
|
startkde.cmake
|
||||||
KDE4WorkspaceConfig.cmake.in"
|
KDE4WorkspaceConfig.cmake.in"
|
||||||
;;
|
;;
|
||||||
kdegames)
|
|
||||||
if [[ ${PN} != libkdegames ]]; then
|
|
||||||
KMEXTRACTONLY+="
|
|
||||||
libkdegames/"
|
|
||||||
KMLOADLIBS="${KMLOADLIBS} libkdegames"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
kdepim)
|
kdepim)
|
||||||
if [[ ${PN} != libkdepim ]]; then
|
if [[ ${PN} != libkdepim ]]; then
|
||||||
KMEXTRACTONLY+="
|
KMEXTRACTONLY+="
|
||||||
@ -316,41 +297,16 @@ kde4-meta_create_extractlists() {
|
|||||||
fi
|
fi
|
||||||
KMEXTRACTONLY+="
|
KMEXTRACTONLY+="
|
||||||
config-enterprise.h.cmake
|
config-enterprise.h.cmake
|
||||||
kleopatra/ConfigureChecks.cmake"
|
kleopatra/ConfigureChecks.cmake
|
||||||
if ! [[ $(get_kde_version) < 4.5 ]]; then
|
|
||||||
KMEXTRACTONLY+="
|
|
||||||
CTestCustom.cmake
|
CTestCustom.cmake
|
||||||
kdepim-version.h.cmake"
|
kdepim-version.h.cmake
|
||||||
else
|
|
||||||
KMEXTRACTONLY+="
|
|
||||||
kdepim-version.h"
|
kdepim-version.h"
|
||||||
fi
|
|
||||||
if use_if_iuse kontact; then
|
if use_if_iuse kontact; then
|
||||||
KMEXTRA+="
|
KMEXTRA+="
|
||||||
kontact/plugins/${PLUGINNAME:-${PN}}/"
|
kontact/plugins/${PLUGINNAME:-${PN}}/"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
kdeutils)
|
|
||||||
KMEXTRACTONLY+="
|
|
||||||
kdeutils-version.h"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
# Don't install cmake modules for split ebuilds, to avoid collisions.
|
|
||||||
# note: kdegraphics >= 4.6.2 does not even have code to do that, so we
|
|
||||||
# should not try in that case
|
|
||||||
# note2: kdeedu 4.6.4 does not have a cmake/modules/ subdir anymore :(
|
|
||||||
# it may be possible to formulate this shorter, but it should also
|
|
||||||
# still be understandable...
|
|
||||||
if [[ ${KMNAME} != kdegraphics || ( ( $(get_kde_version) != 4.6 || ${PV} < 4.6.2 ) && $(get_kde_version) < 4.7 ) ]] \
|
|
||||||
&& ! [[ ${KMNAME} == kdeedu && ( ${PV} == 4.6.4 || ${PV} == 4.6.5 ) ]] \
|
|
||||||
&& ! [[ ${KMNAME} == kdegames && ${PV} > 4.9.0 ]]; then
|
|
||||||
case ${KMNAME} in
|
|
||||||
kdebase-runtime|kde-runtime|kdebase-workspace|kde-workspace|kdeedu|kdegames|kdegraphics)
|
|
||||||
KMEXTRACTONLY+="
|
|
||||||
cmake/modules/"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME}: KMEXTRACTONLY ${KMEXTRACTONLY}"
|
debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME}: KMEXTRACTONLY ${KMEXTRACTONLY}"
|
||||||
}
|
}
|
||||||
@ -486,8 +442,8 @@ kde4-meta_change_cmakelists() {
|
|||||||
find "${S}"/${i} -name CMakeLists.txt -print0 | \
|
find "${S}"/${i} -name CMakeLists.txt -print0 | \
|
||||||
xargs -0 sed -i \
|
xargs -0 sed -i \
|
||||||
-e 's/^#DONOTCOMPILE //g' \
|
-e 's/^#DONOTCOMPILE //g' \
|
||||||
-e '/install(.*)/{s/^/#DONOTINSTALL /;}' \
|
-e '/install(.*)/I{s/^/#DONOTINSTALL /;}' \
|
||||||
-e '/^install(/,/)/{s/^/#DONOTINSTALL /;}' \
|
-e '/^install(/,/)/I{s/^/#DONOTINSTALL /;}' \
|
||||||
-e '/kde4_install_icons(.*)/{s/^/#DONOTINSTALL /;}' || \
|
-e '/kde4_install_icons(.*)/{s/^/#DONOTINSTALL /;}' || \
|
||||||
die "${LINENO}: sed died in the KMCOMPILEONLY section while processing ${i}"
|
die "${LINENO}: sed died in the KMCOMPILEONLY section while processing ${i}"
|
||||||
_change_cmakelists_parent_dirs ${i}
|
_change_cmakelists_parent_dirs ${i}
|
||||||
@ -512,7 +468,7 @@ kde4-meta_change_cmakelists() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
case ${KMNAME} in
|
case ${KMNAME} in
|
||||||
kdebase-workspace | kde-workspace)
|
kde-workspace)
|
||||||
# COLLISION PROTECT section
|
# COLLISION PROTECT section
|
||||||
# Install the startkde script just once, as a part of kde-base/kdebase-startkde,
|
# Install the startkde script just once, as a part of kde-base/kdebase-startkde,
|
||||||
# not as a part of every package.
|
# not as a part of every package.
|
||||||
@ -529,16 +485,24 @@ kde4-meta_change_cmakelists() {
|
|||||||
sed -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \
|
sed -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \
|
||||||
-i CMakeLists.txt || die "${LINENO}: sed died in kde-workspace strip config install and fix EXPORT section"
|
-i CMakeLists.txt || die "${LINENO}: sed died in kde-workspace strip config install and fix EXPORT section"
|
||||||
fi
|
fi
|
||||||
|
# <KDE/4.11
|
||||||
if [[ ${PN} != plasma-workspace ]]; then
|
if [[ ${PN} != plasma-workspace ]]; then
|
||||||
sed -e '/KActivities/s/REQUIRED//' \
|
sed -e '/KActivities/s/REQUIRED//' \
|
||||||
-i CMakeLists.txt || die "${LINENO}: sed died in kde-workspace dep reduction section"
|
-i CMakeLists.txt || die "${LINENO}: sed died in kde-workspace dep reduction section"
|
||||||
fi
|
fi
|
||||||
|
sed -e '/QImageBlitz/s/REQUIRED//' \
|
||||||
|
-i CMakeLists.txt || die "${LINENO}: sed died in kde-workspace dep reduction section 2"
|
||||||
|
|
||||||
|
# >=KDE/4.11
|
||||||
|
sed -e 's/TYPE REQUIRED/TYPE OPTIONAL/' -e 's/XCB REQUIRED/XCB/' -e 's/X11 REQUIRED/X11/' \
|
||||||
|
-e 's/message(FATAL_ERROR/message(/' -i CMakeLists.txt \
|
||||||
|
|| die "${LINENO}: sed died in kde-workspace dep reduction section"
|
||||||
if [[ "${PN}" != "kwin" ]]; then
|
if [[ "${PN}" != "kwin" ]]; then
|
||||||
sed -i -e "/^ macro_log_feature(OPENGL_OR_ES_FOUND/s/TRUE/FALSE/" \
|
sed -i -e "/^ macro_log_feature(OPENGL_OR_ES_FOUND/s/TRUE/FALSE/" \
|
||||||
"${S}"/CMakeLists.txt || die "${LINENO}: sed died removing kde-workspace opengl dependency"
|
"${S}"/CMakeLists.txt || die "${LINENO}: sed died removing kde-workspace opengl dependency"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
kdebase-runtime | kde-runtime)
|
kde-runtime)
|
||||||
# COLLISION PROTECT section
|
# COLLISION PROTECT section
|
||||||
# Only install the kde4 script as part of kde-base/kdebase-data
|
# Only install the kde4 script as part of kde-base/kdebase-data
|
||||||
if [[ ${PN} != kdebase-data && -f CMakeLists.txt ]]; then
|
if [[ ${PN} != kdebase-data && -f CMakeLists.txt ]]; then
|
||||||
@ -565,7 +529,8 @@ kde4-meta_change_cmakelists() {
|
|||||||
-e 's/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)[[:space:]]*$/if(1) # &/' \
|
-e 's/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)[[:space:]]*$/if(1) # &/' \
|
||||||
-i kontact/plugins/CMakeLists.txt || die 'failed to override build logic'
|
-i kontact/plugins/CMakeLists.txt || die 'failed to override build logic'
|
||||||
fi
|
fi
|
||||||
if [[ $(get_kde_version) < 4.5 ]]; then
|
case ${PV} in
|
||||||
|
4.4*)
|
||||||
case ${PN} in
|
case ${PN} in
|
||||||
kalarm|kmailcvt|kontact|korganizer|korn)
|
kalarm|kmailcvt|kontact|korganizer|korn)
|
||||||
sed -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \
|
sed -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \
|
||||||
@ -574,15 +539,8 @@ kde4-meta_change_cmakelists() {
|
|||||||
_change_cmakelists_parent_dirs kmail
|
_change_cmakelists_parent_dirs kmail
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
kdewebdev)
|
esac
|
||||||
# Disable hardcoded checks
|
|
||||||
sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
|
|
||||||
-e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2)/' \
|
|
||||||
-e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt)/' \
|
|
||||||
-e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost)/' \
|
|
||||||
-i CMakeLists.txt || die "failed to disable hardcoded checks"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -596,25 +554,6 @@ kde4-meta_change_cmakelists() {
|
|||||||
kde4-meta_src_configure() {
|
kde4-meta_src_configure() {
|
||||||
debug-print-function ${FUNCNAME} "$@"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
# backwards-compatibility: make mycmakeargs an array, if it isn't already
|
|
||||||
if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
|
|
||||||
mycmakeargs=(${mycmakeargs})
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set some cmake default values here (usually workarounds for automagic deps)
|
|
||||||
case ${KMNAME} in
|
|
||||||
kdewebdev)
|
|
||||||
mycmakeargs=(
|
|
||||||
-DWITH_KdepimLibs=OFF
|
|
||||||
-DWITH_LibXml2=OFF
|
|
||||||
-DWITH_LibXslt=OFF
|
|
||||||
-DWITH_Boost=OFF
|
|
||||||
-DWITH_LibTidy=OFF
|
|
||||||
"${mycmakeargs[@]}"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
kde4-base_src_configure
|
kde4-base_src_configure
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -684,3 +623,5 @@ kde4-meta_pkg_postrm() {
|
|||||||
|
|
||||||
kde4-base_pkg_postrm
|
kde4-base_pkg_postrm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.287 2013/07/31 21:25:50 hasufell Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.288 2013/09/05 17:04:26 tomwij Exp $
|
||||||
|
|
||||||
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
|
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
|
||||||
# series of kernel with back-compatibility for 2.4
|
# series of kernel with back-compatibility for 2.4
|
||||||
@ -40,7 +40,13 @@
|
|||||||
# K_DEFCONFIG - Allow specifying a different defconfig target.
|
# K_DEFCONFIG - Allow specifying a different defconfig target.
|
||||||
# If length zero, defaults to "defconfig".
|
# If length zero, defaults to "defconfig".
|
||||||
# K_WANT_GENPATCHES - Apply genpatches to kernel source. Provide any
|
# K_WANT_GENPATCHES - Apply genpatches to kernel source. Provide any
|
||||||
# combination of "base" and "extras"
|
# combination of "base", "extras" or "experimental".
|
||||||
|
# K_EXP_GENPATCHES_PULL - If set, we pull "experimental" regardless of the USE FLAG
|
||||||
|
# but expect the ebuild maintainer to use K_EXP_GENPATCHES_LIST.
|
||||||
|
# K_EXP_GENPATCHES_NOUSE - If set, no USE flag will be provided for "experimental";
|
||||||
|
# as a result the user cannot choose to apply those patches.
|
||||||
|
# K_EXP_GENPATCHES_LIST - A list of patches to pick from "experimental" to apply when
|
||||||
|
# the USE flag is unset and K_EXP_GENPATCHES_PULL is set.
|
||||||
# K_GENPATCHES_VER - The version of the genpatches tarball(s) to apply.
|
# K_GENPATCHES_VER - The version of the genpatches tarball(s) to apply.
|
||||||
# A value of "5" would apply genpatches-2.6.12-5 to
|
# A value of "5" would apply genpatches-2.6.12-5 to
|
||||||
# my-sources-2.6.12.ebuild
|
# my-sources-2.6.12.ebuild
|
||||||
@ -139,9 +145,23 @@ handle_genpatches() {
|
|||||||
else
|
else
|
||||||
tarball="genpatches-${OKV}-${K_GENPATCHES_VER}.${i}.tar.xz"
|
tarball="genpatches-${OKV}-${K_GENPATCHES_VER}.${i}.tar.xz"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local use_cond_start="" use_cond_end=""
|
||||||
|
|
||||||
|
if [[ "${i}" == "experimental" && -z ${K_EXP_GENPATCHES_PULL} && -z ${K_EXP_GENPATCHES_NOUSE} ]] ; then
|
||||||
|
use_cond_start="experimental? ( "
|
||||||
|
use_cond_end=" )"
|
||||||
|
|
||||||
|
if use experimental ; then
|
||||||
|
UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}"
|
||||||
debug-print "genpatches tarball: $tarball"
|
debug-print "genpatches tarball: $tarball"
|
||||||
GENPATCHES_URI="${GENPATCHES_URI} mirror://gentoo/${tarball}"
|
fi
|
||||||
UNIPATCH_LIST_GENPATCHES="${UNIPATCH_LIST_GENPATCHES} ${DISTDIR}/${tarball}"
|
else
|
||||||
|
UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}"
|
||||||
|
debug-print "genpatches tarball: $tarball"
|
||||||
|
fi
|
||||||
|
|
||||||
|
GENPATCHES_URI+=" ${use_cond_start}mirror://gentoo/${tarball}${use_cond_end}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -955,6 +975,20 @@ unipatch() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If experimental was not chosen by the user, drop experimental patches not in K_EXP_GENPATCHES_LIST.
|
||||||
|
if [[ "${i}" == *"genpatches-"*".experimental."* && -n ${K_EXP_GENPATCHES_PULL} ]] ; then
|
||||||
|
if [[ -z ${K_EXP_GENPATCHES_NOUSE} ]] && use experimental; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
local j
|
||||||
|
for j in ${KPATCH_DIR}/*/50*_*.patch*; do
|
||||||
|
if [[ ! "${K_EXP_GENPATCHES_LIST}" == *"$(basename ${j})"* ]] ; then
|
||||||
|
UNIPATCH_DROP+=" $(basename ${j})"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
#populate KPATCH_DIRS so we know where to look to remove the excludes
|
#populate KPATCH_DIRS so we know where to look to remove the excludes
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
# Copyright 1999-2011 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/latex-package.eclass,v 1.39 2011/08/22 04:46:32 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/latex-package.eclass,v 1.40 2013/07/05 22:59:40 aballier Exp $
|
||||||
|
|
||||||
# @ECLASS: latex-package.eclass
|
# @ECLASS: latex-package.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -61,7 +61,7 @@ DEPEND="${RDEPEND}
|
|||||||
HOMEPAGE="http://www.tug.org/"
|
HOMEPAGE="http://www.tug.org/"
|
||||||
SRC_URI="ftp://tug.ctan.org/macros/latex/"
|
SRC_URI="ftp://tug.ctan.org/macros/latex/"
|
||||||
S=${WORKDIR}/${P}
|
S=${WORKDIR}/${P}
|
||||||
TEXMF="/usr/share/texmf"
|
TEXMF="/usr/share/texmf-site"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: SUPPLIER
|
# @ECLASS-VARIABLE: SUPPLIER
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/leechcraft.eclass,v 1.7 2012/10/14 12:19:32 pinkbyte Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/leechcraft.eclass,v 1.10 2013/05/08 10:25:48 pinkbyte Exp $
|
||||||
#
|
#
|
||||||
# @ECLASS: leechcraft.eclass
|
# @ECLASS: leechcraft.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -22,8 +22,8 @@
|
|||||||
# Only EAPI >1 supported
|
# Only EAPI >1 supported
|
||||||
|
|
||||||
case ${EAPI:-0} in
|
case ${EAPI:-0} in
|
||||||
2|3|4|5) ;;
|
4|5) ;;
|
||||||
0|1) die "EAPI not supported, bug ebuild mantainer" ;;
|
0|1|2|3) die "EAPI not supported, bug ebuild mantainer" ;;
|
||||||
*) die "Unknown EAPI, bug eclass maintainers" ;;
|
*) die "Unknown EAPI, bug eclass maintainers" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -35,19 +35,17 @@ if [[ ${PV} == 9999 ]]; then
|
|||||||
|
|
||||||
inherit git-2
|
inherit git-2
|
||||||
else
|
else
|
||||||
local suffix
|
|
||||||
if version_is_at_least 0.4.95; then
|
|
||||||
DEPEND="app-arch/xz-utils"
|
DEPEND="app-arch/xz-utils"
|
||||||
suffix="xz"
|
SRC_URI="mirror://sourceforge/leechcraft/leechcraft-${PV}.tar.xz"
|
||||||
else
|
|
||||||
suffix="bz2"
|
|
||||||
fi
|
|
||||||
SRC_URI="mirror://sourceforge/leechcraft/leechcraft-${PV}.tar.${suffix}"
|
|
||||||
S="${WORKDIR}/leechcraft-${PV}"
|
S="${WORKDIR}/leechcraft-${PV}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
HOMEPAGE="http://leechcraft.org/"
|
HOMEPAGE="http://leechcraft.org/"
|
||||||
LICENSE="GPL-3"
|
if version_is_at_least 0.5.95; then
|
||||||
|
LICENSE="Boost-1.0"
|
||||||
|
else
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
fi
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY
|
# @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY
|
||||||
# @DEFAULT_UNSET
|
# @DEFAULT_UNSET
|
||||||
@ -56,9 +54,9 @@ LICENSE="GPL-3"
|
|||||||
: ${LEECHCRAFT_PLUGIN_CATEGORY:=}
|
: ${LEECHCRAFT_PLUGIN_CATEGORY:=}
|
||||||
|
|
||||||
if [[ "${LEECHCRAFT_PLUGIN_CATEGORY}" ]]; then
|
if [[ "${LEECHCRAFT_PLUGIN_CATEGORY}" ]]; then
|
||||||
CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#leechcraft-}
|
CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#lc-}
|
||||||
elif [[ ${PN} != leechcraft-core ]]; then
|
elif [[ ${PN} != lc-core ]]; then
|
||||||
CMAKE_USE_DIR="${S}"/src/plugins/${PN#leechcraft-}
|
CMAKE_USE_DIR="${S}"/src/plugins/${PN#lc-}
|
||||||
else
|
else
|
||||||
CMAKE_USE_DIR="${S}"/src
|
CMAKE_USE_DIR="${S}"/src
|
||||||
fi
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.112 2013/03/26 08:17:26 ssuominen Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.113 2013/08/24 11:07:23 ssuominen Exp $
|
||||||
|
|
||||||
# @ECLASS: linux-mod.eclass
|
# @ECLASS: linux-mod.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -127,12 +127,10 @@ EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_
|
|||||||
|
|
||||||
IUSE="kernel_linux"
|
IUSE="kernel_linux"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
if [[ -z ${VIRTUAL_MODUTILS} ]]; then
|
RDEPEND="kernel_linux? ( virtual/modutils )"
|
||||||
RDEPEND="kernel_linux? ( virtual/modutils )"
|
DEPEND="${RDEPEND}
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
sys-apps/sed
|
sys-apps/sed
|
||||||
kernel_linux? ( virtual/linux-sources )"
|
kernel_linux? ( virtual/linux-sources )"
|
||||||
fi
|
|
||||||
|
|
||||||
# eclass utilities
|
# eclass utilities
|
||||||
# ----------------------------------
|
# ----------------------------------
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mailer.eclass,v 1.16 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
||||||
|
|
||||||
EXPORT_FUNCTIONS pkg_postrm
|
|
||||||
|
|
||||||
# Gets current mailer profile
|
|
||||||
mailer_get_current() {
|
|
||||||
mailer-config --get-current-profile
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set current mailer profile
|
|
||||||
mailer_set_profile() {
|
|
||||||
local newprofile=${1:-${P}}
|
|
||||||
|
|
||||||
ebegin "Setting the current mailer profile to \"${newprofile}\""
|
|
||||||
mailer-config --set-profile ${newprofile} >/dev/null || die
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
# Wipe unused configs
|
|
||||||
mailer_wipe_confs() {
|
|
||||||
local x i
|
|
||||||
|
|
||||||
ebegin "Wiping all unused mailer profiles"
|
|
||||||
for x in /etc/mail/*.mailer ; do
|
|
||||||
i=${x##*/}
|
|
||||||
i=${i%.mailer}
|
|
||||||
|
|
||||||
[[ ${i} == ${P} ]] && continue
|
|
||||||
[[ ${i} == "default" ]] && continue
|
|
||||||
has_version "~mail-mta/${i}" || rm ${x}
|
|
||||||
done
|
|
||||||
eend 0
|
|
||||||
}
|
|
||||||
|
|
||||||
mailer_pkg_postrm() {
|
|
||||||
if use mailwrapper ; then
|
|
||||||
mailer_wipe_confs
|
|
||||||
|
|
||||||
# We are removing the current profile, switch back to default
|
|
||||||
[[ $(mailer_get_current) == ${P} ]] && mailer_set_profile default
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/matrox.eclass,v 1.20 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.20 2012/12/26 23:08:53 ottxor Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/mercurial.eclass,v 1.22 2013/04/28 16:15:33 zmedico Exp $
|
||||||
|
|
||||||
# @ECLASS: mercurial.eclass
|
# @ECLASS: mercurial.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -36,7 +36,7 @@ DEPEND="dev-vcs/mercurial"
|
|||||||
|
|
||||||
# @ECLASS-VARIABLE: EHG_STORE_DIR
|
# @ECLASS-VARIABLE: EHG_STORE_DIR
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Mercurial sources store directory. Users may override this in /etc/make.conf
|
# Mercurial sources store directory. Users may override this in /etc/portage/make.conf
|
||||||
[[ -z "${EHG_STORE_DIR}" ]] && EHG_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/hg-src"
|
[[ -z "${EHG_STORE_DIR}" ]] && EHG_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/hg-src"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: EHG_PROJECT
|
# @ECLASS-VARIABLE: EHG_PROJECT
|
||||||
@ -49,8 +49,8 @@ DEPEND="dev-vcs/mercurial"
|
|||||||
|
|
||||||
# @ECLASS-VARIABLE: EHG_QUIET
|
# @ECLASS-VARIABLE: EHG_QUIET
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Suppress some extra noise from mercurial, set it to 'OFF' to be louder.
|
# Suppress some extra noise from mercurial, set it to 'ON' to be quiet.
|
||||||
: ${EHG_QUIET:="ON"}
|
: ${EHG_QUIET:="OFF"}
|
||||||
[[ "${EHG_QUIET}" == "ON" ]] && EHG_QUIET_CMD_OPT="--quiet"
|
[[ "${EHG_QUIET}" == "ON" ]] && EHG_QUIET_CMD_OPT="--quiet"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: EHG_CLONE_CMD
|
# @ECLASS-VARIABLE: EHG_CLONE_CMD
|
||||||
|
45
sdk_container/src/third_party/portage-stable/eclass/mono-env.eclass
vendored
Normal file
45
sdk_container/src/third_party/portage-stable/eclass/mono-env.eclass
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# 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 $
|
||||||
|
|
||||||
|
# @ECLASS: mono-env.eclass
|
||||||
|
# @MAINTAINER:
|
||||||
|
# dotnet@gentoo.org
|
||||||
|
# @BLURB: Set environment variables commonly used by dotnet packages.
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Set environment variables commonly used by dotnet packages.
|
||||||
|
|
||||||
|
SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS pkg_setup
|
||||||
|
|
||||||
|
if [[ ! ${_MONO_ENV} ]]; then
|
||||||
|
|
||||||
|
mono-env_pkg_setup() {
|
||||||
|
# >=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}"
|
||||||
|
|
||||||
|
# export more variables as needed by other dotnet packages
|
||||||
|
export MONO_REGISTRY_PATH="${T}/registry"
|
||||||
|
export XDG_DATA_HOME="${T}/data"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# mono libs can live on /usr/lib as they are not arch specific
|
||||||
|
QA_MULTILIB_PATHS="usr/lib/"
|
||||||
|
}
|
||||||
|
|
||||||
|
_MONO_ENV=1
|
||||||
|
fi
|
@ -1,67 +0,0 @@
|
|||||||
# Copyright 1999-2007 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mozconfig-2.eclass,v 1.21 2010/01/27 12:06:22 ssuominen Exp $
|
|
||||||
#
|
|
||||||
# mozconfig.eclass: the new mozilla.eclass
|
|
||||||
|
|
||||||
inherit multilib flag-o-matic mozcoreconf
|
|
||||||
|
|
||||||
IUSE="debug gnome ipv6 xinerama"
|
|
||||||
|
|
||||||
RDEPEND="x11-libs/libXrender
|
|
||||||
x11-libs/libXt
|
|
||||||
x11-libs/libXmu
|
|
||||||
>=media-libs/jpeg-7
|
|
||||||
>=media-libs/libpng-1.2.1
|
|
||||||
dev-libs/expat
|
|
||||||
app-arch/zip
|
|
||||||
app-arch/unzip
|
|
||||||
>=x11-libs/gtk+-2.8.6
|
|
||||||
>=dev-libs/glib-2.8.2
|
|
||||||
>=x11-libs/pango-1.10.1
|
|
||||||
>=dev-libs/libIDL-0.8.0
|
|
||||||
gnome? ( >=gnome-base/gnome-vfs-2.3.5
|
|
||||||
>=gnome-base/libgnomeui-2.2.0 )
|
|
||||||
!<x11-base/xorg-x11-6.7.0-r2
|
|
||||||
>=x11-libs/cairo-1.0.0"
|
|
||||||
#According to bugs #18573, #204520, and couple of others in Mozilla's
|
|
||||||
#bugzilla. libmng and mng support has been removed in 2003.
|
|
||||||
|
|
||||||
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
xinerama? ( x11-proto/xineramaproto )"
|
|
||||||
|
|
||||||
mozconfig_config() {
|
|
||||||
mozconfig_use_enable ipv6
|
|
||||||
mozconfig_use_enable xinerama
|
|
||||||
|
|
||||||
# We use --enable-pango to do truetype fonts, and currently pango
|
|
||||||
# is required for it to build
|
|
||||||
mozconfig_annotate gentoo --disable-freetype2
|
|
||||||
|
|
||||||
if use debug; then
|
|
||||||
mozconfig_annotate +debug \
|
|
||||||
--enable-debug \
|
|
||||||
--enable-tests \
|
|
||||||
--disable-reorder \
|
|
||||||
--enable-debugger-info-modules=ALL_MODULES
|
|
||||||
else
|
|
||||||
mozconfig_annotate -debug \
|
|
||||||
--disable-debug \
|
|
||||||
--disable-tests \
|
|
||||||
--enable-reorder \
|
|
||||||
|
|
||||||
# Currently --enable-elf-dynstr-gc only works for x86 and ppc,
|
|
||||||
# thanks to Jason Wever <weeve@gentoo.org> for the fix.
|
|
||||||
# -- This breaks now on ppc, no idea why
|
|
||||||
# if use x86 || use ppc && [[ ${enable_optimize} != -O0 ]]; then
|
|
||||||
if use x86 && [[ ${enable_optimize} != -O0 ]]; then
|
|
||||||
mozconfig_annotate "${ARCH} optimized build" --enable-elf-dynstr-gc
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! use gnome; then
|
|
||||||
mozconfig_annotate -gnome --disable-gnomevfs
|
|
||||||
mozconfig_annotate -gnome --disable-gnomeui
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mozconfig-3.eclass,v 1.34 2013/01/16 23:57:37 anarchy Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/mozconfig-3.eclass,v 1.37 2013/08/28 15:23:12 axs Exp $
|
||||||
#
|
#
|
||||||
# mozconfig.eclass: the new mozilla.eclass
|
# mozconfig.eclass: the new mozilla.eclass
|
||||||
|
|
||||||
@ -17,12 +17,11 @@ RDEPEND="app-arch/zip
|
|||||||
app-arch/unzip
|
app-arch/unzip
|
||||||
>=app-text/hunspell-1.2
|
>=app-text/hunspell-1.2
|
||||||
dev-libs/expat
|
dev-libs/expat
|
||||||
>=dev-libs/libIDL-0.8.0
|
|
||||||
>=dev-libs/libevent-1.4.7
|
>=dev-libs/libevent-1.4.7
|
||||||
>=x11-libs/cairo-1.8[X]
|
>=x11-libs/cairo-1.8[X]
|
||||||
>=x11-libs/gtk+-2.8.6:2
|
>=x11-libs/gtk+-2.8.6:2
|
||||||
>=x11-libs/pango-1.10.1[X]
|
>=x11-libs/pango-1.10.1[X]
|
||||||
virtual/jpeg
|
virtual/jpeg:0
|
||||||
alsa? ( media-libs/alsa-lib )
|
alsa? ( media-libs/alsa-lib )
|
||||||
virtual/freedesktop-icon-theme
|
virtual/freedesktop-icon-theme
|
||||||
dbus? ( >=dev-libs/dbus-glib-0.72 )
|
dbus? ( >=dev-libs/dbus-glib-0.72 )
|
||||||
@ -65,6 +64,9 @@ mozconfig_config() {
|
|||||||
mozconfig_use_enable dbus
|
mozconfig_use_enable dbus
|
||||||
mozconfig_use_enable debug
|
mozconfig_use_enable debug
|
||||||
mozconfig_use_enable debug tests
|
mozconfig_use_enable debug tests
|
||||||
|
if ! use debug ; then
|
||||||
|
mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols
|
||||||
|
fi
|
||||||
mozconfig_use_enable startup-notification
|
mozconfig_use_enable startup-notification
|
||||||
mozconfig_use_enable system-sqlite
|
mozconfig_use_enable system-sqlite
|
||||||
mozconfig_use_enable wifi necko-wifi
|
mozconfig_use_enable wifi necko-wifi
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mozconfig.eclass,v 1.33 2009/11/30 04:19:36 abcd Exp $
|
|
||||||
|
|
||||||
# @DEAD
|
|
||||||
# To be removed on 2011/11/30.
|
|
||||||
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mozcoreconf-2.eclass,v 1.27 2013/01/16 19:02:10 mgorny Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/mozcoreconf-2.eclass,v 1.30 2013/08/26 14:39:36 anarchy Exp $
|
||||||
#
|
#
|
||||||
# mozcoreconf.eclass : core options for mozilla
|
# mozcoreconf.eclass : core options for mozilla
|
||||||
# inherit mozconfig-2 if you need USE flags
|
# inherit mozconfig-2 if you need USE flags
|
||||||
@ -14,7 +14,6 @@ IUSE="${IUSE} custom-cflags custom-optimization"
|
|||||||
|
|
||||||
RDEPEND="x11-libs/libXrender
|
RDEPEND="x11-libs/libXrender
|
||||||
x11-libs/libXt
|
x11-libs/libXt
|
||||||
x11-libs/libXmu
|
|
||||||
>=sys-libs/zlib-1.1.4"
|
>=sys-libs/zlib-1.1.4"
|
||||||
|
|
||||||
DEPEND="${RDEPEND}
|
DEPEND="${RDEPEND}
|
||||||
@ -94,6 +93,12 @@ moz_pkgsetup() {
|
|||||||
export NO_STATIC_LIB=1
|
export NO_STATIC_LIB=1
|
||||||
export USE_PTHREADS=1
|
export USE_PTHREADS=1
|
||||||
export ALDFLAGS=${LDFLAGS}
|
export ALDFLAGS=${LDFLAGS}
|
||||||
|
# ensure MOZCONFIG is not defined
|
||||||
|
eval unset MOZCONFIG
|
||||||
|
|
||||||
|
# nested configure scripts in mozilla products generate unrecognized options
|
||||||
|
# false positives when toplevel configure passes downwards.
|
||||||
|
export QA_CONFIGURE_OPTIONS=".*"
|
||||||
|
|
||||||
if [[ $(gcc-major-version) -eq 3 ]]; then
|
if [[ $(gcc-major-version) -eq 3 ]]; then
|
||||||
ewarn "Unsupported compiler detected, DO NOT file bugs for"
|
ewarn "Unsupported compiler detected, DO NOT file bugs for"
|
||||||
@ -108,11 +113,8 @@ mozconfig_init() {
|
|||||||
declare enable_optimize pango_version myext x
|
declare enable_optimize pango_version myext x
|
||||||
declare XUL=$([[ ${PN} == xulrunner ]] && echo true || echo false)
|
declare XUL=$([[ ${PN} == xulrunner ]] && echo true || echo false)
|
||||||
declare FF=$([[ ${PN} == firefox ]] && echo true || echo false)
|
declare FF=$([[ ${PN} == firefox ]] && echo true || echo false)
|
||||||
declare IC=$([[ ${PN} == icecat ]] && echo true || echo false)
|
|
||||||
declare SM=$([[ ${PN} == seamonkey ]] && echo true || echo false)
|
declare SM=$([[ ${PN} == seamonkey ]] && echo true || echo false)
|
||||||
declare TB=$([[ ${PN} == thunderbird ]] && echo true || echo false)
|
declare TB=$([[ ${PN} == thunderbird ]] && echo true || echo false)
|
||||||
declare EM=$([[ ${PN} == enigmail ]] && echo true || echo false)
|
|
||||||
|
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
#
|
#
|
||||||
@ -128,9 +130,6 @@ mozconfig_init() {
|
|||||||
*firefox)
|
*firefox)
|
||||||
cp browser/config/mozconfig .mozconfig \
|
cp browser/config/mozconfig .mozconfig \
|
||||||
|| die "cp browser/config/mozconfig failed" ;;
|
|| die "cp browser/config/mozconfig failed" ;;
|
||||||
*icecat)
|
|
||||||
cp browser/config/mozconfig .mozconfig \
|
|
||||||
|| die "cp browser/config/mozconfig failed" ;;
|
|
||||||
seamonkey)
|
seamonkey)
|
||||||
# Must create the initial mozconfig to enable application
|
# Must create the initial mozconfig to enable application
|
||||||
: >.mozconfig || die "initial mozconfig creation failed"
|
: >.mozconfig || die "initial mozconfig creation failed"
|
||||||
@ -139,9 +138,6 @@ mozconfig_init() {
|
|||||||
# Must create the initial mozconfig to enable application
|
# Must create the initial mozconfig to enable application
|
||||||
: >.mozconfig || die "initial mozconfig creation failed"
|
: >.mozconfig || die "initial mozconfig creation failed"
|
||||||
mozconfig_annotate "" --enable-application=mail ;;
|
mozconfig_annotate "" --enable-application=mail ;;
|
||||||
enigmail)
|
|
||||||
cp mail/config/mozconfig .mozconfig \
|
|
||||||
|| die "cp mail/config/mozconfig failed" ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
@ -215,7 +211,7 @@ mozconfig_init() {
|
|||||||
--enable-pango \
|
--enable-pango \
|
||||||
--enable-system-cairo
|
--enable-system-cairo
|
||||||
if ! $(mozversion_is_new_enough) ; then
|
if ! $(mozversion_is_new_enough) ; then
|
||||||
mozconfig annotate system-libs --enable-svg
|
mozconfig_annotate system-libs --enable-svg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mozconfig_annotate disable_update_strip \
|
mozconfig_annotate disable_update_strip \
|
||||||
@ -254,14 +250,6 @@ mozconfig_init() {
|
|||||||
! has_version ">=sys-libs/glibc-2.4" && mozconfig_annotate "we have old glibc" --disable-jemalloc
|
! has_version ">=sys-libs/glibc-2.4" && mozconfig_annotate "we have old glibc" --disable-jemalloc
|
||||||
}
|
}
|
||||||
|
|
||||||
makemake2() {
|
|
||||||
for m in $(find ../ -name Makefile.in); do
|
|
||||||
topdir=$(echo "$m" | sed -r 's:[^/]+:..:g')
|
|
||||||
sed -e "s:@srcdir@:.:g" -e "s:@top_srcdir@:${topdir}:g" \
|
|
||||||
< ${m} > ${m%.in} || die "sed ${m} failed"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# mozconfig_final: display a table describing all configuration options paired
|
# mozconfig_final: display a table describing all configuration options paired
|
||||||
# with reasons, then clean up extensions list
|
# with reasons, then clean up extensions list
|
||||||
mozconfig_final() {
|
mozconfig_final() {
|
||||||
|
@ -1,272 +0,0 @@
|
|||||||
# Copyright 1999-2007 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mozcoreconf.eclass,v 1.14 2008/01/05 16:15:09 armin76 Exp $
|
|
||||||
#
|
|
||||||
# mozcoreconf.eclass : core options for mozilla
|
|
||||||
# inherit mozconfig-2 if you need USE flags
|
|
||||||
|
|
||||||
inherit multilib flag-o-matic
|
|
||||||
|
|
||||||
RDEPEND="x11-libs/libXrender
|
|
||||||
x11-libs/libXt
|
|
||||||
x11-libs/libXmu
|
|
||||||
>=sys-libs/zlib-1.1.4"
|
|
||||||
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
dev-util/pkgconfig"
|
|
||||||
|
|
||||||
# Set by configure (plus USE_AUTOCONF=1), but useful for NSPR
|
|
||||||
export MOZILLA_CLIENT=1
|
|
||||||
export BUILD_OPT=1
|
|
||||||
export NO_STATIC_LIB=1
|
|
||||||
export USE_PTHREADS=1
|
|
||||||
|
|
||||||
mozconfig_init() {
|
|
||||||
declare enable_optimize pango_version myext x
|
|
||||||
declare MOZ=$([[ ${PN} == mozilla || ${PN} == gecko-sdk ]] && echo true || echo false)
|
|
||||||
declare FF=$([[ ${PN} == *firefox ]] && echo true || echo false)
|
|
||||||
declare TB=$([[ ${PN} == *thunderbird ]] && echo true || echo false)
|
|
||||||
declare SB=$([[ ${PN} == *sunbird ]] && echo true || echo false)
|
|
||||||
declare EM=$([[ ${PN} == enigmail ]] && echo true || echo false)
|
|
||||||
declare XUL=$([[ ${PN} == *xulrunner ]] && echo true || echo false)
|
|
||||||
declare SM=$([[ ${PN} == seamonkey ]] && echo true || echo false)
|
|
||||||
|
|
||||||
####################################
|
|
||||||
#
|
|
||||||
# Setup the initial .mozconfig
|
|
||||||
# See http://www.mozilla.org/build/configure-build.html
|
|
||||||
#
|
|
||||||
####################################
|
|
||||||
|
|
||||||
case ${PN} in
|
|
||||||
mozilla|gecko-sdk)
|
|
||||||
# The other builds have an initial --enable-extensions in their
|
|
||||||
# .mozconfig. The "default" set in configure applies to mozilla
|
|
||||||
# specifically.
|
|
||||||
: >.mozconfig || die "initial mozconfig creation failed"
|
|
||||||
mozconfig_annotate "" --enable-extensions=default ;;
|
|
||||||
*firefox)
|
|
||||||
cp browser/config/mozconfig .mozconfig \
|
|
||||||
|| die "cp browser/config/mozconfig failed" ;;
|
|
||||||
enigmail)
|
|
||||||
cp mail/config/mozconfig .mozconfig \
|
|
||||||
|| die "cp mail/config/mozconfig failed" ;;
|
|
||||||
*xulrunner)
|
|
||||||
cp xulrunner/config/mozconfig .mozconfig \
|
|
||||||
|| die "cp xulrunner/config/mozconfig failed" ;;
|
|
||||||
*sunbird)
|
|
||||||
cp calendar/sunbird/config/mozconfig .mozconfig \
|
|
||||||
|| die "cp calendar/sunbird/config/mozconfig failed" ;;
|
|
||||||
*thunderbird)
|
|
||||||
cp mail/config/mozconfig .mozconfig \
|
|
||||||
|| die "cp mail/config/mozconfig failed" ;;
|
|
||||||
seamonkey)
|
|
||||||
# The other builds have an initial --enable-extensions in their
|
|
||||||
# .mozconfig. The "default" set in configure applies to mozilla
|
|
||||||
# specifically.
|
|
||||||
: >.mozconfig || die "initial mozconfig creation failed"
|
|
||||||
mozconfig_annotate "" --enable-application=suite
|
|
||||||
mozconfig_annotate "" --enable-extensions=default ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
####################################
|
|
||||||
#
|
|
||||||
# CFLAGS setup and ARCH support
|
|
||||||
#
|
|
||||||
####################################
|
|
||||||
|
|
||||||
# Set optimization level based on CFLAGS
|
|
||||||
if is-flag -O0; then
|
|
||||||
mozconfig_annotate "from CFLAGS" --enable-optimize=-O0
|
|
||||||
elif [[ ${ARCH} == hppa ]]; then
|
|
||||||
mozconfig_annotate "more than -O0 causes segfaults on hppa" --enable-optimize=-O0
|
|
||||||
elif is-flag -O1; then
|
|
||||||
mozconfig_annotate "from CFLAGS" --enable-optimize=-O1
|
|
||||||
elif is-flag -Os; then
|
|
||||||
mozconfig_annotate "from CFLAGS" --enable-optimize=-Os
|
|
||||||
else
|
|
||||||
mozconfig_annotate "mozilla fallback" --enable-optimize=-O2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Now strip optimization from CFLAGS so it doesn't end up in the
|
|
||||||
# compile string
|
|
||||||
filter-flags '-O*'
|
|
||||||
|
|
||||||
# Strip over-aggressive CFLAGS - Mozilla supplies its own
|
|
||||||
# fine-tuned CFLAGS and shouldn't be interfered with.. Do this
|
|
||||||
# AFTER setting optimization above since strip-flags only allows
|
|
||||||
# -O -O1 and -O2
|
|
||||||
strip-flags
|
|
||||||
|
|
||||||
# Additional ARCH support
|
|
||||||
case "${ARCH}" in
|
|
||||||
alpha)
|
|
||||||
# Historically we have needed to add -fPIC manually for 64-bit.
|
|
||||||
# Additionally, alpha should *always* build with -mieee for correct math
|
|
||||||
# operation
|
|
||||||
append-flags -fPIC -mieee
|
|
||||||
;;
|
|
||||||
|
|
||||||
amd64|ia64)
|
|
||||||
# Historically we have needed to add this manually for 64-bit
|
|
||||||
append-flags -fPIC
|
|
||||||
;;
|
|
||||||
|
|
||||||
ppc64)
|
|
||||||
append-flags -fPIC -mminimal-toc
|
|
||||||
;;
|
|
||||||
|
|
||||||
ppc)
|
|
||||||
# Fix to avoid gcc-3.3.x micompilation issues.
|
|
||||||
if [[ $(gcc-major-version).$(gcc-minor-version) == 3.3 ]]; then
|
|
||||||
append-flags -fno-strict-aliasing
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
sparc)
|
|
||||||
# Sparc support ...
|
|
||||||
replace-sparc64-flags
|
|
||||||
;;
|
|
||||||
|
|
||||||
x86)
|
|
||||||
if [[ $(gcc-major-version) -eq 3 ]]; then
|
|
||||||
# gcc-3 prior to 3.2.3 doesn't work well for pentium4
|
|
||||||
# see bug 25332
|
|
||||||
if [[ $(gcc-minor-version) -lt 2 ||
|
|
||||||
( $(gcc-minor-version) -eq 2 && $(gcc-micro-version) -lt 3 ) ]]
|
|
||||||
then
|
|
||||||
replace-flags -march=pentium4 -march=pentium3
|
|
||||||
filter-flags -msse2
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ $(gcc-major-version) -eq 3 ]]; then
|
|
||||||
# Enable us to use flash, etc plugins compiled with gcc-2.95.3
|
|
||||||
mozconfig_annotate "building with >=gcc-3" --enable-old-abi-compat-wrappers
|
|
||||||
|
|
||||||
# Needed to build without warnings on gcc-3
|
|
||||||
CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Go a little faster; use less RAM
|
|
||||||
append-flags "$MAKEEDIT_FLAGS"
|
|
||||||
|
|
||||||
####################################
|
|
||||||
#
|
|
||||||
# mozconfig setup
|
|
||||||
#
|
|
||||||
####################################
|
|
||||||
|
|
||||||
mozconfig_annotate gentoo \
|
|
||||||
--disable-installer \
|
|
||||||
--disable-pedantic \
|
|
||||||
--enable-crypto \
|
|
||||||
--with-system-jpeg \
|
|
||||||
--with-system-png \
|
|
||||||
--with-system-zlib \
|
|
||||||
--disable-updater \
|
|
||||||
--enable-default-toolkit=gtk2 \
|
|
||||||
--enable-pango \
|
|
||||||
--enable-svg \
|
|
||||||
--enable-svg-renderer=cairo \
|
|
||||||
--enable-system-cairo \
|
|
||||||
--disable-strip \
|
|
||||||
--disable-strip-libs
|
|
||||||
|
|
||||||
if [[ ${PN} != seamonkey ]]; then
|
|
||||||
mozconfig_annotate gentoo \
|
|
||||||
--enable-single-profile \
|
|
||||||
--disable-profilesharing \
|
|
||||||
--disable-profilelocking
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Here is a strange one...
|
|
||||||
if is-flag '-mcpu=ultrasparc*' || is-flag '-mtune=ultrasparc*'; then
|
|
||||||
mozconfig_annotate "building on ultrasparc" --enable-js-ultrasparc
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Simulate the silly csh makemake script
|
|
||||||
makemake() {
|
|
||||||
typeset m topdir
|
|
||||||
for m in $(find . -name Makefile.in); do
|
|
||||||
topdir=$(echo "$m" | sed -r 's:[^/]+:..:g')
|
|
||||||
sed -e "s:@srcdir@:.:g" -e "s:@top_srcdir@:${topdir}:g" \
|
|
||||||
< ${m} > ${m%.in} || die "sed ${m} failed"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
makemake2() {
|
|
||||||
for m in $(find ../ -name Makefile.in); do
|
|
||||||
topdir=$(echo "$m" | sed -r 's:[^/]+:..:g')
|
|
||||||
sed -e "s:@srcdir@:.:g" -e "s:@top_srcdir@:${topdir}:g" \
|
|
||||||
< ${m} > ${m%.in} || die "sed ${m} failed"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# mozconfig_annotate: add an annotated line to .mozconfig
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# mozconfig_annotate "building on ultrasparc" --enable-js-ultrasparc
|
|
||||||
# => ac_add_options --enable-js-ultrasparc # building on ultrasparc
|
|
||||||
mozconfig_annotate() {
|
|
||||||
declare reason=$1 x ; shift
|
|
||||||
[[ $# -gt 0 ]] || die "mozconfig_annotate missing flags for ${reason}\!"
|
|
||||||
for x in ${*}; do
|
|
||||||
echo "ac_add_options ${x} # ${reason}" >>.mozconfig
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# mozconfig_use_enable: add a line to .mozconfig based on a USE-flag
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# mozconfig_use_enable truetype freetype2
|
|
||||||
# => ac_add_options --enable-freetype2 # +truetype
|
|
||||||
mozconfig_use_enable() {
|
|
||||||
declare flag=$(use_enable "$@")
|
|
||||||
mozconfig_annotate "$(useq $1 && echo +$1 || echo -$1)" "${flag}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# mozconfig_use_with: add a line to .mozconfig based on a USE-flag
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# mozconfig_use_with kerberos gss-api /usr/$(get_libdir)
|
|
||||||
# => ac_add_options --with-gss-api=/usr/lib # +kerberos
|
|
||||||
mozconfig_use_with() {
|
|
||||||
declare flag=$(use_with "$@")
|
|
||||||
mozconfig_annotate "$(useq $1 && echo +$1 || echo -$1)" "${flag}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# mozconfig_use_extension: enable or disable an extension based on a USE-flag
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# mozconfig_use_extension gnome gnomevfs
|
|
||||||
# => ac_add_options --enable-extensions=gnomevfs
|
|
||||||
mozconfig_use_extension() {
|
|
||||||
declare minus=$(useq $1 || echo -)
|
|
||||||
mozconfig_annotate "${minus:-+}$1" --enable-extensions=${minus}${2}
|
|
||||||
}
|
|
||||||
|
|
||||||
# mozconfig_final: display a table describing all configuration options paired
|
|
||||||
# with reasons, then clean up extensions list
|
|
||||||
mozconfig_final() {
|
|
||||||
declare ac opt hash reason
|
|
||||||
echo
|
|
||||||
echo "=========================================================="
|
|
||||||
echo "Building ${PF} with the following configuration"
|
|
||||||
grep ^ac_add_options .mozconfig | while read ac opt hash reason; do
|
|
||||||
[[ -z ${hash} || ${hash} == \# ]] \
|
|
||||||
|| die "error reading mozconfig: ${ac} ${opt} ${hash} ${reason}"
|
|
||||||
printf " %-30s %s\n" "${opt}" "${reason:-mozilla.org default}"
|
|
||||||
done
|
|
||||||
echo "=========================================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
# Resolve multiple --enable-extensions down to one
|
|
||||||
declare exts=$(sed -n 's/^ac_add_options --enable-extensions=\([^ ]*\).*/\1/p' \
|
|
||||||
.mozconfig | xargs)
|
|
||||||
sed -i '/^ac_add_options --enable-extensions/d' .mozconfig
|
|
||||||
echo "ac_add_options --enable-extensions=${exts// /,}" >> .mozconfig
|
|
||||||
}
|
|
@ -1,18 +1,29 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mozextension.eclass,v 1.7 2011/12/27 17:55:12 fauli Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/mozextension.eclass,v 1.9 2013/05/28 03:29:50 anarchy Exp $
|
||||||
#
|
#
|
||||||
# @ECLASS: mozextension.eclass
|
# @ECLASS: mozextension.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
# Mozilla team <mozilla@gentoo.org>
|
# Mozilla team <mozilla@gentoo.org>
|
||||||
# @DESCRIPTION:
|
# @BLURB: Install extensions for use in mozilla products.
|
||||||
# Install extensions for use in mozilla products.
|
|
||||||
|
|
||||||
|
|
||||||
inherit eutils
|
inherit eutils
|
||||||
|
|
||||||
DEPEND="app-arch/unzip"
|
DEPEND="app-arch/unzip"
|
||||||
|
|
||||||
|
mozversion_extension_location() {
|
||||||
|
case ${PN} in
|
||||||
|
firefox|firefox-bin)
|
||||||
|
if [[ $(get_version_component_range 1) -ge 21 ]] ; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
xpi_unpack() {
|
xpi_unpack() {
|
||||||
local xpi xpiname srcdir
|
local xpi xpiname srcdir
|
||||||
|
|
||||||
@ -54,6 +65,10 @@ xpi_install() {
|
|||||||
# determine id for extension
|
# determine id for extension
|
||||||
emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \
|
emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \
|
||||||
|| die "failed to determine extension id"
|
|| die "failed to determine extension id"
|
||||||
|
if $(mozversion_extension_location) ; then
|
||||||
|
insinto "${MOZILLA_FIVE_HOME}"/browser/extensions/${emid}
|
||||||
|
else
|
||||||
insinto "${MOZILLA_FIVE_HOME}"/extensions/${emid}
|
insinto "${MOZILLA_FIVE_HOME}"/extensions/${emid}
|
||||||
|
fi
|
||||||
doins -r "${x}"/* || die "failed to copy extension"
|
doins -r "${x}"/* || die "failed to copy extension"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mozlinguas.eclass,v 1.5 2012/09/27 16:35:41 axs Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/mozlinguas.eclass,v 1.6 2013/04/05 15:27:40 floppym Exp $
|
||||||
|
|
||||||
# @ECLASS: mozlinguas.eclass
|
# @ECLASS: mozlinguas.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -28,7 +28,6 @@ esac
|
|||||||
# Array containing the list of language pack xpis available for
|
# Array containing the list of language pack xpis available for
|
||||||
# this release. The list can be updated with scripts/get_langs.sh from the
|
# this release. The list can be updated with scripts/get_langs.sh from the
|
||||||
# mozilla overlay.
|
# mozilla overlay.
|
||||||
# @DEFAULT-UNSET
|
|
||||||
: ${MOZ_LANGS:=()}
|
: ${MOZ_LANGS:=()}
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: MOZ_PV
|
# @ECLASS-VARIABLE: MOZ_PV
|
||||||
@ -50,7 +49,6 @@ esac
|
|||||||
: ${MOZ_P:="${MOZ_PN}-${MOZ_PV}"}
|
: ${MOZ_P:="${MOZ_PN}-${MOZ_PV}"}
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: MOZ_FTP_URI
|
# @ECLASS-VARIABLE: MOZ_FTP_URI
|
||||||
# @DEFAULT-UNSET
|
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# The ftp URI prefix for the release tarballs and language packs.
|
# The ftp URI prefix for the release tarballs and language packs.
|
||||||
: ${MOZ_FTP_URI:=""}
|
: ${MOZ_FTP_URI:=""}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.12 2013/06/21 10:31:18 mgorny Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.13 2013/09/10 09:10:22 mgorny Exp $
|
||||||
|
|
||||||
# @ECLASS: multibuild
|
# @ECLASS: multibuild
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -28,6 +28,8 @@ if [[ ! ${_MULTIBUILD} ]]; then
|
|||||||
|
|
||||||
inherit multiprocessing
|
inherit multiprocessing
|
||||||
|
|
||||||
|
RDEPEND="userland_GNU? ( >=sys-apps/coreutils-8.5 )"
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: MULTIBUILD_VARIANTS
|
# @ECLASS-VARIABLE: MULTIBUILD_VARIANTS
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# An array specifying all enabled variants which multibuild_foreach*
|
# An array specifying all enabled variants which multibuild_foreach*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.14 2013/06/28 02:37:52 mgorny Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.20 2013/09/17 13:29:19 tommy Exp $
|
||||||
|
|
||||||
# @ECLASS: multilib-build.eclass
|
# @ECLASS: multilib-build.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -33,6 +33,11 @@ _MULTILIB_FLAGS=(
|
|||||||
abi_x86_32:x86
|
abi_x86_32:x86
|
||||||
abi_x86_64:amd64
|
abi_x86_64:amd64
|
||||||
abi_x86_x32:x32
|
abi_x86_x32:x32
|
||||||
|
abi_x86_32:x86_fbsd
|
||||||
|
abi_x86_64:amd64_fbsd
|
||||||
|
abi_mips_n32:n32
|
||||||
|
abi_mips_n64:n64
|
||||||
|
abi_mips_o32:o32
|
||||||
)
|
)
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: MULTILIB_USEDEP
|
# @ECLASS-VARIABLE: MULTILIB_USEDEP
|
||||||
@ -263,10 +268,6 @@ multilib_prepare_wrappers() {
|
|||||||
|
|
||||||
local dir=${f%/*}
|
local dir=${f%/*}
|
||||||
|
|
||||||
# $CHOST shall be set by multilib_toolchain_setup
|
|
||||||
dodir "/tmp/multilib-include/${CHOST}${dir}"
|
|
||||||
mv "${root}/usr/include${f}" "${ED}/tmp/multilib-include/${CHOST}${dir}/" || die
|
|
||||||
|
|
||||||
if [[ ! -f ${ED}/tmp/multilib-include${f} ]]; then
|
if [[ ! -f ${ED}/tmp/multilib-include${f} ]]; then
|
||||||
dodir "/tmp/multilib-include${dir}"
|
dodir "/tmp/multilib-include${dir}"
|
||||||
# a generic template
|
# a generic template
|
||||||
@ -284,21 +285,41 @@ multilib_prepare_wrappers() {
|
|||||||
# endif
|
# endif
|
||||||
#elif defined(__i386__) /* plain x86 */
|
#elif defined(__i386__) /* plain x86 */
|
||||||
# error "abi_x86_32 not supported by the package."
|
# error "abi_x86_32 not supported by the package."
|
||||||
|
#elif defined(__mips__)
|
||||||
|
# if(_MIPS_SIM == _ABIN32) /* n32 */
|
||||||
|
# error "abi_mips_n32 not supported by the package."
|
||||||
|
# elif(_MIPS_SIM == _ABI64) /* n64 */
|
||||||
|
# error "abi_mips_n64 not supported by the package."
|
||||||
|
# elif(_MIPS_SIM == _ABIO32) /* o32 */
|
||||||
|
# error "abi_mips_o32 not supported by the package."
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# error "No ABI matched, please report a bug to bugs.gentoo.org"
|
# error "No ABI matched, please report a bug to bugs.gentoo.org"
|
||||||
#endif
|
#endif
|
||||||
_EOF_
|
_EOF_
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Some ABIs may have install less files than others.
|
||||||
|
if [[ -f ${root}/usr/include${f} ]]; then
|
||||||
|
# $CHOST shall be set by multilib_toolchain_setup
|
||||||
|
dodir "/tmp/multilib-include/${CHOST}${dir}"
|
||||||
|
mv "${root}/usr/include${f}" "${ED}/tmp/multilib-include/${CHOST}${dir}/" || die
|
||||||
|
|
||||||
# XXX: get abi_* directly
|
# XXX: get abi_* directly
|
||||||
local abi_flag
|
local abi_flag
|
||||||
case "${ABI}" in
|
case "${ABI}" in
|
||||||
amd64)
|
amd64|amd64_fbsd)
|
||||||
abi_flag=abi_x86_64;;
|
abi_flag=abi_x86_64;;
|
||||||
x86)
|
x86|x86_fbsd)
|
||||||
abi_flag=abi_x86_32;;
|
abi_flag=abi_x86_32;;
|
||||||
x32)
|
x32)
|
||||||
abi_flag=abi_x86_x32;;
|
abi_flag=abi_x86_x32;;
|
||||||
|
n32)
|
||||||
|
abi_flag=abi_mips_n32;;
|
||||||
|
n64)
|
||||||
|
abi_flag=abi_mips_n64;;
|
||||||
|
o32)
|
||||||
|
abi_flag=abi_mips_o32;;
|
||||||
*)
|
*)
|
||||||
die "Header wrapping for ${ABI} not supported yet";;
|
die "Header wrapping for ${ABI} not supported yet";;
|
||||||
esac
|
esac
|
||||||
@ -306,6 +327,7 @@ _EOF_
|
|||||||
# Note: match a space afterwards to avoid collision potential.
|
# Note: match a space afterwards to avoid collision potential.
|
||||||
sed -e "/${abi_flag} /s&error.*&include <${CHOST}${f}>&" \
|
sed -e "/${abi_flag} /s&error.*&include <${CHOST}${f}>&" \
|
||||||
-i "${ED}/tmp/multilib-include${f}" || die
|
-i "${ED}/tmp/multilib-include${f}" || die
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,5 +360,39 @@ multilib_install_wrappers() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: multilib_is_native_abi
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Determine whether the currently built ABI is the profile native.
|
||||||
|
# Return true status (0) if that is true, otherwise false (1).
|
||||||
|
#
|
||||||
|
# This is often useful for configure calls when some of the options are
|
||||||
|
# supposed to be disabled for multilib ABIs (like those used for
|
||||||
|
# executables only).
|
||||||
|
multilib_is_native_abi() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
[[ ${#} -eq 0 ]] || die "${FUNCNAME}: too many arguments"
|
||||||
|
|
||||||
|
[[ ${ABI} == ${DEFAULT_ABI} ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: multilib_build_binaries
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Determine wheter to build binaries for the current build ABI.
|
||||||
|
# Returns true status (0) if the current built ABI is the profile
|
||||||
|
# native or COMPLETE_MULTILIB variable is set to yes, otherwise
|
||||||
|
# false (1).
|
||||||
|
#
|
||||||
|
# The COMPLETE_MULTILIB variable can be set by users or profiles
|
||||||
|
# when they want to build binaries for none-default ABI so e.g.
|
||||||
|
# 32bit binaries on amd64.
|
||||||
|
multilib_build_binaries() {
|
||||||
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
[[ ${#} -eq 0 ]] || die "${FUNCNAME}: too many arguments"
|
||||||
|
|
||||||
|
[[ ${COMPLETE_MULTILIB} == yes ]] || multilib_is_native_abi
|
||||||
|
}
|
||||||
|
|
||||||
_MULTILIB_BUILD=1
|
_MULTILIB_BUILD=1
|
||||||
fi
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.14 2013/01/28 02:13:05 robbat2 Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.18 2013/06/26 19:31:49 jmbsvicetto Exp $
|
||||||
|
|
||||||
# @ECLASS: mysql-autotools.eclass
|
# @ECLASS: mysql-autotools.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -51,14 +51,14 @@ mysql-autotools_disable_test() {
|
|||||||
# ${S}/mysql-tests/suite/ndb_team/t/disabled.def
|
# ${S}/mysql-tests/suite/ndb_team/t/disabled.def
|
||||||
# ${S}/mysql-tests/suite/binlog/t/disabled.def
|
# ${S}/mysql-tests/suite/binlog/t/disabled.def
|
||||||
# ${S}/mysql-tests/suite/innodb/t/disabled.def
|
# ${S}/mysql-tests/suite/innodb/t/disabled.def
|
||||||
if [ -n "${testsuite}" ]; then
|
if [[ -n ${testsuite} ]]; then
|
||||||
for mysql_disable_file in \
|
for mysql_disable_file in \
|
||||||
${S}/mysql-test/suite/${testsuite}/disabled.def \
|
${S}/mysql-test/suite/${testsuite}/disabled.def \
|
||||||
${S}/mysql-test/suite/${testsuite}/t/disabled.def \
|
${S}/mysql-test/suite/${testsuite}/t/disabled.def \
|
||||||
FAILED ; do
|
FAILED ; do
|
||||||
[ -f "${mysql_disable_file}" ] && break
|
[[ -f ${mysql_disable_file} ]] && break
|
||||||
done
|
done
|
||||||
if [ "${mysql_disabled_file}" != "FAILED" ]; then
|
if [[ ${mysql_disabled_file} != "FAILED" ]]; then
|
||||||
echo "${testname} : ${reason}" >> "${mysql_disable_file}"
|
echo "${testname} : ${reason}" >> "${mysql_disable_file}"
|
||||||
else
|
else
|
||||||
ewarn "Could not find testsuite disabled.def location for ${rawtestname}"
|
ewarn "Could not find testsuite disabled.def location for ${rawtestname}"
|
||||||
@ -99,7 +99,7 @@ mysql-autotools_configure_minimal() {
|
|||||||
|
|
||||||
# MariaDB requires this flag in order to link to GPLv3 readline v6 or greater
|
# MariaDB requires this flag in order to link to GPLv3 readline v6 or greater
|
||||||
# A note is added to the configure output
|
# A note is added to the configure output
|
||||||
if [[ "${PN}" == "mariadb" ]] && mysql_version_is_at_least "5.1.61" ; then
|
if [[ ${PN} == "mariadb" ]] && mysql_version_is_at_least "5.1.61" ; then
|
||||||
myconf="${myconf} --disable-distribution"
|
myconf="${myconf} --disable-distribution"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ mysql-autotools_configure_common() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${MYSQL_DEFAULT_CHARSET}" -a -n "${MYSQL_DEFAULT_COLLATION}" ]; then
|
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
|
||||||
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
|
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
|
||||||
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
|
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
|
||||||
ewarn "You MUST file bugs without these variables set."
|
ewarn "You MUST file bugs without these variables set."
|
||||||
@ -220,7 +220,7 @@ mysql-autotools_configure_51() {
|
|||||||
# Not supporting as examples: example,daemon_example,ftexample
|
# Not supporting as examples: example,daemon_example,ftexample
|
||||||
plugins_sta="${plugins_sta} partition"
|
plugins_sta="${plugins_sta} partition"
|
||||||
|
|
||||||
if [[ "${PN}" != "mariadb" ]] ; then
|
if [[ ${PN} != "mariadb" ]] ; then
|
||||||
elog "Before using the Federated storage engine, please be sure to read"
|
elog "Before using the Federated storage engine, please be sure to read"
|
||||||
elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html"
|
elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html"
|
||||||
plugins_dyn="${plugins_dyn} federated"
|
plugins_dyn="${plugins_dyn} federated"
|
||||||
@ -237,10 +237,10 @@ mysql-autotools_configure_51() {
|
|||||||
# - innobase, innodb_plugin
|
# - innobase, innodb_plugin
|
||||||
# Build falcon if available for 6.x series.
|
# Build falcon if available for 6.x series.
|
||||||
for i in innobase falcon ; do
|
for i in innobase falcon ; do
|
||||||
[ -e "${S}"/storage/${i} ] && plugins_sta="${plugins_sta} ${i}"
|
[[ -e ${S}/storage/${i} ]] && plugins_sta="${plugins_sta} ${i}"
|
||||||
done
|
done
|
||||||
for i in innodb_plugin ; do
|
for i in innodb_plugin ; do
|
||||||
[ -e "${S}"/storage/${i} ] && plugins_dyn="${plugins_dyn} ${i}"
|
[[ -e ${S}/storage/${i} ]] && plugins_dyn="${plugins_dyn} ${i}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# like configuration=max-no-ndb
|
# like configuration=max-no-ndb
|
||||||
@ -252,12 +252,12 @@ mysql-autotools_configure_51() {
|
|||||||
plugins_dis="${plugins_dis} ndbcluster"
|
plugins_dis="${plugins_dis} ndbcluster"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${PN}" == "mariadb" ]] ; then
|
if [[ ${PN} == "mariadb" ]] ; then
|
||||||
# In MariaDB, InnoDB is packaged in the xtradb directory, so it's not
|
# In MariaDB, InnoDB is packaged in the xtradb directory, so it's not
|
||||||
# caught above.
|
# caught above.
|
||||||
# This is not optional, without it several upstream testcases fail.
|
# This is not optional, without it several upstream testcases fail.
|
||||||
# Also strongly recommended by upstream.
|
# Also strongly recommended by upstream.
|
||||||
if [[ "${PV}" < "5.2.0" ]] ; then
|
if [[ ${PV} < "5.2.0" ]] ; then
|
||||||
myconf="${myconf} --with-maria-tmp-tables"
|
myconf="${myconf} --with-maria-tmp-tables"
|
||||||
plugins_sta="${plugins_sta} maria"
|
plugins_sta="${plugins_sta} maria"
|
||||||
else
|
else
|
||||||
@ -265,11 +265,11 @@ mysql-autotools_configure_51() {
|
|||||||
plugins_sta="${plugins_sta} aria"
|
plugins_sta="${plugins_sta} aria"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -e "${S}"/storage/innobase ] || [ -e "${S}"/storage/xtradb ] ||
|
[[ ( -e ${S}/storage/innobase ) || ( -e ${S}/storage/xtradb ) ]] ||
|
||||||
die "The ${P} package doesn't provide innobase nor xtradb"
|
die "The ${P} package doesn't provide innobase nor xtradb"
|
||||||
|
|
||||||
for i in innobase xtradb ; do
|
for i in innobase xtradb ; do
|
||||||
[ -e "${S}"/storage/${i} ] && plugins_sta="${plugins_sta} ${i}"
|
[[ -e ${S}/storage/${i} ]] && plugins_sta="${plugins_sta} ${i}"
|
||||||
done
|
done
|
||||||
|
|
||||||
myconf="${myconf} $(use_with libevent)"
|
myconf="${myconf} $(use_with libevent)"
|
||||||
@ -289,9 +289,18 @@ mysql-autotools_configure_51() {
|
|||||||
|| plugins_dis="${plugins_dis} ${i}"
|
|| plugins_dis="${plugins_dis} ${i}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#Authentication plugins
|
||||||
|
if mysql_version_is_at_least "5.2.11" ; then
|
||||||
|
for i in pam ; do
|
||||||
|
use ${i} \
|
||||||
|
&& plugins_dyn="${plugins_dyn} auth_${i}" \
|
||||||
|
|| plugins_dis="${plugins_dis} auth_${i}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]]; then
|
if pbxt_available && [[ ${PBXT_NEWSTYLE} == "1" ]]; then
|
||||||
use pbxt \
|
use pbxt \
|
||||||
&& plugins_sta="${plugins_sta} pbxt" \
|
&& plugins_sta="${plugins_sta} pbxt" \
|
||||||
|| plugins_dis="${plugins_dis} pbxt"
|
|| plugins_dis="${plugins_dis} pbxt"
|
||||||
@ -302,7 +311,7 @@ mysql-autotools_configure_51() {
|
|||||||
plugins_dyn=""
|
plugins_dyn=""
|
||||||
|
|
||||||
# Google MySQL, bundle what upstream supports
|
# Google MySQL, bundle what upstream supports
|
||||||
if [[ "${PN}" == "google-mysql" ]]; then
|
if [[ ${PN} == "google-mysql" ]]; then
|
||||||
for x in innobase innodb_plugin innodb ; do
|
for x in innobase innodb_plugin innodb ; do
|
||||||
plugins_sta="${plugins_sta//$x}"
|
plugins_sta="${plugins_sta//$x}"
|
||||||
plugins_dyn="${plugins_dyn//$x}"
|
plugins_dyn="${plugins_dyn//$x}"
|
||||||
@ -380,7 +389,7 @@ mysql-autotools_src_prepare() {
|
|||||||
|
|
||||||
# last -fPIC fixup, per bug #305873
|
# last -fPIC fixup, per bug #305873
|
||||||
i="${S}"/storage/innodb_plugin/plug.in
|
i="${S}"/storage/innodb_plugin/plug.in
|
||||||
[ -f "${i}" ] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}"
|
[[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}"
|
||||||
|
|
||||||
# Additional checks, remove bundled zlib
|
# Additional checks, remove bundled zlib
|
||||||
rm -f "${S}/zlib/"*.[ch]
|
rm -f "${S}/zlib/"*.[ch]
|
||||||
@ -408,18 +417,18 @@ mysql-autotools_src_prepare() {
|
|||||||
i="innobase"
|
i="innobase"
|
||||||
o="${WORKDIR}/storage-${i}.mysql-upstream"
|
o="${WORKDIR}/storage-${i}.mysql-upstream"
|
||||||
# Have we been here already?
|
# Have we been here already?
|
||||||
[ -d "${o}" ] && rm -f "${i}"
|
[[ -d ${o} ]] && rm -f "${i}"
|
||||||
# Or maybe we haven't
|
# Or maybe we haven't
|
||||||
[ -d "${i}" -a ! -d "${o}" ] && mv "${i}" "${o}"
|
[[ ( -d ${i} ) && ! ( -d ${o} ) ]] && mv "${i}" "${o}"
|
||||||
cp -ral "${WORKDIR}/${XTRADB_P}" "${i}"
|
cp -ral "${WORKDIR}/${XTRADB_P}" "${i}"
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if pbxt_patch_available && [[ "${PBXT_NEWSTYLE}" == "1" ]] && use pbxt ; then
|
if pbxt_patch_available && [[ ${PBXT_NEWSTYLE} == "1" ]] && use pbxt ; then
|
||||||
einfo "Adding storage engine: PBXT"
|
einfo "Adding storage engine: PBXT"
|
||||||
pushd "${S}"/storage >/dev/null
|
pushd "${S}"/storage >/dev/null
|
||||||
i='pbxt'
|
i='pbxt'
|
||||||
[ -d "${i}" ] && rm -rf "${i}"
|
[[ -d ${i} ]] && rm -rf "${i}"
|
||||||
cp -ral "${WORKDIR}/${PBXT_P}" "${i}"
|
cp -ral "${WORKDIR}/${PBXT_P}" "${i}"
|
||||||
f="${WORKDIR}/mysql-extras/pbxt/fix-low-priority.patch"
|
f="${WORKDIR}/mysql-extras/pbxt/fix-low-priority.patch"
|
||||||
[[ -f $f ]] && epatch "$f"
|
[[ -f $f ]] && epatch "$f"
|
||||||
@ -447,6 +456,8 @@ mysql-autotools_src_prepare() {
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Configure mysql to build the code for Gentoo respecting the use flags.
|
# Configure mysql to build the code for Gentoo respecting the use flags.
|
||||||
mysql-autotools_src_configure() {
|
mysql-autotools_src_configure() {
|
||||||
|
# bug 401733
|
||||||
|
export QA_CONFIGURE_OPTIONS=".*"
|
||||||
|
|
||||||
# Make sure the vars are correctly initialized
|
# Make sure the vars are correctly initialized
|
||||||
mysql_init_vars
|
mysql_init_vars
|
||||||
@ -465,7 +476,7 @@ mysql-autotools_src_configure() {
|
|||||||
filter-flags "-O" "-O[01]"
|
filter-flags "-O" "-O[01]"
|
||||||
|
|
||||||
# glib-2.3.2_pre fix, bug #16496
|
# glib-2.3.2_pre fix, bug #16496
|
||||||
append-flags "-DHAVE_ERRNO_AS_DEFINE=1"
|
append-cppflags "-DHAVE_ERRNO_AS_DEFINE=1"
|
||||||
|
|
||||||
# As discovered by bug #246652, doing a double-level of SSP causes NDB to
|
# As discovered by bug #246652, doing a double-level of SSP causes NDB to
|
||||||
# fail badly during cluster startup.
|
# fail badly during cluster startup.
|
||||||
@ -479,7 +490,7 @@ mysql-autotools_src_configure() {
|
|||||||
# implicitly. Upstream might be interested in this, exclude
|
# implicitly. Upstream might be interested in this, exclude
|
||||||
# -fno-implicit-templates for google-mysql for now.
|
# -fno-implicit-templates for google-mysql for now.
|
||||||
mysql_version_is_at_least "5.0" \
|
mysql_version_is_at_least "5.0" \
|
||||||
&& [[ "${PN}" != "google-mysql" ]] \
|
&& [[ ${PN} != "google-mysql" ]] \
|
||||||
&& CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
|
&& CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
|
||||||
export CXXFLAGS
|
export CXXFLAGS
|
||||||
|
|
||||||
@ -515,7 +526,7 @@ mysql-autotools_src_configure() {
|
|||||||
| xargs -0 -n100 sed -i \
|
| xargs -0 -n100 sed -i \
|
||||||
-e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|'
|
-e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|'
|
||||||
|
|
||||||
if [[ $EAPI == 2 ]] && [[ "${PBXT_NEWSTYLE}" != "1" ]]; then
|
if [[ $EAPI == 2 ]] && [[ ${PBXT_NEWSTYLE} != "1" ]]; then
|
||||||
pbxt_patch_available && use pbxt && pbxt_src_configure
|
pbxt_patch_available && use pbxt && pbxt_src_configure
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -527,7 +538,7 @@ mysql-autotools_src_compile() {
|
|||||||
|
|
||||||
emake || die "emake failed"
|
emake || die "emake failed"
|
||||||
|
|
||||||
if [[ "${PBXT_NEWSTYLE}" != "1" ]]; then
|
if [[ ${PBXT_NEWSTYLE} != "1" ]]; then
|
||||||
pbxt_patch_available && use pbxt && pbxt_src_compile
|
pbxt_patch_available && use pbxt && pbxt_src_compile
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -546,7 +557,7 @@ mysql-autotools_src_install() {
|
|||||||
testroot="${MY_SHAREDSTATEDIR}" \
|
testroot="${MY_SHAREDSTATEDIR}" \
|
||||||
|| die "emake install failed"
|
|| die "emake install failed"
|
||||||
|
|
||||||
if [[ "${PBXT_NEWSTYLE}" != "1" ]]; then
|
if [[ ${PBXT_NEWSTYLE} != "1" ]]; then
|
||||||
pbxt_patch_available && use pbxt && pbxt_src_install
|
pbxt_patch_available && use pbxt && pbxt_src_install
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -609,7 +620,7 @@ mysql-autotools_src_install() {
|
|||||||
# Empty directories ...
|
# Empty directories ...
|
||||||
diropts "-m0750"
|
diropts "-m0750"
|
||||||
keepdir "${MY_DATADIR#${EPREFIX}}"
|
keepdir "${MY_DATADIR#${EPREFIX}}"
|
||||||
if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then
|
if [[ ${PREVIOUS_DATADIR} != "yes" ]] ; then
|
||||||
chown -R mysql:mysql "${D}/${MY_DATADIR}"
|
chown -R mysql:mysql "${D}/${MY_DATADIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -624,7 +635,7 @@ mysql-autotools_src_install() {
|
|||||||
# Docs
|
# Docs
|
||||||
einfo "Installing docs"
|
einfo "Installing docs"
|
||||||
for i in README ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE ; do
|
for i in README ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE ; do
|
||||||
[[ -f "$i" ]] && dodoc "$i"
|
[[ -f $i ]] && dodoc "$i"
|
||||||
done
|
done
|
||||||
doinfo "${S}"/Docs/mysql.info
|
doinfo "${S}"/Docs/mysql.info
|
||||||
|
|
||||||
@ -637,15 +648,23 @@ mysql-autotools_src_install() {
|
|||||||
"${S}"/support-files/magic \
|
"${S}"/support-files/magic \
|
||||||
"${S}"/support-files/ndb-config-2-node.ini
|
"${S}"/support-files/ndb-config-2-node.ini
|
||||||
do
|
do
|
||||||
[[ -f "$script" ]] && dodoc "${script}"
|
[[ -f $script ]] && dodoc "${script}"
|
||||||
done
|
done
|
||||||
|
|
||||||
docinto "scripts"
|
docinto "scripts"
|
||||||
for script in "${S}"/scripts/mysql* ; do
|
for script in "${S}"/scripts/mysql* ; do
|
||||||
[[ -f "$script" ]] && [[ "${script%.sh}" == "${script}" ]] && dodoc "${script}"
|
[[ ( -f $script ) && ( ${script%.sh} == ${script} ) ]] && dodoc "${script}"
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mysql_lib_symlinks "${ED}"
|
mysql_lib_symlinks "${ED}"
|
||||||
|
|
||||||
|
#Remove mytop if perl is not selected
|
||||||
|
[[ ${PN} == "mariadb" ]] && ! use perl \
|
||||||
|
&& mysql_version_is_at_least "5.3" \
|
||||||
|
&& rm -f "${ED}/usr/bin/mytop"
|
||||||
|
|
||||||
|
#Bug 455462 remove unnecessary libtool files
|
||||||
|
prune_libtool_files --modules
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.13 2013/01/20 02:37:51 robbat2 Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.17 2013/06/27 17:23:33 jmbsvicetto Exp $
|
||||||
|
|
||||||
# @ECLASS: mysql-cmake.eclass
|
# @ECLASS: mysql-cmake.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -36,29 +36,29 @@ mysql-cmake_disable_test() {
|
|||||||
for mysql_disabled_file in \
|
for mysql_disabled_file in \
|
||||||
${S}/mysql-test/disabled.def \
|
${S}/mysql-test/disabled.def \
|
||||||
${S}/mysql-test/t/disabled.def ; do
|
${S}/mysql-test/t/disabled.def ; do
|
||||||
[ -f "${mysql_disabled_file}" ] && break
|
[[ -f ${mysql_disabled_file} ]] && break
|
||||||
done
|
done
|
||||||
#mysql_disabled_file="${S}/mysql-test/t/disabled.def"
|
#mysql_disabled_file="${S}/mysql-test/t/disabled.def"
|
||||||
#einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}"
|
#einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}"
|
||||||
echo ${testname} : ${reason} >> "${mysql_disabled_file}"
|
echo ${testname} : ${reason} >> "${mysql_disabled_file}"
|
||||||
|
|
||||||
if [ -n "${testsuite}" ] && [ "${testsuite}" != "main" ]; then
|
if [[ ( -n ${testsuite} ) && ( ${testsuite} != "main" ) ]]; then
|
||||||
for mysql_disabled_file in \
|
for mysql_disabled_file in \
|
||||||
${S}/mysql-test/suite/${testsuite}/disabled.def \
|
${S}/mysql-test/suite/${testsuite}/disabled.def \
|
||||||
${S}/mysql-test/suite/${testsuite}/t/disabled.def \
|
${S}/mysql-test/suite/${testsuite}/t/disabled.def \
|
||||||
FAILED ; do
|
FAILED ; do
|
||||||
[ -f "${mysql_disabled_file}" ] && break
|
[[ -f ${mysql_disabled_file} ]] && break
|
||||||
done
|
done
|
||||||
if [ "${mysql_disabled_file}" != "FAILED" ]; then
|
if [[ ${mysql_disabled_file} != "FAILED" ]]; then
|
||||||
echo "${testname} : ${reason}" >> "${mysql_disabled_file}"
|
echo "${testname} : ${reason}" >> "${mysql_disabled_file}"
|
||||||
else
|
else
|
||||||
for mysql_disabled_dir in \
|
for mysql_disabled_dir in \
|
||||||
${S}/mysql-test/suite/${testsuite} \
|
${S}/mysql-test/suite/${testsuite} \
|
||||||
${S}/mysql-test/suite/${testsuite}/t \
|
${S}/mysql-test/suite/${testsuite}/t \
|
||||||
FAILED ; do
|
FAILED ; do
|
||||||
[ -d "${mysql_disabled_dir}" ] && break
|
[[ -d ${mysql_disabled_dir} ]] && break
|
||||||
done
|
done
|
||||||
if [ "${mysql_disabled_dir}" != "FAILED" ]; then
|
if [[ ${mysql_disabled_dir} != "FAILED" ]]; then
|
||||||
echo "${testname} : ${reason}" >> "${mysql_disabled_dir}/disabled.def"
|
echo "${testname} : ${reason}" >> "${mysql_disabled_dir}/disabled.def"
|
||||||
else
|
else
|
||||||
ewarn "Could not find testsuite disabled.def location for ${rawtestname}"
|
ewarn "Could not find testsuite disabled.def location for ${rawtestname}"
|
||||||
@ -72,7 +72,7 @@ mysql-cmake_disable_test() {
|
|||||||
# Helper function to configure locale cmake options
|
# Helper function to configure locale cmake options
|
||||||
configure_cmake_locale() {
|
configure_cmake_locale() {
|
||||||
|
|
||||||
if ! use minimal && [ -n "${MYSQL_DEFAULT_CHARSET}" -a -n "${MYSQL_DEFAULT_COLLATION}" ]; then
|
if ! use minimal && [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
|
||||||
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
|
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
|
||||||
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
|
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
|
||||||
ewarn "You MUST file bugs without these variables set."
|
ewarn "You MUST file bugs without these variables set."
|
||||||
@ -151,7 +151,7 @@ configure_cmake_standard() {
|
|||||||
if use ssl; then
|
if use ssl; then
|
||||||
mycmakeargs+=( -DWITH_SSL=system )
|
mycmakeargs+=( -DWITH_SSL=system )
|
||||||
else
|
else
|
||||||
mycmakeargs+=( -DWITH_SSL=0 )
|
mycmakeargs+=( -DWITH_SSL=bundled )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if mysql_version_is_at_least "5.5" && use jemalloc; then
|
if mysql_version_is_at_least "5.5" && use jemalloc; then
|
||||||
@ -179,12 +179,22 @@ configure_cmake_standard() {
|
|||||||
mycmakeargs+=( $(cmake-utils_use_with pbxt PBXT_STORAGE_ENGINE) )
|
mycmakeargs+=( $(cmake-utils_use_with pbxt PBXT_STORAGE_ENGINE) )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${PN}" == "mariadb" ]; then
|
if [[ ${PN} == "mariadb" ]]; then
|
||||||
mycmakeargs+=(
|
mycmakeargs+=(
|
||||||
$(cmake-utils_use_with oqgraph OQGRAPH_STORAGE_ENGINE)
|
$(cmake-utils_use_with oqgraph OQGRAPH_STORAGE_ENGINE)
|
||||||
$(cmake-utils_use_with sphinx SPHINX_STORAGE_ENGINE)
|
$(cmake-utils_use_with sphinx SPHINX_STORAGE_ENGINE)
|
||||||
$(cmake-utils_use_with extraengine FEDERATEDX_STORAGE_ENGINE)
|
$(cmake-utils_use_with extraengine FEDERATEDX_STORAGE_ENGINE)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ! use pam ; then
|
||||||
|
mycmakeargs+=( -DAUTH_PAM_DISABLED=1 )
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${PN} == "percona-server" ]]; then
|
||||||
|
mycmakeargs+=(
|
||||||
|
$(cmake-utils_use_with pam)
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,9 +223,10 @@ mysql-cmake_src_prepare() {
|
|||||||
|
|
||||||
# last -fPIC fixup, per bug #305873
|
# last -fPIC fixup, per bug #305873
|
||||||
i="${S}"/storage/innodb_plugin/plug.in
|
i="${S}"/storage/innodb_plugin/plug.in
|
||||||
[ -f "${i}" ] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}"
|
[[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}"
|
||||||
|
|
||||||
rm -f "scripts/mysqlbug"
|
rm -f "scripts/mysqlbug"
|
||||||
|
epatch_user
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: mysql-cmake_src_configure
|
# @FUNCTION: mysql-cmake_src_configure
|
||||||
@ -247,13 +258,13 @@ mysql-cmake_src_configure() {
|
|||||||
-DINSTALL_SQLBENCHDIR=share/mysql
|
-DINSTALL_SQLBENCHDIR=share/mysql
|
||||||
-DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql
|
-DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql
|
||||||
-DWITH_COMMENT="Gentoo Linux ${PF}"
|
-DWITH_COMMENT="Gentoo Linux ${PF}"
|
||||||
-DWITHOUT_UNIT_TESTS=1
|
$(cmake-utils_use_with test UNIT_TESTS)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Bug 412851
|
# Bug 412851
|
||||||
# MariaDB requires this flag to compile with GPLv3 readline linked
|
# MariaDB requires this flag to compile with GPLv3 readline linked
|
||||||
# Adds a warning about redistribution to configure
|
# Adds a warning about redistribution to configure
|
||||||
if [[ "${PN}" == "mariadb" ]] ; then
|
if [[ ${PN} == "mariadb" ]] ; then
|
||||||
mycmakeargs+=( -DNOT_FOR_DISTRIBUTION=1 )
|
mycmakeargs+=( -DNOT_FOR_DISTRIBUTION=1 )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -268,9 +279,16 @@ mysql-cmake_src_configure() {
|
|||||||
# Bug #114895, bug #110149
|
# Bug #114895, bug #110149
|
||||||
filter-flags "-O" "-O[01]"
|
filter-flags "-O" "-O[01]"
|
||||||
|
|
||||||
CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-strict-aliasing"
|
CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
|
||||||
CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti"
|
CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti"
|
||||||
|
# Causes linkage failures. Upstream bug #59607 removes it
|
||||||
|
if ! mysql_version_is_at_least "5.6" ; then
|
||||||
CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
|
CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
|
||||||
|
fi
|
||||||
|
# As of 5.7, exceptions are used!
|
||||||
|
if ! mysql_version_is_at_least "5.7" ; then
|
||||||
|
CXXFLAGS="${CXXFLAGS} -fno-exceptions"
|
||||||
|
fi
|
||||||
export CXXFLAGS
|
export CXXFLAGS
|
||||||
|
|
||||||
# bug #283926, with GCC4.4, this is required to get correct behavior.
|
# bug #283926, with GCC4.4, this is required to get correct behavior.
|
||||||
@ -307,6 +325,9 @@ mysql-cmake_src_install() {
|
|||||||
dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair"
|
dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair"
|
||||||
dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize"
|
dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize"
|
||||||
|
|
||||||
|
# Create a mariadb_config symlink
|
||||||
|
[[ ${PN} == "mariadb" ]] && dosym "/usr/bin/mysql_config" "/usr/bin/mariadb_config"
|
||||||
|
|
||||||
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
|
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
|
||||||
rm -Rf "${ED}/usr/data"
|
rm -Rf "${ED}/usr/data"
|
||||||
|
|
||||||
@ -332,7 +353,7 @@ mysql-cmake_src_install() {
|
|||||||
# Configuration stuff
|
# Configuration stuff
|
||||||
case ${MYSQL_PV_MAJOR} in
|
case ${MYSQL_PV_MAJOR} in
|
||||||
5.[1-4]*) mysql_mycnf_version="5.1" ;;
|
5.[1-4]*) mysql_mycnf_version="5.1" ;;
|
||||||
5.[5-9]|6*|7*) mysql_mycnf_version="5.5" ;;
|
5.[5-9]|6*|7*|8*|9*|10*) mysql_mycnf_version="5.5" ;;
|
||||||
esac
|
esac
|
||||||
einfo "Building default my.cnf (${mysql_mycnf_version})"
|
einfo "Building default my.cnf (${mysql_mycnf_version})"
|
||||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
|
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
|
||||||
@ -354,7 +375,7 @@ mysql-cmake_src_install() {
|
|||||||
einfo "Creating initial directories"
|
einfo "Creating initial directories"
|
||||||
# Empty directories ...
|
# Empty directories ...
|
||||||
diropts "-m0750"
|
diropts "-m0750"
|
||||||
if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then
|
if [[ ${PREVIOUS_DATADIR} != "yes" ]] ; then
|
||||||
dodir "${MY_DATADIR#${EPREFIX}}"
|
dodir "${MY_DATADIR#${EPREFIX}}"
|
||||||
keepdir "${MY_DATADIR#${EPREFIX}}"
|
keepdir "${MY_DATADIR#${EPREFIX}}"
|
||||||
chown -R mysql:mysql "${D}/${MY_DATADIR}"
|
chown -R mysql:mysql "${D}/${MY_DATADIR}"
|
||||||
@ -377,15 +398,21 @@ mysql-cmake_src_install() {
|
|||||||
"${S}"/support-files/magic \
|
"${S}"/support-files/magic \
|
||||||
"${S}"/support-files/ndb-config-2-node.ini.sh
|
"${S}"/support-files/ndb-config-2-node.ini.sh
|
||||||
do
|
do
|
||||||
[[ -f "$script" ]] && dodoc "${script}"
|
[[ -f $script ]] && dodoc "${script}"
|
||||||
done
|
done
|
||||||
|
|
||||||
docinto "scripts"
|
docinto "scripts"
|
||||||
for script in "${S}"/scripts/mysql* ; do
|
for script in "${S}"/scripts/mysql* ; do
|
||||||
[[ -f "$script" ]] && [[ "${script%.sh}" == "${script}" ]] && dodoc "${script}"
|
[[ ( -f $script ) && ( ${script%.sh} == ${script} ) ]] && dodoc "${script}"
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mysql_lib_symlinks "${ED}"
|
cat <<-EOF > "${T}"/80mysql-libdir
|
||||||
|
LDPATH="${EPREFIX}/usr/$(get_libdir)/mysql"
|
||||||
|
EOF
|
||||||
|
doenvd "${T}"/80mysql-libdir
|
||||||
|
|
||||||
|
#Remove mytop if perl is not selected
|
||||||
|
[[ ${PN} == "mariadb" ]] && ! use perl \
|
||||||
|
&& rm -f "${ED}/usr/bin/mytop"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.23 2013/01/28 02:13:05 robbat2 Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.25 2013/06/26 19:31:49 jmbsvicetto Exp $
|
||||||
|
|
||||||
# @ECLASS: mysql-v2.eclass
|
# @ECLASS: mysql-v2.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -11,7 +11,7 @@
|
|||||||
# @BLURB: This eclass provides most of the functions for mysql ebuilds
|
# @BLURB: This eclass provides most of the functions for mysql ebuilds
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# The mysql-v2.eclass is the base eclass to build the mysql and
|
# The mysql-v2.eclass is the base eclass to build the mysql and
|
||||||
# alternative projects (mariadb) ebuilds.
|
# alternative projects (mariadb and percona) ebuilds.
|
||||||
# This eclass uses the mysql-autotools and mysql-cmake eclasses for the
|
# This eclass uses the mysql-autotools and mysql-cmake eclasses for the
|
||||||
# specific bits related to the build system.
|
# specific bits related to the build system.
|
||||||
# It provides the src_unpack, src_prepare, src_configure, src_compile,
|
# It provides the src_unpack, src_prepare, src_configure, src_compile,
|
||||||
@ -44,7 +44,7 @@ MYSQL_EXTRAS=""
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# The version of the MYSQL_EXTRAS repo to use to build mysql
|
# The version of the MYSQL_EXTRAS repo to use to build mysql
|
||||||
# Use "none" to disable it's use
|
# Use "none" to disable it's use
|
||||||
[[ "${MY_EXTRAS_VER}" == "live" ]] && MYSQL_EXTRAS="git-2"
|
[[ ${MY_EXTRAS_VER} == "live" ]] && MYSQL_EXTRAS="git-2"
|
||||||
|
|
||||||
inherit eutils flag-o-matic gnuconfig ${MYSQL_EXTRAS} ${BUILD_INHERIT} mysql_fx versionator toolchain-funcs
|
inherit eutils flag-o-matic gnuconfig ${MYSQL_EXTRAS} ${BUILD_INHERIT} mysql_fx versionator toolchain-funcs
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ inherit eutils flag-o-matic gnuconfig ${MYSQL_EXTRAS} ${BUILD_INHERIT} mysql_fx
|
|||||||
#
|
#
|
||||||
|
|
||||||
case "${EAPI:-0}" in
|
case "${EAPI:-0}" in
|
||||||
3|4|5) ;;
|
4|5) ;;
|
||||||
*) die "Unsupported EAPI: ${EAPI}" ;;
|
*) die "Unsupported EAPI: ${EAPI}" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -67,8 +67,8 @@ EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_
|
|||||||
# and we will run a mysql server during test phase
|
# and we will run a mysql server during test phase
|
||||||
S="${WORKDIR}/mysql"
|
S="${WORKDIR}/mysql"
|
||||||
|
|
||||||
[[ "${MY_EXTRAS_VER}" == "latest" ]] && MY_EXTRAS_VER="20090228-0714Z"
|
[[ ${MY_EXTRAS_VER} == "latest" ]] && MY_EXTRAS_VER="20090228-0714Z"
|
||||||
if [[ "${MY_EXTRAS_VER}" == "live" ]]; then
|
if [[ ${MY_EXTRAS_VER} == "live" ]]; then
|
||||||
EGIT_PROJECT=mysql-extras
|
EGIT_PROJECT=mysql-extras
|
||||||
EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/mysql-extras.git"
|
EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/mysql-extras.git"
|
||||||
fi
|
fi
|
||||||
@ -113,10 +113,10 @@ mysql_version_is_at_least "5.1.50" || die "This eclass should only be used with
|
|||||||
# Designation by PERCONA for a MySQL version to apply an XTRADB release
|
# Designation by PERCONA for a MySQL version to apply an XTRADB release
|
||||||
|
|
||||||
# Work out the default SERVER_URI correctly
|
# Work out the default SERVER_URI correctly
|
||||||
if [ -z "${SERVER_URI}" ]; then
|
if [[ -z ${SERVER_URI} ]]; then
|
||||||
[ -z "${MY_PV}" ] && MY_PV="${PV//_/-}"
|
[[ -z ${MY_PV} ]] && MY_PV="${PV//_/-}"
|
||||||
if [ "${PN}" == "mariadb" ]; then
|
if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then
|
||||||
MARIA_FULL_PV="$(replace_version_separator 3 '-' ${MY_PV})"
|
MARIA_FULL_PV=$(replace_version_separator 3 '-' ${MY_PV})
|
||||||
MARIA_FULL_P="${PN}-${MARIA_FULL_PV}"
|
MARIA_FULL_P="${PN}-${MARIA_FULL_PV}"
|
||||||
SERVER_URI="
|
SERVER_URI="
|
||||||
http://ftp.osuosl.org/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
|
http://ftp.osuosl.org/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
|
||||||
@ -126,6 +126,16 @@ if [ -z "${SERVER_URI}" ]; then
|
|||||||
http://mirrors.fe.up.pt/pub/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
|
http://mirrors.fe.up.pt/pub/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
|
||||||
http://ftp-stud.hs-esslingen.de/pub/Mirrors/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
|
http://ftp-stud.hs-esslingen.de/pub/Mirrors/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
|
||||||
"
|
"
|
||||||
|
if [[ ${PN} == "mariadb-galera" ]]; then
|
||||||
|
MY_SOURCEDIR="${PN%%-galera}-${MARIA_FULL_PV}"
|
||||||
|
fi
|
||||||
|
elif [[ ${PN} == "percona-server" ]]; then
|
||||||
|
PERCONA_PN="Percona-Server"
|
||||||
|
MIRROR_PV=$(get_version_component_range 1-2 ${PV})
|
||||||
|
MY_PV=$(get_version_component_range 1-3 ${PV})
|
||||||
|
MY_PATCH=$(get_version_component_range 4 ${PV})
|
||||||
|
SERVER_URI="http://www.percona.com/redir/downloads/${PERCONA_PN}-${MIRROR_PV}/LATEST/source/${PERCONA_PN}-${MY_PV}-rel30.${MY_PATCH}.tar.gz"
|
||||||
|
# http://www.percona.com/redir/downloads/Percona-Server-5.5/LATEST/source/Percona-Server-5.5.30-rel30.2.tar.gz
|
||||||
else
|
else
|
||||||
URI_DIR="MySQL"
|
URI_DIR="MySQL"
|
||||||
URI_FILE="mysql"
|
URI_FILE="mysql"
|
||||||
@ -141,19 +151,28 @@ fi
|
|||||||
SRC_URI="${SERVER_URI}"
|
SRC_URI="${SERVER_URI}"
|
||||||
|
|
||||||
# Gentoo patches to MySQL
|
# Gentoo patches to MySQL
|
||||||
[[ ${MY_EXTRAS_VER} != live ]] && [[ ${MY_EXTRAS_VER} != none ]] \
|
if [[ ${MY_EXTRAS_VER} != "live" && ${MY_EXTRAS_VER} != "none" ]]; then
|
||||||
&& SRC_URI="${SRC_URI}
|
SRC_URI="${SRC_URI}
|
||||||
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||||
http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||||
http://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
http://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||||
http://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
|
http://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
|
||||||
|
fi
|
||||||
|
|
||||||
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
|
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
|
||||||
HOMEPAGE="http://www.mysql.com/"
|
HOMEPAGE="http://www.mysql.com/"
|
||||||
if [[ "${PN}" == "mariadb" ]]; then
|
if [[ ${PN} == "mariadb" ]]; then
|
||||||
HOMEPAGE="http://mariadb.org/"
|
HOMEPAGE="http://mariadb.org/"
|
||||||
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
|
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
|
||||||
fi
|
fi
|
||||||
|
if [[ ${PN} == "mariadb-galera" ]]; then
|
||||||
|
HOMEPAGE="http://mariadb.org/"
|
||||||
|
DESCRIPTION="An enhanced, drop-in replacement for MySQL with Galera Replication"
|
||||||
|
fi
|
||||||
|
if [[ ${PN} == "percona-server" ]]; then
|
||||||
|
HOMEPAGE="http://www.percona.com/software/percona-server"
|
||||||
|
DESCRIPTION="An enhanced, drop-in replacement fro MySQL from the Percona team"
|
||||||
|
fi
|
||||||
LICENSE="GPL-2"
|
LICENSE="GPL-2"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
|
|
||||||
@ -172,30 +191,29 @@ IUSE="${IUSE} extraengine"
|
|||||||
IUSE="${IUSE} cluster"
|
IUSE="${IUSE} cluster"
|
||||||
|
|
||||||
IUSE="${IUSE} max-idx-128"
|
IUSE="${IUSE} max-idx-128"
|
||||||
IUSE="${IUSE} berkdb"
|
|
||||||
IUSE="${IUSE} +community profiling"
|
IUSE="${IUSE} +community profiling"
|
||||||
|
|
||||||
[[ ${PN} == "mariadb" ]] \
|
if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then
|
||||||
&& mysql_check_version_range "5.1.38 to 5.3.99" \
|
mysql_check_version_range "5.1.38 to 5.3.99" && IUSE="${IUSE} libevent"
|
||||||
&& IUSE="${IUSE} libevent"
|
mysql_version_is_at_least "5.2" && IUSE="${IUSE} oqgraph"
|
||||||
|
mysql_version_is_at_least "5.2.5" && IUSE="${IUSE} sphinx"
|
||||||
[[ ${PN} == "mariadb" ]] \
|
mysql_version_is_at_least "5.2.10" && IUSE="${IUSE} pam"
|
||||||
&& mysql_version_is_at_least "5.2" \
|
fi
|
||||||
&& IUSE="${IUSE} oqgraph"
|
|
||||||
|
|
||||||
[[ ${PN} == "mariadb" ]] \
|
|
||||||
&& mysql_version_is_at_least "5.2.5" \
|
|
||||||
&& IUSE="${IUSE} sphinx"
|
|
||||||
|
|
||||||
if mysql_version_is_at_least "5.5"; then
|
if mysql_version_is_at_least "5.5"; then
|
||||||
REQUIRED_USE="tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc )"
|
REQUIRED_USE="tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc )"
|
||||||
IUSE="${IUSE} jemalloc tcmalloc"
|
IUSE="${IUSE} jemalloc tcmalloc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REQUIRED_USE="${REQUIRED_USE} minimal? ( !cluster !extraengine !embedded ) static? ( !ssl )"
|
if mysql_version_is_at_least "5.5.7"; then
|
||||||
|
IUSE="${IUSE} systemtap"
|
||||||
|
fi
|
||||||
|
|
||||||
mysql_version_is_at_least "5.5.7" \
|
if [[ ${PN} == "percona-server" ]]; then
|
||||||
&& IUSE="${IUSE} systemtap"
|
mysql_version_is_at_least "5.5.10" && IUSE="${IUSE} pam"
|
||||||
|
fi
|
||||||
|
|
||||||
|
REQUIRED_USE="${REQUIRED_USE} minimal? ( !cluster !extraengine !embedded ) static? ( !ssl )"
|
||||||
|
|
||||||
#
|
#
|
||||||
# DEPENDENCIES:
|
# DEPENDENCIES:
|
||||||
@ -212,38 +230,30 @@ DEPEND="
|
|||||||
>=sys-libs/zlib-1.2.3
|
>=sys-libs/zlib-1.2.3
|
||||||
"
|
"
|
||||||
|
|
||||||
[[ ${PN} == mariadb ]] \
|
if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then
|
||||||
&& mysql_check_version_range "5.1.38 to 5.3.99" \
|
mysql_check_version_range "5.1.38 to 5.3.99" && DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )"
|
||||||
&& DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )"
|
mysql_version_is_at_least "5.2" && DEPEND="${DEPEND} oqgraph? ( >=dev-libs/boost-1.40.0 )"
|
||||||
|
mysql_version_is_at_least "5.2.5" && DEPEND="${DEPEND} sphinx? ( app-misc/sphinx )"
|
||||||
|
mysql_version_is_at_least "5.2.10" && DEPEND="${DEPEND} !minimal? ( pam? ( virtual/pam ) )"
|
||||||
|
# Bug 441700 MariaDB >=5.3 include custom mytop
|
||||||
|
mysql_version_is_at_least "5.3" && DEPEND="${DEPEND} perl? ( !dev-db/mytop )"
|
||||||
|
fi
|
||||||
|
|
||||||
# Having different flavours at the same time is not a good idea
|
# Having different flavours at the same time is not a good idea
|
||||||
for i in "mysql" "mariadb" ; do
|
for i in "mysql" "mariadb" "mariadb-galera" "percona-server"; do
|
||||||
[[ ${i} == ${PN} ]] ||
|
[[ ${i} == ${PN} ]] ||
|
||||||
DEPEND="${DEPEND} !dev-db/${i}"
|
DEPEND="${DEPEND} !dev-db/${i}"
|
||||||
done
|
done
|
||||||
|
|
||||||
[[ "${PN}" == "mariadb" ]] \
|
if mysql_version_is_at_least "5.5" ; then
|
||||||
&& mysql_version_is_at_least "5.2" \
|
DEPEND="${DEPEND} jemalloc? ( dev-libs/jemalloc )"
|
||||||
&& DEPEND="${DEPEND} oqgraph? ( >=dev-libs/boost-1.40.0 )"
|
DEPEND="${DEPEND} tcmalloc? ( dev-util/google-perftools )"
|
||||||
|
fi
|
||||||
|
|
||||||
[[ "${PN}" == "mariadb" ]] \
|
if mysql_version_is_at_least "5.5.7" ; then
|
||||||
&& mysql_version_is_at_least "5.2.5" \
|
DEPEND="${DEPEND} systemtap? ( >=dev-util/systemtap-1.3 )"
|
||||||
&& DEPEND="${DEPEND} sphinx? ( app-misc/sphinx )"
|
DEPEND="${DEPEND} kernel_linux? ( dev-libs/libaio )"
|
||||||
|
fi
|
||||||
# Bug 441700 MariaDB >=5.3 include custom mytop
|
|
||||||
[[ "${PN}" == "mariadb" ]] \
|
|
||||||
&& mysql_version_is_at_least "5.3" \
|
|
||||||
&& DEPEND="${DEPEND} !dev-db/mytop"
|
|
||||||
|
|
||||||
mysql_version_is_at_least "5.5.7" \
|
|
||||||
&& DEPEND="${DEPEND} systemtap? ( >=dev-util/systemtap-1.3 )" \
|
|
||||||
&& DEPEND="${DEPEND} kernel_linux? ( dev-libs/libaio )"
|
|
||||||
|
|
||||||
mysql_version_is_at_least "5.5" \
|
|
||||||
&& DEPEND="${DEPEND} jemalloc? ( dev-libs/jemalloc )"
|
|
||||||
|
|
||||||
mysql_version_is_at_least "5.5" \
|
|
||||||
&& DEPEND="${DEPEND} tcmalloc? ( dev-util/google-perftools )"
|
|
||||||
|
|
||||||
# prefix: first need to implement something for #196294
|
# prefix: first need to implement something for #196294
|
||||||
RDEPEND="${DEPEND}
|
RDEPEND="${DEPEND}
|
||||||
@ -251,6 +261,17 @@ RDEPEND="${DEPEND}
|
|||||||
selinux? ( sec-policy/selinux-mysql )
|
selinux? ( sec-policy/selinux-mysql )
|
||||||
"
|
"
|
||||||
|
|
||||||
|
if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then
|
||||||
|
# Bug 455016 Add dependencies of mytop
|
||||||
|
if mysql_version_is_at_least "5.3" ; then
|
||||||
|
RDEPEND="${RDEPEND} perl? (
|
||||||
|
virtual/perl-Getopt-Long
|
||||||
|
dev-perl/TermReadKey
|
||||||
|
virtual/perl-Term-ANSIColor
|
||||||
|
virtual/perl-Time-HiRes ) "
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
DEPEND="${DEPEND}
|
DEPEND="${DEPEND}
|
||||||
virtual/yacc
|
virtual/yacc
|
||||||
"
|
"
|
||||||
@ -261,8 +282,9 @@ DEPEND="${DEPEND} static? ( sys-libs/ncurses[static-libs] )"
|
|||||||
DEPEND="${DEPEND} >=dev-util/cmake-2.4.3"
|
DEPEND="${DEPEND} >=dev-util/cmake-2.4.3"
|
||||||
|
|
||||||
# compile-time-only
|
# compile-time-only
|
||||||
mysql_version_is_at_least "5.5.8" \
|
if mysql_version_is_at_least "5.5.8" ; then
|
||||||
&& DEPEND="${DEPEND} >=dev-util/cmake-2.6.3"
|
DEPEND="${DEPEND} >=dev-util/cmake-2.6.3"
|
||||||
|
fi
|
||||||
|
|
||||||
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
|
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
|
||||||
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
|
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
|
||||||
@ -278,13 +300,12 @@ PDEPEND="${PDEPEND} =virtual/mysql-${MYSQL_PV_MAJOR}"
|
|||||||
# PBXT_VERSION means that we have a PBXT patch for this PV
|
# PBXT_VERSION means that we have a PBXT patch for this PV
|
||||||
# PBXT was only introduced after 5.1.12
|
# PBXT was only introduced after 5.1.12
|
||||||
pbxt_patch_available() {
|
pbxt_patch_available() {
|
||||||
[[ ${PN} != "mariadb" ]] \
|
[[ ${PN} != "mariadb" && ${PN} != "mariadb-galera" && ( -n "${PBXT_VERSION}" ) ]]
|
||||||
&& [[ -n "${PBXT_VERSION}" ]]
|
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
pbxt_available() {
|
pbxt_available() {
|
||||||
pbxt_patch_available || [[ ${PN} == "mariadb" ]]
|
pbxt_patch_available || [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,18 +314,16 @@ pbxt_available() {
|
|||||||
# XTRADB_VERS means that we have a XTRADB patch for this PV
|
# XTRADB_VERS means that we have a XTRADB patch for this PV
|
||||||
# XTRADB was only introduced after 5.1.26
|
# XTRADB was only introduced after 5.1.26
|
||||||
xtradb_patch_available() {
|
xtradb_patch_available() {
|
||||||
[[ ${PN} != "mariadb" ]] \
|
[[ ${PN} != "mariadb" && ${PN} != "mariadb-galera"
|
||||||
&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]]
|
&& ( -n "${XTRADB_VER}" ) && ( -n "${PERCONA_VER}" ) ]]
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if pbxt_patch_available; then
|
if pbxt_patch_available; then
|
||||||
|
|
||||||
PBXT_P="pbxt-${PBXT_VERSION}"
|
PBXT_P="pbxt-${PBXT_VERSION}"
|
||||||
PBXT_SRC_URI="http://www.primebase.org/download/${PBXT_P}.tar.gz mirror://sourceforge/pbxt/${PBXT_P}.tar.gz"
|
PBXT_SRC_URI="http://www.primebase.org/download/${PBXT_P}.tar.gz mirror://sourceforge/pbxt/${PBXT_P}.tar.gz"
|
||||||
SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )"
|
SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# PBXT_NEWSTYLE means pbxt is in storage/ and gets enabled as other plugins
|
# PBXT_NEWSTYLE means pbxt is in storage/ and gets enabled as other plugins
|
||||||
@ -376,8 +395,7 @@ mysql-v2_pkg_setup() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for USE flag problems in pkg_setup
|
# Check for USE flag problems in pkg_setup
|
||||||
if ! mysql_version_is_at_least "5.2" \
|
if ! mysql_version_is_at_least "5.2" && use debug ; then
|
||||||
&& use debug ; then
|
|
||||||
# Also in package.use.mask
|
# Also in package.use.mask
|
||||||
die "Bug #344885: Upstream has broken USE=debug for 5.1 series >=5.1.51"
|
die "Bug #344885: Upstream has broken USE=debug for 5.1 series >=5.1.51"
|
||||||
fi
|
fi
|
||||||
@ -479,11 +497,20 @@ mysql-v2_pkg_postinst() {
|
|||||||
|
|
||||||
docinto "scripts"
|
docinto "scripts"
|
||||||
for script in scripts/mysql* ; do
|
for script in scripts/mysql* ; do
|
||||||
[[ -f "${script}" ]] \
|
if [[ -f "${script}" && "${script%.sh}" == "${script}" ]]; then
|
||||||
&& [[ "${script%.sh}" == "${script}" ]] \
|
dodoc "${script}"
|
||||||
&& dodoc "${script}"
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] \
|
||||||
|
&& mysql_version_is_at_least "5.2.10" && use pam ; then
|
||||||
|
einfo
|
||||||
|
elog "This install includes the PAM authentication plugin."
|
||||||
|
elog "To activate and configure the PAM plugin, please read:"
|
||||||
|
elog "https://kb.askmonty.org/en/pam-authentication-plugin/"
|
||||||
|
einfo
|
||||||
|
fi
|
||||||
|
|
||||||
einfo
|
einfo
|
||||||
elog "You might want to run:"
|
elog "You might want to run:"
|
||||||
elog "\"emerge --config =${CATEGORY}/${PF}\""
|
elog "\"emerge --config =${CATEGORY}/${PF}\""
|
||||||
@ -510,10 +537,6 @@ mysql-v2_pkg_postinst() {
|
|||||||
elog " PRIMARY KEY (name)"
|
elog " PRIMARY KEY (name)"
|
||||||
elog " ) CHARACTER SET utf8 COLLATE utf8_bin;"
|
elog " ) CHARACTER SET utf8 COLLATE utf8_bin;"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mysql_check_version_range "4.0 to 5.0.99.99" \
|
|
||||||
&& use berkdb \
|
|
||||||
&& elog "Berkeley DB support is deprecated and will be removed in future versions!"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: mysql-v2_getopt
|
# @FUNCTION: mysql-v2_getopt
|
||||||
@ -561,7 +584,7 @@ mysql-v2_pkg_config() {
|
|||||||
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
|
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
|
||||||
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
|
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
|
||||||
|
|
||||||
if [[ -d "${old_MY_DATADIR_s}" ]] && [[ "${old_MY_DATADIR_s}" != / ]]; then
|
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
|
||||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||||
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
|
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
|
||||||
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
|
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
|
||||||
@ -648,7 +671,7 @@ mysql-v2_pkg_config() {
|
|||||||
# Figure out which options we need to disable to do the setup
|
# Figure out which options we need to disable to do the setup
|
||||||
helpfile="${TMPDIR}/mysqld-help"
|
helpfile="${TMPDIR}/mysqld-help"
|
||||||
${EROOT}/usr/sbin/mysqld --verbose --help >"${helpfile}" 2>/dev/null
|
${EROOT}/usr/sbin/mysqld --verbose --help >"${helpfile}" 2>/dev/null
|
||||||
for opt in grant-tables host-cache name-resolve networking slave-start bdb \
|
for opt in grant-tables host-cache name-resolve networking slave-start \
|
||||||
federated innodb ssl log-bin relay-log slow-query-log external-locking \
|
federated innodb ssl log-bin relay-log slow-query-log external-locking \
|
||||||
ndbcluster log-slave-updates \
|
ndbcluster log-slave-updates \
|
||||||
; do
|
; do
|
||||||
@ -664,7 +687,7 @@ mysql-v2_pkg_config() {
|
|||||||
pushd "${TMPDIR}" &>/dev/null
|
pushd "${TMPDIR}" &>/dev/null
|
||||||
#cmd="'${EROOT}/usr/share/mysql/scripts/mysql_install_db' '--basedir=${EPREFIX}/usr' ${options}"
|
#cmd="'${EROOT}/usr/share/mysql/scripts/mysql_install_db' '--basedir=${EPREFIX}/usr' ${options}"
|
||||||
cmd=${EROOT}usr/share/mysql/scripts/mysql_install_db
|
cmd=${EROOT}usr/share/mysql/scripts/mysql_install_db
|
||||||
[ -f ${cmd} ] || cmd=${EROOT}usr/bin/mysql_install_db
|
[[ -f ${cmd} ]] || cmd=${EROOT}usr/bin/mysql_install_db
|
||||||
cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options}"
|
cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options}"
|
||||||
einfo "Command: $cmd"
|
einfo "Command: $cmd"
|
||||||
eval $cmd \
|
eval $cmd \
|
||||||
@ -690,6 +713,14 @@ mysql-v2_pkg_config() {
|
|||||||
einfo "Creating the mysql database and setting proper"
|
einfo "Creating the mysql database and setting proper"
|
||||||
einfo "permissions on it ..."
|
einfo "permissions on it ..."
|
||||||
|
|
||||||
|
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
|
||||||
|
PID_DIR="${EROOT}/var/run/mysqld"
|
||||||
|
if [[ ! -d "${PID_DIR}" ]]; then
|
||||||
|
mkdir "${PID_DIR}"
|
||||||
|
chown mysql:mysql "${PID_DIR}"
|
||||||
|
chmod 755 "${PID_DIR}"
|
||||||
|
fi
|
||||||
|
|
||||||
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
|
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
|
||||||
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
|
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
|
||||||
local mysqld="${EROOT}/usr/sbin/mysqld \
|
local mysqld="${EROOT}/usr/sbin/mysqld \
|
||||||
@ -737,7 +768,7 @@ mysql-v2_pkg_config() {
|
|||||||
mysql < "${sqltmp}"
|
mysql < "${sqltmp}"
|
||||||
rc=$?
|
rc=$?
|
||||||
eend $?
|
eend $?
|
||||||
[ $rc -ne 0 ] && ewarn "Failed to load zoneinfo!"
|
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
|
||||||
|
|
||||||
# Stop the server and cleanup
|
# Stop the server and cleanup
|
||||||
einfo "Stopping the server ..."
|
einfo "Stopping the server ..."
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.176 2012/11/01 20:22:57 robbat2 Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.177 2013/03/16 19:20:34 robbat2 Exp $
|
||||||
|
|
||||||
# @ECLASS: mysql.eclass
|
# @ECLASS: mysql.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -1021,7 +1021,7 @@ mysql_src_configure() {
|
|||||||
filter-flags "-O" "-O[01]"
|
filter-flags "-O" "-O[01]"
|
||||||
|
|
||||||
# glib-2.3.2_pre fix, bug #16496
|
# glib-2.3.2_pre fix, bug #16496
|
||||||
append-flags "-DHAVE_ERRNO_AS_DEFINE=1"
|
append-cppflags "-DHAVE_ERRNO_AS_DEFINE=1"
|
||||||
|
|
||||||
# As discovered by bug #246652, doing a double-level of SSP causes NDB to
|
# As discovered by bug #246652, doing a double-level of SSP causes NDB to
|
||||||
# fail badly during cluster startup.
|
# fail badly during cluster startup.
|
||||||
|
174
sdk_container/src/third_party/portage-stable/eclass/netsurf.eclass
vendored
Normal file
174
sdk_container/src/third_party/portage-stable/eclass/netsurf.eclass
vendored
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/eclass/netsurf.eclass,v 1.1 2013/06/23 16:36:49 xmw Exp $
|
||||||
|
|
||||||
|
# @ECLASS: netsurf.eclass
|
||||||
|
# @MAINTAINER:
|
||||||
|
# Michael Weber <xmw@gentoo.org>
|
||||||
|
# @BLURB: Handle buildsystem of www.netsurf-browser.org components
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Handle unpacking and usage of separate buildsystem tarball and manage
|
||||||
|
# multilib build, static-libs generation and debug building.
|
||||||
|
#
|
||||||
|
# Supports PATCHES and DOCS as in base.eclass
|
||||||
|
|
||||||
|
case ${EAPI:-0} in
|
||||||
|
0|1|2|3|4) die "this eclass doesn't support EAPI<5" ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
inherit base toolchain-funcs multilib-minimal
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: NETSURF_BUILDSYSTEM
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Select version of buildsystem tarball to be used along the component
|
||||||
|
# defaults to buildsystem-1.0
|
||||||
|
NETSURF_BUILDSYSTEM="${NETSURF_BUILDSYSTEM:-buildsystem-1.0}"
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: NETSURF_BUILDSYSTEM_SRC_URI
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Download link for NETSURF_BUILDSYSTEM, add to SRC_URI iff set explicitly.
|
||||||
|
NETSURF_BUILDSYSTEM_SRC_URI="http://download.netsurf-browser.org/libs/releases/${NETSURF_BUILDSYSTEM}.tar.gz -> netsurf-${NETSURF_BUILDSYSTEM}.tar.gz"
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: NETSURF_COMPONENT_TYPE
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Passed to buildsystem as COMPONENT_TYPE, valid values are
|
||||||
|
# lib-shared, lib-static and binary. Defaults to "lib-static lib-shared"
|
||||||
|
NETSURF_COMPONENT_TYPE="${NETSURF_COMPONENT_TYPE:-lib-static lib-shared}"
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: SRC_URI
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Defaults to http://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz
|
||||||
|
# and NETSURF_BUILDSYSTEM_SRC_URI.
|
||||||
|
if [ -z "${SRC_URI}" ] ; then
|
||||||
|
SRC_URI="http://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz
|
||||||
|
${NETSURF_BUILDSYSTEM_SRC_URI}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
IUSE="debug"
|
||||||
|
if has lib-static ${NETSURF_COMPONENT_TYPE} ; then
|
||||||
|
IUSE+=" static-libs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
DEPEND="virtual/pkgconfig"
|
||||||
|
|
||||||
|
# @FUNCTION: netsurf_src_prepare
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Run base_src_prepare for PATCHES support and multilib_copy_sources for
|
||||||
|
# in-source build.
|
||||||
|
netsurf_src_prepare() {
|
||||||
|
base_src_prepare
|
||||||
|
multilib_copy_sources
|
||||||
|
}
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: netsurf_makeconf
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Configuration variable bash array to be passed to emake calls.
|
||||||
|
# Defined at netsurf_src_configure and can be altered afterwards.
|
||||||
|
|
||||||
|
# @FUNCTION: netsurf_src_configure
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Setup netsurf_makeconf and run multilib-minimal_src_configure.
|
||||||
|
# A default multilib_src_configure is provided by this eclass.
|
||||||
|
netsurf_src_configure() {
|
||||||
|
netsurf_makeconf=(
|
||||||
|
NSSHARED=${WORKDIR}/${NETSURF_BUILDSYSTEM}
|
||||||
|
Q=
|
||||||
|
HOST_CC="\$(CC)"
|
||||||
|
CCOPT=
|
||||||
|
CCNOOPT=
|
||||||
|
CCDBG=
|
||||||
|
LDDBG=
|
||||||
|
AR="$(tc-getAR)"
|
||||||
|
BUILD=$(usex debug debug release)
|
||||||
|
PREFIX="${EROOT}"usr
|
||||||
|
)
|
||||||
|
|
||||||
|
multilib-minimal_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_configure() {
|
||||||
|
sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \
|
||||||
|
-i Makefile || die
|
||||||
|
if [ -f ${PN}.pc.in ] ; then
|
||||||
|
sed -e "/^libdir/s:/lib:/$(get_libdir):g" \
|
||||||
|
-i ${PN}.pc.in || die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: netsurf_make
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Calls emake with netsurf_makeconf and toolchain CC/LD
|
||||||
|
# as arguments for every NETSURF_COMPONENT_TYPE if activated.
|
||||||
|
netsurf_make() {
|
||||||
|
for COMPONENT_TYPE in ${NETSURF_COMPONENT_TYPE} ; do
|
||||||
|
if [ "${COMPONENT_TYPE}" == "lib-static" ] ; then
|
||||||
|
if ! use static-libs ; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
emake CC="$(tc-getCC)" LD="$(tc-getLD)" "${netsurf_makeconf[@]}" \
|
||||||
|
COMPONENT_TYPE=${COMPONENT_TYPE} "$@"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: netsurf_src_compile
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Calls multilib-minimal_src_compile and netsurf_make doc if USE=doc.
|
||||||
|
# A default multilib_src_compile is provided by this eclass.
|
||||||
|
netsurf_src_compile() {
|
||||||
|
local problems=$(egrep -Hn -- ' (-O.?|-g)( |$)' \
|
||||||
|
$(find . -type f -name 'Makefile*'))
|
||||||
|
if [ -n "${problems}" ] ; then
|
||||||
|
elog "found bad flags:
|
||||||
|
${problems}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
multilib-minimal_src_compile "$@"
|
||||||
|
|
||||||
|
if has doc ${USE} ; then
|
||||||
|
netsurf_make "$@" docs
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_compile() {
|
||||||
|
netsurf_make "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: netsurf_src_test
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Calls multilib-minimal_src_test.
|
||||||
|
# A default multilib_src_test is provided by this eclass.
|
||||||
|
netsurf_src_test() {
|
||||||
|
multilib-minimal_src_test "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_test() {
|
||||||
|
netsurf_make test "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: netsurf_src_install
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Calls multilib-minimal_src_install.
|
||||||
|
# A default multilib_src_test is provided by this eclass.
|
||||||
|
# A default multilib_src_install is provided by this eclass.
|
||||||
|
netsurf_src_install() {
|
||||||
|
multilib-minimal_src_install "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_install() {
|
||||||
|
#DEFAULT_ABI may not be the last.
|
||||||
|
#install to clean dir, rename binaries, move everything back
|
||||||
|
if [ "${ABI}" == "${DEFAULT_ABI}" ] ; then
|
||||||
|
netsurf_make DESTDIR="${D}" install "$@"
|
||||||
|
else
|
||||||
|
netsurf_make DESTDIR="${D}"${ABI} install "$@"
|
||||||
|
if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
|
||||||
|
find "${D}"${ABI}/usr/bin -type f -exec mv {} {}.${ABI} \;
|
||||||
|
fi
|
||||||
|
mv "${D}"${ABI}/* "${D}" || die
|
||||||
|
rmdir "${D}"${ABI} || die
|
||||||
|
fi
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.31 2012/09/15 16:16:53 zmedico Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.33 2013/05/28 03:29:50 anarchy Exp $
|
||||||
#
|
#
|
||||||
# @ECLASS: nsplugins.eclass
|
# @ECLASS: nsplugins.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -12,7 +12,7 @@
|
|||||||
# Reusable functions that promote sharing of netscape/moz plugins, also provides
|
# Reusable functions that promote sharing of netscape/moz plugins, also provides
|
||||||
# share_plugins_dir function for mozilla applications.
|
# share_plugins_dir function for mozilla applications.
|
||||||
|
|
||||||
inherit eutils multilib
|
inherit eutils multilib versionator mozextension
|
||||||
|
|
||||||
PLUGINS_DIR="nsbrowser/plugins"
|
PLUGINS_DIR="nsbrowser/plugins"
|
||||||
|
|
||||||
@ -72,5 +72,9 @@ share_plugins_dir() {
|
|||||||
PLUGIN_BASE_PATH=".."
|
PLUGIN_BASE_PATH=".."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if $(mozversion_extension_location) ; then
|
||||||
|
dosym "${PLUGIN_BASE_PATH}/nsbrowser/plugins" "${MOZILLA_FIVE_HOME}/browser/plugins"
|
||||||
|
else
|
||||||
dosym "${PLUGIN_BASE_PATH}/nsbrowser/plugins" "${MOZILLA_FIVE_HOME}/plugins"
|
dosym "${PLUGIN_BASE_PATH}/nsbrowser/plugins" "${MOZILLA_FIVE_HOME}/plugins"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/nvidia-driver.eclass,v 1.18 2012/11/27 17:39:48 jer Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/nvidia-driver.eclass,v 1.22 2013/05/16 14:25:13 jer Exp $
|
||||||
|
|
||||||
# @ECLASS: nvidia-driver.eclass
|
# @ECLASS: nvidia-driver.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -17,7 +17,7 @@ inherit versionator
|
|||||||
DEPEND="sys-apps/pciutils"
|
DEPEND="sys-apps/pciutils"
|
||||||
|
|
||||||
# the data below is derived from
|
# the data below is derived from
|
||||||
# http://us.download.nvidia.com/XFree86/Linux-x86_64/177.13/README/appendix-a.html
|
# http://us.download.nvidia.com/XFree86/Linux-x86_64/319.12/README/supportedchips.html
|
||||||
|
|
||||||
drv_96xx="0110 0111 0112 0113 0170 0171 0172 0173 0174 0175 0176 0177 0178 \
|
drv_96xx="0110 0111 0112 0113 0170 0171 0172 0173 0174 0175 0176 0177 0178 \
|
||||||
0179 017a 017c 017d 0181 0182 0183 0185 0188 018a 018b 018c 01a0 01f0 0200 \
|
0179 017a 017c 017d 0181 0182 0183 0185 0188 018a 018b 018c 01a0 01f0 0200 \
|
||||||
@ -35,11 +35,10 @@ drv_304x="0040 0041 0042 0043 0044 0045 0046 0047 0048 004e 0090 0091 0092 \
|
|||||||
00f2 00f3 00f4 00f5 00f6 00f8 00f9 0140 0141 0142 0143 0144 0145 0146 0147 \
|
00f2 00f3 00f4 00f5 00f6 00f8 00f9 0140 0141 0142 0143 0144 0145 0146 0147 \
|
||||||
0148 0149 014a 014c 014d 014e 014f 0160 0161 0162 0163 0164 0165 0166 0167 \
|
0148 0149 014a 014c 014d 014e 014f 0160 0161 0162 0163 0164 0165 0166 0167 \
|
||||||
0168 0169 016a 01d0 01d1 01d2 01d3 01d6 01d7 01d8 01da 01db 01dc 01dd 01de \
|
0168 0169 016a 01d0 01d1 01d2 01d3 01d6 01d7 01d8 01da 01db 01dc 01dd 01de \
|
||||||
01de 01df 0211 0212 0215 0218 0221 0222 0240 0241 0242 0244 0245 0247 0290 \
|
01df 0211 0212 0215 0218 0221 0222 0240 0241 0242 0244 0245 0247 0290 0291 \
|
||||||
0291 0292 0293 0294 0295 0297 0298 0299 029a 029b 029c 029d 029e 029f 02e0 \
|
0292 0293 0294 0295 0297 0298 0299 029a 029b 029c 029d 029e 029f 02e0 02e1 \
|
||||||
02e1 02e2 02e3 02e4 038b 0390 0391 0392 0393 0394 0395 0397 0398 0399 039c \
|
02e2 02e3 02e4 038b 0390 0391 0392 0393 0394 0395 0397 0398 0399 039c 039e \
|
||||||
039e 03d0 03d1 03d2 03d5 03d6 0531 0533 053a 053b 053e 07e0 07e1 07e2 07e3 \
|
03d0 03d1 03d2 03d5 03d6 0531 0533 053a 053b 053e 07e0 07e1 07e2 07e3 07e5"
|
||||||
07e5"
|
|
||||||
|
|
||||||
mask_96xx=">=x11-drivers/nvidia-drivers-97.0.0"
|
mask_96xx=">=x11-drivers/nvidia-drivers-97.0.0"
|
||||||
mask_71xx=">=x11-drivers/nvidia-drivers-72.0.0"
|
mask_71xx=">=x11-drivers/nvidia-drivers-72.0.0"
|
||||||
@ -50,50 +49,54 @@ mask_304x=">=x11-drivers/nvidia-drivers-305.0.0"
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Retrieve the PCI device ID for each Nvidia video card you have
|
# Retrieve the PCI device ID for each Nvidia video card you have
|
||||||
nvidia-driver-get-card() {
|
nvidia-driver-get-card() {
|
||||||
local NVIDIA_CARD="$(/usr/sbin/lspci -d 10de: -n | \
|
local NVIDIA_CARD=$(
|
||||||
awk '/ 0300: /{print $3}' | cut -d: -f2 | tr '\n' ' ')"
|
[ -x /usr/sbin/lspci ] && /usr/sbin/lspci -d 10de: -n \
|
||||||
|
| awk -F'[: ]' '/ 0300: /{print $6}'
|
||||||
|
)
|
||||||
|
|
||||||
if [ -n "$NVIDIA_CARD" ]; then
|
if [ -n "$NVIDIA_CARD" ]; then
|
||||||
echo "$NVIDIA_CARD";
|
echo "$NVIDIA_CARD"
|
||||||
else
|
else
|
||||||
echo "0000";
|
echo 0000
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
nvidia-driver-get-mask() {
|
nvidia-driver-get-mask() {
|
||||||
local NVIDIA_CARDS="$(nvidia-driver-get-card)"
|
local NVIDIA_CARDS="$(nvidia-driver-get-card)"
|
||||||
|
local card drv
|
||||||
|
|
||||||
for card in $NVIDIA_CARDS; do
|
for card in $NVIDIA_CARDS; do
|
||||||
for drv in $drv_96xx; do
|
for drv in $drv_96xx; do
|
||||||
if [ "x$card" = "x$drv" ]; then
|
if [ "x$card" = "x$drv" ]; then
|
||||||
echo "$mask_96xx";
|
echo "$mask_96xx"
|
||||||
return 0;
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for drv in $drv_71xx; do
|
for drv in $drv_71xx; do
|
||||||
if [ "x$card" = "x$drv" ]; then
|
if [ "x$card" = "x$drv" ]; then
|
||||||
echo "$mask_71xx";
|
echo "$mask_71xx"
|
||||||
return 0;
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for drv in $drv_173x; do
|
for drv in $drv_173x; do
|
||||||
if [ "x$card" = "x$drv" ]; then
|
if [ "x$card" = "x$drv" ]; then
|
||||||
echo "$mask_173x";
|
echo "$mask_173x"
|
||||||
return 0;
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for drv in $drv_304x; do
|
for drv in $drv_304x; do
|
||||||
if [ "x$card" = "x$drv" ]; then
|
if [ "x$card" = "x$drv" ]; then
|
||||||
echo "$mask_304x";
|
echo "$mask_304x"
|
||||||
return 0;
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "";
|
echo ''
|
||||||
return 1;
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: nvidia-driver-check-warning
|
# @FUNCTION: nvidia-driver-check-warning
|
||||||
@ -101,6 +104,7 @@ nvidia-driver-get-mask() {
|
|||||||
# Prints out a warning if the driver does not work w/ the installed video card
|
# Prints out a warning if the driver does not work w/ the installed video card
|
||||||
nvidia-driver-check-warning() {
|
nvidia-driver-check-warning() {
|
||||||
local NVIDIA_MASK="$(nvidia-driver-get-mask)"
|
local NVIDIA_MASK="$(nvidia-driver-get-mask)"
|
||||||
|
|
||||||
if [ -n "$NVIDIA_MASK" ]; then
|
if [ -n "$NVIDIA_MASK" ]; then
|
||||||
version_compare "${NVIDIA_MASK##*-}" "${PV}"
|
version_compare "${NVIDIA_MASK##*-}" "${PV}"
|
||||||
r=$?
|
r=$?
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/oasis.eclass,v 1.3 2012/03/27 22:44:41 aballier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/oasis.eclass,v 1.4 2013/02/07 13:42:12 aballier Exp $
|
||||||
|
|
||||||
# @ECLASS: oasis.eclass
|
# @ECLASS: oasis.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -46,6 +46,8 @@ inherit multilib findlib eutils base
|
|||||||
|
|
||||||
case ${EAPI:-0} in
|
case ${EAPI:-0} in
|
||||||
0|1|2) die "You need at least EAPI-3 to use oasis.eclass";;
|
0|1|2) die "You need at least EAPI-3 to use oasis.eclass";;
|
||||||
|
3|4) RDEPEND=">=dev-lang/ocaml-3.12[ocamlopt?]";;
|
||||||
|
*) RDEPEND=">=dev-lang/ocaml-3.12:=[ocamlopt?]";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
IUSE="+ocamlopt"
|
IUSE="+ocamlopt"
|
||||||
@ -53,7 +55,6 @@ IUSE="+ocamlopt"
|
|||||||
[ -n "${OASIS_BUILD_DOCS}" ] && IUSE="${IUSE} doc"
|
[ -n "${OASIS_BUILD_DOCS}" ] && IUSE="${IUSE} doc"
|
||||||
[ -n "${OASIS_BUILD_TESTS}" ] && IUSE="${IUSE} test"
|
[ -n "${OASIS_BUILD_TESTS}" ] && IUSE="${IUSE} test"
|
||||||
|
|
||||||
RDEPEND=">=dev-lang/ocaml-3.12[ocamlopt?]"
|
|
||||||
DEPEND="${RDEPEND}"
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
# @FUNCTION: oasis_use_enable
|
# @FUNCTION: oasis_use_enable
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/obs-service.eclass,v 1.9 2013/01/31 09:26:42 scarabeus Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/obs-service.eclass,v 1.11 2013/03/26 13:49:39 scarabeus Exp $
|
||||||
|
|
||||||
# @ECLASS: obs-service.eclass
|
# @ECLASS: obs-service.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
@ -83,7 +83,10 @@ obs-service_src_prepare() {
|
|||||||
debug-print-function ${FUNCNAME} "$@"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
debug-print "Replacing all paths to find suse-build in Gentoo"
|
debug-print "Replacing all paths to find suse-build in Gentoo"
|
||||||
find "${S}" -type f -exec \
|
find "${S}" -type f -exec \
|
||||||
sed -i 's|/usr/lib/build|/usr/share/suse-build|g' {} +
|
sed -i 's|/usr/lib/build|/usr/libexec/suse-build|g' {} +
|
||||||
|
debug-print "Replacing all paths from hardcoded suse libexec"
|
||||||
|
find "${S}" -type f -exec \
|
||||||
|
sed -i 's|/usr/lib/obs|/usr/libexec/obs|g' {} +
|
||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: obs-service_src_install
|
# @FUNCTION: obs-service_src_install
|
||||||
@ -92,14 +95,14 @@ obs-service_src_prepare() {
|
|||||||
obs-service_src_install() {
|
obs-service_src_install() {
|
||||||
debug-print-function ${FUNCNAME} "$@"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
debug-print "Installing service \"${OBS_SERVICE_NAME}\""
|
debug-print "Installing service \"${OBS_SERVICE_NAME}\""
|
||||||
exeinto /usr/lib/obs/service
|
exeinto /usr/libexec/obs/service
|
||||||
newexe "${S}"/${OBS_SERVICE_NAME}-${PV} ${OBS_SERVICE_NAME}
|
newexe "${S}"/${OBS_SERVICE_NAME}-${PV} ${OBS_SERVICE_NAME}
|
||||||
insinto /usr/lib/obs/service
|
insinto /usr/libexec/obs/service
|
||||||
newins "${S}"/${OBS_SERVICE_NAME}-${PV}.service ${OBS_SERVICE_NAME}.service
|
newins "${S}"/${OBS_SERVICE_NAME}-${PV}.service ${OBS_SERVICE_NAME}.service
|
||||||
if [[ -n ${ADDITIONAL_FILES} ]]; then
|
if [[ -n ${ADDITIONAL_FILES} ]]; then
|
||||||
debug-print "Installing following additional files:"
|
debug-print "Installing following additional files:"
|
||||||
debug-print " ${ADDITIONAL_FILES}"
|
debug-print " ${ADDITIONAL_FILES}"
|
||||||
exeinto /usr/lib/obs/service/${OBS_SERVICE_NAME}.files
|
exeinto /usr/libexec/obs/service/${OBS_SERVICE_NAME}.files
|
||||||
for i in ${ADDITIONAL_FILES}; do
|
for i in ${ADDITIONAL_FILES}; do
|
||||||
newexe "${S}"/${i}-${PV} ${i}
|
newexe "${S}"/${i}-${PV} ${i}
|
||||||
done
|
done
|
||||||
|
230
sdk_container/src/third_party/portage-stable/eclass/office-ext-r1.eclass
vendored
Normal file
230
sdk_container/src/third_party/portage-stable/eclass/office-ext-r1.eclass
vendored
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/eclass/office-ext-r1.eclass,v 1.4 2013/03/29 10:02:23 scarabeus Exp $
|
||||||
|
|
||||||
|
# @ECLASS: office-ext-r1.eclass
|
||||||
|
# @MAINTAINER:
|
||||||
|
# The office team <openoffice@gentoo.org>
|
||||||
|
# @AUTHOR:
|
||||||
|
# Tomáš Chvátal <scarabeus@gentoo.org>
|
||||||
|
# @BLURB: Eclass for installing libreoffice/openoffice extensions
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Eclass for easing maitenance of libreoffice/openoffice extensions.
|
||||||
|
|
||||||
|
case "${EAPI:-0}" in
|
||||||
|
5) OEXT_EXPORTED_FUNCTIONS="src_unpack src_install pkg_postinst pkg_prerm" ;;
|
||||||
|
*) die "EAPI=${EAPI} is not supported" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
inherit eutils multilib
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: OFFICE_REQ_USE
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Useflags required on office implementation for the extension.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# @CODE
|
||||||
|
# OFFICE_REQ_USE="java,jemalloc(-)?"
|
||||||
|
# @CODE
|
||||||
|
if [[ ${OFFICE_REQ_USE} ]]; then
|
||||||
|
# Append the brackets for the depend bellow
|
||||||
|
OFFICE_REQ_USE="[${OFFICE_REQ_USE}]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: OFFICE_IMPLEMENTATIONS
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# List of implementations supported by the extension.
|
||||||
|
# Some work only for libreoffice and vice versa.
|
||||||
|
# Default value is all implementations.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# @CODE
|
||||||
|
# OFFICE_IMPLEMENTATIONS=( "libreoffice" "openoffice" )
|
||||||
|
# @CODE
|
||||||
|
[[ -z ${OFFICE_IMPLEMENTATIONS} ]] && OFFICE_IMPLEMENTATIONS=( "libreoffice" "openoffice" )
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: OFFICE_EXTENSIONS
|
||||||
|
# @REQUIRED
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Array containing list of extensions to install.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# @CODE
|
||||||
|
# OFFICE_EXTENSIONS=( ${PN}_${PV}.oxt )
|
||||||
|
# @CODE
|
||||||
|
[[ -z ${OFFICE_EXTENSIONS} ]] && die "OFFICE_EXTENSIONS variable is unset."
|
||||||
|
if [[ "$(declare -p OFFICE_EXTENSIONS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
|
||||||
|
die "OFFICE_EXTENSIONS variable is not an array."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: OFFICE_EXTENSIONS_LOCATION
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Path to the extensions location. Defaults to ${DISTDIR}.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# @CODE
|
||||||
|
# OFFICE_EXTENSIONS_LOCATION="${S}/unpacked/"
|
||||||
|
# @CODE
|
||||||
|
: ${OFFICE_EXTENSIONS_LOCATION:=${DISTDIR}}
|
||||||
|
|
||||||
|
IUSE=""
|
||||||
|
RDEPEND=""
|
||||||
|
|
||||||
|
for i in ${OFFICE_IMPLEMENTATIONS[@]}; do
|
||||||
|
IUSE+=" office_implementation_${i}"
|
||||||
|
RDEPEND+="
|
||||||
|
office_implementation_${i}? (
|
||||||
|
|| (
|
||||||
|
app-office/${i}${OFFICE_REQ_USE}
|
||||||
|
app-office/${i}-bin${OFFICE_REQ_USE}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
"
|
||||||
|
done
|
||||||
|
|
||||||
|
REQUIRED_USE="|| ( "
|
||||||
|
for i in ${OFFICE_IMPLEMENTATIONS[@]}; do
|
||||||
|
REQUIRED_USE+=" office_implementation_${i} "
|
||||||
|
done
|
||||||
|
REQUIRED_USE+=" )"
|
||||||
|
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
app-arch/unzip
|
||||||
|
"
|
||||||
|
|
||||||
|
# Most projects actually do not provide any relevant sourcedir as they are oxt.
|
||||||
|
S="${WORKDIR}"
|
||||||
|
|
||||||
|
# @FUNCTION: office-ext-r1_src_unpack
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Flush the cache after removal of an extension.
|
||||||
|
office-ext-r1_src_unpack() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
local i
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
for i in ${OFFICE_EXTENSIONS[@]}; do
|
||||||
|
# Unpack the extensions where required and add case for oxt
|
||||||
|
# which should be most common case for the extensions.
|
||||||
|
if [[ -f "${OFFICE_EXTENSIONS_LOCATION}/${i}" ]] ; then
|
||||||
|
case ${i} in
|
||||||
|
*.oxt)
|
||||||
|
mkdir -p "${WORKDIR}/${i}/"
|
||||||
|
pushd "${WORKDIR}/${i}/" > /dev/null
|
||||||
|
echo ">>> Unpacking "${OFFICE_EXTENSIONS_LOCATION}/${i}" to ${PWD}"
|
||||||
|
unzip -qo ${OFFICE_EXTENSIONS_LOCATION}/${i}
|
||||||
|
assert "failed unpacking ${OFFICE_EXTENSIONS_LOCATION}/${i}"
|
||||||
|
popd > /dev/null
|
||||||
|
;;
|
||||||
|
*) unpack ${i} ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: office-ext-r1_src_install
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Install the extension source to the proper location.
|
||||||
|
office-ext-r1_src_install() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
debug-print "Extensions: ${OFFICE_EXTENSIONS[@]}"
|
||||||
|
|
||||||
|
local i j
|
||||||
|
|
||||||
|
for i in ${OFFICE_IMPLEMENTATIONS[@]}; do
|
||||||
|
if use office_implementation_${i}; then
|
||||||
|
if [[ ${i} == openoffice ]]; then
|
||||||
|
# OOO needs to use uno because direct deployment segfaults.
|
||||||
|
# This is bug by their side, but i don't want to waste time
|
||||||
|
# fixing it myself.
|
||||||
|
insinto /usr/$(get_libdir)/${i}/share/extension/install
|
||||||
|
for j in ${OFFICE_EXTENSIONS[@]}; do
|
||||||
|
doins ${OFFICE_EXTENSIONS_LOCATION}/${j}
|
||||||
|
done
|
||||||
|
else
|
||||||
|
for j in ${OFFICE_EXTENSIONS[@]}; do
|
||||||
|
pushd "${WORKDIR}/${j}/" > /dev/null
|
||||||
|
insinto /usr/$(get_libdir)/${i}/share/extensions/${j/.oxt/}
|
||||||
|
doins -r *
|
||||||
|
popd > /dev/null
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
#### OPENOFFICE COMPAT CODE
|
||||||
|
|
||||||
|
UNOPKG_BINARY="/usr/lib64/openoffice/program/unopkg"
|
||||||
|
|
||||||
|
# @FUNCTION: office-ext-r1_add_extension
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Install the extension into the libreoffice/openoffice.
|
||||||
|
office-ext-r1_add_extension() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
local ext=$1
|
||||||
|
local tmpdir=$(mktemp -d --tmpdir="${T}")
|
||||||
|
|
||||||
|
debug-print "${FUNCNAME}: ${UNOPKG_BINARY} add --shared \"${ext}\""
|
||||||
|
ebegin "Adding office extension: \"${ext}\""
|
||||||
|
${UNOPKG_BINARY} add --suppress-license \
|
||||||
|
--shared "${ext}" \
|
||||||
|
"-env:UserInstallation=file:///${tmpdir}" \
|
||||||
|
"-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
|
||||||
|
eend $?
|
||||||
|
${UNOPKG_BINARY} list --shared > /dev/null
|
||||||
|
rm -rf "${tmpdir}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: office-ext-r1_remove_extension
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Remove the extension from the libreoffice/openoffice.
|
||||||
|
office-ext-r1_remove_extension() {
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
local ext=$1
|
||||||
|
local tmpdir=$(mktemp -d --tmpdir="${T}")
|
||||||
|
|
||||||
|
debug-print "${FUNCNAME}: ${UNOPKG_BINARY} remove --shared \"${ext}\""
|
||||||
|
ebegin "Removing office extension: \"${ext}\""
|
||||||
|
${UNOPKG_BINARY} remove --suppress-license \
|
||||||
|
--shared "${ext}" \
|
||||||
|
"-env:UserInstallation=file:///${tmpdir}" \
|
||||||
|
"-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
|
||||||
|
eend $?
|
||||||
|
${UNOPKG_BINARY} list --shared > /dev/null
|
||||||
|
rm -rf "${tmpdir}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: office-ext-r1_pkg_postinst
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Add the extensions to the openoffice.
|
||||||
|
office-ext-r1_pkg_postinst() {
|
||||||
|
if in_iuse office_implementation_openoffice && use office_implementation_openoffice; then
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
debug-print "Extensions: ${OFFICE_EXTENSIONS[@]}"
|
||||||
|
local i
|
||||||
|
|
||||||
|
for i in ${OFFICE_EXTENSIONS[@]}; do
|
||||||
|
office-ext-r1_add_extension "/usr/lib64/openoffice/share/extension/install/${i}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: office-ext-r1_pkg_prerm
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Remove the extensions from the openoffice.
|
||||||
|
office-ext-r1_pkg_prerm() {
|
||||||
|
if in_iuse office_implementation_openoffice && use office_implementation_openoffice; then
|
||||||
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
debug-print "Extensions: ${OFFICE_EXTENSIONS[@]}"
|
||||||
|
local i
|
||||||
|
|
||||||
|
for i in ${OFFICE_EXTENSIONS[@]}; do
|
||||||
|
office-ext-r1_remove_extension "${i}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS ${OEXT_EXPORTED_FUNCTIONS}
|
||||||
|
unset OEXT_EXPORTED_FUNCTIONS
|
@ -1,7 +1,8 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/office-ext.eclass,v 1.7 2012/09/27 16:35:41 axs Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/office-ext.eclass,v 1.8 2013/05/17 11:27:25 scarabeus Exp $
|
||||||
|
|
||||||
|
# @DEAD
|
||||||
# @ECLASS: office-ext.eclass
|
# @ECLASS: office-ext.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
# The office team <openoffice@gentoo.org>
|
# The office team <openoffice@gentoo.org>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user