diff options
author | 2024-08-23 20:00:07 -0500 | |
---|---|---|
committer | 2024-12-01 08:37:13 +0000 | |
commit | 1aa5e219c1ae22c22366f7003a6bd92389764731 (patch) | |
tree | f77201f85fdaced9e56d21c68b17a933fa73aaee /dev-perl/Tk-JPEG-Lite | |
parent | sci-geosciences/gmt: fix implicit function declaration (diff) | |
download | gentoo-1aa5e219c1ae22c22366f7003a6bd92389764731.tar.gz gentoo-1aa5e219c1ae22c22366f7003a6bd92389764731.tar.bz2 gentoo-1aa5e219c1ae22c22366f7003a6bd92389764731.zip |
dev-perl/Tk-JPEG-Lite: Build fix for modern C compilers
[sam: Revbump for modern C fix, add bug link to patch.]
Closes: https://bugs.gentoo.org/883707
Signed-off-by: Christopher Byrne <salah.coronya@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38327
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-perl/Tk-JPEG-Lite')
-rw-r--r-- | dev-perl/Tk-JPEG-Lite/Tk-JPEG-Lite-2.15.0-r2.ebuild (renamed from dev-perl/Tk-JPEG-Lite/Tk-JPEG-Lite-2.15.0-r1.ebuild) | 7 | ||||
-rw-r--r-- | dev-perl/Tk-JPEG-Lite/files/Tk-JPEG-Lite-2.15.0-Modernize-C.patch | 32 |
2 files changed, 38 insertions, 1 deletions
diff --git a/dev-perl/Tk-JPEG-Lite/Tk-JPEG-Lite-2.15.0-r1.ebuild b/dev-perl/Tk-JPEG-Lite/Tk-JPEG-Lite-2.15.0-r2.ebuild index b32a58694d5b..0ab807a6d020 100644 --- a/dev-perl/Tk-JPEG-Lite/Tk-JPEG-Lite-2.15.0-r1.ebuild +++ b/dev-perl/Tk-JPEG-Lite/Tk-JPEG-Lite-2.15.0-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -18,6 +18,11 @@ BDEPEND="${RDEPEND} >=virtual/perl-ExtUtils-MakeMaker-6.580.0 dev-perl/Devel-CheckLib " + +PATCHES=( + "${FILESDIR}/${P}-Modernize-C.patch" + ) + src_test() { virtx perl-module_src_test } diff --git a/dev-perl/Tk-JPEG-Lite/files/Tk-JPEG-Lite-2.15.0-Modernize-C.patch b/dev-perl/Tk-JPEG-Lite/files/Tk-JPEG-Lite-2.15.0-Modernize-C.patch new file mode 100644 index 000000000000..d84539ef8328 --- /dev/null +++ b/dev-perl/Tk-JPEG-Lite/files/Tk-JPEG-Lite-2.15.0-Modernize-C.patch @@ -0,0 +1,32 @@ +https://bugs.gentoo.org/883707 +diff --git a/imgJPEG.c b/imgJPEG.c +index cb62e40..4ca80b5 100644 +--- a/imgJPEG.c ++++ b/imgJPEG.c +@@ -118,7 +118,7 @@ static int ChnWriteJPEG _ANSI_ARGS_((Tcl_Interp *interp, + char *fileName, Tcl_Obj *format, + Tk_PhotoImageBlock *blockPtr)); + static int StringWriteJPEG _ANSI_ARGS_((Tcl_Interp *interp, +- Tcl_DString *dataPtr, Tcl_Obj *format, ++ Tcl_Obj *format, + Tk_PhotoImageBlock *blockPtr)); + + Tk_PhotoImageFormat imgFmtJPEG = { +@@ -970,7 +970,7 @@ CommonReadJPEG(interp, cinfo, format, imageHandle, destX, destY, + int srcX, srcY; /* Coordinates of top-left pixel to be used + * in image being read. */ + { +- static char *jpegReadOptions[] = {"-fast", "-grayscale", NULL}; ++ static const char *jpegReadOptions[] = {"-fast", "-grayscale", NULL}; + int fileWidth, fileHeight, stopY, curY, outY, outWidth, outHeight; + myblock bl; + #define block bl.ck +@@ -1262,7 +1262,7 @@ CommonWriteJPEG(interp, cinfo, format, blockPtr) + Tcl_Obj *format; + Tk_PhotoImageBlock *blockPtr; + { +- static char *jpegWriteOptions[] = {"-grayscale", "-optimize", ++ static const char *jpegWriteOptions[] = {"-grayscale", "-optimize", + "-progressive", "-quality", "-smooth", NULL}; + JSAMPROW row_pointer[1]; /* pointer to original data scanlines */ + JSAMPARRAY buffer; /* Intermediate row buffer */ |