forked from pool/libpng16
- Fix missing backslash
OBS-URL: https://build.opensuse.org/package/show/graphics/libpng16?expand=0&rev=148
This commit is contained in:
commit
c0be9ffafa
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
98
563.patch
Normal file
98
563.patch
Normal file
@ -0,0 +1,98 @@
|
||||
From ceed2a3cf6af420a0782e7f6147d5965b01b772a Mon Sep 17 00:00:00 2001
|
||||
From: John Bowler <jbowler@acm.org>
|
||||
Date: Thu, 30 May 2024 07:53:42 -0700
|
||||
Subject: [PATCH] SECURITY: disable build of filter_neon.S on arm
|
||||
|
||||
This fixes the bug https://github.com/pnggroup/libpng/issues/505
|
||||
"libpng does not support PAC/BTI on aarch64 targets" which arises
|
||||
because the build mechanisms (both cmake and configure) assemble
|
||||
arm/filter_neon.S even though it ends up completely empty. The empty
|
||||
file effectively poisons the so that the PAC/BTI support gets disabled.
|
||||
|
||||
The fix is minimal; it simply removes arm/filter_neon.S from the list of
|
||||
sources included in the 64-bit ARM builds build. Note that this was
|
||||
already done in cmake for MSVC - it's not clear whether this change was
|
||||
a partial fix for the same issue.
|
||||
|
||||
This version of the fix ONLY affects aarch64 (arm64) builds; 32-bit ARM
|
||||
systems can still invoke the assembler if required and, indeed, there
|
||||
should be no change whatsover to those builds.
|
||||
|
||||
The assembler code could not be used on 64-bit systems in any case so
|
||||
in practice there is no material change to 64-bit builds either.
|
||||
|
||||
TESTING: pull the changes then type "autoreconf" if using configure (not
|
||||
required for cmake).
|
||||
|
||||
TESTS: cmake has not been tested because cross-builds with cmake
|
||||
currently fail to find the zlib installation from the cmake system root
|
||||
path. The following has been tested with configure cross builds:
|
||||
|
||||
armv7-linux-gnueabi [no neon support]
|
||||
armv7a-linux-gnueabi [no neon support]
|
||||
armv7a-hardfloat-linux-gnueabi [neon support not enabled]
|
||||
armv7a-hardfloat-linux-gnueabi -mfpu=neon [uses intrinics]
|
||||
armv7a-hardfloat-linux-gnueabi -mfpu=neon
|
||||
-DPNG_ARM_NEON_IMPLEMENTATION=2 [uses assembler]
|
||||
aarch64-linux-gnu [uses intrinsics]
|
||||
aarch64-linux-gnu -DPNG_ARM_NEON_OPT=0 [neon support disabled]
|
||||
|
||||
Signed-off-by: John Bowler <jbowler@acm.org>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
Makefile.am | 6 ++++--
|
||||
configure.ac | 10 ++++++++++
|
||||
3 files changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 77e5398b6a..11bbe36d2a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -153,7 +153,7 @@ if(TARGET_ARCH MATCHES "^(ARM|arm|aarch)")
|
||||
arm/arm_init.c
|
||||
arm/filter_neon_intrinsics.c
|
||||
arm/palette_neon_intrinsics.c)
|
||||
- if(NOT MSVC)
|
||||
+ if(NOT MSVC AND NOT TARGET_ARCH MATCHES "^(ARM64|arm64|aarch64)")
|
||||
list(APPEND libpng_arm_sources arm/filter_neon.S)
|
||||
endif()
|
||||
if(PNG_ARM_NEON STREQUAL "on")
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 1f06c703a1..5cc27a4c8f 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -107,9 +107,11 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
|
||||
png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h pngusr.dfa
|
||||
|
||||
if PNG_ARM_NEON
|
||||
+if PNG_ARM_NEON_ASM
|
||||
+libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/filter_neon.S
|
||||
+endif
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\
|
||||
- arm/filter_neon.S arm/filter_neon_intrinsics.c \
|
||||
- arm/palette_neon_intrinsics.c
|
||||
+ arm/filter_neon_intrinsics.c arm/palette_neon_intrinsics.c
|
||||
endif
|
||||
|
||||
if PNG_MIPS_MSA
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2c6b3333c6..e3c1536f0c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -425,6 +425,16 @@ AM_CONDITIONAL([PNG_ARM_NEON],
|
||||
*) test "$enable_arm_neon" != '' ;;
|
||||
esac])
|
||||
|
||||
+# Add the assembler implementation source file. This only works on 32-bit
|
||||
+# ARM and causes problems even if empty on 64-bit ARM.
|
||||
+AM_CONDITIONAL([PNG_ARM_NEON_ASM],
|
||||
+ [test "$enable_arm_neon" != 'no' &&
|
||||
+ case "$host_cpu" in
|
||||
+ arm64*|aarch64*) false ;;
|
||||
+ arm*) true ;;
|
||||
+ *) test "$enable_arm_neon" != '' ;;
|
||||
+ esac])
|
||||
+
|
||||
# MIPS MSA
|
||||
# ========
|
||||
|
12
baselibs.conf
Normal file
12
baselibs.conf
Normal file
@ -0,0 +1,12 @@
|
||||
libpng16-16
|
||||
obsoletes "libpng-<targettype> < <version>"
|
||||
provides "libpng-<targettype> = <version>"
|
||||
libpng16-devel
|
||||
requires -libpng16-<targettype>
|
||||
requires "libpng16-16-<targettype> = <version>"
|
||||
libpng16-compat-devel
|
||||
requires -libpng16-compat-<targettype>
|
||||
requires "libpng16-devel-<targettype> = <version>"
|
||||
conflicts "libpng-devel-<targettype>"
|
||||
provides "libpng-devel-<targettype>"
|
||||
|
BIN
libpng-1.6.43.tar.xz
(Stored with Git LFS)
Normal file
BIN
libpng-1.6.43.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
1575
libpng16.changes
Normal file
1575
libpng16.changes
Normal file
File diff suppressed because it is too large
Load Diff
91
libpng16.keyring
Normal file
91
libpng16.keyring
Normal file
@ -0,0 +1,91 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v2.0.20 (GNU/Linux)
|
||||
|
||||
mQINBFGn+ogBEAD6cK4C1MRIOUPToIxBZA1mwkiUYTimGEhmgHFle9h20GQWuuJ3
|
||||
sU34ptoljsmgeWChuC1PRtYm1mb/nrIC98Osu1MKwj1QQbHgGa/oK57LBx05bVZr
|
||||
GI36tkZXi9VC4aiilJ08c1bVYDh0WKx9ohH7VKlNiDiS5g5Fsk8fe3hj+nCBbRN1
|
||||
6VZjcVhWwhYYygTnTu/4KxkjgbE2QUP1CsE8UbeubFcInlSFmXAyoc3hXLbe0NqI
|
||||
J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xRQ8WCOw31qFsAAuBtO2QPxj8KuUzOkMF5nTtyJravAOaSGkjMtBGlUbxS
|
||||
TSpIeiy8o1SOmj3Fd5fG8k8MlZ+LCzRoAjDREGgk9NZSCpA/kQB3lkv0RSYqgMB8
|
||||
nkcBOaCbXRBQ66iPg9KhkMwadUxLAK/i6jFir1HGzgjeSufk/8BJPzHWb5IQna4G
|
||||
VgGy5MP5iCup2WVyeEREw8p9IGZU+UAOdziD8OicCrMdkw24TqEKOCCREByiRgIf
|
||||
scWcJdpHlqFYCQhjKPXM79PWYCP600VFW/m1/gblHu3pB3n40NjMOC7Fi1gl96+q
|
||||
jbyUPEKA6rvduCBJHehOpTSTScWnA3U=
|
||||
=Rum9
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
162
libpng16.spec
Normal file
162
libpng16.spec
Normal file
@ -0,0 +1,162 @@
|
||||
#
|
||||
# spec file for package libpng16
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define debug_build 0
|
||||
%define asan_build 0
|
||||
%define major 1
|
||||
%define minor 6
|
||||
%define micro 43
|
||||
%define branch %{major}%{minor}
|
||||
%define libname libpng%{branch}-%{branch}
|
||||
%define debug_package_requires %{libname} = %{version}-%{release}
|
||||
Name: libpng16
|
||||
Version: %{major}.%{minor}.%{micro}
|
||||
Release: 0
|
||||
Summary: Library for the Portable Network Graphics Format (PNG)
|
||||
License: libpng-2.0
|
||||
URL: http://www.libpng.org/pub/png/libpng.html
|
||||
Source0: https://prdownloads.sourceforge.net/libpng/libpng-%{version}.tar.xz
|
||||
Source2: libpng16.keyring
|
||||
Source3: rpm-macros.libpng-tools
|
||||
Source4: baselibs.conf
|
||||
# PATCH-FIX-UPSTREAM - https://github.com/pnggroup/libpng/pull/563
|
||||
Patch1: 563.patch
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
%{?suse_build_hwcaps_libs}
|
||||
|
||||
%package -n %{libname}
|
||||
Summary: Library for the Portable Network Graphics Format (PNG)
|
||||
Provides: libpng = %{version}
|
||||
|
||||
%package devel
|
||||
Summary: Development tools for applications which will use libpng
|
||||
Requires: %{libname} = %{version}
|
||||
Requires: glibc-devel
|
||||
Requires: pkgconfig
|
||||
Requires: pkgconfig(zlib)
|
||||
Recommends: libpng%{branch}-compat-devel
|
||||
#
|
||||
|
||||
%package compat-devel
|
||||
Summary: Development tools for applications which will use libpng
|
||||
Requires: libpng%{branch}-devel = %{version}
|
||||
Conflicts: libpng-devel
|
||||
Provides: libpng-devel = %{version}
|
||||
Obsoletes: libpng-devel < 1.2.44
|
||||
|
||||
%package tools
|
||||
Summary: Tools for Manipulating PNG Images
|
||||
Conflicts: libpng-tools
|
||||
Provides: libpng-tools = %{version}
|
||||
|
||||
%description
|
||||
libpng is the official reference library for the Portable Network
|
||||
Graphics format (PNG).
|
||||
|
||||
%description -n %{libname}
|
||||
libpng is the official reference library for the Portable Network
|
||||
Graphics format (PNG).
|
||||
|
||||
%description devel
|
||||
The libpng%{branch}-devel package includes the header files, libraries,
|
||||
configuration files and development tools necessary for compiling and
|
||||
linking programs which will manipulate PNG files using libpng%{branch}.
|
||||
|
||||
libpng is the official reference library for the Portable Network
|
||||
Graphics (PNG) format.
|
||||
|
||||
%description compat-devel
|
||||
The libpng%{branch}-compat-devel package contains unversioned symlinks
|
||||
to the header files, libraries, configuration files and development
|
||||
tools necessary for compiling and linking programs that don't care
|
||||
about libpng version.
|
||||
|
||||
%description tools
|
||||
Package consists of low level tools for manipulating and fixing particular
|
||||
PNG files.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n libpng-%{version}
|
||||
|
||||
%build
|
||||
# PNG_SAFE_LIMITS_SUPPORTED: http://www.openwall.com/lists/oss-security/2015/01/10/1
|
||||
export CFLAGS="%{optflags} -O3 -DPNG_SAFE_LIMITS_SUPPORTED -DPNG_SKIP_SETJMP_CHECK $(getconf LFS_CFLAGS)"
|
||||
export LDFLAGS="-Wl,-z,relro,-z,now"
|
||||
%if %{debug_build}
|
||||
export CFLAGS="$CFLAGS -Og"
|
||||
%endif
|
||||
# autoreconf required by Patch1
|
||||
autoreconf -f
|
||||
%configure \
|
||||
--enable-hardware-optimizations=yes \
|
||||
%ifarch armv6l armv6hl
|
||||
--enable-arm-neon=no \
|
||||
%endif
|
||||
--disable-static
|
||||
%if %{asan_build}
|
||||
sed -i -e 's/^\(CFLAGS.*\)$/\1 -fsanitize=address/' \
|
||||
-e 's/\(^LIBS =.*\)/\1 -lasan/' Makefile
|
||||
%endif
|
||||
%make_build
|
||||
|
||||
%check
|
||||
%make_build -j1 check
|
||||
|
||||
%install
|
||||
%make_install
|
||||
find %{buildroot} -type f,l -name "*.la" -delete -print
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
||||
install -D -m644 %{SOURCE3} %{buildroot}%{_rpmmacrodir}/macros.libpng-tools
|
||||
%if %{debug_build} ||%{asan_build}
|
||||
install -m755 .libs/pngcp %{buildroot}/%{_bindir}
|
||||
%endif
|
||||
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%files -n %{libname}
|
||||
%{_libdir}/libpng%{branch}.so.*
|
||||
|
||||
%files devel
|
||||
%{_bindir}/libpng%{branch}-config
|
||||
%{_includedir}/libpng%{branch}
|
||||
%{_libdir}/libpng%{branch}.so
|
||||
%{_libdir}/pkgconfig/libpng%{branch}.pc
|
||||
%license LICENSE
|
||||
%doc CHANGES README TODO ANNOUNCE libpng-*.txt
|
||||
|
||||
%files compat-devel
|
||||
%{_bindir}/libpng-config
|
||||
%{_includedir}/*.h
|
||||
%{_libdir}/libpng.so
|
||||
%{_libdir}/pkgconfig/libpng.pc
|
||||
%{_mandir}/man3/libpng.3%{?ext_man}
|
||||
%{_mandir}/man3/libpngpf.3%{?ext_man}
|
||||
%{_mandir}/man5/png.5%{?ext_man}
|
||||
|
||||
%files tools
|
||||
%{_bindir}/png-fix-itxt
|
||||
%{_bindir}/pngfix
|
||||
%if %{debug_build} || %{asan_build}
|
||||
%{_bindir}/pngcp
|
||||
%endif
|
||||
%{_rpmmacrodir}/macros.libpng-tools
|
||||
|
||||
%changelog
|
35
rpm-macros.libpng-tools
Normal file
35
rpm-macros.libpng-tools
Normal file
@ -0,0 +1,35 @@
|
||||
# macro: %png_fix path/to/name-of.png
|
||||
# for given png, fixes 'IDAT: invalid distance too far back', etc.,
|
||||
# see pngfix --help
|
||||
#
|
||||
# -q do not output if macro fixed something or find unrecoverable error
|
||||
#
|
||||
# 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: path and name of png file." \
|
||||
exit 1 \
|
||||
fi \
|
||||
/usr/bin/pngfix %{-q: -qq} --suffix='.fixed' "%1" || true \
|
||||
mv "%1.fixed" "%1" \
|
||||
%nil
|
||||
#
|
||||
# macro: %png_fix_dir
|
||||
# for given directory, search *.png (recursively) and potentionaly
|
||||
# fix 'IDAT: invalid distance too far back', etc., see pngfix --help
|
||||
#
|
||||
# -q do not output if pngfix fixed something or find unrecoverable error
|
||||
#
|
||||
%png_fix_dir(q) \
|
||||
if test "x%1" == "x%%1"; then \
|
||||
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 \
|
||||
# -q will be propagated \
|
||||
%png_fix $png \
|
||||
done \
|
||||
%nil
|
||||
|
Loading…
Reference in New Issue
Block a user