- png-fix-too-far-back was actually renamed to pngfix. Adjusted rpm
macro names accordingly, %png_fix and %png_fix_dir. OBS-URL: https://build.opensuse.org/package/show/graphics/libpng16?expand=0&rev=33
This commit is contained in:
parent
5b397eb2af
commit
f73866b052
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 8 15:19:27 UTC 2013 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- png-fix-too-far-back was actually renamed to pngfix. Adjusted rpm
|
||||||
|
macro names accordingly, %png_fix and %png_fix_dir.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Aug 6 08:53:22 UTC 2013 - pgajdos@suse.com
|
Tue Aug 6 08:53:22 UTC 2013 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -1,41 +1,34 @@
|
|||||||
# macro: %png_fix_too_far_back path/to/name-of.png
|
# macro: %png_fix path/to/name-of.png
|
||||||
# for given png, fixes 'IDAT: invalid distance too far back'
|
# for given png, fixes 'IDAT: invalid distance too far back', etc.,
|
||||||
|
# see pngfix --help
|
||||||
#
|
#
|
||||||
# -v output if macro fixed something or find unrecoverable error
|
# -q do not output if macro fixed something or find unrecoverable error
|
||||||
#
|
#
|
||||||
%png_fix_too_far_back(v) \
|
# this macro fails only if there is an unrecoverable error in the png
|
||||||
|
# -- pngfix returns nonzero and $png.fixed doesn't exist; run pngfix
|
||||||
|
# on that file, see return code and compare with pngfix --help output
|
||||||
|
%png_fix(q) \
|
||||||
if test "x%1" == "x%%1"; then \
|
if test "x%1" == "x%%1"; then \
|
||||||
echo "Missing argument in call to %%png_fix_too_far_back: path and name of png file." \
|
echo "Missing argument in call to %%png_fix: path and name of png file." \
|
||||||
exit 1 \
|
exit 1 \
|
||||||
fi \
|
fi \
|
||||||
/usr/bin/png-fix-too-far-back "%1" \
|
/usr/bin/pngfix %{-q: -qq} --suffix='.fixed' "%1" || mv "%1.fixed" "%1" \
|
||||||
case $? in \
|
|
||||||
0) # no need to fix \
|
|
||||||
;; \
|
|
||||||
1) /usr/bin/png-fix-too-far-back -i "%1" \
|
|
||||||
%{-v: echo "fixed: %1" } \
|
|
||||||
;; \
|
|
||||||
2) %{-v: echo "unrecoverable error: %1" } \
|
|
||||||
;; \
|
|
||||||
3) echo "%1 not found" \
|
|
||||||
;; \
|
|
||||||
esac \
|
|
||||||
%nil
|
%nil
|
||||||
#
|
#
|
||||||
# macro: %png_fix_too_far_back dir
|
# macro: %png_fix_dir
|
||||||
# for given directory, search *.png (recursively) and potentionaly
|
# for given directory, search *.png (recursively) and potentionaly
|
||||||
# fix 'IDAT: invalid distance too far back'
|
# fix 'IDAT: invalid distance too far back', etc., see pngfix --help
|
||||||
#
|
#
|
||||||
# -v output if macro fixed something or find unrecoverable error
|
# -q do not output if pngfix fixed something or find unrecoverable error
|
||||||
#
|
#
|
||||||
%png_fix_too_far_back_dir(v) \
|
%png_fix_dir(q) \
|
||||||
if test "x%1" == "x%%1"; then \
|
if test "x%1" == "x%%1"; then \
|
||||||
echo "Missing argument in call to %%png_fix_too_far_back_dir: dir where to search png files." \
|
echo "Missing argument in call to %%png_fix_dir: dir where to search png files." \
|
||||||
exit 1 \
|
exit 1 \
|
||||||
fi \
|
fi \
|
||||||
for png in `find "%1" -iname '*.png'`; do \
|
for png in `find "%1" -iname '*.png'`; do \
|
||||||
# -v will be propagated \
|
# -q will be propagated \
|
||||||
%png_fix_too_far_back $png \
|
%png_fix $png \
|
||||||
done \
|
done \
|
||||||
%nil
|
%nil
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user