tilem: switch to GTK 3 fork (#522842)

This commit is contained in:
Masum Reza
2026-07-24 19:51:22 +00:00
committed by GitHub
3 changed files with 31 additions and 40 deletions
-13
View File
@@ -1,13 +0,0 @@
diff --git a/gui/macro.c b/gui/macro.c
index ae8db8b..226d48f 100644
--- a/gui/macro.c
+++ b/gui/macro.c
@@ -86,7 +86,7 @@ void tilem_macro_add_action(TilemMacro* macro, int type, char * value) {
macro->actions = tilem_macro_actions_new(macro, n + 1);
/* Then we need to save the action */
- macro->actions[n] = g_new(char, strlen(value)); /* FIXME : gcc says : "assignment from incompatible pointer type" ??? */
+ macro->actions[n] = g_new(TilemMacroAtom, 1); /* FIXME : gcc says : "assignment from incompatible pointer type" ??? */
macro->actions[n]->value = g_strdup(value);
macro->actions[n]->type = type;
macro->n++;
-12
View File
@@ -1,12 +0,0 @@
Fix call to zero-argument tilem_macro_new(), which GCC 15 rejects because the declaration takes no parameters.
--- a/gui/macro.c
+++ b/gui/macro.c
@@ -70,7 +70,7 @@
tilem_macro_finalize(emu->macro);
/* Then allocate a new one */
- emu->macro = tilem_macro_new(emu);
+ emu->macro = tilem_macro_new();
}
/* Add an action to the macro. The action could be :
+31 -15
View File
@@ -1,43 +1,59 @@
{
stdenv,
fetchurl,
fetchFromGitHub,
gnused,
lib,
nix-update,
pkg-config,
writeShellScript,
glib,
gtk2,
gtk3,
wrapGAppsHook3,
libticonv,
libtifiles2,
libticables2,
libticalcs2,
}:
stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation {
pname = "tilem";
version = "2.0";
src = fetchurl {
url = "mirror://sourceforge/tilem/tilem-${finalAttrs.version}.tar.bz2";
sha256 = "1ba38xzhp3yf21ip3cgql6jzy49jc34sfnjsl4syxyrd81d269zw";
version = "2.1-unstable-2025-11-06";
src = fetchFromGitHub {
owner = "kuba160";
repo = "tilem-gtk3";
rev = "64b9a38a4460abf52bf09ab28dffdc3784f002a3";
hash = "sha256-FYJMS2GIUbW89VrYbZM1+DLUGu86HxtScSWN0CLtNDo=";
};
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [
pkg-config
wrapGAppsHook3
];
buildInputs = [
glib
gtk2
gtk3
libticonv
libtifiles2
libticables2
libticalcs2
];
patches = [
./gcc14-fix.patch
./gcc15-fix.patch
];
env.NIX_CFLAGS_COMPILE = toString [ "-lm" ];
passthru.updateScript = writeShellScript "update-tilem" ''
${lib.getExe nix-update} "$UPDATE_NIX_ATTR_PATH" --version=branch
${lib.getExe gnused} -i -E \
's/version = "0-unstable-([0-9-]+)";/version = "2.1-unstable-\1";/' \
pkgs/by-name/ti/tilem/package.nix
'';
meta = {
homepage = "http://lpg.ticalc.org/prj_tilem/";
homepage = "https://github.com/kuba160/tilem-gtk3";
description = "Emulator and debugger for Texas Instruments Z80-based graphing calculators";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ siraben ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "tilem2";
};
})
}