summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/weston/files/weston-musl-basename.patch73
-rw-r--r--dev-libs/weston/weston-13.0.1.ebuild1
-rw-r--r--games-fps/ut2004/Manifest2
-rw-r--r--games-fps/ut2004/ut2004-3369.3-r3.ebuild9
4 files changed, 79 insertions, 6 deletions
diff --git a/dev-libs/weston/files/weston-musl-basename.patch b/dev-libs/weston/files/weston-musl-basename.patch
new file mode 100644
index 000000000000..57b91331055f
--- /dev/null
+++ b/dev-libs/weston/files/weston-musl-basename.patch
@@ -0,0 +1,73 @@
+From dbd134ca5a3c639819c6fd503de7e2c72762ada0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Dec 2023 09:13:54 -0800
+Subject: [PATCH] libweston,tools: Include libgen.h for basename signature
+Upstream: https://gitlab.freedesktop.org/wayland/weston/-/commit/dbd134ca5a3c639819c6fd503de7e2c72762ada0
+Upstream-Status: Merged in main branch
+
+Latest musl has removed the declaration from string.h [1] as it only
+implements POSIX version alone and string.h in glibc implements GNU
+version of basename. This now results in compile errors on musl.
+
+This might be a warning with older compilers but it is error with
+Clang-17+ as it treats -Wimplicit-function-declaration as error
+
+Switch the use in backlight_init function to use POSIX version
+
+[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libweston/backend-drm/libbacklight.c | 8 +++++---
+ tools/zunitc/src/zunitc_impl.c | 1 +
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/libweston/backend-drm/libbacklight.c b/libweston/backend-drm/libbacklight.c
+index ca7f2d6806..973d15ff8c 100644
+--- a/libweston/backend-drm/libbacklight.c
++++ b/libweston/backend-drm/libbacklight.c
+@@ -41,6 +41,7 @@
+ #include <drm.h>
+ #include <fcntl.h>
+ #include <malloc.h>
++#include <libgen.h>
+ #include <string.h>
+ #include <errno.h>
+
+@@ -167,7 +168,7 @@ struct backlight *backlight_init(struct udev_device *drm_device,
+ DIR *backlights = NULL;
+ struct dirent *entry;
+ enum backlight_type type = 0;
+- char buffer[100];
++ char buffer[100], basename_buffer[100];
+ struct backlight *backlight = NULL;
+ int ret;
+
+@@ -186,9 +187,10 @@ struct backlight *backlight_init(struct udev_device *drm_device,
+ free(path);
+ if (ret < 0)
+ return NULL;
+-
++ strncpy(basename_buffer, buffer, ret);
+ buffer[ret] = '\0';
+- pci_name = basename(buffer);
++ basename_buffer[ret] = '\0';
++ pci_name = basename(basename_buffer);
+
+ if (connector_type <= 0)
+ return NULL;
+diff --git a/tools/zunitc/src/zunitc_impl.c b/tools/zunitc/src/zunitc_impl.c
+index 18f030158e..9b460fa03b 100644
+--- a/tools/zunitc/src/zunitc_impl.c
++++ b/tools/zunitc/src/zunitc_impl.c
+@@ -27,6 +27,7 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#include <libgen.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+--
+GitLab
+
diff --git a/dev-libs/weston/weston-13.0.1.ebuild b/dev-libs/weston/weston-13.0.1.ebuild
index 40b3bd77eef2..801ef005cb3b 100644
--- a/dev-libs/weston/weston-13.0.1.ebuild
+++ b/dev-libs/weston/weston-13.0.1.ebuild
@@ -95,6 +95,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-neatvnc-0.8.patch
+ "${FILESDIR}"/${PN}-musl-basename.patch
)
python_check_deps() {
diff --git a/games-fps/ut2004/Manifest b/games-fps/ut2004/Manifest
index 1cdcee8f7d96..11839ddb2810 100644
--- a/games-fps/ut2004/Manifest
+++ b/games-fps/ut2004/Manifest
@@ -1,2 +1,2 @@
-DIST ut2004-lnxpatch3369-2.tar.bz2 22465217 BLAKE2B 9852f9d55804b7f2927a31be86aee1552aaebeb38d2a40fb206154c236e9d6eff47f7594024c0d9b25c7216d3ca62571b1f89f23f72ee9e135b2e6451bcb006a SHA512 0d6f26d5a811efd64be8c304e928e03f546d9a8eaba6b074843e2b7e76e0670b39df95200a2fe2040d72bbd204c7157ed0115649a5c85396a76d9e0b7ec284b1
+DIST ut2004-lnxpatch3369-2.tar.tar 22465217 BLAKE2B 9852f9d55804b7f2927a31be86aee1552aaebeb38d2a40fb206154c236e9d6eff47f7594024c0d9b25c7216d3ca62571b1f89f23f72ee9e135b2e6451bcb006a SHA512 0d6f26d5a811efd64be8c304e928e03f546d9a8eaba6b074843e2b7e76e0670b39df95200a2fe2040d72bbd204c7157ed0115649a5c85396a76d9e0b7ec284b1
DIST ut2004-v3369-3-linux-dedicated.7z 5013927 BLAKE2B 72d24d7bc37c777f3697b767a03e052ad9b547005dd6da73833e439496e87a9c1ebbe01f88d62b29a41b2bf6380a3b3bd745e6883fbb6d0f2b7e52998d4af276 SHA512 3b2a7b64934a3647c02c9fec48565c5c2c35370d635b2af4059eb76587bfa13f46e6a4e14fdb0494ba7a4182497ed5963601986f4fcfa318e69a8a8a8c0178cf
diff --git a/games-fps/ut2004/ut2004-3369.3-r3.ebuild b/games-fps/ut2004/ut2004-3369.3-r3.ebuild
index 3011645a2d0a..99cef93dc362 100644
--- a/games-fps/ut2004/ut2004-3369.3-r3.ebuild
+++ b/games-fps/ut2004/ut2004-3369.3-r3.ebuild
@@ -1,18 +1,18 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit desktop wrapper
-PATCH_P="${PN}-lnxpatch${PV%.*}-2.tar.bz2"
+PATCH_P="${PN}-lnxpatch${PV%.*}-2.tar.tar"
DESCRIPTION="Editor's Choice Edition plus Mega Pack for the well-known first-person shooter"
HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2004"
SRC_URI="
- http://ut2004.ut-files.com/Patches/Linux/${PATCH_P}
+ http://ut2004.ut-files.com/UT2004/${PATCH_P}
https://dev.gentoo.org/~chewi/distfiles/ut2004-v${PV/./-}-linux-dedicated.7z
"
-
+S="${WORKDIR}/${PN^^}-Patch"
LICENSE="ut2003"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
@@ -36,7 +36,6 @@ RDEPEND="
BDEPEND="app-arch/p7zip"
-S="${WORKDIR}/${PN^^}-Patch"
DIR="/opt/${PN}"
# The executable pages are required. Bug #114733.