From 4464bf26d93bdcc80e0b1330fe9c9caef26b34fc Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 9 Mar 2024 01:07:53 +0000 Subject: gentoo auto-resync : 09:03:2024 - 01:07:53 --- dev-perl/Tk/Manifest | 2 + dev-perl/Tk/Tk-804.36.0-r3.ebuild | 70 ++++++++++++++++++++++ ...vs-int-pointer-confusion-in-Tcl_GetByteAr.patch | 48 +++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 dev-perl/Tk/Tk-804.36.0-r3.ebuild create mode 100644 dev-perl/Tk/files/Tk-804.036-Fix-STRLEN-vs-int-pointer-confusion-in-Tcl_GetByteAr.patch (limited to 'dev-perl/Tk') diff --git a/dev-perl/Tk/Manifest b/dev-perl/Tk/Manifest index 05a17b7484b1..9b163aedf537 100644 --- a/dev-perl/Tk/Manifest +++ b/dev-perl/Tk/Manifest @@ -1,8 +1,10 @@ AUX Tk-804.034-xorg.patch 1741 BLAKE2B 06b07dd1d2c189677bffc0be09872f8b480fa1f597103509d2bf5d10bce993a21075936a7b62c793a4eae087b95a0b5c1198f20a2093dfa9f11ea03b9def3787 SHA512 368f68fe1a6c48d01adbd9a411ce38131f11bf9fc260e281f13c81bc5234bc8f2d364deda538db5ab8a88400aba30cd5e319304693e156fc6d7caeebd3fb049c +AUX Tk-804.036-Fix-STRLEN-vs-int-pointer-confusion-in-Tcl_GetByteAr.patch 1654 BLAKE2B 300074cc2f3e7f493fe91de65f7c98c6e23a88c6387cf5ab9d852f58c547b9da26d1fab6cda912567ab154b26514c1d9f3f949e66de62eabea3abf40f676bdea SHA512 b1af73e7924c1638533d2a33d0232ea280eb204e8d1a071746951192c096182bc5a1fd3381e69e60d92eb934ea2736dd07c9623ea99e343a284d5ee636d350d5 AUX Tk-804.036-configure-clang16.patch 1016 BLAKE2B 76a5f1e9cf6afdff054dd74e61c30e16c10e20e75b05643d5d1ac6c785e81979bfa23d97b52f04c2bc5c65695a45f0a59b0baa53217ce742387bf681ffeb0e37 SHA512 33ba249b55f7dbeded13327d6b273b965889ccf68e63da4bf909c7d622162915c850ecb4d78f0ad87c45a8c17bded3ceaa9c6ba66036072722f3f34b283578f1 AUX Tk-804.036-crash.patch 5883 BLAKE2B fea732b231ca001065795f6cdc4e4b998c261936d4988e423670fa9a30a599747933a6bc26499843f53c17d6eedb92ad62fdce169c762ee777e53c8abe5dd187 SHA512 529b605a1579ab0b7f609b83f4c627238effc852502e6a4bdd432b4b229fd7f44cefb4b48be46125183005a10c6df5dc153bfe0e7ead4c3b562f241520e26473 AUX Tk-804.036-incompatible-function-pointer-types.patch 587 BLAKE2B e4c289f1dc79664df31892a1c805e20af9ab54552d6d2aaab3ee419fb5577d92eb59069e6e4951f425d2c1c539ceeef50aa3d03b364d80da59d9750b3a9a526b SHA512 b1b4671888310a6b728592160d53ad3013a4e43dfed3c047386d6b107f0dcfba8e5085eb4be8818a614f2677a367250f769bca95943396a2c03acd48d51ba15d DIST Tk-804.036.tar.gz 7024993 BLAKE2B 0ec47bc7f24af7ea5cf3fb539b2636e978a22707d591cea0a5c1ba9182a70afcf749a9fbc03fd2bf7e969ddb1a57572bd6e1b7b68210ad38b1804c877cb771ee SHA512 7d8b82127a5fdbb2f0387f541af8844a09f1230f377b92d511ecb12e81bfd5ef56d4fe925cac064a798a96a003bb8465b6df37cff18a960f3631bb3a214cd812 EBUILD Tk-804.36.0-r1.ebuild 1889 BLAKE2B 55f080f0852b537b684648c0a5912ce14fd5c9f9946c972bf5a39c439480852af0fbbc968b7ece5e7ad35f2f9bfdfaeb2459b43bacea2c9d23d0079ecbd7c157 SHA512 cfe8309e0545ae00744b7f48269f5bd72042c10542b5d0370a48b7a0a37d8ef9db48f0f1c86ef6bc3fd5679b8ebbf9b392b1fd9f0f2279ec681106aee15b82bd EBUILD Tk-804.36.0-r2.ebuild 1953 BLAKE2B ac64cd324248ab60d29109dd6969d22900bda779bf2effee22eb01a619f159ead52883164c8f37ed76f79e6622fcb793f28b386e28202cd963d6bfca15d93b53 SHA512 a7ddbc8a806c701523f21c119801443bea1be83431ec8dc5ee1d4710aa32b79cd4172c84d3147044fe0c4661aa52779f63c1718391f055a114dce9aeb583d056 +EBUILD Tk-804.36.0-r3.ebuild 2047 BLAKE2B 423321f396d39267bc55c115a12e4a88f04007929666a494f4fd9a3e1bcc01e4c4b68c270862c9feb55ac61534c854453a84c8f63f37cb5b60265db22d27eed2 SHA512 44e8b14b52916c24eb54abec33ea584205cf093eb0da9f5ae90dd08e625fe7bf00476007104ba16b01a85d972907888afcbe9d507a395a27213958a123c26377 MISC metadata.xml 7606 BLAKE2B d893e5bed29497b8c444eb6ed1f32d2cc0f378a27398e6299560eed4ca4202a7e58c9cbd604395c62b2ad126a2c501a406297c746db04a6cb2b523b754d8b0ae SHA512 6d593703f6ad6141faf2d6b4e46fb633fabbd808e7377c0510e6bc877d34d708beb81f8788340a90d37ddfa430e729607f0dd986b4cc70e8b8e079b1b85782d9 diff --git a/dev-perl/Tk/Tk-804.36.0-r3.ebuild b/dev-perl/Tk/Tk-804.36.0-r3.ebuild new file mode 100644 index 000000000000..f4609c38f79d --- /dev/null +++ b/dev-perl/Tk/Tk-804.36.0-r3.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 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" + +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 + "${FILESDIR}"/${PN}-804.036-incompatible-function-pointer-types.patch + "${FILESDIR}"/${PN}-804.036-Fix-STRLEN-vs-int-pointer-confusion-in-Tcl_GetByteAr.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-Fix-STRLEN-vs-int-pointer-confusion-in-Tcl_GetByteAr.patch b/dev-perl/Tk/files/Tk-804.036-Fix-STRLEN-vs-int-pointer-confusion-in-Tcl_GetByteAr.patch new file mode 100644 index 000000000000..2d56412d1855 --- /dev/null +++ b/dev-perl/Tk/files/Tk-804.036-Fix-STRLEN-vs-int-pointer-confusion-in-Tcl_GetByteAr.patch @@ -0,0 +1,48 @@ +https://bugs.gentoo.org/916814 +https://salsa.debian.org/georgesk/perl-tk/-/blob/master/debian/patches/80-Fix-STRLEN-vs-int-pointer-confusion-in-Tcl_GetByteAr.patch?ref_type=heads + +From a26233c844c52f49ef9cca5f88dd9063aac60d0f Mon Sep 17 00:00:00 2001 +From: Niko Tyni +Date: Thu, 11 Jan 2024 18:28:58 +0000 +Subject: [PATCH] Fix STRLEN vs int pointer confusion in + Tcl_GetByteArrayFromObj() + +Perl 5.37.2, more precisely commit + + https://github.com/Perl/perl5/commit/1ef9039bccbfe64f47f201b6cfb7d6d23e0b08a7 + +changed the implementation of SvPV() et al., breaking t/balloon.t, +t/canvas2.t and t/photo.t on big-endian 64-bit architectures such as +ppc64 and s390x because StringMatchGIF() no longer recognized GIF files. + +This is because Tcl_GetByteArrayFromObj() was calling SvPV() with an int +pointer instead of a correct STRLEN pointer, and the new implementation +is more sensitive to this: it assigns the pointers as-is, resulting in +the int pointer pointing at the wrong end of the 64-bit length. + +Other functions taking a length pointer, at least Tcl_GetStringFromObj() +already seem to do things correctly, so presumably this is not a +systematic issue. +--- + objGlue.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/objGlue.c b/objGlue.c +index d4927ea..dbd6a50 100644 +--- a/objGlue.c ++++ b/objGlue.c +@@ -627,7 +627,10 @@ Tcl_GetByteArrayFromObj(Tcl_Obj * objPtr, int * lengthPtr) + sv_utf8_downgrade(objPtr, 0); + if (lengthPtr) + { +- return (unsigned char *) SvPV(objPtr, *lengthPtr); ++ STRLEN len; ++ unsigned char *s = SvPV(objPtr, len); ++ *lengthPtr = len; ++ return s; + } + else + { +-- +2.30.2 + -- cgit v1.2.3