commit:     55afdc839e49759737e63127e213fa2b21d7d92d
Author:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  1 11:01:54 2024 +0000
Commit:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
CommitDate: Thu Jul  4 19:53:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55afdc83

dev-util/poke: fix implicit fn decl in configure

Closes: https://bugs.gentoo.org/935126
Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>

 .../files/poke-4.1-missing-configure-include.patch |  20 +++
 dev-util/poke/poke-4.1-r1.ebuild                   | 149 +++++++++++++++++++++
 2 files changed, 169 insertions(+)

diff --git a/dev-util/poke/files/poke-4.1-missing-configure-include.patch 
b/dev-util/poke/files/poke-4.1-missing-configure-include.patch
new file mode 100644
index 000000000000..0131d7613358
--- /dev/null
+++ b/dev-util/poke/files/poke-4.1-missing-configure-include.patch
@@ -0,0 +1,20 @@
+See https://bugs.gentoo.org/935126
+
+--- a/m4/printf.m4
++++ b/m4/printf.m4
+@@ -894,6 +894,7 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #ifdef _MSC_VER
+ #include <inttypes.h>
+ /* See page about "Parameter Validation" on msdn.microsoft.com.
+@@ -1708,6 +1709,7 @@ AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N],
+ #include <signal.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <unistd.h>
+ #if HAVE_SNPRINTF
+ # define my_snprintf snprintf
+ #else

diff --git a/dev-util/poke/poke-4.1-r1.ebuild b/dev-util/poke/poke-4.1-r1.ebuild
new file mode 100644
index 000000000000..97d66346c37a
--- /dev/null
+++ b/dev-util/poke/poke-4.1-r1.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo 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"
+
+PATCHES=(
+       "${FILESDIR}/${P}-missing-configure-include.patch"
+)
+
+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)
+       )
+
+       # The patch we apply bumps mtimes on some files.  Fix them up after.
+       edo touch aclocal.m4
+       edo touch configure
+       edo touch poke/config.h.in
+       edo touch Makefile.in
+       edo touch Makefile
+
+       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
+}

Reply via email to