Imported from libpng-1.2.2.tar
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index 3637c87..2808d5b 100644
--- a/scripts/libpng.pc.in
+++ b/scripts/libpng.pc.in
@@ -6,6 +6,6 @@
 
 Name: libpng12
 Description: Loads and saves PNG files
-Version: 1.2.2rc1
+Version: 1.2.2
 Libs: -L${libdir} -lpng12
 Cflags: -I${includedir}/libpng12
diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu
index 90680f8..4d12233 100644
--- a/scripts/makefile.32sunu
+++ b/scripts/makefile.32sunu
@@ -33,7 +33,7 @@
 
 LIBNAME=libpng12
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 INCPATH=$(prefix)/include
diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu
index 80f04db..4b2fe85 100644
--- a/scripts/makefile.64sunu
+++ b/scripts/makefile.64sunu
@@ -33,7 +33,7 @@
 
 LIBNAME=libpng12
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 INCPATH=$(prefix)/include
diff --git a/scripts/makefile.aix b/scripts/makefile.aix
index 4743eac..ef8c3bd 100644
--- a/scripts/makefile.aix
+++ b/scripts/makefile.aix
@@ -18,7 +18,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 prefix=/usr/local
diff --git a/scripts/makefile.beos b/scripts/makefile.beos
index dfb8e98..c0e957e 100644
--- a/scripts/makefile.beos
+++ b/scripts/makefile.beos
@@ -14,7 +14,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 ALIGN=
diff --git a/scripts/makefile.cygwin b/scripts/makefile.cygwin
index 939e3aa..b7e3a59 100644
--- a/scripts/makefile.cygwin
+++ b/scripts/makefile.cygwin
@@ -41,7 +41,7 @@
 
 PNGMAJ = 0
 #PNGDLL = $12
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGMIN_BASE = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin
index a828b14..cefb724 100644
--- a/scripts/makefile.darwin
+++ b/scripts/makefile.darwin
@@ -25,7 +25,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng12
 
diff --git a/scripts/makefile.dec b/scripts/makefile.dec
index d6acac2..55b1695 100644
--- a/scripts/makefile.dec
+++ b/scripts/makefile.dec
@@ -17,7 +17,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng12
 
