diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-18 08:23:22 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-07-22 00:01:55 +0200 |
commit | 141aedb403e4bb91dac6ffb109ee74dfaee59f81 (patch) | |
tree | cd062726923db211a2b4546725a5bf15e0449206 | |
parent | e5925b868e364ff61bb890efe1b10e31644268d3 (diff) | |
download | meta-openembedded-141aedb403e4bb91dac6ffb109ee74dfaee59f81.tar.gz |
subsurface: Fix libxml and libm build failures
Use pkg-config to find libxml2 and also link against libm to avoid
build failures.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 files changed, 42 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/subsurface/subsurface/libm.patch b/meta-oe/recipes-extended/subsurface/subsurface/libm.patch new file mode 100644 index 0000000000..79956089df --- /dev/null +++ b/meta-oe/recipes-extended/subsurface/subsurface/libm.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | | /media/build1/poky/build1/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.9.0/ld: divelist.o: undefined reference to symbol 'pow@@GLIBC_2.0' | ||
2 | | /media/build1/poky/build1/tmp/sysroots/qemux86/lib/libm.so.6: error adding symbols: DSO missing from command line | ||
3 | | collect2: error: ld returned 1 exit status | ||
4 | |||
5 | Index: git/Makefile | ||
6 | =================================================================== | ||
7 | --- git.orig/Makefile 2014-07-17 20:59:03.152489041 +0000 | ||
8 | +++ git/Makefile 2014-07-17 20:59:19.020489473 +0000 | ||
9 | @@ -50,7 +50,7 @@ | ||
10 | LIBDIVECOMPUTERCFLAGS = -I$(LIBDIVECOMPUTERINCLUDES) | ||
11 | LIBDIVECOMPUTER = $(LIBDIVECOMPUTERARCHIVE) $(LIBUSB) | ||
12 | |||
13 | -LIBS = $(LIBXML2) $(LIBGTK) $(LIBDIVECOMPUTER) -lpthread | ||
14 | +LIBS = $(LIBXML2) $(LIBGTK) $(LIBDIVECOMPUTER) -lpthread -lm | ||
15 | |||
16 | OBJS = main.o dive.o profile.o info.o equipment.o divelist.o \ | ||
17 | parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o \ | ||
diff --git a/meta-oe/recipes-extended/subsurface/subsurface/pkgconfig.patch b/meta-oe/recipes-extended/subsurface/subsurface/pkgconfig.patch new file mode 100644 index 0000000000..1f294fc88f --- /dev/null +++ b/meta-oe/recipes-extended/subsurface/subsurface/pkgconfig.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Index: git/Makefile | ||
2 | =================================================================== | ||
3 | --- git.orig/Makefile 2014-07-17 20:53:23.620479788 +0000 | ||
4 | +++ git/Makefile 2014-07-17 20:56:07.992484267 +0000 | ||
5 | @@ -45,7 +45,7 @@ | ||
6 | # about it if it doesn't. | ||
7 | LIBUSB = $(shell pkg-config --libs libusb-1.0 2> /dev/null) | ||
8 | |||
9 | -LIBXML2 = $(shell xml2-config --libs) | ||
10 | +LIBXML2 = $(shell pkg-config --libs libxml-2.0) | ||
11 | LIBGTK = $(shell pkg-config --libs gtk+-2.0 glib-2.0 gconf-2.0) | ||
12 | LIBDIVECOMPUTERCFLAGS = -I$(LIBDIVECOMPUTERINCLUDES) | ||
13 | LIBDIVECOMPUTER = $(LIBDIVECOMPUTERARCHIVE) $(LIBUSB) | ||
14 | @@ -71,7 +71,7 @@ | ||
15 | $(INSTALL) $(MANFILES) $(MANDIR) | ||
16 | |||
17 | parse-xml.o: parse-xml.c dive.h | ||
18 | - $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `xml2-config --cflags` parse-xml.c | ||
19 | + $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `pkg-config --cflags libxml-2.0` parse-xml.c | ||
20 | |||
21 | save-xml.o: save-xml.c dive.h | ||
22 | $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c save-xml.c | ||
diff --git a/meta-oe/recipes-extended/subsurface/subsurface_git.bb b/meta-oe/recipes-extended/subsurface/subsurface_git.bb index eb4536aa61..0632f2120d 100644 --- a/meta-oe/recipes-extended/subsurface/subsurface_git.bb +++ b/meta-oe/recipes-extended/subsurface/subsurface_git.bb | |||
@@ -11,7 +11,9 @@ PKGV = "${GITPKGVTAG}" | |||
11 | PV = "1.1" | 11 | PV = "1.1" |
12 | 12 | ||
13 | SRCREV = "bd275d73ac06823619230915a3aa29deddc996fb" | 13 | SRCREV = "bd275d73ac06823619230915a3aa29deddc996fb" |
14 | SRC_URI = "git://subsurface.hohndel.org/subsurface.git" | 14 | SRC_URI = "git://subsurface.hohndel.org/subsurface.git \ |
15 | file://pkgconfig.patch \ | ||
16 | file://libm.patch" | ||
15 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
16 | 18 | ||
17 | EXTRA_OEMAKE = "CC='${CC}' \ | 19 | EXTRA_OEMAKE = "CC='${CC}' \ |