[NEW PORT] graphics/jpeg-mmx: IJG's jpeg compression utilities with MMX optimization

IJG's jpeg compression utilities with MMX optimization

PR:		ports/69829
Submitted by:	include/jpeg-mmx
This commit is contained in:
Edwin Groothuis 2004-10-12 05:28:58 +00:00
parent 512996d234
commit b55b5dc42a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=118806
8 changed files with 57 additions and 173 deletions

View file

@ -188,6 +188,7 @@
SUBDIR += jhead
SUBDIR += jpatch
SUBDIR += jpeg
SUBDIR += jpeg-mmx
SUBDIR += jpeg2ps-a4
SUBDIR += jpeg2ps-letter
SUBDIR += jpeginfo

View file

@ -4,56 +4,60 @@
#
# $FreeBSD$
#
# PLEASE update print/ghostscript5 (there's a symlink that uses a hardwired
# version number) when updating this port. Thank you.
PORTNAME= jpeg
PORTVERSION= 6b
PORTREVISION= 3
PORTNAME= jpeg-mmx
PORTVERSION= 0.1.5
CATEGORIES= graphics
MASTER_SITES= http://www.ijg.org/files/ \
ftp://ftp.uu.net/graphics/jpeg/ \
http://sylvana.net/jpegcrop/:exif
DISTNAME= jpegsrc.v${PORTVERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
jpegexiforient.c:exif exifautotran.txt:exif
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= mjpeg
MAINTAINER= dinoex@FreeBSD.org
COMMENT= IJG's jpeg compression utilities
MAINTAINER= ahze@ahze.net
COMMENT= IJG's jpeg compression utilities with MMX optimization
WRKSRC= ${WRKDIR}/jpeg-6b
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
RUN_DEPENDS= cjpeg:${PORTSDIR}/graphics/jpeg
ONLY_FOR_ARCHS= i386
USE_LIBTOOL_VER=13
USE_GMAKE= yes
INSTALLS_SHLIB= yes
CONFIGURE_ARGS= --enable-shared --enable-static
ADDITIONAL_HEADER= jinclude.h jpegint.h
JPEG_EXT= -mmx
INCDIR= include/${PORTNAME}
BIN_FILES= cjpeg djpeg jpegtran
INC_FILES= jconfig.h jerror.h jinclude.h jmorecfg.h jpegint.h jpeglib.h
LIB_FILES= libjpeg-mmx.a libjpeg-mmx.so libjpeg-mmx.so.62
PORTDOCS= README coderules.doc filelist.doc install.doc jconfig.doc \
libjpeg.doc structure.doc usage.doc wizard.doc
PLIST_DIRS= include/jpeg-mmx
PLIST_FILES= ${BIN_FILES:S|^|bin/|:S|$|${JPEG_EXT}|} \
${INC_FILES:S|^|${INCDIR}/|} \
${LIB_FILES:S|^|lib/|}
# define J_MAXMEM like "make J_MAXMEM=32" to limit max processing memory to 32Mb
.if defined(J_MAXMEM)
CONFIGURE_ARGS+= --enable-maxmem=${J_MAXMEM}
.endif
MAN1= cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
post-extract:
@${CP} ${DISTDIR}/jpegexiforient.c ${WRKSRC}/
@${CP} ${DISTDIR}/exifautotran.txt ${WRKSRC}/exifautotran
post-build:
@cd ${WRKSRC} && ${CC} ${CFLAGS} -o jpegexiforient jpegexiforient.c
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${PREFIX}/share/doc/jpeg
@${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/jpeg
@${INSTALL_DATA} ${WRKSRC}/*.doc ${PREFIX}/share/doc/jpeg
.endif
.for header in ${ADDITIONAL_HEADER}
@${INSTALL_DATA} ${WRKSRC}/${header} ${PREFIX}/include
do-install:
.for f in ${BIN_FILES}
@${INSTALL_PROGRAM} ${WRKSRC}/.libs/${f} ${PREFIX}/bin/${f}${JPEG_EXT}
.endfor
${INSTALL_PROGRAM} ${WRKSRC}/jpegexiforient ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/exifautotran ${PREFIX}/bin
@${MKDIR} ${PREFIX}/${INCDIR}
.for f in ${INC_FILES}
@${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/${INCDIR}
.endfor
.for f in ${LIB_FILES}
@${INSTALL_DATA} ${WRKSRC}/.libs/${f} ${PREFIX}/lib/
.endfor
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/*.doc ${DOCSDIR}
.endif
.include <bsd.port.mk>

View file

@ -1,6 +1,2 @@
MD5 (jpegsrc.v6b.tar.gz) = dbd5f3b47ed13132f04c685d608a7547
SIZE (jpegsrc.v6b.tar.gz) = 613261
MD5 (jpegexiforient.c) = ff4657764cb885b9aec06449507bf29d
SIZE (jpegexiforient.c) = 8192
MD5 (exifautotran.txt) = c1cd9c876f900601682cf9db8d232386
SIZE (exifautotran.txt) = 684
MD5 (jpeg-mmx-0.1.5.tar.gz) = da10eb1bdea0ca3798636b2b7a645ed8
SIZE (jpeg-mmx-0.1.5.tar.gz) = 578350

View file

@ -1,5 +1,14 @@
--- configure.orig Sat Mar 21 14:08:57 1998
+++ configure Mon Aug 4 21:49:44 2003
--- configure.orig Tue Feb 3 16:49:23 2004
+++ configure Fri Jul 30 04:20:34 2004
@@ -1530,7 +1530,7 @@
if test "x$LTSHARED" != xno -o "x$LTSTATIC" != xno; then
USELIBTOOL="yes"
LIBTOOL="./libtool"
- O="lo"
+ O="o"
A="la"
LN='$(LIBTOOL) --mode=link $(CC)'
INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}'
@@ -1559,7 +1559,8 @@
if test "x$LTSTATIC" = xno; then
disable_static="--disable-static"
@ -10,12 +19,3 @@
fi
# Select memory manager depending on user input.
@@ -1647,7 +1648,7 @@
# Extract the library version ID from jpeglib.h.
echo $ac_n "checking libjpeg version number""... $ac_c" 1>&6
echo "configure:1650: checking libjpeg version number" >&5
-JPEG_LIB_VERSION=`sed -e '/^#define JPEG_LIB_VERSION/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h`
+JPEG_LIB_VERSION=9
echo "$ac_t""$JPEG_LIB_VERSION" 1>&6

View file

@ -1,7 +0,0 @@
--- exifautotran.orig Thu Mar 18 06:25:27 2004
+++ exifautotran Thu Mar 18 06:28:29 2004
@@ -1,3 +1,4 @@
+#!/bin/sh
# exifautotran [list of files]
#
# Transforms Exif files so that Orientation becomes 1

View file

@ -1,68 +0,0 @@
--- jpegtran.1.orig Sun Aug 3 16:01:01 1997
+++ jpegtran.1 Fri Oct 8 14:51:56 2004
@@ -71,12 +71,23 @@
.PP
The image can be losslessly transformed by giving one of these switches:
.TP
+.B \-crop WxH+X+Y
+Crop to a rectangular subarea of width W, height H starting at point X,Y.
+Allows the Width and or Height of the image to exceed the image.
+.TP
+.B \-drop +X+Y
+Drop another image. Overlay part of the source image at point width
+W + height H.
+.TP
.B \-flip horizontal
Mirror image horizontally (left-right).
.TP
.B \-flip vertical
Mirror image vertically (top-bottom).
.TP
+.B \-perfect
+Fails with an error if there is any loss durring the transformation.
+.TP
.B \-rotate 90
Rotate image 90 degrees clockwise.
.TP
@@ -161,6 +172,14 @@
Copy all extra markers. This setting preserves miscellaneous markers
found in the source file, such as JFIF thumbnails and Photoshop settings.
In some files these extra markers can be sizable.
+See 'EXIF FILES' for special tratement of EXIF markers.
+.TP
+.B \-copy exif
+This setting preserves the EXIF marker, commonly found in JPEG files produced
+by digital cameras, in addition to any comment markers. If there is an EXIF
+marker it is copied and the JFIF marker (incompatible with EXIF) is
+omitted. If there is no EXIF marker a JFIF one is emitted as usual. See 'EXIF
+FILES' for special tratement of EXIF markers.
.PP
The default behavior is
.BR "\-copy comments" .
@@ -189,6 +208,26 @@
.B \-debug
Same as
.BR \-verbose .
+.SH EXIF FILES
+The EXIF variety of JPEG files, which are often produced by digital cameras,
+are recognized by jpegtran as EXIF files (i.e. not as JFIF, the
+usual variety of JPEG files). If the input file is recognized as EXIF (i.e.,
+there is an EXIF marker and no JFIF marker) the '-copy exif' option is
+automatically turned on if '-copy comments', or no '-copy' option, was
+specified. Thus, unless '-copy none' is specified an EXIF file is kept as EXIF
+and not converted to JFIF.
+.PP
+If a geometrical transformation is applied (e.g., rotate, transpose) the EXIF
+width and height fields are set to the width and height of the output
+image. Furthermore, the orientation field is reset to one, meaning tha the
+orientation of the output image is upright (i.e. normal).
+.PP
+Note that an explicitely given '-copy exif' option will output an EXIF file if
+the input is an EXIF file that was saved as JFIF, and that the EXIF marker is
+still present. This option is useful for recovering EXIF files that where
+converted to JFIF by a non EXIF-aware software. Note however, that the data in
+the EXIF marker is not validated, unless a geometrical transformation is
+applied.
.SH EXAMPLES
.LP
This example converts a baseline JPEG file to progressive form:

View file

@ -1,23 +1,7 @@
The Independent JPEG Group's JPEG software
==========================================
IJG's jpeg compression utilities and libraries with MMX optimization
This distribution contains the sixth public release of the Independent JPEG
Group's free JPEG software. You are welcome to redistribute this software and
to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
This is NOT a drop in replacement to graphics/jpeg
Serious users of this software (particularly those incorporating it into
larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
our electronic mailing list. Mailing list members are notified of updates
and have a chance to participate in technical discussions, etc.
See graphics/jpeg/pkg-descr for more information
This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim
Boucher, Lee Crocker, Julian Minguillon, George Phillips, Davide Rossi,
Ge' Weijers, and other members of the Independent JPEG Group.
IJG is not affiliated with the official ISO JPEG standards committee.
Includes EXIF patches from:
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=106060
http://sylvana.net/jpegcrop/exifpatch.html
WWW: http://www.ijg.org/
WWW: http://mjpeg.sf.net/

View file

@ -1,26 +0,0 @@
bin/cjpeg
bin/djpeg
bin/exifautotran
bin/jpegexiforient
bin/jpegtran
bin/rdjpgcom
bin/wrjpgcom
include/jconfig.h
include/jerror.h
include/jinclude.h
include/jmorecfg.h
include/jpegint.h
include/jpeglib.h
lib/libjpeg.a
lib/libjpeg.so
lib/libjpeg.so.9
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/coderules.doc
%%PORTDOCS%%%%DOCSDIR%%/filelist.doc
%%PORTDOCS%%%%DOCSDIR%%/install.doc
%%PORTDOCS%%%%DOCSDIR%%/jconfig.doc
%%PORTDOCS%%%%DOCSDIR%%/libjpeg.doc
%%PORTDOCS%%%%DOCSDIR%%/structure.doc
%%PORTDOCS%%%%DOCSDIR%%/usage.doc
%%PORTDOCS%%%%DOCSDIR%%/wizard.doc
%%PORTDOCS%%@dirrm %%DOCSDIR%%