Skip to content

Commit d86b070

Browse files
committed
fix(flatpak): vendor ayatana modules and fix lib64 pkg-config path
Replace shared-modules submodule with vendored copies of the needed files. Add -DCMAKE_INSTALL_LIBDIR=lib to all cmake modules to fix pkg-config discovery on x86_64 where GNUInstallDirs defaults to lib64.
1 parent b6d8d31 commit d86b070

9 files changed

Lines changed: 302 additions & 7 deletions

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ jobs:
286286
uses: actions/checkout@v4
287287
with:
288288
ref: ${{ env.RELEASE_TAG }}
289-
submodules: true
290289

291290
- name: Install Linux dependencies
292291
run: |
@@ -437,7 +436,7 @@ jobs:
437436
cp apps/fluux/src-tauri/icons/256x256.png flatpak-build/fluux-messenger-256.png
438437
cp packaging/flatpak/com.processone.fluux.metainfo.xml flatpak-build/
439438
cp packaging/flatpak/com.processone.fluux.yaml flatpak-build/
440-
cp -r packaging/flatpak/shared-modules flatpak-build/
439+
cp -r packaging/flatpak/modules flatpak-build/
441440
442441
# Build Flatpak
443442
cd flatpak-build

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

packaging/flatpak/com.processone.fluux.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ finish-args:
3333

3434
modules:
3535
# System tray support (libappindicator-sys loads this via dlopen at runtime)
36-
- shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json
36+
- modules/libayatana-appindicator/libayatana-appindicator-gtk3.json
3737

