diff options
author | Erwin Kaats <mailgentoo@kaats.ch> | 2024-05-11 20:42:41 +0200 |
---|---|---|
committer | Erwin Kaats <mailgentoo@kaats.ch> | 2024-05-11 20:42:41 +0200 |
commit | b3679440310877c861685630fb986c35e2171653 (patch) | |
tree | 51a8eda50e7383980b1f8c59bf642f33fafcbde7 /gnome-extra | |
parent | app-laptop/framework_tool: Add 0.1.0_p20240511 (diff) | |
download | guru-b3679440310877c861685630fb986c35e2171653.tar.gz guru-b3679440310877c861685630fb986c35e2171653.tar.bz2 guru-b3679440310877c861685630fb986c35e2171653.zip |
gnome-extra/iio-sensor-proxy: support OpenRC
BUG: https://bugs.gentoo.org/930153
Signed-off-by: Erwin Kaats <mailgentoo@kaats.ch>
Diffstat (limited to 'gnome-extra')
-rwxr-xr-x | gnome-extra/iio-sensor-proxy/files/iio-sensor-proxy | 9 | ||||
-rw-r--r-- | gnome-extra/iio-sensor-proxy/files/no-systemd.patch | 32 | ||||
-rw-r--r-- | gnome-extra/iio-sensor-proxy/iio-sensor-proxy-3.5.ebuild | 13 |
3 files changed, 53 insertions, 1 deletions
diff --git a/gnome-extra/iio-sensor-proxy/files/iio-sensor-proxy b/gnome-extra/iio-sensor-proxy/files/iio-sensor-proxy new file mode 100755 index 000000000..b32f9b76f --- /dev/null +++ b/gnome-extra/iio-sensor-proxy/files/iio-sensor-proxy @@ -0,0 +1,9 @@ +#!/sbin/openrc-run + +command=/usr/libexec/iio-sensor-proxy +command_background=yes +pidfile=/run/iio-sensor-proxy.pid + +depend() { + need dbus localmount +} diff --git a/gnome-extra/iio-sensor-proxy/files/no-systemd.patch b/gnome-extra/iio-sensor-proxy/files/no-systemd.patch new file mode 100644 index 000000000..ff533f8b4 --- /dev/null +++ b/gnome-extra/iio-sensor-proxy/files/no-systemd.patch @@ -0,0 +1,32 @@ +--- iio-sensor-proxy-${PV}/meson.build ++++ iio-sensor-proxy-${PV}/meson.build +@@ -34,11 +34,7 @@ + udev_dep = dependency('udev') + udev_rules_dir = udev_dep.get_pkgconfig_variable('udevdir') + '/rules.d' + endif +-systemd_system_unit_dir = get_option('systemdsystemunitdir') +-if systemd_system_unit_dir == 'auto' +- systemd_dep = dependency('systemd') +- systemd_system_unit_dir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir') +-endif ++systemd_system_unit_dir = '/lib/systemd/system' + if get_option('gtk-tests') + gtk_dep = dependency('gtk+-3.0', required: false) + endif + +--- iio-sensor-proxy-${PV}/data/meson.build ++++ iio-sensor-proxy-${PV}/data/meson.build +@@ -8,13 +8,6 @@ + data_conf.set('geoclue_user', get_option('geoclue-user')) + + configure_file( +- input: 'iio-sensor-proxy.service.in', +- output: 'iio-sensor-proxy.service', +- configuration: data_conf, +- install_dir: systemd_system_unit_dir, +-) +- +-configure_file( + input: 'net.hadess.SensorProxy.conf.in', + output: 'net.hadess.SensorProxy.conf', + configuration: data_conf, diff --git a/gnome-extra/iio-sensor-proxy/iio-sensor-proxy-3.5.ebuild b/gnome-extra/iio-sensor-proxy/iio-sensor-proxy-3.5.ebuild index 7285b570a..8a766c811 100644 --- a/gnome-extra/iio-sensor-proxy/iio-sensor-proxy-3.5.ebuild +++ b/gnome-extra/iio-sensor-proxy/iio-sensor-proxy-3.5.ebuild @@ -12,7 +12,7 @@ SRC_URI="https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/archive/${PV}/ LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~arm64" -IUSE="+systemd" +IUSE="systemd" RDEPEND=" dev-libs/glib:* @@ -32,8 +32,19 @@ DEPEND=" virtual/pkgconfig " +src_prepare() { + if use !systemd ; then + echo "patching out systemd" + # patch out call of systemd directory + eapply "${FILESDIR}/no-systemd.patch" + # eapply "${FILESDIR}/open_rc_service.patch" + fi + eapply_user +} + src_install() { meson_src_install + doinitd ${FILESDIR}/iio-sensor-proxy } pkg_postinst() { |