Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmaports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
postmarketOS
pmaports
Commits
bf2ecd81
Commit
bf2ecd81
authored
4 years ago
by
Dylan Van Assche
Browse files
Options
Downloads
Patches
Plain Diff
Upgrade to 0_git20201114
parent
15a07ac7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
temp/feedbackd/0001-fbd-feedback-manager-Allow-device-specific-feedbackd.patch
+69
-0
69 additions, 0 deletions
...bd-feedback-manager-Allow-device-specific-feedbackd.patch
temp/feedbackd/APKBUILD
+35
-0
35 additions, 0 deletions
temp/feedbackd/APKBUILD
with
104 additions
and
0 deletions
temp/feedbackd/0001-fbd-feedback-manager-Allow-device-specific-feedbackd.patch
0 → 100644
+
69
−
0
View file @
bf2ecd81
From 8452b7739885918d640a69aca9babc3f09554c57 Mon Sep 17 00:00:00 2001
From: Dylan Van Assche <dylan.vanassche@ugent.be>
Date: Sat, 28 Nov 2020 08:20:32 +0100
Subject: [PATCH] fbd-feedback-manager: Allow device-specific feedbackd themes
---
src/fbd-feedback-manager.c | 39 ++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/src/fbd-feedback-manager.c b/src/fbd-feedback-manager.c
index ef508c7..9b91c38 100644
--- a/src/fbd-feedback-manager.c
+++ b/src/fbd-feedback-manager.c
@@ -25,6 +25,8 @@
#define APP_SCHEMA FEEDBACKD_SCHEMA_ID ".application"
#define APP_PREFIX "/org/sigxcpu/feedbackd/application/"
+#define DEVICE_TREE_PATH "/proc/device-tree/compatible"
+
/**
* SECTION:fbd-feedback-manager
@@ -380,6 +382,43 @@
fbd_feedback_manager_constructed (GObject *object)
G_CALLBACK (on_feedbackd_setting_changed), self);
}
+static gboolean
+find_config (gchar *themefile) {
+ gboolean success = FALSE;
+ gchar **device_name = NULL;
+ GError **error = NULL;
+
+ // Try to read the device name
+ if (g_file_test(DEVICE_TREE_PATH, (G_FILE_TEST_EXISTS & G_FILE_TEST_IS_REGULAR))) {
+ g_debug("Found device tree device name path");
+ success = g_file_get_contents (DEVICE_TREE_PATH, device_name, NULL, NULL);
+
+ // Check if feedbackd has a proper config available this device
+ if (success) {
+ g_debug("Read device name: %s", device_name);
+ config_path = g_strconcat(FEEDBACKD_THEME_DIR, device_name, "/default.json");
+ if (g_file_test(config_path, (G_FILE_TEST_EXISTS & G_FILE_TEST_IS_REGULAR))) {
+ g_info("Setting themefile to %s", config_path);
+ themefile = config_path;
+ }
+ else {
+ g_warning("No feedbackd theme available for %s, falling back to default", device_name);
+ success = FALSE;
+ }
+ }
+ else {
+ g_warning("Unable to read device name from device tree");
+ success = FALSE;
+ }
+ }
+
+ if (device_name != NULL) {
+ g_free(device_name);
+ }
+
+ return success;
+}
+
static void
fbd_feedback_manager_dispose (GObject *object)
{
--
2.25.1
This diff is collapsed.
Click to expand it.
temp/feedbackd/APKBUILD
0 → 100644
+
35
−
0
View file @
bf2ecd81
# Forked from Alpine to provide a newer version
pkgname
=
feedbackd
pkgver
=
0_git20201114
pkgrel
=
0
pkgdesc
=
"A daemon to provide haptic (and later more) feedback on events"
url
=
"https://source.puri.sm/Librem5/feedbackd"
arch
=
"all"
license
=
"GPL-3.0-or-later"
depends
=
"dbus"
makedepends
=
"meson glib-dev gsound-dev libgudev-dev json-glib-dev gtk-doc
vala gobject-introspection-dev"
subpackages
=
"
$pkgname
-dev"
source
=
"https://source.puri.sm/Librem5/feedbackd/-/archive/v0.0.0+
${
pkgver
#0_
}
/feedbackd-v0.0.0+
${
pkgver
#0_
}
.tar.gz"
builddir
=
"
$srcdir
/
$pkgname
-v0.0.0+
${
pkgver
#0_
}
"
options
=
"!check"
# Tests fail in QEMU
build
()
{
abuild-meson
\
-Dgtk_doc
=
false
\
.
output
meson compile
${
JOBS
:+-j
${
JOBS
}}
-C
output
}
check
()
{
meson
test
--no-rebuild
-v
-C
output
}
package
()
{
DESTDIR
=
"
$pkgdir
"
meson
install
--no-rebuild
-C
output
install
-Dm644
"
$builddir
"
/debian/feedbackd.udev
\
"
$pkgdir
"
/usr/lib/udev/rules.d/90-feedbackd.rules
}
sha512sums
=
"2a3e443c5f565dce7cdc25ade73934b5ab29c9efc6ceaa2d404111bfcd67fbc9b02893fc34559c8071aaba218686f2ba8109b2fd92a74e9f16955406ed6af6f6 feedbackd-v0.0.0+git20200726.tar.gz"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment