mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-21 21:13:27 -04:00
games-emulation/np2kai: ebuild QA fixes
Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Lino Bigatti <linobigatti@protonmail.com>
This commit is contained in:
@@ -11,12 +11,11 @@
|
|||||||
It is based on Neko project II.
|
It is based on Neko project II.
|
||||||
</longdescription>
|
</longdescription>
|
||||||
<use>
|
<use>
|
||||||
<flag name="sdl">
|
<flag name="sdl">Use <pkg>media-libs/libsdl</pkg></flag>
|
||||||
Use <pkg>media-libs/libsdl</pkg> over <pkg>media-libs/libsdl2</pkg>
|
<flag name="sdl2">Use <pkg>media-libs/libsdl2</pkg></flag>
|
||||||
</flag>
|
|
||||||
<flag name="i286">
|
<flag name="i286">
|
||||||
Enable i286 emulation.
|
Enable i286 emulation
|
||||||
USE="ia32" or USE="haxm" will disable it,
|
USE="ia32" or USE="haxm" will disable it,
|
||||||
unless all 3 emulation USE flags are set
|
unless all 3 emulation USE flags are set
|
||||||
</flag>
|
</flag>
|
||||||
<flag name="ia32">Enable ia32 emulation</flag>
|
<flag name="ia32">Enable ia32 emulation</flag>
|
||||||
|
|||||||
@@ -3,66 +3,76 @@
|
|||||||
|
|
||||||
EAPI=7
|
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"
|
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"
|
SRC_URI="https://github.com/AZO234/NP2kai/archive/refs/tags/rev.${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
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
|
||||||
|
# TODO: test musl
|
||||||
|
# TODO: migrate from gtk2 to gtk3
|
||||||
|
DEPEND="media-libs/libsdl
|
||||||
|
media-libs/libsdl2
|
||||||
|
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/automake"
|
||||||
|
|
||||||
|
S="${WORKDIR}/NP2kai-rev.${PV}/x11"
|
||||||
|
|
||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}/${P}-autogen.patch"
|
"${FILESDIR}/${P}-autogen.patch"
|
||||||
)
|
)
|
||||||
|
|
||||||
LICENSE="MIT"
|
# TODO: add a die statement to autogen
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64"
|
|
||||||
|
|
||||||
IUSE="sdl +i286 ia32 haxm"
|
|
||||||
|
|
||||||
# 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 )
|
|
||||||
media-libs/libsdl2
|
|
||||||
!sdl? ( 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"
|
|
||||||
|
|
||||||
S=${WORKDIR}/NP2kai-rev.${PV}/x11
|
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
bash "${S}/autogen.sh"
|
bash "${S}/autogen.sh"
|
||||||
sdlconf=$(usex sdl "--enable-sdl --enable-sdlmixer --enable-sdlttf
|
if use i286 && use ia32 && use haxm ; then
|
||||||
--disable-sdl2 --disable-sdl2mixer --disable-sdl2ttf" \
|
features=("--enable-build-all")
|
||||||
"--enable-sdl2 --enable-sdl2mixer --enable-sdl2ttf
|
else
|
||||||
--disable-sdl --disable-sdlmixer --disable-sdlttf" )
|
features=($(use_enable ia32) $(use_enable haxm))
|
||||||
features=$( if use i286 && use ia32 && use haxm ; \
|
fi
|
||||||
then echo --enable-build-all ; \
|
local myeconfargs=(
|
||||||
else echo $(use_enable ia32) $(use_enable haxm) ; \
|
$(use_enable sdl)
|
||||||
fi )
|
$(use_enable sdl sdlmixer)
|
||||||
econf ${sdlconf} ${features}
|
$(use_enable sdl sdlttf)
|
||||||
|
$(use_enable sdl2)
|
||||||
|
$(use_enable sdl2 sdl2mixer)
|
||||||
|
$(use_enable sdl2 sdl2ttf)
|
||||||
|
)
|
||||||
|
econf "${myeconfargs[@]}" "${features}"
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst() {
|
pkg_postinst() {
|
||||||
if [ "${features}" = "--enable-build-all" ] ; then
|
if [[ -z ${REPLACING_VERSIONS} ]] ; then
|
||||||
cfgname="{xnp2kai, xnp21kai}"
|
if [ use i286 && use ia32 && use haxm ] ; then
|
||||||
elif ! use ia32 && ! use haxm ; then
|
cfgname="{xnp2kai, xnp21kai}"
|
||||||
cfgname="xnp2kai"
|
elif [ ! use ia32 && ! use haxm ] ; then
|
||||||
else
|
cfgname="xnp2kai"
|
||||||
cfgname="xnp21kai"
|
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 "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
|
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 "Neko project 2 requires a BIOS dump to work."
|
|
||||||
elog "Please dump the BIOS from your device and put the files under ~/.config/${cfgname}"
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user