X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=libpng.spec;h=3f4db9298b72d90a9cb01de4f6128d039eba2cb3;hb=ac709a0a57f9666af4fddebbe7f2031fafe3f3eb;hp=7eacc45e11d6696f771fe011ed332c189ca17abb;hpb=785c54df32f907053efa4250bb3b2ab950f1a528;p=packages%2Flibpng.git diff --git a/libpng.spec b/libpng.spec index 7eacc45..3f4db92 100644 --- a/libpng.spec +++ b/libpng.spec @@ -1,4 +1,10 @@ -%bcond_without tests +# NOTE: there is intel SSE optimization available but with no runtime detection; +# it's enabled based on compiler flags (-msse*, either explicit or implied by -march=) +# +# Conditional build: +%bcond_without tests # don't perform "make check" +%bcond_without default_libpng # don't use this libpng as default system libpng +# Summary: PNG library Summary(de.UTF-8): PNG-Library Summary(es.UTF-8): Biblioteca PNG @@ -7,21 +13,22 @@ Summary(pl.UTF-8): Biblioteka PNG Summary(pt_BR.UTF-8): Biblioteca PNG Summary(tr.UTF-8): PNG kitaplığı Name: libpng -Version: 1.4.2 -Release: 1 +Version: 1.6.37 +Release: 2 Epoch: 2 License: distributable Group: Libraries Source0: http://downloads.sourceforge.net/libpng/%{name}-%{version}.tar.xz -# Source0-md5: d22ef5878842d918d6d110c0e7cc3afc -Patch0: %{name}-pngminus.patch -# http://littlesvr.ca/apng/diff/%{name}-%{version}-apng.patch | dos2unix -Patch1: %{name}-apng.patch +# Source0-md5: 015e8e15db1eecde5f2eb9eb5b6e59e9 +Patch0: http://downloads.sourceforge.net/libpng-apng/%{name}-%{version}-apng.patch.gz +# Patch0-md5: f02073fd96816b184c79b297775e37dc +Patch1: %{name}-pngminus.patch +Patch2: %{name}-drop-Llibdir.patch URL: http://www.libpng.org/pub/png/libpng.html BuildRequires: rpmbuild(macros) >= 1.213 BuildRequires: tar >= 1:1.22 BuildRequires: xz >= 1:4.999.7 -BuildRequires: zlib-devel +BuildRequires: zlib-devel >= 1.2.9 Provides: libpng(APNG) = 0.10 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -138,21 +145,31 @@ from PNM files. Narzędzia do konwersji plików PNG z lub do plików PNM. %prep -%setup -q -c -T -xzcat -dc %{SOURCE0} | tar xf - -C .. +%setup -q %patch0 -p1 -%patch1 -p0 +%patch1 -p1 +%patch2 -p1 %build -%configure +%configure \ +%ifarch %{arm} aarch64 + --enable-arm-neon=check \ +%endif +%ifarch mipsel mips64el + --enable-mips-msa=check \ +%endif +%ifarch ppc ppc64 + --enable-powerpc-vsx=check +%endif + %{__make} -%{__make} -C contrib/pngminus -f makefile.std \ +%{__make} -C contrib/pngminus \ LIBPATH=%{_libdir} \ CC="%{__cc}" \ OPT_FLAGS="%{rpmcppflags} %{rpmcflags}" -%{?with_tests:%{__make} check} +%{?with_tests:%{__make} -j1 check} %install rm -rf $RPM_BUILD_ROOT @@ -164,6 +181,14 @@ install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} install contrib/pngminus/{png2pnm,pnm2png} $RPM_BUILD_ROOT%{_bindir} install example.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} +%if %{without default_libpng} +%{__rm} $RPM_BUILD_ROOT%{_bindir}/{libpng-config,pn?2pn?} \ + $RPM_BUILD_ROOT%{_libdir}/libpng.{so,la,a} \ + $RPM_BUILD_ROOT%{_includedir}/png*.h \ + $RPM_BUILD_ROOT%{_pkgconfigdir}/libpng.pc \ + $RPM_BUILD_ROOT%{_mandir}/man[35]/*png* +%endif + %clean rm -rf $RPM_BUILD_ROOT @@ -173,33 +198,41 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc ANNOUNCE CHANGES LICENSE README TODO -%attr(755,root,root) %{_libdir}/libpng14.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libpng14.so.14 +%attr(755,root,root) %{_libdir}/libpng16.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libpng16.so.16 %files devel %defattr(644,root,root,755) -%doc libpng-%{version}.txt -%attr(755,root,root) %{_bindir}/libpng14-config +%doc libpng-manual.txt +%attr(755,root,root) %{_bindir}/libpng16-config +%attr(755,root,root) %{_libdir}/libpng16.so +%{_libdir}/libpng16.la +%{_includedir}/libpng16 +%{_pkgconfigdir}/libpng16.pc +%{_examplesdir}/%{name}-%{version} +%if %{with default_libpng} %attr(755,root,root) %{_bindir}/libpng-config -%attr(755,root,root) %{_libdir}/libpng14.so %attr(755,root,root) %{_libdir}/libpng.so -%{_libdir}/libpng14.la %{_libdir}/libpng.la -%{_pkgconfigdir}/libpng14.pc %{_pkgconfigdir}/libpng.pc -%{_includedir}/libpng14 %{_includedir}/png*.h %{_mandir}/man3/libpng.3* %{_mandir}/man3/libpngpf.3* %{_mandir}/man5/png.5* -%{_examplesdir}/%{name}-%{version} +%endif %files static %defattr(644,root,root,755) -%{_libdir}/libpng14.a +%{_libdir}/libpng16.a +%if %{with default_libpng} %{_libdir}/libpng.a +%endif +%if %{with default_libpng} %files progs %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/png2pnm +%attr(755,root,root) %{_bindir}/pngfix +%attr(755,root,root) %{_bindir}/png-fix-itxt %attr(755,root,root) %{_bindir}/pnm2png +%endif