blob: c31544bd7b29b5ba0eeaa419adec270ba121e69d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
inherit flag-o-matic python-any-r1 toolchain-funcs xdg
DESCRIPTION="Fork of the classic Super Nintendo emulator"
HOMEPAGE="https://github.com/xyproto/zsnes/ https://www.zsnes.com/"
SRC_URI="
https://github.com/xyproto/zsnes/archive/refs/tags/${PV}.tar.gz
-> ${P}.tar.gz
"
LICENSE="GPL-2 MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ao custom-cflags pipewire"
RDEPEND="
media-libs/libglvnd[X]
media-libs/libpng:=
media-libs/libsdl3[opengl]
ao? ( media-libs/libao )
pipewire? ( media-video/pipewire:= )
"
DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
virtual/pkgconfig
virtual/zlib:=
"
PATCHES=(
"${FILESDIR}"/${PN}-2.3.0-cc-quotes.patch
)
src_compile() {
# the old fragile ASM is gone, but the new C code is currently fragile too
if use !custom-cflags; then
strip-flags
append-cppflags -U_FORTIFY_SOURCE # to disable =3, Makefile enables =2
# furthermore fails with -Werror=strict-aliasing+lto-type-mismatch
# https://github.com/xyproto/zsnes/issues/59#issuecomment-5024118435
append-cflags -fno-strict-aliasing
filter-lto
fi
tc-export CC PKG_CONFIG
append-cflags ${CPPFLAGS}
ZSNES_MAKEARGS=(
{ARCH,HOST_OS}=LINUX
HOST_CPU="${CHOST%%-*}"
OPT_FLAGS=
PREFIX="${EPREFIX}"/usr
WITH_AO=$(usex ao)
WITH_PIPEWIRE=$(usex pipewire)
)
emake "${ZSNES_MAKEARGS[@]}"
}
src_install() {
emake "${ZSNES_MAKEARGS[@]}" DESTDIR="${D}" install
einstalldocs
}
|