From 746e5c5047cf64357e56c10ac7ea4024e51cdaae Mon Sep 17 00:00:00 2001 From: naddy Date: Thu, 12 Jan 2023 15:55:58 +0000 Subject: [PATCH] x11/xloadimage: update to Debian patch level 25 and fix compiler warnings This fixes miscellaneous variable type errors. Prodded by jca@ after clang 15 fallout. --- x11/xloadimage/Makefile | 9 ++------- x11/xloadimage/distinfo | 4 ++-- x11/xloadimage/patches/patch-cmuwmraster_c | 8 +++++--- x11/xloadimage/patches/patch-pdsuncomp_c | 14 ++++++++++++++ x11/xloadimage/patches/patch-png_c | 12 ++++++++++++ x11/xloadimage/patches/patch-tiff_c | 12 ++++++++++++ x11/xloadimage/patches/patch-vicar_c | 12 ++++++++++++ 7 files changed, 59 insertions(+), 12 deletions(-) create mode 100644 x11/xloadimage/patches/patch-pdsuncomp_c create mode 100644 x11/xloadimage/patches/patch-png_c create mode 100644 x11/xloadimage/patches/patch-tiff_c create mode 100644 x11/xloadimage/patches/patch-vicar_c diff --git a/x11/xloadimage/Makefile b/x11/xloadimage/Makefile index a93e88ee11d..96ee4e1b7e9 100644 --- a/x11/xloadimage/Makefile +++ b/x11/xloadimage/Makefile @@ -2,11 +2,10 @@ COMMENT= graphics file viewer for X11 VERSION= 4.1 # Debian -REV= 22 +REV= 25 DISTNAME= xloadimage.${VERSION} PKGNAME= xloadimage-${VERSION}.${REV} -REVISION= 0 EPOCH= 0 CATEGORIES= x11 graphics @@ -19,7 +18,7 @@ MASTER_SITES= ${MASTER_SITE_R5CONTRIB} MASTER_SITES0= ${MASTER_SITE_DEBIAN:=main/x/xloadimage/} DISTFILES= ${DISTNAME}.tar.gz \ - xloadimage_${VERSION}-${REV}.debian.tar.gz:0 + xloadimage_${VERSION}-${REV}.debian.tar.xz:0 LIB_DEPENDS= graphics/png \ graphics/tiff @@ -32,10 +31,6 @@ NO_TEST= Yes PATCH_DIST_STRIP= -p1 -# superseded by 30_libtiff5.patch -pre-patch: - rm ${WRKDIR}/debian/patches/24_libtiff5.patch - do-distpatch: @for p in ${WRKDIR}/debian/patches/*.patch; do \ ${PATCH} ${PATCH_DIST_ARGS} < $$p; \ diff --git a/x11/xloadimage/distinfo b/x11/xloadimage/distinfo index 5b3057e914c..a78def7eec5 100644 --- a/x11/xloadimage/distinfo +++ b/x11/xloadimage/distinfo @@ -1,4 +1,4 @@ SHA256 (xloadimage.4.1.tar.gz) = QAvH2E3PsyZaehzlGBlnncOtrtojFRS9ibD5MreP9cQ= -SHA256 (xloadimage_4.1-22.debian.tar.gz) = zfoDQN50SudKjOzPxjfINMvLgtpa3gk30RKRA/xEAAM= +SHA256 (xloadimage_4.1-25.debian.tar.xz) = dvcQ6br++f+sePogHwOedAsIHqn1QtwSK8rnljcKZZ4= SIZE (xloadimage.4.1.tar.gz) = 596021 -SIZE (xloadimage_4.1-22.debian.tar.gz) = 86668 +SIZE (xloadimage_4.1-25.debian.tar.xz) = 69288 diff --git a/x11/xloadimage/patches/patch-cmuwmraster_c b/x11/xloadimage/patches/patch-cmuwmraster_c index d29d56fea95..1ba47f7fb46 100644 --- a/x11/xloadimage/patches/patch-cmuwmraster_c +++ b/x11/xloadimage/patches/patch-cmuwmraster_c @@ -1,5 +1,6 @@ ---- cmuwmraster.c.orig Wed Jul 16 16:22:59 2008 -+++ cmuwmraster.c Wed Jul 16 16:23:21 2008 +Index: cmuwmraster.c +--- cmuwmraster.c.orig ++++ cmuwmraster.c @@ -22,9 +22,9 @@ struct cmuwm_header *headerp; { printf("%s is a %ldx%ld %ld plane CMU WM raster\n", @@ -38,7 +39,8 @@ - if (memToVal(header.depth, sizeof(short)) != 1) + if (memToVal(header.depth, 2) != 1) { - fprintf(stderr,"CMU WM raster %s is of depth %d, must be 1", +- fprintf(stderr,"CMU WM raster %s is of depth %d, must be 1", ++ fprintf(stderr,"CMU WM raster %s is of depth %lu, must be 1", name, - (int) header.depth); + memToVal(header.depth, 2)); diff --git a/x11/xloadimage/patches/patch-pdsuncomp_c b/x11/xloadimage/patches/patch-pdsuncomp_c new file mode 100644 index 00000000000..c2f54a8d519 --- /dev/null +++ b/x11/xloadimage/patches/patch-pdsuncomp_c @@ -0,0 +1,14 @@ +Index: pdsuncomp.c +--- pdsuncomp.c.orig ++++ pdsuncomp.c +@@ -417,8 +417,8 @@ int pdsRead(zf, buf, size) + static char obuf[2048]; + char ibuf[2048]; + int left; +- int in_length; +- static int out_length= 2048, out_ptr= 0; ++ long int in_length; ++ static long int out_length= 2048, out_ptr= 0; + + if (Decompressing) { + left= size; diff --git a/x11/xloadimage/patches/patch-png_c b/x11/xloadimage/patches/patch-png_c new file mode 100644 index 00000000000..e250aa9d4d1 --- /dev/null +++ b/x11/xloadimage/patches/patch-png_c @@ -0,0 +1,12 @@ +Index: png.c +--- png.c.orig ++++ png.c +@@ -135,7 +135,7 @@ static void pngInfo( png_uint_32 width, png_uint_32 he + int bit_depth, int color_type, int interlace_type, + double file_gamma) + { +- printf("%s is %ldx%ld PNG image, color type %s, %d bit", ++ printf("%s is %ux%u PNG image, color type %s, %d bit", + filename, width, height, pngColor(color_type), bit_depth); + if( interlace_type != PNG_INTERLACE_NONE) + printf(", interlace %s", pngInterlace(interlace_type)); diff --git a/x11/xloadimage/patches/patch-tiff_c b/x11/xloadimage/patches/patch-tiff_c new file mode 100644 index 00000000000..23d26b0ec3c --- /dev/null +++ b/x11/xloadimage/patches/patch-tiff_c @@ -0,0 +1,12 @@ +Index: tiff.c +--- tiff.c.orig ++++ tiff.c +@@ -227,6 +227,8 @@ static void babble(name, info) + } + + int tiffIdent(fullname, name) ++ char *fullname; ++ char *name; + { + TIFF *tiff; + struct tiff_info info; diff --git a/x11/xloadimage/patches/patch-vicar_c b/x11/xloadimage/patches/patch-vicar_c new file mode 100644 index 00000000000..9018bdc9a0b --- /dev/null +++ b/x11/xloadimage/patches/patch-vicar_c @@ -0,0 +1,12 @@ +Index: vicar.c +--- vicar.c.orig ++++ vicar.c +@@ -115,7 +115,7 @@ Image *vicarLoad(fullname, name, verbose) + byte *mapred,*mapgreen,*mapblue; + ZFILE *zf; + +- if ( vicarIdent(fullname,name,verbose) == 0 ) ++ if ( vicarIdent(fullname,name) == 0 ) + return(0); + + /* define the image structure */