-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#11614) zxing-cpp: add version 1.4.0
* zxing-cpp: add version 1.4.0 * disable `__cpp_lib_string_view` checks for older gcc * zxing-cpp/1.4.0 donesn't suppport Visual Studio <= 15. * drop support for MT + Debug build (same as 1.3.0) * require C++14 < 1.2.0, C++17 >= 1.2.0 * fix description
- Loading branch information
Showing
8 changed files
with
58 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
sources: | ||
"1.4.0": | ||
url: "https://github.com/nu-book/zxing-cpp/archive/v1.4.0.tar.gz" | ||
sha256: "126767bb56f8a1f25ae84d233db2e9b9be50d71f5776092d0e170ca0f0ed1862" | ||
"1.3.0": | ||
url: "https://github.com/nu-book/zxing-cpp/archive/v1.3.0.tar.gz" | ||
sha256: "bfd8fc706def30e34f96088b5a7afdbe0917831e57a774d34e3ee864b01c6891" | ||
"1.0.8": | ||
url: "https://github.com/nu-book/zxing-cpp/archive/v1.0.8.tar.gz" | ||
sha256: "9154b5456904e47bd4c38462d57e4b7897bfb20cb2bc2e8c958453e40e73c8b2" | ||
patches: | ||
"1.4.0": | ||
# core/ByteArray checks `__cpp_lib_string_view` for using string_view. | ||
# But some compilers(ex. gcc 7.2) don't support `__cpp_lib_string_view` but support string_view. | ||
- patch_file: "patches/1.4.0-0001-fix-string-view.patch" | ||
base_path: "source_subfolder" | ||
"1.0.8": | ||
- patch_file: "patches/0001-Fix-C2327-for-MSVC-2015.patch" | ||
- patch_file: "patches/1.0.8-0001-Fix-C2327-for-MSVC-2015.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/0002-include-limits.patch" | ||
- patch_file: "patches/1.0.8-0002-include-limits.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/0003-include-stdexcept.patch" | ||
- patch_file: "patches/1.0.8-0003-include-stdexcept.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/0004-include-cstddef.patch" | ||
- patch_file: "patches/1.0.8-0004-include-cstddef.patch" | ||
base_path: "source_subfolder" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions
22
recipes/zxing-cpp/all/patches/1.4.0-0001-fix-string-view.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/core/src/ByteArray.h b/core/src/ByteArray.h | ||
index a31f42c..d5b102e 100644 | ||
--- a/core/src/ByteArray.h | ||
+++ b/core/src/ByteArray.h | ||
@@ -11,7 +11,7 @@ | ||
#include <string> | ||
#include <vector> | ||
|
||
-#ifdef __cpp_lib_string_view | ||
+#if 1 | ||
#include <string_view> | ||
#endif | ||
|
||
@@ -30,7 +30,7 @@ public: | ||
|
||
void append(const ByteArray& other) { insert(end(), other.begin(), other.end()); } | ||
|
||
-#ifdef __cpp_lib_string_view | ||
+#if 1 | ||
std::string_view asString(size_t pos = 0, size_t len = std::string_view::npos) const | ||
{ | ||
return std::string_view(reinterpret_cast<const char*>(data()), size()).substr(pos, len); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
versions: | ||
"1.4.0": | ||
folder: all | ||
"1.3.0": | ||
folder: all | ||
"1.0.8": | ||
|