package/poke: new package
PATCH v2 1/3 package/poke: new package
Backport a patch to disable tcl/tk dependencies when gui support is disabled.
Backport and rebase a patch to avoid host poisoning while cross-compiling.
Add another local patch when HELP2MAN is missing.
Disable uClibc-ng toolchain for now due to issues with bundled gnulib.
The license of gnulib is not easy to describe because it bundle several sources files with different license [1][2]. Even if not SPDX compliant, use "gnulib license".
[1] https://git.savannah.gnu.org/cgit/gnulib.git/tree/COPYING
[2] https://src.fedoraproject.org/rpms/gnulib/blob/rawhide/f/gnulib.spec#_53
See:
http://www.jemarch.net/poke-1.0-relnotes.html
http://www.jemarch.net/poke-1.1-relnotes.html
http://www.jemarch.net/poke-1.2-relnotes.html
---
v2: fix jitter and gnulib licensing
fix glibc or musl toolchain dependencies comment in Kconfig add jitter/COPYING and its hash
Replace the patch 0002 for jitter by the upstream one but patch jitter-config.in instead of jitter-config.in.m4sh (Yann)
--- package/Config.in | 1 + ...ck-for-Tcl-Tk-if-disable-gui-is-spec.patch | 43 ++++++++++++ ...ge-cppflags-to-omit-I-prefix-on-cros.patch | 67 +++++++++++++++++++ ...P2MAN-replace-by-true-when-cross-com.patch | 34 ++++++++++ package/poke/Config.in | 29 ++++++++ package/poke/poke.hash | 4 ++ package/poke/poke.mk | 25 +++++++ 7 files changed, 203 insertions(+) create mode 100644 package/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch create mode 100644 package/poke/0002-tentatively-change-cppflags-to-omit-I-prefix-on-cros.patch create mode 100644 package/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch create mode 100644 package/poke/Config.in create mode 100644 package/poke/poke.hash create mode 100644 package/poke/poke.mk
package/Config.in +1 -0
@@ -126,6 +126,7 @@ menu "Debugging, profiling and benchmark" source "package/pcm-tools/Config.in" source "package/piglit/Config.in" source "package/ply/Config.in" + source "package/poke/Config.in" source "package/ptm2human/Config.in" source "package/pv/Config.in" source "package/racehound/Config.in"
package/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch new file +43 -0
43 lines not on this page · raw message
package/poke/0002-tentatively-change-cppflags-to-omit-I-prefix-on-cros.patch new file +67 -0
67 lines not on this page · raw message
package/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 8ba76a5a7ce311f67890199c5595bc1f626495ad Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Fri, 30 Apr 2021 15:43:59 +0200 +Subject: [PATCH] configure.ac: HELP2MAN replace ':' by 'true' when + cross-compiling + +Avoid: +/usr/bin/make ./../poke/poke +../run \ + : -p poke --name="The GNU extensible binary editor" \ + ./../poke/poke -o ./poke.1 +../run: line 51: exec: :: not found + +Signed-off-by: Romain Naour <[email protected]> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index c2f0760a..93769ef9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -74,7 +74,7 @@ gl_LIBTEXTSTYLE_OPTIONAL([0.20.5]) + if test $cross_compiling = no; then + AM_MISSING_PROG(HELP2MAN, help2man) + else +- HELP2MAN=: ++ HELP2MAN=true + fi + + dnl recfix is part of the GNU recutils suite, and is used in cfg.mk to +-- +2.30.2 +
package/poke/Config.in new file +29 -0
@@ -0,0 +1,29 @@ +config BR2_PACKAGE_POKE + bool "poke" + depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS # bdwgc + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # less + depends on BR2_USE_WCHAR # needs wctomb + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # gnulib + select BR2_PACKAGE_BDWGC + select BR2_PACKAGE_LESS # runtime + select BR2_PACKAGE_READLINE + help + GNU poke is a new interactive editor for binary data. Not + limited to editing basic entities such as bits and bytes, + it provides a full-fledged procedural, interactive + programming language designed to describe data structures + and to operate on them. Once a user has defined a structure + for binary data (usually matching some file format) she can + search, inspect, create, shuffle and modify abstract entities + such as ELF relocations, MP3 tags, DWARF expressions, + partition table entries, and so on, with primitives + resembling simple editing of bits and bytes. The program + comes with a library of already written descriptions (or + "pickles" in poke parlance) for many binary formats. + + https://www.gnu.org/software/poke/ + +comment "poke needs a glibc or musl toolchain w/ NPTL, wchar" + depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHAR
package/poke/poke.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 f61cf8da5b64c01a1359373725aad1ca257f35c1c9269e4d50dd0664183ddf62 poke-1.2.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 jitter/COPYING
package/poke/poke.mk new file +25 -0
@@ -0,0 +1,25 @@ +################################################################################ +# +# poke +# +################################################################################ + +POKE_VERSION = 1.2 +POKE_SITE = $(BR2_GNU_MIRROR)/poke +# gnulib license is a mix/mess of public-domain and various GPL and LGPL versions. +POKE_LICENSE = GPL-3.0+, GPL-3.0+ (jitter), gnulib license (gnulib) +POKE_LICENSE_FILES = COPYING jitter/COPYING + +# 0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch +# 0003-configure.ac-HELP2MAN-replace-by-false-when-cross-co.patch +POKE_AUTORECONF = YES + +POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline + +POKE_CONF_OPTS = \ + --disable-gui \ + --disable-libnbd \ + --disable-mi \ + --with-libreadline-prefix=$(STAGING_DIR) + +$(eval $(autotools-package))
Signature · 1 line
2.31.1
PATCH v2 2/3 package/poke: add optional json-c dependency
From [1]:
"The poke machine-interface uses a protocol to communicate with clients, which is based on JSON. poke uses the json-c library to parse and build JSON strings.
If this library is not found, poke will build without machine-interface support."
[1] https://git.savannah.nongnu.org/cgit/poke.git/tree/DEPENDENCIES?h=releases/poke-1.2#n55
--- package/poke/poke.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
package/poke/poke.mk +7 -1
@@ -19,7 +19,13 @@ POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline POKE_CONF_OPTS = \ --disable-gui \ --disable-libnbd \ - --disable-mi \ --with-libreadline-prefix=$(STAGING_DIR) +ifeq ($(BR2_PACKAGE_JSON_C),y) +POKE_DEPENDENCIES += json-c +POKE_CONF_OPTS += --enable-mi +else +POKE_CONF_OPTS += --disable-mi +endif + $(eval $(autotools-package))
Signature · 1 line
2.31.1
PATCH v2 3/3 package/poke: enable uClibc-ng support
In reply to Romain Naourpoke bundle gnulib that doesn't support the case where host_os='linux-uclibc'. When cross-compiling, the guessed answers are mostly wrong and gnulib will try to replace snprintf with rpl_snprintf. This lead to "undefined reference to `rpl_snprintf'" errors.
---
test-pkg config:
BR2_PACKAGE_POKE=y
BR2_PACKAGE_JSON_C=y
--- package/poke/Config.in | 4 +--- package/poke/poke.mk | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-)
package/poke/Config.in +1 -3
@@ -4,7 +4,6 @@ config BR2_PACKAGE_POKE depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # less depends on BR2_USE_WCHAR # needs wctomb depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL - depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # gnulib select BR2_PACKAGE_BDWGC select BR2_PACKAGE_LESS # runtime select BR2_PACKAGE_READLINE
@@ -24,6 +23,5 @@ config BR2_PACKAGE_POKE https://www.gnu.org/software/poke/ -comment "poke needs a glibc or musl toolchain w/ NPTL, wchar" - depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) +comment "poke needs a toolchain w/ NPTL, wchar" depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHAR
package/poke/poke.mk +25 -0
@@ -16,6 +16,31 @@ POKE_AUTORECONF = YES POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline +# poke bundle gnulib that doesn't support the case where +# host_os='linux-uclibc'. When cross-compiling, the guessed +# answers are mostly wrong and gnulib will try to replace +# snprintf with rpl_snprintf. This lead to "undefined reference +# to `rpl_snprintf'" errors. +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +POKE_CONF_ENV = gl_cv_func_printf_positions=yes \ + gl_cv_func_snprintf_retval_c99=yes \ + gl_cv_func_printf_sizes_c99=yes \ + gl_cv_func_printf_infinite_long_double=yes \ + gl_cv_func_snprintf_retval_c99=yes \ + gl_cv_func_snprintf_truncation_c99=yes \ + gl_cv_func_snprintf_usable=yes \ + gl_cv_func_strerror_0_works=yes \ + gl_cv_header_working_stdint_h=yes \ + gl_cv_func_printf_infinite=yes \ + gl_cv_func_printf_flag_zero=yes \ + gl_cv_func_printf_enomem=yes \ + gl_cv_func_printf_directive_f=yes \ + gl_cv_func_printf_directive_a=yes \ + gl_cv_func_snprintf_directive_n=yes \ + gl_cv_func_vsnprintf_posix=yes \ + gl_cv_func_vsnprintf_zerosize_c99=yes +endif + POKE_CONF_OPTS = \ --disable-gui \ --disable-libnbd \
Signature · 1 line
2.31.1
Yann E. MORIN
AppliedPATCH v2 3/3 package/poke: enable uClibc-ng support
Romain, All,
On 2021-05-17 17:56 +0200, Romain Naour spake thusly:
Quoted 5 lines
poke bundle gnulib that doesn't support the case where host_os='linux-uclibc'. When cross-compiling, the guessed answers are mostly wrong and gnulib will try to replace snprintf with
rpl_snprintf. This lead to "undefined reference to `rpl_snprintf'" errors.
That's just sick... :-(
Quoted 1 line
Signed-off-by Romain Naour <[email protected]>
Applied to next, thanks.
Regards,
Yann E. MORIN.
Quoted 72 lines
---
test-pkg config:
BR2_PACKAGE_POKE=y
BR2_PACKAGE_JSON_C=y--- package/poke/Config.in | 4 +--- package/poke/poke.mk | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-)package/poke/Config.in +1
-3@@ -4,7 +4,6 @@ config BR2_PACKAGE_POKE depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # less depends on BR2_USE_WCHAR # needs wctomb depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL - depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # gnulib select BR2_PACKAGE_BDWGC select BR2_PACKAGE_LESS # runtime select BR2_PACKAGE_READLINE@@ -24,6 +23,5 @@ config BR2_PACKAGE_POKE https://www.gnu.org/software/poke/ -comment "poke needs a glibc or musl toolchain w/ NPTL, wchar" - depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) +comment "poke needs a toolchain w/ NPTL, wchar" depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHARpackage/poke/poke.mk +25
-0@@ -16,6 +16,31 @@ POKE_AUTORECONF = YES POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline +# poke bundle gnulib that doesn't support the case where +# host_os='linux-uclibc'. When cross-compiling, the guessed +# answers are mostly wrong and gnulib will try to replace +# snprintf with rpl_snprintf. This lead to "undefined reference +# to `rpl_snprintf'" errors. +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +POKE_CONF_ENV = gl_cv_func_printf_positions=yes \ + gl_cv_func_snprintf_retval_c99=yes \ + gl_cv_func_printf_sizes_c99=yes \ + gl_cv_func_printf_infinite_long_double=yes \ + gl_cv_func_snprintf_retval_c99=yes \ + gl_cv_func_snprintf_truncation_c99=yes \ + gl_cv_func_snprintf_usable=yes \ + gl_cv_func_strerror_0_works=yes \ + gl_cv_header_working_stdint_h=yes \ + gl_cv_func_printf_infinite=yes \ + gl_cv_func_printf_flag_zero=yes \ + gl_cv_func_printf_enomem=yes \ + gl_cv_func_printf_directive_f=yes \ + gl_cv_func_printf_directive_a=yes \ + gl_cv_func_snprintf_directive_n=yes \ + gl_cv_func_vsnprintf_posix=yes \ + gl_cv_func_vsnprintf_zerosize_c99=yes +endif + POKE_CONF_OPTS = \ --disable-gui \ --disable-libnbd \Signature · 6 lines
2.31.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Yann E. MORIN
AppliedPATCH v2 1/3 package/poke: new package
In reply to Romain NaourRomain, All,
On 2021-05-17 17:56 +0200, Romain Naour spake thusly:
Quoted 23 lines
Backport a patch to disable tcl/tk dependencies when gui support is disabled.
Backport and rebase a patch to avoid host poisoning while cross-compiling.
Add another local patch when HELP2MAN is missing.
Disable uClibc-ng toolchain for now due to issues with bundled gnulib.
The license of gnulib is not easy to describe because it bundle several sources files with different license [1][2]. Even if not SPDX compliant, use "gnulib license".
[1] https://git.savannah.gnu.org/cgit/gnulib.git/tree/COPYING
[2] https://src.fedoraproject.org/rpms/gnulib/blob/rawhide/f/gnulib.spec#_53See:
http://www.jemarch.net/poke-1.0-relnotes.html
http://www.jemarch.net/poke-1.1-relnotes.html
http://www.jemarch.net/poke-1.2-relnotes.html
Quoted 5 lines
Signed-off-by Romain Naour <[email protected]>Cc Jose E. Marchesi <[email protected]>Cc Luca Saiu <[email protected]>Cc Yann E. MORIN <[email protected]>---
[--SNIP--]
package/poke/Config.in line 3
Quoted 9 lines
package/poke/Config.in new file +3
-0@@ -0,0 +1,29 @@ +config BR2_PACKAGE_POKE + bool "poke" + depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS # bdwgc
You forgot to propagate that dependency to the comment...
package/poke/Config.in line 4
Quoted 1 line
package/poke/Config.in new file +1
-0+ depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # less
I've switched to selecting that, otherwise you'd have to also propagate it to the ocmment somehow.
Quoted 15 lines
package/poke/Config.in new file +15
-0+ depends on BR2_USE_WCHAR # needs wctomb + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # gnulib + select BR2_PACKAGE_BDWGC + select BR2_PACKAGE_LESS # runtime + select BR2_PACKAGE_READLINE + help + GNU poke is a new interactive editor for binary data. Not + limited to editing basic entities such as bits and bytes, + it provides a full-fledged procedural, interactive + programming language designed to describe data structures + and to operate on them. Once a user has defined a structure + for binary data (usually matching some file format) she can + search, inspect, create, shuffle and modify abstract entities + such as ELF relocations, MP3 tags, DWARF expressions,
package/poke/Config.in line 29
Quoted 10 lines
package/poke/Config.in new file +10
-0+ partition table entries, and so on, with primitives + resembling simple editing of bits and bytes. The program + comes with a library of already written descriptions (or + "pickles" in poke parlance) for many binary formats. + + https://www.gnu.org/software/poke/ + +comment "poke needs a glibc or musl toolchain w/ NPTL, wchar" + depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHAR
I think this was not correct. Indeed, if you have a glibc or a musl toolchain, the first dependency is not met, so the comment is hidden. However, if you do not have wchar, you still want to see the comment.
I've fixed that, with the LIBATOMIC_OPS_ARCH_SUPPORTS.
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 48 lines
package/poke/poke.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 f61cf8da5b64c01a1359373725aad1ca257f35c1c9269e4d50dd0664183ddf62 poke-1.2.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 jitter/COPYINGpackage/poke/poke.mk new file +25
-0@@ -0,0 +1,25 @@ +################################################################################ +# +# poke +# +################################################################################ + +POKE_VERSION = 1.2 +POKE_SITE = $(BR2_GNU_MIRROR)/poke +# gnulib license is a mix/mess of public-domain and various GPL and LGPL versions. +POKE_LICENSE = GPL-3.0+, GPL-3.0+ (jitter), gnulib license (gnulib) +POKE_LICENSE_FILES = COPYING jitter/COPYING + +# 0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch +# 0003-configure.ac-HELP2MAN-replace-by-false-when-cross-co.patch +POKE_AUTORECONF = YES + +POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline + +POKE_CONF_OPTS = \ + --disable-gui \ + --disable-libnbd \ + --disable-mi \ + --with-libreadline-prefix=$(STAGING_DIR) + +$(eval $(autotools-package))Signature · 6 lines
2.31.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'