From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1616599-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 AFA3A158041
	for <garchives@archives.gentoo.org>; Tue,  2 Apr 2024 11:56:02 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 9E970E2A09;
	Tue,  2 Apr 2024 11:56:01 +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))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 7F791E2A09
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Apr 2024 11:56:01 +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 91230343210
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Apr 2024 11:56:00 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 1F81EB2A
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Apr 2024 11:55:59 +0000 (UTC)
From: "Arsen Arsenović" <arsen@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, "Arsen Arsenović" <arsen@gentoo.org>
Message-ID: <1712058887.b1ede1fc38b9dcadd5723d4772f500de8750baf2.arsen@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/poke/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-util/poke/Manifest dev-util/poke/poke-4.0.ebuild
X-VCS-Directories: dev-util/poke/
X-VCS-Committer: arsen
X-VCS-Committer-Name: Arsen Arsenović
X-VCS-Revision: b1ede1fc38b9dcadd5723d4772f500de8750baf2
X-VCS-Branch: master
Date: Tue,  2 Apr 2024 11:55:59 +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: 86de9a41-725e-480f-b252-eae02ba72b14
X-Archives-Hash: 79f0e5498ecce5ca9f8dd660093508b1

commit:     b1ede1fc38b9dcadd5723d4772f500de8750baf2
Author:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 31 14:06:46 2024 +0000
Commit:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
CommitDate: Tue Apr  2 11:54:47 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1ede1fc

dev-util/poke: add 4.0

Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>

 dev-util/poke/Manifest        |   1 +
 dev-util/poke/poke-4.0.ebuild | 138 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 139 insertions(+)

diff --git a/dev-util/poke/Manifest b/dev-util/poke/Manifest
index 8d88c4104d5c..e2816c323aec 100644
--- a/dev-util/poke/Manifest
+++ b/dev-util/poke/Manifest
@@ -7,3 +7,4 @@ DIST poke-3.3.tar.gz 7553544 BLAKE2B 1e98f77937f9c45daa80591be603a74857b1bbd230c
 DIST poke-3.90.0.tar.gz 7971780 BLAKE2B ef4a5e0a25f1851e4f44314cc9e3b62c6eeb7458d5c4b3da1d7ea798c7b58b57c4ba113e3dac221e757b0d52d8b609c9cd1910a82f36d9aafe0393a1a1fa6a02 SHA512 34b2baee4317582d4ca68001b9f1bd540277c6ef133ebec49de6d45db0d564815da376b4f9761369e80976570c4bbd05272b215e78391b0a818390e613e21b1a
 DIST poke-3.90.1.tar.gz 7953029 BLAKE2B f098fe68316d172e700a896fdc588c6ae5d352eca21b5230940902e51adca8b57d19093d406b6fd66391e79025d79604cf3db63ef3f7783b65cd39788a727c76 SHA512 0d4d4b63ed5448427a72ecee182065bc6fb86eb460f9a05daef2d40d5678a5352a568d0f403cce17e6711c7a82875c91d0e00890162ac85636edbf6e277d1f3e
 DIST poke-3.90.2.tar.gz 7972908 BLAKE2B ca1b616300d6c14b4aa95ad19df4e5e78c993a3e5172112fbd25d50b406a4832f6392d597eb7e970ea5cfafd0936ca395cd42dd38d9d65070411e11bae0d07aa SHA512 d754921dce62730da6e75b8184352aeb8df6aaaafe3698ccf0063758f3d9ed3faa48de4e0ba8720060141a6581fb1595ac755f394bd8e951f6e608fd268b7572
+DIST poke-4.0.tar.gz 8224479 BLAKE2B d7778274e2fcf3657e800ebc8b2a11e7c0e9d81b5a41ab366d7dbf8772afa8ec0f7c07c70eae1c297acc1b5ac9fb584fb6bdb1c6eedd94c62ae9123aefe08df2 SHA512 3b6a15bf5542b34a794efd31bd575b5024c14f71474581b845097f38b43cef178ee2078f680ab9ec329b4336d1b99cc5832818bd4e7a6372fec6f95e9a11534a

