diff --git a/.gitignore b/.gitignore index b020f50..c8a0919 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ indent-2.2.11.tar.gz /indent-2.2.12.tar.xz +/indent-2.2.13.tar.xz +/indent-2.2.13.tar.xz.sig diff --git a/indent-2.2.12-Add-m4-ax_cc_for_build.m4-for-CC_FOR_BUILD.patch b/indent-2.2.12-Add-m4-ax_cc_for_build.m4-for-CC_FOR_BUILD.patch deleted file mode 100644 index c28dc42..0000000 --- a/indent-2.2.12-Add-m4-ax_cc_for_build.m4-for-CC_FOR_BUILD.patch +++ /dev/null @@ -1,105 +0,0 @@ -From d3982dea9e7dd01bae68983df38a40d374b168bb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Thu, 13 Sep 2018 15:34:03 +0200 -Subject: [PATCH] Add m4/ax_cc_for_build.m4 for CC_FOR_BUILD -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -CC_FOR_BUILD variable is used in man/Makefile.am. -m4/ax_cc_for_build.m4 macro file is missing from autoconf-2.69, thus -it is not possible to build indent after regenerating a build script -with autoreconf. We need to distribute the macro file in indent. - -Signed-off-by: Petr Písař ---- - m4/ax_cc_for_build.m4 | 77 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 77 insertions(+) - create mode 100644 m4/ax_cc_for_build.m4 - -diff --git a/m4/ax_cc_for_build.m4 b/m4/ax_cc_for_build.m4 -new file mode 100644 -index 0000000..c62ffad ---- /dev/null -+++ b/m4/ax_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 --- -2.17.1 - diff --git a/indent-2.2.12-Recognize-binary-integer-literals.patch b/indent-2.2.12-Recognize-binary-integer-literals.patch deleted file mode 100644 index e33d0a4..0000000 --- a/indent-2.2.12-Recognize-binary-integer-literals.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 2b1d8978ea303e8da1bc8f672cdb82c76ef38c02 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Mon, 3 Dec 2018 10:42:21 +0100 -Subject: [PATCH] Recognize binary integer literals -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Some compilers support binary constants written as 0b1 or 0B1. This is -the case of GCC -. - -This is based on a patch provided by Josef Kubin . - - - -Signed-off-by: Petr Písař ---- - regression/TEST | 2 +- - regression/input/binary-constant.c | 12 ++++++++++++ - regression/standard/binary-constant.c | 12 ++++++++++++ - src/lexi.c | 23 +++++++++++++++++------ - 4 files changed, 42 insertions(+), 7 deletions(-) - create mode 100644 regression/input/binary-constant.c - create mode 100644 regression/standard/binary-constant.c - -diff --git a/regression/TEST b/regression/TEST -index 56f41d9..64b9bce 100755 ---- a/regression/TEST -+++ b/regression/TEST -@@ -37,7 +37,7 @@ BUGS="case-label.c one-line-1.c one-line-2.c one-line-3.c \ - one-line-4.c struct-decl.c sizeof-in-while.c line-break-comment.c \ - macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c \ - bug-gnu-33364.c float-constant-suffix.c block-comments.c \ -- no-forced-nl-in-block-init.c hexadecimal_float.c" -+ no-forced-nl-in-block-init.c hexadecimal_float.c binary-constant.c" - - INDENTSRC="args.c backup.h backup.c dirent_def.h globs.c indent.h \ - indent.c indent_globs.h io.c lexi.c memcpy.c parse.c pr_comment.c \ -diff --git a/regression/input/binary-constant.c b/regression/input/binary-constant.c -new file mode 100644 -index 0000000..25f1624 ---- /dev/null -+++ b/regression/input/binary-constant.c -@@ -0,0 +1,12 @@ -+int foo = 0b1; -+long int foo = 0b1L; -+unsigned int foo = 0b1U; -+unsigned long int foo = 0b1LU; -+ -+int foo = 0B1; -+long int foo = 0B1L; -+unsigned int foo = 0B1U; -+unsigned long int foo = 0B1LU; -+ -+int foo = 0b01010101; -+int foo = 0B01010101; -diff --git a/regression/standard/binary-constant.c b/regression/standard/binary-constant.c -new file mode 100644 -index 0000000..25f1624 ---- /dev/null -+++ b/regression/standard/binary-constant.c -@@ -0,0 +1,12 @@ -+int foo = 0b1; -+long int foo = 0b1L; -+unsigned int foo = 0b1U; -+unsigned long int foo = 0b1LU; -+ -+int foo = 0B1; -+long int foo = 0B1L; -+unsigned int foo = 0B1U; -+unsigned long int foo = 0B1LU; -+ -+int foo = 0b01010101; -+int foo = 0B01010101; -diff --git a/src/lexi.c b/src/lexi.c -index 848ddc9..6eaba95 100644 ---- a/src/lexi.c -+++ b/src/lexi.c -@@ -286,15 +286,24 @@ extern codes_ty lexi(void) - if (parser_state_tos->last_rw == rw_return) - parser_state_tos->last_rw = rw_none; - -+ /* decimal, octal, hex, binary and floating point number format */ - if (isdigit (*buf_ptr) || - ((buf_ptr[0] == '.') && isdigit (buf_ptr[1]))) - { -- int seendot = 0, seenexp = 0, ishexa = 0; -+ int seendot = 0, seenexp = 0, ishexa = 0, isbinary = 0; - -- if ((*buf_ptr == '0') && ((buf_ptr[1] == 'x') || (buf_ptr[1] == 'X'))) -+ if (*buf_ptr == '0') - { -- ishexa = 1; -- buf_ptr += 1; -+ if ((buf_ptr[1] == 'x') || (buf_ptr[1] == 'X')) -+ { -+ ishexa = 1; -+ buf_ptr += 1; -+ } -+ else if ((buf_ptr[1] == 'b') || (buf_ptr[1] == 'B')) -+ { -+ isbinary = 1; -+ buf_ptr += 1; -+ } - } - while (1) - { -@@ -312,8 +321,10 @@ extern codes_ty lexi(void) - - buf_ptr++; - -- if (!(ishexa && !seenexp ? -- isxdigit (*buf_ptr) : isdigit (*buf_ptr) -+ if (!( -+ (ishexa && !seenexp && isxdigit (*buf_ptr)) || -+ (isbinary && !seenexp && (*buf_ptr == '0' || *buf_ptr == '1')) || -+ ((!(ishexa || isbinary) || seenexp) && isdigit (*buf_ptr)) - ) && *buf_ptr != '.') - { - if ((ishexa ? --- -2.17.2 - diff --git a/indent-2.2.12-doc-Fix-dont-cuddle-else-short-option-and-index-remo.patch b/indent-2.2.12-doc-Fix-dont-cuddle-else-short-option-and-index-remo.patch deleted file mode 100644 index 687273d..0000000 --- a/indent-2.2.12-doc-Fix-dont-cuddle-else-short-option-and-index-remo.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 98a85f736394e4410235a402289009d22a13d333 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Thu, 13 Sep 2018 14:24:15 +0200 -Subject: [PATCH] doc: Fix --dont-cuddle-else short option and index - --remove-preprocessor-space -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Písař ---- - doc/indent.texi | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/doc/indent.texi b/doc/indent.texi -index a4b076b..4caa797 100644 ---- a/doc/indent.texi -+++ b/doc/indent.texi -@@ -792,7 +792,7 @@ if (x > 0) - - @kindex -ce - @kindex --cuddle-else --@kindex -dce -+@kindex -nce - @kindex --dont-cuddle-else - If you are using the @option{-br} option, you probably want to also use - the @option{-ce} option. This causes the @code{else} in an if-then-else -@@ -2046,6 +2046,11 @@ Line up continued lines at parentheses.@* - Leave space between @samp{#} and preprocessor directive.@* - @xref{Indentation}. - -+@item -nlps -+@itemx --remove-preprocessor-space -+Remove space between @samp{#} and preprocessor directive.@* -+@xref{Indentation}. -+ - @item -nbad - @itemx --no-blank-lines-after-declarations - Do not force blank lines after declarations.@* -@@ -2412,6 +2417,7 @@ the corresponding short option. - \line{ --preprocessor-indentation \leaderfill -ppi@var{n}\ } - \line{ --preserve-mtime \leaderfill -pmt\ } - \line{ --procnames-start-lines \leaderfill -psl\ } -+\line{ --remove-preprocessor-space \leaderfill -nlps\ } - \line{ --single-line-conditionals \leaderfill -slc\ } - \line{ --space-after-cast \leaderfill -cs\ \ } - \line{ --space-after-for \leaderfill -saf\ } -@@ -2507,6 +2513,7 @@ the corresponding short option. - --preserve-mtime -pmt - --preprocessor-indentation -ppi@var{n} - --procnames-start-lines -psl -+--remove-preprocessor-space -nlps - --single-line-conditionals -slc - --space-after-cast -cs - --space-after-for -saf --- -2.17.1 - diff --git a/indent.spec b/indent.spec index 48c0f9f..ee1bacc 100644 --- a/indent.spec +++ b/indent.spec @@ -1,50 +1,127 @@ Summary: A GNU program for formatting C code Name: indent -Version: 2.2.12 -Release: 10%{?dist} -# COPYING: GPLv3 text -# doc/indent.info: Verbatim (generated from doc/indent.texi) +Version: 2.2.13 +Release: 1%{?dist} +# COPYING: GPL-3.0 text +# doc/indent.texi: Latex2e-like (Fedora-acceptable, +# TODO: waiting on an identifier +# ) +# AND a subset of Latex2e WITH a texinfo-commented GPL clause +# (Fedora legal recommends to ignore it # -# doc/indent.texi: Verbatim (or GPL?) -# src/code_io.c: BSD -# src/globs.c: GPLv3+ -# src/indent.c: BSD -# src/utils.h: GPLv3+ -## Not in any binary package -# aclocal.m4: GPLv3+ with exception -# config/config.guess: GPLv2+ with exception -# config/config.rpath: FSFULLR -# config/install-sh: MIT -# doc/Makefile.in: FSFULLR -# INSTALL: FSFAP -# m4/longlong.m4: FSFULLR -# man/texinfo2man.c: BSD with advertising -# regression/standard/globs.c: BSD with advertising -# regression/standard/sys.h: FSFUL (or so) +# ) +# AND BSD-4.3TAHOE-like +# (BSD-4.3TAHOE refers to indent program, not +# the manual) +# (Fedora-acceptable, +# TODO: waiting on an SPDX update +# ) +# README.md: "See COPYING" +# src/args.c: BSD-3-Clause AND GPL-3.0-or-later +# src/args.h: BSD-3-Clause +# src/backup.c: BSD-3-Clause +# src/backup.h: BSD-3-Clause +# src/code_io.c: BSD-3-Clause +# src/code_io.h: BSD-3-Clause AND GPL-3.0-or-later +# src/comments.c: GPL-3.0-or-later +# src/comments.h: GPL-3.0-or-later +# src/globs.c: GPL-3.0-or-later +# src/handletoken.c: BSD-3-Clause +# src/indent.c: BSD-3-Clause +# src/indent.h: BSD-3-Clause +# src/lexi.c: BSD-3-Clause +# src/lexi.h: GPL-3.0-or-later +# src/output.c: BSD-3-Clause AND GPL-3.0-or-later +# src/parse.c: BSD-3-Clause AND GPL-3.0-or-later +# src/parse.h: BSD-3-Clause AND GPL-3.0-or-later +# src/sys.h: BSD-3-Clause AND GPL-3.0-or-later +# src/utils.c: GPL-3.0-or-later +# src/utils.h: GPL-3.0-or-later +# src/wildexp.c: BSD-3-Clause AND GPL-3.0-or-later +## Used at build time, but not in any binary package +# man/texinfo2man.c: BSD-4.3TAHOE subset +# regression/input/args.c: BSD-4.3TAHOE +# regression/input/backup.c: FSFUL-like +# regression/input/backup.h: FSFUL-like +# regression/input/comments1.c: BSD-4.3TAHOE +# regression/input/globs.c: BSD-4.3TAHOE +# regression/input/indent.c: BSD-4.3TAHOE +# regression/input/indent.h: BSD-4.3TAHOE +# regression/input/indent_globs.h: BSD-4.3TAHOE +# regression/input/io.c: BSD-4.3TAHOE +# regression/input/lexi.c: BSD-4.3TAHOE +# regression/input/parse.c: BSD-4.3TAHOE +# regression/input/pr_comment.c: BSD-4.3TAHOE +# regression/input/sys.h: FSFUL-like +# regression/standard/args.c: BSD-4.3TAHOE +# regression/standard/backup.c: FSFUL-like +# regression/standard/backup.h: FSFUL-like +# regression/standard/comments1.c: BSD-4.3TAHOE +# regression/standard/comments1-fca.c: BSD-4.3TAHOE +# regression/standard/globs.c: BSD-4.3TAHOE +# +# regression/standard/indent.h: BSD-4.3TAHOE +# regression/standard/indent_globs.h: BSD-4.3TAHOE +# regression/standard/io.c: BSD-4.3TAHOE +# regression/standard/lexi.c: BSD-4.3TAHOE +# regression/standard/parse.c: BSD-4.3TAHOE +# regression/standard/pr_comment.c: BSD-4.3TAHOE +# regression/standard/sys.h: FSFUL-like ## Unused -# config/texinfo.tex: GPLv3+ with exception -# intl/plural.c: LGPLv2+ with exception -# intl/vasnprintf.c: LGPLv2+ +# config/texinfo.tex: GPL-3.0-or-later WITH Texinfo exception +# INSTALL: FSFAP +## Unbundled +# doc/indent.info: A subset of Latex2e +# (Fedora legal recommends to ignore it) +# AND BSD-4.3TAHOE +# (BSD-4.3TAHOE refers to indent program, not +# the manual) +# (generated from doc/indent.texi) +# aclocal.m4: FSFULLRWD AND FSFULLR +# config/config.guess: GPL-3.0-or-later WITH Autoconf-exception-generic +# config/missing: GPL-2.0-or-later WITH Autoconf-exception-generic +# config/compile: GPL-2.0-or-later WITH Autoconf-exception-generic +# config/config.rpath: FSFULLR +# config/config.sub: GPL-3.0-or-later WITH Autoconf-exception-generic +# config/depcomp: GPL-2.0-or-later WITH Autoconf-exception-generic +# config/install-sh: X11 AND LicenseRef-Fedora-Public-Domain +# config/mdate-sh: GPL-2.0-or-later WITH Autoconf-exception-generic +# configure: FSFUL +# doc/Makefile.in: FSFULLRWD +# m4/ax_cc_for_build.m4: GPL-3.0-or-later WITH Autoconf-exception-macro +# m4/gettext.m4: FSFULLR +# m4/iconv.m4: FSFULLR +# m4/intlmacosx.m4: FSFULLR +# m4/lib-ld.m4: FSFULLR +# m4/lib-link.m4: FSFULLR +# m4/lib-prefix.m4: FSFULLR +# m4/nls.m4: FSFULLR +# m4/po.m4: FSFULLR +# m4/progtest.m4: FSFULLR +# Makefile.in: FSFULLRWD +# man/indent.1: A subset of Latex2e AND "see oqindent.texinfo and indent.info" +# (generated from doc/indent.texi and man/indent.1.in) +# man/Makefile.in: FSFULLRWD +# po/Makefile.in.in: FSFUL-like +# src/Makefile.in: FSFULLRWD License: GPLv3+ and BSD and Verbatim -URL: http://www.gnu.org/software/%{name}/ -Source: http://ftpmirror.gnu.org/%{name}/%{name}-%{version}.tar.xz -# Correct documentation, proposed to upstream -# -Patch1: indent-2.2.12-doc-Fix-dont-cuddle-else-short-option-and-index-remo.patch -# Add AX_CC_FOR_BUILD m4 macro definition, copied from -# , -# license is "GPLv3+ with exception", proposed to upstream -# -Patch2: indent-2.2.12-Add-m4-ax_cc_for_build.m4-for-CC_FOR_BUILD.patch -# Recognize binary integer literals, bug #1655319, submitted to the upstream -# -Patch3: indent-2.2.12-Recognize-binary-integer-literals.patch -# Update config.sub to support aarch64, bug #925588 -BuildRequires: autoconf +URL: https://www.gnu.org/software/%{name}/ +Source0: https://ftpmirror.gnu.org/%{name}/%{name}-%{version}.tar.xz +Source1: https://ftpmirror.gnu.org/%{name}/%{name}-%{version}.tar.xz.sig +# A fingerprint verified from +# and +# . +Source2: https://shadura.me/key.pgp +BuildRequires: autoconf >= 2.71 +# autoconf-archive for unbundled ax_cc_for_build.m4 +BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: coreutils +# dvips is not used +# egrep is not used BuildRequires: gcc -BuildRequires: gettext-devel +BuildRequires: gettext-devel >= 0.18.3 +BuildRequires: gnupg2 # gperf to update pre-generated code to fix compiler warnings BuildRequires: gperf BuildRequires: make @@ -61,29 +138,34 @@ Install the indent package if you are developing applications in C and you want a program to format your code. %prep -%setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%autosetup -p1 # Regenerate sources rm src/gperf.c src/gperf-cc.c -# Update config.sub to support aarch64, bug #925588 -autoreconf -i -f +# Regenerate documentation and translatations +rm man/indent.1 doc/indent.info po/*.gmo po/stamp-po +# Remove bundled and pregenerated build scripts +rm -r aclocal.m4 config configure m4 {,doc/,src/,man/}Makefile.in \ + po/Makefile.in.in po/*.sed po/*.sin po/Rules-quot %build -# Enable 64-bit stat(2) -%configure CFLAGS='%optflags -D_FILE_OFFSET_BITS=64' +autoreconf -i -f +%configure \ + --enable-largefile \ + --enable-nls \ + --disable-rpath %{make_build} %install %{make_install} -rm -f $RPM_BUILD_ROOT/%{_infodir}/dir $RPM_BUILD_ROOT/%{_bindir}/texinfo2man \ - $RPM_BUILD_ROOT/usr/doc/indent/indent.html - +# Delete HTML version of the manual. We already package roff and texinfo +# variants. +rm -f %{buildroot}%{_infodir}/dir %{buildroot}%{_bindir}/texinfo2man \ + %{buildroot}%{_datadir}/doc/indent/indent.html %find_lang %name %check -make check +make check %{?_smp_mflags} %files -f %{name}.lang %license COPYING @@ -92,8 +174,10 @@ make check %{_mandir}/man1/indent.* %{_infodir}/indent.info* - %changelog +* Tue Mar 21 2023 Petr Pisar - 2.2.13-1 +- 2.2.13 bump + * Thu Jul 21 2022 Fedora Release Engineering - 2.2.12-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/key.pgp b/key.pgp new file mode 100644 index 0000000..8d19000 Binary files /dev/null and b/key.pgp differ diff --git a/sources b/sources index e287813..f5dac12 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (indent-2.2.12.tar.xz) = dbe73bd3729074825f9f5b4241a4c539ad32069df56511963417caf0351ff9ec5edd77e9580338301c8abf89ab9c0592bc7e82c14eec7450c496259d7e9045dd +SHA512 (indent-2.2.13.tar.xz) = a92028f99cc64b451aac99802de564f2e915e7f0e258df761141f77595c07cc95c3f2c35917618dbc2cfa3aa5b163544e07aa6641c32298aca3a1c5331bb8c69 +SHA512 (indent-2.2.13.tar.xz.sig) = 4e1184af3d0dbcb88431569480cc43b8d544d5b87c085d0551cc3a1004aad98ef87798077841df52b59a2fbf534cea152a93c72a22e1d54ac020fabd7ece614a