pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/png Update to 1.4.2. Shared library name chan...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fd89a009a4f4
branches:  trunk
changeset: 576519:fd89a009a4f4
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sun Jun 13 22:42:10 2010 +0000

description:
Update to 1.4.2. Shared library name changes from libpn12.* to libpng14.*,
so bump ABI depends.

Remove libpng.* from package, instead use buildlink to help some packages
that are looking for the library themselves instead of using pkg-config
or libpng-config.

Changes:

version 1.4.2:
  Restored the macro definition of png_check_sig().
  Conditionally compile an "else" statement in png_decompress_chunk().
  Documented the fact that png_set_dither() was disabled since libpng-1.4.0.
  Reenabled png_set_dither() but renamed it to png_set_quantize() to reflect
    more accurately what it actually does.  At the same time, renamed
    the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros to
    PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS.
  Added some "(long)" typecasts to printf calls in png_handle_cHRM().
  Relaxed the overly-restrictive permissions of some files.
  Added the "vstudio" project to replace "visualc6" and "visualc71" which
    will be removed from libpng-1.5.0.
  Demonstrate in example.c that lang_key should be initialized.
  Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in
    contrib/pngminim/decoder/pngusr.h to make a smaller decoder application.
  Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined.
  Removed dummy_inflate.c and uncompr.c from contrib/pngminim/encoder
  Corrected PNG_UNKNOWN_CHUNKS_SUPPORTED to PNG_HANDLE_AS_UNKNOWN_SUPPORTED
    in gregbook/readpng2.c
  Corrected protection of png_get_user_transform_ptr. The API declaration in
    png.h is removed if both READ and WRITE USER_TRANSFORM are turned off
    but was left defined in pngtrans.c
  Moved declarations of umsg[] inside the proper #ifdef blocks in pngrutil.c

