From c041cebf8c3947c314a7a37a7c79b2cf17634b0e Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Sun, 10 May 2015 11:52:03 +0200 Subject: eclass/gnome2.eclass: sync with gentoo-x86 --- eclass/gnome2.eclass | 56 ++++++++++++---------------------------------------- 1 file changed, 13 insertions(+), 43 deletions(-) (limited to 'eclass') diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass index f77dace8..8290a460 100644 --- a/eclass/gnome2.eclass +++ b/eclass/gnome2.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ @@ -13,17 +13,7 @@ inherit eutils fdo-mime libtool gnome.org gnome2-utils case "${EAPI:-0}" in - 0|1) - eqawarn - eqawarn "${CATEGORY}/${PF}: EAPI 0/1 support is now deprecated." - eqawarn "If you are the package maintainer, please" - eqawarn "update this package to a newer EAPI." - eqawarn "Support for EAPIs 0 and 1 for gnome2.eclass will be dropped" - eqawarn "in a month (around 23rd December)." - eqawarn - EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm - ;; - 2|3|4|5) + 4|5) EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm ;; *) die "EAPI=${EAPI} is not supported" ;; @@ -39,7 +29,7 @@ G2CONF=${G2CONF:-""} # @DESCRIPTION: # Should we delete ALL the .la files? # NOT to be used without due consideration. -if has ${EAPI:-0} 0 1 2 3 4; then +if has ${EAPI:-0} 4; then GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"} else GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""} @@ -51,12 +41,6 @@ fi # Extra options passed to elibtoolize ELTCONF=${ELTCONF:-""} -# @ECLASS-VARIABLE: USE_EINSTALL -# @DEFAULT_UNSET -# @DESCRIPTION: -# Should we use EINSTALL instead of DESTDIR. DEPRECATED -USE_EINSTALL=${USE_EINSTALL:-""} - # @ECLASS-VARIABLE: DOCS # @DEFAULT_UNSET # @DESCRIPTION: @@ -77,14 +61,12 @@ if [[ ${GCONF_DEBUG} != "no" ]]; then IUSE="debug" fi - # @FUNCTION: gnome2_src_unpack # @DESCRIPTION: # Stub function for old EAPI. gnome2_src_unpack() { unpack ${A} cd "${S}" - has ${EAPI:-0} 0 1 && gnome2_src_prepare } # @FUNCTION: gnome2_src_prepare @@ -102,13 +84,8 @@ gnome2_src_prepare() { gnome2_disable_deprecation_warning # Run libtoolize - if has ${EAPI:-0} 0 1 2 3; then - elibtoolize ${ELTCONF} - else - # Everything is fatal EAPI 4 onwards - nonfatal elibtoolize ${ELTCONF} - fi - + # Everything is fatal EAPI 4 onwards + nonfatal elibtoolize ${ELTCONF} } # @FUNCTION: gnome2_src_configure @@ -130,7 +107,7 @@ gnome2_src_configure() { # rebuild docs. # Preserve old behavior for older EAPI. 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} 4 && in_iuse doc ; then G2CONF="$(use_enable doc gtk-doc) ${G2CONF}" else G2CONF="--disable-gtk-doc ${G2CONF}" @@ -149,7 +126,7 @@ gnome2_src_configure() { fi # 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} 4; then if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then G2CONF="--disable-silent-rules ${G2CONF}" fi @@ -183,10 +160,9 @@ gnome2_src_configure() { # @FUNCTION: gnome2_src_compile # @DESCRIPTION: -# Stub function for old EAPI. +# Only default src_compile for now gnome2_src_compile() { - has ${EAPI:-0} 0 1 && gnome2_src_configure "$@" - emake || die "compile failure" + emake } # @FUNCTION: gnome2_src_install @@ -194,7 +170,6 @@ gnome2_src_compile() { # Gnome specific install. Handles typical GConf and scrollkeeper setup # in packages and removal of .la files if requested gnome2_src_install() { - has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" # if this is not present, scrollkeeper-update may segfault and # create bogus directories in /var/lib/ local sk_tmp_dir="/var/lib/scrollkeeper" @@ -203,18 +178,13 @@ gnome2_src_install() { # we must delay gconf schema installation due to sandbox export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" - if [[ -z "${USE_EINSTALL}" || "${USE_EINSTALL}" = "0" ]]; then - debug-print "Installing with 'make install'" - emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed" - else - debug-print "Installing with 'einstall'" - einstall "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" || die "einstall failed" - fi + debug-print "Installing with 'make install'" + emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed" unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL # Handle documentation as 'default' for eapi5 and newer, bug #373131 - if has ${EAPI:-0} 0 1 2 3 4; then + if has ${EAPI:-0} 4; then # Manual document installation if [[ -n "${DOCS}" ]]; then dodoc ${DOCS} || die "dodoc failed" @@ -235,7 +205,7 @@ gnome2_src_install() { rm -fr "${ED}/usr/share/applications/mimeinfo.cache" # Delete all .la files - if has ${EAPI:-0} 0 1 2 3 4; then + if has ${EAPI:-0} 4; then if [[ "${GNOME2_LA_PUNT}" != "no" ]]; then ebegin "Removing .la files" if ! use_if_iuse static-libs ; then -- cgit v1.2.3-65-gdbad