From patchwork Mon May 26 22:33:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Tai X-Patchwork-Id: 42919 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EDC0827BC4A; Mon, 26 May 2025 23:34:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9832427BC49 for ; Mon, 26 May 2025 23:34:12 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uJgOV-0006Rh-QU; Mon, 26 May 2025 18:34:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uJgOR-0006RT-K2 for guix-patches@gnu.org; Mon, 26 May 2025 18:34:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uJgOR-0002Nq-7Y for guix-patches@gnu.org; Mon, 26 May 2025 18:34:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=Bfhb5DK8Kqnn9IIOOY7vnnKDVBsK0/cJd8i4RtK6WoM=; b=myLaWxyzWrTSSCMcS8HoSylsFZcIK2h5VkjebCdwU60hQ4sAseqkncgnMLAwqMMnovCjYGqj1PxdDQfRewtKZrjieah11fJZNOdqpQnqOrfgNQt6wUb70cbo3GM2K4Alx4mWGtdtjL8LAM2OEyMXiWhJVE/HNNnIKGfNjc7pispXvT2v1U1ohNygUnDHl+dnXCIua1YOGTwGoMlbSaN8dd3b8YIxqKg66FV3Lekpd4+87FusWqaNrSh5KFo78G4IT8WvtPbaMkzB6JhT1ixh9UfBdgi///h6P2KEUXLhCPiELbVnUy2T2Jd79NSbRuJWtHxVbt1aB3oYZZXXQobLCA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uJgOQ-0001Ov-5X; Mon, 26 May 2025 18:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#75274] [PATCH v3] gnu: bc: Update to 1.08.2. References: In-Reply-To: Resent-From: Andy Tai Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, bavier@posteo.net, sharlatanus@gmail.com, guix-patches@gnu.org Resent-Date: Mon, 26 May 2025 22:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75274 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75274@debbugs.gnu.org Cc: Andy Tai , Andreas Enge , Eric Bavier , Sharlatan Hellseher X-Debbugs-Original-Xcc: Andreas Enge , Eric Bavier , Sharlatan Hellseher Received: via spool by 75274-submit@debbugs.gnu.org id=B75274.17482988215330 (code B ref 75274); Mon, 26 May 2025 22:34:02 +0000 Received: (at 75274) by debbugs.gnu.org; 26 May 2025 22:33:41 +0000 Received: from localhost ([127.0.0.1]:33140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uJgO1-0001Ng-74 for submit@debbugs.gnu.org; Mon, 26 May 2025 18:33:41 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:51470) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uJgNx-0001N2-37 for 75274@debbugs.gnu.org; Mon, 26 May 2025 18:33:34 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-742c7a52e97so2131277b3a.3 for <75274@debbugs.gnu.org>; Mon, 26 May 2025 15:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748298806; x=1748903606; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=Bfhb5DK8Kqnn9IIOOY7vnnKDVBsK0/cJd8i4RtK6WoM=; b=XKL+5kvSFa6K5h575kwINX3WVcH31LGKFPNcoHK3HCbtg/sAseFGoJm/kBshrFtUR5 SPqi87Qnpin5OSASVRRJ2Yc9IKkQjyyYV9q/9skIh/xLZ9NZua9V7BXWn+RB/6g2Aaas LR8UOf80+7eHXBate0U81KtXiKirXsOO/gyRrHL/zmWvE4XSj5jpID6JkhZdgJRZsKDR CzETcXpI/fj3RRpwGibEktRsUB9IMK2jneT7BJcKfJEWr2pvAhBpIf3mZrOIVlwwwIgp kFIoLkAjYqUpZQ9XmpeyvB8MDmuor+D7oCBnoZfIb5QrwgusnYCnnRGoMvI8Tl9H4SlG VjNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748298806; x=1748903606; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Bfhb5DK8Kqnn9IIOOY7vnnKDVBsK0/cJd8i4RtK6WoM=; b=vR53RKziZEb6CCBS0JJQkFqyebSoKD5dgMTuM22T0qjBBgRfE2KtV+vXVPzz28EZGR B48xcCSkcFsgbZJoPavC2Ap6aAAsxF9acPIMBR0pubI+vt1ZWQmGdNP7ZkU5eLzBlKK3 SLwo2m4vVIGj6/KiA9BkKj1oKnqAKq11y1AOLTNZjP2YLmP8/asl12dTaW4Wi3BFsslE OWKNcYudnepNVQHNrCh7hpp3VyoYzUaYs1Lc2iGeu5MKAXs2maxrll1toayFZMFvNQhD 5JTGPuwEjLuIXl3w6MMa9THPK8KHPwDP/zzVZZccfTGaFM/iaVSHxrvuNV6sqnP4j132 aLSA== X-Gm-Message-State: AOJu0YwIdcSC8xZWMGHxOtSKm75+XttutjxTqIjj1wLL2qT3+PCpC8oR M/PBfqZ5nBwFdlD9yr/5EWADBNozbrSIY5MQSbN07ikQgR8zPf749pcs/yi4rJK0 X-Gm-Gg: ASbGncv16rrSDv3sP1JzEIN8ErUMLYl1lWCNndIgyyeKqxw048uXxCRlQ5DEWc3Q1KD fdL7QNX3zAP3I/h0Rc33LoNfT8RB1n3EEW9v5cXdwy80cRoaKJzQSUO7AAAv3nQB5hK3bQEjo/T rG78gXUfWn2lYIg8uUSfKrLk6/sXQaZz7Ft/Kn+O1yNS/QIrs74hZz2xP2GbN2KFiVDUPpZ3wbN iHUq9WENGCQMu9J/ULO8hEw+6UfBqXhd3KcY0V5Z9ZBMpgX1reWJPZT7Tp/2UjKIJNQnkzuwkkl t3MbPi/Zh+3QBqvtlW4pFijzXTq999AYD07e1ZqhaNJa/mo= X-Google-Smtp-Source: AGHT+IH/g03N39d++RrgA057Ndaz0vMMHfyg7wIj4KZkLazMNIWBHd0svgTaDn8GF7Nl+FcLJkXJFw== X-Received: by 2002:a05:6a21:2d89:b0:215:dc32:ffac with SMTP id adf61e73a8af0-2188c34d997mr17087672637.26.1748298806201; Mon, 26 May 2025 15:33:26 -0700 (PDT) Received: from DEskMiniX300.. ([172.98.218.160]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b2982c04d12sm10491918a12.21.2025.05.26.15.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 May 2025 15:33:25 -0700 (PDT) From: Andy Tai Date: Mon, 26 May 2025 15:33:21 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/algebra.scm (bc): Update to 1.08.2. [source](origin): Remove patch. * gnu/packages/patches/bc-fix-cross-compilation.patch: Delete. * gnu/local.mk: Unregister deleted file. Change-Id: Iada592d2deeeec91f875306a0fb6f8c4056ccfad --- gnu/local.mk | 1 - gnu/packages/algebra.scm | 9 +- .../patches/bc-fix-cross-compilation.patch | 189 ------------------ 3 files changed, 4 insertions(+), 195 deletions(-) delete mode 100644 gnu/packages/patches/bc-fix-cross-compilation.patch base-commit: 04eef950af05444ce42682364041dcbd3fa7afd5 diff --git a/gnu/local.mk b/gnu/local.mk index cb2630381c..a78cff64ce 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1041,7 +1041,6 @@ dist_patch_DATA = \ %D%/packages/patches/bash-linux-pgrp-pipe.patch \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ - %D%/packages/patches/bc-fix-cross-compilation.patch \ %D%/packages/patches/bdb-5.3-atomics-on-gcc-9.patch \ %D%/packages/patches/biboumi-cmake-ignore-git.patch \ %D%/packages/patches/brightnessctl-elogind-support.patch \ diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index f928e7943c..bb29c69747 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -709,19 +709,18 @@ (define-public gmp-ecm (define-public bc (package (name "bc") - (version "1.07.1") + (version "1.08.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz")) (sha256 (base32 - "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2")) - (patches (search-patches "bc-fix-cross-compilation.patch")))) + "11jzg23ks39k58bnb5y55wxqqz6h534ys5900hz6axcp8bn0yixf")))) (build-system gnu-build-system) (native-inputs (list automake autoconf ed flex readline texinfo)) (inputs - (list readline)) + (list readline ncurses)) (arguments '(#:configure-flags (list "--with-readline") @@ -737,7 +736,7 @@ (define-public bc an interactive environment for evaluating mathematical statements. Its syntax is similar to that of C, so basic usage is familiar. It also includes \"dc\", a reverse-polish calculator.") - (license license:gpl2+))) + (license license:gpl3+))) ;; The original kiss-fft does not have a complete build system and does not ;; build any shared libraries. This is a fork used by Extempore. diff --git a/gnu/packages/patches/bc-fix-cross-compilation.patch b/gnu/packages/patches/bc-fix-cross-compilation.patch deleted file mode 100644 index 04f2c92abf..0000000000 --- a/gnu/packages/patches/bc-fix-cross-compilation.patch +++ /dev/null @@ -1,189 +0,0 @@ -Patch adapted from Nix. -Upstream-status: Submitted to bug-bc@gnu.org. - -diff --git a/bc/Makefile.am b/bc/Makefile.am -index d9d412e..13f2b1e 100644 ---- a/bc/Makefile.am -+++ b/bc/Makefile.am -@@ -8,7 +8,7 @@ EXTRA_DIST = bc.h bcdefs.h const.h fix-libmath_h global.h libmath.b proto.h \ - sbc.y - noinst_HEADERS = libmath.h - --DISTCLEANFILES = sbc sbc.c sbc.h libmath.h -+DISTCLEANFILES = fbc sbc sbc.c sbc.h libmath.h - - MAINTAINERCLEANFILES = Makefile.in bc.c bc.h scan.c \ - bc.y bcdefs.h const.h execute.c fix-libmath_h \ -@@ -17,6 +17,7 @@ MAINTAINERCLEANFILES = Makefile.in bc.c bc.h scan.c \ - - AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../h - LIBBC = ../lib/libbc.a -+LIBBC_HOST = ../lib/libbc_host.a - LIBL = @LEXLIB@ - LDADD = $(LIBBC) $(LIBL) @READLINELIB@ - -@@ -29,15 +30,22 @@ $(PROGRAMS): libmath.h $(LIBBC) - scan.o: bc.h - global.o: libmath.h - --fbcOBJ = main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o -+%.o_host: CC := $(CC_FOR_BUILD) -+%.o_host: %.c -+ $(COMPILE) -c -o $@ $< - --libmath.h: libmath.b $(fbcOBJ) $(LIBBC) -- echo '{0}' > libmath.h -- $(MAKE) global.o -- $(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS) -- ./fbc -c $(srcdir)/libmath.b libmath.h -+fbcOBJ = $(addsuffix _host,\ -+ main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o) -+ -+global_host.c: global.c -+ sed 's/#include "libmath.h"/{0}/' $< > $@ -+ -+fbc: $(fbcOBJ) global_host.o_host $(LIBBC_HOST) $(LIBS) -+ $(CC_FOR_BUILD) $(LIBL) $(READLINELIB) -o $@ $^ -+ -+libmath.h: libmath.b fbc $(LIBBC_HOST) -+ ./fbc -c $(srcdir)/libmath.b < /dev/null > libmath.h - $(srcdir)/fix-libmath_h -- rm -f ./fbc ./global.o - - sbcOBJ = main.o sbc.o scan.o execute.o global.o load.o storage.o util.o \ - warranty.o -diff --git a/configure.ac b/configure.ac -index fc74573..5cabb73 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -20,6 +20,7 @@ m4_define([dc_version], 1.4.1) - - AC_INIT([bc],[bc_version]) - AC_CONFIG_SRCDIR(doc/bc.1) -+AC_CONFIG_MACRO_DIR([m4]) - AM_INIT_AUTOMAKE([dist-bzip2]) - AC_CONFIG_HEADERS(config.h) - -@@ -35,6 +36,7 @@ AC_DEFINE([DC_COPYRIGHT], - [Define the dc copyright line.]) - - AC_PROG_CC -+AX_CC_FOR_BUILD - AC_USE_SYSTEM_EXTENSIONS - - AM_PROG_LEX -diff --git a/lib/Makefile.am b/lib/Makefile.am -index ec4bf59..24c9f42 100644 ---- a/lib/Makefile.am -+++ b/lib/Makefile.am -@@ -1,5 +1,5 @@ - ## Process this file with automake to produce Makefile.in --noinst_LIBRARIES = libbc.a -+noinst_LIBRARIES = libbc.a libbc_host.a - - AM_CPPFLAGS = -I. -I.. -I$(srcdir)/../h - -@@ -7,8 +7,6 @@ libbc_a_SOURCES = getopt.c getopt1.c vfprintf.c number.c - - DEFS = @DEFS@ $(DEFSADD) - --AM_CFLAGS = @CFLAGS@ -- - MAINTAINERCLEANFILES = Makefile.in number.c - CLEANFILES = testmul specialnumber muldigits.h - -@@ -24,3 +22,11 @@ testmul: testmul.o number.o - - specialnumber: newnumber.o - cp newnumber.o number.o -+ -+%.o_host: CC := $(CC_FOR_BUILD) -+%.o_host : %.c -+ $(COMPILE) -c -o $@ $< -+ -+libbc_host.a : $(addsuffix _host,$(libbc_a_OBJECTS)) -+ ar cru $@ $+ -+ ranlib $@ -diff --git a/m4/cc_for_build.m4 b/m4/cc_for_build.m4 -new file mode 100644 -index 0000000..c62ffad ---- /dev/null -+++ b/m4/cc_for_build.m4 -@@ -0,0 +1,77 @@ -+# =========================================================================== -+# https://www.gnu.org/software/autoconf-archive/ax_cc_for_build.html -+# =========================================================================== -+# -+# SYNOPSIS -+# -+# AX_CC_FOR_BUILD -+# -+# DESCRIPTION -+# -+# Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD. -+# -+# LICENSE -+# -+# Copyright (c) 2010 Reuben Thomas -+# Copyright (c) 1999 Richard Henderson -+# -+# This program is free software: you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by the -+# Free Software Foundation, either version 3 of the License, or (at your -+# option) any later version. -+# -+# This program is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -+# Public License for more details. -+# -+# You should have received a copy of the GNU General Public License along -+# with this program. If not, see . -+# -+# As a special exception, the respective Autoconf Macro's copyright owner -+# gives unlimited permission to copy, distribute and modify the configure -+# scripts that are the output of Autoconf when processing the Macro. You -+# need not follow the terms of the GNU General Public License when using -+# or distributing such scripts, even though portions of the text of the -+# Macro appear in them. The GNU General Public License (GPL) does govern -+# all other use of the material that constitutes the Autoconf Macro. -+# -+# This special exception to the GPL applies to versions of the Autoconf -+# Macro released by the Autoconf Archive. When you make and distribute a -+# modified version of the Autoconf Macro, you may extend this special -+# exception to the GPL to apply to your modified version as well. -+ -+#serial 3 -+ -+dnl Get a default for CC_FOR_BUILD to put into Makefile. -+AC_DEFUN([AX_CC_FOR_BUILD], -+[# Put a plausible default for CC_FOR_BUILD in Makefile. -+if test -z "$CC_FOR_BUILD"; then -+ if test "x$cross_compiling" = "xno"; then -+ CC_FOR_BUILD='$(CC)' -+ else -+ CC_FOR_BUILD=gcc -+ fi -+fi -+AC_SUBST(CC_FOR_BUILD) -+# Also set EXEEXT_FOR_BUILD. -+if test "x$cross_compiling" = "xno"; then -+ EXEEXT_FOR_BUILD='$(EXEEXT)' -+else -+ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext, -+ [rm -f conftest* -+ echo 'int main () { return 0; }' > conftest.c -+ bfd_cv_build_exeext= -+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 -+ for file in conftest.*; do -+ case $file in -+ *.c | *.o | *.obj | *.ilk | *.pdb) ;; -+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; -+ esac -+ done -+ rm -f conftest* -+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no]) -+ EXEEXT_FOR_BUILD="" -+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} -+fi -+AC_SUBST(EXEEXT_FOR_BUILD)])dnl