Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36488bf88c | ||
|
|
5421eae066 | ||
|
|
81bc193b20 | ||
|
|
fe14acf4df | ||
|
|
4f24d78a5e | ||
|
|
432442d71c |
2 changed files with 99 additions and 27 deletions
91
15.patch
Normal file
91
15.patch
Normal file
File diff suppressed because one or more lines are too long
35
unifdef.spec
35
unifdef.spec
|
|
@ -1,9 +1,3 @@
|
|||
# The upstream Makefile installs unifdefall.sh as unifdefall, which makes
|
||||
# sense. Older versions of this package installed it as unifdefall.sh; for
|
||||
# compatibility on stable branches that had such older versions, we still
|
||||
# provide that path via a symlink.
|
||||
%bcond all_sh %[ %{defined fc42} || %{defined fc41} || %{defined el10} ]
|
||||
|
||||
Name: unifdef
|
||||
Version: 2.12
|
||||
Release: %autorelease
|
||||
|
|
@ -38,6 +32,13 @@ Source: https://dotat.at/prog/unifdef/unifdef-%{version}.tar.xz
|
|||
# https://github.com/fanf2/unifdef/pull/14
|
||||
Patch: %{forgeurl}/pull/14.patch
|
||||
|
||||
# Fix fgets(..., size=1)
|
||||
# https://github.com/fanf2/unifdef/pull/15
|
||||
#
|
||||
# Further discussion in https://github.com/fanf2/unifdef/pull/19 and
|
||||
# https://gcc.gnu.org/PR120205.
|
||||
Patch: %{forgeurl}/pull/15.patch
|
||||
|
||||
# Don't use C23 constexpr keyword
|
||||
# https://github.com/fanf2/unifdef/pull/19
|
||||
# Fixes compatibility with GCC 15, which defaults to C23
|
||||
|
|
@ -56,32 +57,15 @@ additional text that they delimit, while otherwise leaving the file alone.
|
|||
%autosetup -p1
|
||||
# Show that we do not use the sources in FreeBSD – even though this does not
|
||||
# simplify the License, since unifdef.1 is still BSD-3-Clause.
|
||||
rm -rv FreeBSD/
|
||||
|
||||
%if %{undefined fc41} && %{undefined el10} && %{undefined el9} && %{undefined el8}
|
||||
# Test regressions with GCC 15 / C23 default.
|
||||
# Reported upstream by email 2025-05-08.
|
||||
# Described in:
|
||||
# https://github.com/fanf2/unifdef/pull/19#issuecomment-2863148452
|
||||
for test in whitespace-1 whitespace-2
|
||||
do
|
||||
mv "tests/${test}.sh" "tests/${test}.sh.disabled"
|
||||
done
|
||||
%endif
|
||||
rm --recursive --verbose FreeBSD/
|
||||
|
||||
|
||||
%build
|
||||
# Implicit in Fedora and EPEL10+; still needed in EPEL8/9.
|
||||
%set_build_flags
|
||||
|
||||
%make_build
|
||||
|
||||
|
||||
%install
|
||||
%make_install prefix='%{_prefix}'
|
||||
%if %{with all_sh}
|
||||
ln -s unifdefall '%{buildroot}%{_bindir}/unifdefall.sh'
|
||||
%endif
|
||||
|
||||
|
||||
%check
|
||||
|
|
@ -100,9 +84,6 @@ PATH="%{buildroot}%{_bindir}:${PATH}" %make_build test
|
|||
|
||||
%{_bindir}/unifdef
|
||||
%{_bindir}/unifdefall
|
||||
%if %{with all_sh}
|
||||
%{_bindir}/unifdefall.sh
|
||||
%endif
|
||||
|
||||
%{_mandir}/man1/unifdef.1*
|
||||
%{_mandir}/man1/unifdefall.1*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue