2016-08-09 10:25:22 +10:00
|
|
|
/**
|
|
|
|
|
@page building_libinput libinput build instructions
|
|
|
|
|
|
2017-03-08 14:36:56 +10:00
|
|
|
@tableofcontents
|
|
|
|
|
|
2016-08-09 10:25:22 +10:00
|
|
|
Instructions on how to build libinput and its tools and how to build against
|
|
|
|
|
libinput.
|
|
|
|
|
|
2017-03-08 14:36:56 +10:00
|
|
|
The build instruction on this page detail how to overwrite your
|
|
|
|
|
system-provided libinput with one from the git repository, see
|
|
|
|
|
see @ref reverting_install to revert to the previous state.
|
|
|
|
|
|
2016-08-09 10:25:22 +10:00
|
|
|
@section building Building libinput
|
|
|
|
|
|
2017-03-08 14:36:56 +10:00
|
|
|
libinput uses automake, a build is usually the three-step process below.
|
|
|
|
|
A successful build requires the @ref building_dependencies to be installed
|
|
|
|
|
at configure time.
|
2016-08-09 10:25:22 +10:00
|
|
|
|
|
|
|
|
@code
|
|
|
|
|
$> git clone git://anongit.freedesktop.org/git/wayland/libinput
|
|
|
|
|
$> cd libinput
|
|
|
|
|
$> ./autogen.sh --prefix=/usr --libdir=/usr/lib64
|
|
|
|
|
$> make
|
|
|
|
|
$> sudo make install
|
2017-03-08 14:36:56 +10:00
|
|
|
$> sudo udevadm hwdb --update
|
2016-08-09 10:25:22 +10:00
|
|
|
@endcode
|
|
|
|
|
|
|
|
|
|
@note On Debian-based distributions including Ubuntu and its derivatives skip the
|
|
|
|
|
```--libdir=/usr/lib64``` argument.
|
|
|
|
|
|
2017-03-08 14:36:56 +10:00
|
|
|
@subsection verifying_install Verifying the install
|
|
|
|
|
|
|
|
|
|
To verify the install worked correctly, check that libinput.so.x.x.x is in
|
|
|
|
|
the library path and that all symlinks point to the new library.
|
|
|
|
|
<pre>
|
|
|
|
|
$> ls -l /usr/lib64/libinput.*
|
|
|
|
|
-rwxr-xr-x 1 root root 946 Apr 28 2015 /usr/lib64/libinput.la
|
|
|
|
|
lrwxrwxrwx 1 root root 19 Feb 1 15:12 /usr/lib64/libinput.so -> libinput.so.10.11.2
|
|
|
|
|
lrwxrwxrwx 1 root root 19 Feb 1 15:12 /usr/lib64/libinput.so.10 -> libinput.so.10.11.2
|
|
|
|
|
-rwxr-xr-x 1 root root 204992 Feb 1 15:12 /usr/lib64/libinput.so.10.11.2
|
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
|
|
The .so installed from git master may have a lower number than the
|
|
|
|
|
system-provided one. In that case, manually adjust the symlinks to point to
|
|
|
|
|
the newly installed .so.x.x.x
|
|
|
|
|
|
|
|
|
|
@subsection reverting_install Reverting to the system-provided libinput packge
|
|
|
|
|
|
|
|
|
|
The recommended way to revert to the system install is to use the package
|
|
|
|
|
manager to reinstall the libinput package. In some cases, this may leave
|
|
|
|
|
files in the system (e.g. ```/usr/lib/libinput.la```) but these files are
|
|
|
|
|
usually harmless. To definitely remove all files, run the following command
|
|
|
|
|
from the libinput source directory:
|
|
|
|
|
|
|
|
|
|
@code
|
|
|
|
|
$> sudo make uninstall
|
|
|
|
|
# WARNING: Do not restart the computer/X/the Wayland compositor after make
|
|
|
|
|
# uninstall, reinstall the system package immediately!
|
|
|
|
|
@endcode
|
|
|
|
|
|
|
|
|
|
The following commands reinstall the current system package for libinput,
|
|
|
|
|
overwriting manually installed files.
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
<li><b>Debian/Ubuntu</b> based distributions: ```sudo apt-get install
|
|
|
|
|
--reinstall libinput```</li>
|
|
|
|
|
<li><b>Fedora 22</b> and later: ```sudo dnf reinstall libinput```</li>
|
2017-04-03 08:51:22 -06:00
|
|
|
<li><b>RHEL/CentOS/Fedora 21</b> and earlier: ```sudo yum reinstall libinput```</li>
|
|
|
|
|
<li><b>openSUSE</b>: ```sudo zypper install --force libinput10```</li>
|
2017-03-08 14:36:56 +10:00
|
|
|
<li><b>Arch</b>: ```sudo packman -S libinput```</li>
|
|
|
|
|
</ul>
|
2016-09-01 09:49:24 +10:00
|
|
|
|
|
|
|
|
@subsection building_dependencies Build dependencies
|
|
|
|
|
|
|
|
|
|
libinput has a few build-time dependencies that must be installed prior to
|
|
|
|
|
running configure. In most cases, it is sufficient to install the
|
|
|
|
|
dependencies that your distribution uses to build the libinput package.
|
|
|
|
|
These can be installed with one of the following commands:
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
<li><b>Debian/Ubuntu</b> based distributions: ```sudo apt-get build-dep
|
|
|
|
|
libinput```</li>
|
|
|
|
|
<li><b>Fedora 22</b> and later: ```sudo dnf builddep libinput```</li>
|
2017-04-03 08:51:22 -06:00
|
|
|
<li><b>RHEL/CentOS/Fedora 21</b> and earlier: ```sudo yum-builddep libinput```</li>
|
|
|
|
|
<li><b>openSUSE</b>:
|
|
|
|
|
<pre>
|
|
|
|
|
$> sudo zypper modifyrepo --enable `zypper repos | grep source | awk '{print $5}'`
|
|
|
|
|
$> sudo zypper source-install -d libinput10
|
|
|
|
|
$> sudo zypper install autoconf automake libtool
|
|
|
|
|
$> sudo zypper modifyrepo --disable `zypper repos | grep source | awk '{print $5}'`
|
|
|
|
|
</pre>
|
|
|
|
|
</li>
|
2016-09-01 09:49:24 +10:00
|
|
|
<li><b>Arch</b>:
|
|
|
|
|
<pre>
|
|
|
|
|
$> abs extra/libinput
|
|
|
|
|
$> cd $(mktemp -d)
|
|
|
|
|
$> cp /var/abs/extra/libinput/PKGBUILD .
|
|
|
|
|
$> makepkg --syncdeps --nobuild
|
|
|
|
|
</pre>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
If dependencies are missing, a message ```No package 'foo' found``` will be
|
|
|
|
|
shown during the configure stage. See
|
|
|
|
|
<a href="https://who-t.blogspot.com.au/2014/05/configure-fails-with-no-package-foo.html">this blog post here</a>.
|
|
|
|
|
for instructions on how to fix it.
|
2016-08-09 10:25:22 +10:00
|
|
|
|
|
|
|
|
@subsection building_libwacom Building without libwacom
|
|
|
|
|
|
|
|
|
|
libwacom is required by libinput's tablet code to gather additional
|
|
|
|
|
information about tablets that is not available from the kernel device
|
|
|
|
|
itself. libwacom is required by default but can be skipped when @ref
|
|
|
|
|
building with the ``--disable-libwacom`` argument.
|
|
|
|
|
|
|
|
|
|
@code
|
|
|
|
|
$> ./autogen.sh --disable-libwacom --prefix=/usr --libdir=/usr/lib64
|
|
|
|
|
@endcode
|
|
|
|
|
|
2017-03-08 14:36:56 +10:00
|
|
|
It is not recommended to disable libwacom unless libinput is used in an
|
|
|
|
|
environment where tablet support is not required. libinput provides tablet
|
|
|
|
|
support even without libwacom, but some features may be missing or working
|
|
|
|
|
differently.
|
2016-08-09 10:25:22 +10:00
|
|
|
|
2017-05-04 13:22:03 +10:00
|
|
|
@subsection buildling_event-gui Building without the graphical helper tool
|
2016-08-09 10:25:22 +10:00
|
|
|
|
|
|
|
|
Only the commandline @ref tools are installed by distributions. The
|
|
|
|
|
@ref event-gui graphical helper tools is only available in the source
|
|
|
|
|
repository.
|
|
|
|
|
|
2017-05-04 13:22:03 +10:00
|
|
|
The graphical helper tool is enabled by default but requires extra libraries
|
|
|
|
|
to build. If these libraries are not available, the build will fail.
|
|
|
|
|
If the tool is not required, use the ``--disable-event-gui`` argument
|
2017-03-08 14:36:56 +10:00
|
|
|
when @ref building.
|
2016-08-09 10:25:22 +10:00
|
|
|
|
|
|
|
|
@code
|
2017-05-04 13:22:03 +10:00
|
|
|
$> ./autogen.sh --disable-event-gui --prefix=/usr --libdir=/usr/lib64
|
2016-08-09 10:25:22 +10:00
|
|
|
@endcode
|
|
|
|
|
|
|
|
|
|
@section building_against Building against libinput
|
|
|
|
|
|
|
|
|
|
libinput provides a
|
|
|
|
|
[pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/) file.
|
|
|
|
|
Software that uses libinput should use pkg-config and the
|
|
|
|
|
`PKG_CHECK_MODULES` autoconf macro.
|
|
|
|
|
Otherwise, the most rudimentary way to compile and link a program against
|
|
|
|
|
libinput is:
|
|
|
|
|
|
|
|
|
|
gcc -o myprogram myprogram.c `pkg-config --cflags --libs libinput`
|
|
|
|
|
|
|
|
|
|
For further information on using pkgconfig see the pkg-config documentation.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|