package/brltty: fix build with expat
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 13 Oct 2019 12:45:50 +0000 (14:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 26 Oct 2019 12:56:34 +0000 (14:56 +0200)
commit899ab0d63ca88979d97309027a3916f5a6fac1a0
tree4d923607a12c2f36670ff95698f55bfb6baaaeac
parent4b6ccd822d67ead697b34e4164f2e6391125d942
package/brltty: fix build with expat

tbl2hex is a host command line that is built with:

$(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $(TBL2HEX_OBJECTS) $(EXPAT_LIBS_FOR_BUILD) $(LDLIBS_FOR_BUILD)

It needs cldr.o which can depends on expat and is built through:

%.$B: $(SRC_DIR)/%.c
       $(CC_FOR_BUILD) -DFOR_BUILD $(CFLAGS_FOR_BUILD) -o $@ -c $<

When cross-compiling, build fails because expat is not found on host:

gcc -DFOR_BUILD -I. -I. -I./../Programs -I../Programs -I../Headers -I./.. -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE  -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE -DHAVE_CONFIG_H -g -O2 -std=gnu99 -Wall -Werror=format-security -o cldr.build.o -c cldr.c
cldr.c:31:10: fatal error: expat.h: No such file or directory
 #include <expat.h>
          ^~~~~~~~~

To fix this issue, add host-expat dependency as well as patch so that
the *_FOR_BUILD variables are properly passed to the sub-configure
script that brltty runs to build the host utilities.

Fixes:
 - http://autobuild.buildroot.org/results/362cfb57e4a91a066493269d8078d931529ddf69

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Thomas: use a different, simpler solution.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/brltty/0002-mk4build-change-how-the-_FOR_BUILD-variables-are-pas.patch [new file with mode: 0644]
package/brltty/brltty.mk