Add libpng port.

This commit is contained in:
angelos 1997-12-03 03:39:50 +00:00
parent eb9f560cd5
commit e82ae8beab
6 changed files with 134 additions and 0 deletions

22
graphics/png/Makefile Normal file
View File

@ -0,0 +1,22 @@
# OpenBSD makefile for: PNG images library
# Version required: 0.96
# Date created: December 2, 1997
# Whom: Angelos D. Keromytis
#
# $OpenBSD: Makefile,v 1.1.1.1 1997/12/03 03:39:50 angelos Exp $
#
DISTNAME= libpng-0.96
PKGNAME= png-0.96
CATEGORIES= graphics
MASTER_SITES= ftp://ftp.uu.net/graphics/png/src/
EXTRACT_SUFX= .tgz
MAINTAINER= angelos@openbsd.org
MAKEFILE= makefile
post-install:
${LDCONFIG} -m ${PREFIX}/lib
.include <bsd.port.mk>

1
graphics/png/files/md5 Normal file
View File

@ -0,0 +1 @@
MD5 (libpng-0.96.tgz) = 285eac49f334e8c82a7dad41c2850115

View File

@ -0,0 +1,96 @@
*** makefile.orig Fri May 16 10:53:30 1997
--- makefile Tue Jun 24 16:53:47 1997
***************
*** 5,33 ****
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
! ZLIBLIB=../zlib
! ZLIBINC=../zlib
! CC=cc
! CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
! LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
#RANLIB=echo
RANLIB=ranlib
# where make install puts libpng.a and png.h
! prefix=/usr/local
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
! all: libpng.a pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
pngtest: pngtest.o libpng.a
$(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
--- 5,42 ----
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
! #ZLIBLIB=../zlib
! #ZLIBINC=../zlib
! VER=0.96
! #CC=cc
! #CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
! LDFLAGS=-L. -lpng -lz -lm -static
#RANLIB=echo
RANLIB=ranlib
# where make install puts libpng.a and png.h
! prefix=${PREFIX}
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
! .SUFFIXES: .c .so .o
!
! .c.so:
! ${CC} -fpic -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
!
! all: libpng.a libpng.so.${VER}
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
+ libpng.so.${VER}: $(OBJS:S/o$/so/g)
+ ld -Bshareable -x -assert pure-text -o $@ $(OBJS:S/o$/so/g) -lz
+
pngtest: pngtest.o libpng.a
$(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
***************
*** 37,48 ****
install: libpng.a
-@mkdir $(prefix)/include
-@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 libpng.a $(prefix)/lib
! chmod 644 $(prefix)/lib/libpng.a
clean:
rm -f *.o libpng.a pngtest pngout.png
--- 46,54 ----
install: libpng.a
-@mkdir $(prefix)/include
-@mkdir $(prefix)/lib
! ${INSTALL} -c -m 644 -o ${BINOWN} -g ${BINGRP} png.h pngconf.h $(prefix)/include
! ${INSTALL} -c -m 644 -o ${BINOWN} -g ${BINGRP} libpng.a libpng.so.${VER} $(prefix)/lib
! ranlib $(prefix)/lib/libpng.a
clean:
rm -f *.o libpng.a pngtest pngout.png

1
graphics/png/pkg/COMMENT Normal file
View File

@ -0,0 +1 @@
Library for manipulating PNG images.

8
graphics/png/pkg/DESCR Normal file
View File

@ -0,0 +1,8 @@
Libpng was written as a companion to the PNG specification, as a
way to reduce the amount of time and effort it takes to support
the PNG file format in application programs. Most users will not
have to modify the library significantly; advanced users may want
to modify it more. The library was coded for both users. All
attempts were made to make it as complete as possible, while
keeping the code easy to understand. Currently, this library
only supports C. Support for other languages is being considered.

6
graphics/png/pkg/PLIST Normal file
View File

@ -0,0 +1,6 @@
include/png.h
include/pngconf.h
lib/libpng.a
@exec ranlib %D/%F
lib/libpng.so.0.96
@exec /sbin/ldconfig -m %B