From 0366d2db7c365e9358defe212a0454d61a3d0a21 Mon Sep 17 00:00:00 2001 From: smileaf419 Date: Thu, 4 May 2023 22:41:15 -0500 Subject: [PATCH] Add a patch to fix a bug caused by a change in GCC's libstdc++ https://github.com/ares-emulator/ares/pull/1102 Enforce using GCC due to another bug in libchdr https://github.com/rtissera/libchdr/issues/92 --- games-emulation/ares/132-r1.build | 34 +++++++++++++++++++++++++++++++ games-emulation/ares/sha1 | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 games-emulation/ares/132-r1.build diff --git a/games-emulation/ares/132-r1.build b/games-emulation/ares/132-r1.build new file mode 100644 index 00000000..36a8193b --- /dev/null +++ b/games-emulation/ares/132-r1.build @@ -0,0 +1,34 @@ +# Start versioning at -r1 if patches are used. +# non-patched packages may omit a revision, until a modification is made. +HOMEPAGE="https://github.com/ares-emulator/ares https://ares-emu.net/" +DESCRIPTION="ares is a cross-platform, open source, multi-system emulator, focusing on accuracy and preservation." +LICENSE="GPLv3+ ISC" +SRC_URI=("https://github.com/ares-emulator/ares/archive/refs/tags/v${PKG_VER}.tar.gz => ares-${PKG_VER}.tar.gz") +PATCHES=("https://github.com/ares-emulator/ares/pull/1102/commits/2c31bc1d2dd6babdf9745b691d38c23788c92029 => ares-gcc-13.patch") +DEPS="app-accessibility/at-spi2-core dev-libs/glib media-libs/alsa-lib media-libs/fontconfig media-libs/freetype media-libs/harfbuzz media-libs/libao media-libs/libsdl2 media-libs/mesa media-libs/openal media-sound/pulseaudio sys-fs/eudev x11-libs/cairo x11-libs/gdk-pixbuf x11-libs/gtk+:2 x11-libs/libX11 x11-libs/libXext x11-libs/libXrandr x11-libs/libXv x11-libs/pango" +BDEPS="" +RDEPS="" +setBuildENV auto make +BUILD_SEPERATE_DIR=no +ARCHS="x86 x86_64" +SLOT=0 + +src_configure() { :; } + +src_compile() { + # Fix a compile time error introduced by LLVM 16 + sed '/POST/ s,$, -Wno-error=implicit-function-declaration,' -i thirdparty/GNUmakefile + + ## Force GCC due to a bug in libchdr + ## https://github.com/ares-emulator/ares/issues/1100 + ## Reported upstream: + ## https://github.com/rtissera/libchdr/issues/92 + compile_default hiro=gtk3 build=release compiler=g++ +} + +src_test() { :; } + +src_install() { + # Required as they don't like it to be installed as root + su -p -c "make prefix=${D}/usr install" $BUILD_USER +} diff --git a/games-emulation/ares/sha1 b/games-emulation/ares/sha1 index dc5ff68d..5177b947 100644 --- a/games-emulation/ares/sha1 +++ b/games-emulation/ares/sha1 @@ -1,2 +1,4 @@ 30cf73f30c2e9a7892afa550ad91129323971646 132.build 6dcf91136f5e24c6a0be7a9cb84044e38e95ec1d ares-132.tar.gz +b5a544302195eded731d28507a32583946cfc540 132-r1.build +b92e9088644282d05e2dd423fbc3d980a7254454 ares-gcc-13.patch