]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
depends: add quirc
authortobtoht <tob@featherwallet.org>
Tue, 11 Jul 2023 00:25:33 +0000 (02:25 +0200)
committertobtoht <tob@featherwallet.org>
Tue, 11 Jul 2023 00:25:38 +0000 (02:25 +0200)
This will eventually replace ZBAR.

contrib/depends/packages/packages.mk
contrib/depends/packages/quirc.mk [new file with mode: 0644]
contrib/depends/patches/quirc/CMakeLists.txt [new file with mode: 0644]

index 69ffb41621717126b993e9205b15c60fd24c71d5..917b6fb26bdb31e734e07d58bb6f41ecdb823615 100644 (file)
@@ -1,4 +1,4 @@
-packages := boost openssl libiconv unbound qrencode zbar sodium polyseed hidapi protobuf libusb zlib libgpg-error libgcrypt expat libzip bc-ur
+packages := boost openssl libiconv unbound qrencode zbar sodium polyseed hidapi protobuf libusb zlib libgpg-error libgcrypt expat libzip bc-ur quirc
 native_packages := native_qt native_protobuf
 
 linux_packages := eudev libfuse libsquashfuse zstd appimage_runtime
diff --git a/contrib/depends/packages/quirc.mk b/contrib/depends/packages/quirc.mk
new file mode 100644 (file)
index 0000000..2c32dc6
--- /dev/null
@@ -0,0 +1,22 @@
+package=quirc
+$(package)_version=1.2
+$(package)_download_path=https://github.com/dlbeer/quirc/archive/refs/tags/
+$(package)_file_name=v1.2.tar.gz
+$(package)_sha256_hash=73c12ea33d337ec38fb81218c7674f57dba7ec0570bddd5c7f7a977c0deb64c5
+$(package)_patches += CMakeLists.txt
+
+define $(package)_preprocess_cmds
+  cp $($(package)_patch_dir)/CMakeLists.txt CMakeLists.txt
+endef
+
+define $(package)_config_cmds
+    $($(package)_cmake) -DCMAKE_INSTALL_PREFIX=$(host_prefix) .
+endef
+
+define $(package)_build_cmds
+    $(MAKE)
+endef
+
+define $(package)_stage_cmds
+    $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/contrib/depends/patches/quirc/CMakeLists.txt b/contrib/depends/patches/quirc/CMakeLists.txt
new file mode 100644 (file)
index 0000000..aef0598
--- /dev/null
@@ -0,0 +1,18 @@
+cmake_minimum_required(VERSION 3.5)
+
+project(quirc)
+
+add_library(quirc STATIC
+        lib/decode.c
+        lib/identify.c
+        lib/quirc.c
+        lib/version_db.c
+        )
+
+target_include_directories(quirc PUBLIC lib)
+
+install(TARGETS quirc)
+
+install(FILES
+        lib/quirc.h
+        DESTINATION include/quirc)