diff --git a/libpng16.changes b/libpng16.changes index 0daf6d3..057ed46 100644 --- a/libpng16.changes +++ b/libpng16.changes @@ -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 diff --git a/rpm-macros.libpng-tools b/rpm-macros.libpng-tools index 3e4499a..65c1c46 100644 --- a/rpm-macros.libpng-tools +++ b/rpm-macros.libpng-tools @@ -1,41 +1,34 @@ -# macro: %png_fix_too_far_back path/to/name-of.png -# for given png, fixes 'IDAT: invalid distance too far back' +# macro: %png_fix path/to/name-of.png +# 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 \ - 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 \ fi \ - /usr/bin/png-fix-too-far-back "%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 \ + /usr/bin/pngfix %{-q: -qq} --suffix='.fixed' "%1" || mv "%1.fixed" "%1" \ %nil # -# macro: %png_fix_too_far_back dir +# macro: %png_fix_dir # 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 \ - 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 \ fi \ for png in `find "%1" -iname '*.png'`; do \ - # -v will be propagated \ - %png_fix_too_far_back $png \ + # -q will be propagated \ + %png_fix $png \ done \ %nil