commit: 188c06005b2cd5d3ce7ad0c186583f5112d32e5f Author: David Seifert <soap <AT> gentoo <DOT> org> AuthorDate: Fri Mar 17 22:04:16 2023 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Fri Mar 17 22:04:16 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=188c0600
gnome2.eclass: remove EAPI 5 Signed-off-by: David Seifert <soap <AT> gentoo.org> eclass/gnome2.eclass | 154 +++++++++++---------------------------------------- 1 file changed, 31 insertions(+), 123 deletions(-) diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass index a701b58fd9e7..37fbb94e55cd 100644 --- a/eclass/gnome2.eclass +++ b/eclass/gnome2.eclass @@ -1,35 +1,34 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: gnome2.eclass # @MAINTAINER: # gn...@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 6 7 8 # @PROVIDES: gnome2-utils # @BLURB: Provides phases for Gnome/Gtk+ based packages. # @DESCRIPTION: # Exports portage base functions used by ebuilds written for packages using the # GNOME framework. For additional functions, see gnome2-utils.eclass. +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_GNOME2_ECLASS} ]]; then +_GNOME2_ECLASS=1 + # @ECLASS_VARIABLE: GNOME2_EAUTORECONF # @DEFAULT_UNSET # @DESCRIPTION: # Run eautoreconf instead of only elibtoolize GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""} -[[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools -[[ ${EAPI} == [56] ]] && inherit eutils ltprune -inherit libtool gnome.org gnome2-utils xdg +[[ ${GNOME2_EAUTORECONF} == yes ]] && inherit autotools +[[ ${EAPI} == 6 ]] && inherit ltprune -case ${EAPI} in - 5) - EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm - ;; - 6|7|8) - EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm - ;; - *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; -esac +inherit libtool gnome.org gnome2-utils xdg # @ECLASS_VARIABLE: ELTCONF # @DEFAULT_UNSET @@ -37,34 +36,6 @@ esac # Extra options passed to elibtoolize ELTCONF=${ELTCONF:-""} -# @ECLASS_VARIABLE: G2CONF -# @DEFAULT_UNSET -# @DESCRIPTION: -# Extra configure opts passed to econf. -# Deprecated, pass extra arguments to gnome2_src_configure. -# Banned in eapi6 and newer. -if has ${EAPI} 5; then - G2CONF=${G2CONF:-""} -fi - -# @ECLASS_VARIABLE: GCONF_DEBUG -# @DEFAULT_UNSET -# @DESCRIPTION: -# Whether to handle debug or not. -# Some gnome applications support various levels of debugging (yes, no, minimum, -# etc), but using --disable-debug also removes g_assert which makes debugging -# harder. This variable should be set to yes for such packages for the eclass -# to handle it properly. It will enable minimal debug with USE=-debug. -# Note that this is most commonly found in configure.ac as GNOME_DEBUG_CHECK. -# -# 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} 5; then - if [[ ${GCONF_DEBUG} != "no" ]]; then - IUSE="debug" - fi -fi - # @ECLASS_VARIABLE: GNOME2_ECLASS_GIO_MODULES # @INTERNAL # @DESCRIPTION: @@ -72,47 +43,29 @@ fi # @ECLASS_VARIABLE: GNOME2_LA_PUNT # @DESCRIPTION: -# In EAPIs 5 and 6, it relies on prune_libtool_files (from ltprune.eclass) for +# In EAPI 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 GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""} -# @FUNCTION: gnome2_src_unpack -# @DESCRIPTION: -# Stub function for old EAPI. -gnome2_src_unpack() { - if has ${EAPI} 5; then - unpack ${A} - cd "${S}" - else - die "gnome2_src_unpack is banned since eapi6" - fi -} - # @FUNCTION: gnome2_src_prepare # @DESCRIPTION: # Prepare environment for build, fix build of scrollkeeper documentation, # run elibtoolize. gnome2_src_prepare() { - [[ ${EAPI} != 5 ]] && default + default # Prevent assorted access violations and test failures gnome2_environment_reset - # Prevent scrollkeeper access violations - # 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} 5 && gnome2_omf_fix - # Disable all deprecation warnings gnome2_disable_deprecation_warning # Run libtoolize or eautoreconf, bug #591584 # https://bugzilla.gnome.org/show_bug.cgi?id=655517 - if [[ ${GNOME2_EAUTORECONF} == 'yes' ]]; then + if [[ ${GNOME2_EAUTORECONF} == yes ]]; then eautoreconf else elibtoolize ${ELTCONF} @@ -123,29 +76,8 @@ gnome2_src_prepare() { # @DESCRIPTION: # Gnome specific configure handling gnome2_src_configure() { - # Deprecated for a long time now and banned since eapi6, see Gnome team policies - if [[ -n ${G2CONF} ]] ; 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" - fi - fi - local g2conf=() - if has ${EAPI} 5; then - if [[ ${GCONF_DEBUG} != 'no' ]] ; then - if use debug ; then - g2conf+=( --enable-debug=yes ) - fi - fi - else - if [[ -n ${GCONF_DEBUG} ]] ; then - die "GCONF_DEBUG is banned since eapi6 in favor of each ebuild taking care of the proper handling of debug configure option" - fi - fi - # 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 @@ -187,36 +119,17 @@ gnome2_src_configure() { g2conf+=( --enable-compile-warnings=minimum ) fi - # Pass --docdir with proper directory, bug #482646 (not needed since eapi6) - 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} 5; then - addwrite "$(unset HOME; echo ~)/.gnome2" - else - addpredict "$(unset HOME; echo ~)/.gnome2" - fi + addpredict "$(unset HOME; echo ~)/.gnome2" - if has ${EAPI} 5; then - econf ${g2conf[@]} ${G2CONF} "$@" - else - econf ${g2conf[@]} "$@" - fi + econf ${g2conf[@]} "$@" } # @FUNCTION: gnome2_src_compile # @DESCRIPTION: # Only default src_compile for now gnome2_src_compile() { - if has ${EAPI} 5; then - emake - else - default - fi + default } # @FUNCTION: gnome2_src_install @@ -233,40 +146,31 @@ gnome2_src_install() { # # if this is not present, scrollkeeper-update may segfault and # create bogus directories in /var/lib/ - if has ${EAPI} 5; then - dodir "${sk_tmp_dir}" || die "dodir failed" - emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install - else - default - fi + default unset GCONF_DISABLE_MAKEFILE_SCHEMA_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} 5; then - einstalldocs - else - local d - for d in HACKING MAINTAINERS; do - [[ -s "${d}" ]] && dodoc "${d}" - done - fi + local d + for d in HACKING MAINTAINERS; do + [[ -s ${d} ]] && dodoc "${d}" + done # Do not keep /var/lib/scrollkeeper because: # 1. The scrollkeeper database is regenerated at pkg_postinst() # 2. ${ED}/var/lib/scrollkeeper contains only indexes for the current pkg # thus it makes no sense if pkg_postinst ISN'T run for some reason. - rm -rf "${ED}${sk_tmp_dir}" + rm -rf "${ED}${sk_tmp_dir}" || die rmdir "${ED}/var/lib" 2>/dev/null rmdir "${ED}/var" 2>/dev/null # Make sure this one doesn't get in the portage db - rm -fr "${ED}/usr/share/applications/mimeinfo.cache" + rm -rf "${ED}/usr/share/applications/mimeinfo.cache" || die # Delete all .la files - if has ${EAPI} 5 6; then + if has ${EAPI} 6; then case "${GNOME2_LA_PUNT}" in yes) prune_libtool_files --modules;; no) ;; @@ -336,3 +240,7 @@ gnome2_pkg_postrm() { gnome2_giomodule_cache_update fi } + +fi + +EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm