commit:     a192ac023076261012c0714cad395d271f66644a
Author:     Seth M. Price <sprice623 <AT> aol <DOT> com>
AuthorDate: Sat Oct  5 22:21:24 2024 +0000
Commit:     Seth Price <sprice623 <AT> aol <DOT> com>
CommitDate: Sat Oct  5 22:24:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a192ac02

x11-terms/terminal-simulator: new package, add 0.2, 9999

Signed-off-by: Seth M. Price <sprice623 <AT> aol.com>

 x11-terms/terminal-simulator/Manifest              |  1 +
 ...ulator-0.2_do-not-force-compiler-warnings.patch | 18 +++++++++
 x11-terms/terminal-simulator/files/vt100           |  5 +++
 x11-terms/terminal-simulator/files/vt52            |  5 +++
 x11-terms/terminal-simulator/metadata.xml          | 20 ++++++++++
 .../terminal-simulator-0.2.ebuild                  | 33 ++++++++++++++++
 .../terminal-simulator-9999.ebuild                 | 45 ++++++++++++++++++++++
 7 files changed, 127 insertions(+)

diff --git a/x11-terms/terminal-simulator/Manifest 
b/x11-terms/terminal-simulator/Manifest
new file mode 100644
index 000000000..6d6abe0e3
--- /dev/null
+++ b/x11-terms/terminal-simulator/Manifest
@@ -0,0 +1 @@
+DIST terminal-simulator-0.2.tar.gz 72930468 BLAKE2B 
7b1362e7a49db8392f459e9a4bda79f4a475c977f0080029db5b56e69a16f055ff30bd4f02789a5b3ee7b18c119c5a5038ebbf5125ee58965922936ebb4851f2
 SHA512 
011f740137e56d0c1722deb5c4da363cf2cb365fa8016e0c2ceb08f3ab5dbb23b2b0971b4482d343401968ea372121ec4930a1bd8d3875c4150db44788a4a80b

diff --git 
a/x11-terms/terminal-simulator/files/terminal-simulator-0.2_do-not-force-compiler-warnings.patch
 
b/x11-terms/terminal-simulator/files/terminal-simulator-0.2_do-not-force-compiler-warnings.patch
new file mode 100644
index 000000000..9499685c4
--- /dev/null
+++ 
b/x11-terms/terminal-simulator/files/terminal-simulator-0.2_do-not-force-compiler-warnings.patch
@@ -0,0 +1,18 @@
+Remove unnecessary warning flags in Makefile.
+
+From: Seth M. Price <[email protected]>
+
+--- a/vt100/Makefile
++++ b/vt100/Makefile
+@@ -9,11 +9,10 @@ endif
+ #For clang: CFLAGS=-Ofast
+ check: vt100 ../test/test.sh
+       cd ..; sh test/test.sh
+-WARN=-Wall -Wno-unused-parameter -Wno-parentheses -Wno-unused-result
++WARN=
+ SRC=main.c cpu.c sys.c ddt.c pusart.c \
+       nvr.c keyboard.c video.c rom.c sound.c render.c \
+       ../common/sdl.c ../common/opengl.c ../common/event.c \
+       ../common/logger.c ../common/pty.c
+ DEPS=`sdl2-config --libs --cflags` -lSDL2_image $(LDFLAGS)
+ vt100: $(SRC) Makefile vt100.h ../common/xsdl.h ../common/opengl.h

diff --git a/x11-terms/terminal-simulator/files/vt100 
b/x11-terms/terminal-simulator/files/vt100
new file mode 100644
index 000000000..2e34784ce
--- /dev/null
+++ b/x11-terms/terminal-simulator/files/vt100
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Program is hard-coded to look in $PWD for shaders,
+# so this wrapper changes $PWD to something sane
+DATADIR=/usr/share/terminal-simulator/vt100
+(cd "$DATADIR" && /usr/libexec/terminal-simulator/vt100 $@)

