public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mart Raudsepp" <leio@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gnome:master commit in: eclass/
Date: Sat, 30 Jan 2021 20:02:49 +0000 (UTC)	[thread overview]
Message-ID: <1612036961.9a3e97683af38a7b9242a3a66e13a88cfbd8ac46.leio@gentoo> (raw)

commit:     9a3e97683af38a7b9242a3a66e13a88cfbd8ac46
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 30 20:00:25 2021 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sat Jan 30 20:02:41 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gnome.git/commit/?id=9a3e9768

gnome2.eclass: sync with main repository

Just a copy with the ewarn about experimental overlay kept for now

Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 eclass/gnome2.eclass | 104 ++++++++++++++++-----------------------------------
 1 file changed, 33 insertions(+), 71 deletions(-)

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 2cc54393..3d745c01 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -1,9 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: gnome2.eclass
 # @MAINTAINER:
 # gnome@gentoo.org
+# @SUPPORTED_EAPIS: 5 6 7
 # @BLURB: Provides phases for Gnome/Gtk+ based packages.
 # @DESCRIPTION:
 # Exports portage base functions used by ebuilds written for packages using the
@@ -16,25 +17,19 @@
 GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""}
 
 [[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools
-inherit eutils libtool gnome.org gnome2-utils xdg
+[[ ${EAPI} == [56] ]] && inherit eutils ltprune
+inherit libtool gnome.org gnome2-utils xdg
 
-case "${EAPI:-0}" in
-	4|5)
+case ${EAPI:-0} in
+	5)
 		EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
 		;;
-	6)
+	6|7)
 		EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
 		;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
-# @ECLASS-VARIABLE: DOCS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# String containing documents passed to dodoc command for eapi4.
-# In eapi5 we rely on einstalldocs (from eutils.eclass) and for newer EAPIs we
-# follow PMS spec.
-
 # @ECLASS-VARIABLE: ELTCONF
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -47,7 +42,7 @@ ELTCONF=${ELTCONF:-""}
 # Extra configure opts passed to econf.
 # Deprecated, pass extra arguments to gnome2_src_configure.
 # Banned in eapi6 and newer.
-if has ${EAPI:-0} 4 5; then
+if has ${EAPI} 5; then
 	G2CONF=${G2CONF:-""}
 fi
 
@@ -63,7 +58,7 @@ fi
 #
 # Banned since eapi6 as upstream is moving away from this obsolete macro in favor
 # of autoconf-archive macros, that do not expose this issue (bug #270919)
-if has ${EAPI:-0} 4 5; then
+if has ${EAPI} 5; then
 	if [[ ${GCONF_DEBUG} != "no" ]]; then
 		IUSE="debug"
 	fi
@@ -76,27 +71,22 @@ fi
 
 # @ECLASS-VARIABLE: GNOME2_LA_PUNT
 # @DESCRIPTION:
-# For eapi4 it sets if we should delete ALL or none of the .la files
-# For eapi5 and newer it relies on prune_libtool_files (from eutils.eclass)
-# for this. Available values for GNOME2_LA_PUNT:
+# In EAPIs 5 and 6, it relies on prune_libtool_files (from ltprune.eclass) for
+# this. Later EAPIs use find ... -delete. Available values for GNOME2_LA_PUNT:
 # - "no": will not clean any .la files
 # - "yes": will run prune_libtool_files --modules
 # - If it is not set, it will run prune_libtool_files
-if has ${EAPI:-0} 4; then
-	GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"}
-else
-	GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
-fi
+GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
 
 # @FUNCTION: gnome2_src_unpack
 # @DESCRIPTION:
 # Stub function for old EAPI.
 gnome2_src_unpack() {
-	if has ${EAPI:-0} 4 5; then
+	if has ${EAPI} 5; then
 		unpack ${A}
 		cd "${S}"
 	else
-		die "gnome2_src_unpack is banned from eapi6"
+		die "gnome2_src_unpack is banned since eapi6"
 	fi
 }
 
