diff options
author | 2024-07-15 07:34:30 +0000 | |
---|---|---|
committer | 2024-07-15 07:34:30 +0000 | |
commit | 6cecdee71c398169d720962473efbe7cf250f826 (patch) | |
tree | 555225a8eb1c3e1f15fce870b3a5c2fa20e80be6 | |
parent | 2024-07-15 07:19:40 UTC (diff) | |
parent | gnome2-utils.eclass: remove EAPI 5 and 6 (diff) | |
download | gentoo-6cecdee71c398169d720962473efbe7cf250f826.tar.gz gentoo-6cecdee71c398169d720962473efbe7cf250f826.tar.bz2 gentoo-6cecdee71c398169d720962473efbe7cf250f826.zip |
Merge updates from master
-rw-r--r-- | eclass/gnome.org.eclass | 19 | ||||
-rw-r--r-- | eclass/gnome2-utils.eclass | 97 | ||||
-rw-r--r-- | eclass/gnome2.eclass | 38 |
3 files changed, 50 insertions, 104 deletions
diff --git a/eclass/gnome.org.eclass b/eclass/gnome.org.eclass index 760dc2ba0b66..70884edefef7 100644 --- a/eclass/gnome.org.eclass +++ b/eclass/gnome.org.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: gnome.org.eclass @@ -7,22 +7,19 @@ # @AUTHOR: # Authors: Spidler <spidler@gentoo.org> with help of carparski. # eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Helper eclass for gnome.org hosted archives # @DESCRIPTION: # Provide a default SRC_URI for tarball hosted on gnome.org mirrors. case ${EAPI} in - 5|6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac if [[ -z ${_GNOME_ORG_ECLASS} ]] ; then _GNOME_ORG_ECLASS=1 -# versionator inherit kept for older EAPIs due to ebuilds (potentially) relying on it -[[ ${EAPI} == [56] ]] && inherit eapi7-ver versionator - # @ECLASS_VARIABLE: GNOME_TARBALL_SUFFIX # @PRE_INHERIT # @DESCRIPTION: @@ -33,19 +30,13 @@ _GNOME_ORG_ECLASS=1 # Even though xz-utils are in @system, they must still be added to BDEPEND; see # https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml -if [[ ${GNOME_TARBALL_SUFFIX} == "xz" ]]; then - if [[ ${EAPI} != [56] ]]; then - BDEPEND="app-arch/xz-utils" - else - DEPEND="app-arch/xz-utils" - fi -fi +[[ ${GNOME_TARBALL_SUFFIX} == "xz" ]] && BDEPEND="app-arch/xz-utils" # @ECLASS_VARIABLE: GNOME_ORG_MODULE # @DESCRIPTION: # Name of the module as hosted on gnome.org mirrors. # Leave unset if package name matches module name. -: "${GNOME_ORG_MODULE:=$PN}" +: "${GNOME_ORG_MODULE:=${PN}}" # @ECLASS_VARIABLE: GNOME_ORG_RELEASE # @INTERNAL diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass index bbee2a419dfc..dd4014c09bf7 100644 --- a/eclass/gnome2-utils.eclass +++ b/eclass/gnome2-utils.eclass @@ -4,7 +4,7 @@ # @ECLASS: gnome2-utils.eclass # @MAINTAINER: # gnome@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @PROVIDES: xdg-utils # @BLURB: Auxiliary functions commonly used by Gnome packages. # @DESCRIPTION: @@ -15,13 +15,12 @@ # * GConf schemas management # * scrollkeeper (old Gnome help system) management -[[ ${EAPI} == 5 ]] && inherit multilib # toolchain-funs.eclass: tc-is-cross-compiler # xdg-utils.eclass: xdg_environment_reset, xdg_icon_cache_update inherit toolchain-funcs xdg-utils case ${EAPI} in - 5|6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -100,7 +99,7 @@ gnome2_environment_reset() { # Ensure we don't rely on dconf/gconf while building, bug #511946 export GSETTINGS_BACKEND="memory" - if has ${EAPI} 6 7; then + if [[ ${EAPI} == 7 ]]; then # Try to cover the packages honoring this variable, bug #508124 export GST_INSPECT="$(type -P true)" @@ -126,7 +125,7 @@ gnome2_gconf_savelist() { # using gconftool-2. # This function should be called from pkg_postinst. gnome2_gconf_install() { - local updater="${EROOT%/}${GCONFTOOL_BIN}" + local updater="${EROOT}${GCONFTOOL_BIN}" if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then debug-print "No GNOME 2 GConf schemas found" @@ -148,15 +147,15 @@ gnome2_gconf_install() { # We are ready to install the GCONF Scheme now unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL - export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT%/}/;")" + export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT}/;")" einfo "Installing GNOME 2 GConf schemas" local F for F in ${GNOME2_ECLASS_SCHEMAS}; do - if [[ -e "${EROOT%/}/${F}" ]]; then + if [[ -e "${EROOT}/${F}" ]]; then debug-print "Installing schema: ${F}" - "${updater}" --makefile-install-rule "${EROOT%/}/${F}" 1>/dev/null + "${updater}" --makefile-install-rule "${EROOT}/${F}" 1>/dev/null fi done @@ -174,7 +173,7 @@ gnome2_gconf_install() { # Removes schema files previously installed by the current ebuild from Gconf's # database. gnome2_gconf_uninstall() { - local updater="${EROOT%/}${GCONFTOOL_BIN}" + local updater="${EROOT}${GCONFTOOL_BIN}" if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then debug-print "No GNOME 2 GConf schemas found" @@ -194,15 +193,15 @@ gnome2_gconf_uninstall() { fi unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL - export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT%/}/;")" + export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT}/;")" einfo "Uninstalling GNOME 2 GConf schemas" local F for F in ${GNOME2_ECLASS_SCHEMAS}; do - if [[ -e "${EROOT%/}/${F}" ]]; then + if [[ -e "${EROOT}/${F}" ]]; then debug-print "Uninstalling gconf schema: ${F}" - "${updater}" --makefile-uninstall-rule "${EROOT%/}/${F}" 1>/dev/null + "${updater}" --makefile-uninstall-rule "${EROOT}/${F}" 1>/dev/null fi done @@ -221,31 +220,29 @@ gnome2_gconf_uninstall() { # calls to scrollkeeper-update and sandbox violations. # This function should be called from src_prepare. gnome2_omf_fix() { - local omf_makefiles filename - - omf_makefiles="$@" + local omf_makefiles=( "$@" ) if [[ -f ${S}/omf.make ]] ; then - omf_makefiles="${omf_makefiles} ${S}/omf.make" + omf_makefiles+=( "${S}"/omf.make ) fi if [[ -f ${S}/gnome-doc-utils.make ]] ; then - omf_makefiles="${omf_makefiles} ${S}/gnome-doc-utils.make" + omf_makefiles+=( "${S}"/gnome-doc-utils.make ) fi # testing fixing of all makefiles found # The sort is important to ensure .am is listed before the respective .in for # maintainer mode regeneration not kicking in due to .am being newer than .in - for filename in $(find "${S}" -name "Makefile.in" -o -name "Makefile.am" |sort) ; do - omf_makefiles="${omf_makefiles} ${filename}" - done + local filename + while IFS="" read -r filename ; do + omf_makefiles+=( "${filename}" ) + done < <(find "${S}" -name "Makefile.in" -o -name "Makefile.am" | sort) ebegin "Fixing OMF Makefiles" - local retval=0 + local omf retval=0 local fails=( ) - - for omf in ${omf_makefiles} ; do + for omf in "${omf_makefiles[@]}" ; do sed -i -e 's:scrollkeeper-update:true:' "${omf}" retval=$? @@ -253,7 +250,7 @@ gnome2_omf_fix() { debug-print "updating of ${omf} failed" # Add to the list of failures - fails[$(( ${#fails[@]} + 1 ))]=$omf + fails+=( "${omf}" ) retval=2 fi @@ -261,6 +258,7 @@ gnome2_omf_fix() { eend $retval + local f for f in "${fails[@]}" ; do eerror "Failed to update OMF Makefile $f" done @@ -282,7 +280,7 @@ gnome2_scrollkeeper_savelist() { # Updates the global scrollkeeper database. # This function should be called from pkg_postinst and pkg_postrm. gnome2_scrollkeeper_update() { - local updater="${EROOT%/}${SCROLLKEEPER_UPDATE_BIN}" + local updater="${EROOT}${SCROLLKEEPER_UPDATE_BIN}" if [[ -z "${GNOME2_ECLASS_SCROLLS}" ]]; then debug-print "No scroll cache to update" @@ -303,7 +301,7 @@ gnome2_scrollkeeper_update() { fi ebegin "Updating scrollkeeper database ..." - "${updater}" -q -p "${EROOT%/}${SCROLLKEEPER_DIR}" + "${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}" eend $? } @@ -324,7 +322,7 @@ gnome2_schemas_savelist() { # Updates GSettings schemas. # This function should be called from pkg_postinst and pkg_postrm. gnome2_schemas_update() { - local updater="${EROOT%/}${GLIB_COMPILE_SCHEMAS}" + local updater="${EROOT}${GLIB_COMPILE_SCHEMAS}" if tc-is-cross-compiler ; then ewarn "Updating of GSettings schemas skipped due to cross-compilation." @@ -340,7 +338,7 @@ gnome2_schemas_update() { fi ebegin "Updating GSettings schemas" - ${updater} --allow-any-name "$@" "${EROOT%/}/usr/share/glib-2.0/schemas" &>/dev/null + ${updater} --allow-any-name "$@" "${EROOT}/usr/share/glib-2.0/schemas" &>/dev/null eend $? } @@ -360,8 +358,8 @@ gnome2_gdk_pixbuf_savelist() { # 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() { - local updater="${EROOT%/}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders" - [[ -x ${updater} ]] || updater="${EROOT%/}/usr/bin/gdk-pixbuf-query-loaders" + local updater="${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders" + [[ -x ${updater} ]] || updater="${EROOT}/usr/bin/gdk-pixbuf-query-loaders" if tc-is-cross-compiler ; then ewarn "Updating of gdk-pixbuf loader cache skipped due to cross-compilation." @@ -380,7 +378,7 @@ gnome2_gdk_pixbuf_update() { local tmp_file=$(mktemp "${T}"/tmp.XXXXXXXXXX) || die "Failed to create temporary file" ${updater} 1> "${tmp_file}" && chmod 0644 "${tmp_file}" && - cp -f "${tmp_file}" "${EROOT%/}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" && + cp -f "${tmp_file}" "${EROOT}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" && rm "${tmp_file}" # don't replace this with mv, required for SELinux support eend $? } @@ -398,7 +396,7 @@ gnome2_query_immodules_gtk2() { fi ebegin "Updating gtk2 input method module cache" - GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \ + GTK_IM_MODULE_FILE="${EROOT}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \ "${updater}" --update-cache eend $? } @@ -416,7 +414,7 @@ gnome2_query_immodules_gtk3() { fi ebegin "Updating gtk3 input method module cache" - GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \ + GTK_IM_MODULE_FILE="${EROOT}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \ "${updater}" --update-cache eend $? } @@ -426,8 +424,8 @@ gnome2_query_immodules_gtk3() { # Updates glib's gio modules cache. # This function should be called from pkg_postinst and pkg_postrm. gnome2_giomodule_cache_update() { - local updater="${EROOT%/}/usr/bin/${CHOST}-gio-querymodules" - [[ -x ${updater} ]] || updater="${EROOT%/}/usr/bin/gio-querymodules" + local updater="${EROOT}/usr/bin/${CHOST}-gio-querymodules" + [[ -x ${updater} ]] || updater="${EROOT}/usr/bin/gio-querymodules" if tc-is-cross-compiler ; then ewarn "Updating of GIO modules cache skipped due to cross-compilation." @@ -443,7 +441,7 @@ gnome2_giomodule_cache_update() { fi ebegin "Updating GIO modules cache" - ${updater} "${EROOT%/}"/usr/$(get_libdir)/gio/modules + ${updater} "${EROOT}"/usr/$(get_libdir)/gio/modules eend $? } @@ -486,30 +484,3 @@ gnome2_disable_deprecation_warning() { ewarn "Failed to disable deprecation warnings in ${makefile}" done } - -case ${EAPI} in -5|6) - -# @FUNCTION: gnome2_icon_savelist -# @DESCRIPTION: -# Find the icons that are about to be installed and save their location -# in the GNOME2_ECLASS_ICONS environment variable. This is only -# necessary for eclass implementations that call -# gnome2_icon_cache_update conditionally. -# This function should be called from pkg_preinst. -gnome2_icon_savelist() { - pushd "${ED}" > /dev/null || die - export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) - popd > /dev/null || die -} - -# @FUNCTION: gnome2_icon_cache_update -# @DESCRIPTION: -# Updates Gtk+ icon cache files under /usr/share/icons. -# Deprecated. Please use xdg_icon_cache_update from xdg-utils.eclass -gnome2_icon_cache_update() { - xdg_icon_cache_update -} - -;; -esac diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass index 66de2df97f9f..9ef5d92a1c9e 100644 --- a/eclass/gnome2.eclass +++ b/eclass/gnome2.eclass @@ -4,7 +4,7 @@ # @ECLASS: gnome2.eclass # @MAINTAINER: # gnome@gentoo.org -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @PROVIDES: gnome2-utils # @BLURB: Provides phases for Gnome/Gtk+ based packages. # @DESCRIPTION: @@ -12,7 +12,7 @@ # GNOME framework. For additional functions, see gnome2-utils.eclass. case ${EAPI} in - 6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -22,11 +22,9 @@ _GNOME2_ECLASS=1 # @ECLASS_VARIABLE: GNOME2_EAUTORECONF # @DEFAULT_UNSET # @DESCRIPTION: -# Run eautoreconf instead of only elibtoolize -GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""} +# Run eautoreconf instead of only elibtoolize if set to "yes". [[ ${GNOME2_EAUTORECONF} == yes ]] && inherit autotools -[[ ${EAPI} == 6 ]] && inherit ltprune inherit libtool gnome.org gnome2-utils xdg @@ -34,7 +32,6 @@ inherit libtool gnome.org gnome2-utils xdg # @DEFAULT_UNSET # @DESCRIPTION: # Extra options passed to elibtoolize -ELTCONF=${ELTCONF:-""} # @ECLASS_VARIABLE: GNOME2_ECLASS_GIO_MODULES # @INTERNAL @@ -42,13 +39,10 @@ ELTCONF=${ELTCONF:-""} # Array containing glib GIO modules # @ECLASS_VARIABLE: GNOME2_LA_PUNT +# @DEFAULT_UNSET # @DESCRIPTION: -# 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:-""} +# If set to "no", no .la files will be cleaned, otherwise +# will run "find ... -delete" in src_install. # @FUNCTION: gnome2_src_prepare # @DESCRIPTION: @@ -141,8 +135,7 @@ gnome2_src_install() { export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" local sk_tmp_dir="/var/lib/scrollkeeper" - # scrollkeeper-update from rarian doesn't do anything. Then, since eapi6 - # we stop taking care of it + # scrollkeeper-update from rarian doesn't do anything. # # if this is not present, scrollkeeper-update may segfault and # create bogus directories in /var/lib/ @@ -150,9 +143,8 @@ gnome2_src_install() { 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) + # Install MAINTAINERS and HACKING which are really common + # in gnome packages (bug #573390) local d for d in HACKING MAINTAINERS; do [[ -s ${d} ]] && dodoc "${d}" @@ -170,16 +162,8 @@ gnome2_src_install() { rm -rf "${ED}/usr/share/applications/mimeinfo.cache" || die # Delete all .la files - if has ${EAPI} 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 + if [[ ${GNOME2_LA_PUNT} != no ]]; then + find "${ED}" -type f -name '*.la' -delete || die fi } |