mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
community/vbam to 2.1.4.r453.65b5affe-2
This commit is contained in:
parent
cf3d970a6a
commit
5442ec8f60
2 changed files with 4 additions and 89 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - disable LTO: -DENABLE_LTO='FALSE'
|
||||
# - patch to fix doctest header with new glibc
|
||||
|
||||
pkgbase=vbam
|
||||
pkgname=(
|
||||
|
@ -11,7 +10,7 @@ pkgname=(
|
|||
vbam-wx
|
||||
)
|
||||
pkgver=2.1.4.r453.65b5affe
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc='Nintendo GameBoy Advance emulator'
|
||||
arch=(x86_64)
|
||||
url=https://vba-m.com
|
||||
|
@ -29,6 +28,7 @@ depends=(
|
|||
)
|
||||
makedepends=(
|
||||
cmake
|
||||
doctest
|
||||
ffmpeg
|
||||
git
|
||||
libglvnd
|
||||
|
@ -42,17 +42,15 @@ _commit=65b5affe7ddd87653362d1bb1cb3da7979762b92
|
|||
source=(
|
||||
git+https://github.com/visualboyadvance-m/visualboyadvance-m.git#commit=${_commit}
|
||||
vbam-ffmpeg5.0.patch
|
||||
doctest.patch
|
||||
)
|
||||
b2sums=('SKIP'
|
||||
'c24813fab7a155ac0711e4c5764148d45dae8c1a57938fd8ce253368c31f7d91c2c912f5b0da48c70952f990449315489f175e0894d9f4a75efc53a3e6abd162'
|
||||
'e602abde1eb36eed2e047d20d74346c051ad3f2f17f3b5c7afa59181947c7af587139753a3d5ad53f5b4ea15634be807779cfa595ce07d9e64f6e8c31909a990')
|
||||
'c24813fab7a155ac0711e4c5764148d45dae8c1a57938fd8ce253368c31f7d91c2c912f5b0da48c70952f990449315489f175e0894d9f4a75efc53a3e6abd162')
|
||||
validpgpkeys=(A0C0E526E36FD2138C149D4D08AB596679D86240) # Rafael Kitover <rkitover@gmail.com>
|
||||
|
||||
prepare() {
|
||||
cd visualboyadvance-m
|
||||
patch -Np1 -i ../vbam-ffmpeg5.0.patch
|
||||
patch -Np1 -i ../doctest.patch
|
||||
sed -e 's|${CMAKE_SOURCE_DIR}/third_party|/usr|' -i src/wx/tests/CMakeLists.txt # Unbundle doctest (bundled one is not glibc 2.34 compatible)
|
||||
}
|
||||
|
||||
pkgver() {
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
diff --git a/third_party/include/doctest/doctest.h b/third_party/include/doctest/doctest.h
|
||||
index 94446982..13ccf272 100644
|
||||
--- a/third_party/include/doctest/doctest.h
|
||||
+++ b/third_party/include/doctest/doctest.h
|
||||
@@ -3940,7 +3940,9 @@ namespace {
|
||||
#if !defined(DOCTEST_CONFIG_POSIX_SIGNALS) && !defined(DOCTEST_CONFIG_WINDOWS_SEH)
|
||||
struct FatalConditionHandler
|
||||
{
|
||||
- void reset() {}
|
||||
+ static void reset() {}
|
||||
+ static void allocateAltStackMem() {}
|
||||
+ static void freeAltStackMem() {}
|
||||
};
|
||||
#else // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH
|
||||
|
||||
@@ -3977,6 +3979,9 @@ namespace {
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
+ static void allocateAltStackMem() {}
|
||||
+ static void freeAltStackMem() {}
|
||||
+
|
||||
FatalConditionHandler() {
|
||||
isSet = true;
|
||||
// 32k seems enough for doctest to handle stack overflow,
|
||||
@@ -4029,7 +4034,8 @@ namespace {
|
||||
static bool isSet;
|
||||
static struct sigaction oldSigActions[DOCTEST_COUNTOF(signalDefs)];
|
||||
static stack_t oldSigStack;
|
||||
- static char altStackMem[4 * SIGSTKSZ];
|
||||
+ static size_t altStackSize;
|
||||
+ static char* altStackMem;
|
||||
|
||||
static void handleSignal(int sig) {
|
||||
const char* name = "<unknown signal>";
|
||||
@@ -4045,11 +4051,19 @@ namespace {
|
||||
raise(sig);
|
||||
}
|
||||
|
||||
+ static void allocateAltStackMem() {
|
||||
+ altStackMem = new char[altStackSize];
|
||||
+ }
|
||||
+
|
||||
+ static void freeAltStackMem() {
|
||||
+ delete[] altStackMem;
|
||||
+ }
|
||||
+
|
||||
FatalConditionHandler() {
|
||||
isSet = true;
|
||||
stack_t sigStack;
|
||||
sigStack.ss_sp = altStackMem;
|
||||
- sigStack.ss_size = sizeof(altStackMem);
|
||||
+ sigStack.ss_size = altStackSize;
|
||||
sigStack.ss_flags = 0;
|
||||
sigaltstack(&sigStack, &oldSigStack);
|
||||
struct sigaction sa = {};
|
||||
@@ -4074,10 +4088,11 @@ namespace {
|
||||
}
|
||||
};
|
||||
|
||||
- bool FatalConditionHandler::isSet = false;
|
||||
+ bool FatalConditionHandler::isSet = false;
|
||||
struct sigaction FatalConditionHandler::oldSigActions[DOCTEST_COUNTOF(signalDefs)] = {};
|
||||
- stack_t FatalConditionHandler::oldSigStack = {};
|
||||
- char FatalConditionHandler::altStackMem[] = {};
|
||||
+ stack_t FatalConditionHandler::oldSigStack = {};
|
||||
+ size_t FatalConditionHandler::altStackSize = 4 * SIGSTKSZ;
|
||||
+ char* FatalConditionHandler::altStackMem = nullptr;
|
||||
|
||||
#endif // DOCTEST_PLATFORM_WINDOWS
|
||||
#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH
|
||||
@@ -5936,7 +5951,11 @@ int Context::run() {
|
||||
p->cout = &fstr;
|
||||
}
|
||||
|
||||
+ FatalConditionHandler::allocateAltStackMem();
|
||||
+
|
||||
auto cleanup_and_return = [&]() {
|
||||
+ FatalConditionHandler::freeAltStackMem();
|
||||
+
|
||||
if(fstr.is_open())
|
||||
fstr.close();
|
||||
|
Loading…
Reference in a new issue