Imported from libpng-1.2.15beta4.tar

This commit is contained in:
Glenn Randers-Pehrson
2006-12-06 22:06:25 -06:00
parent 948ee23a2a
commit 05db10fda3
52 changed files with 303 additions and 150 deletions

122
scripts/CMakeLists.txt Normal file
View File

@@ -0,0 +1,122 @@
# CMakeLists.txt, for use with cmake. See www.cmake.org
project(libpng)
SET(PNG_VER_MAJOR 1)
SET(PNG_VER_MINOR 2)
SET(PNG_VER_PATCH 15)
# needed packages
find_package(ZLIB REQUIRED)
# command line options
OPTION(PNG_SHARED "Build shared lib" YES)
OPTION(PNG_TESTS "Build pngtest" YES)
#TODO:
# PNG_NO_CONSOLE_IO
# PNG_NO_STDIO
# PNG_CONSOLE_IO_SUPPORTED
# PNGARG
# some others :)
# msvc does not append 'lib' - do it here to have consistent name
if(MSVC)
set(PNG_LIB_NAME lib)
endif(MSVC)
#set(PNG_LIB_NAME ${PNG_LIB_NAME}png-${PNG_VER_MAJOR}.${PNG_VER_MINOR})
set(PNG_LIB_NAME ${PNG_LIB_NAME}png)
# to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d")
# append _static to static lib
if(NOT PNG_SHARED)
set(PNG_LIB_NAME ${PNG_LIB_NAME}_static)
endif(NOT PNG_SHARED)
# our sources
set(libpng_sources
png.h
pngconf.h
png.c
pngerror.c
pngget.c
pngmem.c
pngpread.c
pngread.c
pngrio.c
pngrtran.c
pngrutil.c
pngset.c
pngtrans.c
pngwio.c
pngwrite.c
pngwtran.c
pngwutil.c
)
set(pngtest_sources
pngtest.c
)
# Some needed definitions
add_definitions(-DZLIB_DLL)
if(MSVC)
add_definitions(-DPNG_USE_PNGVCRD -DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
set(libpng_sources ${libpng_sources}
pngvcrd.c
)
else(MSVC)
add_definitions(-DPNG_USE_PNGGCCRD -DPNG_USE_GLOBAL_ARRAYS)
set(libpng_sources ${libpng_sources}
pnggccrd.c
)
endif(MSVC)
# now build our target
include_directories(${CMAKE_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
if(PNG_SHARED)
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
else(PNG_SHARED)
add_library(STATIC ${libpng_sources})
endif(PNG_SHARED)
target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY})
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
endif(PNG_SHARED)
if(PNG_TESTS)
# does not work with msvc due to png_lib_ver issue
add_executable(pngtest ${pngtest_sources})
target_link_libraries(pngtest ${PNG_LIB_NAME})
# add_test(pngtest ${CMAKE_SOURCE_DIR}/pngtest.png)
endif(PNG_TESTS)
# install
install_targets(/bin ${PNG_LIB_NAME})
install(FILES png.h pngconf.h DESTINATION include)
install(FILES png.h pngconf.h DESTINATION include)
install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
# what's with libpng.txt and all the extra files?
# uninstall
# do we need this?
# dist
# do we need this?
# to create msvc import lib for mingw compiled shared lib
# pexports libpng.dll > libpng.def
# lib /def:libpng.def /machine:x86

View File

@@ -8,7 +8,7 @@
# Modeled after libxml-config.
version=1.2.15beta3
version=1.2.15beta4
prefix=""
libdir=""
libs=""

View File

@@ -19,7 +19,7 @@ I_opts="-I${includedir}"
L_opts="-L${libdir}"
R_opts=""
cppflags=""
ccopts="@LIBPNG_NO_ASSEMBLER@"
ccopts="@LIBPNG_NO_MMX@"
ldopts=""
usage()

View File

@@ -5,6 +5,6 @@ includedir=@includedir@/libpng12
Name: libpng
Description: Loads and saves PNG files
Version: 1.2.15beta3
Version: 1.2.15beta4
Libs: -L${libdir} -lpng12
Cflags: -I${includedir} @LIBPNG_NO_ASSEMBLER@
Cflags: -I${includedir} @LIBPNG_NO_MMX@

View File

@@ -5,6 +5,6 @@ includedir=@includedir@/libpng12
Name: libpng
Description: Loads and saves PNG files
Version: 1.2.15beta3
Version: 1.2.15beta4
Libs: -L${libdir} -lpng12
Cflags: -I${includedir}

View File

@@ -8,7 +8,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -8,7 +8,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -20,7 +20,7 @@ LN_SF = ln -f -s
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local

View File

@@ -8,7 +8,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -80,7 +80,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng12
PNGMAJ = 0
CYGDLL = 12
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(CYGDLL).dll

View File

@@ -19,7 +19,7 @@ ZLIBINC=../zlib
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -5,7 +5,7 @@
# Library name:
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12

View File

@@ -12,7 +12,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -26,7 +26,7 @@ DPADD+= ${LIBM} ${LIBZ}
CFLAGS+= -I. -DPNG_USE_PNGGCCRD
.if (${MACHINE_ARCH} != "i386")
CFLAGS+= -DPNG_NO_ASSEMBLER_CODE
CFLAGS+= -DPNG_NO_MMX_CODE
.endif
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \

View File

@@ -16,7 +16,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -8,7 +8,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -6,7 +6,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -76,7 +76,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng12
PNGMAJ = 0
MINGDLL = 12
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=libpng$(MINGDLL).dll

View File

@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng12
LIB= png12
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.2.15beta3
SHLIB_MINOR= 1.2.15beta4
SRCS= pnggccrd.c 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
@@ -27,7 +27,7 @@ CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
# MKLINT= no
# .else
CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
CPPFLAGS+=-DPNG_NO_MMX_CODE
# .endif
CLEANFILES+=pngtest.o pngtest

View File

@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng
LIB= png
SHLIB_MAJOR= 3
SHLIB_MINOR= 1.2.15beta3
SHLIB_MINOR= 1.2.15beta4
SRCS= pnggccrd.c 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
@@ -27,7 +27,7 @@ CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
# MKLINT= no
# .else
CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
CPPFLAGS+=-DPNG_NO_MMX_CODE
# .endif
CLEANFILES+=pngtest.o pngtest

View File

@@ -7,7 +7,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.2.15beta3
SHLIB_MINOR= 1.2.15beta4
LIB= png
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
@@ -17,7 +17,7 @@ SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
HDRS= png.h pngconf.h
CFLAGS+= -Wall
CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBLER_CODE -DPNG_USE_PNGGCCRD
CPPFLAGS+= -I${.CURDIR} -DPNG_NO_MMX_CODE -DPNG_USE_PNGGCCRD
NOPROFILE= Yes

View File

@@ -9,7 +9,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -6,7 +6,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:

View File

@@ -6,7 +6,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -47,7 +47,7 @@ WARNMORE=-fullwarn
# Note: -KPIC is the default anyhow
#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_USE_PNGGCCRD # -g -DPNG_DEBUG=5
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD \
-DPNG_NO_ASSEMBLER_CODE
-DPNG_NO_MMX_CODE
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
@@ -96,7 +96,7 @@ libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE\"; \
echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_MMX_CODE\"; \
echo ccopts=\"$(ABI)\"; \
echo ldopts=\"$(ABI)\"; \
echo L_opts=\"-L$(LIBPATH)\"; \

View File

@@ -8,7 +8,7 @@
# Library name:
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12

View File

@@ -8,7 +8,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.15beta3
PNGMIN = 1.2.15beta4
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -91,7 +91,7 @@ libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE\"; \
echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_MMX_CODE\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
echo R_opts=\"-R$(LIBPATH)\"; \
echo libs=\"-lpng12 -lz -lm\"; \

View File

@@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
; Version 1.2.15beta3
; Version 1.2.15beta4
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"

View File

@@ -5,7 +5,7 @@
LIBRARY
EXPORTS
;Version 1.2.15beta3
;Version 1.2.15beta4
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3