2005-12-05 21:49:47 +01:00
|
|
|
# $NetBSD: Makefile,v 1.72 2005/12/05 20:50:22 rillig Exp $
|
1997-10-06 15:29:36 +02:00
|
|
|
|
2001-05-21 23:39:13 +02:00
|
|
|
# On update, don't forget to increase shared library major/minor's in
|
|
|
|
# accordance with changes (patch-aa).
|
2004-12-05 12:17:12 +01:00
|
|
|
DISTNAME= libpng-1.2.8
|
2001-04-02 04:23:48 +02:00
|
|
|
PKGNAME= ${DISTNAME:S/lib//}
|
2001-01-13 04:24:26 +01:00
|
|
|
CATEGORIES= graphics
|
Update png to 1.2.1. Includes an ABI change and a concommittent bump in the
shared library version, and in the dependendency information for hundreds of
other packages. [Update to png itself was supplied by Thomas Wizner.]
Relevant changes since 1.0.12, extracted from the "CHANGES" file:
Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED
by default.
Added runtime selection of MMX features.
Added png_set_strip_error_numbers function and related macros.
Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
Enabled user memory function by default.
Modified png_create_struct so it passes user mem_ptr to user memory allocator.
Increased png_mng_features flag from png_byte to png_uint_32.
Check for missing profile length field in iCCP chunk and free chunk_data
in case of truncated iCCP chunk.
Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly
if user attempts to run it on an 8-bit display.
Updated contrib/gregbook
Use png_malloc instead of png_zalloc to allocate palette in pngset.c
Added some typecasts to eliminate gcc 3.0 warnings. Changed prototypes
of png_write_oFFS width and height from png_uint_32 to png_int_32.
Updated example.c
Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
Revised contrib/gregbook
Revised pnggccrd.c to conditionally compile some thread-unsafe code only
when PNG_THREAD_UNSAFE_OK is defined.
Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with
value exceeding 2^bit_depth-1
Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c
Removed restriction that do_invert_mono only operate on 1-bit opaque files
Changed a png_warning() to png_debug() in pnggccrd.c
Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC().
Include background_1 in png_struct regardless of gamma support.
Revised example.c to provide more details about using row_callback().
Added type cast to each NULL appearing in a function call, except for
WINCE functions.
Removed type casts from all NULLs.
Simplified png_create_struct_2().
Revised png_create_info_struct() and png_creat_struct_2().
Added error message if png_write_info() was omitted.
Type cast NULLs appearing in function calls when _NO_PROTO or
PNG_TYPECAST_NULL is defined.
Type cast NULLs appearing in function calls except when PNG_NO_TYPECAST_NULL
is defined.
Changed typecast of "size" argument to png_size_t in pngmem.c calls to
the user malloc_fn, to agree with the prototype in png.h
Added a pop/push operation to pnggccrd.c, to preserve Eflag (Maxim Sobolev)
Added a pop/push operation to pngvcrd.c, to preserve Eflag.
Always allocate 256-entry internal palette, hist, and trans arrays, to
avoid out-of-bounds memory reference caused by invalid PNG datastreams.
Added a check for prefix_length > data_length in iCCP chunk handler.
2002-03-13 18:43:38 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpng/} \
|
|
|
|
http://www.libpng.org/pub/png/src/ \
|
2000-03-22 00:24:24 +01:00
|
|
|
ftp://swrinde.nde.swri.edu/pub/png/src/ \
|
Update png to 1.2.1. Includes an ABI change and a concommittent bump in the
shared library version, and in the dependendency information for hundreds of
other packages. [Update to png itself was supplied by Thomas Wizner.]
Relevant changes since 1.0.12, extracted from the "CHANGES" file:
Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED
by default.
Added runtime selection of MMX features.
Added png_set_strip_error_numbers function and related macros.
Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
Enabled user memory function by default.
Modified png_create_struct so it passes user mem_ptr to user memory allocator.
Increased png_mng_features flag from png_byte to png_uint_32.
Check for missing profile length field in iCCP chunk and free chunk_data
in case of truncated iCCP chunk.
Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly
if user attempts to run it on an 8-bit display.
Updated contrib/gregbook
Use png_malloc instead of png_zalloc to allocate palette in pngset.c
Added some typecasts to eliminate gcc 3.0 warnings. Changed prototypes
of png_write_oFFS width and height from png_uint_32 to png_int_32.
Updated example.c
Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
Revised contrib/gregbook
Revised pnggccrd.c to conditionally compile some thread-unsafe code only
when PNG_THREAD_UNSAFE_OK is defined.
Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with
value exceeding 2^bit_depth-1
Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c
Removed restriction that do_invert_mono only operate on 1-bit opaque files
Changed a png_warning() to png_debug() in pnggccrd.c
Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC().
Include background_1 in png_struct regardless of gamma support.
Revised example.c to provide more details about using row_callback().
Added type cast to each NULL appearing in a function call, except for
WINCE functions.
Removed type casts from all NULLs.
Simplified png_create_struct_2().
Revised png_create_info_struct() and png_creat_struct_2().
Added error message if png_write_info() was omitted.
Type cast NULLs appearing in function calls when _NO_PROTO or
PNG_TYPECAST_NULL is defined.
Type cast NULLs appearing in function calls except when PNG_NO_TYPECAST_NULL
is defined.
Changed typecast of "size" argument to png_size_t in pngmem.c calls to
the user malloc_fn, to agree with the prototype in png.h
Added a pop/push operation to pnggccrd.c, to preserve Eflag (Maxim Sobolev)
Added a pop/push operation to pngvcrd.c, to preserve Eflag.
Always allocate 256-entry internal palette, hist, and trans arrays, to
avoid out-of-bounds memory reference caused by invalid PNG datastreams.
Added a check for prefix_length > data_length in iCCP chunk handler.
2002-03-13 18:43:38 +01:00
|
|
|
ftp://ftp.simplesystems.org/pub/libpng/src/ \
|
2000-02-09 23:13:34 +01:00
|
|
|
ftp://ftp.fu-berlin.de/unix/graphics/png/src/
|
2002-05-16 05:00:02 +02:00
|
|
|
EXTRACT_SUFX= .tar.bz2
|
1997-10-06 15:29:36 +02:00
|
|
|
|
2003-07-17 23:41:05 +02:00
|
|
|
MAINTAINER= fredb@NetBSD.org
|
2001-01-13 04:20:54 +01:00
|
|
|
HOMEPAGE= http://www.libpng.org/pub/png/
|
2001-02-16 16:22:13 +01:00
|
|
|
COMMENT= Library for manipulating PNG images
|
1997-10-06 15:29:36 +02:00
|
|
|
|
2004-01-05 21:38:34 +01:00
|
|
|
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
|
|
|
|
2002-08-25 20:38:05 +02:00
|
|
|
USE_LIBTOOL= yes
|
2003-02-17 16:27:58 +01:00
|
|
|
TEST_TARGET= test
|
Update to version 1.2.4. Two new functions since 1.2.1, png_malloc_warn()
and png_set_text_2(), call for a minor version bump in the shared library.
Update "BUILDLINK_DEPENDS" to current level. Also make the shared library
versions visible in the top-level "Makefile", and add a top-level "test"
target to invoke "pngtest" in ${WRKSRC}.
The following is culled from the extensive "CHANGES" file, ommitting
all make system and doc changes, and some bug fixes for bugs that weren't
present in 1.2.1. See "CHANGES" for complete details:
Added setjmp() at the end of png_create_*_struct_2() in case user forgets
to put one in their application.
Exported png_zalloc(), png_zfree(), png_default_read(), png_default_write(),
png_default_flush(), and png_push_fill_buffer() and included them in
module definition files.
Revised prototype for png_default_flush()
Typos in *.def files (png_default_read|write -> png_default_read|write_data)
Once more restored png_zalloc and png_zfree to regular nonexported form.
Restored png_default_read|write_data, png_default_flush, png_read_fill_buffer
to nonexported form, but with PNGAPI, and removed them from module def files.
Removed "PNGAPI" from png_zalloc() and png_zfree() in png.c
Plugged various memory leaks; added png_malloc_warn() and png_set_text_2()
functions.
Plugged memory leak of png_ptr->current_text (Matt Holgate).
Check for buffer overflow before reading CRC in pngpread.c (Warwick Allison)
Plugged memory leak of row_buf in pngtest.c when there is a png_error().
Detect buffer overflow in pngpread.c when IDAT is corrupted with extra data.
Changed png_warning() to png_error() when width is too large to process.
2002-07-19 16:33:08 +02:00
|
|
|
|
|
|
|
LIBPNG_SO_MAJOR= 3
|
2004-10-15 14:33:21 +02:00
|
|
|
LIBPNG_SO_MINOR= 2
|
1998-07-15 13:45:49 +02:00
|
|
|
|
2001-01-13 04:24:26 +01:00
|
|
|
MAKEFILE= scripts/makefile.std
|
2005-12-05 21:49:47 +01:00
|
|
|
MAKE_ENV+= REALCC=${CC:Q}
|
|
|
|
MAKE_ENV+= LIBPNG_SO_MAJOR=${LIBPNG_SO_MAJOR:Q}
|
|
|
|
MAKE_ENV+= LIBPNG_SO_MINOR=${LIBPNG_SO_MINOR:Q}
|
2001-06-19 06:00:48 +02:00
|
|
|
|
2004-03-30 17:52:09 +02:00
|
|
|
INSTALLATION_DIRS= include lib/pkgconfig man/man3 man/man5
|
2004-01-05 21:38:34 +01:00
|
|
|
|
2004-07-10 03:11:18 +02:00
|
|
|
PKGCONFIG_OVERRIDE= scripts/libpng.pc.in
|
2004-03-29 18:02:08 +02:00
|
|
|
|
2005-12-05 21:49:47 +01:00
|
|
|
SUBST_CLASSES+= pc
|
2004-03-29 18:02:08 +02:00
|
|
|
SUBST_STAGE.pc= post-patch
|
|
|
|
SUBST_FILES.pc= scripts/libpng.pc.in
|
2005-11-04 12:58:54 +01:00
|
|
|
SUBST_SED.pc= -e 's,@PREFIX@,${PREFIX},'
|
2004-03-29 18:02:08 +02:00
|
|
|
SUBST_MESSAGE.pc= "Fixing libpng.pc.in."
|
|
|
|
|
2000-04-20 04:11:46 +02:00
|
|
|
post-install:
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/libpng.3 ${PREFIX}/man/man3
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/libpngpf.3 ${PREFIX}/man/man3
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/png.5 ${PREFIX}/man/man5
|
2004-03-29 18:02:08 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/scripts/libpng.pc.in \
|
|
|
|
${PREFIX}/lib/pkgconfig/libpng12.pc
|
2000-04-20 04:11:46 +02:00
|
|
|
|
2004-01-05 21:38:34 +01:00
|
|
|
.include "../../devel/zlib/buildlink3.mk"
|
1998-04-15 12:38:15 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|