diff --git a/scripts/makefile.freebsd b/scripts/makefile.freebsd
new file mode 100644
index 0000000..3423768
--- /dev/null
+++ b/scripts/makefile.freebsd
@@ -0,0 +1,93 @@
+# makefile for libpng under FreeBSD
+# Copyright (C) 2002 Glenn Randers-Pehrson and Andrey A. Chernov
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+# For conditions of distribution and use, see copyright notice in png.h
+
+# where make install puts libpng.a and png.h
+prefix=/usr/local
+
+PNGMAJ= 5
+.if (${OBJFORMAT} == "elf")
+PNGVER= $(PNGMAJ)
+.else
+PNGMIN= 0
+PNGVER= $(PNGMAJ).$(PNGMIN)
+.endif
+
+CFLAGS+= -I. -DPNG_USE_PNGGCCRD
+.if (${MACHINE_ARCH} != "i386")
+CFLAGS+= -DPNG_NO_ASSEMBLER_CODE
+.endif
+LDFLAGS+=-L. -lpng -lz -lm -static
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+	pngwtran.o pngmem.o pngerror.o pngpread.o pnggccrd.o
+
+.SUFFIXES: .c .so .o
+
+.c.so:
+	${CC} ${CFLAGS} -fPIC -DPIC -o $@ -c $<
+
+all: libpng.a libpng.so.${PNGVER} pngtest
+
+libpng.a: $(OBJS)
+	ar rc $@  $(OBJS)
+	$(RANLIB) $@
+
+libpng.so.${PNGVER}: $(OBJS:S/o$/so/g)
+.if (${OBJFORMAT} == "elf")
+	${CC} -shared -Wl,-x,-soname,$@ -o $@ $(OBJS:S/o$/so/g) -lz -lm
+.else
+	${CC} -shared -Wl,-x -o $@ $(OBJS:S/o$/so/g) -lz -lm
+.endif
+
+pngtest: pngtest.o libpng.a
+	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+	./pngtest
+
+install: libpng.a libpng.so.${PNGVER}
+	-@mkdir $(prefix)/include/libpng
+	${INSTALL} -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \
+		png.h pngconf.h $(prefix)/include/libpng
+	ln -sf libpng/png.h $(prefix)/include/png.h
+	ln -sf libpng/pngconf.h $(prefix)/include/pngconf.h
+	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+		libpng.a libpng.so.${PNGVER} $(prefix)/lib
+	$(RANLIB) $(prefix)/lib/libpng.a
+	ln -sf libpng.so.${PNGVER} $(prefix)/lib/libpng.so
+	/sbin/ldconfig -R
+	${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+		libpng.3 libpngpf.3 $(prefix)/man/man3
+	${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+		png.5 $(prefix)/man/man5
+
+clean:
+	rm -f *.o libpng.a libpng.so libpng.so.${PNGVER} pngtest pngout.png
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+	chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h
+pngerror.o: png.h pngconf.h
+pngrio.o: png.h pngconf.h
+pngwio.o: png.h pngconf.h
+pngmem.o: png.h pngconf.h
+pngset.o: png.h pngconf.h
+pngget.o: png.h pngconf.h
+pngread.o: png.h pngconf.h
+pngrtran.o: png.h pngconf.h
+pngrutil.o: png.h pngconf.h
+pngtest.o: png.h pngconf.h
+pngtrans.o: png.h pngconf.h
+pngwrite.o: png.h pngconf.h
+pngwtran.o: png.h pngconf.h
+pngwutil.o: png.h pngconf.h
+pngpread.o: png.h pngconf.h
+pnggccrd.o: png.h pngconf.h
+
diff --git a/scripts/makefile.gcmmx b/scripts/makefile.gcmmx
index 9c42852..18a5070 100644
--- a/scripts/makefile.gcmmx
+++ b/scripts/makefile.gcmmx
@@ -15,7 +15,7 @@
 
 LIBNAME = libpng12
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 CC=gcc
@@ -43,7 +43,7 @@
 # Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety
 ### for generic gcc:
 CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \
-       	-O3 $(ALIGN) -funroll-loops \
+	-O3 $(ALIGN) -funroll-loops \
 	-fomit-frame-pointer  # $(WARNMORE) -g -DPNG_DEBUG=5
 ### for gcc 2.95.2 on 686:
 #CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc
index 3a1d3c5..081a01e 100644
--- a/scripts/makefile.hpgcc
+++ b/scripts/makefile.hpgcc
@@ -35,7 +35,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng12
 
diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux
index 9a72da0..996cb95 100644
--- a/scripts/makefile.hpux
+++ b/scripts/makefile.hpux
@@ -19,7 +19,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng12
 
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index 2a0202e..a87721f 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -5,7 +5,7 @@
 
 LIBNAME = libpng12
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 CC=gcc
diff --git a/scripts/makefile.macosx b/scripts/makefile.macosx
index 447bf0f..5acb765 100644
--- a/scripts/makefile.macosx
+++ b/scripts/makefile.macosx
@@ -20,7 +20,7 @@
 LDSHARED=cc -lz -dynamiclib -compatibility_version $(VER) -current_version $(VER)
 
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 VER = $(PNGMAJ).$(PNGMIN)
 LIBNAME=libpng12
 SHAREDLIB_POSTFIX=dylib
@@ -79,11 +79,11 @@
 	chmod 755 $(LIBPATH)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
 	(cd $(LIBPATH); \
 	ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
-        libpng.$(SHARED_POSTFIX); \
+	libpng.$(SHARED_POSTFIX); \
 	ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
-        libpng.3.$(SHARED_POSTFIX); \
+	libpng.3.$(SHARED_POSTFIX); \
 	ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
-        libpng.3.$(PNGMIN).$(SHARED_POSTFIX); \
+	libpng.3.$(PNGMIN).$(SHARED_POSTFIX); \
 	ln -sf $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \
 	$(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \
 	ln -sf $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
new file mode 100644
index 0000000..98be5df
--- /dev/null
+++ b/scripts/makefile.ne12bsd
@@ -0,0 +1,44 @@
+# makefile for libpng for NetBSD for the standard
+# make obj && make depend && make && make test
+# make includes && make install
+# Copyright (C) 2002 Patrick R.L. Welche
+# For conditions of distribution and use, see copyright notice in png.h
+
+# You should also run makefile.netbsd
+
+LOCALBASE?=/usr/local
+LIBDIR=	${LOCALBASE}/lib
+MANDIR= ${LOCALBASE}/man
+INCSDIR=${LOCALBASE}/include/libpng12
+
+LIB=	png12
+SHLIB_MAJOR=	0
+SHLIB_MINOR=	1.2.2
+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
+INCS=	png.h pngconf.h
+MAN=	libpng.3 libpngpf.3 png.5
+
+CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
+
+# something like this for mmx assembler, but it core dumps for me at the moment
+# .if ${MACHINE_ARCH} == "i386"
+#   CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
+#   MKLINT= no
+# .else
+    CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
+# .endif
+
+CLEANFILES+=pngtest.o pngtest
+
+pngtest.o:	pngtest.c
+	${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
+
+pngtest:	pngtest.o libpng.a
+	${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
+
+test:	pngtest
+	cd ${.CURDIR} && ${.OBJDIR}/pngtest
+
+.include <bsd.lib.mk>
diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd
index 9b7b2e4..348f838 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -1,22 +1,22 @@
 # makefile for libpng for NetBSD for the standard
 # make obj && make depend && make && make test
 # make includes && make install
-# Copyright (C) 2001 Patrick R.L. Welche
+# Copyright (C) 2002 Patrick R.L. Welche
 # For conditions of distribution and use, see copyright notice in png.h
 
+# You should also run makefile.ne0bsd
+
 LOCALBASE?=/usr/local
 LIBDIR=	${LOCALBASE}/lib
 MANDIR= ${LOCALBASE}/man
 INCSDIR=${LOCALBASE}/include/libpng
-# Should also copy png.h and pngconf.h to $(INCSDIR)/libpng12.
 
-LIB=png
-# Shared lib name should be png12.
-SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.2.2rc1
+LIB=	png
+SHLIB_MAJOR=	3
+SHLIB_MINOR=	1.2.2
 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
+		pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
+		pngwtran.c pngmem.c pngerror.c pngpread.c
 INCS=	png.h pngconf.h
 MAN=	libpng.3 libpngpf.3 png.5
 
diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd
index 4240ede..4a080b5 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -7,7 +7,7 @@
 MANDIR= ${PREFIX}/man/cat
 
 SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.2.2rc1
+SHLIB_MINOR=	1.2.2
 
 LIB=	png
 SRCS=	png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/makefile.sco b/scripts/makefile.sco
index c5050de..fceeaa7 100644
--- a/scripts/makefile.sco
+++ b/scripts/makefile.sco
@@ -25,7 +25,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng12
 
diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc
index 4b98287..eb7571e 100644
--- a/scripts/makefile.sggcc
+++ b/scripts/makefile.sggcc
@@ -24,7 +24,7 @@
 LDSHARED=CC $(ABI) -shared
 
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 # See "man dso" for info about shared objects
 LIBS=libpng12.so.$(PNGMAJ).$(PNGVER)
diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi
index b224da4..d201416 100644
--- a/scripts/makefile.sgi
+++ b/scripts/makefile.sgi
@@ -31,7 +31,7 @@
 # See "man dso" for info about shared objects
 LIBNAME=libpng12
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 RANLIB=echo
diff --git a/scripts/makefile.so9 b/scripts/makefile.so9
index 3a8a314..6640ecd 100644
--- a/scripts/makefile.so9
+++ b/scripts/makefile.so9
@@ -35,7 +35,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng12
 
diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris
index 44cd0e3..1a857a3 100644
--- a/scripts/makefile.solaris
+++ b/scripts/makefile.solaris
@@ -32,7 +32,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
 PNGMAJ = 0
-PNGMIN = 1.2.2rc1
+PNGMIN = 1.2.2
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng12
 
diff --git a/scripts/pngdef.pas b/scripts/pngdef.pas
index df13231..d22c308 100644
--- a/scripts/pngdef.pas
+++ b/scripts/pngdef.pas
@@ -7,7 +7,7 @@
 interface
 
 const
-  PNG_LIBPNG_VER_STRING = '1.2.2rc1';
+  PNG_LIBPNG_VER_STRING = '1.2.2';
   PNG_LIBPNG_VER        =  10202;
 
 type
diff --git a/scripts/pngos2.def b/scripts/pngos2.def
index 153b33a..35c904f 100644
--- a/scripts/pngos2.def
+++ b/scripts/pngos2.def
@@ -2,7 +2,7 @@
 ; PNG.LIB module definition file for OS/2
 ;----------------------------------------
 
-; Version 1.2.2rc1
+; Version 1.2.2
 
 LIBRARY		PNG
 DESCRIPTION	"PNG image compression library for OS/2"
diff --git a/scripts/xmakefile.freebsd b/scripts/xmakefile.freebsd
new file mode 100644
index 0000000..e07077d
--- /dev/null
+++ b/scripts/xmakefile.freebsd
@@ -0,0 +1,77 @@
+# makefile for libpng under FreeBSD
+# Copyright (C) 2002 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+# For conditions of distribution and use, see copyright notice in png.h
+
+# where make install puts libpng.a and png.h
+prefix=/usr/local
+
+# Building shared libraries is handled by the FreeBSD external Makefile,
+# which uses this makefile.
+
+.if ${MACHINE_ARCH} == "i386"
+CFLAGS+= -I. -O -DPNG_USE_PNGGCCRD
+.else
+CFLAGS+= -I. -O -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE
+.endif
+LDFLAGS+=-L. -lpng -lz -lm
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+	pngwtran.o pngmem.o pngerror.o pngpread.o pnggccrd.o
+
+all: libpng.a pngtest
+
+libpng.a: $(OBJS)
+	ar rc $@  $(OBJS)
+	$(RANLIB) $@
+
+pngtest: pngtest.o libpng.a
+	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+	./pngtest
+
+install: libpng.a
+	-@mkdir $(prefix)/include
+	-@mkdir $(prefix)/include/libpng
+	-@mkdir $(prefix)/lib
+	cp png.h $(prefix)/include
+	cp pngconf.h $(prefix)/include
+	chmod 644 $(prefix)/include/png.h
+	chmod 644 $(prefix)/include/pngconf.h
+	cp png.h $(prefix)/include/libpng
+	cp pngconf.h $(prefix)/include/libpng
+	chmod 644 $(prefix)/include/libpng/png.h
+	chmod 644 $(prefix)/include/libpng/pngconf.h
+	cp libpng.a $(prefix)/lib
+	chmod 644 $(prefix)/lib/libpng.a
+	$(RANLIB) $(prefix)/lib/libpng.a
+
+clean:
+	rm -f *.o libpng.a pngtest pngout.png
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+	chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h
+pngerror.o: png.h pngconf.h
+pngrio.o: png.h pngconf.h
+pngwio.o: png.h pngconf.h
+pngmem.o: png.h pngconf.h
+pngset.o: png.h pngconf.h
+pngget.o: png.h pngconf.h
+pngread.o: png.h pngconf.h
+pngrtran.o: png.h pngconf.h
+pngrutil.o: png.h pngconf.h
+pngtest.o: png.h pngconf.h
+pngtrans.o: png.h pngconf.h
+pngwrite.o: png.h pngconf.h
+pngwtran.o: png.h pngconf.h
+pngwutil.o: png.h pngconf.h
+pngpread.o: png.h pngconf.h
+pnggccrd.o: png.h pngconf.h
+