import libpng12-1.2.57-5.el8

This commit is contained in:
CentOS Sources 2019-05-07 09:02:53 -04:00 committed by Andrew Lukoshko
commit 57266a2d6e
5 changed files with 219 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/libpng-1.2.57.tar.xz

1
.libpng12.metadata Normal file
View File

@ -0,0 +1 @@
1c42d3cee31d40dc5a2639ba605907d2895fc480 SOURCES/libpng-1.2.57.tar.xz

View File

@ -0,0 +1,35 @@
Use pkg-config to report libpng12 version and installation directories.
diff -Naur libpng-1.2.49.orig/scripts/libpng-config.in libpng-1.2.49/scripts/libpng-config.in
--- libpng-1.2.49.orig/scripts/libpng-config.in 2012-03-29 00:46:55.000000000 -0400
+++ libpng-1.2.49/scripts/libpng-config.in 2012-08-01 15:03:50.564507346 -0400
@@ -11,11 +11,11 @@
# Modeled after libxml-config.
-version="@PNGLIB_VERSION@"
-prefix="@prefix@"
-exec_prefix="@exec_prefix@"
-libdir="@libdir@"
-includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
+version=`pkg-config --modversion libpng12`
+prefix=`pkg-config --variable prefix libpng12`
+exec_prefix=`pkg-config --variable exec_prefix libpng12`
+libdir=`pkg-config --variable libdir libpng12`
+includedir=`pkg-config --variable includedir libpng12`
libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@"
I_opts="-I${includedir}"
diff -Naur libpng-1.2.49.orig/scripts/libpng.pc-configure.in libpng-1.2.49/scripts/libpng.pc-configure.in
--- libpng-1.2.49.orig/scripts/libpng.pc-configure.in 2012-03-29 00:46:55.000000000 -0400
+++ libpng-1.2.49/scripts/libpng.pc-configure.in 2012-08-01 15:04:37.817786337 -0400
@@ -3,7 +3,7 @@
libdir=@libdir@
includedir=@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
-Name: libpng
+Name: libpng12
Description: Loads and saves PNG files
Version: @PNGLIB_VERSION@
Libs: -L${libdir} -lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@

View File

@ -0,0 +1,42 @@
diff -Naur libpng-1.2.29.orig/configure.ac libpng-1.2.29/configure.ac
--- libpng-1.2.29.orig/configure.ac 2008-05-08 07:58:11.000000000 -0400
+++ libpng-1.2.29/configure.ac 2008-05-31 20:21:12.000000000 -0400
@@ -63,7 +63,8 @@
AC_MSG_CHECKING(
[if assembler code in pnggccrd.c can be compiled without PNG_NO_MMX_CODE])
AC_TRY_COMPILE(
- [#include "$srcdir/pnggccrd.c"],
+ [#define PNG_CONFIGURE_LIBPNG
+ #include "$srcdir/pnggccrd.c"],
[return 0;],
AC_MSG_RESULT(yes)
LIBPNG_NO_MMX="",
diff -Naur libpng-1.2.29.orig/pngconf.h libpng-1.2.29/pngconf.h
--- libpng-1.2.29.orig/pngconf.h 2008-05-08 07:58:03.000000000 -0400
+++ libpng-1.2.29/pngconf.h 2008-05-31 20:21:12.000000000 -0400
@@ -35,6 +35,25 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#else
+/* pngconf.h is part of the exported API. When a libpng-using application
+ includes us, PNG_CONFIGURE_LIBPNG is of course not defined as we do not have
+ libpng's config.h available in this case. This means that we do not have the
+ defines added to config.h and the commandline by libpng's ./configure .
+
+ For all defines from config.h not having them set is not a problem, however
+ ./configure also adds -DPNG_NO_ASSEMBLER_CODE to the CFLAGS when compiling
+ on a platform on which the MMX and SSE asm code in libpng is not supported.
+
+ We do need this define as this define is used to determine whether or not
+ to define PNG_ASSEMBLER_CODE_SUPPORTED and other assembler related defines
+ and prototypes. PNG_ASSEMBLER_CODE_SUPPORTED in turn is used by applications
+ (ImageMagick for example) to determine whether or not they can use the asm
+ functions. Thus we need to define PNG_NO_ASSEMBLER_CODE here on platforms
+ on which the MMX and SSE asm code in libpng is not supported: */
+#ifndef __i386__ /* change this if MMX/SSE become supported on x86_64! */
+#define PNG_NO_ASSEMBLER_CODE
+#endif
#endif
/*

140
SPECS/libpng12.spec Normal file
View File

@ -0,0 +1,140 @@
Summary: Old version of libpng, needed to run old binaries
Name: libpng12
Version: 1.2.57
Release: 5%{?dist}
License: zlib
URL: http://www.libpng.org/pub/png/
# Obsolete old temporary packaging of libpng 1.2
Obsoletes: libpng-compat <= 2:1.5.10
# Note: non-current tarballs get moved to the history/ subdirectory,
# so look there if you fail to retrieve the version you want
Source0: https://ftp-osl.osuosl.org/pub/libpng/src/libpng12/libpng-%{version}.tar.xz
Patch0: libpng12-multilib.patch
Patch1: libpng12-pngconf.patch
BuildRequires: pkgconfig
BuildRequires: zlib-devel
%description
The libpng12 package provides libpng 1.2, an older version of the libpng
library for manipulating PNG (Portable Network Graphics) image format files.
This version should be used only if you are unable to use the current
version of libpng.
%package devel
Summary: Development files for libpng 1.2
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: zlib-devel%{?_isa}
%description devel
The libpng12-devel package contains header files and documentation necessary
for developing programs using libpng12.
%prep
%setup -q -n libpng-%{version}
%patch0 -p1
%patch1 -p1
%build
%configure \
--disable-static \
--without-libpng-compat
make %{?_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
## unpackaged files
# We don't ship .la files.
rm -fv $RPM_BUILD_ROOT%{_libdir}/libpng*.la
# drop man5 files, because these are in the base libpng package,
# which we don't want to conflict with.
rm -fv $RPM_BUILD_ROOT%{_mandir}/man5/*
# omit that conflicts with base libpng-devel package
rm -fv $RPM_BUILD_ROOT%{_bindir}/libpng-config
rm -fv $RPM_BUILD_ROOT%{_includedir}/{png,pngconf}.h
rm -fv $RPM_BUILD_ROOT%{_libdir}/libpng.so
rm -fv $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libpng.pc
rm -fv $RPM_BUILD_ROOT%{_mandir}/man3/{libpng,libpngpf}.3*
%check
make check
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc libpng-%{version}.txt README TODO CHANGES
%{_libdir}/libpng12.so.0*
%files devel
#doc example.c
%{_bindir}/libpng12-config
%{_includedir}/libpng12/
%{_libdir}/libpng12.so
%{_libdir}/pkgconfig/libpng12.pc
%changelog
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.57-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.57-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.57-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Jun 06 2017 Nikola Forró <nforro@redhat.com> - 1.2.57-2
- Update source URL (#1459085)
* Tue Apr 04 2017 Nikola Forró <nforro@redhat.com> - 1.2.57-1
- New upstream release 1.2.57
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.56-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.56-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Dec 21 2015 Rex Dieter <rdieter@fedoraproject.org> 1.2.56-1
- 1.2.56 release, .spec cosmetics, add (minimalist) 'make check'
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.50-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.50-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.50-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Jan 28 2014 Petr Hracek <phracek@redhat.com> - 1.2.50-6
- Adding CVE-2013-6954 patch
* Sun Aug 18 2013 Rex Dieter <rdieter@fedoraproject.org> - 1.2.50-5
- devel: fix so we can drop Conflicts: libpng-devel
- drop libpng-compat stuff
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.50-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.50-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Aug 22 2012 Tom Lane <tgl@redhat.com> 1.2.50-2
- Remove unnecessary use of epoch
Related: #850628
* Fri Aug 3 2012 Tom Lane <tgl@redhat.com> 1.2.50-1
- Update to 1.2.50 (just on general principles)
- Add Obsoletes: libpng-compat
* Wed Aug 1 2012 Tom Lane <tgl@redhat.com> 1.2.49-1
- Created from libpng