libratbag: update to 0.9.903.

This commit is contained in:
maxice8 2018-09-04 23:39:35 -03:00
parent db10576a96
commit 16f9c5274c
No known key found for this signature in database
GPG Key ID: 543B9D4F4299F06B
3 changed files with 3 additions and 143 deletions

View File

@ -1,116 +0,0 @@
From ac384137bd56b0a4fa6c51f77015ef60eb964a97 Mon Sep 17 00:00:00 2001
From: maxice8 <30738253+maxice8@users.noreply.github.com>
Date: Thu, 16 Aug 2018 19:33:42 -0300
Subject: [PATCH] meson.build meson_options.txt: Add systemd switch (#510)
Allows systems that provide libelogind (which provides a portion of
libsystemd that libratbag uses) to also compile without having to patch
out the rest of the build to remove the full systemd dependency.
This commit:
- Adds a systemd swith on meson_options.txt, a boolean set to true as
default to keep expected behaivour
- Adds a check on meson.build for the systemd switch and adds
dep_systemd
- Guards sections meant to generate systemd service units under the
systemd switch
---
meson.build | 56 +++++++++++++++++++++++++++--------------------
meson_options.txt | 6 +++++
2 files changed, 38 insertions(+), 24 deletions(-)
--- meson.build
+++ meson.build
@@ -50,10 +50,14 @@ pkgconfig = import('pkgconfig')
dep_udev = dependency('libudev')
dep_libevdev = dependency('libevdev')
dep_libsystemd = dependency('libsystemd', version : '>=227')
-dep_systemd = dependency('systemd')
dep_glib = dependency('glib-2.0')
dep_lm = cc.find_library('m')
+enable_systemd = get_option('systemd')
+if enable_systemd
+ dep_systemd = dependency('systemd')
+endif
+
#### libutil.a ####
src_libutil = [
'src/libratbag-util.c',
@@ -437,35 +441,39 @@ configure_file(input : 'dbus/org.freedesktop.ratbag_devel1.conf.in',
configuration : config_ratbagd_devel)
#### unit file ####
-unitdir = get_option('systemd-unit-dir')
-if unitdir == ''
- libdir = get_option('libdir')
- default_unitdir = dep_systemd.get_pkgconfig_variable('systemdsystemunitdir')
- # Fedora uses lib64 but systemd is in lib. Hack around this so it
- # works out of the box.
- intended_unitdir = join_paths(get_option('prefix'), get_option('libdir'), 'systemd')
- if get_option('prefix') == '/usr' and intended_unitdir != default_unitdir
- message('''
- systemd unitdir libdir mismatch detected, changing unitdir to
- @0@
- or specify with
- mesonconf -Dsystemd-unit-dir=<path>
-
- See https://github.com/libratbag/libratbag/issues/188
- '''.format(default_unitdir))
- unitdir = default_unitdir
- else
- unitdir = intended_unitdir
+if enable_systemd
+ unitdir = get_option('systemd-unit-dir')
+ if unitdir == ''
+ libdir = get_option('libdir')
+ default_unitdir = dep_systemd.get_pkgconfig_variable('systemdsystemunitdir')
+ # Fedora uses lib64 but systemd is in lib. Hack around this so it
+ # works out of the box.
+ intended_unitdir = join_paths(get_option('prefix'), get_option('libdir'), 'systemd')
+ if get_option('prefix') == '/usr' and intended_unitdir != default_unitdir
+ message('''
+ systemd unitdir libdir mismatch detected, changing unitdir to
+ @0@
+ or specify with
+ mesonconf -Dsystemd-unit-dir=<path>
+
+ See https://github.com/libratbag/libratbag/issues/188
+ '''.format(default_unitdir))
+ unitdir = default_unitdir
+ else
+ unitdir = intended_unitdir
+ endif
endif
endif
config_bindir = configuration_data()
config_bindir.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
-configure_file(input : 'ratbagd/ratbagd.service.in',
- output : 'ratbagd.service',
- configuration : config_bindir,
- install_dir : unitdir)
+if enable_systemd
+ configure_file(input : 'ratbagd/ratbagd.service.in',
+ output : 'ratbagd.service',
+ configuration : config_bindir,
+ install_dir : unitdir)
+endif
dbusdir = get_option('dbus-root-dir')
if dbusdir == ''
--- meson_options.txt
+++ meson_options.txt
@@ -27,3 +27,9 @@ option('dbus-group',
type: 'string',
value : '',
description : 'The UNIX group that is granted access to the ratbagd D-Bus service. By default all users may access it.')
+
+option('systemd',
+ type : 'boolean',
+ value : true,
+ description : 'Build systemd unit files'
+)

View File

@ -1,24 +0,0 @@
Source: maxice8
Upstream: https://github.com/libratbag/libratbag/pull/507
Reason: fixes errors of PATH_MAX being undeclared due to limits.h not being included
--- src/libratbag-data.c
+++ src/libratbag-data.c
@@ -28,6 +28,7 @@
#include <assert.h>
#include <stdlib.h>
#include <glib.h>
+#include <limits.h>
#include "libratbag.h"
#include "libratbag-private.h"
--- tools/lur-command.c
+++ tools/lur-command.c
@@ -31,6 +31,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
+#include <limits.h>
#include <liblur.h>
#include <libratbag-util.h>

View File

@ -1,9 +1,9 @@
# Template file for 'libratbag' # Template file for 'libratbag'
pkgname=libratbag pkgname=libratbag
version=0.9.902 version=0.9.903
revision=1 revision=1
build_style=meson build_style=meson
configure_args="-Denable-tests=false -Dsystemd-unit-dir='' configure_args="-Dtests=false -Dsystemd-unit-dir=''
-Dsystemd=false" -Dsystemd=false"
hostmakedepends="pkg-config git swig" hostmakedepends="pkg-config git swig"
makedepends="elogind-devel eudev-libudev-devel libglib-devel libevdev-devel makedepends="elogind-devel eudev-libudev-devel libglib-devel libevdev-devel
@ -14,7 +14,7 @@ maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="MIT" license="MIT"
homepage="https://github.com/libratbag/libratbag" homepage="https://github.com/libratbag/libratbag"
distfiles="https://github.com/libratbag/libratbag/archive/v${version}.tar.gz" distfiles="https://github.com/libratbag/libratbag/archive/v${version}.tar.gz"
checksum=01c0dac6b8cd997c3bec84a51c0a86fc8727e3a20635bf7e2c5e0f0b8c5df34c checksum=7d29ff79700a8dbd7bba257f4d86d281808d2f1005799eb0653231df3590f6c5
if [ "$CROSS_BUILD" ]; then if [ "$CROSS_BUILD" ]; then
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in