diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-02-12 09:56:54 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-02-12 09:56:54 +0000 |
commit | ebc282ef4dfa408accac685565b8ee5f6faec119 (patch) | |
tree | c0a4f713228cda0ab17eed46f0bb7ca8cb8be2f6 /dev-perl/Tk | |
parent | 6c8694a707151d59555b0e4e48235f085ce166c3 (diff) |
gentoo auto-resync : 12:02:2023 - 09:56:54
Diffstat (limited to 'dev-perl/Tk')
-rw-r--r-- | dev-perl/Tk/Manifest | 3 | ||||
-rw-r--r-- | dev-perl/Tk/Tk-804.36.0-r1.ebuild | 69 | ||||
-rw-r--r-- | dev-perl/Tk/files/Tk-804.036-configure-clang16.patch | 40 | ||||
-rw-r--r-- | dev-perl/Tk/files/Tk-804.036-crash.patch | 167 |
4 files changed, 279 insertions, 0 deletions
diff --git a/dev-perl/Tk/Manifest b/dev-perl/Tk/Manifest index 406cce494d9b..75d29dcfdcee 100644 --- a/dev-perl/Tk/Manifest +++ b/dev-perl/Tk/Manifest @@ -1,4 +1,7 @@ AUX Tk-804.034-xorg.patch 1741 BLAKE2B 06b07dd1d2c189677bffc0be09872f8b480fa1f597103509d2bf5d10bce993a21075936a7b62c793a4eae087b95a0b5c1198f20a2093dfa9f11ea03b9def3787 SHA512 368f68fe1a6c48d01adbd9a411ce38131f11bf9fc260e281f13c81bc5234bc8f2d364deda538db5ab8a88400aba30cd5e319304693e156fc6d7caeebd3fb049c +AUX Tk-804.036-configure-clang16.patch 1016 BLAKE2B 76a5f1e9cf6afdff054dd74e61c30e16c10e20e75b05643d5d1ac6c785e81979bfa23d97b52f04c2bc5c65695a45f0a59b0baa53217ce742387bf681ffeb0e37 SHA512 33ba249b55f7dbeded13327d6b273b965889ccf68e63da4bf909c7d622162915c850ecb4d78f0ad87c45a8c17bded3ceaa9c6ba66036072722f3f34b283578f1 +AUX Tk-804.036-crash.patch 5883 BLAKE2B fea732b231ca001065795f6cdc4e4b998c261936d4988e423670fa9a30a599747933a6bc26499843f53c17d6eedb92ad62fdce169c762ee777e53c8abe5dd187 SHA512 529b605a1579ab0b7f609b83f4c627238effc852502e6a4bdd432b4b229fd7f44cefb4b48be46125183005a10c6df5dc153bfe0e7ead4c3b562f241520e26473 DIST Tk-804.036.tar.gz 7024993 BLAKE2B 0ec47bc7f24af7ea5cf3fb539b2636e978a22707d591cea0a5c1ba9182a70afcf749a9fbc03fd2bf7e969ddb1a57572bd6e1b7b68210ad38b1804c877cb771ee SHA512 7d8b82127a5fdbb2f0387f541af8844a09f1230f377b92d511ecb12e81bfd5ef56d4fe925cac064a798a96a003bb8465b6df37cff18a960f3631bb3a214cd812 +EBUILD Tk-804.36.0-r1.ebuild 1924 BLAKE2B e92eee9c70f1b92382e0cf447b36414e4817606044b6b7ebdc2a0df76cf1b6f7c770b37dae3026fa66623aa7ff36ba6e38ee4a90879b9e1e4b84be4d2fe72fff SHA512 a8fb0269e0626f051a6bc45f2b38ee051da79915238f6034c502f7044f3c4d04174161b7fe30504b4c79bc286f86734078aee2b742d95413e528bfb39c9131df EBUILD Tk-804.36.0.ebuild 1808 BLAKE2B a8f512ff7f8f25336acd82591a5b35a44811bad60e75ae2798028fb5c057c3623a5c1d91c34d56cf66d87fecb5657717cf7afe4c503bdd19f0e1283cad9f56b4 SHA512 d9d55da25100f8d794c14ead60b04d5f0920ee84df7831edcc48c411782bacd4d70282ce573074c6381fb2029dc66e02b43e14e703fa8482ad086c23a45f9c41 MISC metadata.xml 7606 BLAKE2B d893e5bed29497b8c444eb6ed1f32d2cc0f378a27398e6299560eed4ca4202a7e58c9cbd604395c62b2ad126a2c501a406297c746db04a6cb2b523b754d8b0ae SHA512 6d593703f6ad6141faf2d6b4e46fb633fabbd808e7377c0510e6bc877d34d708beb81f8788340a90d37ddfa430e729607f0dd986b4cc70e8b8e079b1b85782d9 diff --git a/dev-perl/Tk/Tk-804.36.0-r1.ebuild b/dev-perl/Tk/Tk-804.36.0-r1.ebuild new file mode 100644 index 000000000000..e7ee25baa373 --- /dev/null +++ b/dev-perl/Tk/Tk-804.36.0-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DIST_AUTHOR=SREZIC +DIST_VERSION=804.036 +DIST_EXAMPLES=("examples/*") +inherit perl-module virtualx + +DESCRIPTION="A Perl Module for Tk" + +LICENSE+=" tcltk BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris" +IUSE="" + +DEPEND=" + media-libs/freetype + media-libs/libjpeg-turbo:= + >=media-libs/libpng-1.4:0 + x11-libs/libX11 + x11-libs/libXft +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-804.034-xorg.patch + "${FILESDIR}"/${PN}-804.036-configure-clang16.patch + "${FILESDIR}"/${PN}-804.036-crash.patch +) + +PERL_RM_FILES=( "t/pod.t" ) + +src_prepare() { + myconf=( X11ROOT="${EPREFIX}"/usr XFT=1 -I"${EPREFIX}"/usr/include/ -l"${EPREFIX}"/usr/$(get_libdir) ) + mydoc="ToDo VERSIONS" + + perl-module_src_prepare + # fix detection logic for Prefix, bug #385621 + sed -i -e "s:/usr:${EPREFIX}/usr:g" myConfig || die + # having this around breaks with perl-module and a case-IN-sensitive fs + rm build_ptk || die + + # Remove all bundled libs, fixes #488194 + local BUNDLED="PNG/libpng \ + PNG/zlib \ + JPEG/jpeg" + + # Move files required for tests temporarily + + mkdir -p "${T}/stash" || die "can't create temporary stash" + mv "${S}/JPEG/jpeg/testimg.jpg" "${T}/stash/testimg.jpg" || die "can't move testimg.jpg" + + for dir in ${BUNDLED}; do + einfo "Removing bundled: ${dir}" + rm -r "${S}/${dir}" || die "Can't remove bundle" + # Makefile.PL can copy files to ${S}/${dir}, so recreate them back. + mkdir -p "${S}/${dir}" || die "Can't restore bundled dir" + sed -i "\#^${dir}#d" "${S}"/MANIFEST || die 'Can not remove bundled libs from MANIFEST' + done + + # Restore test files + mv "${T}/stash/testimg.jpg" "${S}/JPEG/jpeg/testimg.jpg" || die "can't restore testimg.jpg" +} + +src_test() { + virtx perl-module_src_test +} diff --git a/dev-perl/Tk/files/Tk-804.036-configure-clang16.patch b/dev-perl/Tk/files/Tk-804.036-configure-clang16.patch new file mode 100644 index 000000000000..6d16a0505947 --- /dev/null +++ b/dev-perl/Tk/files/Tk-804.036-configure-clang16.patch @@ -0,0 +1,40 @@ +https://github.com/eserte/perl-tk/pull/79 +https://github.com/eserte/perl-tk/pull/80 + +From f7565b07f40e0cc3820e8fb0c3d2e7b5abb5eeeb Mon Sep 17 00:00:00 2001 +From: Christopher Chavez <chrischavez@gmx.us> +Date: Fri, 12 Mar 2021 07:24:18 -0600 +Subject: [PATCH] Fix some implicit function declarations + +Hstrdup.c: missing stdlib.h for exit() +Hstrtoul.c: missing string.h for strcmp() +--- a/pTk/config/Hstrdup.c ++++ b/pTk/config/Hstrdup.c +@@ -1,3 +1,4 @@ ++#include <stdlib.h> + #include <string.h> + + #define STRING "Whatever" +--- a/pTk/config/Hstrtoul.c ++++ b/pTk/config/Hstrtoul.c +@@ -1,4 +1,5 @@ + #include <stdlib.h> ++#include <string.h> + + int main() + {char *e; + +From 47219864d6ef3fe0c5616cada78e3008447a96a1 Mon Sep 17 00:00:00 2001 +From: Christopher Chavez <chrischavez@gmx.us> +Date: Fri, 12 Mar 2021 07:28:22 -0600 +Subject: [PATCH] signedchar.c: use int main to avoid C99 warning + +--- a/config/signedchar.c ++++ b/config/signedchar.c +@@ -1,4 +1,4 @@ +-main() ++int main() + { + signed char x = 'a'; + return (x - 'a'); + diff --git a/dev-perl/Tk/files/Tk-804.036-crash.patch b/dev-perl/Tk/files/Tk-804.036-crash.patch new file mode 100644 index 000000000000..f83b8103fdb8 --- /dev/null +++ b/dev-perl/Tk/files/Tk-804.036-crash.patch @@ -0,0 +1,167 @@ +https://github.com/eserte/perl-tk/pull/48 +https://github.com/eserte/perl-tk/pull/89 + +From e7c5041b4fff6210bc0348c72b538efae32aede3 Mon Sep 17 00:00:00 2001 +From: Karl Williamson <khw@cpan.org> +Date: Thu, 28 Mar 2019 22:59:17 -0500 +Subject: [PATCH 1/3] Fix segfaults due to parameter size mismatch + +See: https://rt.cpan.org/Ticket/Display.html?id=128955 +As also done upstream: https://core.tcl-lang.org/tk/info/0d9c0d50f9 +--- a/pTk/mTk/generic/tkCanvText.c ++++ b/pTk/mTk/generic/tkCanvText.c +@@ -1234,8 +1234,7 @@ GetTextIndex(interp, canvas, itemPtr, obj, indexPtr) + * index. */ + { + TextItem *textPtr = (TextItem *) itemPtr; +- size_t length; +- int c; ++ int c, length; + TkCanvas *canvasPtr = (TkCanvas *) canvas; + Tk_CanvasTextInfo *textInfoPtr = textPtr->textInfoPtr; + char *string; +--- a/pTk/mTk/generic/tkFrame.c ++++ b/pTk/mTk/generic/tkFrame.c +@@ -493,8 +493,7 @@ CreateFrame(clientData, interp, objc, objv, type, appName) + CONST char *className, *screenName, *colormapName, *arg; + Tcl_Obj *visualName; + Tcl_Obj *useOption; +- int i, c, depth; +- size_t length; ++ int i, c, depth, length; + unsigned int mask; + Colormap colormap; + Visual *visual; +@@ -749,8 +748,7 @@ FrameWidgetObjCmd(clientData, interp, objc, objv) + }; + register Frame *framePtr = (Frame *) clientData; + int result = TCL_OK, index; +- size_t length; +- int c, i; ++ int c, i, length; + Tcl_Obj *objPtr; + + if (objc < 2) { + +From 2bba8c45fcbcd9f3d45b7bc5f290e324d7c01a13 Mon Sep 17 00:00:00 2001 +From: Christopher Chavez <chrischavez@gmx.us> +Date: Fri, 12 Feb 2021 11:28:48 -0600 +Subject: [PATCH 2/3] tkFrame.c: remove redundant casts + +--- a/pTk/mTk/generic/tkFrame.c ++++ b/pTk/mTk/generic/tkFrame.c +@@ -522,7 +522,7 @@ CreateFrame(clientData, interp, objc, objv, type, appName) + visualName = NULL; + colormap = None; + for (i = 2; i < objc; i += 2) { +- arg = Tcl_GetStringFromObj(objv[i], (int *) &length); ++ arg = Tcl_GetStringFromObj(objv[i], &length); + if (length < 2) { + continue; + } +@@ -796,7 +796,7 @@ FrameWidgetObjCmd(clientData, interp, objc, objv) + */ + + for (i = 2; i < objc; i++) { +- char *arg = Tcl_GetStringFromObj(objv[i], (int *) &length); ++ char *arg = Tcl_GetStringFromObj(objv[i], &length); + if (length < 2) { + continue; + } + +From 3dd0956e92df84ec0e788368ff0214e527d28dd8 Mon Sep 17 00:00:00 2001 +From: Christopher Chavez <chrischavez@gmx.us> +Date: Fri, 12 Feb 2021 11:29:16 -0600 +Subject: [PATCH 3/3] tkImgPhoto.c: fix instances of RT #128955 + +Remove unnecessary casts to (int *) +As done upstream: https://core.tcl-lang.org/tk/info/0d9c0d50f9 +--- a/pTk/mTk/generic/tkImgPhoto.c ++++ b/pTk/mTk/generic/tkImgPhoto.c +@@ -676,10 +676,9 @@ ImgPhotoCmd(clientData, interp, objc, objv) + XColor color; + Tk_PhotoImageFormat *imageFormat; + int imageWidth, imageHeight; +- int matched; ++ int length, matched; + Tcl_Channel chan; + Tk_PhotoHandle srcHandle; +- size_t length; + Tcl_Obj *obj; + int c; + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) +@@ -723,7 +722,7 @@ ImgPhotoCmd(clientData, interp, objc, objv) + Tcl_WrongNumArgs(interp, 2, objv, "option"); + return TCL_ERROR; + } +- arg = Tcl_GetStringFromObj(objv[2], (int *) &length); ++ arg = Tcl_GetStringFromObj(objv[2], &length); + if (strncmp(arg,"-data", length) == 0) { + if (masterPtr->dataString) { + Tcl_SetObjResult(interp, masterPtr->dataString); +@@ -768,7 +767,7 @@ ImgPhotoCmd(clientData, interp, objc, objv) + return TCL_OK; + } + if (objc == 3) { +- char *arg = Tcl_GetStringFromObj(objv[2], (int *) &length); ++ char *arg = Tcl_GetStringFromObj(objv[2], &length); + if (!strncmp(arg, "-data", length)) { + Tcl_Obj *subobj = Tcl_NewStringObj("-data {} {} {}", 14); + if (masterPtr->dataString) { +@@ -5753,8 +5752,8 @@ PhotoOptionFind(interp, obj) + Tcl_Interp *interp; /* Interpreter that is being deleted. */ + Tcl_Obj *obj; /* Name of option to be found. */ + { +- size_t length; +- char *name = Tcl_GetStringFromObj(obj, (int *) &length); ++ int length; ++ char *name = Tcl_GetStringFromObj(obj, &length); + OptionAssocData *list; + char *prevname = NULL; + Tcl_ObjCmdProc *proc = (Tcl_ObjCmdProc *) NULL; + +From 0cc1fd7c599fc6b7050fcd7442f10824b032c462 Mon Sep 17 00:00:00 2001 +From: "jan.nijtmans" <nijtmans@users.sourceforge.net> +Date: Thu, 3 Jan 2019 20:53:24 +0000 +Subject: [PATCH] Fix for conflicting symbols in X.h and Windows.h + +Backported from Tcl/Tk 8.6.10: +see https://core.tcl-lang.org/tk/info/9e31fd944934 + +Fixes #87 +--- a/pTk/mTk/xlib/X11/X.h ++++ b/pTk/mTk/xlib/X11/X.h +@@ -73,7 +73,9 @@ typedef unsigned long KeyCode; /* In order to use IME, the Macintosh needs + * RESERVED RESOURCE AND CONSTANT DEFINITIONS + *****************************************************************/ + +-#define None 0L /* universal null resource or null atom */ ++#ifndef _WIN32 ++# define None 0L /* See bug [9e31fd9449] and below */ ++#endif + + #define ParentRelative 1L /* background pixmap in CreateWindow + and ChangeWindowAttributes */ +@@ -179,13 +181,20 @@ are reserved in the protocol for errors and replies. */ + + #define ShiftMask (1<<0) + #define LockMask (1<<1) +-#define ControlMask (1<<2) ++#ifndef _WIN32 ++# define ControlMask (1<<2) /* See bug [9e31fd9449] and below */ ++#endif + #define Mod1Mask (1<<3) + #define Mod2Mask (1<<4) + #define Mod3Mask (1<<5) + #define Mod4Mask (1<<6) + #define Mod5Mask (1<<7) + ++/* See bug [9e31fd9449], this way prevents conflicts with Win32 headers */ ++#ifdef _WIN32 ++enum _Bug9e31fd9449 { None = 0, ControlMask = (1<<2) }; ++#endif ++ + /* modifier names. Used to build a SetModifierMapping request or + to read a GetModifierMapping request. These correspond to the + masks defined above. */ + |