summaryrefslogtreecommitdiffstats
path: root/package/zxing-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'package/zxing-cpp')
-rw-r--r--package/zxing-cpp/0001-CMakeLists-add-rules-for-installation.patch33
-rw-r--r--package/zxing-cpp/Config.in13
-rw-r--r--package/zxing-cpp/zxing-cpp.hash2
-rw-r--r--package/zxing-cpp/zxing-cpp.mk18
4 files changed, 66 insertions, 0 deletions
diff --git a/package/zxing-cpp/0001-CMakeLists-add-rules-for-installation.patch b/package/zxing-cpp/0001-CMakeLists-add-rules-for-installation.patch
new file mode 100644
index 0000000000..034f200528
--- /dev/null
+++ b/package/zxing-cpp/0001-CMakeLists-add-rules-for-installation.patch
@@ -0,0 +1,33 @@
+From 2bc58a87dd629cef4cd2c62c5132c319bede61fa Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sun, 4 Oct 2015 11:49:52 +0100
+Subject: [PATCH] CMakeLists: add rules for installation
+
+This commit adds some CMake rules that allow to do a "make install" to
+install the zxing binary, its library and corresponding header files.
+
+Submitted upstream: https://github.com/glassechidna/zxing-cpp/pull/31
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ CMakeLists.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f49b28d..7151d90 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -68,6 +68,10 @@ file(GLOB_RECURSE ZXING_FILES
+ )
+ add_executable(zxing ${ZXING_FILES})
+ target_link_libraries(zxing libzxing)
++install(TARGETS zxing libzxing
++ LIBRARY DESTINATION lib
++ RUNTIME DESTINATION bin)
++install(DIRECTORY core/src/zxing/ DESTINATION include/zxing FILES_MATCHING PATTERN "*.h")
+
+ # Add testrunner executable.
+ find_package(CPPUNIT)
+--
+2.6.0
+
diff --git a/package/zxing-cpp/Config.in b/package/zxing-cpp/Config.in
new file mode 100644
index 0000000000..1695d2783b
--- /dev/null
+++ b/package/zxing-cpp/Config.in
@@ -0,0 +1,13 @@
+comment "zxing-cpp needs a toolchain w/ C++"
+ depends on !BR2_INSTALL_LIBSTDCPP
+
+config BR2_PACKAGE_ZXING_CPP
+ bool "zxing-cpp"
+ depends on BR2_INSTALL_LIBSTDCPP
+ help
+ 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.
+
+ https://github.com/glassechidna/zxing-cpp
diff --git a/package/zxing-cpp/zxing-cpp.hash b/package/zxing-cpp/zxing-cpp.hash
new file mode 100644
index 0000000000..bc3b11d29c
--- /dev/null
+++ b/package/zxing-cpp/zxing-cpp.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 c3934e9e59b7496c9a4db7ad4d8eb43668da4b321ec705feebaf085b185b2d08 zxing-cpp-4abdbb62c9939014eca3e43ac7dfa30daa344536.tar.gz
diff --git a/package/zxing-cpp/zxing-cpp.mk b/package/zxing-cpp/zxing-cpp.mk
new file mode 100644
index 0000000000..64c20f3cc8
--- /dev/null
+++ b/package/zxing-cpp/zxing-cpp.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# zxing-cpp
+#
+################################################################################
+
+ZXING_CPP_VERSION = 4abdbb62c9939014eca3e43ac7dfa30daa344536
+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
+
+ifeq ($(BR2_PACKAGE_LIBICONV),y)
+ZXING_CPP_DEPENDENCIES += libiconv
+endif
+
+$(eval $(cmake-package))
OpenPOWER on IntegriCloud