From 908778078736bd36f7a60a2d576d415cb8e000fa Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 22 May 2021 07:31:18 +0100 Subject: gentoo resync : 22.05.2021 --- games-emulation/Manifest.gz | Bin 9675 -> 9686 bytes games-emulation/dolphin/Manifest | 2 + .../dolphin/dolphin-5.0_p20210506.ebuild | 195 +++++++++++++++++++++ games-emulation/mupen64plus-core/Manifest | 2 +- .../mupen64plus-core-2.5.9-r2.ebuild | 4 +- games-emulation/snes9x/Manifest | 3 +- .../snes9x/files/snes9x-1.60-gcc11.patch | 47 +++++ games-emulation/snes9x/snes9x-1.60.ebuild | 3 +- games-emulation/zsnes/Manifest | 5 + .../zsnes/files/zsnes-1.51-ao-crash.patch | 30 ++++ .../zsnes/files/zsnes-1.51-stack-align-v3.patch | 40 +++++ .../zsnes/files/zsnes-1.51-stack-align-v4.patch | 45 +++++ games-emulation/zsnes/zsnes-1.51-r10.ebuild | 128 ++++++++++++++ games-emulation/zsnes/zsnes-1.51-r11.ebuild | 129 ++++++++++++++ 14 files changed, 629 insertions(+), 4 deletions(-) create mode 100644 games-emulation/dolphin/dolphin-5.0_p20210506.ebuild create mode 100644 games-emulation/snes9x/files/snes9x-1.60-gcc11.patch create mode 100644 games-emulation/zsnes/files/zsnes-1.51-ao-crash.patch create mode 100644 games-emulation/zsnes/files/zsnes-1.51-stack-align-v3.patch create mode 100644 games-emulation/zsnes/files/zsnes-1.51-stack-align-v4.patch create mode 100644 games-emulation/zsnes/zsnes-1.51-r10.ebuild create mode 100644 games-emulation/zsnes/zsnes-1.51-r11.ebuild (limited to 'games-emulation') diff --git a/games-emulation/Manifest.gz b/games-emulation/Manifest.gz index e76bc68e8ba4..021ffd6c876c 100644 Binary files a/games-emulation/Manifest.gz and b/games-emulation/Manifest.gz differ diff --git a/games-emulation/dolphin/Manifest b/games-emulation/dolphin/Manifest index b9c78d3c0644..d44756fd1a07 100644 --- a/games-emulation/dolphin/Manifest +++ b/games-emulation/dolphin/Manifest @@ -1,4 +1,6 @@ DIST dolphin-5.0_p20200705.tar.gz 41580877 BLAKE2B 78fce8cb10543857633d66789999b0ebb8f195e10652b9316f3346d5c84797dea96a31f509f86cb9470b4b9677ca58c4a865494121277cd0bc7dcc93932da9f4 SHA512 8b1aed8c98ff7205d7b1716aea3faad0bfa3d1ff3fe3a616431a421ae62592a57887e18295276b7a0fee52d19e641b72d5dc00e071cefea7fbe40adc9f3f01a1 +DIST dolphin-5.0_p20210506.tar.gz 42098693 BLAKE2B bb9e5b5eb344bd944753c0198d5835109399fdfae46e6858833e5f279ff1979d39e0c512bedb96a91a1241fff525c6f945d16ce1a6b6cc22798490d73b853862 SHA512 5d23e9356995011a0e7b07622d58c8dddc5134a4ec83b3d9343b9eca8d0d2c200ea8c9a299c6aa2550ca74d8e28e258531368f7c167fe620053eb2a0f73b1f2f EBUILD dolphin-5.0_p20200705.ebuild 4421 BLAKE2B b0598e6e1ab9d723c8fb0c8cf55c3f7ea10025be78c8c184ab8bd50d42995a84d9fe918fe187c24f955139033db80fe8ac30bfdacbbe32d97b9b007e43a3092b SHA512 79b8dd2d3fb337c67e7d59784f97ae26ca6575fc192fdef7307c3061fe4e620d597c753e6692f84341738b437c3d1a53dcf733113f6708eae44c0595d4628200 +EBUILD dolphin-5.0_p20210506.ebuild 4777 BLAKE2B 63029795ac224659226c921ddde2c395698017d009049363e38d191730915188863d623a88e5d0e5a9a88141c5aeb8d23fb7b5f3c900d4681c78a1d8b94a6363 SHA512 2606cf299d49f5e0108f62bfb3aa3670ee66393605313499375b63fde425d95760b75b67003296e0a89f8e9feaceabe05bcdb2f1837274dc4856321a22d2ac83 EBUILD dolphin-9999.ebuild 4790 BLAKE2B 7265a71932941ab75c1836237b380be893563c532e45e414d6880cb8d2e446ff53718a3b961b6eb1a3a04724a9e058f2cf432854d608e0ff6a79e8f01b87b638 SHA512 535fcef911387f2ee2f271a0b42ca36065030640728d745b96cdaae2c4744eda626c171576459d29abb6ee7d0ece31d64417029f39cd166ce7197945973bc5bc MISC metadata.xml 856 BLAKE2B 982e3d9ee65ed158e831ccb72d144944eaab8efd8f535f120f2d9e14f8332a980244bb23ee7fe0ca6c1ca8b6f2cdc6c1c766439b4416e17fc8df93fc24ca7655 SHA512 994efa4a7b1504a2d02f4d470382c212f0b9c2f929bbc67483b1a4efa4e68d4422216737dca65977ad99afd26fb6772224f6b1902a0eb6b869f155cf010aff33 diff --git a/games-emulation/dolphin/dolphin-5.0_p20210506.ebuild b/games-emulation/dolphin/dolphin-5.0_p20210506.ebuild new file mode 100644 index 000000000000..9ca2ed316a3a --- /dev/null +++ b/games-emulation/dolphin/dolphin-5.0_p20210506.ebuild @@ -0,0 +1,195 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PLOCALES="ar ca cs da de el en es fa fr hr hu it ja ko ms nb nl pl pt pt_BR ro ru sr sv tr zh_CN zh_TW" +PLOCALE_BACKUP="en" + +inherit cmake desktop xdg-utils l10n pax-utils + +if [[ ${PV} == *9999 ]] +then + EGIT_REPO_URI="https://github.com/dolphin-emu/dolphin" + inherit git-r3 +else + inherit vcs-snapshot + commit=eb5cd9be78c76b9ccbab9e5fbd1721ef6876cd68 + SRC_URI="https://github.com/dolphin-emu/dolphin/archive/${commit}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64" +fi + +DESCRIPTION="Gamecube and Wii game emulator" +HOMEPAGE="https://www.dolphin-emu.org/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="alsa bluetooth discord-presence doc +evdev ffmpeg log lto profile pulseaudio +qt5 systemd upnp vulkan" + +RDEPEND=" + dev-libs/hidapi:0= + >=dev-libs/libfmt-7.1:0= + dev-libs/lzo:2= + dev-libs/pugixml:0= + media-libs/libpng:0= + media-libs/libsfml + media-libs/mesa[egl] + net-libs/enet:1.3 + net-libs/mbedtls:0= + net-misc/curl:0= + sys-libs/readline:0= + sys-libs/zlib:0= + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrandr + virtual/libusb:1 + virtual/opengl + alsa? ( media-libs/alsa-lib ) + bluetooth? ( net-wireless/bluez ) + evdev? ( + dev-libs/libevdev + virtual/udev + ) + ffmpeg? ( media-video/ffmpeg:= ) + profile? ( dev-util/oprofile ) + pulseaudio? ( media-sound/pulseaudio ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + systemd? ( sys-apps/systemd:0= ) + upnp? ( net-libs/miniupnpc ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig" + +# vulkan-loader required for vulkan backend which can be selected +# at runtime. +RDEPEND="${RDEPEND} + vulkan? ( media-libs/vulkan-loader )" + +src_prepare() { + cmake_src_prepare + + # Remove all the bundled libraries that support system-installed + # preference. See CMakeLists.txt for conditional 'add_subdirectory' calls. + local KEEP_SOURCES=( + Bochs_disasm + FreeSurround + + # vulkan's API is not backwards-compatible: + # new release dropped VK_PRESENT_MODE_RANGE_SIZE_KHR + # but dolphin still relies on it, bug #729832 + Vulkan + + cpp-optparse + # no support for for using system library + glslang + imgui + + # not packaged, tiny header library + rangeset + + # FIXME: xxhash can't be found by cmake + xxhash + # no support for for using system library + minizip + # soundtouch uses shorts, not floats + soundtouch + cubeb + discord-rpc + # Their build set up solely relies on the build in gtest. + gtest + # gentoo's version requires exception support. + # dolphin disables exceptions and fails the build. + picojson + # No code to detect shared library. + zstd + ) + local s + for s in "${KEEP_SOURCES[@]}"; do + mv -v "Externals/${s}" . || die + done + einfo "removing sources: $(echo Externals/*)" + rm -r Externals/* || die "Failed to delete Externals dir." + for s in "${KEEP_SOURCES[@]}"; do + mv -v "${s}" "Externals/" || die + done + + remove_locale() { + # Ensure preservation of the backup locale when no valid LINGUA is set + if [[ "${PLOCALE_BACKUP}" == "${1}" ]] && [[ "${PLOCALE_BACKUP}" == "$(l10n_get_locales)" ]]; then + return + else + rm "Languages/po/${1}.po" || die + fi + } + + l10n_find_plocales_changes "Languages/po/" "" '.po' + l10n_for_each_disabled_locale_do remove_locale + + # About 50% compile-time speedup + use vulkan || sed -i -e '/Externals\/glslang/d' CMakeLists.txt + + # Remove dirty suffix: needed for netplay + sed -i -e 's/--dirty/&=""/' CMakeLists.txt +} + +src_configure() { + local mycmakeargs=( + # Use ccache only when user did set FEATURES=ccache (or similar) + # not when ccache binary is present in system (automagic). + -DCCACHE_BIN=CCACHE_BIN-NOTFOUND + -DENABLE_ALSA=$(usex alsa) + -DENABLE_BLUEZ=$(usex bluetooth) + -DENABLE_EVDEV=$(usex evdev) + -DENCODE_FRAMEDUMPS=$(usex ffmpeg) + -DENABLE_LLVM=OFF + -DENABLE_LTO=$(usex lto) + -DENABLE_PULSEAUDIO=$(usex pulseaudio) + -DENABLE_QT=$(usex qt5) + -DENABLE_SDL=OFF # not supported: #666558 + -DENABLE_VULKAN=$(usex vulkan) + -DFASTLOG=$(usex log) + -DOPROFILING=$(usex profile) + -DUSE_DISCORD_PRESENCE=$(usex discord-presence) + -DUSE_SHARED_ENET=ON + -DUSE_UPNP=$(usex upnp) + + # Undo cmake.eclass's defaults. + # All dolphin's libraries are private + # and rely on circular dependency resolution. + -DBUILD_SHARED_LIBS=OFF + + # Avoid warning spam around unset variables. + -Wno-dev + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + dodoc Readme.md + if use doc; then + dodoc -r docs/ActionReplay docs/DSP docs/WiiMote + fi + + doicon -s 48 Data/dolphin-emu.png + doicon -s scalable Data/dolphin-emu.svg + doicon Data/dolphin-emu.svg +} + +pkg_postinst() { + # Add pax markings for hardened systems + pax-mark -m "${EPREFIX}"/usr/games/bin/"${PN}"-emu + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_icon_cache_update +} diff --git a/games-emulation/mupen64plus-core/Manifest b/games-emulation/mupen64plus-core/Manifest index 3ae4201eccf7..d9c9f13de388 100644 --- a/games-emulation/mupen64plus-core/Manifest +++ b/games-emulation/mupen64plus-core/Manifest @@ -1,4 +1,4 @@ AUX mupen64plus-core-2.5.9-fix-gcc10-fno-common.patch 520 BLAKE2B 1a72237a46105840d90e25a551e5ffab3f35f8df9f975da6f65c135847aac71fbf2e7fb9899c05720cb29b31ea85a15d86167c95993b93d763fea585ae0a4bff SHA512 95860397c764a6a21faaab45e13f68aa6b5da15ff1b96a430a263aaac918495b27a923c639166a9f124c0e3f3d2af6a3947aed34c3a590abc2e3033ef8460bd9 DIST mupen64plus-core-src-2.5.9.tar.gz 1618486 BLAKE2B 6d43789873c6866dc7d268e4a2cc1febc4a8ce6615a51e4dabfc3d3715aaaa6bf8d7c157ddccd45ae3b57852388c591b86d1cf401c7d78962ec6780272ef912d SHA512 8087211eb3301e356e1529c1702c965aca5e9191a5a3efe604f2e2f7470da44c8c3be506ba1f0aa96b209baa8faf011ca153566540e96c278fe63a330b791f20 -EBUILD mupen64plus-core-2.5.9-r2.ebuild 2593 BLAKE2B 4e1cf823fdaefbe1888ca9f01159ce5e36cd67d9bde15b9d965d14f15cb08625e6768be0b97bb536f148de6bc53b4fe8428b07e13be9f3324e22e6d67fc3a117 SHA512 bc962b6acc9a06104a19bf7ee5a44ab7df8fdf374bdf6ad253371be85d683ad74ce976028ec5d1e731e80c9da294518f1e5a54123f8bd7e0a4a4d9eb15005b27 +EBUILD mupen64plus-core-2.5.9-r2.ebuild 2694 BLAKE2B 6b6b47227511577a7873b053b3d7854b0d1473b63ee78ba201d00a30b82107fe69dd1b05d354916531c5e248c804251a99a33c66cd16a34e516d3d6ab0c4b00c SHA512 1afc8b7f1a25e50a3ecf6f8ecd6e9dfe41d305bc44d51b347b0a330938313c6679c1f591aa544b5bde28eedf30eabe5ac3a0ddcfd9be48d78f1774cb45d56780 MISC metadata.xml 986 BLAKE2B b3af4fa2d51776a6d5262490ea9b5d4a9fad211261f43cb02fffbf973a90ee515c6042e94931f07b440930aaca82ed15ffa17484fa2cde082655fadc5f1766ca SHA512 ec66e37a84c3ab9d66f00235cb8d430ffa31be0e76e56c3ca05900ed2aa9f33671626b70b9ce3fe936b836498a164217ead0f8637929d9d719979a1e7473b5e5 diff --git a/games-emulation/mupen64plus-core/mupen64plus-core-2.5.9-r2.ebuild b/games-emulation/mupen64plus-core/mupen64plus-core-2.5.9-r2.ebuild index 21de520cdfe3..459fd3cd6239 100644 --- a/games-emulation/mupen64plus-core/mupen64plus-core-2.5.9-r2.ebuild +++ b/games-emulation/mupen64plus-core/mupen64plus-core-2.5.9-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -42,6 +42,8 @@ src_prepare() { # avoid implicitly appending CPU flags sed -i -e 's:-mmmx::g' -e 's:-msse::g' projects/unix/Makefile || die + # fix building against opencv-4 + sed -i -e '/PKG_CONFIG/s:opencv:&4:' projects/unix/Makefile || die } src_compile() { diff --git a/games-emulation/snes9x/Manifest b/games-emulation/snes9x/Manifest index abb2dce51d8c..2fd667a590df 100644 --- a/games-emulation/snes9x/Manifest +++ b/games-emulation/snes9x/Manifest @@ -1,7 +1,8 @@ AUX snes9x-1.53-cross-compile.patch 892 BLAKE2B 9fb806ad16d48d5f07f1ab84feb5f7eafa52a1157eb25675650f08c8fbab8a42318d3277efbdd45f03250df2e9187c76df43312f7ffb2f226423e757b5f6e91c SHA512 4867b9a3e3f2a65684157b26e4b0b63971d37ad5abb16125567e89bc4116482488416ca51d30f639ef63886b05431c56b75978fe073a4755c48988f5ea9eaee5 AUX snes9x-1.59-build-system.patch 1303 BLAKE2B 48a349bc5d56fcf154faab76cf76fcbb98808ce7933ff5e6da2cbf2b22d62819367e2ac1224f66735108de44419375d6f6eb2c2a4a104a4d492148866b6e829e SHA512 abbd0bfea5ad23f652e8249adbdf1118a4efa2ed43301b1786bbd91a253e98fb7ff99f68ff62c128972fe0af47aee9fa48fa9e3218b0a33c9e68f468fbe2b9e8 +AUX snes9x-1.60-gcc11.patch 1805 BLAKE2B 0639b425266be59ac472f92154ce488bf0b6f631f00c2025104f6dfb31f1c72d1202657d182e47a47198606ce92a55bf8769662c9a4e81add171be547b7ced08 SHA512 600291b2c32e4099207eb31e7b6b19d4ec043b43d88b9eb5efe935c971ae8bcb02e821a6653246417481db0d46c5a3e1a4af3ea8c17894549b293e588f6fab79 DIST snes9x-1.59.2.tar.gz 2819803 BLAKE2B 3e077fe68dbc6ae9acf7625c1371971300cfb72143e0e98841dc8d75be5ccc45812d79d7810d28d1a5dc5c17a69cf0f9483e9c69e91437d864a4cbaf34852b35 SHA512 84d2dfc12a991b77b30ba9a591d285ecd4cc5fbb418282900209db9191d61611123ffa7d715b7abeed9b891e9af88ab4c46616502523a881127e2ede008236e4 DIST snes9x-1.60.tar.gz 2863228 BLAKE2B 0ac3bdd2403221f1013e2b5438aacc4e7d361e943ac7edc56f8ef22827d81484e0b162b84f739ce0f68fe58021124275fd908ccdde99e1e1d6d6c9c0a6e3d17b SHA512 840b006a8fbd479fd5ceb2d94af4ef6470c5e27a3e6c8ddb0dffc8d3e51f465669144cd428bfce28b2ed4f68e70d8f252f2d8a2cae602ba797791d7e483c14c9 EBUILD snes9x-1.59.2.ebuild 2723 BLAKE2B e365643b7c13bae7577eeda034963a946e3dd78153696f09f95503d0c758115294f4295d797b6b7be2950c0e584afcb3aeaea57d55683f7988ca286aa7b70f96 SHA512 9a474aba0c8fd071f090bec4694ebc036733b6831cfb01e35a9b1fffea049340fe2cc0b1fe840dae93df03b3740faf65ac000ec58d71adfd465d11767cf917d7 -EBUILD snes9x-1.60.ebuild 2991 BLAKE2B 9a2d5693b97f433019ae14e810e0af21ecc555db588529c6a2e8134fd59ffd40376d7f34f04eb354c580aa4a32c0c00f2663203cdd6f9ba0ac49d64639916a7d SHA512 3d78def81d6043e51dbc1a3ce764d71d3c9830bf7691bf3c20f0f986e3fb4c1d54b5b3d0ed5cefb76eee1e76072ed40463c96a0b02c588a43d3aa81b129fac9e +EBUILD snes9x-1.60.ebuild 3029 BLAKE2B 2e8b7ab81a10a48aad64a09cbaae2ab2e7c8706af990ae18425be76ff6de2a58800563990f2de320cd959fcc1bcdb893595b47839a8d218244c8a7b7e6471e40 SHA512 bdc32f1d423acfce19d9672f057a228e763c8276333de0db4184eb53780edaa4af721a824d1c65dff04c7c14008ec1592139513694db6b68582e8b064bb72d12 MISC metadata.xml 540 BLAKE2B b42e960fcbc0ab7f001494ebc804c0cbd617d452eaffbdcb2c46a89ebfac6ddf2968f4eaea83fc522138e13f6898584acee695aa3f1c8e96b2a3e620a480ecbf SHA512 cc3155bee496b7a1061f6f23611c39d909eb893b43a6cae0400ef02884267b7a674a865a848b5b38945bd334984cda2ae20da16ce793d21481baac24c428f4bb diff --git a/games-emulation/snes9x/files/snes9x-1.60-gcc11.patch b/games-emulation/snes9x/files/snes9x-1.60-gcc11.patch new file mode 100644 index 000000000000..453771f5139c --- /dev/null +++ b/games-emulation/snes9x/files/snes9x-1.60-gcc11.patch @@ -0,0 +1,47 @@ +From 7f6d9d6432d912cd90763c64f7c92270b3e6c182 Mon Sep 17 00:00:00 2001 +From: gocha +Date: Sun, 19 Jan 2020 12:48:06 +0900 +Subject: [PATCH] win32: fix compilation error in vs2019 + +--- + conffile.cpp | 2 +- + conffile.h | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/conffile.cpp b/conffile.cpp +index 817afae7f..fa7de3fa2 100644 +--- a/conffile.cpp ++++ b/conffile.cpp +@@ -452,7 +452,7 @@ void ConfigFile::ClearLines() + } + } + +-bool ConfigFile::ConfigEntry::section_then_key_less::operator()(const ConfigEntry &a, const ConfigEntry &b) { ++bool ConfigFile::ConfigEntry::section_then_key_less::operator()(const ConfigEntry &a, const ConfigEntry &b) const{ + if(curConfigFile && a.section!=b.section){ + const int sva = curConfigFile->GetSectionSize(a.section); + const int svb = curConfigFile->GetSectionSize(b.section); +diff --git a/conffile.h b/conffile.h +index ba69812df..d92128cba 100644 +--- a/conffile.h ++++ b/conffile.h +@@ -90,7 +90,7 @@ class ConfigFile { + mutable bool used; + + struct section_then_key_less { +- bool operator()(const ConfigEntry &a, const ConfigEntry &b); ++ bool operator()(const ConfigEntry &a, const ConfigEntry &b) const; + }; + + struct key_less { +@@ -101,8 +101,8 @@ class ConfigFile { + }; + + struct line_less { +- bool operator()(const ConfigEntry &a, const ConfigEntry &b){ +- if(a.line==b.line) return (b.val.empty() && !a.val.empty()) || a.key, device=device@entry=0x57057100) + at ../../libao-1.2.2/src/audio_out.c:634 +#2 0xf7e3e9bc in _open_device (driver_id=, format=format@entry=0xffffc638, options=options@entry=0x0, file=0x0) at ../../libao-1.2.2/src/audio_out.c:991 +#3 0xf7e3f579 in ao_open_live (driver_id=, format=0xffffc638, options=0x0) at ../../libao-1.2.2/src/audio_out.c:1337 +#4 0x5699fbb5 in SoundInit_ao () at linux/audio.c:197 +#5 InitSound () at linux/audio.c:338 +#6 0x569a2f7f in initwinvideo () at linux/sdllink.c:1080 +#7 0x569a07d3 in initvideo () +#8 0x56ad59bc in regptwa () +#9 0x56a3c490 in SA1tableG () +#10 0xffffc808 in ?? () +#11 0xf78619b5 in __libc_start_main (main=0x1, argc=1450015920, argv=0x0, init=0x566d7ce1 <_start+49>, fini=0x566d7c00
, rtld_fini=0x1, stack_end=0xffffc8c4) at ../csu/libc-start.c:332 +#12 0x569cd000 in ?? () +--- a/linux/audio.c ++++ b/linux/audio.c +@@ -166,6 +166,7 @@ static int SoundInit_ao() + if (driver_id < 0) { driver_id = ao_default_driver_id(); } + + ao_sample_format driver_format; ++ memset(&driver_format, 0, sizeof(driver_format)); + driver_format.bits = 16; + driver_format.channels = StereoSound+1; + driver_format.rate = freqtab[SoundQuality = ((SoundQuality > 6) ? 1 : SoundQuality)]; diff --git a/games-emulation/zsnes/files/zsnes-1.51-stack-align-v3.patch b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v3.patch new file mode 100644 index 000000000000..914c9afc4495 --- /dev/null +++ b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v3.patch @@ -0,0 +1,40 @@ +--- a/linux/sdllink.c ++++ b/linux/sdllink.c +@@ -133,7 +133,7 @@ extern unsigned char romispal; + + /* FUNCTION DECLARATIONS */ + void clearwin (void); +-void drawscreenwin(void); ++void __attribute__((force_align_arg_pointer)) drawscreenwin(void); + void initwinvideo(); + unsigned int sdl_keysym_to_pc_scancode(int); + void ProcessKeyBuf(int); +--- a/ztimec.c ++++ b/ztimec.c +@@ -25,7 +25,7 @@ short SystemTimewHour; + short SystemTimewMinute; + short SystemTimewSecond; + +-void GetLocalTime() ++void __attribute__((force_align_arg_pointer)) GetLocalTime() + { + time_t current; + struct tm *timeptr; +@@ -37,7 +37,7 @@ void GetLocalTime() + SystemTimewSecond = timeptr->tm_sec; + } + +-unsigned int GetTime() ++unsigned __attribute__((force_align_arg_pointer)) int GetTime() + { + unsigned int value; + struct tm *newtime; +@@ -52,7 +52,7 @@ unsigned int GetTime() + return(value); + } + +-unsigned int GetDate() ++unsigned __attribute__((force_align_arg_pointer)) int GetDate() + { + unsigned int value; + struct tm *newtime; diff --git a/games-emulation/zsnes/files/zsnes-1.51-stack-align-v4.patch b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v4.patch new file mode 100644 index 000000000000..7e015d53ebd9 --- /dev/null +++ b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v4.patch @@ -0,0 +1,45 @@ +--- a/linux/sdllink.c ++++ b/linux/sdllink.c +@@ -1170,7 +1170,7 @@ void sem_sleep_die(void) + } + } + +-void UpdateVFrame(void) ++void __attribute__((force_align_arg_pointer)) UpdateVFrame(void) + { + //Quick fix for GUI CPU usage + if (GUIOn || GUIOn2 || EMUPause) { usleep(6000); } +@@ -1237,16 +1237,16 @@ void UnloadSDL() + SDL_Quit(); + } + +-int GetMouseX(void) ++int __attribute__((force_align_arg_pointer)) GetMouseX(void) + { + return ((int) MouseX); + } +-int GetMouseY(void) ++int __attribute__((force_align_arg_pointer)) GetMouseY(void) + { + return ((int) MouseY); + } + +-int GetMouseMoveX(void) ++int __attribute__((force_align_arg_pointer)) GetMouseMoveX(void) + { + // InputRead(); + //SDL_GetRelativeMouseState(&MouseMove2X, NULL); +@@ -1254,11 +1254,11 @@ int GetMouseMoveX(void) + return (MouseMove2X); + } + +-int GetMouseMoveY(void) ++int __attribute__((force_align_arg_pointer)) GetMouseMoveY(void) + { + return (MouseMove2Y); + } +-int GetMouseButton(void) ++int __attribute__((force_align_arg_pointer)) GetMouseButton(void) + { + return ((int) MouseButton); + } diff --git a/games-emulation/zsnes/zsnes-1.51-r10.ebuild b/games-emulation/zsnes/zsnes-1.51-r10.ebuild new file mode 100644 index 000000000000..ffa490ba20b5 --- /dev/null +++ b/games-emulation/zsnes/zsnes-1.51-r10.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools desktop flag-o-matic toolchain-funcs pax-utils + +DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly" +HOMEPAGE="https://www.zsnes.com/ http://ipherswipsite.com/zsnes/" +SRC_URI="mirror://sourceforge/zsnes/${PN}${PV//./}src.tar.bz2 -> ${P}-20071031.tar.bz2" +S="${WORKDIR}/${PN}_${PV//./_}/src" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="ao custom-cflags +debug opengl png" + +RDEPEND=" + media-libs/libsdl[sound,video,abi_x86_32(-)] + >=sys-libs/zlib-1.2.3-r1[abi_x86_32(-)] + ao? ( media-libs/libao[abi_x86_32(-)] ) + debug? ( sys-libs/ncurses:0=[abi_x86_32(-)] ) + opengl? ( virtual/opengl[abi_x86_32(-)] ) + png? ( media-libs/libpng:0=[abi_x86_32(-)] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/nasm + debug? ( virtual/pkgconfig ) +" + +PATCHES=( + # Fixing compilation without libpng installed + "${FILESDIR}"/${P}-libpng.patch + + # Fix bug #186111 + # Fix bug #214697 + # Fix bug #170108 + # Fix bug #260247 + "${FILESDIR}"/${P}-gcc43-20071031.patch + "${FILESDIR}"/${P}-libao-thread.patch + "${FILESDIR}"/${P}-depbuild.patch + "${FILESDIR}"/${P}-CC-quotes.patch + + # Fix compability with libpng15 wrt #378735 + "${FILESDIR}"/${P}-libpng15.patch + + # Fix buffer overwrite #257963 + "${FILESDIR}"/${P}-buffer.patch + # Fix gcc47 compile #419635 + "${FILESDIR}"/${P}-gcc47.patch + # Fix stack alignment issue #503138 + "${FILESDIR}"/${P}-stack-align-v2.patch + + "${FILESDIR}"/${P}-cross-compile.patch + "${FILESDIR}"/${P}-arch.patch + + "${FILESDIR}"/${P}-gcc-10.patch + "${FILESDIR}"/${P}-c++17.patch + "${FILESDIR}"/${P}-ao-crash.patch + "${FILESDIR}"/${P}-stack-align-v3.patch +) + +src_prepare() { + default + + # The sdl detection logic uses AC_PROG_PATH instead of + # AC_PROG_TOOL, so force the var to get set the way we + # need for things to work correctly. + tc-is-cross-compiler && export ac_cv_path_SDL_CONFIG=${CHOST}-sdl-config + + sed -i -e '67i#define OF(x) x' zip/zunzip.h || die + + # Remove hardcoded CFLAGS and LDFLAGS + sed -i \ + -e '/^CFLAGS=.*local/s:-pipe.*:-Wall -I.":' \ + -e '/^LDFLAGS=.*local/d' \ + -e '/\w*CFLAGS=.*fomit/s:-O3.*$STRIP::' \ + -e '/lncurses/s:-lncurses:`pkg-config ncurses --libs`:' \ + -e '/lcurses/s:-lcurses:`pkg-config ncurses --libs`:' \ + configure.in || die + sed -i \ + -e 's/configure.in/configure.ac/' \ + Makefile.in || die + mv configure.in configure.ac || die + eautoreconf +} + +src_configure() { + tc-export CC + export BUILD_CXX=$(tc-getBUILD_CXX) + export NFLAGS=-O1 + use amd64 && multilib_toolchain_setup x86 + use custom-cflags || strip-flags + + append-cppflags -U_FORTIFY_SOURCE #257963 + + econf \ + $(use_enable ao libao) \ + $(use_enable debug debugger) \ + $(use_enable png libpng) \ + $(use_enable opengl) \ + --disable-debug \ + --disable-cpucheck +} + +src_compile() { + emake makefile.dep + emake +} + +src_install() { + # Uses pic-unfriendly assembly code, bug #427104 + QA_TEXTRELS="usr/bin/zsnes" + + dobin zsnes + pax-mark m "${ED}"/usr/bin/zsnes + + newman linux/zsnes.1 zsnes.6 + + dodoc \ + ../docs/{readme.1st,authors.txt,srcinfo.txt,stdards.txt,support.txt,thanks.txt,todo.txt,README.LINUX} \ + ../docs/readme.txt/* + HTML_DOCS="../docs/readme.htm/*" einstalldocs + + make_desktop_entry zsnes ZSNES + newicon icons/48x48x32.png ${PN}.png +} diff --git a/games-emulation/zsnes/zsnes-1.51-r11.ebuild b/games-emulation/zsnes/zsnes-1.51-r11.ebuild new file mode 100644 index 000000000000..f5956fa938c4 --- /dev/null +++ b/games-emulation/zsnes/zsnes-1.51-r11.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools desktop flag-o-matic toolchain-funcs pax-utils + +DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly" +HOMEPAGE="https://www.zsnes.com/ http://ipherswipsite.com/zsnes/" +SRC_URI="mirror://sourceforge/zsnes/${PN}${PV//./}src.tar.bz2 -> ${P}-20071031.tar.bz2" +S="${WORKDIR}/${PN}_${PV//./_}/src" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="ao custom-cflags +debug opengl png" + +RDEPEND=" + media-libs/libsdl[sound,video,abi_x86_32(-)] + >=sys-libs/zlib-1.2.3-r1[abi_x86_32(-)] + ao? ( media-libs/libao[abi_x86_32(-)] ) + debug? ( sys-libs/ncurses:0=[abi_x86_32(-)] ) + opengl? ( virtual/opengl[abi_x86_32(-)] ) + png? ( media-libs/libpng:0=[abi_x86_32(-)] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/nasm + debug? ( virtual/pkgconfig ) +" + +PATCHES=( + # Fixing compilation without libpng installed + "${FILESDIR}"/${P}-libpng.patch + + # Fix bug #186111 + # Fix bug #214697 + # Fix bug #170108 + # Fix bug #260247 + "${FILESDIR}"/${P}-gcc43-20071031.patch + "${FILESDIR}"/${P}-libao-thread.patch + "${FILESDIR}"/${P}-depbuild.patch + "${FILESDIR}"/${P}-CC-quotes.patch + + # Fix compability with libpng15 wrt #378735 + "${FILESDIR}"/${P}-libpng15.patch + + # Fix buffer overwrite #257963 + "${FILESDIR}"/${P}-buffer.patch + # Fix gcc47 compile #419635 + "${FILESDIR}"/${P}-gcc47.patch + # Fix stack alignment issue #503138 + "${FILESDIR}"/${P}-stack-align-v2.patch + + "${FILESDIR}"/${P}-cross-compile.patch + "${FILESDIR}"/${P}-arch.patch + + "${FILESDIR}"/${P}-gcc-10.patch + "${FILESDIR}"/${P}-c++17.patch + "${FILESDIR}"/${P}-ao-crash.patch + "${FILESDIR}"/${P}-stack-align-v3.patch + "${FILESDIR}"/${P}-stack-align-v4.patch +) + +src_prepare() { + default + + # The sdl detection logic uses AC_PROG_PATH instead of + # AC_PROG_TOOL, so force the var to get set the way we + # need for things to work correctly. + tc-is-cross-compiler && export ac_cv_path_SDL_CONFIG=${CHOST}-sdl-config + + sed -i -e '67i#define OF(x) x' zip/zunzip.h || die + + # Remove hardcoded CFLAGS and LDFLAGS + sed -i \ + -e '/^CFLAGS=.*local/s:-pipe.*:-Wall -I.":' \ + -e '/^LDFLAGS=.*local/d' \ + -e '/\w*CFLAGS=.*fomit/s:-O3.*$STRIP::' \ + -e '/lncurses/s:-lncurses:`pkg-config ncurses --libs`:' \ + -e '/lcurses/s:-lcurses:`pkg-config ncurses --libs`:' \ + configure.in || die + sed -i \ + -e 's/configure.in/configure.ac/' \ + Makefile.in || die + mv configure.in configure.ac || die + eautoreconf +} + +src_configure() { + tc-export CC + export BUILD_CXX=$(tc-getBUILD_CXX) + export NFLAGS=-O1 + use amd64 && multilib_toolchain_setup x86 + use custom-cflags || strip-flags + + append-cppflags -U_FORTIFY_SOURCE #257963 + + econf \ + $(use_enable ao libao) \ + $(use_enable debug debugger) \ + $(use_enable png libpng) \ + $(use_enable opengl) \ + --disable-debug \ + --disable-cpucheck +} + +src_compile() { + emake makefile.dep + emake +} + +src_install() { + # Uses pic-unfriendly assembly code, bug #427104 + QA_TEXTRELS="usr/bin/zsnes" + + dobin zsnes + pax-mark m "${ED}"/usr/bin/zsnes + + newman linux/zsnes.1 zsnes.6 + + dodoc \ + ../docs/{readme.1st,authors.txt,srcinfo.txt,stdards.txt,support.txt,thanks.txt,todo.txt,README.LINUX} \ + ../docs/readme.txt/* + HTML_DOCS="../docs/readme.htm/*" einstalldocs + + make_desktop_entry zsnes ZSNES + newicon icons/48x48x32.png ${PN}.png +} -- cgit v1.2.3