Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 720533055469af660e8e79a127999d1c626e95f7 Mon Sep 17 00:00:00 2001
From: John Bowler <jbowler@acm.org>
Date: Thu, 1 Feb 2024 05:06:45 -0800
Subject: [PATCH] Check for defined PNG_IGNORE_ADLER32

The check was missing round the first usage, it was there in the second.
---
pngcrush.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/pngcrush.c b/pngcrush.c
index 102bb39..43b1fe5 100644
--- a/pngcrush.c
+++ b/pngcrush.c
@@ -5524,8 +5524,10 @@ int main(int argc, char *argv[])
* they were already checked in the pngcrush_measure_idat
* function
*/
+# ifdef PNG_IGNORE_ADLER32
png_set_option(read_ptr, PNG_IGNORE_ADLER32,
PNG_OPTION_ON);
+# endif
png_set_crc_action(read_ptr, PNG_CRC_QUIET_USE,
PNG_CRC_QUIET_USE);
}
8 changes: 6 additions & 2 deletions SPECS-EXTENDED/pngcrush/pngcrush.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ Distribution: Azure Linux
Summary: Optimizer for PNG (Portable Network Graphics) files
Name: pngcrush
Version: 1.8.13
Release: 11%{?dist}
Release: 12%{?dist}
License: zlib
URL: http://pmt.sourceforge.net/%{name}/
Source0: http://downloads.sourceforge.net/pmt/%{name}-%{version}-nolib.tar.xz
# from Debian sid.
Source1: %{name}.sgml
Patch0: pngcrush-1.8.13-fix-undeclared-identifier.patch
BuildRequires: docbook-utils
BuildRequires: gcc
BuildRequires: libpng-devel
Expand All @@ -26,7 +27,7 @@ remove unwanted ancillary chunks, or to add certain chunks including gAMA,
tRNS, iCCP, and textual chunks.

%prep
%autosetup -n %{name}-%{version}-nolib
%autosetup -p1 -n %{name}-%{version}-nolib
cp %{SOURCE1} .

%build
Expand All @@ -46,6 +47,9 @@ docbook2man %{name}.sgml
%doc %{_mandir}/man1/%{name}.1.gz

%changelog
* Fri Dec 19 2025 Ratiranjan Behera <v-ratbehera@microsoft.com> - 1.8.13-12
- Added patch from Fedora to fix build.

* Mon Mar 06 2023 Muhammad Falak R Wani <mwani@microsoft.com> - 1.8.13-11
- Initial CBL-Mariner import from Fedora 36 (license: MIT).
- License Verified
Expand Down
Loading