summaryrefslogtreecommitdiff
path: root/dev-perl/Tk
diff options
context:
space:
mode:
Diffstat (limited to 'dev-perl/Tk')
-rw-r--r--dev-perl/Tk/Manifest4
-rw-r--r--dev-perl/Tk/Tk-804.36.0-r4.ebuild73
-rw-r--r--dev-perl/Tk/files/Tk-804.036-c99-old_warn.patch38
-rw-r--r--dev-perl/Tk/files/Tk-804.036-c99-pregcomp.patch20
-rw-r--r--dev-perl/Tk/files/Tk-804.036-c99.patch56
5 files changed, 191 insertions, 0 deletions
diff --git a/dev-perl/Tk/Manifest b/dev-perl/Tk/Manifest
index 4ad0799aef68..5c9a77c38cae 100644
--- a/dev-perl/Tk/Manifest
+++ b/dev-perl/Tk/Manifest
@@ -1,8 +1,12 @@
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-c99-old_warn.patch 1203 BLAKE2B 21c9743d7d4d4f13baa78d426140cf612fcade948e3ff11fccada542adf3a5c60e4de5c06804dfeaf756405a0535bb877c3fc4c84423df3a76e28a20413f148e SHA512 52a12e529a7d432f61b35d08b25a55703a85bba3e8b83c08e689b5363866ef1e9d7a55541ce4fdd898cd5db963f4437dbf41c0ed7c3d5ff90ed22f6b306b1c7c
+AUX Tk-804.036-c99-pregcomp.patch 640 BLAKE2B 95adf274918927d9057a8f635750925cd73de0184a07ac3913e82ee2aaa6a32b03e875443f167f33399f64725317ff0f115512bf431d33d1f183f38dc89bfe58 SHA512 00cf37acfddddfecb634c5eaf4d9fb8a5ec67357ec2e453475a511d4b8121459381ae24d2cd63c0b23c36d6230617d6a761e936e141f0b1fd2e0e095744ac7db
+AUX Tk-804.036-c99.patch 1219 BLAKE2B d7fa1a6611c4c659828527ad92e205c3b1d9c2e1dc23cbcbe4185296038bd49ed397849250360d871896306172a2760848391a0a92ecc8f7d94946f3bfb040f3 SHA512 cdd45c4dc9f1975e165244bc3d68ab158fa4fd5893e4f6870e3d7e4455f1ec0c5bbdf467e3e9255b41f94c0c28cbd3b883c5d263bb5bf3a17402d98e29dd5218
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-r3.ebuild 2040 BLAKE2B d3d62f1db6dc9f9dd23be8013099311886df2b4db7d8203c82b720a4cdf3381455300e8117f1cc8e89f5b90676a01e1f2d2b1b5c53e9d4afd0a9869c225a5792 SHA512 07af06d40ce094672ff9fbe55fd0abd161f5e425709899fdd4aa95c653014e6bd9267923a9b73ab7c90fb752ccc2ab819aafdbad9d4b85fded762c63dbb46b31
+EBUILD Tk-804.36.0-r4.ebuild 2182 BLAKE2B a56d663b31b19a87146a6e4fefd7c601ea98868828ac9c11227bdab7b292a12bace286dd9a8c750373ea96ab50294d465837b362b66792e5be2b7100152e7701 SHA512 26d1492c2f8cd011598926b95fefba382a32cc533fc8385bef4138d9d9487f0d7764fbcd04a3d494408b400cf0d3e6bfcc4bff352816345b42878f36ce9de73f
MISC metadata.xml 7606 BLAKE2B d893e5bed29497b8c444eb6ed1f32d2cc0f378a27398e6299560eed4ca4202a7e58c9cbd604395c62b2ad126a2c501a406297c746db04a6cb2b523b754d8b0ae SHA512 6d593703f6ad6141faf2d6b4e46fb633fabbd808e7377c0510e6bc877d34d708beb81f8788340a90d37ddfa430e729607f0dd986b4cc70e8b8e079b1b85782d9
diff --git a/dev-perl/Tk/Tk-804.36.0-r4.ebuild b/dev-perl/Tk/Tk-804.36.0-r4.ebuild
new file mode 100644
index 000000000000..dae9c9bf25eb
--- /dev/null
+++ b/dev-perl/Tk/Tk-804.36.0-r4.ebuild
@@ -0,0 +1,73 @@
+# 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
+ "${FILESDIR}"/${PN}-804.036-c99.patch
+ "${FILESDIR}"/${PN}-804.036-c99-pregcomp.patch
+ "${FILESDIR}"/${PN}-804.036-c99-old_warn.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-c99-old_warn.patch b/dev-perl/Tk/files/Tk-804.036-c99-old_warn.patch
new file mode 100644
index 000000000000..976a6a6dfefd
--- /dev/null
+++ b/dev-perl/Tk/files/Tk-804.036-c99-old_warn.patch
@@ -0,0 +1,38 @@
+https://src.fedoraproject.org/rpms/perl-Tk/blob/rawhide/f/perl-Tk-Avoid-using-incompatible-pointer-type-for-old_warn.patch
+
+From c4cd966ed0997e2acb1fdcaf112c55a78ed50847 Mon Sep 17 00:00:00 2001
+From: Christopher Chavez <chrischavez@gmx.us>
+Date: Mon, 19 Feb 2024 14:18:43 -0600
+Subject: [PATCH] Avoid using incompatible pointer type for `old_warn`
+
+See https://github.com/eserte/perl-tk/issues/98#issuecomment-1944054296
+--- a/Event/Event.xs
++++ b/Event/Event.xs
+@@ -1532,7 +1532,7 @@ PROTOTYPES: DISABLE
+ BOOT:
+ {
+ #ifdef pWARN_NONE
+- SV *old_warn = PL_curcop->cop_warnings;
++ void *old_warn = PL_curcop->cop_warnings;
+ PL_curcop->cop_warnings = pWARN_NONE;
+ #endif
+ newXS("Tk::Event::INIT", XS_Tk__Event_INIT, file);
+--- a/tkGlue.c
++++ b/tkGlue.c
+@@ -5543,13 +5543,8 @@ _((pTHX))
+ char *XEventMethods = "abcdfhkmopstvwxyABDEKNRSTWXY#";
+ char buf[128];
+ CV *cv;
+-#if PERL_REVISION > 5 || (PERL_REVISION == 5 && PERL_VERSION >= 9)
+-#define COP_WARNINGS_TYPE STRLEN*
+-#else
+-#define COP_WARNINGS_TYPE SV*
+-#endif
+ #ifdef pWARN_NONE
+- COP_WARNINGS_TYPE old_warn = PL_curcop->cop_warnings;
++ void *old_warn = PL_curcop->cop_warnings;
+ PL_curcop->cop_warnings = pWARN_NONE;
+ #endif
+
+--
+2.43.0
diff --git a/dev-perl/Tk/files/Tk-804.036-c99-pregcomp.patch b/dev-perl/Tk/files/Tk-804.036-c99-pregcomp.patch
new file mode 100644
index 000000000000..6ec56b6905ab
--- /dev/null
+++ b/dev-perl/Tk/files/Tk-804.036-c99-pregcomp.patch
@@ -0,0 +1,20 @@
+https://bugs.gentoo.org/920309
+https://src.fedoraproject.org/rpms/perl-Tk/blob/rawhide/f/perl-Tk-pregcomp2.c-Avoid-using-incompatible-pointer-type.patch
+
+From 5c646b1cc55e18648918f101961afd1589a58168 Mon Sep 17 00:00:00 2001
+From: Christopher Chavez <chrischavez@gmx.us>
+Date: Mon, 19 Feb 2024 13:50:44 -0600
+Subject: [PATCH] pregcomp2.c: Avoid using incompatible pointer type
+
+See https://github.com/eserte/perl-tk/issues/98#issuecomment-1948125587
+--- a/config/pregcomp2.c
++++ b/config/pregcomp2.c
+@@ -4,5 +4,5 @@
+
+ int main() {
+ SV* sv = newSViv(0);
+- regexp* rx = pregcomp(sv, 0);
++ void* rx = pregcomp(sv, 0);
+ }
+--
+2.43.0
diff --git a/dev-perl/Tk/files/Tk-804.036-c99.patch b/dev-perl/Tk/files/Tk-804.036-c99.patch
new file mode 100644
index 000000000000..357d6f13f3c1
--- /dev/null
+++ b/dev-perl/Tk/files/Tk-804.036-c99.patch
@@ -0,0 +1,56 @@
+https://bugs.gentoo.org/919179
+https://src.fedoraproject.org/rpms/perl-Tk/raw/rawhide/f/perl-Tk-c99.patch
+https://github.com/eserte/perl-tk/pull/91
+--- a/config/unsigned.c
++++ b/config/unsigned.c
+@@ -1,15 +1,16 @@
++#include <stdio.h>
+ int main()
+ {
+ char x[] = "\377";
+ if (x[0] > 0)
+ {
+ printf("char is unsigned type\n");
+- exit(0);
++ return 0;
+ }
+ else
+ {
+ printf("char is signed type\n");
+- exit(1);
++ return 1;
+ }
+ }
+
+--- a/pTk/config/Hstrdup.c
++++ b/pTk/config/Hstrdup.c
+@@ -7,7 +7,7 @@ int main()
+ {char *e;
+ char *p = strdup(STRING);
+ if (!p || strcmp(p,STRING))
+- exit(1);
++ return 1;
+ return 0;
+ }
+
+--- a/pTk/mTk/generic/tkEvent.c
++++ b/pTk/mTk/generic/tkEvent.c
+@@ -1153,6 +1153,7 @@ TkEventDeadWindow(winPtr)
+ Time
+ TkCurrentTime(dispPtr, fallbackCurrent)
+ TkDisplay *dispPtr; /* Display for which the time is desired. */
++ int fallbackCurrent;
+ {
+ register XEvent *eventPtr;
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+--- a/pTk/mTk/generic/tkImage.c
++++ b/pTk/mTk/generic/tkImage.c
+@@ -1083,6 +1083,8 @@ int x;
+ int y;
+ int width;
+ int height;
++int imgWidth;
++int imgHeight;
+ {
+ Tk_Tile tile = (Tk_Tile) clientData;
+ Tk_TileChange *handler;