From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A53871382C5 for ; Thu, 15 Apr 2021 21:23:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 996E2E0809; Thu, 15 Apr 2021 21:23:42 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 706D5E0809 for ; Thu, 15 Apr 2021 21:23:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F1705335D24 for ; Thu, 15 Apr 2021 21:23:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 49065643 for ; Thu, 15 Apr 2021 21:23:39 +0000 (UTC) From: "Lino Bigatti" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lino Bigatti" Message-ID: <1618521797.97aca905d70e7ea2e4d5b9e045c3b42201cc9d6c.linobigatti@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: games-emulation/np2kai/ X-VCS-Repository: repo/proj/guru X-VCS-Files: games-emulation/np2kai/metadata.xml games-emulation/np2kai/np2kai-22.ebuild X-VCS-Directories: games-emulation/np2kai/ X-VCS-Committer: linobigatti X-VCS-Committer-Name: Lino Bigatti X-VCS-Revision: 97aca905d70e7ea2e4d5b9e045c3b42201cc9d6c X-VCS-Branch: dev Date: Thu, 15 Apr 2021 21:23:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 30591c13-2eaa-488c-842a-260fecf2c88a X-Archives-Hash: cebab8012d7469ff3d764de0608fff87 commit: 97aca905d70e7ea2e4d5b9e045c3b42201cc9d6c Author: Lino Bigatti protonmail com> AuthorDate: Thu Apr 15 21:22:53 2021 +0000 Commit: Lino Bigatti protonmail com> CommitDate: Thu Apr 15 21:23:17 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=97aca905 games-emulation/np2kai: ebuild QA fixes Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Lino Bigatti protonmail.com> games-emulation/np2kai/metadata.xml | 9 ++-- games-emulation/np2kai/np2kai-22.ebuild | 86 ++++++++++++++++++--------------- 2 files changed, 52 insertions(+), 43 deletions(-) diff --git a/games-emulation/np2kai/metadata.xml b/games-emulation/np2kai/metadata.xml index c8c54e1d0..7dcbc8858 100644 --- a/games-emulation/np2kai/metadata.xml +++ b/games-emulation/np2kai/metadata.xml @@ -11,12 +11,11 @@ It is based on Neko project II. - - Use media-libs/libsdl over media-libs/libsdl2 - + Use media-libs/libsdl + Use media-libs/libsdl2 - Enable i286 emulation. - USE="ia32" or USE="haxm" will disable it, + Enable i286 emulation + USE="ia32" or USE="haxm" will disable it, unless all 3 emulation USE flags are set Enable ia32 emulation diff --git a/games-emulation/np2kai/np2kai-22.ebuild b/games-emulation/np2kai/np2kai-22.ebuild index 22a7116ff..035962b57 100644 --- a/games-emulation/np2kai/np2kai-22.ebuild +++ b/games-emulation/np2kai/np2kai-22.ebuild @@ -3,66 +3,76 @@ EAPI=7 -DESCRIPTION="NP2kai is an emulator for the japanese PC-98 series of computers." +DESCRIPTION="NP2kai is an emulator for the japanese PC-98 series of computers" HOMEPAGE="https://domisan.sakura.ne.jp/article/np2kai/np2kai.html" SRC_URI="https://github.com/AZO234/NP2kai/archive/refs/tags/rev.${PV}.tar.gz -> ${P}.tar.gz" -PATCHES=( - "${FILESDIR}/${P}-autogen.patch" -) - LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" - -IUSE="sdl +i286 ia32 haxm" +IUSE="sdl +sdl2 +i286 ia32 haxm" +REQUIRED_USE="^^ ( sdl sdl2 )" # Configure crashes if sdl AND sdl2 are not present, even if the options are off # It also requires sdl2-ttf even when building for sdl -DEPEND="sys-libs/glibc - media-libs/libsdl - sdl? ( media-libs/sdl-mixer ) - sdl? ( media-libs/sdl-ttf ) +# TODO: test musl +# TODO: migrate from gtk2 to gtk3 +DEPEND="media-libs/libsdl media-libs/libsdl2 - !sdl? ( media-libs/sdl2-mixer ) + sdl? ( + media-libs/sdl-mixer + media-libs/sdl-ttf + ) + sdl2? ( + media-libs/sdl2-mixer + ) media-libs/sdl2-ttf virtual/libusb:1 x11-base/xorg-server x11-libs/gtk+:2" - RDEPEND="${DEPEND}" -BDEPEND="sys-devel/gcc - sys-devel/automake - dev-util/cmake" +BDEPEND="sys-devel/automake" -S=${WORKDIR}/NP2kai-rev.${PV}/x11 +S="${WORKDIR}/NP2kai-rev.${PV}/x11" +PATCHES=( + "${FILESDIR}/${P}-autogen.patch" +) + +# TODO: add a die statement to autogen src_configure() { bash "${S}/autogen.sh" - sdlconf=$(usex sdl "--enable-sdl --enable-sdlmixer --enable-sdlttf - --disable-sdl2 --disable-sdl2mixer --disable-sdl2ttf" \ - "--enable-sdl2 --enable-sdl2mixer --enable-sdl2ttf - --disable-sdl --disable-sdlmixer --disable-sdlttf" ) - features=$( if use i286 && use ia32 && use haxm ; \ - then echo --enable-build-all ; \ - else echo $(use_enable ia32) $(use_enable haxm) ; \ - fi ) - econf ${sdlconf} ${features} + if use i286 && use ia32 && use haxm ; then + features=("--enable-build-all") + else + features=($(use_enable ia32) $(use_enable haxm)) + fi + local myeconfargs=( + $(use_enable sdl) + $(use_enable sdl sdlmixer) + $(use_enable sdl sdlttf) + $(use_enable sdl2) + $(use_enable sdl2 sdl2mixer) + $(use_enable sdl2 sdl2ttf) + ) + econf "${myeconfargs[@]}" "${features}" } pkg_postinst() { - if [ "${features}" = "--enable-build-all" ] ; then - cfgname="{xnp2kai, xnp21kai}" - elif ! use ia32 && ! use haxm ; then - cfgname="xnp2kai" - else - cfgname="xnp21kai" - fi + if [[ -z ${REPLACING_VERSIONS} ]] ; then + if [ use i286 && use ia32 && use haxm ] ; then + cfgname="{xnp2kai, xnp21kai}" + elif [ ! use ia32 && ! use haxm ] ; then + cfgname="xnp2kai" + else + cfgname="xnp21kai" + fi - elog "Japanese fonts are needed to use the emulator." - elog "Please run the following command to configure them:" - elog "mkdir -p ~/.config/${cfgname} && ln -s /path/to/font.ttf ~/.config/${cfgname}/default.ttf && rm ~/.config/${cfgname}/font.tmp" + elog "Japanese fonts are needed to use the emulator." + elog "Please run the following command to configure them:" + elog "mkdir -p ~/.config/${cfgname} && ln -s /path/to/font.ttf ~/.config/${cfgname}/default.ttf && rm ~/.config/${cfgname}/font.tmp" - elog "Neko project 2 requires a BIOS dump to work." - elog "Please dump the BIOS from your device and put the files under ~/.config/${cfgname}" + elog "Neko project 2 requires a BIOS dump to work." + elog "Please dump the BIOS from your device and put the files under ~/.config/${cfgname}" + fi }