From 5f90dbddfa11616f27ff2ccecabee2f3f3208ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Oth=C3=B3n=20Mart=C3=ADnez=20Vera?= Date: Wed, 10 Aug 2022 17:02:29 -0500 Subject: [PATCH] net-misc/nx: fixes for musl libc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The modified files, xf86bigfont.c (copied from xorg-server) and glheader.h (copied from mesa) don't require the deleted includes with this patch. Signed-off-by: Cristian Othón Martínez Vera Bug: 713418 --- net-misc/nx/files/nx-3.5.99.25-musl.patch | 28 +++++++++++++++++++++ net-misc/nx/files/nx-3.5.99.26-musl.patch | 30 +++++++++++++++++++++++ net-misc/nx/nx-3.5.99.25.ebuild | 2 ++ net-misc/nx/nx-3.5.99.26.ebuild | 2 ++ 4 files changed, 62 insertions(+) create mode 100644 net-misc/nx/files/nx-3.5.99.25-musl.patch create mode 100644 net-misc/nx/files/nx-3.5.99.26-musl.patch diff --git a/net-misc/nx/files/nx-3.5.99.25-musl.patch b/net-misc/nx/files/nx-3.5.99.25-musl.patch new file mode 100644 index 00000000000..ea1d86d487c --- /dev/null +++ b/net-misc/nx/files/nx-3.5.99.25-musl.patch @@ -0,0 +1,28 @@ +--- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c 2018-03-16 16:52:03.000000000 -0600 ++++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c 2020-10-09 21:12:20.000000000 -0500 +@@ -40,13 +40,6 @@ + + #include + #ifdef HAS_SHM +-#if defined(linux) && (!defined(__GNU_LIBRARY__) || __GNU_LIBRARY__ < 2) +-/* libc4 does not define __GNU_LIBRARY__, libc5 defines __GNU_LIBRARY__ as 1 */ +-/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers): +- Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define +- PAGE_SIZE. It is defined in . */ +-#include +-#endif + #ifdef SVR4 + #include + #endif +--- a/nx-X11/extras/Mesa/src/mesa/main/glheader.h 2018-03-16 19:02:29.000000000 -0600 ++++ b/nx-X11/extras/Mesa/src/mesa/main/glheader.h 2020-10-09 21:30:09.000000000 -0500 +@@ -62,9 +62,6 @@ + #include + #include + #include +-#if defined(__linux__) && defined(__i386__) +-#include +-#endif + #endif + #include + #include diff --git a/net-misc/nx/files/nx-3.5.99.26-musl.patch b/net-misc/nx/files/nx-3.5.99.26-musl.patch new file mode 100644 index 00000000000..7aec7605437 --- /dev/null +++ b/net-misc/nx/files/nx-3.5.99.26-musl.patch @@ -0,0 +1,30 @@ +diff -uNr a/nx-X11/programs/Xserver/Xext/xf86bigfont.c b/nx-X11/programs/Xserver/Xext/xf86bigfont.c +--- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c 2021-02-04 07:34:56.000000000 -0600 ++++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c 2021-09-22 10:11:10.000000000 -0500 +@@ -40,14 +40,7 @@ + + #include + #ifdef HAS_SHM +-#if defined(linux) && (!defined(__GNU_LIBRARY__) || __GNU_LIBRARY__ < 2) +-/* libc4 does not define __GNU_LIBRARY__, libc5 defines __GNU_LIBRARY__ as 1 */ +-/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers): +- Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define +- PAGE_SIZE. It is defined in . */ +-#include + #include +-#endif + #ifdef SVR4 + #include + #endif +--- a/nx-X11/extras/Mesa/src/mesa/main/glheader.h 2018-03-16 19:02:29.000000000 -0600 ++++ b/nx-X11/extras/Mesa/src/mesa/main/glheader.h 2020-10-09 21:30:09.000000000 -0500 +@@ -62,9 +62,6 @@ + #include + #include + #include +-#if defined(__linux__) && defined(__i386__) +-#include +-#endif + #endif + #include + #include diff --git a/net-misc/nx/nx-3.5.99.25.ebuild b/net-misc/nx/nx-3.5.99.25.ebuild index 184060c3731..51dfa9af599 100644 --- a/net-misc/nx/nx-3.5.99.25.ebuild +++ b/net-misc/nx/nx-3.5.99.25.ebuild @@ -43,6 +43,8 @@ BDEPEND=" S="${WORKDIR}/nx-libs-${PV}" src_prepare() { + use elibc_musl && PATCHES+=( "${FILESDIR}/${PN}-3.5.99.25-musl.patch" ) + default # We want predictable behavior. So let's assume we never diff --git a/net-misc/nx/nx-3.5.99.26.ebuild b/net-misc/nx/nx-3.5.99.26.ebuild index 639d0e415a4..c7f40db0c8e 100644 --- a/net-misc/nx/nx-3.5.99.26.ebuild +++ b/net-misc/nx/nx-3.5.99.26.ebuild @@ -48,6 +48,8 @@ PATCHES=( ) src_prepare() { + use elibc_musl && PATCHES+=( "${FILESDIR}/${PN}-3.5.99.26-musl.patch" ) + default # We want predictable behavior. So let's assume we never -- 2.35.1