Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Dec 2022 13:07:51 GMT
From:      Dima Panov <fluffy@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: b0e97296ca3a - main - x11/libICE: Fix C++ interoperability error due to static_assert define (+)
Message-ID:  <202212061307.2B6D7pTi091904@gitrepo.freebsd.org>

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

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

commit b0e97296ca3a3f4f2ee41f1fd5ff4e38039d5a73
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2022-12-06 13:01:41 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2022-12-06 13:01:41 +0000

    x11/libICE: Fix C++ interoperability error due to static_assert define (+)
    
    Backport critical fix from upstream.
    
    Upstream commit 0269c687 added a static_assert helper
    that gets defined to blank if left undefined by assert.h.
    As this is not a macro in other languages that use this header,
    this can lead to a compile-time error.
    
    See also:       https://gitlab.freedesktop.org/xorg/lib/libice/-/commit/e176b676cff17948d68299c00dddefe41638c752
    
    Pointy hat to:  manu (for skipped exp-run)
    Approved by:    portmgr blanket
---
 x11/libICE/Makefile                                |  4 +--
 .../files/patch-libICE-1.1.0-static-assert-fix     | 32 ++++++++++++++++++++++
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/x11/libICE/Makefile b/x11/libICE/Makefile
index 33eb8e040f62..f9eb9aecd771 100644
--- a/x11/libICE/Makefile
+++ b/x11/libICE/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	libICE
 PORTVERSION=	1.1.0
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	x11
 
@@ -10,8 +11,7 @@ WWW=		https://www.freedesktop.org/wiki/Software/xlibs/
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-EXTRACT_SUFX=	.tar.xz
-USES=		cpe xorg xorg-cat:lib tar:xz
+USES=		cpe tar:xz xorg xorg-cat:lib
 USE_XORG=	xorgproto xtrans
 INSTALL_TARGET=	install-strip
 CPE_VENDOR=	freedesktop
diff --git a/x11/libICE/files/patch-libICE-1.1.0-static-assert-fix b/x11/libICE/files/patch-libICE-1.1.0-static-assert-fix
new file mode 100644
index 000000000000..c08ae6107666
--- /dev/null
+++ b/x11/libICE/files/patch-libICE-1.1.0-static-assert-fix
@@ -0,0 +1,32 @@
+From e176b676cff17948d68299c00dddefe41638c752 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
+Date: Sun, 4 Dec 2022 22:19:20 +0100
+Subject: [PATCH] ICEmsg: Fix C++ interoperability error due to static_assert
+ define
+
+Commit 0269c687e954db7aca2a4344e32cb203315a00b6 added a static_assert helper
+that gets defined to blank if left undefined by assert.h.  As this is not a
+macro in other languages that use this header, this can lead to a compile-time
+error.
+
+Bug: https://bugs.gentoo.org/884369
+---
+ include/X11/ICE/ICEmsg.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git include/X11/ICE/ICEmsg.h include/X11/ICE/ICEmsg.h
+index b6bad13..13e1509 100644
+--- include/X11/ICE/ICEmsg.h
++++ include/X11/ICE/ICEmsg.h
+@@ -34,7 +34,7 @@ Author: Ralph Mor, X Consortium
+ #include <X11/ICE/ICEconn.h>
+ 
+ #include <assert.h>
+-#ifndef static_assert
++#if !defined(__cplusplus) && !defined(static_assert)
+ #define static_assert(cond, msg) /* skip for non-C11 compilers */
+ #endif
+ 
+-- 
+GitLab
+



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