diff --git a/.gitignore b/.gitignore index ad63cd4..7d1b322 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/source-highlight-3.1.8.tar.gz -SOURCES/source-highlight-3.1.8.tar.gz.sig +source-highlight-3.1.9.tar.gz diff --git a/.source-highlight.metadata b/.source-highlight.metadata deleted file mode 100644 index b026f28..0000000 --- a/.source-highlight.metadata +++ /dev/null @@ -1,2 +0,0 @@ -55b814ec09674ef7f5ab42c46b2ae5a0f86f7c9b SOURCES/source-highlight-3.1.8.tar.gz -6f37f9f4e354c9ed74a1c53c7267327135a3edef SOURCES/source-highlight-3.1.8.tar.gz.sig diff --git a/904949c9026cb772dc93fbe0947a252ef47127f4.patch b/904949c9026cb772dc93fbe0947a252ef47127f4.patch new file mode 100644 index 0000000..8cf9234 --- /dev/null +++ b/904949c9026cb772dc93fbe0947a252ef47127f4.patch @@ -0,0 +1,42 @@ +From 904949c9026cb772dc93fbe0947a252ef47127f4 Mon Sep 17 00:00:00 2001 +From: Tom Tromey +Date: Wed, 10 Jun 2020 20:38:27 -0600 +Subject: Remove "throw" specifications + +C++ throw specifications were deprecated in C++11. +This patch removes them from the library. +--- + ChangeLog | 5 +++++ + lib/srchilite/fileutil.cc | 2 +- + lib/srchilite/fileutil.h | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/lib/srchilite/fileutil.cc b/lib/srchilite/fileutil.cc +index 59a6d64..963178c 100644 +--- a/lib/srchilite/fileutil.cc ++++ b/lib/srchilite/fileutil.cc +@@ -48,7 +48,7 @@ void set_file_util_verbose(bool b) { + // FIXME avoid using a global variable + std::string start_path; + +-string readFile(const string &fileName) throw (IOException) { ++string readFile(const string &fileName) { + ifstream file(fileName.c_str()); + + if (!file.is_open()) { +diff --git a/lib/srchilite/fileutil.h b/lib/srchilite/fileutil.h +index 7335a9b..042eb56 100644 +--- a/lib/srchilite/fileutil.h ++++ b/lib/srchilite/fileutil.h +@@ -27,7 +27,7 @@ extern std::string start_path; + * @return the contents of the file + * @throw IOException + */ +-string readFile(const string &fileName) throw (IOException); ++string readFile(const string &fileName); + + //char *read_file(const string &fileName); + +-- +cgit v1.1 + 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 0000000..ec531ce --- /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 0000000..b490cb2 --- /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/SPECS/source-highlight.spec b/source-highlight.spec similarity index 66% rename from SPECS/source-highlight.spec rename to source-highlight.spec index f27b1b6..e95fa24 100644 --- a/SPECS/source-highlight.spec +++ b/source-highlight.spec @@ -1,31 +1,35 @@ Summary: Produces a document with syntax highlighting Name: source-highlight -Version: 3.1.8 -Release: 18%{?dist} -Group: Development/Tools -License: GPLv3+ +Version: 3.1.9 +Release: 25%{?dist} +License: GPL-3.0-or-later AND GFDL-1.1-or-later AND LicenseRef-Fedora-Public-Domain AND GPL-2.0-only AND GPL-3.0-only AND GPL-3.0-or-later WITH Bison-exception-2.2 Source0: ftp://ftp.gnu.org/gnu/src-highlite/%{name}-%{version}.tar.gz Source1: ftp://ftp.gnu.org/gnu/src-highlite/%{name}-%{version}.tar.gz.sig URL: http://www.gnu.org/software/src-highlite/ +# Taken from https://git.savannah.gnu.org/cgit/src-highlite.git/patch/?id=904949c9026cb772dc93fbe0947a252ef47127f4 +# and slightly adapted +Patch0: 904949c9026cb772dc93fbe0947a252ef47127f4.patch +Patch1: source-highlight-bz2256374-lesspipe_sh.patch +BuildRequires: make BuildRequires: bison, flex, boost-devel -BuildRequires: help2man, ctags, chrpath, pkgconfig(bash-completion) -Requires(post): info -Requires(preun): info +BuildRequires: help2man, chrpath, pkgconfig(bash-completion) +BuildRequires: gcc, gcc-c++ +%if 0%{!?rhel:1} || 0%{?rhel} < 9 +BuildRequires: ctags Requires: ctags +%endif %description This program, given a source file, produces a document with syntax -highlighting. At the moment this package can handle : -Java, Javascript, C/C++, Prolog, Perl, Php3, Python, Flex, ChangeLog, Ruby, -Lua, Caml, Sml and Log as source languages, and HTML, XHTML and ANSI color +highlighting. At the moment this package can handle: +Java, Javascript, C/C++, Prolog, Perl, Php3, Python, Flex, ChangeLog, Ruby, +Lua, Caml, Sml and Log as source languages, and HTML, XHTML and ANSI color escape sequences as output format. %package devel Summary: Development files for source-highlight -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: pkgconfig +Requires: %{name}%{?_isa} = %{version}-%{release} # For linking against source-higlight using pkgconfig Requires: boost-devel @@ -33,16 +37,19 @@ Requires: boost-devel Development files for source-highlight %prep -%setup -q +%autosetup -p1 %build +export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" +%if 0%{?rhel} > 8 +export CTAGS=do_not_use_ctags +%endif %configure --disable-static \ --with-boost-regex=boost_regex -make %{?_smp_mflags} +%make_build %install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT +%make_install mv $RPM_BUILD_ROOT%{_datadir}/doc/ docs %{__sed} -i 's/\r//' docs/source-highlight/*.css @@ -53,7 +60,11 @@ find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';' chrpath --delete $RPM_BUILD_ROOT%{_bindir}/source-highlight chrpath --delete $RPM_BUILD_ROOT%{_bindir}/source-highlight-settings -echo -e "\ncxx = cpp.lang" >> $RPM_BUILD_ROOT%{_datadir}/source-highlight/lang.map +# Submitted and accepted upstream: +# https://savannah.gnu.org/bugs/index.php?63225 +# This can be removed upon next release after 3.1.9 +echo -e >> $RPM_BUILD_ROOT%{_datadir}/source-highlight/lang.map \ +"\nrpm-spec = spec.lang\n" bashcompdir=$(pkg-config --variable=completionsdir bash-completion) mkdir -p $RPM_BUILD_ROOT$bashcompdir @@ -61,21 +72,7 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/source-highlight \ $RPM_BUILD_ROOT$bashcompdir/ rmdir $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d -%post -/sbin/ldconfig -/sbin/install-info %{_infodir}/source-highlight.info \ - %{_infodir}/dir 2>/dev/null || : - -%preun -if [ $1 -eq 0 ]; then - /sbin/install-info --delete %{_infodir}/source-highlight.info \ - %{_infodir}/dir 2>/dev/null || : -fi - -%postun -p /sbin/ldconfig - %files -%defattr (-,root,root) %doc docs/source-highlight/* %{_bindir}/cpp2html %{_bindir}/java2html @@ -92,18 +89,122 @@ fi %{_infodir}/source-highlight*.info* %files devel -%defattr (-,root,root) %dir %{_includedir}/srchilite %{_libdir}/libsource-highlight.so %{_libdir}/pkgconfig/source-highlight.pc %{_includedir}/srchilite/*.h %changelog -* Mon May 27 2024 Tomas Popela - 3.1.8-18 -- Rebuild for shipping devel subpackage in CRB (RHEL-38616) +* Tue Oct 29 2024 Troy Dawson - 3.1.9-25 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 -* Mon Nov 02 2020 Felipe Borges - 3.1.8-17 -- Add boost-devel dependecy to devel package (#1718480) +* Tue Jul 16 2024 Keith Seitz 3.1.9-24 +- Rebuild for shipping devel subpackage in CRB + +* Mon Jun 24 2024 Troy Dawson - 3.1.9-23 +- Bump release for June 2024 mass rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 3.1.9-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Keith Seitz - 3.1.9-21 +- Added upstream patch to fix BZ 2256374. + +* Wed Jan 17 2024 Jonathan Wakely - 3.1.9-20 +- Rebuilt for Boost 1.83 + +* Fri Aug 25 2023 Keith Seitz +- migrated to SPDX license + +* Sat Jul 22 2023 Fedora Release Engineering - 3.1.9-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Feb 20 2023 Jonathan Wakely - 3.1.9-18 +- Rebuilt for Boost 1.81 + +* Sun Jan 29 2023 FeRD (Frank Dana) - 3.1.9-17 +- Stop adding 'cxx' language mapping (fixed upstream) +- Add 'rpm-spec' (used in asciidoc) mapping + +* Sat Jan 21 2023 Fedora Release Engineering - 3.1.9-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Oct 06 2022 Adrian Reber - 3.1.9-15 +- Added upstream patch to fix #2131454 + +* Sat Jul 23 2022 Fedora Release Engineering - 3.1.9-14.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed May 04 2022 Thomas Rodgers - 3.1.9-13.1 +- Rebuilt for Boost 1.78 + +* Sat Jan 22 2022 Fedora Release Engineering - 3.1.9-12.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Aug 11 2021 Stephen Gallagher - 3.1.9-11.1 +- Rebuild for Boost 1.76 in ELN + +* Fri Aug 06 2021 Jonathan Wakely - 3.1.9-11 +- Rebuilt for Boost 1.76 + +* Fri Jul 23 2021 Fedora Release Engineering - 3.1.9-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Mar 30 2021 Jonathan Wakely - 3.1.9-9 +- Rebuilt for removed libstdc++ symbol (#1937698) + +* Wed Jan 27 2021 Fedora Release Engineering - 3.1.9-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 22 2021 Jonathan Wakely - 3.1.9-7 +- Rebuilt for Boost 1.75 + +* Wed Jan 6 2021 Keith Seitz - 3.1.9-6 +- Disable ctags support for RHEL9+. + +* Wed Jul 29 2020 Fedora Release Engineering - 3.1.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Jeff Law - 3.1.9-4 +- Force C++14 as this code is not C++17 ready + +* Thu May 28 2020 Jonathan Wakely - 3.1.9-3 +- Rebuilt for Boost 1.73 + +* Thu Jan 30 2020 Fedora Release Engineering - 3.1.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Oct 12 2019 Orion Poplawski - 3.1.9-1 +- Update to 3.1.9 + +* Fri Jul 26 2019 Fedora Release Engineering - 3.1.8-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Mar 20 2019 fedora-toolbox - 3.1.8-24 +- Patch esc.style to avoid using the black color (#1688372) + +* Mon Feb 18 2019 Adrian Reber - 3.1.8-23 +- Require boost-devel in the source-highlight-devel package (#1638029) + +* Sun Feb 03 2019 Fedora Release Engineering - 3.1.8-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 25 2019 Jonathan Wakely - 3.1.8-21 +- Rebuilt for Boost 1.69 + +* Tue Jul 31 2018 Florian Weimer - 3.1.8-20 +- Rebuild with fixed binutils + +* Sat Jul 28 2018 Igor Gnatenko - 3.1.8-19 +- Replace obsolete scriptlets + +* Mon Jul 16 2018 Adrian Reber - 3.1.8-18 +- Added BR gcc, gcc-c++ +- Small SPEC file cleanups + +* Sat Jul 14 2018 Fedora Release Engineering - 3.1.8-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Feb 09 2018 Fedora Release Engineering - 3.1.8-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources new file mode 100644 index 0000000..001d2d7 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (source-highlight-3.1.9.tar.gz) = d8e154e9a5d62c77807e4e5d36c0faed5ce2964291be5f8b83e2968a6de52229503689a4ca2109a717ae2632a14b63ec937ca0430c91684c72063f6bc0294195