graphics/tiff: update to 4.3.0
See http://www.simplesystems.org/libtiff/v4.3.0.html ok naddy@
This commit is contained in:
parent
b9f6ad96e2
commit
e22673f62b
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.91 2021/03/16 15:34:23 landry Exp $
|
||||
# $OpenBSD: Makefile,v 1.92 2021/05/06 15:28:48 landry Exp $
|
||||
|
||||
COMMENT= tools and library routines for working with TIFF images
|
||||
|
||||
DISTNAME= tiff-4.2.0
|
||||
SHARED_LIBS= tiff 40.5 # 11.0
|
||||
SHARED_LIBS+= tiffxx 40.2 # 11.0
|
||||
DISTNAME= tiff-4.3.0
|
||||
SHARED_LIBS= tiff 41.0 # 12.0
|
||||
SHARED_LIBS+= tiffxx 41.0 # 12.0
|
||||
CATEGORIES= graphics
|
||||
|
||||
MASTER_SITES= https://download.osgeo.org/libtiff/
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (tiff-4.2.0.tar.gz) = 6wSE5Wjq2PojtRPpsAQd9+Mn9O4tIttaUzkp38GWM8s=
|
||||
SIZE (tiff-4.2.0.tar.gz) = 2809373
|
||||
SHA256 (tiff-4.3.0.tar.gz) = DkblrLCHzn0axTz09WoJsiFTf8ht/F2qrRwuieGzesg=
|
||||
SIZE (tiff-4.3.0.tar.gz) = 2808254
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.13 2018/12/05 20:35:25 naddy Exp $
|
||||
$OpenBSD: patch-Makefile_in,v 1.14 2021/05/06 15:28:48 landry Exp $
|
||||
Index: Makefile.in
|
||||
--- Makefile.in.orig
|
||||
+++ Makefile.in
|
||||
@@ -433,7 +433,7 @@ EXTRA_DIST = \
|
||||
nmake.opt
|
||||
@@ -434,7 +434,7 @@ EXTRA_DIST = \
|
||||
libtiff-4.pc.in
|
||||
|
||||
dist_doc_DATA = $(docfiles)
|
||||
-SUBDIRS = port libtiff tools build contrib test man html
|
||||
|
@ -1,11 +1,11 @@
|
||||
$OpenBSD: patch-libtiff_Makefile_in,v 1.17 2018/12/05 20:35:25 naddy Exp $
|
||||
$OpenBSD: patch-libtiff_Makefile_in,v 1.18 2021/05/06 15:28:48 landry Exp $
|
||||
|
||||
* Avoid picking up an old libtiff in ${LOCALBASE}.
|
||||
|
||||
Index: libtiff/Makefile.in
|
||||
--- libtiff/Makefile.in.orig
|
||||
+++ libtiff/Makefile.in
|
||||
@@ -368,10 +368,10 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
@@ -369,10 +369,10 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-libtiff_tif_codec_c,v 1.6 2018/12/05 20:35:25 naddy Exp $
|
||||
$OpenBSD: patch-libtiff_tif_codec_c,v 1.7 2021/05/06 15:28:48 landry Exp $
|
||||
Index: libtiff/tif_codec.c
|
||||
--- libtiff/tif_codec.c.orig
|
||||
+++ libtiff/tif_codec.c
|
||||
@ -6,7 +6,7 @@ Index: libtiff/tif_codec.c
|
||||
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
|
||||
char compression_code[20];
|
||||
|
||||
- sprintf(compression_code, "%d",tif->tif_dir.td_compression );
|
||||
- sprintf(compression_code, "%"PRIu16, tif->tif_dir.td_compression );
|
||||
+ snprintf(compression_code, sizeof(compression_code), "%d",
|
||||
+ tif->tif_dir.td_compression );
|
||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-libtiff_tif_compress_c,v 1.5 2018/12/05 20:35:25 naddy Exp $
|
||||
$OpenBSD: patch-libtiff_tif_compress_c,v 1.6 2021/05/06 15:28:48 landry Exp $
|
||||
Index: libtiff/tif_compress.c
|
||||
--- libtiff/tif_compress.c.orig
|
||||
+++ libtiff/tif_compress.c
|
||||
@@ -199,14 +199,15 @@ TIFFFindCODEC(uint16 scheme)
|
||||
@@ -199,14 +199,15 @@ TIFFFindCODEC(uint16_t scheme)
|
||||
TIFFCodec*
|
||||
TIFFRegisterCODEC(uint16 scheme, const char* name, TIFFInitMethod init)
|
||||
TIFFRegisterCODEC(uint16_t scheme, const char* name, TIFFInitMethod init)
|
||||
{
|
||||
+ size_t namelen = strlen(name);
|
||||
codec_t* cd = (codec_t*)
|
||||
@ -12,9 +12,9 @@ Index: libtiff/tif_compress.c
|
||||
+ _TIFFmalloc((tmsize_t)(sizeof (codec_t) + sizeof (TIFFCodec) + namelen+1));
|
||||
|
||||
if (cd != NULL) {
|
||||
cd->info = (TIFFCodec*) ((uint8*) cd + sizeof (codec_t));
|
||||
cd->info = (TIFFCodec*) ((uint8_t*) cd + sizeof (codec_t));
|
||||
cd->info->name = (char*)
|
||||
((uint8*) cd->info + sizeof (TIFFCodec));
|
||||
((uint8_t*) cd->info + sizeof (TIFFCodec));
|
||||
- strcpy(cd->info->name, name);
|
||||
+ strlcpy(cd->info->name, name, namelen+1);
|
||||
cd->info->scheme = scheme;
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-libtiff_tif_getimage_c,v 1.14 2021/03/16 15:34:23 landry Exp $
|
||||
$OpenBSD: patch-libtiff_tif_getimage_c,v 1.15 2021/05/06 15:28:48 landry Exp $
|
||||
|
||||
This one is slightly problematic. If an application allocates less
|
||||
room for its error buffer than the recommended 1024, the error message
|
||||
@ -20,8 +20,8 @@ Index: libtiff/tif_getimage.c
|
||||
case 16:
|
||||
break;
|
||||
default:
|
||||
- sprintf(emsg, "Sorry, can not handle images with %d-bit samples",
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle images with %d-bit samples",
|
||||
- sprintf(emsg, "Sorry, can not handle images with %"PRIu16"-bit samples",
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle images with %"PRIu16"-bit samples",
|
||||
td->td_bitspersample);
|
||||
return (0);
|
||||
}
|
||||
@ -46,8 +46,8 @@ Index: libtiff/tif_getimage.c
|
||||
&& td->td_bitspersample < 8 ) {
|
||||
- sprintf(emsg,
|
||||
+ snprintf(emsg, 1024,
|
||||
"Sorry, can not handle contiguous data with %s=%d, "
|
||||
"and %s=%d and Bits/Sample=%d",
|
||||
"Sorry, can not handle contiguous data with %s=%"PRIu16", "
|
||||
"and %s=%"PRIu16" and Bits/Sample=%"PRIu16"",
|
||||
photoTag, photometric,
|
||||
@@ -143,7 +143,7 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
|
||||
break;
|
||||
@ -59,7 +59,7 @@ Index: libtiff/tif_getimage.c
|
||||
return (0);
|
||||
}
|
||||
@@ -153,13 +153,13 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
|
||||
uint16 inkset;
|
||||
uint16_t inkset;
|
||||
TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset);
|
||||
if (inkset != INKSET_CMYK) {
|
||||
- sprintf(emsg,
|
||||
@ -71,7 +71,7 @@ Index: libtiff/tif_getimage.c
|
||||
if (td->td_samplesperpixel < 4) {
|
||||
- sprintf(emsg,
|
||||
+ snprintf(emsg, 1024,
|
||||
"Sorry, can not handle separated image with %s=%d",
|
||||
"Sorry, can not handle separated image with %s=%"PRIu16,
|
||||
"Samples/pixel", td->td_samplesperpixel);
|
||||
return 0;
|
||||
@@ -168,7 +168,7 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
|
||||
@ -93,15 +93,15 @@ Index: libtiff/tif_getimage.c
|
||||
return (0);
|
||||
}
|
||||
if (td->td_planarconfig != PLANARCONFIG_CONTIG) {
|
||||
- sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d",
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle LogLuv images with %s=%d",
|
||||
- sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%"PRIu16,
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle LogLuv images with %s=%"PRIu16,
|
||||
"Planarconfiguration", td->td_planarconfig);
|
||||
return (0);
|
||||
}
|
||||
if ( td->td_samplesperpixel != 3 || colorchannels != 3 ) {
|
||||
- sprintf(emsg,
|
||||
+ snprintf(emsg, 1024,
|
||||
"Sorry, can not handle image with %s=%d, %s=%d",
|
||||
"Sorry, can not handle image with %s=%"PRIu16", %s=%d",
|
||||
"Samples/pixel", td->td_samplesperpixel,
|
||||
"colorchannels", colorchannels);
|
||||
@@ -195,7 +195,7 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
|
||||
@ -110,15 +110,15 @@ Index: libtiff/tif_getimage.c
|
||||
if ( td->td_samplesperpixel != 3 || colorchannels != 3 || td->td_bitspersample != 8 ) {
|
||||
- sprintf(emsg,
|
||||
+ snprintf(emsg, 1024,
|
||||
"Sorry, can not handle image with %s=%d, %s=%d and %s=%d",
|
||||
"Sorry, can not handle image with %s=%"PRIu16", %s=%d and %s=%"PRIu16,
|
||||
"Samples/pixel", td->td_samplesperpixel,
|
||||
"colorchannels", colorchannels,
|
||||
@@ -204,7 +204,7 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
|
||||
}
|
||||
break;
|
||||
default:
|
||||
- sprintf(emsg, "Sorry, can not handle image with %s=%d",
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle image with %s=%d",
|
||||
- sprintf(emsg, "Sorry, can not handle image with %s=%"PRIu16,
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle image with %s=%"PRIu16,
|
||||
photoTag, photometric);
|
||||
return (0);
|
||||
}
|
||||
@ -126,8 +126,8 @@ Index: libtiff/tif_getimage.c
|
||||
case 16:
|
||||
break;
|
||||
default:
|
||||
- sprintf(emsg, "Sorry, can not handle images with %d-bit samples",
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle images with %d-bit samples",
|
||||
- sprintf(emsg, "Sorry, can not handle images with %"PRIu16"-bit samples",
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle images with %"PRIu16"-bit samples",
|
||||
img->bitspersample);
|
||||
goto fail_return;
|
||||
}
|
||||
@ -150,8 +150,8 @@ Index: libtiff/tif_getimage.c
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int
|
||||
img->greencmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
|
||||
img->bluecmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
|
||||
img->greencmap = (uint16_t *) _TIFFmalloc(sizeof(uint16_t) * n_color);
|
||||
img->bluecmap = (uint16_t *) _TIFFmalloc(sizeof(uint16_t) * n_color);
|
||||
if( !img->redcmap || !img->greencmap || !img->bluecmap ) {
|
||||
- sprintf(emsg, "Out of memory for colormap copy");
|
||||
+ snprintf(emsg, 1024, "Out of memory for colormap copy");
|
||||
@ -164,8 +164,8 @@ Index: libtiff/tif_getimage.c
|
||||
&& img->bitspersample < 8 ) {
|
||||
- sprintf(emsg,
|
||||
+ snprintf(emsg, 1024,
|
||||
"Sorry, can not handle contiguous data with %s=%d, "
|
||||
"and %s=%d and Bits/Sample=%d",
|
||||
"Sorry, can not handle contiguous data with %s=%"PRIu16", "
|
||||
"and %s=%"PRIu16" and Bits/Sample=%"PRIu16,
|
||||
photoTag, img->photometric,
|
||||
@@ -421,7 +421,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int
|
||||
break;
|
||||
@ -177,17 +177,17 @@ Index: libtiff/tif_getimage.c
|
||||
goto fail_return;
|
||||
}
|
||||
@@ -431,12 +431,12 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int
|
||||
uint16 inkset;
|
||||
uint16_t inkset;
|
||||
TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset);
|
||||
if (inkset != INKSET_CMYK) {
|
||||
- sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle separated image with %s=%d",
|
||||
- sprintf(emsg, "Sorry, can not handle separated image with %s=%"PRIu16,
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle separated image with %s=%"PRIu16,
|
||||
"InkSet", inkset);
|
||||
goto fail_return;
|
||||
}
|
||||
if (img->samplesperpixel < 4) {
|
||||
- sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle separated image with %s=%d",
|
||||
- sprintf(emsg, "Sorry, can not handle separated image with %s=%"PRIu16,
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle separated image with %s=%"PRIu16,
|
||||
"Samples/pixel", img->samplesperpixel);
|
||||
goto fail_return;
|
||||
}
|
||||
@ -210,8 +210,8 @@ Index: libtiff/tif_getimage.c
|
||||
goto fail_return;
|
||||
}
|
||||
if (planarconfig != PLANARCONFIG_CONTIG) {
|
||||
- sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d",
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle LogLuv images with %s=%d",
|
||||
- sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%"PRIu16,
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle LogLuv images with %s=%"PRIu16,
|
||||
"Planarconfiguration", planarconfig);
|
||||
return (0);
|
||||
}
|
||||
@ -219,8 +219,8 @@ Index: libtiff/tif_getimage.c
|
||||
case PHOTOMETRIC_CIELAB:
|
||||
break;
|
||||
default:
|
||||
- sprintf(emsg, "Sorry, can not handle image with %s=%d",
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle image with %s=%d",
|
||||
- sprintf(emsg, "Sorry, can not handle image with %s=%"PRIu16,
|
||||
+ snprintf(emsg, 1024, "Sorry, can not handle image with %s=%"PRIu16,
|
||||
photoTag, img->photometric);
|
||||
goto fail_return;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
$OpenBSD: patch-libtiff_tif_luv_c,v 1.10 2021/03/16 15:34:23 landry Exp $
|
||||
$OpenBSD: patch-libtiff_tif_luv_c,v 1.11 2021/05/06 15:28:48 landry Exp $
|
||||
Index: libtiff/tif_luv.c
|
||||
--- libtiff/tif_luv.c.orig
|
||||
+++ libtiff/tif_luv.c
|
||||
@@ -754,7 +754,7 @@ static int tiff_itrunc(double x, int m)
|
||||
@@ -733,7 +733,7 @@ static int tiff_itrunc(double x, int m)
|
||||
return (int)x;
|
||||
/* Silence CoverityScan warning about bad crypto function */
|
||||
/* coverity[dont_call] */
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-libtiff_tif_open_c,v 1.4 2021/03/16 15:34:23 landry Exp $
|
||||
$OpenBSD: patch-libtiff_tif_open_c,v 1.5 2021/05/06 15:28:48 landry Exp $
|
||||
Index: libtiff/tif_open.c
|
||||
--- libtiff/tif_open.c.orig
|
||||
+++ libtiff/tif_open.c
|
||||
@ -26,5 +26,5 @@ Index: libtiff/tif_open.c
|
||||
- strcpy(tif->tif_name, name);
|
||||
+ strlcpy(tif->tif_name, name, namelen+1);
|
||||
tif->tif_mode = m &~ (O_CREAT|O_TRUNC);
|
||||
tif->tif_curdir = (uint16) -1; /* non-existent directory */
|
||||
tif->tif_curdir = (uint16_t) -1; /* non-existent directory */
|
||||
tif->tif_curoff = 0;
|
||||
|
@ -1,11 +1,11 @@
|
||||
$OpenBSD: patch-man_Makefile_in,v 1.17 2017/05/26 20:50:57 naddy Exp $
|
||||
$OpenBSD: patch-man_Makefile_in,v 1.18 2021/05/06 15:28:48 landry Exp $
|
||||
|
||||
Replace .3tiff man page suffix with standard .3
|
||||
|
||||
Index: man/Makefile.in
|
||||
--- man/Makefile.in.orig
|
||||
+++ man/Makefile.in
|
||||
@@ -496,7 +496,7 @@ install-man3: $(dist_man3_MANS)
|
||||
@@ -499,7 +499,7 @@ install-man3: $(dist_man3_MANS)
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
|
@ -1,11 +1,11 @@
|
||||
$OpenBSD: patch-test_Makefile_in,v 1.13 2021/03/16 15:34:23 landry Exp $
|
||||
$OpenBSD: patch-test_Makefile_in,v 1.14 2021/05/06 15:28:48 landry Exp $
|
||||
|
||||
Avoid picking up an old libtiff in ${LOCALBASE}.
|
||||
|
||||
Index: test/Makefile.in
|
||||
--- test/Makefile.in.orig
|
||||
+++ test/Makefile.in
|
||||
@@ -566,10 +566,10 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
@@ -568,10 +568,10 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
|
@ -1,11 +1,11 @@
|
||||
$OpenBSD: patch-tools_Makefile_in,v 1.13 2018/12/05 20:35:25 naddy Exp $
|
||||
$OpenBSD: patch-tools_Makefile_in,v 1.14 2021/05/06 15:28:48 landry Exp $
|
||||
|
||||
Avoid picking up an old libtiff in ${LOCALBASE}.
|
||||
|
||||
Index: tools/Makefile.in
|
||||
--- tools/Makefile.in.orig
|
||||
+++ tools/Makefile.in
|
||||
@@ -342,10 +342,10 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
@@ -344,10 +344,10 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.29 2021/03/16 15:34:23 landry Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.30 2021/05/06 15:28:49 landry Exp $
|
||||
@bin bin/fax2ps
|
||||
@bin bin/fax2tiff
|
||||
@bin bin/pal2rgb
|
||||
@ -244,3 +244,4 @@ share/doc/tiff/v4.0.8.html
|
||||
share/doc/tiff/v4.0.9.html
|
||||
share/doc/tiff/v4.1.0.html
|
||||
share/doc/tiff/v4.2.0.html
|
||||
share/doc/tiff/v4.3.0.html
|
||||
|
Loading…
Reference in New Issue
Block a user