diff --git a/source-highlight-3.1.9.tar.gz.sig b/source-highlight-3.1.9.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..ec531ce54fb1383fbe44ddbbabe239f28f3654e3 --- /dev/null +++ b/source-highlight-3.1.9.tar.gz.sig @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- + +iQJDBAABCAAtFiEE6f6K6VDLB/W+sugFA2p1MJ0z5bUFAl2h6vwPHHRvbUB0cm9t +ZXkuY29tAAoJEANqdTCdM+W1oWEP/RJEfZTp3WrGB+Fe1+FNiMDq+iGcdbm9MXpr +fp871ds+zvm7Wb4WJEAMtrNSqozNQ1BLJdYuKovI4tWV/ej+189R7vqf1JytU31H +8Sx6QokDt/cU+4NA4CBdXZoDEGwcQiFC5mQQCFiZqhJ70ayvnMRQ+XapMxFF+p2c +pRv7+qgJVCrxRS7Vj21ZozFR7ZcMpm/fvZujWFL04DVh3hh84MDnlidl8xzNLoFW +f9TJVgKA1ulA8urLzEfF9b8jRgpit1xXao86uwmW/t9wnYsUEZWqUQ9W9BvheufY +2tjjwoQHBpPg6fyEZGenUcYMXKsbGK4Ce9kJItn6MTvo73OZ1sdjJtTxixMwHQh2 +NeNQ4TejoYJ7cM0YxT/peZcczlF9i2hQOIV7eqsbjhQSRD75POMnwcv98jqEzFE0 +gg9GiNg1RRgP2RtY/U0XCw2RjPEIpk8TalrUA8h0iQgGV837maTJKfpII2C29I+m +EARjLz3k3tz/zBLtzPrVEJXCPp0V7WpHxyrBmrk46gHw0Dqlxtnpe58a40AeyKsN +BwM8uH9ghWbizmg0UKXvEssycLGSzkB/G1c3l8nkI7V6dvNymuX5By4GpuakUiPz +1zRJ9Q2yLOaF8owcRYStc5iLgolaTvTGVlbc6xoU1ZZE+obhINv5AX102uh8hvMk +cx600fqZ +=7IK7 +-----END PGP SIGNATURE----- diff --git a/source-highlight-bz2256374-lesspipe_sh.patch b/source-highlight-bz2256374-lesspipe_sh.patch new file mode 100644 index 0000000000000000000000000000000000000000..b490cb27cbd8881d60932437a8b6f6a096ae87b9 --- /dev/null +++ b/source-highlight-bz2256374-lesspipe_sh.patch @@ -0,0 +1,39 @@ +commit 8be2bee7f6861fd27d5c181b15d3126fc7dbf73b +Author: Keith Seitz +Date: Sat Jan 20 09:25:05 2024 -0700 + + lesspipe may contain ".sh" extension + + On Fedora, the "lesspipe" script is actually called + "lesspipe.sh". This patch proposes to use "$(which NAME)" + to figure out the actual name of the script to use. + + If neither "lesspipe" nor "lesspipe.sh" exists in $PATH, + the patch simply uses "lesspipe", preserving the current behavior. + + It was based on the 3.1.9 release tarball, but should + apply cleanly to current git. + + This was reported as Fedora bugzilla 2256374. + +diff --git a/src/src-hilite-lesspipe.sh.in b/src/src-hilite-lesspipe.sh.in +index eb5c3ee..76231c7 100644 +--- a/src/src-hilite-lesspipe.sh.in ++++ b/src/src-hilite-lesspipe.sh.in +@@ -7,7 +7,15 @@ for source in "$@"; do + *Makefile|*makefile) + source-highlight --failsafe -f esc --lang-def=makefile.lang --style-file=esc.style -i "$source" ;; + *.tar|*.tgz|*.gz|*.bz2|*.xz) +- lesspipe "$source" ;; ++ # The "lesspipe" script may or may not have ".sh" extension. ++ lesspipe=$(which lesspipe 2>/dev/null) ++ if [ -z "$lesspipe" ]; then ++ lesspipe=$(which lesspipe.sh 2>/dev/null) ++ if [ -z "$lesspipe" ]; then ++ lesspipe="lesspipe" ++ fi ++ fi ++ $lesspipe "$source" ;; + *) source-highlight --failsafe --infer-lang -f esc --style-file=esc.style -i "$source" ;; + esac + done diff --git a/source-highlight.spec b/source-highlight.spec index 065d868b413fa7a538b147e72add32dc437dae00..38ca87952d7c68a4d96c18a55102ebf908965b79 100644 --- a/source-highlight.spec +++ b/source-highlight.spec @@ -1,4 +1,4 @@ -%define anolis_release 3 +%define anolis_release 4 Name: source-highlight Version: 3.1.9 @@ -7,14 +7,17 @@ Summary: Produces a document with syntax highlighting License: GPLv3+ URL: http://www.gnu.org/software/src-highlite/ -Source0: ftp://ftp.gnu.org/gnu/src-highlite/%{name}-%{version}.tar.gz +Source0: ftp://ftp.gnu.org/gnu/src-highlite/source-highlight-3.1.9.tar.gz +Source1: ftp://ftp.gnu.org/gnu/src-highlite/source-highlight-3.1.9.tar.gz.sig BuildRequires: make BuildRequires: bison, flex, boost-devel BuildRequires: help2man, chrpath, pkgconfig(bash-completion) BuildRequires: gcc, gcc-c++ +BuildRequires: ctags Patch0: 0000-remove-throw-specifications.patch Patch1: 0001-fix-tests-build-failure-on-clang-and-gcc12.patch +Patch2: source-highlight-bz2256374-lesspipe_sh.patch %description This program, given a source file, produces a document with syntax @@ -87,6 +90,8 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d %{_includedir}/srchilite/*.h %changelog +* Mon Nov 17 2025 wenyuzifang - 3.1.9-4 +- Ensure compatibility with systems where lesspipe is named lesspipe.sh by detecting the correct script name. * Wed Mar 01 2023 Funda Wang - 3.1.9-3 - Rebuild with boost 1.81.0