mirror of https://github.com/microsoft/vcpkg.git
[mchehab-zbar] Update to 0.23.93 (#42739)
This commit is contained in:
parent
e2fa7daf5f
commit
fa4640854b
|
|
@ -1,89 +0,0 @@
|
|||
diff --git a/zbar/symbol.c b/zbar/symbol.c
|
||||
index 27dbc87..1059a72 100644
|
||||
--- a/zbar/symbol.c
|
||||
+++ b/zbar/symbol.c
|
||||
@@ -100,40 +100,29 @@ const char *zbar_get_orientation_name (zbar_orientation_t orient)
|
||||
|
||||
int _zbar_get_symbol_hash (zbar_symbol_type_t sym)
|
||||
{
|
||||
- static const signed char hash[ZBAR_CODE128 + 1] = {
|
||||
- [0 ... ZBAR_CODE128] = -1,
|
||||
-
|
||||
- /* [ZBAR_FOO] = 0, is empty */
|
||||
- [ZBAR_SQCODE] = 1,
|
||||
- [ZBAR_CODE128] = 2,
|
||||
- [ZBAR_EAN13] = 3,
|
||||
- [ZBAR_UPCA] = 4,
|
||||
- [ZBAR_EAN8] = 5,
|
||||
- [ZBAR_UPCE] = 6,
|
||||
- [ZBAR_ISBN13] = 7,
|
||||
- [ZBAR_ISBN10] = 8,
|
||||
- [ZBAR_CODE39] = 9,
|
||||
- [ZBAR_I25] = 10,
|
||||
- [ZBAR_PDF417] = 11,
|
||||
- [ZBAR_QRCODE] = 12,
|
||||
- [ZBAR_DATABAR] = 13,
|
||||
- [ZBAR_DATABAR_EXP] = 14,
|
||||
- [ZBAR_CODE93] = 15,
|
||||
- [ZBAR_EAN2] = 16,
|
||||
- [ZBAR_EAN5] = 17,
|
||||
- [ZBAR_COMPOSITE] = 18,
|
||||
- [ZBAR_CODABAR] = 19,
|
||||
-
|
||||
- /* Please update NUM_SYMS accordingly */
|
||||
- };
|
||||
- int h;
|
||||
-
|
||||
- assert (sym >= ZBAR_PARTIAL && sym <= ZBAR_CODE128);
|
||||
-
|
||||
- h = hash[sym];
|
||||
- assert (h >= 0 && h < NUM_SYMS);
|
||||
-
|
||||
- return h;
|
||||
+ switch(sym)
|
||||
+ {
|
||||
+ default: return -1;
|
||||
+ case ZBAR_SQCODE: return 1;
|
||||
+ case ZBAR_CODE128: return 2;
|
||||
+ case ZBAR_EAN13: return 3;
|
||||
+ case ZBAR_UPCA: return 4;
|
||||
+ case ZBAR_EAN8: return 5;
|
||||
+ case ZBAR_UPCE: return 6;
|
||||
+ case ZBAR_ISBN13: return 7;
|
||||
+ case ZBAR_ISBN10: return 8;
|
||||
+ case ZBAR_CODE39: return 9;
|
||||
+ case ZBAR_I25: return 10;
|
||||
+ case ZBAR_PDF417: return 11;
|
||||
+ case ZBAR_QRCODE: return 12;
|
||||
+ case ZBAR_DATABAR: return 13;
|
||||
+ case ZBAR_DATABAR_EXP: return 14;
|
||||
+ case ZBAR_CODE93: return 15;
|
||||
+ case ZBAR_EAN2: return 16;
|
||||
+ case ZBAR_EAN5: return 17;
|
||||
+ case ZBAR_COMPOSITE: return 18;
|
||||
+ case ZBAR_CODABAR: return 19;
|
||||
+ }
|
||||
}
|
||||
|
||||
void _zbar_symbol_free (zbar_symbol_t *sym)
|
||||
diff --git a/zbar/window/win.c b/zbar/window/win.c
|
||||
index b949f65..7edcfa2 100644
|
||||
--- a/zbar/window/win.c
|
||||
+++ b/zbar/window/win.c
|
||||
@@ -194,7 +194,7 @@ int _zbar_window_draw_polygon (zbar_window_t *w,
|
||||
win_set_rgb(hdc, rgb);
|
||||
|
||||
point_t org = w->scaled_offset;
|
||||
- POINT gdipts[npts + 1];
|
||||
+ POINT* gdipts = malloc((npts + 1) * sizeof(POINT));
|
||||
int i;
|
||||
for(i = 0; i < npts; i++) {
|
||||
point_t p = window_scale_pt(w, pts[i]);
|
||||
@@ -204,6 +204,7 @@ int _zbar_window_draw_polygon (zbar_window_t *w,
|
||||
gdipts[npts] = gdipts[0];
|
||||
|
||||
Polyline(hdc, gdipts, npts + 1);
|
||||
+ free(gdipts);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/zbar/decoder/databar.c b/zbar/decoder/databar.c
|
||||
index 8cfa848..ffb972e 100644
|
||||
--- a/zbar/decoder/databar.c
|
||||
+++ b/zbar/decoder/databar.c
|
||||
@@ -695,7 +695,7 @@ lookup_sequence (databar_segment_t *seg,
|
||||
seq[i++] = s;
|
||||
}
|
||||
dbprintf(2, "}");
|
||||
- seq[n] = -1;
|
||||
+ if (n<22) {seq[n]=-1;} /* https://github.com/mchehab/zbar/issues/219 */
|
||||
return(fixed < 1);
|
||||
}
|
||||
|
||||
|
|
@ -2,11 +2,9 @@ vcpkg_from_github(
|
|||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO mchehab/zbar
|
||||
REF "${VERSION}"
|
||||
SHA512 d73d71873bec68ee021997512a9edbd223f5f5fe43c66c4dd3502224ba6009be2e5e1714766cb8e1056244673e87e0939ed0319116f61d7371b5ab79fb5e04eb
|
||||
SHA512 2dd607afbb1e52346bfb740f916c8616112d14153f071f82458b7c653f647b332290a5089543abebfe1c7679eae98b349a84777185d61cfb9ff275bfecc6e08f
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
c99.patch
|
||||
issue219.patch
|
||||
windows.patch
|
||||
x64.patch
|
||||
)
|
||||
|
|
@ -17,10 +15,9 @@ if("nls" IN_LIST FEATURES)
|
|||
else()
|
||||
vcpkg_list(APPEND options "--disable-nls")
|
||||
set(ENV{AUTOPOINT} true) # true, the program
|
||||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_HOST_INSTALLED_DIR}/share/gettext/aclocal/\"")
|
||||
# Simulate the relevant effects of (interactive) `gettextize`.
|
||||
file(TOUCH "${SOURCE_PATH}/po/Makefile.in.in")
|
||||
file(GLOB_RECURSE m4_files "${CURRENT_HOST_INSTALLED_DIR}/share/gettext/aclocal/*.m4")
|
||||
file(INSTALL ${m4_files} DESTINATION "${SOURCE_PATH}/config")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_make(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"name": "mchehab-zbar",
|
||||
"version": "0.23.90",
|
||||
"port-version": 5,
|
||||
"version": "0.23.93",
|
||||
"description": "ZBar is an open source software suite for reading bar codes from various sources, including webcams. This fork is actively maintained.",
|
||||
"homepage": "https://github.com/mchehab/zbar",
|
||||
"license": "LGPL-2.1-or-later",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index c8fea14..eb0a097 100644
|
||||
index f0f9723..9e79db9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -55,7 +55,7 @@ AC_DEFINE_UNQUOTED([LIB_VERSION_REVISION],
|
||||
|
|
@ -11,45 +11,17 @@ index c8fea14..eb0a097 100644
|
|||
AM_CXXFLAGS="$AM_CFLAGS"
|
||||
AC_SUBST([AM_CPPFLAGS])
|
||||
AC_SUBST([AM_CFLAGS])
|
||||
diff --git a/zbar/libzbar.rc b/zbar/libzbar.rc
|
||||
index 413635b..c241f82 100644
|
||||
--- a/zbar/libzbar.rc
|
||||
+++ b/zbar/libzbar.rc
|
||||
@@ -17,8 +17,7 @@ VS_VERSION_INFO VERSIONINFO
|
||||
VALUE "InternalName", "libzbar"
|
||||
VALUE "OriginalFilename", "libzbar-" XSTR(LIB_VERSION_MAJOR) ".dll"
|
||||
|
||||
- VALUE "FileVersion", XSTR(LIB_VERSION_MAJOR) "." \
|
||||
- XSTR(LIB_VERSION_MINOR) "." XSTR(LIB_VERSION_REVISION)
|
||||
+ VALUE "FileVersion", XSTR(LIB_VERSION_MAJOR) "." XSTR(LIB_VERSION_MINOR) "." XSTR(LIB_VERSION_REVISION)
|
||||
VALUE "ProductVersion", PACKAGE_VERSION
|
||||
|
||||
VALUE "FileDescription", "Bar code reader library"
|
||||
diff --git a/zbar/processor.h b/zbar/processor.h
|
||||
index d5e9fef..54d6584 100644
|
||||
index a8289e0..8a7e33c 100644
|
||||
--- a/zbar/processor.h
|
||||
+++ b/zbar/processor.h
|
||||
@@ -27,7 +27,9 @@
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
@@ -29,7 +29,9 @@
|
||||
#endif
|
||||
-#include <unistd.h>
|
||||
+#ifndef WIN32
|
||||
+# include <unistd.h>
|
||||
+#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
+#endif
|
||||
|
||||
diff --git a/zbar/thread.h b/zbar/thread.h
|
||||
index 96d6415..252d3f2 100644
|
||||
--- a/zbar/thread.h
|
||||
+++ b/zbar/thread.h
|
||||
@@ -35,7 +35,7 @@
|
||||
# define HAVE_THREADS
|
||||
# define ZTHREAD DWORD WINAPI
|
||||
|
||||
-typedef ZTHREAD (zbar_thread_proc_t)(void*);
|
||||
+typedef ZTHREAD zbar_thread_proc_t(void*);
|
||||
|
||||
typedef DWORD zbar_thread_id_t;
|
||||
|
||||
#include <zbar.h>
|
||||
#include "error.h"
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
diff --git a/zbar/decoder.c b/zbar/decoder.c
|
||||
index 7f7336f..e9ffc45 100644
|
||||
index 6c41b7f..cbf0bb7 100644
|
||||
--- a/zbar/decoder.c
|
||||
+++ b/zbar/decoder.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <stdlib.h> /* malloc, calloc, free */
|
||||
#include <stdio.h> /* snprintf */
|
||||
#include <string.h> /* memset, strlen */
|
||||
+#include <stddef.h> /* offsetof */
|
||||
#include <stdio.h> /* snprintf */
|
||||
#include <stdlib.h> /* malloc, calloc, free */
|
||||
#include <string.h> /* memset, strlen */
|
||||
+#include <stddef.h> /* offsetof */
|
||||
|
||||
#include <zbar.h>
|
||||
|
||||
@@ -113,7 +114,7 @@ void zbar_decoder_destroy (zbar_decoder_t *dcode)
|
||||
@@ -113,7 +114,7 @@ void zbar_decoder_destroy(zbar_decoder_t *dcode)
|
||||
|
||||
void zbar_decoder_reset (zbar_decoder_t *dcode)
|
||||
void zbar_decoder_reset(zbar_decoder_t *dcode)
|
||||
{
|
||||
- memset(dcode, 0, (long)&dcode->buf_alloc - (long)dcode);
|
||||
+ memset(dcode, 0, offsetof(zbar_decoder_t, buf_alloc));
|
||||
|
|
|
|||
|
|
@ -5857,8 +5857,8 @@
|
|||
"port-version": 0
|
||||
},
|
||||
"mchehab-zbar": {
|
||||
"baseline": "0.23.90",
|
||||
"port-version": 5
|
||||
"baseline": "0.23.93",
|
||||
"port-version": 0
|
||||
},
|
||||
"mcpp": {
|
||||
"baseline": "2.7.2.14",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "41ada8728385b27a6c57dca0817c78e967f3cb3d",
|
||||
"version": "0.23.93",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "368a491e8bad201ee1b88e88314b77c540dcea2b",
|
||||
"version": "0.23.90",
|
||||
|
|
|
|||
Loading…
Reference in New Issue