public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/stb] epel9: Use various long options
@ 2026-09-10 18:08 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-09-10 18:08 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/stb
Branch : epel9
Commit : 53ec32b0078d59267fd9818431450f1e5d72ca79
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-09-10T19:06:01+01:00
Stats : +19/-15 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/stb/c/53ec32b0078d59267fd9818431450f1e5d72ca79?branch=epel9
Log:
Use various long options
---
diff --git a/stb.spec b/stb.spec
index cc3052e..1da27c4 100644
--- a/stb.spec
+++ b/stb.spec
@@ -725,14 +725,16 @@ Documentation for stb.
# When upstream says CPPFLAGS, they
# mean C++ flags, i.e. CXXFLAGS, not “C PreProcessor Flags” as is common in
# autoconf-influenced projects.
-sed -r -i \
- -e 's/([[:alpha:]]+FLAGS[[:blank:]]*)=/\1+=/' \
- -e 's/(\$\(CC\))(.*)-std=[^[:blank:]]+/\$\(CXX\)\2/' \
- -e 's/CPPFLAGS/CXXFLAGS/' tests/Makefile
+sed --regexp-extended --in-place \
+ --expression='s/([[:alpha:]]+FLAGS[[:blank:]]*)=/\1+=/' \
+ --expression='s/(\$\(CC\))(.*)-std=[^[:blank:]]+/\$\(CXX\)\2/' \
+ --expression='s/CPPFLAGS/CXXFLAGS/' \
+ tests/Makefile
# Add a dummy main(); how does this one work upstream?! Note that omitting
# parameter names is a C++-ism.
-echo 'int main(int, char *[]) { return 0; }' >> tests/test_cpp_compilation.cpp
+printf '%s\n' 'int main(int, char *[]) { return 0; }' \
+ >> tests/test_cpp_compilation.cpp
# Remove any pre-compiled Windows executables
find . -type f -name '*.exe' -print -delete
@@ -740,11 +742,12 @@ find . -type f -name '*.exe' -print -delete
# Remove some unused parts of the source tree that could contribute different
# (but acceptable) license terms if they were used—just to prove that we do not
# use them.
-rm -rvf tests/caveview
+rm --recursive --verbose tests/caveview
find deprecated -type f ! -name 'stb_image_resize.h' -print -delete
%if %{without stb_include}
-sed -r -i '/#include[[:blank:]]+"stb_include.h"/d' tests/test_c_compilation.c
+sed --regexp-extended --in-place \
+ '/#include[[:blank:]]+"stb_include.h"/d' tests/test_c_compilation.c
%endif
@@ -752,7 +755,7 @@ sed -r -i '/#include[[:blank:]]+"stb_include.h"/d' tests/test_c_compilation.c
# There is no compiled code to install, since all stb libraries are
# header-only. We do need to build the tests.
%set_build_flags
-%make_build -C tests
+%make_build --directory=tests
%install
@@ -768,13 +771,14 @@ sed -r -i '/#include[[:blank:]]+"stb_include.h"/d' tests/test_c_compilation.c
# as a symbolic link to the former. This means most projects can unbundle the
# library without having to make their own local symlinks or patch their
# sources.
-install -t '%{buildroot}%{_includedir}/stb' -p -m 0644 -D \
+install -D --preserve-timestamps --mode=0644 \
+ --target='%{buildroot}%{_includedir}/stb' \
stb_*.h stb_*.c deprecated/stb_image_resize.h
%if %{without stb_include}
-rm -vf '%{buildroot}%{_includedir}/stb/stb_include.h'
+rm '%{buildroot}%{_includedir}/stb/stb_include.h'
%endif
pushd '%{buildroot}%{_includedir}'
-ln -sv stb/stb_*.? .
+ln --symbolic --verbose stb/stb_*.? .
popd
@@ -786,8 +790,8 @@ popd
# do with them.
# We can run image_write_test and confirm the output images are valid.
-rm -vf output
-mkdir -p output
+rm --verbose --force output
+mkdir output
./tests/image_write_test
# We assume that if ImageMagick can read the output images, then they are valid.
for img in wr6x5_flip.bmp wr6x5_flip.jpg wr6x5_flip.tga wr6x5_regular.hdr \
@@ -803,8 +807,8 @@ while read -r version header
do
%{?!with_stb_include:if [ "${header}" = 'stb_include.h' ]; then continue; fi}
# The minor version may be zero-padded in the header.
- grep -E "$(
- echo "${version}" |
+ grep --extended-regexp "$(
+ printf '%s\n' "${version}" |
sed -r 's/([[:digit:]]+)\.([[:digit:]]+)/\\bv\1\\.0*\2\\b/'
)" "%{buildroot}%{_includedir}/${header}" >/dev/null
done <<'EOF'
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-10 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 18:08 [rpms/stb] epel9: Use various long options Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox