diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-12-25 20:34:27 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-12-25 20:34:27 +0000 |
commit | 0f15659d48c193027158492acb726297501202c5 (patch) | |
tree | 5502ba879a78b759da28441d418dbbfe08bd8f03 /games-emulation/zsnes/zsnes-2.0.9.ebuild | |
parent | 93a93e9a3b53c1a73142a305ea1f8136846942ee (diff) |
gentoo xmass resync : 25.12.2021
Diffstat (limited to 'games-emulation/zsnes/zsnes-2.0.9.ebuild')
-rw-r--r-- | games-emulation/zsnes/zsnes-2.0.9.ebuild | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/games-emulation/zsnes/zsnes-2.0.9.ebuild b/games-emulation/zsnes/zsnes-2.0.9.ebuild new file mode 100644 index 000000000000..02f1b45b2615 --- /dev/null +++ b/games-emulation/zsnes/zsnes-2.0.9.ebuild @@ -0,0 +1,63 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop flag-o-matic multilib toolchain-funcs + +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/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="custom-cflags" + +RDEPEND=" + media-libs/libpng:=[abi_x86_32(-)] + media-libs/libsdl[abi_x86_32(-),joystick,opengl,sound,video] + sys-libs/zlib:=[abi_x86_32(-)] + virtual/opengl[abi_x86_32(-)] + x11-libs/libX11[abi_x86_32(-)]" +DEPEND=" + ${RDEPEND} + x11-base/xorg-proto" +BDEPEND=" + dev-lang/nasm + sys-libs/zlib + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-2.0.9-cc-quotes.patch + "${FILESDIR}"/${PN}-2.0.9-gentoo-zlib.patch +) + +src_compile() { + # config.linux forces many CFLAGS that are questionable, but zsnes' + # ancient x86 asm is very fragile, not pic safe (bug #427104), broken + # by FORTIFY_SOURCE (bug #257963), and can be affected by -march=* and + # similar. Stick to upstream's choices, this is non-portable either way. + use custom-cflags || strip-flags + append-cppflags -U_FORTIFY_SOURCE + + # used to build and run parsegen at build time (uses zlib wrt BDEPEND) + tc-export_build_env BUILD_CXX + local buildcxx="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS}" + + use amd64 && multilib_toolchain_setup x86 + tc-export CC CXX + append-cflags "${CPPFLAGS}" + append-cxxflags "${CPPFLAGS}" + + emake CXX_HOST="${buildcxx}" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install + + dodoc README.md TODO.md + + newicon icons/64x64x32.png ${PN}.png + make_desktop_entry ${PN} ${PN^^} +} |