From dc2b787f4c316e5d96c836ac7eed46d01673beee Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Fri, 14 Oct 2022 09:02:20 -0400 Subject: [PATCH] app-emulation/punes: fix double CHOST + other adjustments * add several missing deps (qtnetwork:5, udev, X11/Xrandr/xorg-proto), lack of qtnetwork:5 caused bug #877089 * move nvidia-cg-toolkit to RDEPEND, this is linking with its libraries and doesn't make sense in BDEPEND * prevent QA notices because of unused CMAKE_INSTALL* * xdg-utils -> xdg Note need to export CC="${CHOST}-gcc" to reproduce wrt #877089 Closes: https://bugs.gentoo.org/877089 Closes: https://bugs.gentoo.org/877091 Signed-off-by: Ionen Wolkens --- ...nes-0.109.ebuild => punes-0.109-r1.ebuild} | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) rename app-emulation/punes/{punes-0.109.ebuild => punes-0.109-r1.ebuild} (65%) diff --git a/app-emulation/punes/punes-0.109.ebuild b/app-emulation/punes/punes-0.109-r1.ebuild similarity index 65% rename from app-emulation/punes/punes-0.109.ebuild rename to app-emulation/punes/punes-0.109-r1.ebuild index 76d44deed9924..f4591cbe10f90 100644 --- a/app-emulation/punes/punes-0.109.ebuild +++ b/app-emulation/punes/punes-0.109-r1.ebuild @@ -3,12 +3,13 @@ EAPI=8 -inherit autotools xdg-utils +inherit autotools toolchain-funcs xdg DESCRIPTION="Nintendo Entertainment System (NES) emulator" HOMEPAGE="https://github.com/punesemu/puNES" SRC_URI="https://github.com/punesemu/puNES/archive/v${PV}.tar.gz -> ${P}.tar.gz" SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}_musl.patch.xz" +S="${WORKDIR}/puNES-${PV}" LICENSE="GPL-2+" SLOT="0" @@ -16,23 +17,27 @@ KEYWORDS="~amd64 ~x86" IUSE="cg ffmpeg" RDEPEND=" - ffmpeg? ( media-video/ffmpeg:= ) dev-qt/qtcore:5 dev-qt/qtgui:5 + dev-qt/qtnetwork:5 dev-qt/qtsvg:5 dev-qt/qtwidgets:5 media-libs/alsa-lib + media-libs/libglvnd[X] virtual/glu - virtual/opengl" -DEPEND="${RDEPEND}" -BDEPEND=" + virtual/udev + x11-libs/libX11 + x11-libs/libXrandr cg? ( media-gfx/nvidia-cg-toolkit ) + ffmpeg? ( media-video/ffmpeg:= )" +DEPEND=" + ${RDEPEND} + x11-base/xorg-proto" +BDEPEND=" dev-qt/linguist-tools:5 dev-util/cmake virtual/pkgconfig" -S="${WORKDIR}/puNES-${PV}" - PATCHES=( "${FILESDIR}"/${P}_ldflags.patch "${WORKDIR}"/${P}_musl.patch # 830471 @@ -41,6 +46,12 @@ PATCHES=( src_prepare() { default + # empty CMAKE_ARGS to avoid double CHOST (bug #877089), and also unused + # options (QA notices), use sed to avoid rebases because of the directory + sed -e '/x${DEBUG_VERSION}/i\CMAKE_ARGS=' \ + -i src/extra/lib7zip-*/configure || die + tc-export CC CXX + # src/extra/lib7zip is not autotools, but # is contained within AC_CONFIG_SUBDIRS AT_NO_RECURSIVE=1 eautoreconf @@ -49,19 +60,10 @@ src_prepare() { } src_configure() { - econf \ - $(use_with cg opengl-nvidia-cg) \ + local econfargs=( + $(use_with cg opengl-nvidia-cg) $(use_with ffmpeg) -} + ) -pkg_postinst() { - xdg_icon_cache_update - xdg_desktop_database_update - xdg_mimeinfo_database_update -} - -pkg_postrm() { - xdg_icon_cache_update - xdg_desktop_database_update - xdg_mimeinfo_database_update + econf "${econfargs[@]}" }