diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-12-14 18:09:37 -0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-12-26 08:23:22 +0100 |
commit | 097626066617b8f7cb48d0fb866b0dee729f552e (patch) | |
tree | cf96abfe38dc8d67bc021c63ef6202cad20a62df /meta-oe/recipes-support/zbar | |
parent | 6e6cbf1ab1980fcff5b10172b9a64b9ea0a70fca (diff) | |
download | meta-openembedded-097626066617b8f7cb48d0fb866b0dee729f552e.tar.gz |
zbar: Add recipe
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/zbar')
3 files changed, 111 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch b/meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch new file mode 100644 index 000000000..04239bacd --- /dev/null +++ b/meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 224507bc4b6e58f7a6e445bfebfb59d6b8d78bd6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 2 Dec 2016 17:38:51 -0800 | ||
4 | Subject: [PATCH] make relies GNU extentions | ||
5 | |||
6 | We get errors like | ||
7 | `%'-style pattern rules are a GNU make extension | ||
8 | |||
9 | Disable this warning, since we use gmake with OE | ||
10 | anyway | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | configure.ac | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index 56d3dd0..9f85fd7 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -3,7 +3,7 @@ AC_PREREQ([2.61]) | ||
22 | AC_INIT([zbar], [0.10], [spadix@users.sourceforge.net]) | ||
23 | AC_CONFIG_AUX_DIR(config) | ||
24 | AC_CONFIG_MACRO_DIR(config) | ||
25 | -AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects std-options dist-bzip2]) | ||
26 | +AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-portability foreign subdir-objects std-options dist-bzip2]) | ||
27 | AC_CONFIG_HEADERS([include/config.h]) | ||
28 | AC_CONFIG_SRCDIR(zbar/scanner.c) | ||
29 | LT_PREREQ([2.2]) | ||
30 | -- | ||
31 | 2.10.2 | ||
32 | |||
diff --git a/meta-oe/recipes-support/zbar/zbar/0001-undefine-__va_arg_pack.patch b/meta-oe/recipes-support/zbar/zbar/0001-undefine-__va_arg_pack.patch new file mode 100644 index 000000000..f7d8ba1e9 --- /dev/null +++ b/meta-oe/recipes-support/zbar/zbar/0001-undefine-__va_arg_pack.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From f842872244219d9881fbec77054702412b1e16f8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 2 Dec 2016 16:41:27 -0800 | ||
4 | Subject: [PATCH] undefine __va_arg_pack | ||
5 | |||
6 | dprintf() is also a libc function. This fixes | ||
7 | the compile errors | ||
8 | |||
9 | /usr/include/bits/stdio2.h:140:1: error: expected identifier or '(' before '{' token | ||
10 | | { | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | zbar/debug.h | 10 +++++----- | ||
15 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
16 | |||
17 | diff --git a/zbar/debug.h b/zbar/debug.h | ||
18 | index 482ca8d..68948f6 100644 | ||
19 | --- a/zbar/debug.h | ||
20 | +++ b/zbar/debug.h | ||
21 | @@ -23,6 +23,7 @@ | ||
22 | |||
23 | /* varargs variations on compile time debug spew */ | ||
24 | |||
25 | +#undef __va_arg_pack | ||
26 | #ifndef DEBUG_LEVEL | ||
27 | |||
28 | # ifdef __GNUC__ | ||
29 | @@ -36,15 +37,14 @@ | ||
30 | #else | ||
31 | |||
32 | # include <stdio.h> | ||
33 | - | ||
34 | # ifdef __GNUC__ | ||
35 | -# define dprintf(level, args...) \ | ||
36 | +# define dprintf(level, format, args...) \ | ||
37 | if((level) <= DEBUG_LEVEL) \ | ||
38 | - fprintf(stderr, args) | ||
39 | + fprintf(stderr, format, args) | ||
40 | # else | ||
41 | -# define dprintf(level, ...) \ | ||
42 | +# define dprintf(level, format, ...) \ | ||
43 | if((level) <= DEBUG_LEVEL) \ | ||
44 | - fprintf(stderr, __VA_ARGS__) | ||
45 | + fprintf(stderr, format, __VA_ARGS__) | ||
46 | # endif | ||
47 | |||
48 | #endif /* DEBUG_LEVEL */ | ||
49 | -- | ||
50 | 2.10.2 | ||
51 | |||
diff --git a/meta-oe/recipes-support/zbar/zbar_0.10.bb b/meta-oe/recipes-support/zbar/zbar_0.10.bb new file mode 100644 index 000000000..77733aae4 --- /dev/null +++ b/meta-oe/recipes-support/zbar/zbar_0.10.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | DESRIPTION = "2D barcode scanner toolkit." | ||
2 | SECTION = "graphics" | ||
3 | LICENSE = "LGPL-2.1" | ||
4 | |||
5 | DEPENDS = "pkgconfig intltool-native libpng jpeg" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=42bafded1b380c6fefbeb6c5cd5448d9" | ||
8 | |||
9 | SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.bz2 \ | ||
10 | file://0001-undefine-__va_arg_pack.patch \ | ||
11 | file://0001-make-relies-GNU-extentions.patch \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[md5sum] = "0fd61eb590ac1bab62a77913c8b086a5" | ||
15 | SRC_URI[sha256sum] = "234efb39dbbe5cef4189cc76f37afbe3cfcfb45ae52493bfe8e191318bdbadc6" | ||
16 | |||
17 | inherit autotools pkgconfig | ||
18 | |||
19 | PACKAGECONFIG = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)}" | ||
20 | |||
21 | PACKAGECONFIG[x11] = "--with-x,-without-x,libxcb libx11 libsm libxau libxext libxv libice libxdmcp" | ||
22 | |||
23 | EXTRA_OECONF = " --without-imagemagick --without-qt --without-python --disable-video --without-gtk" | ||
24 | |||
25 | do_install_append() { | ||
26 | #remove usr/bin if empty | ||
27 | rmdir ${D}${bindir} | ||
28 | } | ||