From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1478526-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id D013E15800F
	for <garchives@archives.gentoo.org>; Thu, 19 Jan 2023 02:49:20 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id CE7A6E0940;
	Thu, 19 Jan 2023 02:49:19 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id AF1CFE0940
	for <gentoo-commits@lists.gentoo.org>; Thu, 19 Jan 2023 02:49:19 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 8CF90340C43
	for <gentoo-commits@lists.gentoo.org>; Thu, 19 Jan 2023 02:49:18 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id CDEBA523
	for <gentoo-commits@lists.gentoo.org>; Thu, 19 Jan 2023 02:49:16 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1674096515.8447b2c20881b1d6b1fe417f16c82e39e24c1ac5.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/pahole/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-util/pahole/Manifest dev-util/pahole/pahole-1.24_p20221024.ebuild dev-util/pahole/pahole-9999.ebuild
X-VCS-Directories: dev-util/pahole/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 8447b2c20881b1d6b1fe417f16c82e39e24c1ac5
X-VCS-Branch: master
Date: Thu, 19 Jan 2023 02:49:16 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: aa86135f-2cf5-4bfe-88c7-e6f7b649eb08
X-Archives-Hash: eb720a0f02dd2e2caf9a0e68bfdeb652

commit:     8447b2c20881b1d6b1fe417f16c82e39e24c1ac5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 19 02:48:35 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 19 02:48:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8447b2c2

dev-util/pahole: backport patches for binutils-2.40 compat

Kernel fails to compile otherwise.

Closes: https://bugs.gentoo.org/890963
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/pahole/Manifest                     |  1 +
 dev-util/pahole/pahole-1.24_p20221024.ebuild | 65 ++++++++++++++++++++++++++++
 dev-util/pahole/pahole-9999.ebuild           | 41 +++++++++++++-----
 3 files changed, 97 insertions(+), 10 deletions(-)

diff --git a/dev-util/pahole/Manifest b/dev-util/pahole/Manifest
index b232c9e09f43..28594cf7dc68 100644
--- a/dev-util/pahole/Manifest
+++ b/dev-util/pahole/Manifest
@@ -1,2 +1,3 @@
 DIST dwarves-1.23.tar.xz 815076 BLAKE2B 2d89ac2d8cacb70a322b1c946356c0b18a2276f7a549efc2cf530c087dd718c7d01f5bcf8b9208965e066770064b6d8db7a9f6ab9a3f3a4612f6fcc8d146c1e8 SHA512 5255930d6898ce35a41e3e553363964663d2b686d12732ff6140fa1d06fcc3806adf28e24ec35ab0712eec0562c52c3943afe9ecce468b0053b852ffeb04c3dc
 DIST dwarves-1.24.tar.xz 875744 BLAKE2B 6766b5a5ecbf64013227e7cd459af662fc213f230b5b1279354fcaaccebfa3d74f9a2254542dc4f3f1bb4a5def1d4c77e2445fa8b531fa8b9e331cdfc23155fe SHA512 3cdca183cf68ec46fd9a0301ae4a8a30b23a8139c65ffba64ae11f85f9e942f7341dca6f88a4a3b49f32bfd880927193a80fa011726e4a33d3e5a1a146326c06
+DIST pahole-1.24_p20221024-patches.tar.xz 22088 BLAKE2B b39458400411dd7da0f568257f42164952e170b952e4893a92d769e17ce4cf0de88b727808a38195438fe10e5537f245bf101f647f383b6df7642c5446fa5d45 SHA512 93f160f01023c5402535a34d59005f0a3e056662a2764722480d71b6e522f3bfef0d642084467d1fbea96e23386b4cbb708243713d59eb84f4f767c1ac5ab3f5

diff --git a/dev-util/pahole/pahole-1.24_p20221024.ebuild b/dev-util/pahole/pahole-1.24_p20221024.ebuild
new file mode 100644
index 000000000000..5d98a672167d
--- /dev/null
+++ b/dev-util/pahole/pahole-1.24_p20221024.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit cmake python-single-r1
+
+MY_PN=dwarves
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities"
+HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/"
+
+if [[ ${PV} == 9999 ]] ; then
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/devel/pahole/pahole.git"
+	inherit git-r3
+elif [[ ${PV} == *_p* ]] ; then
+	# Snapshots
+	#SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz"
+
+	# Patch rollups from git format-patch. Sometimes there are important
+	# fixes in git which haven't been released (and no release in sight).
+	# Patch rollups are a bit better for understanding where changes have
+	# come from for users.
+	SRC_URI="
+		http://fedorapeople.org/~acme/${MY_PN}/${MY_P%%_p*}.tar.xz
+		https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches.tar.xz
+	"
+	S="${WORKDIR}"/${MY_P%%_p*}
+else
+	SRC_URI="http://fedorapeople.org/~acme/${MY_PN}/${MY_P}.tar.xz"
+	S="${WORKDIR}"/${MY_P}
+fi
+
+LICENSE="GPL-2" # only
+SLOT="0"
+IUSE="debug"
+if [[ ${PV} != 9999 ]] ; then
+	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+fi
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+	>=dev-libs/elfutils-0.178
+	sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+DOCS=( README README.ctracer NEWS )
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.10-python-import.patch
+)
+
+src_prepare() {
+	[[ -d "${WORKDIR}"/${P}-patches ]] && PATCHES+=( "${WORKDIR}"/${P}-patches )
+
+	cmake_src_prepare
+	python_fix_shebang ostra/ostra-cg ostra/python/ostra.py
+}
+
+src_configure() {
+	local mycmakeargs=( "-D__LIB=$(get_libdir)" )
+	cmake_src_configure
+}

diff --git a/dev-util/pahole/pahole-9999.ebuild b/dev-util/pahole/pahole-9999.ebuild
index 2b542cf4434e..5d98a672167d 100644
--- a/dev-util/pahole/pahole-9999.ebuild
+++ b/dev-util/pahole/pahole-9999.ebuild
@@ -1,19 +1,44 @@
 # Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 PYTHON_COMPAT=( python3_{9..11} )
-inherit cmake python-single-r1 git-r3
+inherit cmake python-single-r1
+
+MY_PN=dwarves
+MY_P=${MY_PN}-${PV}
 
 DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities"
 HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/"
-EGIT_REPO_URI="git://git.kernel.org/pub/scm/devel/pahole/pahole.git"
+
+if [[ ${PV} == 9999 ]] ; then
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/devel/pahole/pahole.git"
+	inherit git-r3
+elif [[ ${PV} == *_p* ]] ; then
+	# Snapshots
+	#SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz"
+
+	# Patch rollups from git format-patch. Sometimes there are important
+	# fixes in git which haven't been released (and no release in sight).
+	# Patch rollups are a bit better for understanding where changes have
+	# come from for users.
+	SRC_URI="
+		http://fedorapeople.org/~acme/${MY_PN}/${MY_P%%_p*}.tar.xz
+		https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches.tar.xz
+	"
+	S="${WORKDIR}"/${MY_P%%_p*}
+else
+	SRC_URI="http://fedorapeople.org/~acme/${MY_PN}/${MY_P}.tar.xz"
+	S="${WORKDIR}"/${MY_P}
+fi
 
 LICENSE="GPL-2" # only
 SLOT="0"
-KEYWORDS=""
 IUSE="debug"
+if [[ ${PV} != 9999 ]] ; then
+	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+fi
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="${PYTHON_DEPS}
@@ -28,6 +53,8 @@ PATCHES=(
 )
 
 src_prepare() {
+	[[ -d "${WORKDIR}"/${P}-patches ]] && PATCHES+=( "${WORKDIR}"/${P}-patches )
+
 	cmake_src_prepare
 	python_fix_shebang ostra/ostra-cg ostra/python/ostra.py
 }
@@ -36,9 +63,3 @@ src_configure() {
 	local mycmakeargs=( "-D__LIB=$(get_libdir)" )
 	cmake_src_configure
 }
-
-src_test() { :; }
-
-src_install() {
-	cmake_src_install
-}