diff options
author | joerg <joerg@pkgsrc.org> | 2017-07-01 22:13:26 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2017-07-01 22:13:26 +0000 |
commit | 059e2b32ce6181e809a7106fbce18ec9dd7910b8 (patch) | |
tree | 7714df78c361f87aec98a09968687da569f33356 /print | |
parent | 65a495bd8884090df540f152f8b44e03d4506b3e (diff) | |
download | pkgsrc-059e2b32ce6181e809a7106fbce18ec9dd7910b8.tar.gz |
Fix build against CUPS 2.0. While here, fix format string (ab)use.
Diffstat (limited to 'print')
3 files changed, 61 insertions, 1 deletions
diff --git a/print/cups-drivers-Magicolor5440DL/distinfo b/print/cups-drivers-Magicolor5440DL/distinfo index 09eac354f7c..838437f3c90 100644 --- a/print/cups-drivers-Magicolor5440DL/distinfo +++ b/print/cups-drivers-Magicolor5440DL/distinfo @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.7 2015/11/04 01:01:32 agc Exp $ +$NetBSD: distinfo,v 1.8 2017/07/01 22:13:26 joerg Exp $ SHA1 (5440DL_lin64bit_1_2_1.zip) = 130092a9345ec32a2681bacafaeadcc85563f1fa RMD160 (5440DL_lin64bit_1_2_1.zip) = a0a5a51eef1a7798d0f8b8d07873bd60ac2cba9b SHA512 (5440DL_lin64bit_1_2_1.zip) = 2686c06a18f4f23488a7de9820cc18e4e902805adebe5959b2f6a26e973082468aa6993421efcdbf690651d319b86147e382e15271a2895a3210c240a932f846 Size (5440DL_lin64bit_1_2_1.zip) = 767491 bytes SHA1 (patch-aa) = dc05cf3551ea421ac0b807752e86de27f1fe229e +SHA1 (patch-src_bmp.c) = 15fe81ab79ba9bcd1ecfcf413122a8e4ad217818 +SHA1 (patch-src_rastertokmlf.c) = c3f3c3e795b91300b0d5e80b3113b8a7541727a6 diff --git a/print/cups-drivers-Magicolor5440DL/patches/patch-src_bmp.c b/print/cups-drivers-Magicolor5440DL/patches/patch-src_bmp.c new file mode 100644 index 00000000000..867835aa47f --- /dev/null +++ b/print/cups-drivers-Magicolor5440DL/patches/patch-src_bmp.c @@ -0,0 +1,44 @@ +$NetBSD: patch-src_bmp.c,v 1.1 2017/07/01 22:13:26 joerg Exp $ + +Fix *print use. + +--- src/bmp.c.orig 2017-07-01 21:10:21.915538844 +0000 ++++ src/bmp.c +@@ -140,7 +140,7 @@ int write_bmp_header(cups_page_header_t + + int getHalftoneByResolution (PIMAGEHEADER pImage) + { +- BYTE szFile[ 256 ]; ++ char szFile[ 256 ]; + FILE *fh; + size_t numread; + PBITMAPFILEHEADER pbmpfh; +@@ -155,7 +155,7 @@ int getHalftoneByResolution (PIMAGEHEADE + + for(plane=startplane; plane <4; plane++) //cmyk 0 1 2 3 + { +- sprintf(szFile, ++ snprintf(szFile, sizeof(szFile), + "%s/Halftones/km_ht_%d%d.bmp", + KM_DATADIR, pImage->xResolution/1200, plane); + +@@ -171,7 +171,7 @@ int getHalftoneByResolution (PIMAGEHEADE + numread = fread(pbmpfh,1,sizeof(BITMAPFILEHEADER),fh); + if(numread != sizeof(BITMAPFILEHEADER)) + { +- fprintf(stderr, "ERROR: numread=%d, size=%d\n",numread,sizeof(BITMAPFILEHEADER)); ++ fprintf(stderr, "ERROR: numread=%zu, size=%zu\n",numread,sizeof(BITMAPFILEHEADER)); + return CUPS_FALSE; + } + BMP_ASSIGN_DWORD(pbmpfh->bfSize,pbmpfh->bfSize); +@@ -197,8 +197,8 @@ int getHalftoneByResolution (PIMAGEHEADE + + if(pHTtmp == NULL) + { +- fprintf(stderr, "ERROR: pbih->width=%d,height=%d\n)",pbih->biWidth,pbih->biHeight); +- fprintf(stderr, "ERROR: size=%d,NULL pHTtmp\n",sizeof(HTHEADER)); ++ fprintf(stderr, "ERROR: pbih->width=%lu,height=%lu\n)",(unsigned long)pbih->biWidth,(unsigned long)pbih->biHeight); ++ fprintf(stderr, "ERROR: size=%zu,NULL pHTtmp\n",sizeof(HTHEADER)); + return CUPS_FALSE; + } + pHTtmp->wID = plane;// * (objtype+1); diff --git a/print/cups-drivers-Magicolor5440DL/patches/patch-src_rastertokmlf.c b/print/cups-drivers-Magicolor5440DL/patches/patch-src_rastertokmlf.c new file mode 100644 index 00000000000..1456c50d86b --- /dev/null +++ b/print/cups-drivers-Magicolor5440DL/patches/patch-src_rastertokmlf.c @@ -0,0 +1,14 @@ +$NetBSD: patch-src_rastertokmlf.c,v 1.1 2017/07/01 22:13:26 joerg Exp $ + +Fix build with CUPS 2.0. + +--- src/rastertokmlf.c.orig 2017-07-01 21:05:32.072615512 +0000 ++++ src/rastertokmlf.c +@@ -53,6 +53,7 @@ + */ + + #include <cups/cups.h> ++#include <cups/ppd.h> + //#include <cups/string.h> + #include <cups/language.h> + #include <cups/raster.h> |