Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions audio/shntool/gcc15.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
From 9b27cda17e20a733549763579b0734932ab68280 Mon Sep 17 00:00:00 2001
From: Felix Kaechele <felix@kaechele.ca>
Date: Wed, 22 Jan 2025 20:53:32 -0500
Subject: [PATCH] gcc 15 fixes

Signed-off-by: Felix Kaechele <felix@kaechele.ca>
---
include/format.h | 2 +-
include/mode.h | 2 +-
include/module-types.h | 5 ++---
src/core_mode.c | 10 ++--------
4 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/include/format.h b/include/format.h
index 567993e805ba..ab293f8ae91d 100644
--- a/include/format.h
+++ b/include/format.h
@@ -35,7 +35,7 @@ void tagcpy(unsigned char *,unsigned char *);
int tagcmp(unsigned char *,unsigned char *);

/* function to check if a file name is about to be clobbered, and if so, asks whether this is OK */
-int clobber_check(char *);
+bool clobber_check(char *);

/* find an output format module with the given name */
format_module *find_format(char *);
diff --git a/include/mode.h b/include/mode.h
index a9c8cd003d04..fc13d4f16940 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -78,7 +78,7 @@ void create_output_filename(char *,char *,char *);
FILE *open_output_stream(char *,proc_info *);

/* function to determine if two filenames point to the same file */
-int files_are_identical(char *,char *);
+bool files_are_identical(char *,char *);

/* function to remove a file if it exists */
void remove_file(char *);
diff --git a/include/module-types.h b/include/module-types.h
index c49c6613bde2..2cabf64d3598 100644
--- a/include/module-types.h
+++ b/include/module-types.h
@@ -23,6 +23,8 @@
#ifndef __MODULE_TYPES_H__
#define __MODULE_TYPES_H__

+#include <stdbool.h>
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -44,9 +46,6 @@
#define PATHSEPCHAR '/'
#endif

-/* boolean type */
-typedef int bool;
-
/* wtypes */
typedef unsigned long wlong;
typedef unsigned short wshort;
diff --git a/src/core_mode.c b/src/core_mode.c
index 4585b8376668..3e0a60c92050 100644
--- a/src/core_mode.c
+++ b/src/core_mode.c
@@ -564,18 +564,12 @@ static int compare_ascii(const wave_info **w1,const wave_info **w2)

static void ascii_sort_files(wave_info **filenames, int numfiles)
{
- int (*cmpfunc) ();
-
- cmpfunc = compare_ascii;
- qsort(filenames,numfiles,sizeof(wave_info *),cmpfunc);
+ qsort(filenames,numfiles,sizeof(wave_info *),(int (*)(const void*, const void*))compare_ascii);
}

static void version_sort_files(wave_info **filenames,int numfiles)
{
- int (*cmpfunc) ();
-
- cmpfunc = compare_version;
- qsort(filenames,numfiles,sizeof(wave_info *),cmpfunc);
+ qsort(filenames,numfiles,sizeof(wave_info *),(int (*)(const void*, const void*))compare_version);
}

/* public functions */
--
2.48.1
19 changes: 9 additions & 10 deletions audio/shntool/shntool.SlackBuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
# Slackware build script for shntool
# Written by slakmagik <slakmagik@gmail.com>
# Released under the WTFPL
# Maintained 2020-2026 by Gregory J. L. Tourte <artourter@gmail.com>

cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=shntool
VERSION=${VERSION:-3.0.10}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

Expand All @@ -34,16 +35,12 @@ OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi

set -e
Expand All @@ -56,10 +53,12 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
-o -perm 400 \) -exec chmod 644 {} \;
-perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +

# patch from fedora to allow compilation with gcc14 and above
# Thanks to Daedra
patch -p 1 < $CWD/gcc15.patch

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
Expand All @@ -74,7 +73,7 @@ make DESTDIR=$PKG install-strip
find $PKG/usr/man -type f -exec gzip -9 {} \;

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a [ACINR]* doc/* $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog NEWS README doc/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
Expand Down