- Update to 1.2.0

PR:		ports/97783
		ports/97782
Submitted by:	maintainer
This commit is contained in:
Michael Johnson 2006-06-22 20:16:06 +00:00
parent cfd249a51c
commit 2bc3fec6c8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=166049
16 changed files with 978 additions and 1008 deletions

View File

@ -8,50 +8,157 @@
#
PORTNAME= cups-base
PORTVERSION= ${CUPS_PORTVER}
PORTREVISION= 9
PORTEPOCH= ${CUPS_PORTEPOCH}
PORTVERSION= 1.2.0
PORTREVISION= 1
CATEGORIES= print
MASTER_SITES= ${CUPS_MASTER_SITES}
MASTER_SITES= ftp://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/cups/${PORTVERSION}/ \
ftp://ftp.ntua.gr/pub/gnu/cups/${PORTVERSION}/ \
ftp://ftp.easysw.com/pub/cups/${PORTVERSION}/ \
ftp://ftp.fisek.com.tr/pub/cups/${PORTVERSION}/ \
ftp://ftp.mpg.goe.ni.schule.de/pub/internet/printing/cups/${PORTVERSION}/
DISTNAME= cups-${PORTVERSION}-source
MAINTAINER= asa@agava.com
COMMENT= The Common UNIX Printing System: headers, libs, & daemons
COMMENT= The Common UNIX Printing System
INSTALLS_SHLIB= yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_PERL5_RUN= yes
GNU_CONFIGURE= yes
USE_RC_SUBR= cupsd
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
MANLANG= "" es fr
OPTIONS= GNUTLS "Build with GNUTLS library" on \
PHP "Build PHP support" off \
PYTHON "Build PYTHON support" off \
LIBPAPER "Build with libpaper support" off
CUPS_FILESDIR= ${.CURDIR}/../../print/cups/files
CUPS_ETCDIR= ${PREFIX}/etc/cups
CUPS_RCDIR= ${PREFIX}/etc/rc.d
CUPS_DOCSDIR= ${PREFIX}/share/doc/cups
CUPS_SPOOLDIR= /var/spool/cups
CUPS_SOCKET?= /var/run/cups.sock
WRKSRC= ${WRKDIR}/cups-${PORTVERSION}
# file, dir ownership
CUPSGRP= cups
CUPSOWN= cups
CUPSSYSGRP= wheel
LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg \
png.5:${PORTSDIR}/graphics/png \
tiff.4:${PORTSDIR}/graphics/tiff
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS+= --localstatedir=/var \
--disable-pam \
--disable-slp \
--with-cups-user=${CUPSOWN} \
--with-cups-group=${CUPSGRP} \
--with-system-groups=${CUPSSYSGRP} \
--with-docdir=${CUPS_DOCSDIR} \
--with-rcdir=${CUPS_RCDIR} \
--with-domainsocket=${CUPS_SOCKET}
.if !defined(WITHOUT_GNUTLS)
CONFIGURE_ARGS+= --enable-gnutls --disable-openssl
LIB_DEPENDS+= gnutls-openssl.15:${PORTSDIR}/security/gnutls
.endif
.if defined(WITH_PHP)
CONFIGURE_ARGS+= --with-php
RUN_DEPENDS+= php:${PORTSDIR}/lang/php4
.endif
.if defined(WITH_PYTHON)
CONFIGURE_ARGS+= --with-python
USE_PYTHON= yes
.endif
.if defined(WITH_LIBPAPER)
CONFIGURE_ARGS+= --enable-libpaper
LIB_DEPENDS+= paper.2:${PORTSDIR}/print/libpaper
.endif
CONFIGURE_ARGS+= CPPFLAGS="-I.. -I${LOCALBASE}/include"
CONFIGURE_ARGS+= DSOFLAGS="-Wl,-rpath,${PREFIX}/lib -L${PREFIX}/lib"
CONFIGURE_ARGS+= LDFLAGS="-L${LOCALBASE}/lib"
MAN1EXT= 1
MAN5EXT= 5
MAN7EXT= 7
MAN8EXT= 8
MAN1= cancel.$(MAN1EXT) \
cups-config.$(MAN1EXT) \
cupstestdsc.$(MAN1EXT) \
cupstestppd.$(MAN1EXT) \
lp.$(MAN1EXT) \
lpoptions.$(MAN1EXT) \
lppasswd.$(MAN1EXT) \
lpq.$(MAN1EXT) \
lprm.$(MAN1EXT) \
lpr.$(MAN1EXT) \
lpstat.$(MAN1EXT)
MAN5= classes.conf.$(MAN5EXT) \
client.conf.$(MAN5EXT) \
cups-snmp.conf.$(MAN5EXT) \
cupsd.conf.$(MAN5EXT) \
mime.convs.$(MAN5EXT) \
mime.types.$(MAN5EXT) \
printers.conf.$(MAN5EXT) \
subscriptions.conf.$(MAN5EXT)
MAN7= backend.$(MAN7EXT) \
filter.$(MAN7EXT)
MAN8= accept.$(MAN8EXT) \
cupsaddsmb.$(MAN8EXT) \
cups-deviced.$(MAN8EXT) \
cups-driverd.$(MAN8EXT) \
cups-lpd.$(MAN8EXT) \
cups-polld.$(MAN8EXT) \
cupsd.$(MAN8EXT) \
cupsenable.$(MAN8EXT) \
lpadmin.$(MAN8EXT) \
lpinfo.$(MAN8EXT) \
lpmove.$(MAN8EXT) \
lpc.$(MAN8EXT) \
pre-configure::
@${ECHO_MSG} Configuring CUPS with options:
@${ECHO_MSG} ${CONFIGURE_ARGS} | fmt
post-patch:
@${REINPLACE_CMD} -e '/SILENT/d' \
@${REINPLACE_CMD} -e '/SILENT/d;\
s|@SSLFLAGS@|@SSLFLAGS@ -I${LOCALBASE}/include|; \
s|@SSLLIBS@|@SSLLIBS@ -L${LOCALBASE}/lib|' \
${WRKSRC}/Makedefs.in
@${REINPLACE_CMD} -e '/LN/d' -e '/cat/d' \
${WRKSRC}/man/Makefile ${WRKSRC}/man/es/Makefile
@${REINPLACE_CMD} -e '/LN/d' -e '/cat/d' \
${WRKSRC}/man/Makefile ${WRKSRC}/man/fr/Makefile
@${REINPLACE_CMD} -e 's|/etc/cups|/usr/local/etc/cups|g' \
${WRKSRC}/man/*.man
${WRKSRC}/man/*.man*
@${REINPLACE_CMD} -e 's|CXX="$$CC"||g' \
${WRKSRC}/${CONFIGURE_SCRIPT}
pre-install:
@${ECHO_MSG} "===>" Stopping cupsd ...
-killall cupsd || ${TRUE}
${RMDIR} ${PREFIX}/etc/cups/certs/* || ${TRUE}
post-install:
${MKDIR} ${CUPS_ETCDIR}
.for f in classes.conf client.conf cupsd.conf printers.conf mime.convs mime.types
.ifdef CUPS_OVERWRITE_BASE
${SH} ${PKGINSTALL} placeholder POST-INSTALL overwrite
.endif
${SH} ${PKGINSTALL} placeholder POST-INSTALL
.for f in cupsd.conf mime.convs mime.types
${INSTALL_DATA} ${WRKSRC}/conf/${f} ${CUPS_ETCDIR}/${f}.N
cd ${CUPS_ETCDIR}; if test ! -f ${f}; then ${CP} -p ${f}.N ${f}; fi
.endfor # classes.conf client.conf cupsd.conf printers.conf
${FIND} ${PREFIX}/man/cat* -type l -name '*.0' -delete
.endfor # cupsd.conf mime.convs mime.types
# ${FIND} ${PREFIX}/man/cat* -type l -name '*.0' -delete
${MKDIR} ${CUPS_SPOOLDIR} ${CUPS_SPOOLDIR}/tmp
${CHOWN} -R ${CUPSOWN}:${CUPSGRP} ${CUPS_SPOOLDIR}
${CHMOD} -R g+w ${CUPS_SPOOLDIR}
@${SED} -e 's#PREFIX#${PREFIX}#' ${PKGMESSAGE}
.include "${.CURDIR}/../../print/cups/Makefile.common"
.include <bsd.port.pre.mk>
.include "${FILESDIR}/manpages.mk"
.include <bsd.port.post.mk>
.include <bsd.port.mk>

3
print/cups-base/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (cups-1.2.0-source.tar.bz2) = a168b0b1c8bb946060e659e1df2927c5
SHA256 (cups-1.2.0-source.tar.bz2) = 893a91d96e68de51f767d97d36d2d321320b3611b7178ea9a9d17ad2777f5f9f
SIZE (cups-1.2.0-source.tar.bz2) = 3456476

View File

@ -1,11 +0,0 @@
MAN1+= backend.1
MAN1+= cups-config.1
MAN1+= filter.1
MAN5+= classes.conf.5
MAN5+= cupsd.conf.5
MAN5+= mime.convs.5
MAN5+= mime.types.5
MAN5+= printers.conf.5
MAN8+= cups-lpd.8
MAN8+= cups-polld.8
MAN8+= cupsd.8

View File

@ -1,14 +0,0 @@
*** pdftops/XRef.cxx.orig Wed Jan 12 17:10:53 2005
--- pdftops/XRef.cxx Wed Jan 12 17:11:22 2005
***************
*** 793,798 ****
--- 793,801 ----
} else {
keyLength = 5;
}
+ if (keyLength > 16) {
+ keyLength = 16;
+ }
permFlags = permissions.getInt();
if (encVersion >= 1 && encVersion <= 2 &&
encRevision >= 2 && encRevision <= 3) {

View File

@ -1,12 +0,0 @@
--- pdftops/FontFile.cxx.orig Tue Feb 3 09:41:09 2004
+++ pdftops/FontFile.cxx Tue Sep 6 16:16:04 2005
@@ -3572,6 +3573,9 @@
} else {
origLocaTable[i].pos = 2 * getUShort(pos + 2*i);
}
+
+ if (origLocaTable[i].pos < 0 || origLocaTable[i].pos > len)
+ error(1, 0, "bad loca table pos value");
}
qsort(origLocaTable, nGlyphs + 1, sizeof(TrueTypeLoca), &cmpTrueTypeLocaPos);
for (i = 0; i < nGlyphs; ++i) {

View File

@ -1,31 +1,59 @@
--- Makefile.orig Mon Jan 3 11:29:44 2005
+++ Makefile Fri Jan 27 00:04:20 2006
@@ -28,8 +28,8 @@
# Directories to make...
#
-DIRS = cups backend berkeley cgi-bin filter man pdftops \
- scheduler systemv
+DIRS = cups backend cgi-bin filter man pdftops \
+ scheduler
#
# Make all targets...
@@ -72,8 +72,6 @@
echo Installing in $$dir... ;\
(cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\
done
- echo Installing in conf...
- (cd conf; $(MAKE) $(MFLAGS) install)
echo Installing in data...
(cd data; $(MAKE) $(MFLAGS) install)
echo Installing in doc...
@@ -109,8 +107,6 @@
$(INSTALL_DATA) cups.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
$(INSTALL_DIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
$(INSTALL_DATA) cups.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
--- Makefile.orig Thu May 18 13:38:50 2006
+++ Makefile Thu May 18 13:40:07 2006
@@ -99,56 +99,11 @@
echo Installing cups-config script...
$(INSTALL_DIR) -m 755 $(BINDIR)
$(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config
- echo Installing startup script...
- if test "x$(INITDIR)" != x; then \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \
- $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \
- $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc2.d; \
- $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc3.d; \
- $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc5.d; \
- $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
- fi
- if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
- $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
- if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
- $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
- $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
- $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
- elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
- $(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
- else \
- $(INSTALL_SCRIPT) cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
fi \
- $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
- fi \
- fi
if test "x$(DBUSDIR)" != x; then \
echo Installing cups.conf in $(DBUSDIR)...;\
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR); \
$(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/cups.conf; \
fi
- if test "x$(XINETD)" != x; then \
- echo Installing xinetd configuration file for cups-lpd...; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \
- $(INSTALL_DATA) init/cups-lpd $(BUILDROOT)$(XINETD)/cups-lpd; \
- fi
- if test -d /usr/share/applications; then \
- echo Installing desktop icons...; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/applications; \
- $(INSTALL_DATA) desktop/cups.desktop $(BUILDROOT)/usr/share/applications; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps; \
- $(INSTALL_DATA) desktop/cups-16.png $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps; \
- $(INSTALL_DATA) desktop/cups-32.png $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps; \
- $(INSTALL_DATA) desktop/cups-64.png $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png; \
- $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps; \
- $(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png; \
- fi
-
#
# Install source and header files...

View File

@ -1,253 +0,0 @@
Index: pdftops/Stream.h
===================================================================
--- pdftops/Stream.h
+++ pdftops/Stream.h
@@ -233,6 +233,8 @@ public:
~StreamPredictor();
+ GBool isOk() { return ok; }
+
int lookChar();
int getChar();
@@ -250,6 +252,7 @@ private:
int rowBytes; // bytes per line
Guchar *predLine; // line buffer
int predIdx; // current index in predLine
+ GBool ok;
};
//------------------------------------------------------------------------
Index: pdftops/Stream.cxx
===================================================================
--- pdftops/Stream.cxx
+++ pdftops/Stream.cxx
@@ -15,6 +15,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
+#include <limits.h>
#ifndef WIN32
#include <unistd.h>
#endif
@@ -412,13 +413,28 @@ StreamPredictor::StreamPredictor(Stream
width = widthA;
nComps = nCompsA;
nBits = nBitsA;
+ predLine = NULL;
+ ok = gFalse;
+ if (width <= 0 || nComps <= 0 || nBits <= 0 ||
+ nComps >= INT_MAX/nBits ||
+ width >= INT_MAX/nComps/nBits) {
+ return;
+ }
nVals = width * nComps;
+ if (nVals * nBits + 7 <= 0) {
+ return;
+ }
pixBytes = (nComps * nBits + 7) >> 3;
rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
+ if (rowBytes < 0) {
+ return;
+ }
predLine = (Guchar *)gmalloc(rowBytes);
memset(predLine, 0, rowBytes);
predIdx = rowBytes;
+
+ ok = gTrue;
}
StreamPredictor::~StreamPredictor() {
@@ -1012,6 +1028,10 @@ LZWStream::LZWStream(Stream *strA, int p
FilterStream(strA) {
if (predictor != 1) {
pred = new StreamPredictor(this, predictor, columns, colors, bits);
+ if (!pred->isOk()) {
+ delete pred;
+ pred = NULL;
+ }
} else {
pred = NULL;
}
@@ -1260,6 +1280,10 @@ CCITTFaxStream::CCITTFaxStream(Stream *s
endOfLine = endOfLineA;
byteAlign = byteAlignA;
columns = columnsA;
+ if (columns < 1 || columns >= INT_MAX / sizeof(short)) {
+ error(-1, "invalid number of columns: %d", columns);
+ exit(1);
+ }
rows = rowsA;
endOfBlock = endOfBlockA;
black = blackA;
@@ -2897,6 +2921,11 @@ GBool DCTStream::readBaselineSOF() {
height = read16();
width = read16();
numComps = str->getChar();
+ if (numComps <= 0 || numComps > 4) {
+ numComps = 0;
+ error(getPos(), "Bad number of components in DCT stream");
+ return gFalse;
+ }
if (prec != 8) {
error(getPos(), "Bad DCT precision %d", prec);
return gFalse;
@@ -2923,6 +2952,11 @@ GBool DCTStream::readProgressiveSOF() {
height = read16();
width = read16();
numComps = str->getChar();
+ if (numComps <= 0 || numComps > 4) {
+ numComps = 0;
+ error(getPos(), "Bad number of components in DCT stream");
+ return gFalse;
+ }
if (prec != 8) {
error(getPos(), "Bad DCT precision %d", prec);
return gFalse;
@@ -2945,6 +2979,11 @@ GBool DCTStream::readScanInfo() {
length = read16() - 2;
scanInfo.numComps = str->getChar();
+ if (scanInfo.numComps <= 0 || scanInfo.numComps > 4) {
+ scanInfo.numComps = 0;
+ error(getPos(), "Bad number of components in DCT stream");
+ return gFalse;
+ }
--length;
if (length != 2 * scanInfo.numComps + 3) {
error(getPos(), "Bad DCT scan info block");
@@ -3019,12 +3058,12 @@ GBool DCTStream::readHuffmanTables() {
while (length > 0) {
index = str->getChar();
--length;
- if ((index & 0x0f) >= 4) {
+ if ((index & ~0x10) >= 4 || (index & ~0x10) < 0) {
error(getPos(), "Bad DCT Huffman table");
return gFalse;
}
if (index & 0x10) {
- index &= 0x0f;
+ index &= 0x03;
if (index >= numACHuffTables)
numACHuffTables = index+1;
tbl = &acHuffTables[index];
@@ -3142,9 +3181,11 @@ int DCTStream::readMarker() {
do {
do {
c = str->getChar();
+ if(c == EOF) return EOF;
} while (c != 0xff);
do {
c = str->getChar();
+ if(c == EOF) return EOF;
} while (c == 0xff);
} while (c == 0x00);
return c;
@@ -3255,6 +3296,10 @@ FlateStream::FlateStream(Stream *strA, i
FilterStream(strA) {
if (predictor != 1) {
pred = new StreamPredictor(this, predictor, columns, colors, bits);
+ if (!pred->isOk()) {
+ delete pred;
+ pred = NULL;
+ }
} else {
pred = NULL;
}
Index: pdftops/JBIG2Stream.cxx
===================================================================
--- pdftops/JBIG2Stream.cxx
+++ pdftops/JBIG2Stream.cxx
@@ -7,6 +7,7 @@
//========================================================================
#include <config.h>
+#include <limits.h>
#ifdef USE_GCC_PRAGMAS
#pragma implementation
@@ -681,7 +682,16 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA,
w = wA;
h = hA;
line = (wA + 7) >> 3;
- data = (Guchar *)gmalloc(h * line);
+
+ if (h < 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
+ error(-1, "invalid width/height");
+ data = NULL;
+ return;
+ }
+
+ // need to allocate one extra guard byte for use in combine()
+ data = (Guchar *)gmalloc(h * line + 1);
+ data[h * line] = 0;
}
JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap):
@@ -690,8 +700,17 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA,
w = bitmap->w;
h = bitmap->h;
line = bitmap->line;
- data = (Guchar *)gmalloc(h * line);
+
+ if (h < 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
+ error(-1, "invalid width/height");
+ data = NULL;
+ return;
+ }
+
+ // need to allocate one extra guard byte for use in combine()
+ data = (Guchar *)gmalloc(h * line + 1);
memcpy(data, bitmap->data, h * line);
+ data[h * line] = 0;
}
JBIG2Bitmap::~JBIG2Bitmap() {
@@ -716,10 +735,14 @@ JBIG2Bitmap *JBIG2Bitmap::getSlice(Guint
}
void JBIG2Bitmap::expand(int newH, Guint pixel) {
- if (newH <= h) {
+ if (newH <= h || line <= 0 || newH >= (INT_MAX - 1) / line) {
+ error(-1, "invalid width/height");
+ gfree(data);
+ data = NULL;
return;
}
- data = (Guchar *)grealloc(data, newH * line);
+ // need to allocate one extra guard byte for use in combine()
+ data = (Guchar *)grealloc(data, newH * line + 1);
if (pixel) {
memset(data + h * line, 0xff, (newH - h) * line);
} else {
@@ -2256,6 +2279,15 @@ void JBIG2Stream::readHalftoneRegionSeg(
error(getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment");
return;
}
+ if (gridH == 0 || gridW >= INT_MAX / gridH) {
+ error(getPos(), "Bad size in JBIG2 halftone segment");
+ return;
+ }
+ if (w == 0 || h >= INT_MAX / w) {
+ error(getPos(), "Bad size in JBIG2 bitmap segment");
+ return;
+ }
+
patternDict = (JBIG2PatternDict *)seg;
bpp = 0;
i = 1;
@@ -2887,6 +2919,11 @@ JBIG2Bitmap *JBIG2Stream::readGenericRef
JBIG2BitmapPtr tpgrCXPtr0, tpgrCXPtr1, tpgrCXPtr2;
int x, y, pix;
+ if (w < 0 || h <= 0 || w >= INT_MAX / h) {
+ error(-1, "invalid width/height");
+ return NULL;
+ }
+
bitmap = new JBIG2Bitmap(0, w, h);
bitmap->clearToZero();
# vim: syntax=diff

View File

@ -1,64 +0,0 @@
--- man/Makefile.common.orig Thu May 27 22:51:30 2004
+++ man/Makefile.common Mon Jan 24 13:28:43 2005
@@ -28,58 +28,16 @@
MAN1 = backend.man \
cups-config.man \
- cupstestppd.man \
- filter.man \
- lp.man \
- lpoptions.man \
- lppasswd.man \
- lpq.man \
- lprm.man \
- lpr.man \
- lpstat.man
+ filter.man
MAN5 = classes.conf.man \
cupsd.conf.man \
mime.convs.man \
mime.types.man \
printers.conf.man
-MAN8 = accept.man \
- cupsaddsmb.man \
+MAN8 = \
cups-lpd.man \
cups-polld.man \
- cupsd.man \
- enable.man \
- lpadmin.man \
- lpinfo.man \
- lpmove.man \
- lpc.man
-
-CAT1 = backend.$(CAT1EXT) \
- cups-config.$(CAT1EXT) \
- cupstestppd.$(CAT1EXT) \
- filter.$(CAT1EXT) \
- lp.$(CAT1EXT) \
- lpoptions.$(CAT1EXT) \
- lppasswd.$(CAT1EXT) \
- lpq.$(CAT1EXT) \
- lprm.$(CAT1EXT) \
- lpr.$(CAT1EXT) \
- lpstat.$(CAT1EXT)
-CAT5 = classes.conf.$(CAT5EXT) \
- cupsd.conf.$(CAT5EXT) \
- mime.convs.$(CAT5EXT) \
- mime.types.$(CAT5EXT) \
- printers.conf.$(CAT5EXT)
-CAT8 = accept.$(CAT8EXT) \
- cupsaddsmb.$(CAT8EXT) \
- cups-lpd.$(CAT8EXT) \
- cups-polld.$(CAT8EXT) \
- cupsd.$(CAT8EXT) \
- enable.$(CAT8EXT) \
- lpadmin.$(CAT8EXT) \
- lpinfo.$(CAT8EXT) \
- lpmove.$(CAT8EXT) \
- lpc.$(CAT8EXT)
-
+ cupsd.man
#
# End of "$Id: Makefile.common,v 1.5 2004/05/27 18:51:30 mike Exp $".

View File

@ -19,3 +19,4 @@ that use these filters. This software is available in the cups-pstoraster
port.
WWW: http://www.cups.org/
[original text by greid@ukug.uk.freebsd.org]

View File

@ -0,0 +1,50 @@
#!/bin/sh
PATH=/bin:/usr/sbin
REPLACES_BINARIES="/usr/bin/lpr
/usr/bin/lp
/usr/bin/lpq
/usr/bin/lprm
/usr/bin/lpstat
/usr/sbin/lpc"
case $2 in
POST-INSTALL)
# Unshade binaries
if [ -n "${3}" ]; then
for FILE in ${REPLACES_BINARIES}; do
[ -e "${FILE}" ] && chmod 0 "${FILE}"
done
fi
# Create user
USER=cups
GROUP=${USER}
UID=193
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d /nonexistent -s /sbin/nologin -c "CUPS Owner"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
;;
esac

View File

@ -1,26 +1,4 @@
======================================================================
CUPS is now installed.
Please read the documentation in PREFIX/share/doc/cups/ for information
on how to set up your printer to use CUPS. Basic template configuration files
have been installed in PREFIX/etc/cups/
To install the BSD and System V compatibility binaries look to the port
print/cups-lpr. These are no longer installed as part of the base cups port
because they have conflicting names with the native print binaries, and with
other ports such as lprNG.
NOTE: IF YOU USE A NON-POSTSCRIPT PRINTER:
You will need to install the cups-pstoraster port in order to print to
your printer. If you installed via the "cups" port, it will be installed
automatically. Otherwise, you will need to install the port or the package
yourself.
======================================================================
**********************************************************************
PLEASE NOTE:
============
@ -28,15 +6,4 @@ To enable printing under Gimp do the following:
1) Uncomment application/octet-stream line in mime.types
2) Uncomment application/octet-stream line in mime.convs
3) Restart cupsd
**********************************************************************
The cups-base port now uses a new style rc.d startup
script. Please remove any old cups.sh* scripts you
might have in /usr/local/etc/rc.d, or your local
PREFIX. You should also put the following line in
/etc/rc.conf.local, or /etc/rc.conf to start cupsd
automatically at boot time:
cupsd_enable="yes"
**********************************************************************
======================================================================

File diff suppressed because it is too large Load Diff

View File

@ -8,9 +8,7 @@
#
PORTNAME= cups
PORTVERSION= ${CUPS_PORTVER}
PORTREVISION= ${CUPS_PORTREV}
PORTEPOCH= ${CUPS_PORTEPOCH}
PORTVERSION= 1.2.0
CATEGORIES= print
MASTER_SITES= # empty
DISTFILES= # empty
@ -19,23 +17,17 @@ EXTRACT_ONLY= # empty
MAINTAINER= asa@agava.com
COMMENT= The Common UNIX Printing System: Metaport to install complete system
LIB_DEPENDS+= cups.2:${PORTSDIR}/print/cups-base
RUN_DEPENDS+= espgs:${PORTSDIR}/print/cups-pstoraster \
${LOCALBASE}/sbin/cupsaddsmb:${PORTSDIR}/print/cups-lpr
.if make(package)
DEPENDS_TARGET="package"
.endif # make(package)
USE_PERL5= yes
LIB_DEPENDS+= cups.2:${PORTSDIR}/print/cups-base
RUN_DEPENDS+= espgs:${PORTSDIR}/print/cups-pstoraster
NO_BUILD= true
do-patch:
${DO_NADA}
do-build:
do-install:
${DO_NADA}
.include "${.CURDIR}/../../print/cups/Makefile.common"
.include <bsd.port.pre.mk>
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,93 +0,0 @@
# ex:ts=8 -*-mode: makefile-*-
# Common file for CUPS ports
# $FreeBSD$
CUPS_MASTER_SITES=\
ftp://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/cups/${CUPS_VERSION}/ \
ftp://ftp.ntua.gr/pub/gnu/cups/${CUPS_VERSION}/ \
ftp://ftp.easysw.com/pub/cups/${CUPS_VERSION}/ \
ftp://ftp.fisek.com.tr/pub/cups/${CUPS_VERSION}/ \
ftp://ftp.mpg.goe.ni.schule.de/pub/internet/printing/cups/${CUPS_VERSION}/
CUPS_VERSION= 1.1.23
CUPS_REVISION= 0
CUPS_PORTVER= ${CUPS_VERSION}.${CUPS_REVISION}
CUPS_PORTREV= 1
CUPS_PORTEPOCH= 0
CUPS_FILESDIR= ${.CURDIR}/../../print/cups/files
CUPS_ETCDIR= ${PREFIX}/etc/cups
CUPS_RCDIR= ${PREFIX}/etc/rc.d
CUPS_DOCSDIR= ${PREFIX}/share/doc/cups
CUPS_SPOOLDIR= /var/spool/cups
# file, dir ownership
CUPSGRP= daemon
CUPSOWN= root
######################################################################
# The rest of the file is for components (cups-base, cups-lpr) only.
######################################################################
.if ${PORTNAME} == "cups-base" || ${PORTNAME} == "cups-lpr"
MANLANG= "" es fr
.if ${CUPS_REVISION} < 1
DISTNAME= cups-${CUPS_VERSION}-source
.else
DISTNAME= cups-${CUPS_VERSION}-${CUPS_REVISION}-source
.endif # ${CUPS_REVISION} < 1
DISTFILES= ${DISTNAME}.tar.bz2
MD5_FILE= ${.CURDIR}/../../print/cups/distinfo
WRKSRC= ${WRKDIR}/cups-${CUPS_VERSION}
LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg \
png.5:${PORTSDIR}/graphics/png \
tiff.4:${PORTSDIR}/graphics/tiff
.if defined(WITH_PHP)
CONFIGURE_ARGS+= --with-php
RUN_DEPENDS+= php:${PORTSDIR}/lang/php4
.endif
.if defined(WITH_PYTHON)
CONFIGURE_ARGS+= --with-python
USE_PYTHON= yes
.endif
.if defined(WITH_CUPS_LIBPAPER)
CONFIGURE_ARGS+= --enable-libpaper
LIB_DEPENDS+= paper.2:${PORTSDIR}/print/libpaper
.endif
USE_BZIP2= yes
USE_GMAKE= yes
USE_PERL5_RUN= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS+= --localstatedir=/var \
--disable-pam \
--disable-slp \
--with-cups-user=${CUPSOWN} \
--with-cups-group=${CUPSGRP} \
--with-docdir=${CUPS_DOCSDIR} \
--with-rcdir=${CUPS_RCDIR}
.if !defined(WITHOUT_GNUTLS)
CONFIGURE_ARGS+= --enable-gnutls --disable-openssl
LIB_DEPENDS+= gnutls-openssl.15:${PORTSDIR}/security/gnutls
.endif
CONFIGURE_ARGS+= CPPFLAGS="-I.. -I${LOCALBASE}/include"
CONFIGURE_ARGS+= DSOFLAGS="-Wl,-rpath,${PREFIX}/lib -L${PREFIX}/lib"
CONFIGURE_ARGS+= LDFLAGS="-L${LOCALBASE}/lib"
pre-configure::
@${ECHO_MSG} Configuring CUPS with options:
@${ECHO_MSG} ${CONFIGURE_ARGS} | fmt
.endif # ${PORTNAME} != "cups"

View File

@ -19,7 +19,4 @@ that use these filters. This software is available in the cups-pstoraster
port.
WWW: http://www.cups.org/
- AlanE (maintainer)
alane@freebsd.org, ports@geeksrus.net
[original text by greid@ukug.uk.freebsd.org]

View File

@ -7,4 +7,3 @@ on how to set up your printer to use CUPS. Basic template configuration files
have been installed in %%PREFIX%%/etc/cups/
======================================================================