File 0001-libusbgx-Fix-out-of-tree-compilation.patch of Package libusbgx

From dccb4f19a654b2832293dbfc15343be238d1b657 Mon Sep 17 00:00:00 2001
From: "ing. Federico Fuga" <fuga@studiofuga.com>
Date: Mon, 12 Mar 2018 15:34:24 +0100
Subject: [PATCH 1/4] libusbgx: Fix out of tree compilation

With the current 0.2.0 (999a6e5) the library can't be compiled
out ofthe tree:

libtool: compile:  gcc -DPACKAGE_NAME=\"libusbgx\" -DPACKAGE_TARNAME=\"libusbgx\" -DPACKAGE_VERSION=\"0.2.0\" "-DPACKAGE_STRING=\"libusbgx 0.2.0\"" -DPACKAGE_BUGREPORT=\"k.opasiak@samsung.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libusbgx\" -DVERSION=\"0.2.0\" "-D_GNU_SOURCE=/**/" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I../../src -I../../include/ -g -O2 -MT function/libusbgx_la-midi.lo -MD -MP -MF function/.deps/libusbgx_la-midi.Tpo -c ../../src/function/midi.c  -fPIC -DPIC -o function/.libs/libusbgx_la-midi.o
In file included from ../../src/usbg_common.c:13:0:
../../include/usbg/usbg.h:33:26: fatal error: usbg_version.h: File o directory non esistente
compilation terminated.

It compiled correctly on 904b04c.

To fix this issue let's add usbg subdirectory to include path.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
---
 examples/Makefile.am | 2 +-
 src/Makefile.am      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/Makefile.am b/examples/Makefile.am
index 9934321..e77f92d 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -7,5 +7,5 @@ gadget_export_SOURCE = gadget-export.c
 gadget_import_SOURCE = gadget-import.c
 gadget_rndis_os_desc_SOURCES = gadget-rndis-os-desc.c
 show_udcs_SOURCE = show-udcs.c
-AM_CPPFLAGS=-I$(top_srcdir)/include/
+AM_CPPFLAGS=-I$(top_srcdir)/include/ -I$(top_builddir)/include/usbg
 AM_LDFLAGS=-L../src/ -lusbgx
diff --git a/src/Makefile.am b/src/Makefile.am
index 6b2726e..598a713 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,4 +9,4 @@ endif
 libusbgx_la_LDFLAGS = $(LIBCONFIG_LIBS)
 libusbgx_la_LDFLAGS += -version-info 2:0:0
 libusbgx_la_CFLAGS = $(LIBCONFIG_CFLAGS)
-AM_CPPFLAGS=-I$(top_srcdir)/include/
+AM_CPPFLAGS=-I$(top_srcdir)/include/ -I$(top_builddir)/include/usbg
-- 
2.22.0
openSUSE Build Service is sponsored by