Skip to content

Commit

Permalink
chore: upgrade to tauri rc 8 (#79)
Browse files Browse the repository at this point in the history
* chore: add flatpak builds

* docs: add flatpak commands

* chore: upgrade to latest tauri rc-8
  • Loading branch information
vjousse authored Aug 30, 2024
1 parent ee0011e commit 71a6c33
Show file tree
Hide file tree
Showing 17 changed files with 1,965 additions and 247 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# Flatpak
.flatpak-builder/
repo/
13 changes: 13 additions & 0 deletions flatpak/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# flatpak

## Build

flatpak-builder --force-clean --user --repo=repo --install builddir org.jousse.vincent.Pomodorolm.yml

## Run

flatpak run org.jousse.vincent.Pomodorolm.yml

## Lint

flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest org.jousse.vincent.Pomodorolm.yml
23 changes: 23 additions & 0 deletions flatpak/dbus-glib/dbus-glib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "dbus-glib",
"cleanup": [
"*.la",
"/bin",
"/etc",
"/include",
"/libexec",
"/share/gtk-doc",
"/share/man"
],
"config-opts": [
"--disable-static",
"--disable-gtk-doc"
],
"sources": [
{
"type": "archive",
"url": "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.112.tar.gz",
"sha256": "7d550dccdfcd286e33895501829ed971eeb65c614e73aadb4a08aeef719b143a"
}
]
}
15 changes: 15 additions & 0 deletions flatpak/intltool/intltool-0.51.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "intltool",
"cleanup": [ "*" ],
"sources": [
{
"type": "archive",
"url": "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz",
"sha256": "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd"
},
{
"type": "patch",
"path": "intltool-perl5.26-regex-fixes.patch"
}
]
}
59 changes: 59 additions & 0 deletions flatpak/intltool/intltool-perl5.26-regex-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Description: Escape "{", to prevent complaints from perl 5.22 and 5.26
Author: Roderich Schupp <[email protected]>
Author: gregor herrmann <[email protected]>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788705
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826471
Bug-Upstream: https://bugs.launchpad.net/intltool/+bug/1490906

Index: intltool-0.51.0/intltool-update.in
===================================================================
--- intltool-0.51.0.orig/intltool-update.in 2017-07-23 17:24:35.113169465 +0200
+++ intltool-0.51.0/intltool-update.in 2017-07-23 17:24:35.109169052 +0200
@@ -1062,13 +1062,13 @@
}
}

- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
+ if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
{
my $rest = $3;
my $untouched = $1;
my $sub = "";
# Ignore recursive definitions of variables
- $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
+ $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\$\{?$2}?/;

return SubstituteVariable ("$untouched$sub$rest");
}
@@ -1190,10 +1190,10 @@
$name =~ s/\(+$//g;
$version =~ s/\(+$//g;

- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
+ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
}

if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
@@ -1219,11 +1219,11 @@
$version =~ s/\(+$//g;
$bugurl =~ s/\(+$//g if (defined $bugurl);

- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
- $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/);
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
+ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
+ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/);
}

# \s makes this not work, why?
10 changes: 10 additions & 0 deletions flatpak/libappindicator/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all: libappindicator-gtk3-introspection-12.10.json libappindicator-gtk3-12.10.json libappindicator-gtk2-12.10.json

libappindicator-gtk3-introspection-12.10.json: libappindicator.json.in
sed -e 's/@GTK_VER@/3/g' -e 's/@INTROSPECTION@/yes/g' $< > $@

libappindicator-gtk3-12.10.json: libappindicator.json.in
sed -e 's/@GTK_VER@/3/g' -e 's/@INTROSPECTION@/no/g' $< > $@

libappindicator-gtk2-12.10.json: libappindicator.json.in
sed -e 's/@GTK_VER@/2/g' -e 's/@INTROSPECTION@/no/g' $< > $@
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
--- libappindicator-12.10.0/src/app-indicator.c 2012-07-11 13:28:34.415113869 -0400
+++ wrk/src/app-indicator.c 2020-03-19 12:14:47.813191652 -0400
@@ -443,7 +443,7 @@
G_STRUCT_OFFSET (AppIndicatorClass, new_icon),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0, G_TYPE_NONE);
+ G_TYPE_NONE, 0);

