1*4882a593SmuzhiyunFrom 231a35e99fee8aba23f18cce21dfb5fa8bef0c36 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: "Yann E. MORIN" <yann.morin.1998@free.fr>
3*4882a593SmuzhiyunDate: Sun, 23 Oct 2016 23:07:33 +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          | 1 -
16*4882a593Smuzhiyun configure.ac         | 9 ---------
17*4882a593Smuzhiyun include/Makefile.am  | 4 +++-
18*4882a593Smuzhiyun xorg-synaptics.pc.in | 5 +++--
19*4882a593Smuzhiyun 4 files changed, 6 insertions(+), 13 deletions(-)
20*4882a593Smuzhiyun
21*4882a593Smuzhiyundiff --git a/Makefile.am b/Makefile.am
22*4882a593Smuzhiyunindex 678124c..c48c5c8 100644
23*4882a593Smuzhiyun--- a/Makefile.am
24*4882a593Smuzhiyun+++ b/Makefile.am
25*4882a593Smuzhiyun@@ -21,7 +21,6 @@
26*4882a593Smuzhiyun # During distcheck, system locations (as provided by pkg-config) may
27*4882a593Smuzhiyun # not be writable; provide instead relative locations.
28*4882a593Smuzhiyun DISTCHECK_CONFIGURE_FLAGS = \
29*4882a593Smuzhiyun-	--with-sdkdir='$${includedir}/xorg' \
30*4882a593Smuzhiyun 	--with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d'
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun SUBDIRS = include src man tools conf
33*4882a593Smuzhiyundiff --git a/configure.ac b/configure.ac
34*4882a593Smuzhiyunindex 970dd5f..574353b 100644
35*4882a593Smuzhiyun--- a/configure.ac
36*4882a593Smuzhiyun+++ b/configure.ac
37*4882a593Smuzhiyun@@ -55,11 +55,6 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
38*4882a593Smuzhiyun # Obtain compiler/linker options for the Synaptics driver dependencies
39*4882a593Smuzhiyun PKG_CHECK_MODULES(XORG, [inputproto >= 2.1.99.3] [xorg-server >= 1.12] xproto inputproto $REQUIRED_MODULES)
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun-# X Server SDK location is required to install Synaptics header files
42*4882a593Smuzhiyun-# This location is also relayed in the xorg-synaptics.pc file
43*4882a593Smuzhiyun-sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
44*4882a593Smuzhiyun-AC_SUBST([sdkdir])
45*4882a593Smuzhiyun-
46*4882a593Smuzhiyun # -----------------------------------------------------------------------------
47*4882a593Smuzhiyun #			Configuration options
48*4882a593Smuzhiyun # -----------------------------------------------------------------------------
49*4882a593Smuzhiyun@@ -154,10 +149,6 @@ if test "x$have_libxtst" = "xyes" ; then
50*4882a593Smuzhiyun fi
51*4882a593Smuzhiyun # -----------------------------------------------------------------------------
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun-# Workaround overriding sdkdir to be able to create a tarball when user has no
54*4882a593Smuzhiyun-# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am
55*4882a593Smuzhiyun-AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
56*4882a593Smuzhiyun-
57*4882a593Smuzhiyun AC_CONFIG_FILES([Makefile
58*4882a593Smuzhiyun                 src/Makefile
59*4882a593Smuzhiyun                 man/Makefile
60*4882a593Smuzhiyundiff --git a/include/Makefile.am b/include/Makefile.am
61*4882a593Smuzhiyunindex 8234020..565868b 100644
62*4882a593Smuzhiyun--- a/include/Makefile.am
63*4882a593Smuzhiyun+++ b/include/Makefile.am
64*4882a593Smuzhiyun@@ -18,4 +18,6 @@
65*4882a593Smuzhiyun #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
66*4882a593Smuzhiyun #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun-sdk_HEADERS = synaptics-properties.h
69*4882a593Smuzhiyun+# Location formerly known as 'sdkdir'
70*4882a593Smuzhiyun+xorgincludedir = $(includedir)/xorg
71*4882a593Smuzhiyun+xorginclude_HEADERS = synaptics-properties.h
72*4882a593Smuzhiyundiff --git a/xorg-synaptics.pc.in b/xorg-synaptics.pc.in
73*4882a593Smuzhiyunindex 159cfbf..68e0fbe 100644
74*4882a593Smuzhiyun--- a/xorg-synaptics.pc.in
75*4882a593Smuzhiyun+++ b/xorg-synaptics.pc.in
76*4882a593Smuzhiyun@@ -1,6 +1,7 @@
77*4882a593Smuzhiyun-sdkdir=@sdkdir@
78*4882a593Smuzhiyun+prefix=@prefix@
79*4882a593Smuzhiyun+includedir=@includedir@
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun Name: synaptics
82*4882a593Smuzhiyun Description: X.Org synaptics input driver.
83*4882a593Smuzhiyun Version: @PACKAGE_VERSION@
84*4882a593Smuzhiyun-Cflags: -I${sdkdir}
85*4882a593Smuzhiyun+Cflags: -I${includedir}/xorg
86*4882a593Smuzhiyun--
87*4882a593Smuzhiyun2.7.4
88*4882a593Smuzhiyun
89