From 3c8e7ed0630f4edad75cba89b5cedf761582523d Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 04:37:11 +0100 Subject: [PATCH] update to 0.8.1 [release 0.8.1-1mamba;Fri Apr 18 2014] --- README.md | 2 + libicns-0.7.1-png2icns-libpng14.patch | 28 +++++++ libicns.spec | 110 ++++++++++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 libicns-0.7.1-png2icns-libpng14.patch create mode 100644 libicns.spec diff --git a/README.md b/README.md index 9691a95..61c98ac 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # libicns +libicns is a library providing functionality for easily reading and writing MacOS X icns files. + diff --git a/libicns-0.7.1-png2icns-libpng14.patch b/libicns-0.7.1-png2icns-libpng14.patch new file mode 100644 index 0000000..d515437 --- /dev/null +++ b/libicns-0.7.1-png2icns-libpng14.patch @@ -0,0 +1,28 @@ +--- icnsutils/png2icns.c 2009-05-11 08:17:16.000000000 +0200 ++++ icnsutils/png2icns.c-gil 2010-09-21 20:57:32.000000000 +0200 +@@ -70,7 +70,11 @@ + switch (color_type) + { + case PNG_COLOR_TYPE_GRAY: +- png_set_gray_1_2_4_to_8(png_ptr); ++ #if PNG_LIBPNG_VER < 10400 ++ png_set_gray_1_2_4_to_8(png_ptr); ++ #else ++ png_set_expand_gray_1_2_4_to_8(png_ptr); ++ #endif + + if (bit_depth == 16) { + png_set_strip_16(png_ptr); +@@ -82,7 +86,11 @@ + break; + + case PNG_COLOR_TYPE_GRAY_ALPHA: +- png_set_gray_1_2_4_to_8(png_ptr); ++ #if PNG_LIBPNG_VER < 10400 ++ png_set_gray_1_2_4_to_8(png_ptr); ++ #else ++ png_set_expand_gray_1_2_4_to_8(png_ptr); ++ #endif + + if (bit_depth == 16) { + png_set_strip_16(png_ptr); diff --git a/libicns.spec b/libicns.spec new file mode 100644 index 0000000..537dbfb --- /dev/null +++ b/libicns.spec @@ -0,0 +1,110 @@ +Name: libicns +Version: 0.8.1 +Release: 1mamba +Summary: Library for manipulating MacOS X icns files +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://icns.sourceforge.net +Source: http://downloads.sourceforge.net/project/icns/libicns-%{version}.tar.gz +Patch0: libicns-0.7.1-png2icns-libpng14.patch +License: GPL, LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libjasper-devel +BuildRequires: libpng-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +libicns is a library providing functionality for easily reading and writing MacOS X icns files. + +%package devel +Group: Development/Libraries +Summary: Libraries and headers for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +libicns is a library providing functionality for easily reading and writing MacOS X icns files. +This package contains libraries and header files need for development. + +%package static +Group: Development/Libraries +Summary: Static libraries for %{name} +Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release} + +%description static +libicns is a library providing functionality for easily reading and writing MacOS X icns files. +This package contains static libraries need for development. + +%package utils +Group: Applications/Graphics +Summary: Utilities for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description utils +Software for library for manipulating MacOS X .icns icon format. +Currently provides support for reading and writing icns files in most sizes. + +Also provides utilities for manipulating files in the .icns format: +* icns2png - convert Mac OS icns files to png images +* png2icns - convert png images to Mac OS icns files +* icontainer2icns - extract icns files from icontainers + +%prep +%setup -q +#%patch0 + +%build +%configure +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_libdir}/libicns.so.* +%doc AUTHORS COPYING + +%files devel +%defattr(-,root,root) +%{_includedir}/icns.h +%{_libdir}/libicns.so +%{_libdir}/pkgconfig/libicns.pc +%doc src/apidocs.* +%doc ChangeLog README TODO + +%files static +%defattr(-,root,root) +%{_libdir}/libicns.*a + +%files utils +%defattr(-,root,root) +%{_bindir}/icns2png +%{_bindir}/icontainer2icns +%{_bindir}/png2icns +%{_mandir}/man1/icns2png.1* +%{_mandir}/man1/icontainer2icns.1* +%{_mandir}/man1/png2icns.1* +%doc README + +%changelog +* Fri Apr 18 2014 Silvan Calarco 0.8.1-1mamba +- update to 0.8.1 + +* Sun Dec 26 2010 gil 0.7.1-2mamba +- rebuilt devel + +* Tue Sep 21 2010 gil 0.7.1-1mamba +- package created by autospec