Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 May 2023 22:18:06 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: ecedf2f3cd2c - main - x11-toolkits/p5-Tk: fix build with clang 16
Message-ID:  <202305192218.34JMI6kI000584@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ecedf2f3cd2c933fb5df179f174c704c89cf1f31

commit ecedf2f3cd2c933fb5df179f174c704c89cf1f31
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-05-19 20:32:01 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-05-19 22:16:54 +0000

    x11-toolkits/p5-Tk: fix build with clang 16
    
    Clang 16 has a new error about incompatible function types, which shows
    up when building x11-toolkits/p5-Tk:
    
      ./Xlib.t:334:14: error: incompatible function pointer types initializing 'KeySym (*)(Display *, unsigned int, int)' (aka 'unsigned long (*)(struct _XDisplay *, unsigned int, int)') with an expression of type 'KeySym (Display *, KeyCode, int)' (aka 'unsigned long (struct _XDisplay *, unsigned char, int)') [-Wincompatible-function-pointer-types]
      VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned int, int)))
                   ^~~~~~~~~~~~~~~~
    
    Indeed, the XKeycodeToKeysum function takes a 'KeyCode' as its second
    parameter. Patch Xlib.t to make it so.
    
    PR:             271521
    Approved by:    pi (maintainer)
    MFH:            2023Q2
---
 x11-toolkits/p5-Tk/Makefile               |  1 +
 x11-toolkits/p5-Tk/files/patch-pTk_Xlib.t | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/x11-toolkits/p5-Tk/Makefile b/x11-toolkits/p5-Tk/Makefile
index 0db4f25edb56..8464d25b39fa 100644
--- a/x11-toolkits/p5-Tk/Makefile
+++ b/x11-toolkits/p5-Tk/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	Tk
 PORTVERSION=	804.035
+PORTREVISION=	1
 CATEGORIES=	x11-toolkits tk perl5
 MASTER_SITES=	CPAN
 PKGNAMEPREFIX=	p5-
diff --git a/x11-toolkits/p5-Tk/files/patch-pTk_Xlib.t b/x11-toolkits/p5-Tk/files/patch-pTk_Xlib.t
new file mode 100644
index 000000000000..cb847e09a554
--- /dev/null
+++ b/x11-toolkits/p5-Tk/files/patch-pTk_Xlib.t
@@ -0,0 +1,11 @@
+--- pTk/Xlib.t.orig	2023-05-19 20:18:20 UTC
++++ pTk/Xlib.t
+@@ -331,7 +331,7 @@ VFUNC(int,XIntersectRegion,V_XIntersectRegion,_ANSI_AR
+ #endif /* !DO_X_EXCLUDE */
+ 
+ #ifndef XKeycodeToKeysym
+-VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned int, int)))
++VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, KeyCode, int)))
+ #endif /* #ifndef XKeycodeToKeysym */
+ 
+ #ifndef XKeysymToString



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202305192218.34JMI6kI000584>