@@ -114,7 +104,7 @@ gnome2_src_prepare() {
 	# We stop to run it from eapi6 as scrollkeeper helpers from
 	# rarian are not running anything and, then, access violations
 	# shouldn't occur.
-	has ${EAPI:-0} 4 5 && gnome2_omf_fix
+	has ${EAPI} 5 && gnome2_omf_fix
 
 	# Disable all deprecation warnings
 	gnome2_disable_deprecation_warning
@@ -134,7 +124,7 @@ gnome2_src_prepare() {
 gnome2_src_configure() {
 	# Deprecated for a long time now and banned since eapi6, see Gnome team policies
 	if [[ -n ${G2CONF} ]] ; then
-		if has ${EAPI:-0} 4 5; then
+		if has ${EAPI} 5; then
 			eqawarn "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure"
 		else
 			die "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure"
@@ -143,7 +133,7 @@ gnome2_src_configure() {
 
 	local g2conf=()
 
-	if has ${EAPI:-0} 4 5; then
+	if has ${EAPI} 5; then
 		if [[ ${GCONF_DEBUG} != 'no' ]] ; then
 			if use debug ; then
 				g2conf+=( --enable-debug=yes )
@@ -155,19 +145,14 @@ gnome2_src_configure() {
 		fi
 	fi
 
-	# Starting with EAPI=5, we consider packages installing gtk-doc to be
-	# handled by adding DEPEND="dev-util/gtk-doc-am" which provides tools to
-	# relink URLs in documentation to already installed documentation.
-	# This decision also greatly helps with constantly broken doc generation.
+	# We consider packages installing gtk-doc to be handled by adding
+	# DEPEND="dev-util/gtk-doc-am" which provides tools to relink URLs in
+	# documentation to already installed documentation.  This decision also
+	# greatly helps with constantly broken doc generation.
 	# Remember to drop 'doc' USE flag from your package if it was only used to
 	# rebuild docs.
-	# Preserve old behavior for older EAPI.
 	if grep -q "enable-gtk-doc" "${ECONF_SOURCE:-.}"/configure ; then
-		if has ${EAPI:-0} 4 && in_iuse doc ; then
-			g2conf+=( $(use_enable doc gtk-doc) )
-		else
-			g2conf+=( --disable-gtk-doc )
-		fi
+		g2conf+=( --disable-gtk-doc )
 	fi
 
 	# Pass --disable-maintainer-mode when needed
@@ -181,13 +166,6 @@ gnome2_src_configure() {
 		g2conf+=( --disable-scrollkeeper )
 	fi
 
-	# Pass --disable-silent-rules when possible (not needed since eapi5), bug #429308
-	if has ${EAPI:-0} 4; then
-		if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then
-			g2conf+=( --disable-silent-rules )
-		fi
-	fi
-
 	# Pass --disable-schemas-install when possible
 	if grep -q "disable-schemas-install" "${ECONF_SOURCE:-.}"/configure; then
 		g2conf+=( --disable-schemas-install )
@@ -209,20 +187,20 @@ gnome2_src_configure() {
 	fi
 
 	# Pass --docdir with proper directory, bug #482646 (not needed since eapi6)
-	if has ${EAPI:-0} 4 5; then
+	if has ${EAPI} 5; then
 		if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then
 			g2conf+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} )
 		fi
 	fi
 
 	# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
-	if has ${EAPI:-0} 4 5; then
+	if has ${EAPI} 5; then
 		addwrite "$(unset HOME; echo ~)/.gnome2"
 	else
 		addpredict "$(unset HOME; echo ~)/.gnome2"
 	fi
 
-	if has ${EAPI:-0} 4 5; then
+	if has ${EAPI} 5; then
 		econf ${g2conf[@]} ${G2CONF} "$@"
 	else
 		econf ${g2conf[@]} "$@"
@@ -233,7 +211,7 @@ gnome2_src_configure() {
 # @DESCRIPTION:
 # Only default src_compile for now
 gnome2_src_compile() {
-	if has ${EAPI:-0} 4 5; then
+	if has ${EAPI} 5; then
 		emake
 	else
 		default
@@ -254,7 +232,7 @@ gnome2_src_install() {
 	#
 	# if this is not present, scrollkeeper-update may segfault and
 	# create bogus directories in /var/lib/
-	if has ${EAPI:-0} 4 5; then
+	if has ${EAPI} 5; then
 		dodir "${sk_tmp_dir}" || die "dodir failed"
 		emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed"
 	else
@@ -266,12 +244,7 @@ gnome2_src_install() {
 	# Handle documentation as 'default' for eapi5, bug #373131
 	# Since eapi6 this is handled by default on its own plus MAINTAINERS and HACKING
 	# files that are really common in gnome packages (bug #573390)
-	if has ${EAPI:-0} 4; then
-		# Manual document installation
-		if [[ -n "${DOCS}" ]]; then
-			dodoc ${DOCS} || die "dodoc failed"
-		fi
-	elif has ${EAPI:-0} 5; then
+	if has ${EAPI} 5; then
 		einstalldocs
 	else
 		local d
@@ -292,20 +265,16 @@ gnome2_src_install() {
 	rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
 
 	# Delete all .la files
-	if has ${EAPI:-0} 4; then
-		if [[ "${GNOME2_LA_PUNT}" != "no" ]]; then
-			ebegin "Removing .la files"
-			if ! use_if_iuse static-libs ; then
-				find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
-			fi
-			eend
-		fi
-	else
+	if has ${EAPI} 5 6; then
 		case "${GNOME2_LA_PUNT}" in
 			yes)    prune_libtool_files --modules;;
 			no)     ;;
 			*)      prune_libtool_files;;
 		esac
+	else
+		if [[ ${GNOME2_LA_PUNT} != 'no' ]]; then
+			find "${ED}" -name '*.la' -delete || die
+		fi
 	fi
 }
 
@@ -315,7 +284,6 @@ gnome2_src_install() {
 gnome2_pkg_preinst() {
 	xdg_pkg_preinst
 	gnome2_gconf_savelist
-	gnome2_icon_savelist
 	gnome2_schemas_savelist
 	gnome2_scrollkeeper_savelist
 	gnome2_gdk_pixbuf_savelist
@@ -337,9 +305,6 @@ gnome2_pkg_preinst() {
 gnome2_pkg_postinst() {
 	xdg_pkg_postinst
 	gnome2_gconf_install
-	if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
-		gnome2_icon_cache_update
-	fi
 	if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
 		gnome2_schemas_update
 	fi
@@ -368,9 +333,6 @@ gnome2_pkg_postinst() {
 # Handle scrollkeeper, GSettings, Icons, desktop and mime database updates.
 gnome2_pkg_postrm() {
 	xdg_pkg_postrm
-	if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
-		gnome2_icon_cache_update
-	fi
 	if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
 		gnome2_schemas_update
 	fi


             reply	other threads:[~2021-01-30 20:02 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-30 20:02 Mart Raudsepp [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-08-16 14:16 [gentoo-commits] proj/gnome:master commit in: eclass/ Matt Turner
2021-01-30 20:02 Mart Raudsepp
2019-02-24  8:40 Mart Raudsepp
2019-02-23 20:37 Mart Raudsepp
2018-02-16 16:12 Sobhan Mohammadpour
2018-02-01 10:37 Sobhan Mohammadpour
2018-01-29  7:50 Gilles Dartiguelongue
2018-01-29  7:50 Gilles Dartiguelongue
2017-12-26 12:20 Mart Raudsepp
2017-12-10 18:37 Sobhan Mohammadpour
2017-12-10  4:04 Sobhan Mohammadpour
2017-09-13 22:19 Gilles Dartiguelongue
2016-10-30 11:44 Gilles Dartiguelongue
2016-10-30 11:44 Gilles Dartiguelongue
2016-10-30 11:44 Gilles Dartiguelongue
2016-09-05 22:05 Gilles Dartiguelongue
2015-12-24  1:18 Gilles Dartiguelongue
2015-12-24  1:18 Gilles Dartiguelongue
2015-11-26 22:46 Gilles Dartiguelongue
2015-05-25 16:08 Gilles Dartiguelongue
2015-05-25 16:08 Gilles Dartiguelongue
2015-05-24 16:33 Gilles Dartiguelongue
2015-05-24 16:33 Gilles Dartiguelongue
2015-05-10 21:27 Gilles Dartiguelongue
2014-11-23 22:35 Remi Cardona
2014-11-03 23:24 Gilles Dartiguelongue
2014-11-03 23:24 Gilles Dartiguelongue
2014-11-03 23:24 Gilles Dartiguelongue
2014-11-03 23:24 Gilles Dartiguelongue
2014-11-03 23:24 Gilles Dartiguelongue
2014-11-03 23:24 Gilles Dartiguelongue
2014-11-02 15:58 Gilles Dartiguelongue
2014-04-20 23:44 Gilles Dartiguelongue
2014-04-20 22:57 Gilles Dartiguelongue
2013-12-11 23:44 Gilles Dartiguelongue
2013-01-16 22:56 Gilles Dartiguelongue
2012-12-29 20:21 Gilles Dartiguelongue
2012-12-27 22:54 Gilles Dartiguelongue
2012-12-27 22:51 Gilles Dartiguelongue
2012-12-27 22:51 Gilles Dartiguelongue
2012-12-27 22:19 Gilles Dartiguelongue
2012-12-27 22:19 Gilles Dartiguelongue
2012-12-16 14:16 Gilles Dartiguelongue
2012-12-16 14:16 Gilles Dartiguelongue
2012-12-05 21:59 Alexandre Rostovtsev
2012-12-03 23:43 Gilles Dartiguelongue
2012-12-02 16:02 Gilles Dartiguelongue
2012-12-02 14:50 Gilles Dartiguelongue
2012-12-02 14:50 Gilles Dartiguelongue
2012-12-02 14:50 Gilles Dartiguelongue
2012-12-02 14:50 Gilles Dartiguelongue
2012-11-26 21:35 Gilles Dartiguelongue
2012-11-25 22:38 Gilles Dartiguelongue
2012-11-18 19:11 Gilles Dartiguelongue
2012-11-18 18:50 Gilles Dartiguelongue
2012-11-18 18:50 Gilles Dartiguelongue
2012-11-18 18:25 Gilles Dartiguelongue
2012-10-27  8:42 Gilles Dartiguelongue
2012-09-12 20:23 Alexandre Rostovtsev
2012-09-10  2:17 Alexandre Rostovtsev
2012-05-03  0:03 Alexandre Restovtsev
2012-04-24  3:36 Alexandre Restovtsev
2012-02-26 21:53 Alexandre Restovtsev
2012-02-12 15:32 Gilles Dartiguelongue
2012-01-03 11:56 Priit Laes
2011-12-18  5:26 Alexandre Restovtsev
2011-12-14 19:46 Alexandre Restovtsev
2011-11-15  1:31 Nirbheek Chauhan
2011-11-14  7:01 Alexandre Restovtsev
2011-11-04 20:35 Alexandre Restovtsev
2011-09-27 13:36 Nirbheek Chauhan
2011-09-26  4:46 Alexandre Restovtsev
2011-09-25 20:37 Alexandre Restovtsev
2011-09-20  2:17 Alexandre Restovtsev
2011-09-20  0:12 Alexandre Restovtsev
2011-08-28 18:46 Alexandre Restovtsev
2011-08-24  7:04 Arun Raghavan
2011-08-21  7:06 Alexandre Restovtsev
2011-07-19  0:22 Alexandre Restovtsev
2011-05-08 18:54 Gilles Dartiguelongue
2011-05-08 18:54 Gilles Dartiguelongue
2011-05-08 18:54 Gilles Dartiguelongue
2011-04-21 22:09 Gilles Dartiguelongue
2011-04-20 20:39 Nirbheek Chauhan
2011-04-20 18:58 Nirbheek Chauhan
2011-04-05  0:57 Nirbheek Chauhan
2011-04-05  0:57 Nirbheek Chauhan
2011-03-26  2:17 Nirbheek Chauhan
2011-03-20 22:15 Nirbheek Chauhan
2011-03-20 21:46 Nirbheek Chauhan
2011-03-16 20:20 Nirbheek Chauhan
2011-02-28 10:19 Nirbheek Chauhan
2011-02-25 23:34 Nirbheek Chauhan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1612036961.9a3e97683af38a7b9242a3a66e13a88cfbd8ac46.leio@gentoo \
    --to=leio@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox