===================================================================
--- pngread.c
+++ pngread.c
-@@ -423,6 +423,11 @@
+@@ -292,6 +292,11 @@
#ifdef PNG_READ_zTXt_SUPPORTED
- PNG_CONST PNG_zTXt;
+ PNG_zTXt;
#endif
+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_acTL;
-+ PNG_CONST PNG_fcTL;
-+ PNG_CONST PNG_fdAT;
++ PNG_acTL;
++ PNG_fcTL;
++ PNG_fdAT;
+#endif
- #endif /* PNG_USE_LOCAL_ARRAYS */
png_uint_32 length = png_read_chunk_header(png_ptr);
PNG_CONST png_bytep chunk_name = png_ptr->chunk_name;
-@@ -467,6 +472,9 @@
+
+@@ -335,6 +340,9 @@
!(png_ptr->mode & PNG_HAVE_PLTE))
png_error(png_ptr, "Missing PLTE before IDAT");
png_ptr->idat_size = length;
png_ptr->mode |= PNG_HAVE_IDAT;
break;
-@@ -539,12 +547,97 @@
+@@ -407,12 +415,95 @@
else if (!png_memcmp(chunk_name, png_iTXt, 4))
png_handle_iTXt(png_ptr, info_ptr, length);
#endif
+ have_chunk_after_DAT = 0;
+ for (;;)
+ {
-+#ifdef PNG_USE_LOCAL_ARRAYS
+ PNG_IDAT;
+ PNG_fdAT;
+ PNG_fcTL;
-+#endif
+ png_byte chunk_length[4];
+ png_uint_32 length;
+
/* Optional call to update the users info_ptr structure */
void PNGAPI
png_read_update_info(png_structp png_ptr, png_infop info_ptr)
-@@ -584,6 +677,10 @@
+@@ -453,6 +544,10 @@
png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
{
- PNG_CONST PNG_IDAT;
+ PNG_IDAT;
+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_fdAT;
-+ PNG_CONST PNG_IEND;
++ PNG_fdAT;
++ PNG_IEND;
+#endif
PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55,
0xff};
PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
-@@ -716,13 +813,39 @@
+@@ -585,13 +680,39 @@
{
if (!(png_ptr->zstream.avail_in))
{
}
png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size;
png_ptr->zstream.next_in = png_ptr->zbuf;
-@@ -740,6 +863,9 @@
- png_error(png_ptr, "Extra compressed data");
+@@ -609,6 +730,9 @@
+ png_benign_error(png_ptr, "Extra compressed data");
png_ptr->mode |= PNG_AFTER_IDAT;
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
+#ifdef PNG_READ_APNG_SUPPORTED
break;
}
if (ret != Z_OK)
-@@ -997,6 +1123,11 @@
+@@ -864,6 +988,11 @@
#ifdef PNG_READ_zTXt_SUPPORTED
- PNG_CONST PNG_zTXt;
+ PNG_zTXt;
#endif
+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_acTL;
-+ PNG_CONST PNG_fcTL;
-+ PNG_CONST PNG_fdAT;
++ PNG_acTL;
++ PNG_fcTL;
++ PNG_fdAT;
+#endif
- #endif /* PNG_USE_LOCAL_ARRAYS */
png_uint_32 length = png_read_chunk_header(png_ptr);
PNG_CONST png_bytep chunk_name = png_ptr->chunk_name;
-@@ -1097,6 +1228,14 @@
+
+@@ -963,6 +1092,14 @@
else if (!png_memcmp(chunk_name, png_iTXt, 4))
png_handle_iTXt(png_ptr, info_ptr, length);
#endif
+ width != NULL && height != NULL &&
+ x_offset != NULL && x_offset != NULL &&
+ delay_num != NULL && delay_den != NULL &&
-+ dispose_op != NULL && blend_op != NULL)
++ dispose_op != NULL && blend_op != NULL)
+ {
+ *width = info_ptr->next_frame_width;
+ *height = info_ptr->next_frame_height;
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
png_uint_32 PNGAPI
png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
-Index: png.c
-===================================================================
---- png.c
-+++ png.c
-@@ -56,6 +56,11 @@
- PNG_tIME;
- PNG_tRNS;
- PNG_zTXt;
-+#ifdef PNG_APNG_SUPPORTED
-+PNG_acTL;
-+PNG_fcTL;
-+PNG_fdAT;
-+#endif
-
- #ifdef PNG_READ_SUPPORTED
- /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
Index: png.h
===================================================================
--- png.h
+++ png.h
-@@ -1029,6 +1029,19 @@
+@@ -861,6 +861,19 @@
png_fixed_point int_y_blue PNG_DEPSTRUCT;
#endif
} png_info;
typedef png_info FAR * png_infop;
-@@ -1130,6 +1143,10 @@
+@@ -958,6 +971,10 @@
#define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
#define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
#define PNG_INFO_IDAT 0x8000L /* ESR, 1.0.6 */
/* This is used for the transformation routines, as some of them
* change these values for the row. It also should enable using
-@@ -1170,6 +1187,10 @@
+@@ -998,6 +1015,10 @@
typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));
typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
png_uint_32, int));
#endif
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-@@ -1506,6 +1527,39 @@
- png_uint_32 user_height_max PNG_DEPSTRUCT;
+@@ -1320,6 +1341,39 @@
+ png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT;
#endif
+#ifdef PNG_APNG_SUPPORTED
/* New member added in libpng-1.0.25 and 1.2.17 */
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
/* Storage for unknown chunk that the library doesn't recognize. */
-@@ -1840,6 +1894,18 @@
+@@ -1648,6 +1702,18 @@
extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
png_bytepp image));
+extern PNG_EXPORT (void,png_write_frame_head) PNGARG((png_structp png_ptr,
+ png_infop png_info, png_bytepp row_pointers,
+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
++ png_uint_32 x_offset, png_uint_32 y_offset,
+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
+ png_byte blend_op));
+
+extern PNG_EXPORT (void,png_write_frame_tail) PNGARG((png_structp png_ptr,
+ png_infop png_info));
+#endif
-+
- /* Writes the end of the PNG file. */
++
+ /* Write the end of the PNG file. */
extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
png_infop info_ptr));
-@@ -2093,6 +2159,11 @@
+@@ -1891,6 +1957,11 @@
png_voidp progressive_ptr,
png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
png_progressive_end_ptr end_fn));
/* Returns the user pointer associated with the push read functions */
extern PNG_EXPORT(png_voidp,png_get_progressive_ptr)
-@@ -2533,6 +2604,59 @@
+@@ -2317,6 +2388,59 @@
#endif
#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
/* Provide a list of chunks and how they are to be handled, if the built-in
handling or default unknown chunk handling is not desired. Any chunks not
-@@ -2897,6 +3021,10 @@
+Index: pngpriv.h
+===================================================================
+--- pngpriv.h
++++ pngpriv.h
+@@ -98,6 +98,10 @@
#define PNG_BACKGROUND_IS_GRAY 0x800
#define PNG_HAVE_PNG_SIGNATURE 0x1000
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
+#endif
/* Flags for the transformations the PNG library does on the image data */
- #define PNG_BGR 0x0001
-@@ -3039,6 +3167,11 @@
- #define PNG_tIME png_byte png_tIME[5] = {116, 73, 77, 69, '\0'}
- #define PNG_tRNS png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'}
- #define PNG_zTXt png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'}
+ #define PNG_BGR 0x0001
+@@ -231,6 +235,11 @@
+ #define PNG_tIME PNG_CONST png_byte png_tIME[5] = {116, 73, 77, 69, '\0'}
+ #define PNG_tRNS PNG_CONST png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'}
+ #define PNG_zTXt PNG_CONST png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'}
+#ifdef PNG_APNG_SUPPORTED
-+#define PNG_acTL png_byte png_acTL[5] = { 97, 99, 84, 76, '\0'}
-+#define PNG_fcTL png_byte png_fcTL[5] = {102, 99, 84, 76, '\0'}
-+#define PNG_fdAT png_byte png_fdAT[5] = {102, 100, 65, 84, '\0'}
++#define PNG_acTL PNG_CONST png_byte png_acTL[5] = { 97, 99, 84, 76, '\0'}
++#define PNG_fcTL PNG_CONST png_byte png_fcTL[5] = {102, 99, 84, 76, '\0'}
++#define PNG_fdAT PNG_CONST png_byte png_fdAT[5] = {102, 100, 65, 84, '\0'}
+#endif
- #ifdef PNG_USE_GLOBAL_ARRAYS
- PNG_EXPORT_VAR (png_byte FARDATA) png_IHDR[5];
-@@ -3062,6 +3195,11 @@
- PNG_EXPORT_VAR (png_byte FARDATA) png_tIME[5];
- PNG_EXPORT_VAR (png_byte FARDATA) png_tRNS[5];
- PNG_EXPORT_VAR (png_byte FARDATA) png_zTXt[5];
-+#ifdef PNG_APNG_SUPPORTED
-+PNG_EXPORT_VAR (png_byte FARDATA) png_acTL[5];
-+PNG_EXPORT_VAR (png_byte FARDATA) png_fcTL[5];
-+PNG_EXPORT_VAR (png_byte FARDATA) png_fdAT[5];
-+#endif
- #endif /* PNG_USE_GLOBAL_ARRAYS */
- #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-@@ -3344,6 +3482,17 @@
+ /* Inhibit C++ name-mangling for libpng functions but not for system calls. */
+@@ -468,6 +477,17 @@
#endif
#endif
+#endif
+
/* Called when finished processing a row of data */
- PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;
+ PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr));
-@@ -3396,6 +3545,20 @@
+@@ -520,6 +540,20 @@
PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
- png_infop info_ptr)) PNG_PRIVATE;
+ png_infop info_ptr));
+#ifdef PNG_READ_APNG_SUPPORTED
+/* Private, reset some things to become ready for reading next frame */
/* These are the functions that do the transformations */
#ifdef PNG_READ_FILLER_SUPPORTED
PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
-@@ -3619,6 +3782,18 @@
- png_uint_32 length)) PNG_PRIVATE;
+@@ -735,6 +769,18 @@
+ png_uint_32 length));
#endif
+#ifdef PNG_READ_APNG_SUPPORTED
+#endif
+
PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;
+ png_infop info_ptr, png_uint_32 length));
Index: pngwrite.c
===================================================================
/* See if user wants us to write information chunks */
if (info_ptr != NULL)
-@@ -1582,4 +1590,39 @@
+@@ -1451,4 +1459,39 @@
params = params;
}
#endif
===================================================================
--- pngconf.h
+++ pngconf.h
-@@ -944,6 +944,10 @@
- # define PNG_NO_READ_tEXt
- # define PNG_NO_READ_zTXt
+@@ -845,6 +845,10 @@
+ # define PNG_READ_tRNS_SUPPORTED
+ # define PNG_tRNS_SUPPORTED
#endif
+#ifndef PNG_NO_READ_APNG
+# define PNG_READ_APNG_SUPPORTED
+# define PNG_APNG_SUPPORTED
+#endif
- #ifndef PNG_NO_READ_bKGD
- # define PNG_READ_bKGD_SUPPORTED
- # define PNG_bKGD_SUPPORTED
-@@ -1170,6 +1174,14 @@
+ #ifndef PNG_NO_READ_zTXt
+ # define PNG_READ_zTXt_SUPPORTED
+ # define PNG_zTXt_SUPPORTED
+@@ -1002,6 +1006,14 @@
# define PNG_TEXT_SUPPORTED
# endif
#endif
===================================================================
--- pngpread.c
+++ pngpread.c
-@@ -206,6 +206,11 @@
+@@ -205,6 +205,11 @@
#ifdef PNG_READ_zTXt_SUPPORTED
- PNG_CONST PNG_zTXt;
+ PNG_zTXt;
#endif
+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_acTL;
-+ PNG_CONST PNG_fcTL;
-+ PNG_CONST PNG_fdAT;
++ PNG_acTL;
++ PNG_fcTL;
++ PNG_fdAT;
+#endif
- #endif /* PNG_USE_LOCAL_ARRAYS */
/* First we make sure we have enough data for the 4 byte chunk name
-@@ -232,6 +237,103 @@
+ * and the 4 byte chunk length before proceeding with decoding the
+@@ -230,6 +235,103 @@
png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
}
if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
if (png_ptr->mode & PNG_AFTER_IDAT)
png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
-@@ -327,6 +429,9 @@
- png_error(png_ptr, "Too many IDAT's found");
+@@ -325,6 +427,9 @@
+ png_benign_error(png_ptr, "Too many IDATs found");
}
+#ifdef PNG_READ_APNG_SUPPORTED
png_ptr->idat_size = png_ptr->push_length;
png_ptr->mode |= PNG_HAVE_IDAT;
png_ptr->process_mode = PNG_READ_IDAT_MODE;
-@@ -557,6 +662,38 @@
+@@ -555,6 +660,38 @@
}
#endif
else
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-@@ -731,13 +868,17 @@
+@@ -729,11 +866,15 @@
png_push_read_IDAT(png_structp png_ptr)
{
- #ifdef PNG_USE_LOCAL_ARRAYS
-- PNG_CONST PNG_IDAT;
-+ PNG_IDAT;
+ PNG_IDAT;
+#ifdef PNG_READ_APNG_SUPPORTED
+ PNG_fdAT;
+ PNG_IEND;
+#endif
- #endif
if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER))
{
png_byte chunk_length[4];
{
png_push_save_buffer(png_ptr);
return;
-@@ -749,15 +890,62 @@
+@@ -745,15 +886,62 @@
png_crc_read(png_ptr, png_ptr->chunk_name, 4);
png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
- if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_memcmp(png_ptr->chunk_name, (png_bytep)png_fdAT, 4)
++ if (png_memcmp(png_ptr->chunk_name, png_fdAT, 4)
+ && png_ptr->num_frames_read > 0)
+ {
+ if (png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)
}
if (png_ptr->idat_size && png_ptr->save_buffer_size)
{
-@@ -1719,6 +1907,17 @@
+@@ -1710,6 +1898,17 @@
png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer);
}
===================================================================
--- pngset.c
+++ pngset.c
-@@ -266,6 +266,11 @@
- info_ptr->rowbytes = (png_size_t)0;
+@@ -260,6 +260,11 @@
+ info_ptr->rowbytes = 0;
else
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
+
}
#ifdef PNG_oFFs_SUPPORTED
-@@ -960,6 +965,142 @@
+@@ -932,6 +937,142 @@
}
#endif /* PNG_sPLT_SUPPORTED */
+ png_error(png_ptr, "invalid y_offset in fcTL (> 2^31-1)");
+
+ if (dispose_op != PNG_DISPOSE_OP_NONE &&
-+ dispose_op != PNG_DISPOSE_OP_BACKGROUND &&
-+ dispose_op != PNG_DISPOSE_OP_PREVIOUS)
++ dispose_op != PNG_DISPOSE_OP_BACKGROUND &&
++ dispose_op != PNG_DISPOSE_OP_PREVIOUS)
+ png_error(png_ptr, "invalid dispose_op in fcTL");
+
+ if (blend_op != PNG_BLEND_OP_SOURCE &&
-+ blend_op != PNG_BLEND_OP_OVER)
++ blend_op != PNG_BLEND_OP_OVER)
+ png_error(png_ptr, "invalid blend_op in fcTL");
+}
+
+}
+#endif /* PNG_APNG_SUPPORTED */
+
- #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+ #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
void PNGAPI
png_set_unknown_chunks(png_structp png_ptr,
Index: pngrutil.c
===================================================================
--- pngrutil.c
+++ pngrutil.c
-@@ -425,6 +425,11 @@
+@@ -423,6 +423,11 @@
filter_type = buf[11];
interlace_type = buf[12];
/* Set internal variables */
png_ptr->width = width;
png_ptr->height = height;
-@@ -2227,6 +2232,168 @@
+@@ -2294,6 +2299,168 @@
}
#endif
/* This function is called when we haven't found a handler for a
chunk. If there isn't a problem with the chunk itself (ie bad
chunk name, CRC, or a critical chunk), the chunk is silently ignored
-@@ -3240,4 +3407,84 @@
+@@ -3333,4 +3500,82 @@
png_ptr->flags |= PNG_FLAG_ROW_INIT;
}
+ png_ptr->height = info_ptr->next_frame_height;
+ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->width);
+ if (png_ptr->prev_row)
-+ png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
++ png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
+}
+
+/* same as png_read_reset() but for the progressive reader */
+void /* PRIVATE */
+png_progressive_read_reset(png_structp png_ptr)
+{
-+#ifdef PNG_USE_LOCAL_ARRAYS
+ /* start of interlace block */
+ const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
+
+
+ /* offset to next interlace block in the y direction */
+ const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
-+#endif
+ png_uint_32 row_bytes;
+
+ if (png_ptr->interlaced)
===================================================================
--- pngwutil.c
+++ pngwutil.c
-@@ -515,6 +515,11 @@
+@@ -538,6 +538,11 @@
/* Write the chunk */
png_write_chunk(png_ptr, (png_bytep)png_IHDR, buf, (png_size_t)13);
/* Initialize zlib with PNG info */
png_ptr->zstream.zalloc = png_zalloc;
png_ptr->zstream.zfree = png_zfree;
-@@ -638,6 +643,9 @@
+@@ -658,6 +663,9 @@
+ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
{
- #ifdef PNG_USE_LOCAL_ARRAYS
PNG_IDAT;
+#ifdef PNG_WRITE_APNG_SUPPORTED
+ PNG_fdAT;
+#endif
- #endif
png_debug(1, "in png_write_IDAT");
-@@ -683,7 +691,28 @@
+
+@@ -702,7 +710,28 @@
"Invalid zlib compression method or flags in IDAT");
}
png_ptr->mode |= PNG_HAVE_IDAT;
}
-@@ -1750,6 +1779,70 @@
+@@ -1709,6 +1738,66 @@
}
#endif
+png_write_acTL(png_structp png_ptr,
+ png_uint_32 num_frames, png_uint_32 num_plays)
+{
-+#ifdef PNG_USE_LOCAL_ARRAYS
+ PNG_acTL;
-+#endif
+ png_byte data[16];
+
+ png_debug(1, "in png_write_acTL");
+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
+ png_byte blend_op)
+{
-+#ifdef PNG_USE_LOCAL_ARRAYS
+ PNG_fcTL;
-+#endif
+ png_byte data[26];
+
+ png_debug(1, "in png_write_fcTL");
/* Initializes the row writing capability of libpng */
void /* PRIVATE */
png_write_start_row(png_structp png_ptr)
-@@ -2155,8 +2248,8 @@
+@@ -2110,8 +2199,8 @@
#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS)
{
}
#endif
-@@ -2825,4 +2918,39 @@
+@@ -2780,4 +2869,39 @@
}
#endif
}
===================================================================
--- pngrtran.c
+++ pngrtran.c
-@@ -1346,7 +1346,7 @@
+@@ -1320,7 +1320,7 @@
* pixels. This check added to libpng-1.2.19
*/
#if (PNG_WARN_UNINITIALIZED_ROW==1)
Summary(pt_BR.UTF-8): Biblioteca PNG
Summary(tr.UTF-8): PNG kitaplığı
Name: libpng
-Version: 1.2.42
-Release: 2
+Version: 1.4.0
+Release: 0.1
Epoch: 2
License: distributable
Group: Libraries
Source0: http://downloads.sourceforge.net/libpng/%{name}-%{version}.tar.xz
-# Source0-md5: dcf4892946e2d6aab6e46d02ed774315
+# Source0-md5: 2ce652ebe1589d7b2357aa6d0eccd07c
Patch0: %{name}-pngminus.patch
-Patch1: %{name}-opt.patch
-Patch2: %{name}-norpath.patch
-Patch3: %{name}-export_old.patch
-Patch4: %{name}-revert.patch
-# http://littlesvr.ca/apng/
-Patch5: %{name}-apng.patch
+# http://littlesvr.ca/apng/diff/%{name}-%{version}-apng.patch | dos2unix
+Patch1: %{name}-apng.patch
URL: http://www.libpng.org/pub/png/libpng.html
BuildRequires: rpmbuild(macros) >= 1.213
BuildRequires: xz >= 1:4.999.7
BuildRequires: zlib-devel
-%ifarch %{x8664} ia64 ppc64 s390x sparc64
-Provides: libpng.so.3()(64bit)
-%else
-Provides: libpng.so.3
-%endif
Provides: libpng(APNG) = 0.10
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
kitaplıklar ve başlık dosyaları.
%package static
-Summary: Static PNG libraries
-Summary(de.UTF-8): Statischen PNG Libraries
-Summary(pl.UTF-8): Biblioteki statyczne PNG
+Summary: Static PNG library
+Summary(de.UTF-8): Statisch PNG Library
+Summary(pl.UTF-8): Biblioteka statyczna PNG
Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com libpng
Group: Development/Libraries
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
Provides: libpng(APNG)-static = 0.10
%description static
-Static PNG libraries.
+Static PNG library.
%description static -l de.UTF-8
-Statischen PNG Libraries.
+Statisch PNG Library.
%description static -l pl.UTF-8
-Biblioteki statyczne PNG.
+Biblioteka statyczna PNG.
%description static -l pt_BR.UTF-8
Bibliotecas estáticas para desenvolvimento com libpng.
%setup -q -c -T
xzcat -dc %{SOURCE0} | tar xf - -C ..
%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p0
+%patch1 -p0
%build
%configure
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir}/man{3,5}} \
- $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_examplesdir}/%{name}-%{version}}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-ln -s libpng12 $RPM_BUILD_ROOT%{_includedir}/libpng
install contrib/pngminus/{png2pnm,pnm2png} $RPM_BUILD_ROOT%{_bindir}
install example.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%files
%defattr(644,root,root,755)
-%doc ANNOUNCE CHANGES KNOWNBUG README LICENSE
-%attr(755,root,root) %{_libdir}/libpng12.so.*.*.*
-%attr(755,root,root) %{_libdir}/libpng.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpng12.so.0
-# alternative soname (symlink in PLD, so must be packaged)
-%attr(755,root,root) %{_libdir}/libpng.so.3
+%doc ANNOUNCE CHANGES LICENSE README TODO
+%attr(755,root,root) %{_libdir}/libpng14.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libpng14.so.14
%files devel
%defattr(644,root,root,755)
-%doc *.txt
-%attr(755,root,root) %{_bindir}/libpng12-config
+%doc libpng-%{version}.txt
+%attr(755,root,root) %{_bindir}/libpng14-config
%attr(755,root,root) %{_bindir}/libpng-config
-%attr(755,root,root) %{_libdir}/libpng12.so
+%attr(755,root,root) %{_libdir}/libpng14.so
%attr(755,root,root) %{_libdir}/libpng.so
-%{_pkgconfigdir}/libpng12.pc
+%{_libdir}/libpng14.la
+%{_libdir}/libpng.la
+%{_pkgconfigdir}/libpng14.pc
%{_pkgconfigdir}/libpng.pc
-%{_includedir}/libpng12
-%{_includedir}/libpng
+%{_includedir}/libpng14
%{_includedir}/png*.h
-%{_mandir}/man?/*
+%{_mandir}/man3/libpng.3*
+%{_mandir}/man3/libpngpf.3*
+%{_mandir}/man5/png.5*
%{_examplesdir}/%{name}-%{version}
%files static
%defattr(644,root,root,755)
-%{_libdir}/libpng12.a
+%{_libdir}/libpng14.a
%{_libdir}/libpng.a
%files progs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/p*
+%attr(755,root,root) %{_bindir}/png2pnm
+%attr(755,root,root) %{_bindir}/pnm2png