1*4882a593SmuzhiyunFrom aef3d9bca4d77db833f71d50b1c84b16c69d7deb Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: "Yann E. MORIN" <yann.morin.1998@free.fr>
3*4882a593SmuzhiyunDate: Sun, 23 Oct 2016 22:53:21 +0200
4*4882a593SmuzhiyunSubject: [PATCH] build: get rid of sdkdir
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunUse of sdkdir causes problems during cross-compilation, where the full
7*4882a593Smuzhiyunpath is then appended to the DESTDIR, leading to host paths being
8*4882a593Smuzhiyunappended in the target:
9*4882a593Smuzhiyun    https://bugs.busybox.net/show_bug.cgi?id=8696
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunOther drivers (e.g. keyboard) got rid of sdkdir. Do the same.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunSigned-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
14*4882a593Smuzhiyun---
15*4882a593Smuzhiyun Makefile.am         |  3 ---
16*4882a593Smuzhiyun configure.ac        | 10 ----------
17*4882a593Smuzhiyun include/Makefile.am |  4 +++-
18*4882a593Smuzhiyun xorg-mouse.pc.in    |  3 +--
19*4882a593Smuzhiyun 4 files changed, 4 insertions(+), 16 deletions(-)
20*4882a593Smuzhiyun
21*4882a593Smuzhiyundiff --git a/Makefile.am b/Makefile.am
22*4882a593Smuzhiyunindex 7142485..efe66cb 100644
23*4882a593Smuzhiyun--- a/Makefile.am
24*4882a593Smuzhiyun+++ b/Makefile.am
25*4882a593Smuzhiyun@@ -34,9 +34,6 @@ ChangeLog:
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun dist-hook: ChangeLog INSTALL
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun-# Provide an sdk location that is writable by this module
30*4882a593Smuzhiyun-DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg'
31*4882a593Smuzhiyun-
32*4882a593Smuzhiyun if LINT
33*4882a593Smuzhiyun # Check source code with tools like lint & sparse
34*4882a593Smuzhiyun lint:
35*4882a593Smuzhiyundiff --git a/configure.ac b/configure.ac
36*4882a593Smuzhiyunindex 15d9047..515681d 100644
37*4882a593Smuzhiyun--- a/configure.ac
38*4882a593Smuzhiyun+++ b/configure.ac
39*4882a593Smuzhiyun@@ -60,16 +60,6 @@ AC_ARG_WITH(xorg-module-dir,
40*4882a593Smuzhiyun inputdir=${moduledir}/input
41*4882a593Smuzhiyun AC_SUBST(inputdir)
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun-# X Server SDK location is required to install xf86-mouse-properties.h
44*4882a593Smuzhiyun-# This location is also relayed in the xorg-mouse.pc file
45*4882a593Smuzhiyun-sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
46*4882a593Smuzhiyun-
47*4882a593Smuzhiyun-# Workaround overriding sdkdir to be able to create a tarball when user has no
48*4882a593Smuzhiyun-# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am
49*4882a593Smuzhiyun-AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
50*4882a593Smuzhiyun-AC_SUBST([sdkdir])
51*4882a593Smuzhiyun-
52*4882a593Smuzhiyun-
53*4882a593Smuzhiyun # Work out which OS mouse driver we need to build
54*4882a593Smuzhiyun case $host_os in
55*4882a593Smuzhiyun   linux*)
56*4882a593Smuzhiyundiff --git a/include/Makefile.am b/include/Makefile.am
57*4882a593Smuzhiyunindex 27ce0fb..2b85e4e 100644
58*4882a593Smuzhiyun--- a/include/Makefile.am
59*4882a593Smuzhiyun+++ b/include/Makefile.am
60*4882a593Smuzhiyun@@ -1 +1,3 @@
61*4882a593Smuzhiyun-sdk_HEADERS = xf86-mouse-properties.h
62*4882a593Smuzhiyun+# Location formerly known as 'sdkdir'
63*4882a593Smuzhiyun+xorgincludedir = $(includedir)/xorg
64*4882a593Smuzhiyun+xorginclude_HEADERS = xf86-mouse-properties.h
65*4882a593Smuzhiyundiff --git a/xorg-mouse.pc.in b/xorg-mouse.pc.in
66*4882a593Smuzhiyunindex 57df596..8355e61 100644
67*4882a593Smuzhiyun--- a/xorg-mouse.pc.in
68*4882a593Smuzhiyun+++ b/xorg-mouse.pc.in
69*4882a593Smuzhiyun@@ -1,6 +1,7 @@ prefix=@prefix@
70*4882a593Smuzhiyun-sdkdir=@sdkdir@
71*4882a593Smuzhiyun+prefix=@prefix@
72*4882a593Smuzhiyun+includedir=@includedir@
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun Name: xorg-mouse
75*4882a593Smuzhiyun Description: X.Org mouse input driver for non-evdev OS'es
76*4882a593Smuzhiyun Version: @PACKAGE_VERSION@
77*4882a593Smuzhiyun-Cflags: -I${sdkdir}
78*4882a593Smuzhiyun+Cflags: -I${includedir}/xorg
79*4882a593Smuzhiyun--
80*4882a593Smuzhiyun2.7.4
81*4882a593Smuzhiyun
82