From patchwork Mon May 17 15:56:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1479614 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=bZmSDsun; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 ozlabs.org (Postfix) with ESMTPS id 4FkP041KL7z9sxS for ; Tue, 18 May 2021 01:57:07 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 6A885401AD; Mon, 17 May 2021 15:57:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iG48V2h5it96; Mon, 17 May 2021 15:57:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 62FD04038A; Mon, 17 May 2021 15:57:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 934101BF964 for ; Mon, 17 May 2021 15:56:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8F9D760A70 for ; Mon, 17 May 2021 15:56:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gHyrBxvAAJAr for ; Mon, 17 May 2021 15:56:36 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by smtp3.osuosl.org (Postfix) with ESMTPS id EAE4360A36 for ; Mon, 17 May 2021 15:56:35 +0000 (UTC) Received: by mail-wr1-x431.google.com with SMTP id h4so6930747wrt.12 for ; Mon, 17 May 2021 08:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O6oONh7mG1CJf045EPFT8sGUZE0DqK42efuu2RqDX7E=; b=bZmSDsunfP2upfpXAF/GAX7Jw2fl7NerVQO1birklgXroUj5Lj6Va33UPYHno5YxRz uZw+axBvomYhMnu/8RxAm3th6rTOzkOdCtRPY3gzfvjxG1kZnqhGvCOq0KxNEN/l/dKh 7M2q8Om1FY/qqjbcJtmyqi2cgyHGGtVAG+esQMI+V2mzYyBfXq3faLUd4INoXMd7aEFO +h6XKGNWZxMTLYIBTj91ufpT1NqjZkjT7YzHK234GvdYienQD8wzKcU7X5estsQR2kXn 0Bwy3stiYhhl5LU8X9q+tMICRPE+YBCAhNOhQ2+jPC1m6VUO7LG8G3WRq5OpzZckKXKg UG3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O6oONh7mG1CJf045EPFT8sGUZE0DqK42efuu2RqDX7E=; b=mNkucnHnQFpu12cszrd4nIrrv6ohPYhmHseOXydIiC+AgVXfIOZZJ8+G6W6Q96Z4xe 8dW0mmNfz/Wtn241Ab0zJLcrhhCvZJLuiKLwbOL5++53sJylk22yaJfYza/BjH9oRVpK /Z0zUQFcYptJxFsDxoEd4m2mtIAzPbNuR3tePTR0pk4XWKEycQLFThdASubQtAmGYlFC P2OIsobyReMKXN2tCbQJqfUMCiOZiYcE9ZW82v1HYirq0HHznDXv10Qjs1uSSCiAZs+G XDG1Wt163qFzW/H0vTZMEniQthCUHGYLJuS0rbQMvHNJ4jpquSJ3CKtqiyXJnixUKfVu sw3w== X-Gm-Message-State: AOAM531hbKRboDQXy0inlThNAa7S7CZpT8aMfCEjRzHIFDkuuOjSsDBO zEjTWxZdPh+XzL2P92CslQ2vlNs+mXQ= X-Google-Smtp-Source: ABdhPJwM0oARgsM3UZg8RX3K0PVXjOWyvayrMD+lob6mga4TWAlvBWAuUk/1hVn/sLEC9ed2R5LdqA== X-Received: by 2002:a05:6000:1147:: with SMTP id d7mr441181wrx.302.1621266994101; Mon, 17 May 2021 08:56:34 -0700 (PDT) Received: from localhost.localdomain (2a01cb058f8a180022164e4eb697b4ce.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:2216:4e4e:b697:b4ce]) by smtp.gmail.com with ESMTPSA id i1sm6716565wrp.51.2021.05.17.08.56.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 08:56:33 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Mon, 17 May 2021 17:56:26 +0200 Message-Id: <20210517155628.267749-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCHv2 1/3] package/poke: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Luca Saiu , "Yann E . MORIN" , "Jose E . Marchesi" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 Signed-off-by: Romain Naour Cc: Jose E. Marchesi Cc: Luca Saiu Cc: Yann E. MORIN --- 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 diff --git a/package/Config.in b/package/Config.in index 82b28d2835..1fa9500e3b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -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" diff --git a/package/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch b/package/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch new file mode 100644 index 0000000000..3bd041a0e7 --- /dev/null +++ b/package/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch @@ -0,0 +1,43 @@ +From cef3fc90f02ef4fc49515745194bac3d81a2265b Mon Sep 17 00:00:00 2001 +From: "Jose E. Marchesi" +Date: Fri, 30 Apr 2021 13:17:05 +0200 +Subject: [PATCH] build: do not check for Tcl/Tk if --disable-gui is specified + +2021-04-30 Jose E. Marchesi + + * configure.ac: Do not check for tcl/tk if --disable-gui is + specified at configure time. + +(cherry picked from commit 280a5e154287e43c0a40d9530a9cc658a7367a9c) +[Romain: remove Changelog entry] +Signed-off-by: Romain Naour +--- + configure.ac | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c7205513..c2f0760a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -214,12 +214,15 @@ fi + dnl The GUI is optional, and depends on the availability of Tcl and + dnl Tk. + +-POKE_TCLTK +- + AC_ARG_ENABLE([gui], + AS_HELP_STRING([--enable-gui], + [Enable the GUI (default is YES)]), +- [gui_enabled=$enableval], [gui_enabled=$has_tcltk]) ++ [gui_enabled=$enableval], [gui_enabled=yes]) ++ ++if test "x$gui_enabled" = "xyes"; then ++ POKE_TCLTK ++ gui_enabled=$has_tcltk ++fi + + AM_CONDITIONAL([GUI], [test "x$gui_enabled" = "xyes"]) + +-- +2.30.2 + diff --git a/package/poke/0002-tentatively-change-cppflags-to-omit-I-prefix-on-cros.patch b/package/poke/0002-tentatively-change-cppflags-to-omit-I-prefix-on-cros.patch new file mode 100644 index 0000000000..8fae85eb20 --- /dev/null +++ b/package/poke/0002-tentatively-change-cppflags-to-omit-I-prefix-on-cros.patch @@ -0,0 +1,67 @@ +From ac9d057895f1e61f63cbecafcc3e3820fdb10f84 Mon Sep 17 00:00:00 2001 +From: Luca Saiu +Date: Fri, 30 Apr 2021 22:42:57 +0200 +Subject: [PATCH] tentatively change --cppflags to omit -I prefix on + cross-compilation + +The autoconf macros defined from jitter --cppflags get automatically changed, of +course. + +* configure.ac (JITTER_CROSS_COMPILING): New substitution. + +* bin/jitter-config.in.m4sh (main loop) <--cppflags>: Introduce conditional on +the new substitution. + +Suggested by Romain Naour, after his difficulties with building GNU poke with +buildroot. + +(cherry picked from commit 428406c7b8d4c20f3472d41ed57c12c1a88ad37e) +[Romain: + patch jitter-config.in instead of jitter-config.in.m4sh since + there is an issue while converting the M4sh m4sh script ( .in.m4sh ) + into a portable shell script ( .in ) ready to be processed by aclocal + for @-substitutions.] + +Signed-off-by: Romain Naour +--- + jitter/bin/jitter-config.in | 10 +++++++--- + jitter/configure.ac | 1 + + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/jitter/bin/jitter-config.in b/jitter/bin/jitter-config.in +index 5e124f0..4bc508d 100644 +--- a/jitter/bin/jitter-config.in ++++ b/jitter/bin/jitter-config.in +@@ -999,10 +999,14 @@ while test "$#" != "0"; do + --cppflags) + no_option_argument + append_to_output cppflags +- # Append a -I argument. This is defined separately from the rest, +- # as the installation prefix can be decided very late, at Jitter ++ # Unless cross-compiling, append a -I argument referring the ++ # installation path. This is defined separately from the rest, as ++ # the installation prefix can be decided very late, at Jitter + # installation time. +- output="$output -I $includedir";; ++ # (When cross-compiling this would be difficult to do correctly.) ++ if test "x@JITTER_CROSS_COMPILING@" != 'xyes'; then ++ output="$output -I $includedir" ++ fi;; + --ldadd) + no_option_argument + append_to_output ldadd;; +diff --git a/jitter/configure.ac b/jitter/configure.ac +index 21d6937..fb12349 100644 +--- a/jitter/configure.ac ++++ b/jitter/configure.ac +@@ -308,6 +308,7 @@ else + AC_MSG_RESULT([yes, cross-compiling from $build to $host .]) + jitter_cross_compiling=yes + fi ++AC_SUBST([JITTER_CROSS_COMPILING], [$jitter_cross_compiling]) + + # I never test on weird systems not supporting shebangs. + AC_SYS_INTERPRETER +-- +2.31.1 + diff --git a/package/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch b/package/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch new file mode 100644 index 0000000000..f217c917f1 --- /dev/null +++ b/package/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch @@ -0,0 +1,34 @@ +From 8ba76a5a7ce311f67890199c5595bc1f626495ad Mon Sep 17 00:00:00 2001 +From: Romain Naour +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 +--- + 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 + diff --git a/package/poke/Config.in b/package/poke/Config.in new file mode 100644 index 0000000000..d3334dfdd4 --- /dev/null +++ b/package/poke/Config.in @@ -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 diff --git a/package/poke/poke.hash b/package/poke/poke.hash new file mode 100644 index 0000000000..b3a79d90dc --- /dev/null +++ b/package/poke/poke.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 f61cf8da5b64c01a1359373725aad1ca257f35c1c9269e4d50dd0664183ddf62 poke-1.2.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 jitter/COPYING diff --git a/package/poke/poke.mk b/package/poke/poke.mk new file mode 100644 index 0000000000..c0217b6fad --- /dev/null +++ b/package/poke/poke.mk @@ -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)) From patchwork Mon May 17 15:56:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1479612 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=O93dDdm1; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 ozlabs.org (Postfix) with ESMTPS id 4FkNzc1GH4z9sRf for ; Tue, 18 May 2021 01:56:42 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1D5F94038A; Mon, 17 May 2021 15:56:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s4jQFqgmg7i2; Mon, 17 May 2021 15:56:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 60305401AD; Mon, 17 May 2021 15:56:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id A30411BF964 for ; Mon, 17 May 2021 15:56:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 92D41401AD for ; Mon, 17 May 2021 15:56:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SVYjcOTInXgj for ; Mon, 17 May 2021 15:56:36 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by smtp2.osuosl.org (Postfix) with ESMTPS id A03E640002 for ; Mon, 17 May 2021 15:56:36 +0000 (UTC) Received: by mail-wr1-x436.google.com with SMTP id y14so4872746wrm.13 for ; Mon, 17 May 2021 08:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xop5AclyBUY7GO4Rubl1/CWjCgw/cNrAXO37Umt/NCM=; b=O93dDdm1bvruEgsXH/CkRDB6/7NzezTUMNg+l0n8TeecRyrL701irb0lhhbDfnl8uf g4zi8y9sBckerA20HPwoL99dhH/O4U0qfsi/ztSV/cgKiTt7P2aGqJkCOwoUIYBACQJA rZdtgIhcPLqf8NPwbwlzwM6vuFEAqy/hPu/MVpW3+b5wi7f3MOIQpNwVZ19B512l8zFF ILMAqXVb0SntKRzMzkmdeBKZUwwX86nNav29DjbouHVGVNqwqlB/xhmqYy2fWXJRFy1H I3ud6Q6LmEQLSuUDJgkYZZf6jXTqgx3gnzHl6cx5C8sryU7ot4XrHi02fIsKSIJ7JDp3 UJvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Xop5AclyBUY7GO4Rubl1/CWjCgw/cNrAXO37Umt/NCM=; b=aBOyfOTly2shKUCllOAejQNW4OvGfZ1AchepzXkMVewbf09Bwve5zw1K4dQVfWgZ5h KbRR0GBeXO2ZBCGO8fpW2yFAzgHsW6867D1seUz90iENR1Vi6DoM82HawDomAGBL+ERt wjIg0g2VWxs/tKoEt8uTctC63X7VQA8jU4oKzjyAmLjGV4Uze6RpDu1XlSxwMltCUrLo j1QIT0jqQtm+7K8LPrahD5L9/51mgHDU7NIlBJBakxLq9YoPsQWYEV86DZuRtHht4TuB A3bkG9NJDqQTFKlUSeMZgltjvA17nQNm1UNj4J5nHn5hN/5sSIMd+PCtm3mKi7GfO69f PREg== X-Gm-Message-State: AOAM5305KDjpHucTnP3FmilKezICVxNCOsg0FbdJ26RzWmKO+DXDzMvk cXYXJdhk/KRPZHWwzCCLzFeqkFkE4iU= X-Google-Smtp-Source: ABdhPJyyzKFnJJjAdlihsMx9njX7cYEr/yI3wUeds5pUy0GSk9cA0ZU5fAoOhmefRJUwPNUh+KqTNA== X-Received: by 2002:adf:ebc4:: with SMTP id v4mr394836wrn.217.1621266994850; Mon, 17 May 2021 08:56:34 -0700 (PDT) Received: from localhost.localdomain (2a01cb058f8a180022164e4eb697b4ce.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:2216:4e4e:b697:b4ce]) by smtp.gmail.com with ESMTPSA id i1sm6716565wrp.51.2021.05.17.08.56.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 08:56:34 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Mon, 17 May 2021 17:56:27 +0200 Message-Id: <20210517155628.267749-2-romain.naour@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517155628.267749-1-romain.naour@gmail.com> References: <20210517155628.267749-1-romain.naour@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCHv2 2/3] package/poke: add optional json-c dependency X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Luca Saiu , "Jose E . Marchesi" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 Signed-off-by: Romain Naour Cc: Jose E. Marchesi Cc: Luca Saiu Signed-off-by: Romain Naour --- package/poke/poke.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/package/poke/poke.mk b/package/poke/poke.mk index c0217b6fad..7c3c81d93c 100644 --- a/package/poke/poke.mk +++ b/package/poke/poke.mk @@ -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)) From patchwork Mon May 17 15:56:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1479613 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=f/gnUtcB; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 ozlabs.org (Postfix) with ESMTPS id 4FkNzp4PRvz9sWQ for ; Tue, 18 May 2021 01:56:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8F77783B46; Mon, 17 May 2021 15:56:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AlTeqmPLDJdx; Mon, 17 May 2021 15:56:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id DAA6683A83; Mon, 17 May 2021 15:56:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 56F091BF964 for ; Mon, 17 May 2021 15:56:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 535BF60A70 for ; Mon, 17 May 2021 15:56:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E2CLUKsHC2WB for ; Mon, 17 May 2021 15:56:37 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5B14360A62 for ; Mon, 17 May 2021 15:56:37 +0000 (UTC) Received: by mail-wr1-x42e.google.com with SMTP id z17so6950708wrq.7 for ; Mon, 17 May 2021 08:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KRIHLgTqerZY66qyaZ+TpWmliH+I15hdcv1TMOEIVB0=; b=f/gnUtcB/GltwxZ8xYFqW2JglfPp/JLMCS1eVZt6fUgfgRKbGj3QldIGal86oRkFOu 7bsUhQ+PEv/Nlz7VLmmITZcbU7arZaRaEawRczI//jA9M2D/oSzBNcYWU8zAAhRtfmUZ EUeA6sblzZReWEHntloj19P7TOzNbQzi/vjdKDIsypsC6dodufmlb43l9pnSpy+RKGhc mJksZb/T0YVBrZEvTNwWDCXz+yjMkePbue614bWOwnx3URFJlowvZIpKUO3Pw8qh8qSq 3YXOoSMRVTdUMwW76YW7XRDYPTU66RFhMIx6ycSJ0etVY3yNVPBEukQTBWxxK3mX3OHj jL6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KRIHLgTqerZY66qyaZ+TpWmliH+I15hdcv1TMOEIVB0=; b=j6tBONeI3+oLenIgef/ChEDDKdiM6DfbYwrHehWsJVtkQocxhzXNydPyoTJfCx7IJH tCTLqJQBzEpkoMlgOS9ocXIzQRfHLl1zEW4uXy/h2wg/4zeKZa6uhII9wJRaaH7YMvbV 0Z+eSlaXs3M7ipsX2F9teTBOGeD0TYD80sHBflS+GQ3XZJwOUP9IbA5sMjJNNk4p5bfY glyT7Qt1peHPDcpAZZY7o/UgkT7UgGAH6CfyN5TMfQUKQpfM/EF7RoU6W5kWYu1pV3Ns RfuCp1ln7Vza4bU3y86zE8H61bGS4VIgMctbzPCdxBT2wk1QmQZWhtCgPm4tUt9lEBxt wYcA== X-Gm-Message-State: AOAM533fr8OiJ+xVaG9DihGyLNMLvVJCFpMwD5kOqba2mIECer+8emit wsmMfBDSQ5lR4Q7NCLwe/BBAGGd0dP0= X-Google-Smtp-Source: ABdhPJxE1d9hcJpXTDNOOrkMSjVPpv3QORKBKbLwG5iuLUQxCi+W/xwJFvC2oRBBGocmPAss3km4iQ== X-Received: by 2002:a05:6000:551:: with SMTP id b17mr456378wrf.32.1621266995659; Mon, 17 May 2021 08:56:35 -0700 (PDT) Received: from localhost.localdomain (2a01cb058f8a180022164e4eb697b4ce.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:2216:4e4e:b697:b4ce]) by smtp.gmail.com with ESMTPSA id i1sm6716565wrp.51.2021.05.17.08.56.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 08:56:35 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Mon, 17 May 2021 17:56:28 +0200 Message-Id: <20210517155628.267749-3-romain.naour@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517155628.267749-1-romain.naour@gmail.com> References: <20210517155628.267749-1-romain.naour@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCHv2 3/3] package/poke: enable uClibc-ng support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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. Signed-off-by: Romain Naour --- 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(-) diff --git a/package/poke/Config.in b/package/poke/Config.in index d3334dfdd4..762ed0221d 100644 --- a/package/poke/Config.in +++ b/package/poke/Config.in @@ -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 diff --git a/package/poke/poke.mk b/package/poke/poke.mk index 7c3c81d93c..406acf15e0 100644 --- a/package/poke/poke.mk +++ b/package/poke/poke.mk @@ -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 \