summaryrefslogtreecommitdiff
path: root/libpng/scripts
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2016-11-07 10:42:05 +0000
committerChris Liddell <chris.liddell@artifex.com>2016-11-22 09:49:30 +0000
commit64ad2a92195fd05e9ba34995ae994eb250fc9c7c (patch)
treeb555966016539e3d21c73d245b97c226ff2d7787 /libpng/scripts
parent1b1e7f3f4abf7a97101ff7f4e2389ca2edd9af0a (diff)
downloadghostpdl-64ad2a92195fd05e9ba34995ae994eb250fc9c7c.tar.gz
Update libpng to 1.6.26
Diffstat (limited to 'libpng/scripts')
-rw-r--r--libpng/scripts/README.txt10
-rw-r--r--libpng/scripts/def.c2
-rw-r--r--libpng/scripts/genchk.cmake.in37
-rw-r--r--libpng/scripts/genout.cmake.in93
-rw-r--r--libpng/scripts/gensrc.cmake.in138
-rw-r--r--libpng/scripts/libpng-config-head.in2
-rw-r--r--libpng/scripts/libpng.pc.in2
-rw-r--r--libpng/scripts/makefile.cegcc2
-rw-r--r--libpng/scripts/makefile.linux2
-rw-r--r--libpng/scripts/makefile.msys2
-rw-r--r--libpng/scripts/makefile.ne12bsd2
-rw-r--r--libpng/scripts/makefile.netbsd2
-rw-r--r--libpng/scripts/makefile.openbsd2
-rw-r--r--libpng/scripts/makefile.sco2
-rw-r--r--libpng/scripts/pnglibconf.dfa40
-rw-r--r--libpng/scripts/pnglibconf.h.prebuilt15
-rw-r--r--libpng/scripts/symbols.def3
-rw-r--r--libpng/scripts/test.cmake.in31
18 files changed, 348 insertions, 39 deletions
diff --git a/libpng/scripts/README.txt b/libpng/scripts/README.txt
index f6a9cf38c..71aeebe9a 100644
--- a/libpng/scripts/README.txt
+++ b/libpng/scripts/README.txt
@@ -1,9 +1,9 @@
-Makefiles for libpng version 1.6.17 - March 26, 2015
+Makefiles for libpng version 1.6.26 - October 20, 2016
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng16.so.16.1.6.17)
+ (gcc, creates libpng16.so.16.1.6.26)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -33,12 +33,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
- creates libpng16.so.16.1.6.17)
+ creates libpng16.so.16.1.6.26)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
- creates libpng16.so.16.1.6.17)
+ creates libpng16.so.16.1.6.26)
makefile.so9 => Solaris 9 makefile (gcc,
- creates libpng16.so.16.1.6.17)
+ creates libpng16.so.16.1.6.26)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile
diff --git a/libpng/scripts/def.c b/libpng/scripts/def.c
index 9c88f7743..7f2be6a58 100644
--- a/libpng/scripts/def.c
+++ b/libpng/scripts/def.c
@@ -21,7 +21,7 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library""
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
PNG_DFN ""
PNG_DFN "EXPORTS"
-PNG_DFN ";Version 1.6.17"
+PNG_DFN ";Version 1.6.26"
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
diff --git a/libpng/scripts/genchk.cmake.in b/libpng/scripts/genchk.cmake.in
new file mode 100644
index 000000000..ab3b9d746
--- /dev/null
+++ b/libpng/scripts/genchk.cmake.in
@@ -0,0 +1,37 @@
+# genchk.cmake.in
+# Generate .chk from .out with awk (generic), based upon the automake logic.
+
+# Copyright (C) 2016 Glenn Randers-Pehrson
+# Written by Roger Leigh, 2016
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Variables substituted from CMakeLists.txt
+set(SRCDIR "@CMAKE_CURRENT_SOURCE_DIR@")
+
+set(AWK "@AWK@")
+
+get_filename_component(INPUTEXT "${INPUT}" EXT)
+get_filename_component(OUTPUTEXT "${OUTPUT}" EXT)
+get_filename_component(INPUTBASE "${INPUT}" NAME_WE)
+get_filename_component(OUTPUTBASE "${OUTPUT}" NAME_WE)
+get_filename_component(INPUTDIR "${INPUT}" PATH)
+get_filename_component(OUTPUTDIR "${OUTPUT}" PATH)
+
+if("${INPUTEXT}" STREQUAL ".out" AND "${OUTPUTEXT}" STREQUAL ".chk")
+ # Generate .chk from .out with awk (generic)
+ file(REMOVE "${OUTPUT}" "${OUTPUTDIR}/${OUTPUTBASE}.new")
+ execute_process(COMMAND "${AWK}" -f "${SRCDIR}/scripts/checksym.awk"
+ "${SRCDIR}/scripts/${INPUTBASE}.def"
+ "of=${OUTPUTDIR}/${OUTPUTBASE}.new"
+ "${INPUT}"
+ RESULT_VARIABLE AWK_FAIL)
+ if(AWK_FAIL)
+ message(FATAL_ERROR "Failed to generate ${OUTPUTDIR}/${OUTPUTBASE}.new")
+ endif()
+ file(RENAME "${OUTPUTDIR}/${OUTPUTBASE}.new" "${OUTPUT}")
+else()
+ message(FATAL_ERROR "Unsupported conversion: ${INPUTEXT} to ${OUTPUTEXT}")
+endif()
diff --git a/libpng/scripts/genout.cmake.in b/libpng/scripts/genout.cmake.in
new file mode 100644
index 000000000..01f12de2f
--- /dev/null
+++ b/libpng/scripts/genout.cmake.in
@@ -0,0 +1,93 @@
+# genout.cmake.in
+# Generate .out from .c with awk (generic), based upon the automake logic.
+
+# Copyright (C) 2016 Glenn Randers-Pehrson
+# Written by Roger Leigh, 2016
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Variables substituted from CMakeLists.txt
+set(SRCDIR "@CMAKE_CURRENT_SOURCE_DIR@")
+set(BINDIR "@CMAKE_CURRENT_BINARY_DIR@")
+
+set(AWK "@AWK@")
+set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
+set(CMAKE_C_FLAGS @CMAKE_C_FLAGS@)
+set(INCDIR "@CMAKE_CURRENT_BINARY_DIR@")
+set(PNG_PREFIX "@PNG_PREFIX@")
+set(PNGLIB_MAJOR "@PNGLIB_MAJOR@")
+set(PNGLIB_MINOR "@PNGLIB_MINOR@")
+set(PNGLIB_VERSION "@PNGLIB_VERSION@")
+set(ZLIBINCDIR "@ZLIB_INCLUDE_DIR@")
+
+set(PLATFORM_C_FLAGS)
+if(APPLE)
+ set(CMAKE_OSX_ARCHITECTURES "@CMAKE_OSX_ARCHITECTURES@")
+ set(CMAKE_OSX_SYSROOT "@CMAKE_OSX_SYSROOT@")
+ if(CMAKE_OSX_ARCHITECTURES)
+ set(PLATFORM_C_FLAGS ${PLATFORM_C_FLAGS} -arch ${CMAKE_OSX_ARCHITECTURES})
+ endif()
+ if(CMAKE_OSX_SYSROOT)
+ set(PLATFORM_C_FLAGS ${PLATFORM_C_FLAGS} -isysroot ${CMAKE_OSX_SYSROOT})
+ endif()
+endif()
+
+get_filename_component(INPUTEXT "${INPUT}" EXT)
+get_filename_component(OUTPUTEXT "${OUTPUT}" EXT)
+get_filename_component(INPUTBASE "${INPUT}" NAME_WE)
+get_filename_component(OUTPUTBASE "${OUTPUT}" NAME_WE)
+get_filename_component(INPUTDIR "${INPUT}" PATH)
+get_filename_component(OUTPUTDIR "${OUTPUT}" PATH)
+
+if ("${INPUTEXT}" STREQUAL ".c" AND "${OUTPUTEXT}" STREQUAL ".out")
+ get_filename_component(GENDIR "${OUTPUT}" PATH)
+ file(MAKE_DIRECTORY "${GENDIR}")
+
+ file(REMOVE "${OUTPUT}.tf1" "${OUTPUT}.tf2")
+
+ set(INCLUDES "-I${INCDIR}")
+ if(ZLIBINCDIR)
+ foreach(dir ${ZLIBINCDIR})
+ list(APPEND INCLUDES "-I${dir}")
+ endforeach()
+ endif()
+
+ if(PNG_PREFIX)
+ set(PNG_PREFIX_DEF "-DPNG_PREFIX=${PNG_PREFIX}")
+ endif()
+
+ execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E"
+ ${CMAKE_C_FLAGS}
+ ${PLATFORM_C_FLAGS}
+ "-I${SRCDIR}"
+ "-I${BINDIR}"
+ ${INCLUDES}
+ "-DPNGLIB_LIBNAME=PNG${PNGLIB_MAJOR}${PNGLIB_MINOR}_0"
+ "-DPNGLIB_VERSION=${PNGLIB_VERSION}"
+ "-DSYMBOL_PREFIX=${SYMBOL_PREFIX}"
+ "-DPNG_NO_USE_READ_MACROS"
+ "-DPNG_BUILDING_SYMBOL_TABLE"
+ ${PNG_PREFIX_DEF}
+ "${INPUT}"
+ OUTPUT_FILE "${OUTPUT}.tf1"
+ WORKING_DIRECTORY "${BINDIR}"
+ RESULT_VARIABLE CPP_FAIL)
+ if(CPP_FAIL)
+ message(FATAL_ERROR "Failed to generate ${OUTPUT}.tf1")
+ endif()
+
+ execute_process(COMMAND "${AWK}" -f "${SRCDIR}/scripts/dfn.awk"
+ "out=${OUTPUT}.tf2" "${OUTPUT}.tf1"
+ WORKING_DIRECTORY "${BINDIR}"
+ RESULT_VARIABLE AWK_FAIL)
+ if(AWK_FAIL)
+ message(FATAL_ERROR "Failed to generate ${OUTPUT}.tf2")
+ endif()
+
+ file(REMOVE "${OUTPUT}.tf1")
+ file(RENAME "${OUTPUT}.tf2" "${OUTPUT}")
+else()
+ message(FATAL_ERROR "Unsupported conversion: ${INPUTEXT} to ${OUTPUTEXT}")
+endif()
diff --git a/libpng/scripts/gensrc.cmake.in b/libpng/scripts/gensrc.cmake.in
new file mode 100644
index 000000000..f28a62266
--- /dev/null
+++ b/libpng/scripts/gensrc.cmake.in
@@ -0,0 +1,138 @@
+# gensrc.cmake.in
+# Generate source files with awk, based upon the automake logic.
+
+# Copyright (C) 2016 Glenn Randers-Pehrson
+# Written by Roger Leigh, 2016
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Variables substituted from CMakeLists.txt
+set(SRCDIR "@CMAKE_CURRENT_SOURCE_DIR@")
+set(BINDIR "@CMAKE_CURRENT_BINARY_DIR@")
+
+set(AWK "@AWK@")
+set(DFA_XTRA "@DFA_XTRA@")
+set(PNG_PREFIX "@PNG_PREFIX@")
+set(PNGLIB_VERSION "@PNGLIB_VERSION@")
+
+if("${OUTPUT}" STREQUAL "scripts/pnglibconf.c")
+ # Generate scripts/pnglibconf.c
+
+ file(REMOVE "${BINDIR}/pnglibconf.tf6" "${BINDIR}/pnglibconf.tf7")
+
+ execute_process(COMMAND "${CMAKE_COMMAND}" -E echo "com ${PNGLIB_VERSION} STANDARD API DEFINITION"
+ COMMAND "${AWK}" -f "${SRCDIR}/scripts/options.awk"
+ "out=pnglibconf.tf6" "logunsupported=1" "version=search"
+ "${SRCDIR}/pngconf.h" "-"
+ "${SRCDIR}/scripts/pnglibconf.dfa"
+ WORKING_DIRECTORY "${BINDIR}"
+ RESULT_VARIABLE AWK_FAIL)
+ if(AWK_FAIL)
+ message(FATAL_ERROR "Failed to generate pnglibconf.tf6")
+ endif()
+
+ execute_process(COMMAND "${AWK}" -f "${SRCDIR}/scripts/options.awk"
+ "out=pnglibconf.tf7" "pnglibconf.tf6"
+ WORKING_DIRECTORY "${BINDIR}"
+ RESULT_VARIABLE AWK_FAIL)
+ if(AWK_FAIL)
+ message(FATAL_ERROR "Failed to generate pnglibconf.tf7")
+ endif()
+
+ file(REMOVE "pnglibconf.tf6")
+ file(MAKE_DIRECTORY "${BINDIR}/scripts")
+ file(RENAME "pnglibconf.tf7" "${BINDIR}/scripts/pnglibconf.c")
+
+elseif ("${OUTPUT}" STREQUAL "pnglibconf.c")
+ # Generate pnglibconf.c
+
+ file(REMOVE "${BINDIR}/pnglibconf.tf4" "${BINDIR}/pnglibconf.tf5")
+
+ execute_process(COMMAND "${AWK}" -f "${SRCDIR}/scripts/options.awk"
+ out=pnglibconf.tf4 version=search
+ ${SRCDIR}/pngconf.h ${SRCDIR}/scripts/pnglibconf.dfa
+ ${SRCDIR}/pngusr.dfa ${DFA_XTRA}
+ WORKING_DIRECTORY "${BINDIR}"
+ RESULT_VARIABLE AWK_FAIL)
+ if(AWK_FAIL)
+ message(FATAL_ERROR "Failed to generate pnglibconf.tf4")
+ endif()
+
+ execute_process(COMMAND "${AWK}" -f "${SRCDIR}/scripts/options.awk"
+ out=pnglibconf.tf5 pnglibconf.tf4
+ WORKING_DIRECTORY "${BINDIR}"
+ RESULT_VARIABLE AWK_FAIL)
+ if(AWK_FAIL)
+ message(FATAL_ERROR "Failed to generate pnglibconf.tf5")
+ endif()
+
+ file(REMOVE "pnglibconf.tf4")
+ file(MAKE_DIRECTORY "${BINDIR}/scripts")
+ file(RENAME "pnglibconf.tf5" "${BINDIR}/pnglibconf.c")
+
+elseif ("${OUTPUT}" STREQUAL "pnglibconf.h")
+ # Generate pnglibconf.h
+
+ file(REMOVE "${BINDIR}/${OUTPUT}")
+ if(PNG_PREFIX)
+ file(REMOVE "pnglibconf.tf8")
+
+ execute_process(COMMAND "${AWK}" "s==0 && NR>1{print prev}
+ s==0{prev=\$0}
+ s==1{print \"#define\", \$1, \"${PNG_PREFIX}\" \$1}
+ s==2{print \"#define ${PNG_PREFIX}png_\" \$1, \"PNG_\" \$1}
+ END{print prev}" s=0 pnglibconf.out s=1 "${BINDIR}/scripts/prefix.out"
+ s=2 "${SRCDIR}/scripts/macro.lst"
+ OUTPUT_FILE pnglibconf.tf8
+ RESULT_VARIABLE AWK_FAIL)
+ if(AWK_FAIL)
+ message(FATAL_ERROR "Failed to generate pnglibconf.tf8")
+ endif()
+
+ file(RENAME "pnglibconf.tf8" "${BINDIR}/${OUTPUT}")
+ else()
+ execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${BINDIR}/pnglibconf.out"
+ "${BINDIR}/${OUTPUT}"
+ RESULT_VARIABLE COPY_FAIL)
+ if(COPY_FAIL)
+ message(FATAL_ERROR "Failed to create pnglibconf.h")
+ endif()
+ endif()
+
+elseif ("${OUTPUT}" STREQUAL "pngprefix.h")
+ # Generate pngprefix.h
+
+ file(REMOVE "${BINDIR}/${OUTPUT}")
+
+ if(PNG_PREFIX)
+ file(REMOVE "pngprefix.tf1")
+
+ execute_process(COMMAND "${AWK}"
+ "{print \"#define\", \$1, \"${PNG_PREFIX}\" \$1}"
+ "${BINDIR}/scripts/intprefix.out"
+ OUTPUT_FILE "pngprefix.tf1"
+ RESULT_VARIABLE AWK_FAIL)
+ if(AWK_FAIL)
+ message(FATAL_ERROR "Failed to generate pngprefix.tf1")
+ endif()
+
+ file(RENAME "pngprefix.tf1" "${BINDIR}/${OUTPUT}")
+ else()
+ file(WRITE "${BINDIR}/${OUTPUT}" "/* No libpng symbol prefix configured. */")
+ endif()
+
+elseif("${OUTPUT}" STREQUAL "scripts/pnglibconf.h.prebuilt")
+ # Generate scripts/pnglibconf.h.prebuilt (fails build)
+
+ message(STATUS "Attempting to build scripts/pnglibconf.h.prebuilt")
+ message(STATUS "This is a machine generated file, but if you want to make")
+ message(STATUS "a new one simply build the 'genfiles' target, and copy")
+ message(STATUS "scripts/pnglibconf.out to scripts/pnglibconf.h.prebuilt")
+ message(STATUS "AND set PNG_ZLIB_VERNUM to 0 (you MUST do this)")
+ message(FATAL_ERROR "Stopping build")
+
+else()
+ message(FATAL_ERROR "Unsupported output: ${OUTPUT}")
+endif()
diff --git a/libpng/scripts/libpng-config-head.in b/libpng/scripts/libpng-config-head.in
index d19010df4..b78f9084c 100644
--- a/libpng/scripts/libpng-config-head.in
+++ b/libpng/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
# Modeled after libxml-config.
-version=1.6.17
+version=1.6.26
prefix=""
libdir=""
libs=""
diff --git a/libpng/scripts/libpng.pc.in b/libpng/scripts/libpng.pc.in
index ce61a3e98..7a2cb2b79 100644
--- a/libpng/scripts/libpng.pc.in
+++ b/libpng/scripts/libpng.pc.in
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng16
Name: libpng
Description: Loads and saves PNG files
-Version: 1.6.17
+Version: 1.6.26
Libs: -L${libdir} -lpng16
Cflags: -I${includedir}
diff --git a/libpng/scripts/makefile.cegcc b/libpng/scripts/makefile.cegcc
index cc56297cd..93c123604 100644
--- a/libpng/scripts/makefile.cegcc
+++ b/libpng/scripts/makefile.cegcc
@@ -23,7 +23,7 @@
VERMAJ = 1
VERMIN = 6
-VERMIC = 17
+VERMIC = 26
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
NAME = libpng
PACKAGE = $(NAME)-$(VER)
diff --git a/libpng/scripts/makefile.linux b/libpng/scripts/makefile.linux
index 86a397f4c..e7347f677 100644
--- a/libpng/scripts/makefile.linux
+++ b/libpng/scripts/makefile.linux
@@ -10,7 +10,7 @@
# Library name:
LIBNAME = libpng16
PNGMAJ = 16
-RELEASE = 17
+RELEASE = 26
# Shared library names:
LIBSO=$(LIBNAME).so
diff --git a/libpng/scripts/makefile.msys b/libpng/scripts/makefile.msys
index 30595a083..09429ee06 100644
--- a/libpng/scripts/makefile.msys
+++ b/libpng/scripts/makefile.msys
@@ -18,7 +18,7 @@ exec_prefix=$(prefix)
# Library name:
LIBNAME = libpng16
PNGMAJ = 16
-RELEASE = 17
+RELEASE = 26
# Shared library names:
LIBSO=$(LIBNAME).dll
diff --git a/libpng/scripts/makefile.ne12bsd b/libpng/scripts/makefile.ne12bsd
index d5be81cb7..3d366884a 100644
--- a/libpng/scripts/makefile.ne12bsd
+++ b/libpng/scripts/makefile.ne12bsd
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng16
LIB= png16
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.6.17
+SHLIB_MINOR= 1.6.26
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/libpng/scripts/makefile.netbsd b/libpng/scripts/makefile.netbsd
index 58c48844d..8fb2c7633 100644
--- a/libpng/scripts/makefile.netbsd
+++ b/libpng/scripts/makefile.netbsd
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
LIB= png
SHLIB_MAJOR= 16
-SHLIB_MINOR= 1.6.17
+SHLIB_MINOR= 1.6.26
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/libpng/scripts/makefile.openbsd b/libpng/scripts/makefile.openbsd
index 0ef62a4e4..35b142477 100644
--- a/libpng/scripts/makefile.openbsd
+++ b/libpng/scripts/makefile.openbsd
@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 16
-SHLIB_MINOR= 1.6.17
+SHLIB_MINOR= 1.6.26
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
diff --git a/libpng/scripts/makefile.sco b/libpng/scripts/makefile.sco
index b9c7c402b..67d84aaac 100644
--- a/libpng/scripts/makefile.sco
+++ b/libpng/scripts/makefile.sco
@@ -1,5 +1,5 @@
# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
-# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
+# Contributed by Mike Hopkirk (hops at sco.com) modified from Makefile.lnx
# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
# Copyright (C) 1998 Greg Roelofs
diff --git a/libpng/scripts/pnglibconf.dfa b/libpng/scripts/pnglibconf.dfa
index e9a82f303..019c06d47 100644
--- a/libpng/scripts/pnglibconf.dfa
+++ b/libpng/scripts/pnglibconf.dfa
@@ -8,7 +8,7 @@ com pnglibconf.h - library build configuration
com
version
com
-com Copyright (c) 1998-2014 Glenn Randers-Pehrson
+com Copyright (c) 1998-2016 Glenn Randers-Pehrson
com
com This code is released under the libpng license.
com For conditions of distribution and use, see the disclaimer
@@ -222,7 +222,7 @@ option SET_OPTION disabled
# with png_set_option
# ARM_NEON_CHECK: (PNG_ARM_NEON == 1) compile a run-time check to see if Neon
# extensions are supported. This is poorly supported and
-# deprectated - use the png_set_option API.
+# deprecated - use the png_set_option API.
setting ARM_NEON_OPT
option ARM_NEON_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
sets ARM_NEON_OPT 1
@@ -249,6 +249,17 @@ setting Z_DEFAULT_STRATEGY default @Z_FILTERED
setting Z_DEFAULT_NOFILTER_STRATEGY default @Z_DEFAULT_STRATEGY
setting ZLIB_VERNUM default @ZLIB_VERNUM
+# Linkage of:
+#
+# API: libpng API functions
+# CALLBACK: internal non-file-local callbacks
+# FUNCTION: internal non-file-local functions
+# DATA: internal non-file-local (const) data
+setting LINKAGE_API default extern
+setting LINKAGE_CALLBACK default extern
+setting LINKAGE_FUNCTION default extern
+setting LINKAGE_DATA default extern
+
setting TEXT_Z_DEFAULT_COMPRESSION default @Z_DEFAULT_COMPRESSION
setting TEXT_Z_DEFAULT_STRATEGY default @Z_DEFAULT_STRATEGY
@@ -263,12 +274,12 @@ setting DEFAULT_READ_MACROS default 1
option READ_INT_FUNCTIONS requires READ
-# The same for write, but these can only be switched off if
-# no writing is required at all - hence the use of an 'enables'
-# not a 'requires' below:
+# The same for write but these can only be switched off if no writing
+# is required at all - hence the use of a 'disabled', not a 'requires'.
+# If these are needed, they are enabled in the 'WRITE options' section
+# below.
option WRITE_INT_FUNCTIONS disabled
-option WRITE enables WRITE_INT_FUNCTIONS
# Error controls
#
@@ -479,7 +490,7 @@ option BUILD_GRAYSCALE_PALETTE
# WRITE options
-option WRITE
+option WRITE enables WRITE_INT_FUNCTIONS
# Disabling WRITE_16BIT prevents 16-bit PNG files from being
# generated.
@@ -504,9 +515,7 @@ option WRITE_USER_TRANSFORM requires WRITE_TRANSFORMS
option WRITE_INTERLACING requires WRITE
-# The following depends, internally, on WEIGHT_SHIFT and COST_SHIFT
-# where are set below.
-
+# Deprecated, will be removed.
option WRITE_WEIGHTED_FILTER requires WRITE
option WRITE_FLUSH requires WRITE
@@ -543,6 +552,7 @@ option WRITE_ANCILLARY_CHUNKS requires WRITE
# These options disable *all* the text chunks if turned off
+option TEXT disabled
option READ_TEXT requires READ_ANCILLARY_CHUNKS enables TEXT
option WRITE_TEXT requires WRITE_ANCILLARY_CHUNKS enables TEXT
@@ -657,11 +667,6 @@ setting MAX_GAMMA_8 default 11
setting GAMMA_THRESHOLD_FIXED default 5000
-# Scaling factor for filter heuristic weighting calculations
-
-setting WEIGHT_SHIFT default 8
-setting COST_SHIFT default 3
-
# Precision to use when converting a floating point value to a PNG
# extension format string in an sCAL chunk (only relevant if the
# floating point API is enabled)
@@ -869,9 +874,12 @@ option SIMPLIFIED_READ_BGR enables FORMAT_BGR,
# Write:
option SIMPLIFIED_WRITE,
- requires WRITE STDIO, SETJMP, WRITE_SWAP, WRITE_PACK,
+ requires WRITE, SETJMP, WRITE_SWAP, WRITE_PACK,
WRITE_tRNS, WRITE_gAMA, WRITE_sRGB, WRITE_cHRM
+# 1.6.22: allow simplified write without stdio support:
+option SIMPLIFIED_WRITE_STDIO requires SIMPLIFIED_WRITE STDIO
+
option SIMPLIFIED_WRITE_AFIRST enables FORMAT_AFIRST,
requires SIMPLIFIED_WRITE WRITE_SWAP_ALPHA
diff --git a/libpng/scripts/pnglibconf.h.prebuilt b/libpng/scripts/pnglibconf.h.prebuilt
index b4ec3c31e..ba7805ff5 100644
--- a/libpng/scripts/pnglibconf.h.prebuilt
+++ b/libpng/scripts/pnglibconf.h.prebuilt
@@ -1,10 +1,10 @@
-/* libpng 1.6.17 STANDARD API DEFINITION */
+/* libpng 1.6.26 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
-/* Libpng version 1.6.17 - March 26, 2015 */
+/* Libpng version 1.6.26 - October 20, 2016 */
-/* Copyright (c) 1998-2014 Glenn Randers-Pehrson */
+/* Copyright (c) 1998-2015 Glenn Randers-Pehrson */
/* This code is released under the libpng license. */
/* For conditions of distribution and use, see the disclaimer */
@@ -101,8 +101,6 @@
#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
#define PNG_SEQUENTIAL_READ_SUPPORTED
#define PNG_SETJMP_SUPPORTED
-#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED
-#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
#define PNG_SET_OPTION_SUPPORTED
#define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
#define PNG_SET_USER_LIMITS_SUPPORTED
@@ -111,6 +109,7 @@
#define PNG_SIMPLIFIED_READ_SUPPORTED
#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED
+#define PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
#define PNG_SIMPLIFIED_WRITE_SUPPORTED
#define PNG_STDIO_SUPPORTED
#define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
@@ -187,11 +186,14 @@
/* end of options */
/* settings */
#define PNG_API_RULE 0
-#define PNG_COST_SHIFT 3
#define PNG_DEFAULT_READ_MACROS 1
#define PNG_GAMMA_THRESHOLD_FIXED 5000
#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE
#define PNG_INFLATE_BUF_SIZE 1024
+#define PNG_LINKAGE_API extern
+#define PNG_LINKAGE_CALLBACK extern
+#define PNG_LINKAGE_DATA extern
+#define PNG_LINKAGE_FUNCTION extern
#define PNG_MAX_GAMMA_8 11
#define PNG_QUANTIZE_BLUE_BITS 5
#define PNG_QUANTIZE_GREEN_BITS 5
@@ -202,7 +204,6 @@
#define PNG_USER_CHUNK_MALLOC_MAX 8000000
#define PNG_USER_HEIGHT_MAX 1000000
#define PNG_USER_WIDTH_MAX 1000000
-#define PNG_WEIGHT_SHIFT 8
#define PNG_ZBUF_SIZE 8192
#define PNG_ZLIB_VERNUM 0 /* unknown */
#define PNG_Z_DEFAULT_COMPRESSION (-1)
diff --git a/libpng/scripts/symbols.def b/libpng/scripts/symbols.def
index 5bdcef20f..612d211ec 100644
--- a/libpng/scripts/symbols.def
+++ b/libpng/scripts/symbols.def
@@ -1,4 +1,4 @@
-;Version 1.6.17
+;Version 1.6.26
;--------------------------------------------------------------
; LIBPNG symbol list as a Win32 DEF file
; Contains all the symbols that can be exported from libpng
@@ -249,3 +249,4 @@ EXPORTS
png_set_check_for_invalid_index @242
png_get_palette_max @243
png_set_option @244
+ png_image_write_to_memory @245
diff --git a/libpng/scripts/test.cmake.in b/libpng/scripts/test.cmake.in
new file mode 100644
index 000000000..fa6a889bb
--- /dev/null
+++ b/libpng/scripts/test.cmake.in
@@ -0,0 +1,31 @@
+# test.cmake.in
+
+# Copyright (C) 2016 Glenn Randers-Pehrson
+# Written by Roger Leigh, 2016
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+set(TEST_OPTIONS "@TEST_OPTIONS@")
+set(TEST_FILES "@TEST_FILES@")
+
+foreach(file ${TEST_FILES})
+ file(TO_NATIVE_PATH "${file}" native_file)
+ list(APPEND NATIVE_TEST_FILES "${native_file}")
+endforeach()
+
+# Add the directory containing libpng to the PATH (Windows only)
+if(WIN32)
+ get_filename_component(LIBPNG_DIR "${LIBPNG}" PATH)
+ file(TO_NATIVE_PATH "${LIBPNG_DIR}" LIBPNG_DIR)
+ set(ENV{PATH} "${LIBPNG_DIR};$ENV{PATH}")
+endif()
+
+execute_process(COMMAND "${CMAKE_COMMAND}" -E echo "Running ${TEST_COMMAND}" ${TEST_OPTIONS} ${NATIVE_TEST_FILES})
+
+execute_process(COMMAND "${TEST_COMMAND}" ${TEST_OPTIONS} ${NATIVE_TEST_FILES}
+ RESULT_VARIABLE TEST_STATUS)
+if(TEST_STATUS)
+ message(FATAL_ERROR "Returned failed status ${TEST_STATUS}!")
+endif()