diff --git a/x11-terms/terminal-simulator/files/vt52 
b/x11-terms/terminal-simulator/files/vt52
new file mode 100644
index 000000000..d27a767e3
--- /dev/null
+++ b/x11-terms/terminal-simulator/files/vt52
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Program is hard-coded to look in $PWD for shaders,
+# so this wrapper changes $PWD to something sane
+DATADIR=/usr/share/terminal-simulator/vt52
+(cd "$DATADIR" && /usr/libexec/terminal-simulator/vt52 $@)

diff --git a/x11-terms/terminal-simulator/metadata.xml 
b/x11-terms/terminal-simulator/metadata.xml
new file mode 100644
index 000000000..3f27ef635
--- /dev/null
+++ b/x11-terms/terminal-simulator/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <name>Seth Price</name>
+               <email>[email protected]</email>
+       </maintainer>
+       <longdescription lang="en">
+               This is a software simulation of the VT100 hardware.
+               (There is also a VT52 simulation.) The original firmware
+               ROM is built in and executed by an 8080 emulator. Other
+               components include video display with character generator
+               ROM, settings NVRAM, Intel 8251 USART, and a keyboard
+               matrix scanner. The Advanced Video Option is not included.
+       </longdescription>
+       <upstream>
+               
<bugs-to>https://github.com/larsbrinkhoff/terminal-simulator/issues</bugs-to>
+               <remote-id 
type="github">larsbrinkhoff/terminal-simulator</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/x11-terms/terminal-simulator/terminal-simulator-0.2.ebuild 
b/x11-terms/terminal-simulator/terminal-simulator-0.2.ebuild
new file mode 100644
index 000000000..1e7358c13
--- /dev/null
+++ b/x11-terms/terminal-simulator/terminal-simulator-0.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="VT100 terminal hardware simulator"
+HOMEPAGE="https://github.com/larsbrinkhoff/terminal-simulator";
+SRC_URI="https://github.com/larsbrinkhoff/terminal-simulator/archive/refs/tags/${PV}.tar.gz
 -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="media-libs/libsdl2 media-libs/sdl2-image virtual/opengl"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+       cd vt100
+       emake
+}
+
+src_install() {
+       exeinto "/usr/libexec/terminal-simulator"
+       doexe vt100/vt100
+       dobin "${FILESDIR}/vt100"
+
+       # This directoy is cd'd into because the
+       # program looks for a hardcoded relative dir
+       insinto "/usr/share/terminal-simulator/vt100"
+       doins vt100/*.shader
+
+       dodoc README.md
+}

diff --git a/x11-terms/terminal-simulator/terminal-simulator-9999.ebuild 
b/x11-terms/terminal-simulator/terminal-simulator-9999.ebuild
new file mode 100644
index 000000000..d7cf7141e
--- /dev/null
+++ b/x11-terms/terminal-simulator/terminal-simulator-9999.ebuild
@@ -0,0 +1,45 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit git-r3
+
+DESCRIPTION="VT100 and VT52 terminal hardware simulator"
+HOMEPAGE="https://github.com/larsbrinkhoff/terminal-simulator";
+EGIT_REPO_URI="https://github.com/larsbrinkhoff/terminal-simulator.git";
+
+LICENSE="GPL-3"
+SLOT="0"
+
+DEPEND="media-libs/libsdl2 media-libs/sdl2-image virtual/opengl"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+       cd vt100
+       emake
+       cd ../vt52
+       emake
+}
+
+src_install() {
+       exeinto "/usr/libexec/terminal-simulator"
+       doexe vt100/vt100
+       doexe vt52/vt52
+       dobin "${FILESDIR}/vt100"
+       dobin "${FILESDIR}/vt52"
+
+       # These directories are cd'd into because
+       # the program looks for a hardcoded relative dir,
+       # and even then the behavior is inconsistent
+       keepdir "/usr/share/terminal-simulator/vt100"
+       keepdir "/usr/share/terminal-simulator/vt52"
+       insinto "/usr/share/terminal-simulator/common"
+       doins common/*.shader
+       insinto "/usr/share/terminal-simulator/vt100"
+       doins common/*.shader
+       insinto "/usr/share/terminal-simulator/vt52"
+       doins common/*.shader
+
+       dodoc README.md
+}

Reply via email to