app-emulation/x48ng: add 0.37.99_pre20240812

Previous iteration used wrong version, see Makefile and x48ng -v.

Fixes: ffc7513c2b
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
This commit is contained in:
Lucio Sauer
2024-08-13 00:44:58 +02:00
parent 1ebc9f202d
commit 31445fe8ce
2 changed files with 75 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST x48ng-0_pre20240812.tar.gz 189817 BLAKE2B e3a69a4cacbaf78254391023f3b5ace6d090ac5ea9b68560dfc3d164c85f27ac9f75308a3ff3b6eec8ae16af70ce9d6dc81d2eeb1d0bd1b31ea3ba5d0af4c859 SHA512 f6a2f77b208d125692e9bb40229b5fea81dbea7d27bc65e24f7082e4278af0d21ab69adea40bbd44081eca40d522facbc31c16b956a6c9b3a815d2d2ac2742cd
DIST x48ng-0.37.99_pre20240812.tar.gz 189817 BLAKE2B e3a69a4cacbaf78254391023f3b5ace6d090ac5ea9b68560dfc3d164c85f27ac9f75308a3ff3b6eec8ae16af70ce9d6dc81d2eeb1d0bd1b31ea3ba5d0af4c859 SHA512 f6a2f77b208d125692e9bb40229b5fea81dbea7d27bc65e24f7082e4278af0d21ab69adea40bbd44081eca40d522facbc31c16b956a6c9b3a815d2d2ac2742cd

View File

@@ -0,0 +1,74 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic prefix toolchain-funcs
DESCRIPTION="HP48 emulator"
HOMEPAGE="https://github.com/gwenhael-le-moine/x48ng"
GIT_COMMIT="249d50c44c7b5344841abbfcc6d16409546e514a"
SRC_URI="https://github.com/gwenhael-le-moine/x48ng/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${GIT_COMMIT}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="sdl X"
RDEPEND="sys-libs/ncurses:=
dev-lang/luajit:2=
sys-libs/readline:=
X? (
x11-libs/libX11
x11-libs/libXext
)
sdl? (
=media-libs/libsdl-1.2*
media-libs/sdl-gfx:=
)
"
DEPEND="${RDEPEND}
X? ( x11-base/xorg-proto )
"
BDEPEND="virtual/pkgconfig"
src_prepare() {
# Use luajit to avoid lua version specific pkg-config
sed -e 's/$(LIBS)/$(LDFLAGS) &/' \
-e "s/pkg-config/$(tc-getPKG_CONFIG)/" \
-e 's/lua)/luajit)/' \
-e '/gzip/d' \
-e 's/LICENSE//' \
-i Makefile || die
default
}
src_configure() {
# https://github.com/gwenhael-le-moine/x48ng/issues/24
use X && filter-lto
conf=(
$(usex X WITH_X11={yes,no})
$(usex sdl WITH_SDL={yes,no})
)
}
src_compile() {
tc-export CC
export {C,LD}FLAGS
emake ${conf[@]}
}
src_install() {
emake install DESTDIR="${D}" PREFIX="${EPREFIX}/usr" \
MANDIR="${EPREFIX}/usr/share/man" \
DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
${conf[@]}
hprefixify "${ED}"/usr/share/x48ng/setup-x48ng-home.sh
}
pkg_postinst() {
elog "Run ${EROOT}/usr/share/x48ng/setup-x48ng-home.sh to setup your config directory. It sets up a HP 48GX with a 128KB card in port 1 and a 4MB card in port 2"
}