version 1.4.1 [February 25, 2010]

  Updated CMakeLists.txt for consistent indentation and to avoid an
    unclosed if-statement warning (Philip Lowman).
  Revised Makefile.am and Makefile.in to remove references to Y2KINFO,
    KNOWNBUG, and libpng.la (Robert Schwebel).
  Revised the makefiles to install the same files and symbolic
    except for libpng.la and libpng14.la.
  Make png_set|get_compression_buffer_size() available even when
    PNG_WRITE_SUPPORTED is not enabled.
  Revised Makefile.am and Makefile.in to simplify their maintenance.
  Revised the makefiles to install a link to libpng14.so.14.1
  Removed png_set_premultiply_alpha() from scripts/*.def
  Revised png_decompress_chunk() to improve speed and memory usage when
    decoding large chunks, using a two-pass method suggested by John Bowler.
  Added png_set|get_chunk_malloc_max() functions.
  Relocated "int k" declaration in pngtest.c to minimize its scope.
  Folded some long lines in the source files.
  Added defineable PNG_USER_CHUNK_CACHE_MAX and PNG_USER_CHUNK_MALLOC_MAX
  Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as
    png_ptr->png_user_chunk_malloc_max.
  Return allocated "old_buffer" in png_push_save_buffer() before calling
    png_error(), to avoid a potential memory leak.
  Removed the cbuilder5 project, which has not been updated to 1.4.0.
  Complete rewrite of two-pass png_decompress_chunk() by John Bowler.
  Removed obsolete unused MMX-querying support from contrib/gregbook
  Removed the AIX redefinition of jmpbuf in png.h
  Define _ALL_SOURCE in configure.ac, makefile.aix, and CMakeLists.txt
    when using AIX compiler.
  Removed unused gzio.c from contrib/pngminim gather and makefile scripts


Changes to Libpng from version 1.2.42 to 1.4.0 (January 4, 2010)

Libpng-1.4.0 was released by the PNG Development Group on January
3, 2010.  Important new features include support for the iTXt chunk
and a function for limiting the amount of memory that a possibly
malicious compressed chunk can consume.  Some long-deprecated functions
and features have been removed.  A new private header file that is
not visible to applications has been created, to improve our ability
to maintain binary compatibility among future libpng versions.

Specifically,

1. Private libpng prototypes and macro definitions were moved from
png.h and pngconf.h into a new pngpriv.h header file that is not
visible to applications.

2. Some obsolete/deprecated macros and functions have been removed.

   a. We eliminated the obsolete, unused pnggccrd.c and pngvcrd.c files
      and related makefiles.

   b. We removed the typecasted NULL definitions such as

          #define png_voidp_NULL    (png_voidp)NULL

      If you used these in your application, just use NULL instead.

   c. We eliminated the PNG_1_0_X and PNG_1_2_X macros.

   d. We eliminated the PNG_LEGACY_SUPPORTED macro.

   e. We removed many WIN32_WCE #ifdefs.

   f. We removed the functions png_read_init(info_ptr),
      png_write_init(info_ptr), png_info_init(info_ptr),
      png_read_destroy(), and png_write_destroy().
      They have been deprecated since libpng-0.95.

   g. We removed the png_permit_empty_plte() function. It has been
      deprecated since libpng-1.0.9.  Use png_permit_mng_features() instead.

   h. We removed the obsolete stub functions png_get_mmx_flagmask(),
      png_set_mmx_thresholds(), png_get_asm_flags(),
      png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(),
      png_set_asm_flags(), and png_mmx_supported()

   i. We removed the obsolete png_check_sig(), png_memcpy_check(), and
      png_memset_check() functions.  Instead use !png_sig_cmp(),
      png_memcpy(), and png_memset(), respectively, i.e.,

      replace
        png_check_sig(buf, 8)
      with
        png_sig_cmp(buf, 0, 8) == 0

      replace
        png_memcpy_check(png_ptr, dest, src, length)
      with
        png_memcpy(dest, src, length)

      and replace
        png_memset_check(png_ptr, dest, value, length)
      with
        png_memset(dest, value, length)

   j. We removed support for global arrays to improve thread safety.

   k. We removed support for numbered error messages by default, since we
      never got around to actually numbering the error messages. The function
      png_set_strip_error_numbers() was removed from the library by default.

   l. The png_zalloc() and png_zfree() functions are no longer exported.
      The png_zalloc() function no longer zeroes out the memory that it
      allocates.

   m. The function png_set_gray_1_2_4_to_8() was removed. It has been
      deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with
      png_set_expand_gray_1_2_4_to_8() because the former function also
      expanded palette images.

3. Several function prototypes were changed.

   a. We changed the prototype for png_malloc() from
      png_malloc(png_structp png_ptr, png_uint_32 size) to
      png_malloc(png_structp png_ptr, png_alloc_size_t size)

   b. We changed the prototypes of png_get_compression_buffer_size() and
      png_set_compression_buffer_size() to work with png_size_t instead of
      png_uint_32.

4. We added some new features:

   a. We enabled iTXt chunk support by default.  This changes the png_text
      structure by adding the itxt_length, lang, and lang_key members.

   b. We added the functions png_set_benign_errors(), png_benign_error(),
      and png_chunk_benign_error().  With these, you can choose to treat
      certain normally fatal errors as nonfatal.

   c. Support for setting the maximum amount of memory that the application
      will allocate for reading chunks was added, as a security measure.
      The functions png_set_chunk_cache_max() and png_get_chunk_cache_max()
      were added to the library.

   d. We added the png_calloc() function and used it in place of
      of "png_malloc(); png_memset();" except in the case in png_read_png()
      where the array consists of pointers; in this case a "for" loop is used
      after the png_malloc() to set the pointers to NULL, to give robust.
      behavior in case the application runs out of memory part-way through
      the process.

   e. We implemented support for I/O states by adding png_ptr member io_state
      and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c

   f. We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level
      input transforms.

5. Other changes

   a. We changed the names of the png_struct and info_struct members "trans"
      and "trans_values" to "trans_alpha" and "trans_color", respectively.

   b. Checking for and reporting of errors in the IHDR chunk is more thorough.

   c. We removed the trailing '.' from the warning and error messages.

   d. Direct access to png_ptr->jmpbuf has been deprecated since libpng
      version 1.0.6, and libpng now generates a warning about it.

      To avoid such warnings, change
        setjmp(png_ptr->jmpbuf)

      to
        setjmp(png_jmpbuf(png_ptr))

diffstat:

 graphics/png/Makefile         |  10 +++++-----
 graphics/png/PLIST            |  14 ++++++--------
 graphics/png/buildlink3.mk    |  22 ++++++++--------------
 graphics/png/distinfo         |  11 +++++------
 graphics/png/hacks.mk         |  12 ------------
 graphics/png/patches/patch-aa |  25 ++++++++++++++++---------
 graphics/png/patches/patch-af |  13 -------------
 7 files changed, 40 insertions(+), 67 deletions(-)

diffs (183 lines):

diff -r 62e663c55bce -r fd89a009a4f4 graphics/png/Makefile
--- a/graphics/png/Makefile     Sun Jun 13 22:15:30 2010 +0000
+++ b/graphics/png/Makefile     Sun Jun 13 22:42:10 2010 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.122 2010/03/09 08:41:15 wiz Exp $
+# $NetBSD: Makefile,v 1.123 2010/06/13 22:42:10 wiz Exp $
 
-DISTNAME=      libpng-1.2.43
+DISTNAME=      libpng-1.4.2
 PKGNAME=       ${DISTNAME:S/lib//}
 CATEGORIES=    graphics
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=libpng/} \
@@ -15,7 +15,7 @@
 PKG_DESTDIR_SUPPORT=   user-destdir
 
 GNU_CONFIGURE= yes
-PKGCONFIG_OVERRIDE=    scripts/libpng.pc.in
+PKGCONFIG_OVERRIDE=    scripts/libpng.pc.in libpng.pc.in
 TEST_TARGET=   check
 USE_LIBTOOL=   yes
 
@@ -26,8 +26,8 @@
 .endif
 
 SUBST_CLASSES+=                rpathfix
-SUBST_FILES.rpathfix=  scripts/libpng-config.in scripts/libpng.pc-configure.in
-SUBST_MESSAGE.rpathfix=        Adding rpath to libpng-config and libpng.pc
+SUBST_FILES.rpathfix=  libpng-config.in
+SUBST_MESSAGE.rpathfix=        Adding rpath to libpng-config
 SUBST_SED.rpathfix=    -e 's/-L$${libdir}/${COMPILER_RPATH_FLAG}$${libdir} -L$${libdir}/g'
 SUBST_STAGE.rpathfix=  pre-configure
 
diff -r 62e663c55bce -r fd89a009a4f4 graphics/png/PLIST
--- a/graphics/png/PLIST        Sun Jun 13 22:15:30 2010 +0000
+++ b/graphics/png/PLIST        Sun Jun 13 22:42:10 2010 +0000
@@ -1,15 +1,13 @@
-@comment $NetBSD: PLIST,v 1.11 2009/06/14 17:59:25 joerg Exp $
+@comment $NetBSD: PLIST,v 1.12 2010/06/13 22:42:10 wiz Exp $
 bin/libpng-config
-bin/libpng12-config
-include/libpng12/png.h
-include/libpng12/pngconf.h
+bin/libpng14-config
+include/libpng14/png.h
+include/libpng14/pngconf.h
 include/png.h
 include/pngconf.h
-lib/libpng.la
-lib/libpng12.la
-lib/libpngcompat.la
+lib/libpng14.la
 lib/pkgconfig/libpng.pc
-lib/pkgconfig/libpng12.pc
+lib/pkgconfig/libpng14.pc
 man/man3/libpng.3
 man/man3/libpngpf.3
 man/man5/png.5
diff -r 62e663c55bce -r fd89a009a4f4 graphics/png/buildlink3.mk
--- a/graphics/png/buildlink3.mk        Sun Jun 13 22:15:30 2010 +0000
+++ b/graphics/png/buildlink3.mk        Sun Jun 13 22:42:10 2010 +0000
@@ -1,18 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.23 2009/03/20 19:24:44 joerg Exp $
+# $NetBSD: buildlink3.mk,v 1.24 2010/06/13 22:42:10 wiz Exp $
 
 BUILDLINK_TREE+=       png
 
 .if !defined(PNG_BUILDLINK3_MK)
 PNG_BUILDLINK3_MK:=
 
-# XXX tv - remove this OPSYS block the next time ABI_DEPENDS is bumped:
-.  include "../../mk/bsd.fast.prefs.mk"
-.  if ${OPSYS} == "Interix"
-BUILDLINK_ABI_DEPENDS.png+=    png>=1.2.14nb1 # fixes linkage bug
-.  endif
-
 BUILDLINK_API_DEPENDS.png+=    png>=1.2.4
-BUILDLINK_ABI_DEPENDS.png+=    png>=1.2.9nb2
+BUILDLINK_ABI_DEPENDS.png+=    png>=1.4.2
 BUILDLINK_PKGSRCDIR.png?=      ../../graphics/png
 
 # keep this in sync with the same code in Makefile
@@ -20,12 +14,12 @@
 CPPFLAGS+=     -DPNG_NO_ASSEMBLER_CODE
 .  endif
 
-# Work around broken libtool archive "/usr/X11/lib/libpng12.la" under
-# Mac OS 10.5.4 or newer which references a non-existing version of the
-# PNG shared library.
-.if !empty(MACHINE_PLATFORM:MDarwin-9.*-*)
-BUILDLINK_TRANSFORM+=  rename:-lpng12.0.26.0:-lpng
-.endif
+# Some software directly tries to link against -lpng instead of
+# using pkg-config or libpng-config to find the proper arguments
+# instead of installing symlinks. Work around this with buildlink
+# magic: packages outside pkgsrc will need to be converted to
+# one of the proper methods or fail.
+BUILDLINK_TRANSFORM+=  l:png:png14
 
 .include "../../devel/zlib/buildlink3.mk"
 .endif # PNG_BUILDLINK3_MK
diff -r 62e663c55bce -r fd89a009a4f4 graphics/png/distinfo
--- a/graphics/png/distinfo     Sun Jun 13 22:15:30 2010 +0000
+++ b/graphics/png/distinfo     Sun Jun 13 22:42:10 2010 +0000
@@ -1,9 +1,8 @@
-$NetBSD: distinfo,v 1.67 2010/03/09 08:41:15 wiz Exp $
+$NetBSD: distinfo,v 1.68 2010/06/13 22:42:10 wiz Exp $
 
-SHA1 (libpng-1.2.43.tar.bz2) = 28ea29305d233669ce565894a95151e4427d1f34
-RMD160 (libpng-1.2.43.tar.bz2) = 6c108f06ae32a86ddd8571e9031f143932f19531
-Size (libpng-1.2.43.tar.bz2) = 678799 bytes
-SHA1 (patch-aa) = 27df7893fc54f7e87790850eb9f047155c73f7d3
+SHA1 (libpng-1.4.2.tar.bz2) = 2670d702bbeee7b28bd7e4814e460524731354c3
+RMD160 (libpng-1.4.2.tar.bz2) = a7bbad2394d93d57cea4ae26f870466bb553449e
+Size (libpng-1.4.2.tar.bz2) = 655710 bytes
+SHA1 (patch-aa) = fc7f010f347cb77d8b478395a59ba4c4c1abd4b9
 SHA1 (patch-ac) = 44b167433e066556022d9b43fa33a7f887f83617
 SHA1 (patch-ae) = e9700e7d3dd536d80e47cffa20b412a6c69660be
-SHA1 (patch-af) = 1998c2faf616666ad8b975e8ffbacdb9c594a714
diff -r 62e663c55bce -r fd89a009a4f4 graphics/png/hacks.mk
--- a/graphics/png/hacks.mk     Sun Jun 13 22:15:30 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-# $NetBSD: hacks.mk,v 1.1 2007/08/31 15:35:08 minskim Exp $
-
-.if !defined(PNG_HACKS_MK)
-PNG_HACKS_MK=  defined
-
-# A workaround for libpng bug #1777158.
-.if !empty(MACHINE_PLATFORM:MDarwin-*-i386)
-PKG_HACKS+=    darwin-read_only_relocs
-LDFLAGS+=      -Wl,-read_only_relocs -Wl,suppress
-.endif
-
-.endif         # PNG_HACKS_MK
diff -r 62e663c55bce -r fd89a009a4f4 graphics/png/patches/patch-aa
--- a/graphics/png/patches/patch-aa     Sun Jun 13 22:15:30 2010 +0000
+++ b/graphics/png/patches/patch-aa     Sun Jun 13 22:42:10 2010 +0000
@@ -1,12 +1,19 @@
-$NetBSD: patch-aa,v 1.27 2007/08/29 20:58:26 wiz Exp $
+$NetBSD: patch-aa,v 1.28 2010/06/13 22:42:10 wiz Exp $
 
---- Makefile.in.orig   2007-08-18 10:34:04.000000000 +0000
+--- Makefile.in.orig   2010-05-06 10:30:19.000000000 +0000
 +++ Makefile.in
-@@ -1275,6 +1275,7 @@ install-exec-hook:
+@@ -1243,14 +1243,6 @@ install-data-hook:
+ install-exec-hook:
+       cd $(DESTDIR)$(bindir); rm -f libpng-config
        cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
-       @set -x;\
-       cd $(DESTDIR)$(libdir);\
-+      mv libpng.la libpngcompat.la;\
-       for ext in a la so sl dylib; do\
-               rm -f libpng.$$ext;\
-                 if test -f $(PNGLIB_BASENAME).$$ext; then\
+-      @set -x;\
+-      cd $(DESTDIR)$(libdir);\
+-      for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ sl dylib; do\
+-              rm -f libpng.$$ext;\
+-                if test -f $(PNGLIB_BASENAME).$$ext; then\
+-                       $(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
+-                fi;\
+-      done
+ 
+ uninstall-hook:
+       cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
diff -r 62e663c55bce -r fd89a009a4f4 graphics/png/patches/patch-af
--- a/graphics/png/patches/patch-af     Sun Jun 13 22:15:30 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-af,v 1.3 2010/03/04 10:13:16 tnn Exp $
-
---- scripts/libpng-config.in.orig      2009-12-03 01:46:02.000000000 +0000
-+++ scripts/libpng-config.in
-@@ -16,7 +16,7 @@ prefix="@prefix@"
- exec_prefix="@exec_prefix@"
- libdir="@libdir@"
- includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
--libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
-+libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@"
- all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@"
- I_opts="-I${includedir}"
- L_opts="-L${libdir}"



Home | Main Index | Thread Index | Old Index