summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/ljpeg/DESCR30
-rw-r--r--graphics/ljpeg/Makefile27
-rw-r--r--graphics/ljpeg/PLIST11
-rw-r--r--graphics/ljpeg/distinfo5
-rw-r--r--graphics/ljpeg/patches/patch-aa43
5 files changed, 116 insertions, 0 deletions
diff --git a/graphics/ljpeg/DESCR b/graphics/ljpeg/DESCR
new file mode 100644
index 00000000000..b1a152d2e8d
--- /dev/null
+++ b/graphics/ljpeg/DESCR
@@ -0,0 +1,30 @@
+In 1992, a joint ISO/CCITT committee known as JPEG (Joint Photographic
+Experts Group) established and published the first draft international
+standard (DIS) for compressing continuous-tone still images, both
+grayscale and color. JPEG has defined four mode of operations,
+summarized them as follows.
+
+(1) Sequential encoding: each image component is encoded in a single
+ left-to-right, top-to-bottom scan;
+(2) Progressive encoding: the image is encoded in multiple scans for
+ applications in which transmission time is long, and the viewer
+ prefers to watch the image build up in multiple coarse-to-clear
+ passes;
+(3) Lossless encoding: the images is encoded to guarantee exact recovery
+ of every source image sample value (even though the result is low
+ compression compared to the lossy modes);
+(4) Hierarchical encoding: the image is encoded at multiple resolutions
+ so that lower-resolution versions may be accessed without first having
+ to decompress the image at its full resolution.
+
+Our lossless JPEG encoding program has an automatic prediction
+selection value (PSV) selector which selects the best PSV among a
+user provided or default set of PSVs. This selector guarantees the
+best compression ratio for lossless JPEG.
+
+The encoding program "pnmtoljpg" compresses a Portable Pixmap or
+Portable Graymap image to a lossles JPEG (ljpg) image using the
+JPEG standard (DIS) lossless mode of operation. The decoding program
+"ljpgtopnm" decodes a ljpg image to either a Portable Pixmap or
+Portable Graymap image depending on the number of color components
+stored in the ljpg image file.
diff --git a/graphics/ljpeg/Makefile b/graphics/ljpeg/Makefile
new file mode 100644
index 00000000000..5261288dadf
--- /dev/null
+++ b/graphics/ljpeg/Makefile
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/12/21 21:30:14 wiz Exp $
+#
+
+DISTNAME= ljpg
+PKGNAME= ljpg-1.0
+WRKSRC= ${WRKDIR}
+CATEGORIES= graphics
+MASTER_SITES= ftp://ftp.cs.cornell.edu/pub/multimed/
+EXTRACT_SUFX= .tar.Z
+
+MAINTAINER= wiz@NetBSD.org
+HOMEPAGE= ftp://ftp.cs.cornell.edu/pub/multimed/
+COMMENT= Lossless JPEG codec
+
+DIST_SUBDIR= ${PKGNAME_NOREV}
+
+USE_BUILDLINK2= yes
+ALL_TARGET= default
+
+post-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ljpeg
+ ${INSTALL_DATA} ${WRKSRC}/Copyright ${PREFIX}/share/doc/ljpeg
+ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/ljpeg
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ljpeg
+ ${INSTALL_DATA} ${WRKSRC}/F-18* ${PREFIX}/share/examples/ljpeg
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/ljpeg/PLIST b/graphics/ljpeg/PLIST
new file mode 100644
index 00000000000..563c177d642
--- /dev/null
+++ b/graphics/ljpeg/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/12/21 21:30:14 wiz Exp $
+bin/ljpgtopnm
+bin/pnmtoljpg
+man/man1/ljpgtopnm.1
+man/man1/pnmtoljpg.1
+share/doc/ljpeg/Copyright
+share/doc/ljpeg/README
+share/examples/ljpeg/F-18.ljpg
+share/examples/ljpeg/F-18.ppm
+@dirrm share/examples/ljpeg
+@dirrm share/doc/ljpeg
diff --git a/graphics/ljpeg/distinfo b/graphics/ljpeg/distinfo
new file mode 100644
index 00000000000..5b428cdc486
--- /dev/null
+++ b/graphics/ljpeg/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/12/21 21:30:14 wiz Exp $
+
+SHA1 (ljpg-1.0/ljpg.tar.Z) = 47071fad1f11a3b9241a34b188ab07d54dcd13bc
+Size (ljpg-1.0/ljpg.tar.Z) = 334459 bytes
+SHA1 (patch-aa) = 562ce4a8f82c6ed59b4b730f59822d4749e925a3
diff --git a/graphics/ljpeg/patches/patch-aa b/graphics/ljpeg/patches/patch-aa
new file mode 100644
index 00000000000..5f24f757e56
--- /dev/null
+++ b/graphics/ljpeg/patches/patch-aa
@@ -0,0 +1,43 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/12/21 21:30:14 wiz Exp $
+
+--- Makefile.orig Wed Jun 22 18:48:40 1994
++++ Makefile
+@@ -1,19 +1,19 @@
+ #
+ # Set BINDIR to where you want the binaries to go.
+ #
+-BINDIR= /usr/public/sun4/bin
++BINDIR= ${PREFIX}/bin
+
+ #
+ # Set MANDIR to where you want the man pages to go.
+ #
+-MANDIR= /usr/public/share/man/man1
++MANDIR= ${PREFIX}/man/man1
+
+ #
+ # Select your favorite compiler and compilation flags here.
+ #
+ #CC = cc
+-CC = gcc
+-CFLAGS= -I. -O2
++#CC = gcc
++CFLAGS+= -I.
+ #CFLAGS= +O3 -I.
+ #CFLAGS= -O2 -DDEBUG
+
+@@ -36,12 +36,8 @@ ljpgtopnm: $(DECODE_OBJ)
+ $(CC) ${CFLAGS} -o $@ $(DECODE_OBJ)
+
+ install: pnmtoljpg ljpgtopnm
+- cp pnmtoljpg ljpgtopnm $(BINDIR)
+- chmod 555 $(BINDIR)/pnmtoljpg
+- chmod 555 $(BINDIR)/ljpgtopnm
+- cp pnmtoljpg.1 ljpgtopnm.1 $(MANDIR)
+- chmod 444 $(MANDIR)/pnmtoljpg.1
+- chmod 444 $(MANDIR)/ljpgtopnm.1
++ ${BSD_INSTALL_PROGRAM} pnmtoljpg ljpgtopnm $(BINDIR)
++ ${BSD_INSTALL_MAN} pnmtoljpg.1 ljpgtopnm.1 $(MANDIR)
+
+ clean:
+ rm -f core *.o pnmtoljpg ljpgtopnm