From 868a03004e32600e991f6d14452ff749f351646e Mon Sep 17 00:00:00 2001 From: Tautvydas Date: Mon, 2 Feb 2026 11:31:09 +0200 Subject: [PATCH] Revert "drop xorg-libinput.pc" Apperently we cannot do this, because there are software which uses xorg-libinput.pc in build system: * KDE plasma-desktop uses for libinput-properties.h header detection * LXQT uses for libinput-properties.h Closes: https://github.com/X11Libre/xf86-input-libinput/issues/25 Signed-off-by: Tautvis --- Makefile.am | 3 +++ configure.ac | 2 +- meson.build | 13 +++++++++++++ xorg-libinput.pc.in | 6 ++++++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 xorg-libinput.pc.in diff --git a/Makefile.am b/Makefile.am index 81c68e2..cdcc414 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,6 +27,9 @@ DISTCHECK_CONFIGURE_FLAGS = --with-xorg-module-dir='$${libdir}/xorg/modules' \ SUBDIRS = src include man test MAINTAINERCLEANFILES = ChangeLog INSTALL +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xorg-libinput.pc + dist_xorgconf_DATA = conf/40-libinput.conf .PHONY: ChangeLog INSTALL diff --git a/configure.ac b/configure.ac index 3f5c143..46a210b 100644 --- a/configure.ac +++ b/configure.ac @@ -153,5 +153,5 @@ AC_CONFIG_FILES([Makefile src/Makefile man/Makefile test/Makefile - ]) + xorg-libinput.pc]) AC_OUTPUT diff --git a/meson.build b/meson.build index 6d06e82..674ff1b 100644 --- a/meson.build +++ b/meson.build @@ -5,6 +5,7 @@ project('xf86-input-libinput', 'c', driver_version = meson.project_version().split('.') +dir_pkgconf = get_option('prefix') / get_option('libdir') / 'pkgconfig' dir_man4 = get_option('prefix') / get_option('mandir') / 'man4' cc = meson.get_compiler('c') @@ -123,6 +124,18 @@ test_draglock = executable('test-draglock', install: false) test('test-draglock', test_draglock) + +conf_pkgconf = configuration_data() +conf_pkgconf.set('PACKAGE_VERSION', meson.project_version()) +conf_pkgconf.set('sdkdir', dir_headers) + +configure_file( + input: 'xorg-libinput.pc.in', + output: 'xorg-libinput.pc', + configuration: conf_pkgconf, + install_dir: dir_pkgconf, +) + config_man = configuration_data() config_man.set('VERSION', '@0@ @1@'.format(meson.project_name(), meson.project_version())) diff --git a/xorg-libinput.pc.in b/xorg-libinput.pc.in new file mode 100644 index 0000000..ff98189 --- /dev/null +++ b/xorg-libinput.pc.in @@ -0,0 +1,6 @@ +sdkdir=@sdkdir@ + +Name: xorg-libinput +Description: X.Org libinput input driver. +Version: @PACKAGE_VERSION@ +Cflags: -I${sdkdir}