summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/nas')
-rw-r--r--media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch76
-rw-r--r--media-libs/nas/nas-1.9.5-r2.ebuild (renamed from media-libs/nas/nas-1.9.5-r1.ebuild)5
2 files changed, 79 insertions, 2 deletions
diff --git a/media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch b/media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch
new file mode 100644
index 000000000000..629bd5dff2f0
--- /dev/null
+++ b/media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch
@@ -0,0 +1,76 @@
+https://sourceforge.net/p/nas/bugs/15/
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Tue, 30 Apr 2024 01:06:32 +0530
+Subject: [PATCH 1/1] Partially revert commit e792e42
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit e792e42 introduced some regression with GCC 14 and 15 espcially
+to the chaged sections of the code in audemo.c. Thus resutling in errors
+such as:
+
+audemo.c: In function ‘rescanCB’:
+audemo.c:524:23: error: passing argument 2 of ‘XawListChange’ from incompatible pointer type [-Wincompatible-pointer-types]
+ 524 | (const char **)makeFileList(globals->fileNames, globals->numFiles),
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ | |
+ | const char **
+In file included from audemo.c:97:
+/usr/include/X11/Xaw/List.h:170:26: note: expected ‘char **’ but argument is of type ‘const char **’
+ 170 | String *list,
+ | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
+audemo.c:530:41: error: passing argument 2 of ‘XawListChange’ from incompatible pointer type [-Wincompatible-pointer-types]
+ 530 | XawListChange(globals->samples, &noFilesString, 1, -1, True);
+ | ^~~~~~~~~~~~~~
+ | |
+ | const char **
+/usr/include/X11/Xaw/List.h:170:26: note: expected ‘char **’ but argument is of type ‘const char **’
+ 170 | String *list,
+ | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
+
+First observed on Gentoo Linux with GCC 14, I reproduced with GCC 15 as
+well. Please reffer: https://bugs.gentoo.org/927451
+
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+--- a/clients/audio/audemo/audemo.c
++++ b/clients/audio/audemo/audemo.c
+@@ -501,7 +501,7 @@ static void
+ rescanCB(Widget w, XtPointer globalsp, XtPointer call_data)
+ {
+ GlobalDataPtr globals = (GlobalDataPtr) globalsp;
+- static const char *noFilesString = "No files found";
++ static char *noFilesString = "No files found";
+ char *dir,
+ *template;
+ int i;
+@@ -521,7 +521,7 @@ rescanCB(Widget w, XtPointer globalsp, XtPointer call_data)
+ if (globals->numFiles)
+ {
+ XawListChange(globals->samples,
+- (const char **)makeFileList(globals->fileNames, globals->numFiles),
++ makeFileList(globals->fileNames, globals->numFiles),
+ globals->numFiles, -1, True);
+ XtSetSensitive(globals->samples, True);
+ }
+@@ -597,7 +597,7 @@ bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data)
+ access[4],
+ desc[COMMENT_LEN];
+ int i;
+- static const char *noBucketString = "No buckets";
++ static char *noBucketString = "No buckets";
+
+ if (buf->numBuckets)
+ {
+@@ -652,7 +652,7 @@ bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data)
+
+ if (buf->numBuckets)
+ {
+- XawListChange(buf->bucketList, (const char **)buf->bucketText,
++ XawListChange(buf->bucketList, buf->bucketText,
+ buf->numBuckets, -1, True);
+ XtSetSensitive(buf->bucketList, True);
+ }
+--
+2.45.0.rc1.218.g7b19149425.dirty
+
diff --git a/media-libs/nas/nas-1.9.5-r1.ebuild b/media-libs/nas/nas-1.9.5-r2.ebuild
index 79a34f036d84..3fb113d0881f 100644
--- a/media-libs/nas/nas-1.9.5-r1.ebuild
+++ b/media-libs/nas/nas-1.9.5-r2.ebuild
@@ -7,12 +7,12 @@ inherit flag-o-matic multilib multilib-minimal toolchain-funcs
DESCRIPTION="Network Audio System"
HOMEPAGE="https://radscan.com/nas.html"
-SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
+SRC_URI="https://sourceforge.net/${PN}/${P}.tar.gz"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-1.9.5-patches.tar.xz"
LICENSE="HPND MIT"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ppc ~ppc64 ~riscv sparc x86"
IUSE="doc static-libs"
RDEPEND="
@@ -41,6 +41,7 @@ DOCS=( BUILDNOTES FAQ HISTORY README RELEASE TODO )
PATCHES=(
"${WORKDIR}"/${PN}-1.9.5-patches
+ "${FILESDIR}"/${PN}-1.9.5-gcc14-build-fix.patch
)
src_prepare() {