Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (349aa0204242324c36817242b5a1f28a79f80783)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (349aa0204242324c36817242b5a1f28a79f80783)
  • Date: Sun, 19 Feb 2023 16:13:02 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

ChangeLog | 3
science/x48/BUILD | 3
science/x48/DEPENDS | 4 +
science/x48/DETAILS | 16 ++++
science/x48/HISTORY | 5 +
science/x48/INSTALL | 1
science/x48/PRE_BUILD | 3
science/x48/patches/0001-Fix-missing-includes.patch | 39
+++++++++++
science/x48/patches/0002-Fix-off-by-one-string-copies.patch | 41
++++++++++++
science/x48/patches/0003-Make-decode_8_thru_f-static.patch | 26 +++++++
10 files changed, 141 insertions(+)

New commits:
commit 349aa0204242324c36817242b5a1f28a79f80783
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

x48: new spell, HP 48 emulator

diff --git a/ChangeLog b/ChangeLog
index 2ed3b14..c0c6ce5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2023-02-19 Ismael Luceno <ismael AT sourcemage.org>
+ * science/x48: new spell, HP 48 emulator
+
2023-02-17 Conner Clere <xenanthropy AT sourcemage.org>
* lumina/lumina-core: new spell, core libs for lumina desktop
environment
* lumina/lumina-core-utils: new spell, core utils for lumina desktop
environment
diff --git a/science/x48/BUILD b/science/x48/BUILD
new file mode 100755
index 0000000..6ee7e4c
--- /dev/null
+++ b/science/x48/BUILD
@@ -0,0 +1,3 @@
+echo '#define TermcapLibrary -lncurses' >> config.h &&
+xmkmf &&
+${MAKE:-make}
diff --git a/science/x48/DEPENDS b/science/x48/DEPENDS
new file mode 100755
index 0000000..b45447d
--- /dev/null
+++ b/science/x48/DEPENDS
@@ -0,0 +1,4 @@
+depends imake &&
+depends libx11 &&
+depends libxext &&
+depends ncurses
diff --git a/science/x48/DETAILS b/science/x48/DETAILS
new file mode 100755
index 0000000..a01eff7
--- /dev/null
+++ b/science/x48/DETAILS
@@ -0,0 +1,16 @@
+ SPELL=x48
+ VERSION=0.4.3
+ SOURCE="$SPELL-$VERSION.tar.gz"
+ SOURCE_URL[0]=https://www.hpcalc.org/hp48/pc/emulators/$SOURCE
+
SOURCE_HASH=sha512:cddae16412a426f8cd4b188dc717c64b6e722daefdff76176345bce71cafe9181df1902120ba014a7f657e01555798726bf22d6065c5fb7e2944cbf7c1f4a5c1
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+ WEB_SITE="https://www.hpcalc.org/details/6359";
+ LICENSE[0]="GPL-2.0-or-later"
+ DOC_DIRS=
+ DOCS+=' doc/*.doc doc/ChangeLog doc/TODO doc/COPYING
doc/INSTALLING'
+ ENTERED=20230219
+ KEYWORDS=""
+ SHORT="HP 48 emulator"
+cat << EOF
+HP 48 emulator
+EOF
diff --git a/science/x48/HISTORY b/science/x48/HISTORY
new file mode 100644
index 0000000..cf43867
--- /dev/null
+++ b/science/x48/HISTORY
@@ -0,0 +1,5 @@
+2023-02-19 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, DEPENDS, DETAILS, INSTALL, PRE_BUILD,
+ patches/0001-Fix-missing-includes.patch,
+ patches/0002-Fix-off-by-one-string-copies.patch,
+ patches/0003-Make-decode_8_thru_f-static.patch: spell created
diff --git a/science/x48/INSTALL b/science/x48/INSTALL
new file mode 100755
index 0000000..a6ba944
--- /dev/null
+++ b/science/x48/INSTALL
@@ -0,0 +1 @@
+${MAKE:-make} install install.man
diff --git a/science/x48/PRE_BUILD b/science/x48/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/science/x48/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/science/x48/patches/0001-Fix-missing-includes.patch
b/science/x48/patches/0001-Fix-missing-includes.patch
new file mode 100644
index 0000000..3031e6d
--- /dev/null
+++ b/science/x48/patches/0001-Fix-missing-includes.patch
@@ -0,0 +1,39 @@
+From 61cdd06fced74438c36c26b863635a2d71202aa9 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Sun, 19 Feb 2023 16:16:20 +0100
+Subject: [PATCH 1/3] Fix missing includes
+
+Upstream-Status: Pending
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/errors.c | 1 +
+ src/rpl.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/errors.c b/src/errors.c
+index cf521f652c3b..80757f1e4471 100644
+--- a/src/errors.c
++++ b/src/errors.c
+@@ -26,6 +26,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+
+ #include "global.h"
+ #include "resources.h"
+diff --git a/src/rpl.c b/src/rpl.c
+index 13b0bacf0fcc..e33306bb787a 100644
+--- a/src/rpl.c
++++ b/src/rpl.c
+@@ -39,6 +39,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <string.h>
+
+ #include "hp48.h"
+ #include "hp48_emu.h"
+--
+2.39.1
+
diff --git a/science/x48/patches/0002-Fix-off-by-one-string-copies.patch
b/science/x48/patches/0002-Fix-off-by-one-string-copies.patch
new file mode 100644
index 0000000..f687720
--- /dev/null
+++ b/science/x48/patches/0002-Fix-off-by-one-string-copies.patch
@@ -0,0 +1,41 @@
+From b0662b04f49e1048a90ba7cecd2fe8e003d6b581 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Sun, 19 Feb 2023 16:16:36 +0100
+Subject: [PATCH 2/3] Fix off-by-one string copies
+
+Upstream-Status: Pending
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/debugger.c | 7 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/debugger.c b/src/debugger.c
+index 3b8a1f5845cc..51d7ea90bcfb 100644
+--- a/src/debugger.c
++++ b/src/debugger.c
+@@ -1759,9 +1759,9 @@ debug ()
+ cl = (char *) 0;
+ }
+ if (old_line)
+- cl = strcpy ((char *) malloc (strlen (old_line)), old_line);
++ cl = strdup(old_line);
+ else
+- cl = strcpy ((char *) malloc (strlen ("(null)")), "(null)");
++ cl = strdup("(null)");
+ }
+ else
+ {
+@@ -1779,8 +1779,8 @@ debug ()
+ free (old_line);
+ old_line = (char *) 0;
+ }
+- cl = strcpy ((char *) malloc (strlen (rl)), rl);
+- old_line = strcpy ((char *) malloc (strlen (rl)), rl);
++ cl = strdup(rl);
++ old_line = strdup(rl);
+ #ifdef HAVE_READLINE
+ add_history (rl);
+ #endif
+--
+2.39.1
+
diff --git a/science/x48/patches/0003-Make-decode_8_thru_f-static.patch
b/science/x48/patches/0003-Make-decode_8_thru_f-static.patch
new file mode 100644
index 0000000..e0de396
--- /dev/null
+++ b/science/x48/patches/0003-Make-decode_8_thru_f-static.patch
@@ -0,0 +1,26 @@
+From c42528a5dde510d0ad1c2a9e934242d5468f5ec0 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Sun, 19 Feb 2023 16:17:09 +0100
+Subject: [PATCH 3/3] Make decode_8_thru_f static
+
+Upstream-Status: Pending
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/emulate.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/emulate.c b/src/emulate.c
+index 0dd2eec1e92e..91c287b6ec7a 100644
+--- a/src/emulate.c
++++ b/src/emulate.c
+@@ -693,6 +693,7 @@ decode_group_1()
+ }
+ }
+
++static
+ inline int
+ #ifdef __FunctionProto__
+ decode_8_thru_f(int op1)
+--
+2.39.1
+



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (349aa0204242324c36817242b5a1f28a79f80783), Ismael Luceno, 02/19/2023

Archive powered by MHonArc 2.6.24.

Top of Page