3838
- name: fluux-messenger
3939
buildsystem: simple
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "intltool",
3+
"cleanup": [ "*" ],
4+
"sources": [
5+
{
6+
"type": "archive",
7+
"url": "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz",
8+
"mirror-urls": [
9+
"https://sources.suse.com/SUSE:SLE-15-SP7:Update:BCI/000product/ca527df4d03bf96a67854a8ed2f0c64b/INCLUDED/SUSE:SLE-15-SP6:GA::intltool::45f77273c3f2ef792fa697b444183beb/intltool-0.51.0.tar.gz",
10+
"https://mirror-hk.koddos.net/lfs/lfs-packages/12.0/intltool-0.51.0.tar.gz",
11+
"https://gstreamer.freedesktop.org/src/mirror/intltool-0.51.0.tar.gz"
12+
],
13+
"sha256": "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd"
14+
},
15+
{
16+
"type": "patch",
17+
"path": "intltool-perl5.26-regex-fixes.patch"
18+
}
19+
]
20+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Description: Escape "{", to prevent complaints from perl 5.22 and 5.26
2+
Author: Roderich Schupp <roderich.schupp@gmail.com>
3+
Author: gregor herrmann <gregoa@debian.org>
4+
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788705
5+
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826471
6+
Bug-Upstream: https://bugs.launchpad.net/intltool/+bug/1490906
7+
8+
Index: intltool-0.51.0/intltool-update.in
9+
===================================================================
10+
--- intltool-0.51.0.orig/intltool-update.in 2017-07-23 17:24:35.113169465 +0200
11+
+++ intltool-0.51.0/intltool-update.in 2017-07-23 17:24:35.109169052 +0200
12+
@@ -1062,13 +1062,13 @@
13+
}
14+
}
15+
16+
- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
17+
+ if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
18+
{
19+
my $rest = $3;
20+
my $untouched = $1;
21+
my $sub = "";
22+
# Ignore recursive definitions of variables
23+
- $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
24+
+ $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\$\{?$2}?/;
25+
26+
return SubstituteVariable ("$untouched$sub$rest");
27+
}
28+
@@ -1190,10 +1190,10 @@
29+
$name =~ s/\(+$//g;
30+
$version =~ s/\(+$//g;
31+
32+
- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
33+
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
34+
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
35+
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
36+
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
37+
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
38+
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
39+
+ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
40+
}
41+
42+
if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
43+
@@ -1219,11 +1219,11 @@
44+
$version =~ s/\(+$//g;
45+
$bugurl =~ s/\(+$//g if (defined $bugurl);
46+
47+
- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
48+
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
49+
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
50+
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
51+
- $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/);
52+
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
53+
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
54+
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
55+
+ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
56+
+ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/);
57+
}
58+
59+
# \s makes this not work, why?
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
From 729546c51806a1b3ea6cb6efb7a115b1baa811f1 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
3+
Date: Mon, 18 Nov 2019 19:58:53 +0100
4+
Subject: [PATCH 1/1] Fix HAVE_VALGRIND AM_CONDITIONAL
5+
6+
The AM_CONDITIONAL should also be run with --disable-tests, otherwise
7+
HAVE_VALGRIND is undefined.
8+
---
9+
configure | 4 ++--
10+
configure.ac | 2 +-
11+
2 files changed, 3 insertions(+), 3 deletions(-)
12+
13+
diff --git a/configure b/configure
14+
index 831a3bb..8913b9b 100644
15+
--- a/configure
16+
+++ b/configure
17+
@@ -14801,6 +14801,8 @@ else
18+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19+
$as_echo "yes" >&6; }
20+
have_valgrind=yes
21+
+fi
22+
+
23+
fi
24+
if test "x$have_valgrind" = "xyes"; then
25+
HAVE_VALGRIND_TRUE=
26+
@@ -14811,8 +14813,6 @@ else
27+
fi
28+
29+
30+
-fi
31+
-
32+
33+
34+
35+
diff --git a/configure.ac b/configure.ac
36+
index ace54d1..cbd38a6 100644
37+
--- a/configure.ac
38+
+++ b/configure.ac
39+
@@ -120,8 +120,8 @@ PKG_CHECK_MODULES(DBUSMENUTESTS, json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
40+
[have_tests=yes]
41+
)
42+
PKG_CHECK_MODULES(DBUSMENUTESTSVALGRIND, valgrind, have_valgrind=yes, have_valgrind=no)
43+
-AM_CONDITIONAL([HAVE_VALGRIND], [test "x$have_valgrind" = "xyes"])
44+
])
45+
+AM_CONDITIONAL([HAVE_VALGRIND], [test "x$have_valgrind" = "xyes"])
46+
47+
AC_SUBST(DBUSMENUTESTS_CFLAGS)
48+
AC_SUBST(DBUSMENUTESTS_LIBS)
49+
--
50+
2.46.2
51+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 8a09e6ad33c58c017c0c8fd756da036fc39428ea Mon Sep 17 00:00:00 2001
2+
From: Alexander Koskovich <akoskovich@pm.me>
3+
Date: Sun, 29 Sep 2024 13:47:54 -0400
4+
Subject: [PATCH 1/1] Make introspection configurable
5+
6+
---
7+
CMakeLists.txt | 1 +
8+
src/CMakeLists.txt | 4 ++++
9+
2 files changed, 5 insertions(+)
10+
11+
diff --git a/CMakeLists.txt b/CMakeLists.txt
12+
index 0e13fcd..f3e9ec0 100644
13+
--- a/CMakeLists.txt
14+
+++ b/CMakeLists.txt
15+
@@ -12,6 +12,7 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
16+
option(ENABLE_TESTS "Enable all tests and checks" OFF)
17+
option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and checks)" OFF)
18+
option(ENABLE_WERROR "Treat all build warnings as errors" OFF)
19+
+option(ENABLE_INTROSPECTION "Enable introspection" ON)
20+
21+
if(ENABLE_COVERAGE)
22+
set(ENABLE_TESTS ON)
23+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
24+
index 5b3638d..aca9481 100644
25+
--- a/src/CMakeLists.txt
26+
+++ b/src/CMakeLists.txt
27+
@@ -108,6 +108,8 @@ install(TARGETS "ayatana-ido3-0.4" LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIB
28+
29+
# AyatanaIdo3-0.4.gir
30+
31+
+if (ENABLE_INTROSPECTION)
32+
+
33+
find_package(GObjectIntrospection REQUIRED QUIET)
34+
35+
if (INTROSPECTION_FOUND)
36+
@@ -183,3 +185,5 @@ if (INTROSPECTION_FOUND)
37+
endif ()
38+
39+
endif ()
40+
+
41+
+endif ()
42+
--
43+
2.46.2
44+
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
{
2+
"name": "libayatana-appindicator",
3+
"buildsystem": "cmake-ninja",
4+
"cleanup": [
5+
"/include",
6+
"/lib/pkgconfig"
7+
],
8+
"config-opts": [
9+
"-DENABLE_BINDINGS_MONO=NO",
10+
"-DENABLE_BINDINGS_VALA=NO",
11+
"-DENABLE_GTKDOC=NO",
12+
"-DCMAKE_INSTALL_LIBDIR=lib"
13+
],
14+
"modules": [
15+
"../intltool/intltool-0.51.json",
16+
{
17+
"name": "libdbusmenu",
18+
"buildsystem": "autotools",
19+
"build-options": {
20+
"cflags": "-Wno-error"
21+
},
22+
"cleanup": [
23+
"*.la",
24+
"/include",
25+
"/lib/pkgconfig",
26+
"/libexec",
27+
"/share/doc",
28+
"/share/gtk-doc"
29+
],
30+
"config-opts": [
31+
"--with-gtk=3",
32+
"--disable-dumper",
33+
"--disable-static",
34+
"--disable-tests",
35+
"--disable-gtk-doc",
36+
"--enable-introspection=no",
37+
"--disable-vala"
38+
],
39+
"sources": [
40+
{
41+
"type": "archive",
42+
"url": "https://launchpad.net/libdbusmenu/16.04/16.04.0/+download/libdbusmenu-16.04.0.tar.gz",
43+
"mirror-urls": [
44+
"https://sources.suse.com/SUSE:SLFO:Main:Build/libdbusmenu/a5b3e4717f09f90f9cd5568a5f933e8d/libdbusmenu-16.04.0.tar.gz",
45+
"https://mirror.math.princeton.edu/pub/frugalware/frugalware-2.1/source/xlib/libdbusmenu/libdbusmenu-16.04.0.tar.gz",
46+
"https://ftp.fr.openbsd.org/pub/OpenBSD/distfiles/libdbusmenu-16.04.0.tar.gz"
47+
],
48+
"sha256": "b9cc4a2acd74509435892823607d966d424bd9ad5d0b00938f27240a1bfa878a"
49+
},
50+
{
51+
"type": "patch",
52+
"paths": [
53+
"0001-Fix-HAVE_VALGRIND-AM_CONDITIONAL.patch"
54+
]
55+
}
56+
]
57+
},
58+
{
59+
"name": "ayatana-ido",
60+
"buildsystem": "cmake-ninja",
61+
"cleanup": [
62+
"/include",
63+
"/lib/pkgconfig"
64+
],
65+
"config-opts": [
66+
"-DENABLE_INTROSPECTION=OFF",
67+
"-DCMAKE_INSTALL_LIBDIR=lib"
68+
],
69+
"sources": [
70+
{
71+
"type": "git",
72+
"url": "https://github.com/AyatanaIndicators/ayatana-ido.git",
73+
"tag": "0.10.4",
74+
"commit": "f968079b09e2310fefc3fc307359025f1c74b3eb",
75+
"x-checker-data": {
76+
"type": "git",
77+
"tag-pattern": "^([\\d.]+)$"
78+
}
79+
},
80+
{
81+
"type": "patch",
82+
"paths": [
83+
"0001-Make-introspection-configurable.patch"
84+
]
85+
}
86+
]
87+
},
88+
{
89+
"name": "libayatana-indicator",
90+
"buildsystem": "cmake-ninja",
91+
"config-opts": [
92+
"-DCMAKE_INSTALL_LIBDIR=lib"
93+
],
94+
"cleanup": [
95+
"/include",
96+
"/lib/pkgconfig",
97+
"/libexec",
98+
"/share"
99+
],
100+
"sources": [
101+
{
102+
"type": "git",
103+
"url": "https://github.com/AyatanaIndicators/libayatana-indicator.git",
104+
"tag": "0.9.4",
105+
"commit": "611bb384b73fa6311777ba4c41381a06f5b99dad",
106+
"x-checker-data": {
107+
"type": "git",
108+
"tag-pattern": "^([\\d.]+)$"
109+
}
110+
}
111+
]
112+
}
113+
],
114+
"sources": [
115+
{
116+
"type": "git",
117+
"url": "https://github.com/AyatanaIndicators/libayatana-appindicator.git",
118+
"tag": "0.5.94",
119+
"commit": "31e8bb083b307e1cc96af4874a94707727bd1e79",
120+
"x-checker-data": {
121+
"type": "git",
122+
"tag-pattern": "^([\\d.]+)$"
123+
}
124+
}
125+
]
126+
}

packaging/flatpak/shared-modules

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)