View previous topic :: View next topic |
Author |
Message |
rytir n00b
Joined: 04 Jan 2025 Posts: 2
|
Posted: Sat Jan 04, 2025 6:34 am Post subject: Installing keyman software in Gentoo -- systemd dependency |
|
|
Keyman is a nice piece of software designed to type in non-latin alphabets with a plenty of keyboard definitions and usable with ibus.
Originally written for Windows user, it has has been made open source and expanded to include Linux users.
https://github.com/keymanapp/keyman/blob/master/docs/linux/README.md
https://github.com/keymanapp/keyman
But the Linux support seems to be limited to Debian or other systemd-based OS.
In openrc system the source code fails to get configured, complaining of missing libsystemd.
The dependency is declared in:
Code: | /usr/bin/pkg-config --modversion libsystemd |
Is it generally possible to avoid the systemd dependency, for example by using openrc?
Thank you for your suggestions.
Jaroslav, Prague
The relevant part of the log file:
Code: | Called: `/usr/bin/pkg-config --modversion libsystemd` -> 1
stderr:
Package libsystemd was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsystemd.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libsystemd' not found |
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31398 Location: here
|
Posted: Sat Jan 04, 2025 6:50 am Post subject: |
|
|
If systemd is used only for start a deamon you can convert a systemd unit in a openrc service script.
In this case since it is looking for the libsystemd library I assume that some function of systemd is used in the code, so you should patch in the code not to use this library.
-- edit --
The program seems to use systemd/sd-bus.h this library is provided by sys-auth/elogind for a OpenRC system. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1779 Location: South America
|
Posted: Sat Jan 04, 2025 1:23 pm Post subject: |
|
|
Try this patch (for release 17.0.332)
keyman-patch
Code: | --- orig/linux/keyman-system-service/meson.build 2025-01-04 10:10:29.014297487 -0300
+++ patched/linux/keyman-system-service/meson.build 2025-01-04 10:10:48.444007927 -0300
@@ -4,7 +4,7 @@
meson_version: '>=0.61')
evdev = dependency('libevdev', version: '>= 1.9')
-systemd = dependency('libsystemd')
+systemd = dependency('libelogind')
subdir('resources')
subdir('src')
--- orig/linux/ibus-keyman/meson.build 2025-01-04 10:12:47.698608133 -0300
+++ patched/linux/ibus-keyman/meson.build 2025-01-04 10:13:06.362936056 -0300
@@ -8,7 +8,7 @@
ibus = dependency('ibus-1.0', version: '>= 1.2.0')
gtk = dependency('gtk+-3.0', version: '>= 2.4')
json_glib = dependency('json-glib-1.0', version: '>= 1.0')
-systemd = dependency('libsystemd')
+systemd = dependency('libelogind')
icu = dependency('icu-i18n')
core_dir = meson.current_source_dir() / '../../core'
--- orig/linux/keyman-system-service/resources/com.keyman.SystemService1.service 2025-01-04 10:11:07.330446856 -0300
+++ patched/linux/keyman-system-service/resources/com.keyman.SystemService1.service 2025-01-04 10:12:21.417473536 -0300
@@ -2,6 +2,6 @@
[D-BUS Service]
Name=com.keyman.SystemService1
-Exec=/bin/false
+Exec=/usr/libexec/keyman-system-service
User=root
-SystemdService=systemd-keyman.service
+#SystemdService=systemd-keyman.service
|
And install sys-auth/elogind (replacing the functionality that the package wants from systemd) in addition to the other dependencies.
Be careful to preserve TAB characters if you copy and paste from the forum post. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
rytir n00b
Joined: 04 Jan 2025 Posts: 2
|
Posted: Tue Jan 07, 2025 6:20 am Post subject: Installing keyman software in Gentoo -- systemd dependency |
|
|
Thank you for your quick and helpful replies. The patch works great, I only needed to supply some packages to complete the configure and make processes.
So this is what I did:
1. Installing dependencies using Portage (binaryen is not included in Gentoo repository, but can be found in cg overlay):
Code: | ...in /etc/portage/repos.conf/eselect-repo.conf
[cg]
location = /var/db/repos/cg
sync-type = git
sync-uri = https://github.com/brothermechanic/cg.git
auto-sync = yes
...in /etc/portage/package.accept_keywords
dev-util/binaryen ~amd64
...in terminal:
sudo eix-sync
sudo eix-update
sudo emerge --oneshot -kuaq dev-util/binaryen net-libs/nodejs sys-auth/elogind
sudo emerge --oneshot -kuaq dev-python/requests-cache dev-python/dbus-python dev-python/python-magic dev-python/fonttools dev-libs/libdbusmenu app-i18n/unicode-data app-i18n/ibus
|
2. The last dependency needed is emscripten, which I installed from the source code:
Code: | cd ~
git clone https://github.com/emscripten-core/emsdk.git
mv emsdk .emsdk
cd ~/.emsdk
./emsdk install latest
./emsdk activate latest
...in ~/.bashrc
export EMSCRIPTEN_BASE="$HOME/.emsdk/upstream/emscripten"
export KEYMAN_USE_EMSDK=1
|
3. Cloning and patching keyman:
Code: | ...in terminal:
git clone https://github.com/keymanapp/keyman.git
cd keyman
...in linux/keyman-system-service/meson.build
-systemd = dependency('libsystemd')
+systemd = dependency('libelogind')
...in keyman/linux/ibus-keyman/meson.build
-systemd = dependency('libsystemd')
+systemd = dependency('libelogind')
...in linux/keyman-system-service/resources/com.keyman.SystemService1.service
-Exec=/bin/false
+Exec=/usr/libexec/keyman-system-service
User=root
-SystemdService=systemd-keyman.service
+#SystemdService=systemd-keyman.service
|
4. Configuring and building core and linux keyman:
Code: | bash core/build.sh configure
bash core/build.sh build
bash linux/build.sh configure
bash linux/build.sh build
|
The keyman installation can be completed by
Code: | sudo bash core/build.sh install
|
but at the risk of messing up the Portage tree.
A more preferable option seems to be either a user-only installation of ibus plus keyman, or a standard ebuild package.
After I get that far, I will share again. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|