diff --git a/dev-util/poke/poke-4.0.ebuild b/dev-util/poke/poke-4.0.ebuild
new file mode 100644
index 000000000000..4f6fda3e59da
--- /dev/null
+++ b/dev-util/poke/poke-4.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp-common flag-o-matic toolchain-funcs
+
+DESCRIPTION="Extensible editor for structured binary data"
+HOMEPAGE="https://www.jemarch.net/poke"
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://git.savannah.gnu.org/git/poke.git"
+	REGEN_BDEPEND="
+		>=dev-build/autoconf-2.62
+		>=dev-build/automake-1.16
+		sys-apps/gawk
+		sys-apps/help2man
+		sys-apps/texinfo
+		app-alternatives/yacc
+		app-alternatives/lex
+	"
+elif [[ $(ver_cut 2) -ge 90 || $(ver_cut 3) -ge 90 ]]; then
+	SRC_URI="https://alpha.gnu.org/gnu/poke/${P}.tar.gz"
+	REGEN_BDEPEND=""
+else
+	SRC_URI="mirror://gnu/poke/${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+	REGEN_BDEPEND=""
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="emacs pvm-profiling nbd nls test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	dev-libs/boehm-gc:=
+	dev-libs/libatomic_ops
+	sys-devel/gettext
+	sys-libs/readline:=
+	emacs? ( >=app-editors/emacs-23.1:* )
+	nbd? ( sys-libs/libnbd )
+"
+DEPEND="
+	${RDEPEND}
+	test? ( nbd? ( sys-libs/libnbd[uri-support(+)] ) )
+"
+BDEPEND="
+	${REGEN_BDEPEND}
+	virtual/pkgconfig
+	pvm-profiling? ( sys-devel/gcc )
+	emacs? ( >=app-editors/emacs-23.1:* )
+	test? (
+		dev-util/dejagnu
+		nbd? ( sys-block/nbdkit )
+	)
+"
+
+SITEFILE="50${PN}-gentoo.el"
+
+pkg_pretend() {
+	if use pvm-profiling && ! tc-is-gcc; then
+		die "USE=pvm-profiling requires GCC"
+	fi
+}
+
+pkg_setup() {
+	use emacs && elisp-check-emacs-version
+}
+
+src_prepare() {
+	default
+
+	if [[ ${PV} == 9999 ]]; then
+		./bootstrap || die
+	fi
+}
+
+src_configure() {
+	# See bug 858461.
+	# Upstream support might happen one day.  For context, only one file needs
+	# LTO to be disabled (since it's an autogenerated bytecode interpreter),
+	# others do not.  The build system will handle this at some point in the
+	# future.  Until then, just filter out LTO.
+	filter-lto
+
+	local myconf=(
+		--with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
+		--enable-hserver
+		$(use_enable nbd libnbd)
+		$(use_enable pvm-profiling)
+		$(use_enable nls)
+	)
+
+	econf "${myconf[@]}"
+}
+
+src_compile() {
+	default
+
+	if use emacs; then
+		cd etc || die
+		elisp-compile *.el
+	fi
+}
+
+src_install() {
+	default
+
+	if use emacs; then
+		elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+		cd etc || die
+		elisp-install "${PN}" *.el *.elc
+	fi
+	find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_preinst() {
+	UPGRADING_POKE=false
+	if has_version '<dev-util/poke-4'; then
+		UPGRADING_POKE=true
+	fi
+}
+
+pkg_postinst() {
+	use emacs && elisp-site-regen
+
+	if "${UPGRADING_POKE}"; then
+		ewarn "GNU poke 4.0 moves the ELF pickle to a separate package."
+		ewarn "To install elf.pk, please install dev-util/poke-elf."
+	fi
+}
+
+pkg_postrm() {
+	use emacs && elisp-site-regen
+}