* [gentoo-dev] [PATCH] gnome2.eclass: Add EAPI=7 support
@ 2020-12-06 18:57 Matt Turner
2020-12-06 20:08 ` Matt Turner
0 siblings, 1 reply; 3+ messages in thread
From: Matt Turner @ 2020-12-06 18:57 UTC (permalink / raw
To: gentoo-dev; +Cc: Matt Turner
Mostly by porting away from ltprune.eclass.
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
eclass/gnome2.eclass | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 341802f8c80..4d8dc6c08d6 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -4,7 +4,7 @@
# @ECLASS: gnome2.eclass
# @MAINTAINER:
# gnome@gentoo.org
-# @SUPPORTED_EAPIS: 5 6
+# @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
@@ -17,13 +17,14 @@
GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""}
[[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools
-inherit eutils libtool ltprune gnome.org gnome2-utils xdg
+[[ ${EAPI} == [56] ]] && inherit eutils
+inherit libtool gnome.org gnome2-utils xdg
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" ;;
@@ -70,12 +71,11 @@ fi
# @ECLASS-VARIABLE: GNOME2_LA_PUNT
# @DESCRIPTION:
-# It relies on prune_libtool_files (from ltprune.eclass)
-# for this. Available values for GNOME2_LA_PUNT:
+# 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:-""}
+# - "yes": will run "find "${ED}" -name '*.la' -delete"
+# - If it is not set, it will prune libtool files
+GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"yes"}
# @FUNCTION: gnome2_src_unpack
# @DESCRIPTION:
@@ -265,9 +265,8 @@ gnome2_src_install() {
# Delete all .la files
case "${GNOME2_LA_PUNT}" in
- yes) prune_libtool_files --modules;;
no) ;;
- *) prune_libtool_files;;
+ *) find "${ED}" -name '*.la' -delete || die;;
esac
}
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-dev] [PATCH] gnome2.eclass: Add EAPI=7 support
2020-12-06 18:57 [gentoo-dev] [PATCH] gnome2.eclass: Add EAPI=7 support Matt Turner
@ 2020-12-06 20:08 ` Matt Turner
2020-12-07 1:57 ` Matt Turner
0 siblings, 1 reply; 3+ messages in thread
From: Matt Turner @ 2020-12-06 20:08 UTC (permalink / raw
To: gentoo-dev; +Cc: Matt Turner
Closes: https://bugs.gentoo.org/717100
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
leio noted that the previous patch would potentially change the
installed .la files in EAPI 5 and 6 ebuilds. So just continue using
ltprune in those EAPIs and ban GNOME2_LA_PUNT in EAPI 7.
eclass/gnome2.eclass | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 341802f8c80..546438f289c 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -4,7 +4,7 @@
# @ECLASS: gnome2.eclass
# @MAINTAINER:
# gnome@gentoo.org
-# @SUPPORTED_EAPIS: 5 6
+# @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
@@ -17,13 +17,14 @@
GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""}
[[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools
-inherit eutils libtool ltprune gnome.org gnome2-utils xdg
+[[ ${EAPI} == [56] ]] && inherit eutils ltprune
+inherit libtool gnome.org gnome2-utils xdg
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" ;;
@@ -75,7 +76,14 @@ fi
# - "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:-""}
+# Banned since eapi7.
+if has ${EAPI} 5 6; then
+ GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
+elif [[ -n $GNOME_LA_PUNT ]]; then
+ die "GNOME2_LA_PUNT is banned since eapi7"
+else
+ GNOME2_LA_PUNT="no"
+fi
# @FUNCTION: gnome2_src_unpack
# @DESCRIPTION:
@@ -85,7 +93,7 @@ gnome2_src_unpack() {
unpack ${A}
cd "${S}"
else
- die "gnome2_src_unpack is banned from eapi6"
+ die "gnome2_src_unpack is banned since eapi6"
fi
}
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-dev] [PATCH] gnome2.eclass: Add EAPI=7 support
2020-12-06 20:08 ` Matt Turner
@ 2020-12-07 1:57 ` Matt Turner
0 siblings, 0 replies; 3+ messages in thread
From: Matt Turner @ 2020-12-07 1:57 UTC (permalink / raw
To: gentoo-dev; +Cc: Matt Turner
Closes: https://bugs.gentoo.org/658638
Closes: https://bugs.gentoo.org/717100
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
leio noted that banning GNOME2_LA_PUNT from EAPI 7 would mean adding
src_install() { gnome2_src_install }
to a bunch of ebuilds, which we don't want to do. Implement
GNOME2_LA_PUNT with find ... -delete in EAPI 7.
eclass/gnome2.eclass | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 341802f8c80..27ea9f96c0d 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -4,7 +4,7 @@
# @ECLASS: gnome2.eclass
# @MAINTAINER:
# gnome@gentoo.org
-# @SUPPORTED_EAPIS: 5 6
+# @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
@@ -17,13 +17,14 @@
GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""}
[[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools
-inherit eutils libtool ltprune gnome.org gnome2-utils xdg
+[[ ${EAPI} == [56] ]] && inherit eutils ltprune
+inherit libtool gnome.org gnome2-utils xdg
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" ;;
@@ -70,8 +71,8 @@ fi
# @ECLASS-VARIABLE: GNOME2_LA_PUNT
# @DESCRIPTION:
-# It relies on prune_libtool_files (from ltprune.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
@@ -85,7 +86,7 @@ gnome2_src_unpack() {
unpack ${A}
cd "${S}"
else
- die "gnome2_src_unpack is banned from eapi6"
+ die "gnome2_src_unpack is banned since eapi6"
fi
}
@@ -264,11 +265,17 @@ gnome2_src_install() {
rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
# Delete all .la files
- case "${GNOME2_LA_PUNT}" in
- yes) prune_libtool_files --modules;;
- no) ;;
- *) prune_libtool_files;;
- esac
+ 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
}
# @FUNCTION: gnome2_pkg_preinst
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-07 1:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-06 18:57 [gentoo-dev] [PATCH] gnome2.eclass: Add EAPI=7 support Matt Turner
2020-12-06 20:08 ` Matt Turner
2020-12-07 1:57 ` Matt Turner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox