zxing_cpp: New package
PATCH 1/1 zxing_cpp: New package
ZXing was hosted on Google Code, which is a closing forges. The current link was already redirecting to the github repo.
But upstream is no longer supporting the cpp bindings, it's now a Java library/application.
A fork has been created from the latests cpp source of the original upstream.
So this is a new package from an old one and a legacy option has been added.
---
Config.in.legacy | 8 +++++++
package/Config.in | 2 +-
package/{zxing => zxing-cpp}/Config.in | 10 ++++-----
package/zxing-cpp/zxing-cpp.mk | 33 ++++++++++++++++++++++++++++
package/zxing/0001-makefile.patch | 30 -------------------------
package/zxing/zxing.mk | 40 ----------------------------------
6 files changed, 47 insertions(+), 76 deletions(-)
rename package/{zxing => zxing-cpp}/Config.in (52%)
create mode 100644 package/zxing-cpp/zxing-cpp.mk
delete mode 100644 package/zxing/0001-makefile.patch
delete mode 100644 package/zxing/zxing.mkConfig.in.legacy +8 -0
@@ -107,6 +107,14 @@ endif ############################################################################### comment "Legacy options removed in 2015.08" +config BR2_PACKAGE_ZXING + bool "zxing option has been renamed" + select BR2_LEGACY + select BR2_PACKAGE_ZXING_CPP + help + ZXing no longer provides the cpp bindings, it has been renamed to + BR2_PACKAGE_ZXING_CPP which uses a new upstream. + config BR2_PACKAGE_PERF bool "perf option has been renamed" select BR2_LEGACY
package/Config.in +1 -1
@@ -828,7 +828,7 @@ menu "Graphics" source "package/wayland/Config.in" source "package/webkit/Config.in" source "package/webp/Config.in" - source "package/zxing/Config.in" + source "package/zxing-cpp/Config.in" endmenu menu "Hardware handling"
package/zxing-cpp/Config.in renamed from package/zxing/Config.in +5 -5
@@ -1,13 +1,13 @@ -comment "zxing needs a toolchain w/ C++" +comment "zxing-cpp needs a toolchain w/ C++" depends on !BR2_INSTALL_LIBSTDCPP -config BR2_PACKAGE_ZXING - bool "zxing" +config BR2_PACKAGE_ZXING_CPP + bool "zxing-cpp" depends on BR2_INSTALL_LIBSTDCPP help - ZXing (pronounced "zebra crossing") is an open-source, + ZXing-cpp (pronounced "zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. This compiles the C++ port. - http://code.google.com/p/zxing/ + https://github.com/glassechidna/zxing-cpp
package/zxing-cpp/zxing-cpp.mk new file +33 -0
@@ -0,0 +1,33 @@ +################################################################################ +# +# zxing-cpp +# +################################################################################ + +ZXING_CPP_VERSION = e7594421d240d8a79633a83c7ad3d26b670e038f +ZXING_CPP_SITE = $(call github,glassechidna,zxing-cpp,$(ZXING_CPP_VERSION)) +ZXING_CPP_LICENSE = Apache-2.0 +ZXING_CPP_LICENSE_FILES = COPYING +ZXING_CPP_INSTALL_STAGING = YES +ZXING_CPP_SUPPORTS_IN_SOURCE_BUILD = NO + +ifneq ($(BR2_ENABLE_LOCALE),y) +ifeq ($(BR2_PACKAGE_LIBICONV),y) +ZXING_CPP_DEPENDENCIES += libiconv +endif +endif + +define ZXING_CPP_INSTALL_STAGING_CMDS + for i in $$(find $(@D)/buildroot-build/core/src -iname *.h); do \ + $(INSTALL) -m 644 $$i $(TARGET_DIR)/usr/local/include; \ + done +endef + +define ZXING_CPP_INSTALL_TARGET_CMDS + for i in $$(find $(@D)/buildroot-build/ -iname *.so -o -iname *.a); do \ + $(INSTALL) -m 644 $$i $(TARGET_DIR)/usr/lib; \ + done + $(INSTALL) -m 755 $(@D)/buildroot-build/zxing $(TARGET_DIR)/usr/sbin +endef + +$(eval $(cmake-package))
package/zxing/0001-makefile.patch deleted +0 -30
@@ -1,30 +0,0 @@ -[PATCH] add Makefile - -The scons based build system doesn't handle cross compilation, special -compiler flags or (un)installation, so add a simple makefile instead -which does. - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - cpp/core/src/Makefile | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -Index: zxing-2.0/cpp/core/src/Makefile -=================================================================== ---- /dev/null -+++ zxing-2.0/cpp/core/src/Makefile -@@ -0,0 +1,14 @@ -+override CXXFLAGS += -I. -+SRCS := $(shell find -name '*.cpp') -+ -+libzxing.a: $(SRCS:.cpp=.o) -+ $(AR) $(ARFLAGS) $@ $^ -+ -+install: libzxing.a -+ install -D -m 0644 $^ $(DESTDIR)/usr/lib/$^ -+ find -name '*.h' -exec install -m 0644 -D "{}" \ -+ "$(DESTDIR)/usr/include/{}" ";" -+ -+uninstall: -+ rm -f $(DESTDIR)/usr/lib/libzxing.a -+ rm -rf $(DESTDIR)/usr/include/zxing
package/zxing/zxing.mk deleted +0 -40
@@ -1,40 +0,0 @@ -################################################################################ -# -# zxing -# -################################################################################ - -ZXING_VERSION = 2.3.0 -ZXING_SITE = http://zxing.googlecode.com/files -ZXING_SOURCE = ZXing-$(ZXING_VERSION).zip -ZXING_LICENSE = Apache-2.0 -ZXING_LICENSE_FILES = COPYING -ZXING_INSTALL_STAGING = YES - -ifneq ($(BR2_ENABLE_LOCALE),y) -ifeq ($(BR2_PACKAGE_LIBICONV),y) -ZXING_DEPENDENCIES += libiconv -else -# There is no locale support in the toolchain and libiconv -# is not available so disable iconv support in zxing -ZING_MAKE_OPTS = CXXFLAGS+="-DNO_ICONV" -endif -endif - -define ZXING_EXTRACT_CMDS - $(UNZIP) -d $(BUILD_DIR) $(DL_DIR)/$(ZXING_SOURCE) -endef - -define ZXING_BUILD_CMDS - $(MAKE) -C $(@D)/cpp/core/src $(TARGET_CONFIGURE_OPTS) $(ZING_MAKE_OPTS) -endef - -define ZXING_INSTALL_STAGING_CMDS - $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(STAGING_DIR) install -endef - -define ZXING_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(TARGET_DIR) install -endef - -$(eval $(generic-package))
Signature · 1 line
2.1.4
PATCH 1/1 zxing_cpp: New package
Maxime, All,
On 2015-07-24 00:08 +0200, Maxime Hadjinlian spake thusly:
Quoted 6 lines
ZXing was hosted on Google Code, which is a closing forges. The current link was already redirecting to the github repo.
But upstream is no longer supporting the cpp bindings, it's now a Java library/application.
Quoted 6 lines
A fork has been created from the latests cpp source of the original upstream.
So this is a new package from an old one and a legacy option has been added.Signed-off-by Maxime Hadjinlian <[email protected]>
[--SNIP--]
Quoted 27 lines
package/zxing-cpp/zxing-cpp.mk new file +21
-0@@ -0,0 +1,33 @@ +################################################################################ +# +# zxing-cpp +# +################################################################################ + +ZXING_CPP_VERSION = e7594421d240d8a79633a83c7ad3d26b670e038f +ZXING_CPP_SITE = $(call github,glassechidna,zxing-cpp,$(ZXING_CPP_VERSION)) +ZXING_CPP_LICENSE = Apache-2.0 +ZXING_CPP_LICENSE_FILES = COPYING +ZXING_CPP_INSTALL_STAGING = YES +ZXING_CPP_SUPPORTS_IN_SOURCE_BUILD = NO + +ifneq ($(BR2_ENABLE_LOCALE),y) +ifeq ($(BR2_PACKAGE_LIBICONV),y) +ZXING_CPP_DEPENDENCIES += libiconv +endif +endif + +define ZXING_CPP_INSTALL_STAGING_CMDS + for i in $$(find $(@D)/buildroot-build/core/src -iname *.h); do \
package/zxing-cpp/zxing-cpp.mk line 31
Quoted 10 lines
package/zxing-cpp/zxing-cpp.mk new file +10
-0+ $(INSTALL) -m 644 $$i $(TARGET_DIR)/usr/local/include; \ + done +endef + +define ZXING_CPP_INSTALL_TARGET_CMDS + for i in $$(find $(@D)/buildroot-build/ -iname *.so -o -iname *.a); do \ + $(INSTALL) -m 644 $$i $(TARGET_DIR)/usr/lib; \ + done + $(INSTALL) -m 755 $(@D)/buildroot-build/zxing $(TARGET_DIR)/usr/sbin +endef
Why can't we use the standard 'install' rule for either staging or target?
Regards,
Yann E. MORIN.
Quoted 90 lines
package/zxing-cpp/zxing-cpp.mk new file +1
-0+$(eval $(cmake-package))package/zxing/0001-makefile.patch deleted +0
-30@@ -1,30 +0,0 @@ -[PATCH] add Makefile - -The scons based build system doesn't handle cross compilation, special -compiler flags or (un)installation, so add a simple makefile instead -which does. - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - cpp/core/src/Makefile | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -Index: zxing-2.0/cpp/core/src/Makefile -=================================================================== ---- /dev/null -+++ zxing-2.0/cpp/core/src/Makefile -@@ -0,0 +1,14 @@ -+override CXXFLAGS += -I. -+SRCS := $(shell find -name '*.cpp') -+ -+libzxing.a: $(SRCS:.cpp=.o) -+ $(AR) $(ARFLAGS) $@ $^ -+ -+install: libzxing.a -+ install -D -m 0644 $^ $(DESTDIR)/usr/lib/$^ -+ find -name '*.h' -exec install -m 0644 -D "{}" \ -+ "$(DESTDIR)/usr/include/{}" ";" -+ -+uninstall: -+ rm -f $(DESTDIR)/usr/lib/libzxing.a -+ rm -rf $(DESTDIR)/usr/include/zxingpackage/zxing/zxing.mk deleted +0
-40@@ -1,40 +0,0 @@ -################################################################################ -# -# zxing -# -################################################################################ - -ZXING_VERSION = 2.3.0 -ZXING_SITE = http://zxing.googlecode.com/files -ZXING_SOURCE = ZXing-$(ZXING_VERSION).zip -ZXING_LICENSE = Apache-2.0 -ZXING_LICENSE_FILES = COPYING -ZXING_INSTALL_STAGING = YES - -ifneq ($(BR2_ENABLE_LOCALE),y) -ifeq ($(BR2_PACKAGE_LIBICONV),y) -ZXING_DEPENDENCIES += libiconv -else -# There is no locale support in the toolchain and libiconv -# is not available so disable iconv support in zxing -ZING_MAKE_OPTS = CXXFLAGS+="-DNO_ICONV" -endif -endif - -define ZXING_EXTRACT_CMDS - $(UNZIP) -d $(BUILD_DIR) $(DL_DIR)/$(ZXING_SOURCE) -endef - -define ZXING_BUILD_CMDS - $(MAKE) -C $(@D)/cpp/core/src $(TARGET_CONFIGURE_OPTS) $(ZING_MAKE_OPTS) -endef - -define ZXING_INSTALL_STAGING_CMDS - $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(STAGING_DIR) install -endef - -define ZXING_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(TARGET_DIR) install -endef - -$(eval $(generic-package))Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 zxing_cpp: New package
Quoted 48 lines · Yann E. MORIN
Maxime, All,
On 2015-07-24 00:08 +0200, Maxime Hadjinlian spake thusly:
Quoted 6 lines
ZXing was hosted on Google Code, which is a closing forges. The current link was already redirecting to the github repo.
But upstream is no longer supporting the cpp bindings, it's now a Java library/application.
Quoted 6 lines
A fork has been created from the latests cpp source of the original upstream.
So this is a new package from an old one and a legacy option has been added.Signed-off-by Maxime Hadjinlian <[email protected]>[--SNIP--]
Quoted 32 lines
package/zxing-cpp/zxing-cpp.mk new file +26
-0@@ -0,0 +1,33 @@ +################################################################################ +# +# zxing-cpp +# +################################################################################ + +ZXING_CPP_VERSION = e7594421d240d8a79633a83c7ad3d26b670e038f +ZXING_CPP_SITE = $(call github,glassechidna,zxing-cpp,$(ZXING_CPP_VERSION)) +ZXING_CPP_LICENSE = Apache-2.0 +ZXING_CPP_LICENSE_FILES = COPYING +ZXING_CPP_INSTALL_STAGING = YES +ZXING_CPP_SUPPORTS_IN_SOURCE_BUILD = NO + +ifneq ($(BR2_ENABLE_LOCALE),y) +ifeq ($(BR2_PACKAGE_LIBICONV),y) +ZXING_CPP_DEPENDENCIES += libiconv +endif +endif + +define ZXING_CPP_INSTALL_STAGING_CMDS + for i in $$(find $(@D)/buildroot-build/core/src -iname *.h); do \ + $(INSTALL) -m 644 $$i $(TARGET_DIR)/usr/local/include; \ + done +endef + +define ZXING_CPP_INSTALL_TARGET_CMDS
Quoted 8 lines
package/zxing-cpp/zxing-cpp.mk line 31
Quoted 5 lines
package/zxing-cpp/zxing-cpp.mk new file +5
-0+ for i in $$(find $(@D)/buildroot-build/ -iname *.so -o -iname *.a); do \ + $(INSTALL) -m 644 $$i $(TARGET_DIR)/usr/lib; \ + done + $(INSTALL) -m 755 $(@D)/buildroot-build/zxing $(TARGET_DIR)/usr/sbin +endefWhy can't we use the standard 'install' rule for either staging or target?
There's no install in the CMakeLists from the original package, there's already multiple issues in their Github to add it but it doesn't seem like the maintainer is resolved to add them. Since I don't want to add a patch that'll just rot there, I went this way.
Quoted 102 lines
Regards,
Yann E. MORIN.Quoted 86 lines
package/zxing-cpp/zxing-cpp.mk new file +1
-0+$(eval $(cmake-package))package/zxing/0001-makefile.patch deleted +0
-30@@ -1,30 +0,0 @@ -[PATCH] add Makefile - -The scons based build system doesn't handle cross compilation, special -compiler flags or (un)installation, so add a simple makefile instead -which does. - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - cpp/core/src/Makefile | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -Index: zxing-2.0/cpp/core/src/Makefile -=================================================================== ---- /dev/null -+++ zxing-2.0/cpp/core/src/Makefile -@@ -0,0 +1,14 @@ -+override CXXFLAGS += -I. -+SRCS := $(shell find -name '*.cpp') -+ -+libzxing.a: $(SRCS:.cpp=.o) -+ $(AR) $(ARFLAGS) $@ $^ -+ -+install: libzxing.a -+ install -D -m 0644 $^ $(DESTDIR)/usr/lib/$^ -+ find -name '*.h' -exec install -m 0644 -D "{}" \ -+ "$(DESTDIR)/usr/include/{}" ";" -+ -+uninstall: -+ rm -f $(DESTDIR)/usr/lib/libzxing.a -+ rm -rf $(DESTDIR)/usr/include/zxingpackage/zxing/zxing.mk deleted +0
-41@@ -1,40 +0,0 @@ -################################################################################ -# -# zxing -# -################################################################################ - -ZXING_VERSION = 2.3.0 -ZXING_SITE = http://zxing.googlecode.com/files -ZXING_SOURCE = ZXing-$(ZXING_VERSION).zip -ZXING_LICENSE = Apache-2.0 -ZXING_LICENSE_FILES = COPYING -ZXING_INSTALL_STAGING = YES - -ifneq ($(BR2_ENABLE_LOCALE),y) -ifeq ($(BR2_PACKAGE_LIBICONV),y) -ZXING_DEPENDENCIES += libiconv -else -# There is no locale support in the toolchain and libiconv -# is not available so disable iconv support in zxing -ZING_MAKE_OPTS = CXXFLAGS+="-DNO_ICONV" -endif -endif - -define ZXING_EXTRACT_CMDS - $(UNZIP) -d $(BUILD_DIR) $(DL_DIR)/$(ZXING_SOURCE) -endef - -define ZXING_BUILD_CMDS - $(MAKE) -C $(@D)/cpp/core/src $(TARGET_CONFIGURE_OPTS) $(ZING_MAKE_OPTS) -endef - -define ZXING_INSTALL_STAGING_CMDS - $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(STAGING_DIR) install -endef - -define ZXING_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(TARGET_DIR) install -endef - -$(eval $(generic-package)) --2.1.4
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
PATCH 1/1 zxing_cpp: New package
Maxime, All,
On 2015-07-26 13:27 +0200, Maxime Hadjinlian spake thusly:
Quoted 2 lines · Yann E. MORIN
Quoted 1 line
On 2015-07-24 00:08 +0200, Maxime Hadjinlian spake thusly:
[--SNIP--]
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
package/zxing-cpp/zxing-cpp.mk new file +7
-0+define ZXING_CPP_INSTALL_STAGING_CMDS + for i in $$(find $(@D)/buildroot-build/core/src -iname *.h); do \ + $(INSTALL) -m 644 $$i $(TARGET_DIR)/usr/local/include; \ + done +endef + +define ZXING_CPP_INSTALL_TARGET_CMDSQuoted 8 lines
package/zxing-cpp/zxing-cpp.mk line 31
Quoted 5 lines
package/zxing-cpp/zxing-cpp.mk new file +5
-0+ for i in $$(find $(@D)/buildroot-build/ -iname *.so -o -iname *.a); do \ + $(INSTALL) -m 644 $$i $(TARGET_DIR)/usr/lib; \ + done + $(INSTALL) -m 755 $(@D)/buildroot-build/zxing $(TARGET_DIR)/usr/sbin +endefWhy can't we use the standard 'install' rule for either staging or target?
Quoted 4 lines
There's no install in the CMakeLists from the original package, there's already multiple issues in their Github to add it but it doesn't seem like the maintainer is resolved to add them. Since I don't want to add a patch that'll just rot there, I went this way.
That's not how I interpret the comments in the issue report; on the contrary, I understand that the maintainer will welcome pull requests for new features, so if you were to send such a PR, it seems it would have quite some good chances to get in.
Anyway, OK for the way you'r edoing it for now...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'