gentoo-ebuilds/games-emulation/melonds-jg/melonds-jg-0.9.5.ebuild
orbea b68a28b227
games-emulation/melonds-jg: mark as LTO-unsafe, strict-aliasing unsafe
Closes: https://bugs.gentoo.org/931907
Signed-off-by: orbea <orbea@riseup.net>
Signed-off-by: Sam James <sam@gentoo.org>
2024-06-18 11:19:48 +01:00

63 lines
1.4 KiB
Bash

# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs flag-o-matic
MY_PN=${PN%-*}
MY_P=${MY_PN}-${PV}
DESCRIPTION="Jolly Good Port of melonDS"
HOMEPAGE="https://gitlab.com/jgemu/melonds"
if [[ "${PV}" == *9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/jgemu/${MY_PN}.git"
else
SRC_URI="https://gitlab.com/jgemu/${MY_PN}/-/archive/${PV}/${MY_P}.tar.bz2"
S="${WORKDIR}/${MY_P}"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
fi
LICENSE="BSD-1 BSD-2 GPL-3+ MIT Unlicense public-domain"
SLOT="1"
DEPEND="
media-libs/jg:1=
media-libs/libsamplerate
"
RDEPEND="
${DEPEND}
games-emulation/jgrf
"
BDEPEND="
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${P}-format.patch
"${FILESDIR}"/${P}-gcc14.patch # 917164
"${FILESDIR}"/${P}-teakra-no-test_generator.patch # 914196
)
src_compile() {
# -Werror=strict-aliasing
# https://bugs.gentoo.org/931907
#
# Not trivial to fix and its a problem in melonds upstream.
# Its also uncertain if this port will be updated in the future.
append-flags -fno-strict-aliasing
filter-lto
emake -C jollygood \
CC="$(tc-getCC)" \
CXX="$(tc-getCXX)" \
PKG_CONFIG="$(tc-getPKG_CONFIG)"
}
src_install() {
emake -C jollygood install \
DESTDIR="${D}" \
PREFIX="${EPREFIX}"/usr \
DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
LIBDIR="${EPREFIX}/usr/$(get_libdir)"
}