Gentoo Archives: gentoo-dev

From: Matt Turner <mattst88@g.o>
To: gentoo-dev@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-dev] [PATCH] gnome2-utils: Drop EAPI < 5 support
Date: Sun, 06 Dec 2020 05:08:46
Message-Id: 20201206050831.1245904-1-mattst88@gentoo.org
1 Closes: https://bugs.gentoo.org/566728
2 Signed-off-by: Matt Turner <mattst88@g.o>
3 ---
4 eclass/gnome2-utils.eclass | 21 +++++----------------
5 1 file changed, 5 insertions(+), 16 deletions(-)
6
7 diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
8 index 06643db0f60..e32449890dd 100644
9 --- a/eclass/gnome2-utils.eclass
10 +++ b/eclass/gnome2-utils.eclass
11 @@ -4,7 +4,7 @@
12 # @ECLASS: gnome2-utils.eclass
13 # @MAINTAINER:
14 # gnome@g.o
15 -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
16 +# @SUPPORTED_EAPIS: 5 6 7
17 # @BLURB: Auxiliary functions commonly used by Gnome packages.
18 # @DESCRIPTION:
19 # This eclass provides a set of auxiliary functions needed by most Gnome
20 @@ -14,14 +14,14 @@
21 # * GConf schemas management
22 # * scrollkeeper (old Gnome help system) management
23
24 -[[ ${EAPI:-0} == [012345] ]] && inherit multilib
25 +[[ ${EAPI:-0} == [5] ]] && inherit multilib
26 # eutils.eclass: emktemp
27 # xdg-utils.eclass: xdg_environment_reset, xdg_icon_cache_update
28 inherit eutils xdg-utils
29
30 case "${EAPI:-0}" in
31 - 0|1|2|3|4|5|6|7) ;;
32 - *) die "EAPI=${EAPI} is not supported" ;;
33 + 5|6|7) ;;
34 + 0|1|2|3|4) die "EAPI=${EAPI} is not supported" ;;
35 esac
36
37 # @ECLASS-VARIABLE: GCONFTOOL_BIN
38 @@ -110,7 +110,6 @@ gnome2_environment_reset() {
39 # in the GNOME2_ECLASS_SCHEMAS environment variable.
40 # This function should be called from pkg_preinst.
41 gnome2_gconf_savelist() {
42 - has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
43 pushd "${ED}" > /dev/null || die
44 export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
45 popd > /dev/null || die
46 @@ -122,7 +121,6 @@ gnome2_gconf_savelist() {
47 # using gconftool-2.
48 # This function should be called from pkg_postinst.
49 gnome2_gconf_install() {
50 - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
51 local updater="${EROOT%/}${GCONFTOOL_BIN}"
52
53 if [[ ! -x "${updater}" ]]; then
54 @@ -163,7 +161,6 @@ gnome2_gconf_install() {
55 # Removes schema files previously installed by the current ebuild from Gconf's
56 # database.
57 gnome2_gconf_uninstall() {
58 - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
59 local updater="${EROOT%/}${GCONFTOOL_BIN}"
60
61 if [[ ! -x "${updater}" ]]; then
62 @@ -255,7 +252,6 @@ gnome2_omf_fix() {
63 # in the GNOME2_ECLASS_SCROLLS environment variable.
64 # This function should be called from pkg_preinst.
65 gnome2_scrollkeeper_savelist() {
66 - has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
67 pushd "${ED}" > /dev/null || die
68 export GNOME2_ECLASS_SCROLLS=$(find 'usr/share/omf' -type f -name "*.omf" 2> /dev/null)
69 popd > /dev/null || die
70 @@ -266,7 +262,6 @@ gnome2_scrollkeeper_savelist() {
71 # Updates the global scrollkeeper database.
72 # This function should be called from pkg_postinst and pkg_postrm.
73 gnome2_scrollkeeper_update() {
74 - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
75 local updater="${EROOT%/}${SCROLLKEEPER_UPDATE_BIN}"
76
77 if [[ ! -x "${updater}" ]] ; then
78 @@ -291,7 +286,6 @@ gnome2_scrollkeeper_update() {
79 # implementations that call gnome2_schemas_update conditionally.
80 # This function should be called from pkg_preinst.
81 gnome2_schemas_savelist() {
82 - has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
83 pushd "${ED}" > /dev/null || die
84 export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' -name '*.gschema.xml' 2>/dev/null)
85 popd > /dev/null || die
86 @@ -302,7 +296,6 @@ gnome2_schemas_savelist() {
87 # Updates GSettings schemas.
88 # This function should be called from pkg_postinst and pkg_postrm.
89 gnome2_schemas_update() {
90 - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
91 local updater="${EROOT%/}${GLIB_COMPILE_SCHEMAS}"
92
93 if [[ ! -x ${updater} ]]; then
94 @@ -321,7 +314,6 @@ gnome2_schemas_update() {
95 # GNOME2_ECLASS_GDK_PIXBUF_LOADERS variable.
96 # This function should be called from pkg_preinst.
97 gnome2_gdk_pixbuf_savelist() {
98 - has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
99 pushd "${ED}" > /dev/null || die
100 export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find usr/lib*/gdk-pixbuf-2.0 -type f 2>/dev/null)
101 popd > /dev/null || die
102 @@ -332,7 +324,6 @@ gnome2_gdk_pixbuf_savelist() {
103 # Updates gdk-pixbuf loader cache if GNOME2_ECLASS_GDK_PIXBUF_LOADERS has some.
104 # This function should be called from pkg_postinst and pkg_postrm.
105 gnome2_gdk_pixbuf_update() {
106 - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
107 local updater="${EROOT%/}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders"
108
109 if [[ ! -x ${updater} ]]; then
110 @@ -389,7 +380,6 @@ gnome2_query_immodules_gtk3() {
111 # Updates glib's gio modules cache.
112 # This function should be called from pkg_postinst and pkg_postrm.
113 gnome2_giomodule_cache_update() {
114 - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
115 local updater="${EROOT%/}/usr/bin/${CHOST}-gio-querymodules"
116
117 if [[ ! -x ${updater} ]]; then
118 @@ -447,7 +437,7 @@ gnome2_disable_deprecation_warning() {
119 }
120
121 case ${EAPI:-0} in
122 -0|1|2|3|4|5|6)
123 +5|6)
124
125 # @FUNCTION: gnome2_icon_savelist
126 # @DESCRIPTION:
127 @@ -457,7 +447,6 @@ case ${EAPI:-0} in
128 # gnome2_icon_cache_update conditionally.
129 # This function should be called from pkg_preinst.
130 gnome2_icon_savelist() {
131 - has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
132 pushd "${ED}" > /dev/null || die
133 export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
134 popd > /dev/null || die
135 --
136 2.26.2

Replies