diff mbox

[oe,meta-oe,5/8] zbar: Add recipe

Message ID 20161203030422.17285-5-raj.khem@gmail.com
State Superseded
Headers show

Commit Message

Khem Raj Dec. 3, 2016, 3:04 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../zbar/0001-make-relies-GNU-extentions.patch     | 32 ++++++++++++++
 .../zbar/zbar/0001-undefine-__va_arg_pack.patch    | 51 ++++++++++++++++++++++
 meta-oe/recipes-support/zbar/zbar_0.10.bb          | 25 +++++++++++
 3 files changed, 108 insertions(+)
 create mode 100644 meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch
 create mode 100644 meta-oe/recipes-support/zbar/zbar/0001-undefine-__va_arg_pack.patch
 create mode 100644 meta-oe/recipes-support/zbar/zbar_0.10.bb

-- 
2.10.2

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Comments

Martin Jansa Dec. 9, 2016, 9:40 p.m. UTC | #1
On Fri, Dec 02, 2016 at 07:04:19PM -0800, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> ---

>  .../zbar/0001-make-relies-GNU-extentions.patch     | 32 ++++++++++++++

>  .../zbar/zbar/0001-undefine-__va_arg_pack.patch    | 51 ++++++++++++++++++++++

>  meta-oe/recipes-support/zbar/zbar_0.10.bb          | 25 +++++++++++

>  3 files changed, 108 insertions(+)

>  create mode 100644 meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch

>  create mode 100644 meta-oe/recipes-support/zbar/zbar/0001-undefine-__va_arg_pack.patch

>  create mode 100644 meta-oe/recipes-support/zbar/zbar_0.10.bb


zbar-0.10: zbar rdepends on libxcb, but it isn't a build dependency,
missing libxcb in DEPENDS or PACKAGECONFIG? [build-deps]
zbar-0.10: zbar rdepends on libx11, but it isn't a build dependency,
missing libx11 in DEPENDS or PACKAGECONFIG? [build-deps]
zbar-0.10: zbar rdepends on libsm, but it isn't a build dependency,
missing libsm in DEPENDS or PACKAGECONFIG? [build-deps]
zbar-0.10: zbar rdepends on libxau, but it isn't a build dependency,
missing libxau in DEPENDS or PACKAGECONFIG? [build-deps]
zbar-0.10: zbar rdepends on libxext, but it isn't a build dependency,
missing libxext in DEPENDS or PACKAGECONFIG? [build-deps]
zbar-0.10: zbar rdepends on libxv, but it isn't a build dependency,
missing libxv in DEPENDS or PACKAGECONFIG? [build-deps]
zbar-0.10: zbar rdepends on libice, but it isn't a build dependency,
missing libice in DEPENDS or PACKAGECONFIG? [build-deps]
zbar-0.10: zbar rdepends on libxdmcp, but it isn't a build dependency,
missing libxdmcp in DEPENDS or PACKAGECONFIG? [build-deps]

> 

> 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 0000000..04239ba

> --- /dev/null

> +++ b/meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch

> @@ -0,0 +1,32 @@

> +From 224507bc4b6e58f7a6e445bfebfb59d6b8d78bd6 Mon Sep 17 00:00:00 2001

> +From: Khem Raj <raj.khem@gmail.com>

> +Date: Fri, 2 Dec 2016 17:38:51 -0800

> +Subject: [PATCH] make relies GNU extentions

> +

> +We get errors like

> +`%'-style pattern rules are a GNU make extension

> +

> +Disable this warning, since we use gmake with OE

> +anyway

> +

> +Signed-off-by: Khem Raj <raj.khem@gmail.com>

> +---

> + configure.ac | 2 +-

> + 1 file changed, 1 insertion(+), 1 deletion(-)

> +

> +diff --git a/configure.ac b/configure.ac

> +index 56d3dd0..9f85fd7 100644

> +--- a/configure.ac

> ++++ b/configure.ac

> +@@ -3,7 +3,7 @@ AC_PREREQ([2.61])

> + AC_INIT([zbar], [0.10], [spadix@users.sourceforge.net])

> + AC_CONFIG_AUX_DIR(config)

> + AC_CONFIG_MACRO_DIR(config)

> +-AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects std-options dist-bzip2])

> ++AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-portability foreign subdir-objects std-options dist-bzip2])

> + AC_CONFIG_HEADERS([include/config.h])

> + AC_CONFIG_SRCDIR(zbar/scanner.c)

> + LT_PREREQ([2.2])

> +-- 

> +2.10.2

> +

> 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 0000000..f7d8ba1

> --- /dev/null

> +++ b/meta-oe/recipes-support/zbar/zbar/0001-undefine-__va_arg_pack.patch

> @@ -0,0 +1,51 @@

> +From f842872244219d9881fbec77054702412b1e16f8 Mon Sep 17 00:00:00 2001

> +From: Khem Raj <raj.khem@gmail.com>

> +Date: Fri, 2 Dec 2016 16:41:27 -0800

> +Subject: [PATCH] undefine __va_arg_pack

> +

> +dprintf() is also a libc function. This fixes

> +the compile errors

> +

> +/usr/include/bits/stdio2.h:140:1: error: expected identifier or '(' before '{' token

> +|  {

> +

> +Signed-off-by: Khem Raj <raj.khem@gmail.com>

> +---

> + zbar/debug.h | 10 +++++-----

> + 1 file changed, 5 insertions(+), 5 deletions(-)

> +

> +diff --git a/zbar/debug.h b/zbar/debug.h

> +index 482ca8d..68948f6 100644

> +--- a/zbar/debug.h

> ++++ b/zbar/debug.h

> +@@ -23,6 +23,7 @@

> + 

> + /* varargs variations on compile time debug spew */

> + 

> ++#undef __va_arg_pack

> + #ifndef DEBUG_LEVEL

> + 

> + # ifdef __GNUC__

> +@@ -36,15 +37,14 @@

> + #else

> + 

> + # include <stdio.h>

> +-

> + # ifdef __GNUC__

> +-#  define dprintf(level, args...) \

> ++#  define dprintf(level, format, args...) \

> +     if((level) <= DEBUG_LEVEL)    \

> +-        fprintf(stderr, args)

> ++        fprintf(stderr, format, args)

> + # else

> +-#  define dprintf(level, ...)     \

> ++#  define dprintf(level, format, ...)     \

> +     if((level) <= DEBUG_LEVEL)    \

> +-        fprintf(stderr, __VA_ARGS__)

> ++        fprintf(stderr, format, __VA_ARGS__)

> + # endif

> + 

> + #endif /* DEBUG_LEVEL */

> +-- 

> +2.10.2

> +

> 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 0000000..adaa8dd

> --- /dev/null

> +++ b/meta-oe/recipes-support/zbar/zbar_0.10.bb

> @@ -0,0 +1,25 @@

> +DESRIPTION = "2D barcode scanner toolkit."

> +SECTION = "graphics"

> +LICENSE = "LGPL-2.1"

> +

> +DEPENDS = "pkgconfig intltool-native libpng jpeg"

> +

> +LIC_FILES_CHKSUM = "file://COPYING;md5=42bafded1b380c6fefbeb6c5cd5448d9"

> +

> +SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.bz2 \

> +           file://0001-undefine-__va_arg_pack.patch \

> +           file://0001-make-relies-GNU-extentions.patch \

> +"

> +

> +SRC_URI[md5sum] = "0fd61eb590ac1bab62a77913c8b086a5"

> +SRC_URI[sha256sum] = "234efb39dbbe5cef4189cc76f37afbe3cfcfb45ae52493bfe8e191318bdbadc6"

> +

> +inherit autotools pkgconfig

> +

> +EXTRA_OECONF = " --without-imagemagick --without-qt --without-python --disable-video --without-gtk"

> +

> +

> +do_install_append() {

> +    #remove usr/bin if empty

> +    rmdir ${D}${bindir}

> +}

> -- 

> 2.10.2

> 

> -- 

> _______________________________________________

> Openembedded-devel mailing list

> Openembedded-devel@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox

Patch

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 0000000..04239ba
--- /dev/null
+++ b/meta-oe/recipes-support/zbar/zbar/0001-make-relies-GNU-extentions.patch
@@ -0,0 +1,32 @@ 
+From 224507bc4b6e58f7a6e445bfebfb59d6b8d78bd6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Dec 2016 17:38:51 -0800
+Subject: [PATCH] make relies GNU extentions
+
+We get errors like
+`%'-style pattern rules are a GNU make extension
+
+Disable this warning, since we use gmake with OE
+anyway
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 56d3dd0..9f85fd7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3,7 +3,7 @@ AC_PREREQ([2.61])
+ AC_INIT([zbar], [0.10], [spadix@users.sourceforge.net])
+ AC_CONFIG_AUX_DIR(config)
+ AC_CONFIG_MACRO_DIR(config)
+-AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects std-options dist-bzip2])
++AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-portability foreign subdir-objects std-options dist-bzip2])
+ AC_CONFIG_HEADERS([include/config.h])
+ AC_CONFIG_SRCDIR(zbar/scanner.c)
+ LT_PREREQ([2.2])
+-- 
+2.10.2
+
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 0000000..f7d8ba1
--- /dev/null
+++ b/meta-oe/recipes-support/zbar/zbar/0001-undefine-__va_arg_pack.patch
@@ -0,0 +1,51 @@ 
+From f842872244219d9881fbec77054702412b1e16f8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Dec 2016 16:41:27 -0800
+Subject: [PATCH] undefine __va_arg_pack
+
+dprintf() is also a libc function. This fixes
+the compile errors
+
+/usr/include/bits/stdio2.h:140:1: error: expected identifier or '(' before '{' token
+|  {
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ zbar/debug.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/zbar/debug.h b/zbar/debug.h
+index 482ca8d..68948f6 100644
+--- a/zbar/debug.h
++++ b/zbar/debug.h
+@@ -23,6 +23,7 @@
+ 
+ /* varargs variations on compile time debug spew */
+ 
++#undef __va_arg_pack
+ #ifndef DEBUG_LEVEL
+ 
+ # ifdef __GNUC__
+@@ -36,15 +37,14 @@
+ #else
+ 
+ # include <stdio.h>
+-
+ # ifdef __GNUC__
+-#  define dprintf(level, args...) \
++#  define dprintf(level, format, args...) \
+     if((level) <= DEBUG_LEVEL)    \
+-        fprintf(stderr, args)
++        fprintf(stderr, format, args)
+ # else
+-#  define dprintf(level, ...)     \
++#  define dprintf(level, format, ...)     \
+     if((level) <= DEBUG_LEVEL)    \
+-        fprintf(stderr, __VA_ARGS__)
++        fprintf(stderr, format, __VA_ARGS__)
+ # endif
+ 
+ #endif /* DEBUG_LEVEL */
+-- 
+2.10.2
+
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 0000000..adaa8dd
--- /dev/null
+++ b/meta-oe/recipes-support/zbar/zbar_0.10.bb
@@ -0,0 +1,25 @@ 
+DESRIPTION = "2D barcode scanner toolkit."
+SECTION = "graphics"
+LICENSE = "LGPL-2.1"
+
+DEPENDS = "pkgconfig intltool-native libpng jpeg"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=42bafded1b380c6fefbeb6c5cd5448d9"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.bz2 \
+           file://0001-undefine-__va_arg_pack.patch \
+           file://0001-make-relies-GNU-extentions.patch \
+"
+
+SRC_URI[md5sum] = "0fd61eb590ac1bab62a77913c8b086a5"
+SRC_URI[sha256sum] = "234efb39dbbe5cef4189cc76f37afbe3cfcfb45ae52493bfe8e191318bdbadc6"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = " --without-imagemagick --without-qt --without-python --disable-video --without-gtk"
+
+
+do_install_append() {
+    #remove usr/bin if empty
+    rmdir ${D}${bindir}
+}