Skip to content
Merged
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
70 changes: 70 additions & 0 deletions srcpkgs/stepmania/patches/gcc-12.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Backported from
https://github.com/stepmania/stepmania/commit/8ab7c7fab937acc684392b909b6b30b47d9a8c7b

--- a/src/NoteData.h
+++ b/src/NoteData.h
@@ -375,7 +375,13 @@ public:
/** @brief Allow a quick way to swap notedata. */
namespace std
{
- template<> inline void swap<NoteData>( NoteData &nd1, NoteData &nd2 ) { nd1.swap( nd2 ); }
+ template<> inline void swap<NoteData>( NoteData &nd1, NoteData &nd2 )
+#if !defined(_MSC_VER)
+ noexcept(is_nothrow_move_constructible<NoteData>::value && is_nothrow_move_assignable<NoteData>::value)
+#endif
+ {
+ nd1.swap( nd2 );
+ }
}

#endif
--- a/src/arch/ArchHooks/ArchHooks.h
+++ b/src/arch/ArchHooks/ArchHooks.h
@@ -1,6 +1,8 @@
#ifndef ARCH_HOOKS_H
#define ARCH_HOOKS_H

+#include <ctime>
+
struct lua_State;
class ArchHooks
{
--- a/src/archutils/Unix/AssertionHandler.cpp
+++ b/src/archutils/Unix/AssertionHandler.cpp
@@ -46,18 +46,28 @@ extern "C" void __assert_perror_fail( int errnum, const char *file, unsigned int

/* Catch unhandled C++ exceptions. Note that this works in g++ even with -fno-exceptions, in
* which case it'll be called if any exceptions are thrown at all. */
-#include <cxxabi.h>
void UnexpectedExceptionHandler()
{
- type_info *pException = abi::__cxa_current_exception_type();
- char const *pName = pException->name();
- int iStatus = -1;
- char *pDem = abi::__cxa_demangle( pName, 0, 0, &iStatus );
-
- const RString error = ssprintf("Unhandled exception: %s", iStatus? pName:pDem);
+ std::exception_ptr exptr = std::current_exception();
+ try
+ {
+ std::rethrow_exception(exptr);
+ }
+ catch (std::exception &ex)
+ {
+#if defined(CRASH_HANDLER)
+ const RString error = ssprintf("Unhandled exception: %s", ex.what());
+ sm_crash( error );
+#endif
+ }
+ // TODO: Don't throw anything not subclassing std::exception
+ catch(...)
+ {
#if defined(CRASH_HANDLER)
- sm_crash( error );
+ const RString error = ssprintf("Unknown exception.");
+ sm_crash( error );
#endif
+ }
}

void InstallExceptionHandler()
20 changes: 15 additions & 5 deletions srcpkgs/stepmania/template
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
# Template file for 'stepmania'
pkgname=stepmania
version=5.0.12
revision=3
revision=4
# see CMake/SetupFfmpeg.cmake in the source code
_ffmpeg_ver=2.1.3
build_wrksrc="${pkgname}-${version}"
build_style=cmake
make_cmd=make
cmake_builddir="Build"
hostmakedepends="nasm yasm pkg-config git"
hostmakedepends="nasm yasm pkg-config"
makedepends="libmad-devel libvorbis-devel pcre-devel libjpeg-turbo-devel
alsa-lib-devel libXrandr-devel libva-devel glew-devel"
short_desc="Advanced rhythm game"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="MIT"
homepage="http://www.stepmania.com/"
distfiles="https://github.com/stepmania/stepmania/archive/v${version}.tar.gz"
checksum=df79bcadd69d4ed60cf560d45386ec275181343495ffd744c3ff8f73c83d4755
distfiles="https://github.com/stepmania/stepmania/archive/v${version}.tar.gz
https://github.com/FFmpeg/FFmpeg/archive/n${_ffmpeg_ver}.tar.gz"
checksum="df79bcadd69d4ed60cf560d45386ec275181343495ffd744c3ff8f73c83d4755
cfafef9c9fb2581ac234fc11da97c677e5a911db4e16b341ab724b7e6aa03b62"
patch_args="-Np1 --directory=${build_wrksrc}"

# Upstream has stated that only x86 hardware can meed the performance
# constraints and that musl is not supported due to interop issues
Expand All @@ -22,8 +28,12 @@ archs="i686 x86_64"

export CMAKE_GENERATOR="Unix Makefiles"

post_extract() {
mv FFmpeg-n${_ffmpeg_ver} ${build_wrksrc}/extern/ffmpeg-linux-${_ffmpeg_ver}
}

post_install() {
vlicense Docs/Licenses.txt
vlicense Docs/Licenses.txt LICENSE

mkdir -p ${DESTDIR}/usr/bin
cd ${DESTDIR}
Expand Down