/**
* AppIndicator::new-attention-icon:
@@ -457,7 +457,7 @@
G_STRUCT_OFFSET (AppIndicatorClass, new_attention_icon),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0, G_TYPE_NONE);
+ G_TYPE_NONE, 0);

/**
* AppIndicator::new-status:
@@ -505,7 +505,7 @@
G_STRUCT_OFFSET (AppIndicatorClass, connection_changed),
NULL, NULL,
g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE, 1, G_TYPE_BOOLEAN, G_TYPE_NONE);
+ G_TYPE_NONE, 1, G_TYPE_BOOLEAN);

/**
* AppIndicator::new-icon-theme-path:
@@ -1175,7 +1175,7 @@
gchar * guide = priv->label_guide != NULL ? priv->label_guide : "";

g_signal_emit(G_OBJECT(self), signals[NEW_LABEL], 0,
- label, guide, TRUE);
+ label, guide);
if (priv->dbus_registration != 0 && priv->connection != NULL) {
GError * error = NULL;

@@ -1490,7 +1490,7 @@
static void
theme_changed_cb (GtkIconTheme * theme, gpointer user_data)
{
- g_signal_emit (user_data, signals[NEW_ICON], 0, TRUE);
+ g_signal_emit (user_data, signals[NEW_ICON], 0);

AppIndicator * self = (AppIndicator *)user_data;
AppIndicatorPrivate *priv = self->priv;
@@ -1904,7 +1904,7 @@
}

if (changed) {
- g_signal_emit (self, signals[NEW_ATTENTION_ICON], 0, TRUE);
+ g_signal_emit (self, signals[NEW_ATTENTION_ICON], 0);

if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) {
GError * error = NULL;
@@ -1982,7 +1982,7 @@
}

if (changed) {
- g_signal_emit (self, signals[NEW_ICON], 0, TRUE);
+ g_signal_emit (self, signals[NEW_ICON], 0);

if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) {
GError * error = NULL;
@@ -2048,7 +2048,7 @@

self->priv->icon_theme_path = g_strdup(icon_theme_path);

- g_signal_emit (self, signals[NEW_ICON_THEME_PATH], 0, self->priv->icon_theme_path, TRUE);
+ g_signal_emit (self, signals[NEW_ICON_THEME_PATH], 0, self->priv->icon_theme_path);

if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) {
GError * error = NULL;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- libappindicator-12.10.0/src/app-indicator.c
+++ libappindicator-12.10.0/src/app-indicator.c
@@ -1606,7 +1606,7 @@ status_icon_changes (AppIndicator * self, gpointer data)
gint n_elements, i;
gboolean found=FALSE;
gtk_icon_theme_get_search_path(icon_theme, &path, &n_elements);
- for (i=0; i< n_elements || path[i] == NULL; i++) {
+ for (i=0; i< n_elements; i++) {
if(g_strcmp0(path[i], self->priv->icon_theme_path) == 0) {
found=TRUE;
break;
20 changes: 20 additions & 0 deletions flatpak/libappindicator/libappindicator-ftbfs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
From: Olivier Tilloy <[email protected]>
Date: Tue 2018-03-20 12:47:56 +0000
Subject: [PATCH] libappindicator FTBFS on bionic

Fix build failures on bionic,
and update Vcs-* fields in debian/control. (LP: #1757121)

Approved by: Marco Trevisan (Treviño)
---
--- libappindicator-12.10.0/src/app-indicator.c 2017-02-15 14:10:41 +0000
+++ libappindicator-12.10.0/src/app-indicator.c 2018-03-20 12:38:59 +0000
@@ -2196,7 +2196,7 @@ app_indicator_set_secondary_activate_tar

g_return_if_fail (GTK_IS_WIDGET (menuitem));

- priv->sec_activate_target = g_object_ref(G_OBJECT(menuitem));
+ priv->sec_activate_target = g_object_ref(menuitem);
priv->sec_activate_enabled = widget_is_menu_child(self, menuitem);
g_signal_connect(menuitem, "parent-set", G_CALLBACK(sec_activate_target_parent_changed), self);
}
130 changes: 130 additions & 0 deletions flatpak/libappindicator/libappindicator-gtk2-12.10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"name": "libappindicator",
"build-options": {
"cflags": "-Wno-error",
"make-args": [ "-j1" ]
},
"rm-configure": true,
"config-opts": [
"--disable-static",
"--disable-gtk-doc",
"--disable-tests",
"--disable-mono-tests",
"--enable-introspection=no",
"--with-gtk=2"
],
"cleanup": [
"/include",
"/lib/pkgconfig",
"/lib/*.la",
"/share/gtk-doc",
"/share/gir-1.0"
],
"sources": [
{
"type": "archive",
"url": "https://launchpad.net/libappindicator/12.10/12.10.0/+download/libappindicator-12.10.0.tar.gz",
"sha256": "d5907c1f98084acf28fd19593cb70672caa0ca1cf82d747ba6f4830d4cc3b49f"
},
{
"type": "patch",
"path": "libappindicator-ftbfs.patch"
},
{
"type": "patch",
"path": "libappindicator-no-python.patch"
},
{
"type": "patch",
"path": "libappindicator-fix-crash-from-incorrect-signal-emission.patch"
},
{
"type": "patch",
"path": "libappindicator-fix-crash-iterating-icon-themes.patch"
},
{
"type": "script",
"commands": ["autoreconf -sfi"],
"dest-filename": "autogen.sh"
}
],
"modules": [
"../intltool/intltool-0.51.json",
"../dbus-glib/dbus-glib.json",
{
"name": "libdbusmenu",
"build-options": {
"cflags": "-Wno-error",
"env": {
"HAVE_VALGRIND_FALSE": "#",
"HAVE_VALGRIND_TRUE": ""
}
},
"cleanup": [
"/include",
"/libexec",
"/lib/pkgconfig",
"/lib/*.la",
"/share/doc",
"/share/libdbusmenu",
"/share/gtk-doc",
"/share/gir-1.0"
],
"config-opts": [
"--disable-static",
"--disable-gtk-doc",
"--enable-introspection=no",
"--disable-vala",
"--disable-dumper",
"--disable-tests",
"--with-gtk=2"
],
"sources": [
{
"type": "archive",
"url": "https://launchpad.net/libdbusmenu/16.04/16.04.0/+download/libdbusmenu-16.04.0.tar.gz",
"sha256": "b9cc4a2acd74509435892823607d966d424bd9ad5d0b00938f27240a1bfa878a"
}
]
},
{
"name": "libindicator",
"build-options": {
"cflags": "-Wno-error"
},
"cleanup": [
"/include",
"/libexec",
"/lib/pkgconfig",
"/lib/*.la",
"/share/libindicator",
"/share/gtk-doc",
"/share/gir-1.0"
],
"config-opts": [
"--disable-static",
"--disable-tests",
"--with-gtk=2"
],
"sources": [
{
"type": "archive",
"url": "https://launchpad.net/libindicator/12.10/12.10.1/+download/libindicator-12.10.1.tar.gz",
"sha256": "b2d2e44c10313d5c9cd60db455d520f80b36dc39562df079a3f29495e8f9447f"
},
{
"type": "shell",
"commands": [
"# FTBFS fix",
"sed -e '/LIBINDICATOR_LIBS/ s/\\$LIBM/ $LIBM/' -i configure.ac"
]
},
{
"type": "script",
"commands": ["autoreconf -sfi"],
"dest-filename": "autogen.sh"
}
]
}
]
}
Loading

0 comments on commit 71a6c33

Please sign in to comment.