* [gentoo-commits] repo/proj/guru:dev commit in: app-emulation/x48ng/, app-emulation/x48ng/files/
@ 2024-08-10 21:00 Istvan Szenasi
0 siblings, 0 replies; 2+ messages in thread
From: Istvan Szenasi @ 2024-08-10 21:00 UTC (permalink / raw
To: gentoo-commits
commit: ffc7513c2b97c2368e90243da229048bea0d15cc
Author: Istvan Szenasi <szeist <AT> pm <DOT> me>
AuthorDate: Sat Aug 10 20:57:39 2024 +0000
Commit: Istvan Szenasi <szeist <AT> pm <DOT> me>
CommitDate: Sat Aug 10 20:57:39 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ffc7513c
app-emulation/x48ng: new package, HP48 emulator
Signed-off-by: Istvan Szenasi <szeist <AT> pm.me>
app-emulation/x48ng/Manifest | 1 +
.../x48ng/files/x48ng-0_pre20240613-cflags.patch | 13 +++++
.../x48ng/files/x48ng-0_pre20240613-luajit.patch | 15 +++++
.../x48ng/files/x48ng-0_pre20240613-manpages.patch | 12 ++++
.../files/x48ng-0_pre20240613-setupscript.patch | 19 +++++++
app-emulation/x48ng/metadata.xml | 27 +++++++++
app-emulation/x48ng/x48ng-0_pre20240613.ebuild | 64 ++++++++++++++++++++++
7 files changed, 151 insertions(+)
diff --git a/app-emulation/x48ng/Manifest b/app-emulation/x48ng/Manifest
new file mode 100644
index 000000000..20d090d13
--- /dev/null
+++ b/app-emulation/x48ng/Manifest
@@ -0,0 +1 @@
+DIST x48ng-0_pre20240613.tar.gz 2636798 BLAKE2B f80ef1a89fbf6dcf157ec56f4be521fcb99655996bfc3b0b34de6885c82d47a037a8bbccce4992e8f5f5091b02561946428affc5856537be3f40483d9b73f909 SHA512 52cae6be049a0bb59ab5cf744cecdda9659c9ccb04ecf65a403a3a045bbafe95589d9dc75290849f1b8198032d8f4d7976275a3fcd9d99cd9c2766952eda7526
diff --git a/app-emulation/x48ng/files/x48ng-0_pre20240613-cflags.patch b/app-emulation/x48ng/files/x48ng-0_pre20240613-cflags.patch
new file mode 100644
index 000000000..ae6df00fb
--- /dev/null
+++ b/app-emulation/x48ng/files/x48ng-0_pre20240613-cflags.patch
@@ -0,0 +1,13 @@
+Keep original CFLAGS
+
+--- a/Makefile
++++ b/Makefile
+@@ -31,7 +31,7 @@ WITH_SDL ?= yes
+
+ OPTIM ?= 2
+
+-CFLAGS = -std=c11 -g -O$(OPTIM) -I./src/ -D_GNU_SOURCE=1 -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DPATCHLEVEL=$(PATCHLEVEL)
++CFLAGS += -std=c11 -g -O$(OPTIM) -I./src/ -D_GNU_SOURCE=1 -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DPATCHLEVEL=$(PATCHLEVEL)
+ LIBS = -lm
+
+ ### lua
diff --git a/app-emulation/x48ng/files/x48ng-0_pre20240613-luajit.patch b/app-emulation/x48ng/files/x48ng-0_pre20240613-luajit.patch
new file mode 100644
index 000000000..f56dfc90d
--- /dev/null
+++ b/app-emulation/x48ng/files/x48ng-0_pre20240613-luajit.patch
@@ -0,0 +1,15 @@
+Use luajit to avoid lua version specific pkg-config
+
+--- a/Makefile
++++ b/Makefile
+@@ -35,8 +35,8 @@ CFLAGS = -std=c11 -g -O$(OPTIM) -I./src/ -D_GNU_SOURCE=1 -DVERSION_MAJOR=$(VERSI
+ LIBS = -lm
+
+ ### lua
+-CFLAGS += $(shell pkg-config --cflags lua)
+-LIBS += $(shell pkg-config --libs lua)
++CFLAGS += $(shell pkg-config --cflags luajit)
++LIBS += $(shell pkg-config --libs luajit)
+
+ ### debugger
+ CFLAGS += $(shell pkg-config --cflags readline)
diff --git a/app-emulation/x48ng/files/x48ng-0_pre20240613-manpages.patch b/app-emulation/x48ng/files/x48ng-0_pre20240613-manpages.patch
new file mode 100644
index 000000000..7e08d79d9
--- /dev/null
+++ b/app-emulation/x48ng/files/x48ng-0_pre20240613-manpages.patch
@@ -0,0 +1,12 @@
+Don't zip man pages
+
+--- a/Makefile
++++ b/Makefile
+@@ -180,7 +180,6 @@ install: all get-roms dist/config.lua
+
+ install -m 755 -d -- $(DESTDIR)$(MANDIR)/man1
+ sed "s|@VERSION@|$(VERSION_MAJOR).$(VERSION_MINOR).$(PATCHLEVEL)|g" dist/x48ng.man.1 > $(DESTDIR)$(MANDIR)/man1/x48ng.1
+- gzip -9 $(DESTDIR)$(MANDIR)/man1/x48ng.1
+
+ install -m 755 -d -- $(DESTDIR)$(DOCDIR)
+ cp -R AUTHORS LICENSE README* doc* romdump/ $(DESTDIR)$(DOCDIR)
diff --git a/app-emulation/x48ng/files/x48ng-0_pre20240613-setupscript.patch b/app-emulation/x48ng/files/x48ng-0_pre20240613-setupscript.patch
new file mode 100644
index 000000000..699138758
--- /dev/null
+++ b/app-emulation/x48ng/files/x48ng-0_pre20240613-setupscript.patch
@@ -0,0 +1,19 @@
+Replace the PREFIX placeholder to the /usr dir instead of the image dir
+
+--- a/Makefile
++++ b/Makefile
+@@ -175,7 +175,7 @@ install: all get-roms dist/config.lua
+ install -c -m 755 dist/checkrom $(DESTDIR)$(PREFIX)/share/x48ng/checkrom
+ install -c -m 644 dist/hplogo.png $(DESTDIR)$(PREFIX)/share/x48ng/hplogo.png
+ cp -R dist/ROMs/ $(DESTDIR)$(PREFIX)/share/x48ng/
+- sed "s|@PREFIX@|$(PREFIX)|g" dist/setup-x48ng-home.sh > $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
++ sed "s|@PREFIX@|/usr|g" dist/setup-x48ng-home.sh > $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
+ chmod 755 $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
+
+ install -m 755 -d -- $(DESTDIR)$(MANDIR)/man1
+@@ -187,4 +187,4 @@ install: all get-roms dist/config.lua
+ install -c -m 644 dist/config.lua $(DESTDIR)$(DOCDIR)/config.lua
+
+ install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/applications
+- sed "s|@PREFIX@|$(PREFIX)|g" dist/x48ng.desktop > $(DESTDIR)$(PREFIX)/share/applications/x48ng.desktop
++ sed "s|@PREFIX@|/usr|g" dist/x48ng.desktop > $(DESTDIR)$(PREFIX)/share/applications/x48ng.desktop
diff --git a/app-emulation/x48ng/metadata.xml b/app-emulation/x48ng/metadata.xml
new file mode 100644
index 000000000..4b854a052
--- /dev/null
+++ b/app-emulation/x48ng/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>szeist@pm.me</email>
+ </maintainer>
+ <longdescription>
+ This emulator is capable of providing a faithful replication of the
+ HP48. In order to do so, it requires a copy of the ROM software
+ from YOUR calculator. In order to avoid breaking copyright laws,
+ and upsetting HP, you MUST BE THE PROUD OWNER OF AN HP48 before
+ running this program. Of course you can run this program without a
+ copy of the ROM software in order to write trivial machine code
+ programs but you will not be able to access any of the calculator
+ functionality.
+
+ Instructions on how to download a copy of the ROM are provided
+ later in this document.
+ </longdescription>
+ <use>
+ <flag name="X">X11 frontend</flag>
+ <flag name="sdl">SDL fronted</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">gwenhael-le-moine/x48ng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-emulation/x48ng/x48ng-0_pre20240613.ebuild b/app-emulation/x48ng/x48ng-0_pre20240613.ebuild
new file mode 100644
index 000000000..5418df9d7
--- /dev/null
+++ b/app-emulation/x48ng/x48ng-0_pre20240613.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="HP48 emulator"
+
+HOMEPAGE="https://github.com/gwenhael-le-moine/x48ng"
+
+GIT_COMMIT="c72a393498887f8628006d8a64fad31d23abd0d5"
+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="X sdl"
+
+RDEPEND="sys-libs/ncurses
+dev-lang/luajit
+sys-libs/readline
+X? (
+ x11-libs/libX11
+ x11-libs/libXext
+)
+sdl? (
+ =media-libs/libsdl-1.2*
+ media-libs/sdl-gfx
+)
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/x48ng-${PVR}-cflags.patch"
+ "${FILESDIR}/x48ng-${PVR}-luajit.patch"
+ "${FILESDIR}/x48ng-${PVR}-setupscript.patch"
+ "${FILESDIR}/x48ng-${PVR}-manpages.patch"
+)
+
+src_compile() {
+ local conf
+
+ if use X; then
+ conf+=" WITH_X11=yes"
+ else
+ conf+=" WITH_X11=no"
+ fi
+
+ if use sdl; then
+ conf+=" WITH_SDL=yes"
+ else
+ conf+=" WITH_SDL=no"
+ fi
+
+ emake ${conf}
+}
+
+src_install() {
+ emake install PREFIX="${D}/usr" MANDIR="${D}/usr/share/man" DOCDIR="${D}/usr/share/doc/${P}"
+}
+
+pkg_postinst() {
+ elog "Run /usr/share/x48ng/setup-x48ng-home.sh to setup your ~/.x48ng/. It sets up a HP 48GX with a 128KB card in port 1 and a 4MB card in port 2"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: app-emulation/x48ng/, app-emulation/x48ng/files/
@ 2024-08-12 20:24 Istvan Szenasi
0 siblings, 0 replies; 2+ messages in thread
From: Istvan Szenasi @ 2024-08-12 20:24 UTC (permalink / raw
To: gentoo-commits
commit: 02935dc58e17be375ab88741b0d5d1564fd5ae79
Author: Istvan Szenasi <szeist <AT> pm <DOT> me>
AuthorDate: Mon Aug 12 20:19:32 2024 +0000
Commit: Istvan Szenasi <szeist <AT> pm <DOT> me>
CommitDate: Mon Aug 12 20:19:46 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=02935dc5
app-emulation/x48ng: new package, add 0_pre20240812
ROMs are removed from the tarball in the upstream
Signed-off-by: Istvan Szenasi <szeist <AT> pm.me>
app-emulation/x48ng/Manifest | 1 +
.../x48ng/files/x48ng-0_pre20240812-luajit.patch | 16 ++++++
.../x48ng/files/x48ng-0_pre20240812-manpages.patch | 12 +++++
.../files/x48ng-0_pre20240812-setupscript.patch | 19 +++++++
app-emulation/x48ng/metadata.xml | 27 ++++++++++
app-emulation/x48ng/x48ng-0_pre20240812.ebuild | 63 ++++++++++++++++++++++
6 files changed, 138 insertions(+)
diff --git a/app-emulation/x48ng/Manifest b/app-emulation/x48ng/Manifest
new file mode 100644
index 000000000..c38864581
--- /dev/null
+++ b/app-emulation/x48ng/Manifest
@@ -0,0 +1 @@
+DIST x48ng-0_pre20240812.tar.gz 189817 BLAKE2B e3a69a4cacbaf78254391023f3b5ace6d090ac5ea9b68560dfc3d164c85f27ac9f75308a3ff3b6eec8ae16af70ce9d6dc81d2eeb1d0bd1b31ea3ba5d0af4c859 SHA512 f6a2f77b208d125692e9bb40229b5fea81dbea7d27bc65e24f7082e4278af0d21ab69adea40bbd44081eca40d522facbc31c16b956a6c9b3a815d2d2ac2742cd
diff --git a/app-emulation/x48ng/files/x48ng-0_pre20240812-luajit.patch b/app-emulation/x48ng/files/x48ng-0_pre20240812-luajit.patch
new file mode 100644
index 000000000..fc2ddb25e
--- /dev/null
+++ b/app-emulation/x48ng/files/x48ng-0_pre20240812-luajit.patch
@@ -0,0 +1,16 @@
+Use luajit to avoid lua version specific pkg-config
+
+--- a/Makefile
++++ b/Makefile
+@@ -35,8 +35,8 @@ CFLAGS += -std=c11 -g -O$(OPTIM) -I./src/ -D_GNU_SOURCE=1 -DVERSION_MAJOR=$(VERS
+ LIBS = -lm
+
+ ### lua
+-CFLAGS += $(shell pkg-config --cflags lua)
+-LIBS += $(shell pkg-config --libs lua)
++CFLAGS += $(shell pkg-config --cflags luajit)
++LIBS += $(shell pkg-config --libs luajit)
+
+ ### debugger
+ CFLAGS += $(shell pkg-config --cflags readline)
+lines 1-15/15 (END)
diff --git a/app-emulation/x48ng/files/x48ng-0_pre20240812-manpages.patch b/app-emulation/x48ng/files/x48ng-0_pre20240812-manpages.patch
new file mode 100644
index 000000000..1ab1cfe5a
--- /dev/null
+++ b/app-emulation/x48ng/files/x48ng-0_pre20240812-manpages.patch
@@ -0,0 +1,12 @@
+Don't zip man pages
+
+--- a/Makefile
++++ b/Makefile
+@@ -181,7 +181,6 @@ install: all dist/config.lua
+
+ install -m 755 -d -- $(DESTDIR)$(MANDIR)/man1
+ sed "s|@VERSION@|$(VERSION_MAJOR).$(VERSION_MINOR).$(PATCHLEVEL)|g" dist/x48ng.man.1 > $(DESTDIR)$(MANDIR)/man1/x48ng.1
+- gzip -9 $(DESTDIR)$(MANDIR)/man1/x48ng.1
+
+ install -m 755 -d -- $(DESTDIR)$(DOCDIR)
+ cp -R AUTHORS LICENSE README* doc* romdump/ $(DESTDIR)$(DOCDIR)
diff --git a/app-emulation/x48ng/files/x48ng-0_pre20240812-setupscript.patch b/app-emulation/x48ng/files/x48ng-0_pre20240812-setupscript.patch
new file mode 100644
index 000000000..ddff71ca3
--- /dev/null
+++ b/app-emulation/x48ng/files/x48ng-0_pre20240812-setupscript.patch
@@ -0,0 +1,19 @@
+Replace the PREFIX placeholder to the /usr dir instead of the image dir
+
+--- a/Makefile
++++ b/Makefile
+@@ -176,7 +176,7 @@ install: all dist/config.lua
+ install -c -m 755 dist/checkrom $(DESTDIR)$(PREFIX)/share/x48ng/checkrom
+ install -c -m 644 dist/hplogo.png $(DESTDIR)$(PREFIX)/share/x48ng/hplogo.png
+ cp -R dist/ROMs/ $(DESTDIR)$(PREFIX)/share/x48ng/
+- sed "s|@PREFIX@|$(PREFIX)|g" dist/setup-x48ng-home.sh > $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
++ sed "s|@PREFIX@|/usr|g" dist/setup-x48ng-home.sh > $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
+ chmod 755 $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
+
+ install -m 755 -d -- $(DESTDIR)$(MANDIR)/man1
+@@ -188,4 +188,4 @@ install: all dist/config.lua
+ install -c -m 644 dist/config.lua $(DESTDIR)$(DOCDIR)/config.lua
+
+ install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/applications
+- sed "s|@PREFIX@|$(PREFIX)|g" dist/x48ng.desktop > $(DESTDIR)$(PREFIX)/share/applications/x48ng.desktop
++ sed "s|@PREFIX@|/usr|g" dist/x48ng.desktop > $(DESTDIR)$(PREFIX)/share/applications/x48ng.desktop
diff --git a/app-emulation/x48ng/metadata.xml b/app-emulation/x48ng/metadata.xml
new file mode 100644
index 000000000..4b854a052
--- /dev/null
+++ b/app-emulation/x48ng/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>szeist@pm.me</email>
+ </maintainer>
+ <longdescription>
+ This emulator is capable of providing a faithful replication of the
+ HP48. In order to do so, it requires a copy of the ROM software
+ from YOUR calculator. In order to avoid breaking copyright laws,
+ and upsetting HP, you MUST BE THE PROUD OWNER OF AN HP48 before
+ running this program. Of course you can run this program without a
+ copy of the ROM software in order to write trivial machine code
+ programs but you will not be able to access any of the calculator
+ functionality.
+
+ Instructions on how to download a copy of the ROM are provided
+ later in this document.
+ </longdescription>
+ <use>
+ <flag name="X">X11 frontend</flag>
+ <flag name="sdl">SDL fronted</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">gwenhael-le-moine/x48ng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-emulation/x48ng/x48ng-0_pre20240812.ebuild b/app-emulation/x48ng/x48ng-0_pre20240812.ebuild
new file mode 100644
index 000000000..efe9512c4
--- /dev/null
+++ b/app-emulation/x48ng/x48ng-0_pre20240812.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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="X sdl"
+
+RDEPEND="sys-libs/ncurses
+dev-lang/luajit
+sys-libs/readline
+X? (
+ x11-libs/libX11
+ x11-libs/libXext
+)
+sdl? (
+ =media-libs/libsdl-1.2*
+ media-libs/sdl-gfx
+)
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/x48ng-${PVR}-luajit.patch"
+ "${FILESDIR}/x48ng-${PVR}-setupscript.patch"
+ "${FILESDIR}/x48ng-${PVR}-manpages.patch"
+)
+
+src_compile() {
+ local conf
+
+ if use X; then
+ conf+=" WITH_X11=yes"
+ else
+ conf+=" WITH_X11=no"
+ fi
+
+ if use sdl; then
+ conf+=" WITH_SDL=yes"
+ else
+ conf+=" WITH_SDL=no"
+ fi
+
+ emake ${conf}
+}
+
+src_install() {
+ emake install PREFIX="${D}/usr" MANDIR="${D}/usr/share/man" DOCDIR="${D}/usr/share/doc/${P}"
+}
+
+pkg_postinst() {
+ elog "Run /usr/share/x48ng/setup-x48ng-home.sh to setup your ~/.config/x48ng/. It sets up a HP 48GX with a 128KB card in port 1 and a 4MB card in port 2"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-12 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-10 21:00 [gentoo-commits] repo/proj/guru:dev commit in: app-emulation/x48ng/, app-emulation/x48ng/files/ Istvan Szenasi
-- strict thread matches above, loose matches on Subject: below --
2024-08-12 20:24 Istvan Szenasi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox