public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Maciej Barć" <xgqt@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/
Date: Wed, 10 Aug 2022 15:02:44 +0000 (UTC)	[thread overview]
Message-ID: <1660143519.cc08c0c4268af7240a3d463cab35e2e2fca06091.xgqt@gentoo> (raw)

commit:     cc08c0c4268af7240a3d463cab35e2e2fca06091
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 10 14:50:12 2022 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Wed Aug 10 14:58:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc08c0c4

sys-devel/binutils: add the "emacs" USE flag

Closes: https://bugs.gentoo.org/841011
Acked-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 sys-devel/binutils/binutils-2.38-r2.ebuild    | 16 ++++++++++++++--
 sys-devel/binutils/binutils-2.39.ebuild       | 16 ++++++++++++++--
 sys-devel/binutils/binutils-9999.ebuild       | 16 ++++++++++++++--
 sys-devel/binutils/files/50binutils-gentoo.el |  3 +++
 4 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/sys-devel/binutils/binutils-2.38-r2.ebuild b/sys-devel/binutils/binutils-2.38-r2.ebuild
index 47b5e977cdfd..71cc495774c1 100644
--- a/sys-devel/binutils/binutils-2.38-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.38-r2.ebuild
@@ -3,12 +3,12 @@
 
 EAPI=7
 
-inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"
 LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc emacs +gold multitarget +nls pgo +plugins static-libs test vanilla"
 REQUIRED_USE="default-gold? ( gold )"
 
 # Variables that can be set here  (ignored for live ebuilds)
@@ -52,6 +52,7 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
 RDEPEND="
 	>=sys-devel/binutils-config-3
 	sys-libs/zlib
+	emacs? ( >=app-editors/emacs-23.1:* )
 "
 DEPEND="${RDEPEND}"
 BDEPEND="
@@ -311,6 +312,8 @@ src_compile() {
 		emake V=1 info
 	fi
 
+	use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
+
 	# we nuke the manpages when we're left with junk
 	# (like when we bootstrap, no perl -> no manpages)
 	find . -name '*.1' -a -size 0 -delete
@@ -403,6 +406,11 @@ src_install() {
 		dodoc opcodes/ChangeLog*
 	fi
 
+	if use emacs ; then
+		elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
+		elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+	fi
+
 	# Remove shared info pages
 	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
 
@@ -414,6 +422,8 @@ pkg_postinst() {
 	# Make sure this ${CTARGET} has a binutils version selected
 	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
 	binutils-config ${CTARGET}-${PV}
+
+	use emacs && elisp-site-regen
 }
 
 pkg_postrm() {
@@ -437,6 +447,8 @@ pkg_postrm() {
 	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
 		binutils-config ${CTARGET}-${PV}
 	fi
+
+	use emacs && elisp-site-regen
 }
 
 # Note [slotting support]

diff --git a/sys-devel/binutils/binutils-2.39.ebuild b/sys-devel/binutils/binutils-2.39.ebuild
index 3b954f859b3a..3cc9c5cdcc87 100644
--- a/sys-devel/binutils/binutils-2.39.ebuild
+++ b/sys-devel/binutils/binutils-2.39.ebuild
@@ -3,12 +3,12 @@
 
 EAPI=7
 
-inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"
 LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc emacs gold multitarget +nls pgo +plugins static-libs test vanilla"
 REQUIRED_USE="default-gold? ( gold )"
 
 # Variables that can be set here  (ignored for live ebuilds)
@@ -54,6 +54,7 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
 RDEPEND="
 	>=sys-devel/binutils-config-3
 	sys-libs/zlib
+	emacs? ( >=app-editors/emacs-23.1:* )
 "
 DEPEND="${RDEPEND}"
 BDEPEND="
@@ -316,6 +317,8 @@ src_compile() {
 		emake V=1 info
 	fi
 
+	use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
+
 	# we nuke the manpages when we're left with junk
 	# (like when we bootstrap, no perl -> no manpages)
 	find . -name '*.1' -a -size 0 -delete
@@ -417,6 +420,11 @@ src_install() {
 		dodoc opcodes/ChangeLog*
 	fi
 
+	if use emacs ; then
+		elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
+		elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+	fi
+
 	# Remove shared info pages
 	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
 
@@ -428,6 +436,8 @@ pkg_postinst() {
 	# Make sure this ${CTARGET} has a binutils version selected
 	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
 	binutils-config ${CTARGET}-${PV}
+
+	use emacs && elisp-site-regen
 }
 
 pkg_postrm() {
@@ -451,6 +461,8 @@ pkg_postrm() {
 	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
 		binutils-config ${CTARGET}-${PV}
 	fi
+
+	use emacs && elisp-site-regen
 }
 
 # Note [slotting support]

diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild
index d19bdb17825d..c3d9de773f3a 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -3,12 +3,12 @@
 
 EAPI=7
 
-inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"
 LICENSE="GPL-3+"
-IUSE="cet default-gold doc gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc emacs +gold multitarget +nls pgo +plugins static-libs test vanilla"
 REQUIRED_USE="default-gold? ( gold )"
 
 # Variables that can be set here  (ignored for live ebuilds)
@@ -53,6 +53,7 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
 RDEPEND="
 	>=sys-devel/binutils-config-3
 	sys-libs/zlib
+	emacs? ( >=app-editors/emacs-23.1:* )
 "
 DEPEND="${RDEPEND}"
 BDEPEND="
@@ -315,6 +316,8 @@ src_compile() {
 		emake V=1 info
 	fi
 
+	use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
+
 	# we nuke the manpages when we're left with junk
 	# (like when we bootstrap, no perl -> no manpages)
 	find . -name '*.1' -a -size 0 -delete
@@ -416,6 +419,11 @@ src_install() {
 		dodoc opcodes/ChangeLog*
 	fi
 
+	if use emacs ; then
+		elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
+		elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+	fi
+
 	# Remove shared info pages
 	rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
 
@@ -427,6 +435,8 @@ pkg_postinst() {
 	# Make sure this ${CTARGET} has a binutils version selected
 	[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
 	binutils-config ${CTARGET}-${PV}
+
+	use emacs && elisp-site-regen
 }
 
 pkg_postrm() {
@@ -450,6 +460,8 @@ pkg_postrm() {
 	elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
 		binutils-config ${CTARGET}-${PV}
 	fi
+
+	use emacs && elisp-site-regen
 }
 
 # Note [slotting support]

diff --git a/sys-devel/binutils/files/50binutils-gentoo.el b/sys-devel/binutils/files/50binutils-gentoo.el
new file mode 100644
index 000000000000..7caa9f19a37b
--- /dev/null
+++ b/sys-devel/binutils/files/50binutils-gentoo.el
@@ -0,0 +1,3 @@
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'dwarf-browse "dwarf-mode"
+  "Invoke `objdump' and put output into a `dwarf-mode' buffer." t)


             reply	other threads:[~2022-08-10 15:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 15:02 Maciej Barć [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-23 16:02 [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/ Sam James
2023-02-22 22:26 Sam James
2021-02-26  8:04 Sergei Trofimovich
2020-07-25 11:32 Andreas K. Hüttel
2020-03-09 20:07 Sergei Trofimovich
2020-02-03  9:50 Sergei Trofimovich
2018-07-17 14:26 Andreas Hüttel
2018-07-17 14:20 Andreas Hüttel

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=1660143519.cc08c0c4268af7240a3d463cab35e2e2fca06091.xgqt@gentoo \
    --to=xgqt@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