-
-
Save sgn/15ce90f26cd367499359dc24148dd007 to your computer and use it in GitHub Desktop.
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
From 6ab08252e5c6d8d0d1f025ebce6890be55cd1b40 Mon Sep 17 00:00:00 2001 | |
Message-Id: <6ab08252e5c6d8d0d1f025ebce6890be55cd1b40.1637900639.git.congdanhqx@gmail.com> | |
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= | |
<congdanhqx@gmail.com> | |
Date: Fri, 26 Nov 2021 10:36:04 +0700 | |
Subject: [PATCH 1/3] fixup! New package: qtlocation-plugin-googlemaps-0.0.0.2 | |
--- | |
srcpkgs/qtlocation-plugin-googlemaps/template | 7 +++---- | |
1 file changed, 3 insertions(+), 4 deletions(-) | |
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template | |
index 754271e3c7..ef301d5422 100644 | |
--- a/srcpkgs/qtlocation-plugin-googlemaps/template | |
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template | |
@@ -1,17 +1,16 @@ | |
# Template file for 'qtlocation-plugin-googlemaps' | |
pkgname=qtlocation-plugin-googlemaps | |
-_distpkgname=googlemaps | |
version=0.0.0.2 | |
revision=1 | |
-wrksrc=${_distpkgname}-v.${version} | |
+wrksrc=googlemaps-v.${version} | |
build_style=qmake | |
hostmakedepends="qt5-qmake qt5-devel" | |
makedepends="qt5-devel qt5-location-devel qt5-declarative-devel" | |
-short_desc="Googlemaps plugin for QtLocation" | |
+short_desc="Google Maps plugin for QtLocation" | |
maintainer="Alan Brown <adbrown@rocketmail.com>" | |
license="MIT" | |
homepage="https://github.com/vladest/googlemaps" | |
-distfiles="https://github.com/vladest/${_distpkgname}/archive/v.${version}.tar.gz" | |
+distfiles="https://github.com/vladest/googlemaps/archive/v.${version}.tar.gz" | |
checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0 | |
post_install() { | |
-- | |
2.34.1 | |
From 2e2c19d0b5288a8c1eb1543989462a81c9e0d27f Mon Sep 17 00:00:00 2001 | |
Message-Id: <2e2c19d0b5288a8c1eb1543989462a81c9e0d27f.1637900640.git.congdanhqx@gmail.com> | |
In-Reply-To: <6ab08252e5c6d8d0d1f025ebce6890be55cd1b40.1637900639.git.congdanhqx@gmail.com> | |
References: <6ab08252e5c6d8d0d1f025ebce6890be55cd1b40.1637900639.git.congdanhqx@gmail.com> | |
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= | |
<congdanhqx@gmail.com> | |
Date: Fri, 26 Nov 2021 10:57:41 +0700 | |
Subject: [PATCH 2/3] fixup! New package: libdivecomputer-subsurface-5.0.5 | |
--- | |
.../patches/PAGESIZE.patch | 873 ++++++++++++++++++ | |
srcpkgs/libdivecomputer-subsurface/template | 2 +- | |
2 files changed, 874 insertions(+), 1 deletion(-) | |
create mode 100644 srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch | |
diff --git a/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch | |
new file mode 100644 | |
index 0000000000..7ba54f1180 | |
--- /dev/null | |
+++ b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch | |
@@ -0,0 +1,873 @@ | |
+--- a/src/liquivision_lynx.c | |
++++ b/src/liquivision_lynx.c | |
+@@ -61,16 +61,16 @@ | |
+ #define MAXRETRIES 2 | |
+ #define MAXPACKET 12 | |
+ #define SEGMENTSIZE 0x400 | |
+-#define PAGESIZE 0x1000 | |
++#define XPAGESIZE 0x1000 | |
+ #define MEMSIZE 0x200000 | |
+ | |
+-#define RB_LOGBOOK_BEGIN (1 * PAGESIZE) | |
+-#define RB_LOGBOOK_END (25 * PAGESIZE) | |
++#define RB_LOGBOOK_BEGIN (1 * XPAGESIZE) | |
++#define RB_LOGBOOK_END (25 * XPAGESIZE) | |
+ #define RB_LOGBOOK_SIZE (RB_LOGBOOK_END - RB_LOGBOOK_BEGIN) | |
+ #define RB_LOGBOOK_DISTANCE(a,b) ringbuffer_distance (a, b, 1, RB_LOGBOOK_BEGIN, RB_LOGBOOK_END) | |
+ | |
+-#define RB_PROFILE_BEGIN (25 * PAGESIZE) | |
+-#define RB_PROFILE_END (500 * PAGESIZE) | |
++#define RB_PROFILE_BEGIN (25 * XPAGESIZE) | |
++#define RB_PROFILE_END (500 * XPAGESIZE) | |
+ #define RB_PROFILE_SIZE (RB_PROFILE_END - RB_PROFILE_BEGIN) | |
+ #define RB_PROFILE_DISTANCE(a,b) ringbuffer_distance (a, b, 1, RB_PROFILE_BEGIN, RB_PROFILE_END) | |
+ | |
+@@ -311,8 +311,8 @@ liquivision_lynx_device_read (dc_device_ | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+ // Get the page and segment number. | |
+- unsigned int page = (address / PAGESIZE); | |
+- unsigned int segment = (address % PAGESIZE) / SEGMENTSIZE; | |
++ unsigned int page = (address / XPAGESIZE); | |
++ unsigned int segment = (address % XPAGESIZE) / SEGMENTSIZE; | |
+ | |
+ unsigned int nbytes = 0; | |
+ while (nbytes < size) { | |
+@@ -336,7 +336,7 @@ liquivision_lynx_device_read (dc_device_ | |
+ | |
+ nbytes += SEGMENTSIZE; | |
+ segment++; | |
+- if (segment == (PAGESIZE / SEGMENTSIZE)) { | |
++ if (segment == (XPAGESIZE / SEGMENTSIZE)) { | |
+ segment = 0; | |
+ page++; | |
+ } | |
+@@ -410,13 +410,13 @@ liquivision_lynx_device_foreach (dc_devi | |
+ unsigned int headersize = (model == XEN) ? SZ_HEADER_XEN : SZ_HEADER_OTHER; | |
+ | |
+ // Get the number of headers per page. | |
+- unsigned int npages = PAGESIZE / headersize; | |
++ unsigned int npages = XPAGESIZE / headersize; | |
+ | |
+ // Get the logbook pointers. | |
+ unsigned int begin = array_uint16_le (config + 0x46); | |
+ unsigned int end = array_uint16_le (config + 0x48); | |
+- unsigned int rb_logbook_begin = RB_LOGBOOK_BEGIN + (begin / npages) * PAGESIZE + (begin % npages) * headersize; | |
+- unsigned int rb_logbook_end = RB_LOGBOOK_BEGIN + (end / npages) * PAGESIZE + (end % npages) * headersize; | |
++ unsigned int rb_logbook_begin = RB_LOGBOOK_BEGIN + (begin / npages) * XPAGESIZE + (begin % npages) * headersize; | |
++ unsigned int rb_logbook_end = RB_LOGBOOK_BEGIN + (end / npages) * XPAGESIZE + (end % npages) * headersize; | |
+ if (rb_logbook_begin < RB_LOGBOOK_BEGIN || rb_logbook_begin > RB_LOGBOOK_END || | |
+ rb_logbook_end < RB_LOGBOOK_BEGIN || rb_logbook_end > RB_LOGBOOK_END) { | |
+ ERROR (abstract->context, "Invalid logbook pointers (%04x, %04x).", | |
+@@ -478,8 +478,8 @@ liquivision_lynx_device_foreach (dc_devi | |
+ address = RB_LOGBOOK_END; | |
+ | |
+ // Skip the padding bytes. | |
+- if ((address % PAGESIZE) == 0) { | |
+- unsigned int padding = PAGESIZE % headersize; | |
++ if ((address % XPAGESIZE) == 0) { | |
++ unsigned int padding = XPAGESIZE % headersize; | |
+ unsigned char dummy[SZ_HEADER_MAX] = {0}; | |
+ status = dc_rbstream_read (rblogbook, &progress, dummy, padding); | |
+ if (status != DC_STATUS_SUCCESS) { | |
+--- a/src/oceanic_atom2.c | |
++++ b/src/oceanic_atom2.c | |
+@@ -994,11 +994,11 @@ oceanic_atom2_device_version (dc_device_ | |
+ if (!ISINSTANCE (abstract)) | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+- if (size < PAGESIZE) | |
++ if (size < XPAGESIZE) | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+ unsigned char command[] = {CMD_VERSION}; | |
+- dc_status_t rc = oceanic_atom2_transfer (device, command, sizeof (command), ACK, data, PAGESIZE, 1); | |
++ dc_status_t rc = oceanic_atom2_transfer (device, command, sizeof (command), ACK, data, XPAGESIZE, 1); | |
+ if (rc != DC_STATUS_SUCCESS) | |
+ return rc; | |
+ | |
+@@ -1012,8 +1012,8 @@ oceanic_atom2_device_read (dc_device_t * | |
+ oceanic_atom2_device_t *device = (oceanic_atom2_device_t*) abstract; | |
+ const oceanic_common_layout_t *layout = device->base.layout; | |
+ | |
+- if ((address % PAGESIZE != 0) || | |
+- (size % PAGESIZE != 0)) | |
++ if ((address % XPAGESIZE != 0) || | |
++ (size % XPAGESIZE != 0)) | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+ // Pick the correct read command and number of checksum bytes. | |
+@@ -1037,7 +1037,7 @@ oceanic_atom2_device_read (dc_device_t * | |
+ } | |
+ | |
+ // Pick the best pagesize to use. | |
+- unsigned int pagesize = device->bigpage * PAGESIZE; | |
++ unsigned int pagesize = device->bigpage * XPAGESIZE; | |
+ | |
+ // High memory state. | |
+ unsigned int highmem = 0; | |
+@@ -1049,7 +1049,7 @@ oceanic_atom2_device_read (dc_device_t * | |
+ highmem = layout->highmem; | |
+ read_cmd = CMD_READ16HI; | |
+ crc_size = 2; | |
+- pagesize = 16 * PAGESIZE; | |
++ pagesize = 16 * XPAGESIZE; | |
+ } | |
+ | |
+ // Calculate the page number after mapping the virtual high memory | |
+@@ -1058,7 +1058,7 @@ oceanic_atom2_device_read (dc_device_t * | |
+ | |
+ if (page != device->cached_page || highmem != device->cached_highmem) { | |
+ // Read the package. | |
+- unsigned int number = highmem ? page : page * device->bigpage; // This is always PAGESIZE, even in big page mode. | |
++ unsigned int number = highmem ? page : page * device->bigpage; // This is always XPAGESIZE, even in big page mode. | |
+ unsigned char command[] = {read_cmd, | |
+ (number >> 8) & 0xFF, // high | |
+ (number ) & 0xFF, // low | |
+@@ -1093,8 +1093,8 @@ oceanic_atom2_device_write (dc_device_t | |
+ { | |
+ oceanic_atom2_device_t *device = (oceanic_atom2_device_t*) abstract; | |
+ | |
+- if ((address % PAGESIZE != 0) || | |
+- (size % PAGESIZE != 0)) | |
++ if ((address % XPAGESIZE != 0) || | |
++ (size % XPAGESIZE != 0)) | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+ // Invalidate the cache. | |
+@@ -1104,7 +1104,7 @@ oceanic_atom2_device_write (dc_device_t | |
+ unsigned int nbytes = 0; | |
+ while (nbytes < size) { | |
+ // Prepare to write the package. | |
+- unsigned int number = address / PAGESIZE; | |
++ unsigned int number = address / XPAGESIZE; | |
+ unsigned char prepare[] = {CMD_WRITE, | |
+ (number >> 8) & 0xFF, // high | |
+ (number ) & 0xFF, // low | |
+@@ -1114,16 +1114,16 @@ oceanic_atom2_device_write (dc_device_t | |
+ return rc; | |
+ | |
+ // Write the package. | |
+- unsigned char command[PAGESIZE + 1] = {0}; | |
+- memcpy (command, data, PAGESIZE); | |
+- command[PAGESIZE] = checksum_add_uint8 (command, PAGESIZE, 0x00); | |
++ unsigned char command[XPAGESIZE + 1] = {0}; | |
++ memcpy (command, data, XPAGESIZE); | |
++ command[XPAGESIZE] = checksum_add_uint8 (command, XPAGESIZE, 0x00); | |
+ rc = oceanic_atom2_transfer (device, command, sizeof (command), ACK, NULL, 0, 0); | |
+ if (rc != DC_STATUS_SUCCESS) | |
+ return rc; | |
+ | |
+- nbytes += PAGESIZE; | |
+- address += PAGESIZE; | |
+- data += PAGESIZE; | |
++ nbytes += XPAGESIZE; | |
++ address += XPAGESIZE; | |
++ data += XPAGESIZE; | |
+ } | |
+ | |
+ return DC_STATUS_SUCCESS; | |
+--- a/src/oceanic_atom2_parser.c | |
++++ b/src/oceanic_atom2_parser.c | |
+@@ -165,8 +165,8 @@ oceanic_atom2_parser_create (dc_parser_t | |
+ | |
+ // Set the default values. | |
+ parser->model = model; | |
+- parser->headersize = 9 * PAGESIZE / 2; | |
+- parser->footersize = 2 * PAGESIZE / 2; | |
++ parser->headersize = 9 * XPAGESIZE / 2; | |
++ parser->footersize = 2 * XPAGESIZE / 2; | |
+ if (model == DATAMASK || model == COMPUMASK || | |
+ model == GEO || model == GEO20 || | |
+ model == VEO20 || model == VEO30 || | |
+@@ -177,30 +177,30 @@ oceanic_atom2_parser_create (dc_parser_t | |
+ model == I200 || model == I200C || | |
+ model == I300C || model == GEO40 || | |
+ model == VEO40 || model == I470TC) { | |
+- parser->headersize -= PAGESIZE; | |
++ parser->headersize -= XPAGESIZE; | |
+ } else if (model == VT4 || model == VT41) { | |
+- parser->headersize += PAGESIZE; | |
++ parser->headersize += XPAGESIZE; | |
+ } else if (model == TX1) { | |
+- parser->headersize += 2 * PAGESIZE; | |
++ parser->headersize += 2 * XPAGESIZE; | |
+ } else if (model == ATOM1 || model == I100 || | |
+ model == PROPLUS4) { | |
+- parser->headersize -= 2 * PAGESIZE; | |
++ parser->headersize -= 2 * XPAGESIZE; | |
+ } else if (model == F10A || model == F10B || | |
+ model == MUNDIAL2 || model == MUNDIAL3) { | |
+- parser->headersize = 3 * PAGESIZE; | |
++ parser->headersize = 3 * XPAGESIZE; | |
+ parser->footersize = 0; | |
+ } else if (model == F11A || model == F11B) { | |
+- parser->headersize = 5 * PAGESIZE; | |
++ parser->headersize = 5 * XPAGESIZE; | |
+ parser->footersize = 0; | |
+ } else if (model == A300CS || model == VTX || | |
+ model == I450T || model == I750TC || | |
+ model == I770R || model == SAGE || | |
+ model == BEACON) { | |
+- parser->headersize = 5 * PAGESIZE; | |
++ parser->headersize = 5 * XPAGESIZE; | |
+ } else if (model == PROPLUSX) { | |
+- parser->headersize = 3 * PAGESIZE; | |
++ parser->headersize = 3 * XPAGESIZE; | |
+ } else if (model == I550C || model == WISDOM4) { | |
+- parser->headersize = 5 * PAGESIZE / 2; | |
++ parser->headersize = 5 * XPAGESIZE / 2; | |
+ } | |
+ | |
+ parser->serial = serial; | |
+@@ -428,12 +428,12 @@ oceanic_atom2_parser_cache (oceanic_atom | |
+ return DC_STATUS_DATAFORMAT; | |
+ | |
+ // Get the offset to the header and footer sample. | |
+- unsigned int header = headersize - PAGESIZE / 2; | |
++ unsigned int header = headersize - XPAGESIZE / 2; | |
+ unsigned int footer = size - footersize; | |
+ if (parser->model == VT4 || parser->model == VT41 || | |
+ parser->model == A300AI || parser->model == VISION || | |
+ parser->model == XPAIR) { | |
+- header = 3 * PAGESIZE; | |
++ header = 3 * XPAGESIZE; | |
+ } | |
+ | |
+ // Get the dive mode. | |
+@@ -660,7 +660,7 @@ oceanic_atom2_parser_vendor (oceanic_ato | |
+ // Get the sample size. | |
+ unsigned int length = samplesize; | |
+ if (sampletype == 0xBB) { | |
+- length = PAGESIZE; | |
++ length = XPAGESIZE; | |
+ } | |
+ | |
+ // Vendor specific data | |
+@@ -738,7 +738,7 @@ oceanic_atom2_parser_samples_foreach (dc | |
+ } | |
+ } | |
+ | |
+- unsigned int samplesize = PAGESIZE / 2; | |
++ unsigned int samplesize = XPAGESIZE / 2; | |
+ if (parser->mode == FREEDIVE) { | |
+ if (parser->model == F10A || parser->model == F10B || | |
+ parser->model == F11A || parser->model == F11B || | |
+@@ -754,7 +754,7 @@ oceanic_atom2_parser_samples_foreach (dc | |
+ parser->model == I750TC || parser->model == PROPLUSX || | |
+ parser->model == I770R || parser->model == I470TC || | |
+ parser->model == SAGE || parser->model == BEACON) { | |
+- samplesize = PAGESIZE; | |
++ samplesize = XPAGESIZE; | |
+ } | |
+ | |
+ unsigned int have_temperature = 1, have_pressure = 1; | |
+@@ -824,7 +824,7 @@ oceanic_atom2_parser_samples_foreach (dc | |
+ // larger size. Check whether we have that many bytes available. | |
+ unsigned int length = samplesize; | |
+ if (sampletype == 0xBB) { | |
+- length = PAGESIZE; | |
++ length = XPAGESIZE; | |
+ if (offset + length > size - parser->footersize) { | |
+ ERROR (abstract->context, "Buffer overflow detected!"); | |
+ return DC_STATUS_DATAFORMAT; | |
+--- a/src/oceanic_common.c | |
++++ b/src/oceanic_common.c | |
+@@ -104,7 +104,7 @@ oceanic_common_match_pattern (const unsi | |
+ unsigned int value = 0; | |
+ unsigned int count = 0; | |
+ | |
+- for (unsigned int i = 0; i < PAGESIZE; ++i, ++pattern, ++string) { | |
++ for (unsigned int i = 0; i < XPAGESIZE; ++i, ++pattern, ++string) { | |
+ if (*pattern != '\0') { | |
+ // Compare the pattern. | |
+ if (*pattern != *string) | |
+@@ -206,7 +206,7 @@ oceanic_common_device_dump (dc_device_t | |
+ device_event_emit (abstract, DC_EVENT_VENDOR, &vendor); | |
+ | |
+ return device_dump_read (abstract, dc_buffer_get_data (buffer), | |
+- dc_buffer_get_size (buffer), PAGESIZE * device->multipage); | |
++ dc_buffer_get_size (buffer), XPAGESIZE * device->multipage); | |
+ } | |
+ | |
+ | |
+@@ -235,7 +235,7 @@ oceanic_common_device_logbook (dc_device | |
+ } | |
+ | |
+ // Read the pointer data. | |
+- unsigned char pointers[PAGESIZE] = {0}; | |
++ unsigned char pointers[XPAGESIZE] = {0}; | |
+ rc = dc_device_read (abstract, layout->cf_pointers, pointers, sizeof (pointers)); | |
+ if (rc != DC_STATUS_SUCCESS) { | |
+ ERROR (abstract->context, "Failed to read the memory page."); | |
+@@ -279,8 +279,8 @@ oceanic_common_device_logbook (dc_device | |
+ } | |
+ | |
+ // Update and emit a progress event. | |
+- progress->current += PAGESIZE; | |
+- progress->maximum += PAGESIZE; | |
++ progress->current += XPAGESIZE; | |
++ progress->maximum += XPAGESIZE; | |
+ progress->maximum -= (layout->rb_logbook_end - layout->rb_logbook_begin) - rb_logbook_size; | |
+ device_event_emit (abstract, DC_EVENT_PROGRESS, progress); | |
+ | |
+@@ -298,7 +298,7 @@ oceanic_common_device_logbook (dc_device | |
+ | |
+ // Create the ringbuffer stream. | |
+ dc_rbstream_t *rbstream = NULL; | |
+- rc = dc_rbstream_new (&rbstream, abstract, PAGESIZE, PAGESIZE * device->multipage, layout->rb_logbook_begin, layout->rb_logbook_end, rb_logbook_end); | |
++ rc = dc_rbstream_new (&rbstream, abstract, XPAGESIZE, XPAGESIZE * device->multipage, layout->rb_logbook_begin, layout->rb_logbook_end, rb_logbook_end); | |
+ if (rc != DC_STATUS_SUCCESS) { | |
+ ERROR (abstract->context, "Failed to create the ringbuffer stream."); | |
+ return rc; | |
+@@ -375,7 +375,7 @@ oceanic_common_device_profile (dc_device | |
+ const oceanic_common_layout_t *layout = device->layout; | |
+ | |
+ // Get the pagesize | |
+- unsigned int pagesize = layout->highmem ? 16 * PAGESIZE : PAGESIZE; | |
++ unsigned int pagesize = layout->highmem ? 16 * XPAGESIZE : XPAGESIZE; | |
+ | |
+ // Cache the logbook pointer and size. | |
+ const unsigned char *logbooks = dc_buffer_get_data (logbook); | |
+@@ -460,7 +460,7 @@ oceanic_common_device_profile (dc_device | |
+ | |
+ // Create the ringbuffer stream. | |
+ dc_rbstream_t *rbstream = NULL; | |
+- rc = dc_rbstream_new (&rbstream, abstract, PAGESIZE, PAGESIZE * device->multipage, layout->rb_profile_begin, layout->rb_profile_end, rb_profile_end); | |
++ rc = dc_rbstream_new (&rbstream, abstract, XPAGESIZE, XPAGESIZE * device->multipage, layout->rb_profile_begin, layout->rb_profile_end, rb_profile_end); | |
+ if (rc != DC_STATUS_SUCCESS) { | |
+ ERROR (abstract->context, "Failed to create the ringbuffer stream."); | |
+ return rc; | |
+@@ -553,7 +553,7 @@ oceanic_common_device_profile (dc_device | |
+ unsigned int value_hi = value & 0xE000; | |
+ unsigned int value_lo = value & 0x0FFF; | |
+ unsigned int npages = ((value_hi >> 1) | value_lo) + 1; | |
+- unsigned int length = npages * PAGESIZE; | |
++ unsigned int length = npages * XPAGESIZE; | |
+ if (rb_entry_size > length) { | |
+ rb_entry_size = length; | |
+ } | |
+@@ -584,7 +584,7 @@ oceanic_common_device_foreach (dc_device | |
+ | |
+ // Enable progress notifications. | |
+ dc_event_progress_t progress = EVENT_PROGRESS_INITIALIZER; | |
+- progress.maximum = PAGESIZE + | |
++ progress.maximum = XPAGESIZE + | |
+ (layout->rb_logbook_end - layout->rb_logbook_begin) + | |
+ (layout->rb_profile_end - layout->rb_profile_begin); | |
+ device_event_emit (abstract, DC_EVENT_PROGRESS, &progress); | |
+@@ -596,7 +596,7 @@ oceanic_common_device_foreach (dc_device | |
+ device_event_emit (abstract, DC_EVENT_VENDOR, &vendor); | |
+ | |
+ // Read the device id. | |
+- unsigned char id[PAGESIZE] = {0}; | |
++ unsigned char id[XPAGESIZE] = {0}; | |
+ dc_status_t rc = dc_device_read (abstract, layout->cf_devinfo, id, sizeof (id)); | |
+ if (rc != DC_STATUS_SUCCESS) { | |
+ ERROR (abstract->context, "Failed to read the memory page."); | |
+@@ -604,7 +604,7 @@ oceanic_common_device_foreach (dc_device | |
+ } | |
+ | |
+ // Update and emit a progress event. | |
+- progress.current += PAGESIZE; | |
++ progress.current += XPAGESIZE; | |
+ device_event_emit (abstract, DC_EVENT_PROGRESS, &progress); | |
+ | |
+ // Emit a device info event. | |
+--- a/src/oceanic_common.h | |
++++ b/src/oceanic_common.h | |
+@@ -28,7 +28,7 @@ | |
+ extern "C" { | |
+ #endif /* __cplusplus */ | |
+ | |
+-#define PAGESIZE 0x10 | |
++#define XPAGESIZE 0x10 | |
+ #define FPMAXSIZE 0x20 | |
+ | |
+ #define OCEANIC_COMMON_MATCH(version,patterns,firmware) \ | |
+@@ -62,7 +62,7 @@ typedef struct oceanic_common_layout_t { | |
+ typedef struct oceanic_common_device_t { | |
+ dc_device_t base; | |
+ unsigned int firmware; | |
+- unsigned char version[PAGESIZE]; | |
++ unsigned char version[XPAGESIZE]; | |
+ unsigned char fingerprint[FPMAXSIZE]; | |
+ const oceanic_common_layout_t *layout; | |
+ unsigned int multipage; | |
+@@ -75,7 +75,7 @@ typedef struct oceanic_common_device_vta | |
+ } oceanic_common_device_vtable_t; | |
+ | |
+ typedef struct oceanic_common_version_t { | |
+- unsigned char pattern[PAGESIZE + 1]; | |
++ unsigned char pattern[XPAGESIZE + 1]; | |
+ unsigned int firmware; | |
+ const oceanic_common_layout_t *layout; | |
+ } oceanic_common_version_t; | |
+--- a/src/oceanic_veo250.c | |
++++ b/src/oceanic_veo250.c | |
+@@ -384,24 +384,24 @@ oceanic_veo250_device_version (dc_device | |
+ if (!ISINSTANCE (abstract)) | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+- if (size < PAGESIZE) | |
++ if (size < XPAGESIZE) | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+- unsigned char answer[PAGESIZE + 2] = {0}; | |
++ unsigned char answer[XPAGESIZE + 2] = {0}; | |
+ unsigned char command[2] = {0x90, 0x00}; | |
+ dc_status_t rc = oceanic_veo250_transfer (device, command, sizeof (command), answer, sizeof (answer)); | |
+ if (rc != DC_STATUS_SUCCESS) | |
+ return rc; | |
+ | |
+ // Verify the checksum of the answer. | |
+- unsigned char crc = answer[PAGESIZE]; | |
+- unsigned char ccrc = checksum_add_uint8 (answer, PAGESIZE, 0x00); | |
++ unsigned char crc = answer[XPAGESIZE]; | |
++ unsigned char ccrc = checksum_add_uint8 (answer, XPAGESIZE, 0x00); | |
+ if (crc != ccrc) { | |
+ ERROR (abstract->context, "Unexpected answer checksum."); | |
+ return DC_STATUS_PROTOCOL; | |
+ } | |
+ | |
+- memcpy (data, answer, PAGESIZE); | |
++ memcpy (data, answer, XPAGESIZE); | |
+ | |
+ return DC_STATUS_SUCCESS; | |
+ } | |
+@@ -412,28 +412,28 @@ oceanic_veo250_device_read (dc_device_t | |
+ { | |
+ oceanic_veo250_device_t *device = (oceanic_veo250_device_t*) abstract; | |
+ | |
+- if ((address % PAGESIZE != 0) || | |
+- (size % PAGESIZE != 0)) | |
++ if ((address % XPAGESIZE != 0) || | |
++ (size % XPAGESIZE != 0)) | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+ unsigned int nbytes = 0; | |
+ while (nbytes < size) { | |
+ // Calculate the number of packages. | |
+- unsigned int npackets = (size - nbytes) / PAGESIZE; | |
++ unsigned int npackets = (size - nbytes) / XPAGESIZE; | |
+ if (npackets > MULTIPAGE) | |
+ npackets = MULTIPAGE; | |
+ | |
+ // Read the package. | |
+- unsigned int first = address / PAGESIZE; | |
++ unsigned int first = address / XPAGESIZE; | |
+ unsigned int last = first + npackets - 1; | |
+- unsigned char answer[(PAGESIZE + 1) * MULTIPAGE + 1] = {0}; | |
++ unsigned char answer[(XPAGESIZE + 1) * MULTIPAGE + 1] = {0}; | |
+ unsigned char command[6] = {0x20, | |
+ (first ) & 0xFF, // low | |
+ (first >> 8) & 0xFF, // high | |
+ (last ) & 0xFF, // low | |
+ (last >> 8) & 0xFF, // high | |
+ 0}; | |
+- dc_status_t rc = oceanic_veo250_transfer (device, command, sizeof (command), answer, (PAGESIZE + 1) * npackets + 1); | |
++ dc_status_t rc = oceanic_veo250_transfer (device, command, sizeof (command), answer, (XPAGESIZE + 1) * npackets + 1); | |
+ if (rc != DC_STATUS_SUCCESS) | |
+ return rc; | |
+ | |
+@@ -442,19 +442,19 @@ oceanic_veo250_device_read (dc_device_t | |
+ unsigned int offset = 0; | |
+ for (unsigned int i = 0; i < npackets; ++i) { | |
+ // Verify the checksum of the answer. | |
+- unsigned char crc = answer[offset + PAGESIZE]; | |
+- unsigned char ccrc = checksum_add_uint8 (answer + offset, PAGESIZE, 0x00); | |
++ unsigned char crc = answer[offset + XPAGESIZE]; | |
++ unsigned char ccrc = checksum_add_uint8 (answer + offset, XPAGESIZE, 0x00); | |
+ if (crc != ccrc) { | |
+ ERROR (abstract->context, "Unexpected answer checksum."); | |
+ return DC_STATUS_PROTOCOL; | |
+ } | |
+ | |
+- memcpy (data, answer + offset, PAGESIZE); | |
++ memcpy (data, answer + offset, XPAGESIZE); | |
+ | |
+- offset += PAGESIZE + 1; | |
+- nbytes += PAGESIZE; | |
+- address += PAGESIZE; | |
+- data += PAGESIZE; | |
++ offset += XPAGESIZE + 1; | |
++ nbytes += XPAGESIZE; | |
++ address += XPAGESIZE; | |
++ data += XPAGESIZE; | |
+ } | |
+ } | |
+ | |
+--- a/src/oceanic_veo250_parser.c | |
++++ b/src/oceanic_veo250_parser.c | |
+@@ -142,7 +142,7 @@ oceanic_veo250_parser_get_field (dc_pars | |
+ const unsigned char *data = abstract->data; | |
+ unsigned int size = abstract->size; | |
+ | |
+- if (size < 7 * PAGESIZE / 2) | |
++ if (size < 7 * XPAGESIZE / 2) | |
+ return DC_STATUS_DATAFORMAT; | |
+ | |
+ if (!parser->cached) { | |
+@@ -157,7 +157,7 @@ oceanic_veo250_parser_get_field (dc_pars | |
+ parser->maxdepth = statistics.maxdepth; | |
+ } | |
+ | |
+- unsigned int footer = size - PAGESIZE; | |
++ unsigned int footer = size - XPAGESIZE; | |
+ | |
+ dc_gasmix_t *gasmix = (dc_gasmix_t *) value; | |
+ | |
+@@ -196,7 +196,7 @@ oceanic_veo250_parser_samples_foreach (d | |
+ const unsigned char *data = abstract->data; | |
+ unsigned int size = abstract->size; | |
+ | |
+- if (size < 7 * PAGESIZE / 2) | |
++ if (size < 7 * XPAGESIZE / 2) | |
+ return DC_STATUS_DATAFORMAT; | |
+ | |
+ unsigned int time = 0; | |
+@@ -221,13 +221,13 @@ oceanic_veo250_parser_samples_foreach (d | |
+ break; | |
+ } | |
+ | |
+- unsigned int offset = 5 * PAGESIZE / 2; | |
+- while (offset + PAGESIZE / 2 <= size - PAGESIZE) { | |
++ unsigned int offset = 5 * XPAGESIZE / 2; | |
++ while (offset + XPAGESIZE / 2 <= size - XPAGESIZE) { | |
+ dc_sample_value_t sample = {0}; | |
+ | |
+ // Ignore empty samples. | |
+- if (array_isequal (data + offset, PAGESIZE / 2, 0x00)) { | |
+- offset += PAGESIZE / 2; | |
++ if (array_isequal (data + offset, XPAGESIZE / 2, 0x00)) { | |
++ offset += XPAGESIZE / 2; | |
+ continue; | |
+ } | |
+ | |
+@@ -238,7 +238,7 @@ oceanic_veo250_parser_samples_foreach (d | |
+ | |
+ // Vendor specific data | |
+ sample.vendor.type = SAMPLE_VENDOR_OCEANIC_VEO250; | |
+- sample.vendor.size = PAGESIZE / 2; | |
++ sample.vendor.size = XPAGESIZE / 2; | |
+ sample.vendor.data = data + offset; | |
+ if (callback) callback (DC_SAMPLE_VENDOR, sample, userdata); | |
+ | |
+@@ -283,7 +283,7 @@ oceanic_veo250_parser_samples_foreach (d | |
+ if (callback) callback (DC_SAMPLE_DECO, sample, userdata); | |
+ } | |
+ | |
+- offset += PAGESIZE / 2; | |
++ offset += XPAGESIZE / 2; | |
+ } | |
+ | |
+ return DC_STATUS_SUCCESS; | |
+--- a/src/oceanic_vtpro.c | |
++++ b/src/oceanic_vtpro.c | |
+@@ -296,7 +296,7 @@ oceanic_aeris500ai_device_logbook (dc_de | |
+ | |
+ assert (device != NULL); | |
+ assert (device->base.layout != NULL); | |
+- assert (device->base.layout->rb_logbook_entry_size == PAGESIZE / 2); | |
++ assert (device->base.layout->rb_logbook_entry_size == XPAGESIZE / 2); | |
+ assert (device->base.layout->rb_logbook_begin == device->base.layout->rb_logbook_end); | |
+ assert (progress != NULL); | |
+ | |
+@@ -307,7 +307,7 @@ oceanic_aeris500ai_device_logbook (dc_de | |
+ return DC_STATUS_NOMEMORY; | |
+ | |
+ // Read the pointer data. | |
+- unsigned char pointers[PAGESIZE] = {0}; | |
++ unsigned char pointers[XPAGESIZE] = {0}; | |
+ rc = oceanic_vtpro_device_read (abstract, layout->cf_pointers, pointers, sizeof (pointers)); | |
+ if (rc != DC_STATUS_SUCCESS) { | |
+ ERROR (abstract->context, "Failed to read the memory page."); | |
+@@ -318,12 +318,12 @@ oceanic_aeris500ai_device_logbook (dc_de | |
+ unsigned int last = pointers[0x03]; | |
+ | |
+ // Update and emit a progress event. | |
+- progress->current += PAGESIZE; | |
+- progress->maximum += PAGESIZE + (last + 1) * PAGESIZE / 2; | |
++ progress->current += XPAGESIZE; | |
++ progress->maximum += XPAGESIZE + (last + 1) * XPAGESIZE / 2; | |
+ device_event_emit (abstract, DC_EVENT_PROGRESS, progress); | |
+ | |
+ // Allocate memory for the logbook entries. | |
+- if (!dc_buffer_reserve (logbook, (last + 1) * PAGESIZE / 2)) | |
++ if (!dc_buffer_reserve (logbook, (last + 1) * XPAGESIZE / 2)) | |
+ return DC_STATUS_NOMEMORY; | |
+ | |
+ // Send the logbook index command. | |
+@@ -340,7 +340,7 @@ oceanic_aeris500ai_device_logbook (dc_de | |
+ // Read the logbook index. | |
+ for (unsigned int i = 0; i < last + 1; ++i) { | |
+ // Receive the answer of the dive computer. | |
+- unsigned char answer[PAGESIZE / 2 + 1] = {0}; | |
++ unsigned char answer[XPAGESIZE / 2 + 1] = {0}; | |
+ rc = dc_iostream_read (device->iostream, answer, sizeof(answer), NULL); | |
+ if (rc != DC_STATUS_SUCCESS) { | |
+ ERROR (abstract->context, "Failed to receive the answer."); | |
+@@ -348,28 +348,28 @@ oceanic_aeris500ai_device_logbook (dc_de | |
+ } | |
+ | |
+ // Verify the checksum of the answer. | |
+- unsigned char crc = answer[PAGESIZE / 2]; | |
+- unsigned char ccrc = checksum_add_uint4 (answer, PAGESIZE / 2, 0x00); | |
++ unsigned char crc = answer[XPAGESIZE / 2]; | |
++ unsigned char ccrc = checksum_add_uint4 (answer, XPAGESIZE / 2, 0x00); | |
+ if (crc != ccrc) { | |
+ ERROR (abstract->context, "Unexpected answer checksum."); | |
+ return DC_STATUS_PROTOCOL; | |
+ } | |
+ | |
+ // Update and emit a progress event. | |
+- progress->current += PAGESIZE / 2; | |
++ progress->current += XPAGESIZE / 2; | |
+ device_event_emit (abstract, DC_EVENT_PROGRESS, progress); | |
+ | |
+ // Ignore uninitialized entries. | |
+- if (array_isequal (answer, PAGESIZE / 2, 0xFF)) { | |
++ if (array_isequal (answer, XPAGESIZE / 2, 0xFF)) { | |
+ WARNING (abstract->context, "Uninitialized logbook entries detected!"); | |
+ continue; | |
+ } | |
+ | |
+ // Compare the fingerprint to identify previously downloaded entries. | |
+- if (memcmp (answer, device->base.fingerprint, PAGESIZE / 2) == 0) { | |
++ if (memcmp (answer, device->base.fingerprint, XPAGESIZE / 2) == 0) { | |
+ dc_buffer_clear (logbook); | |
+ } else { | |
+- dc_buffer_append (logbook, answer, PAGESIZE / 2); | |
++ dc_buffer_append (logbook, answer, XPAGESIZE / 2); | |
+ } | |
+ } | |
+ | |
+@@ -560,7 +560,7 @@ oceanic_vtpro_device_version (dc_device_ | |
+ if (!ISINSTANCE (abstract)) | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+- if (size < PAGESIZE) | |
++ if (size < XPAGESIZE) | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+ // Switch the device into download mode. The response is ignored here, | |
+@@ -568,14 +568,14 @@ oceanic_vtpro_device_version (dc_device_ | |
+ // response of the first part of the other command in this function. | |
+ | |
+ unsigned char cmd[2] = {0x88, 0x00}; | |
+- unsigned char ans[PAGESIZE / 2 + 1] = {0}; | |
++ unsigned char ans[XPAGESIZE / 2 + 1] = {0}; | |
+ dc_status_t rc = oceanic_vtpro_transfer (device, cmd, sizeof (cmd), ans, sizeof (ans)); | |
+ if (rc != DC_STATUS_SUCCESS) | |
+ return rc; | |
+ | |
+ // Verify the checksum of the answer. | |
+- unsigned char crc = ans[PAGESIZE / 2]; | |
+- unsigned char ccrc = checksum_add_uint4 (ans, PAGESIZE / 2, 0x00); | |
++ unsigned char crc = ans[XPAGESIZE / 2]; | |
++ unsigned char ccrc = checksum_add_uint4 (ans, XPAGESIZE / 2, 0x00); | |
+ if (crc != ccrc) { | |
+ ERROR (abstract->context, "Unexpected answer checksum."); | |
+ return DC_STATUS_PROTOCOL; | |
+@@ -586,31 +586,31 @@ oceanic_vtpro_device_version (dc_device_ | |
+ // split over two packets, but we join both parts again. | |
+ for (unsigned int i = 0; i < 2; ++i) { | |
+ unsigned char command[4] = {0x72, 0x03, i * 0x10, 0x00}; | |
+- unsigned char answer[PAGESIZE / 2 + 2] = {0}; | |
++ unsigned char answer[XPAGESIZE / 2 + 2] = {0}; | |
+ rc = oceanic_vtpro_transfer (device, command, sizeof (command), answer, sizeof (answer)); | |
+ if (rc != DC_STATUS_SUCCESS) | |
+ return rc; | |
+ | |
+ // Verify the checksum of the answer. | |
+- crc = answer[PAGESIZE / 2]; | |
+- ccrc = checksum_add_uint4 (answer, PAGESIZE / 2, 0x00); | |
++ crc = answer[XPAGESIZE / 2]; | |
++ ccrc = checksum_add_uint4 (answer, XPAGESIZE / 2, 0x00); | |
+ if (crc != ccrc) { | |
+ ERROR (abstract->context, "Unexpected answer checksum."); | |
+ return DC_STATUS_PROTOCOL; | |
+ } | |
+ | |
+ // Verify the last byte of the answer. | |
+- if (answer[PAGESIZE / 2 + 1] != END) { | |
++ if (answer[XPAGESIZE / 2 + 1] != END) { | |
+ ERROR (abstract->context, "Unexpected answer byte."); | |
+ return DC_STATUS_PROTOCOL; | |
+ } | |
+ | |
+ // Append the answer to the output buffer. | |
+- memcpy (data + i * PAGESIZE / 2, answer, PAGESIZE / 2); | |
++ memcpy (data + i * XPAGESIZE / 2, answer, XPAGESIZE / 2); | |
+ } | |
+ } else { | |
+ // Return an empty device identification string. | |
+- memset (data, 0x00, PAGESIZE); | |
++ memset (data, 0x00, XPAGESIZE); | |
+ } | |
+ | |
+ return DC_STATUS_SUCCESS; | |
+@@ -622,47 +622,47 @@ oceanic_vtpro_device_read (dc_device_t * | |
+ { | |
+ oceanic_vtpro_device_t *device = (oceanic_vtpro_device_t*) abstract; | |
+ | |
+- if ((address % PAGESIZE != 0) || | |
+- (size % PAGESIZE != 0)) | |
++ if ((address % XPAGESIZE != 0) || | |
++ (size % XPAGESIZE != 0)) | |
+ return DC_STATUS_INVALIDARGS; | |
+ | |
+ unsigned int nbytes = 0; | |
+ while (nbytes < size) { | |
+ // Calculate the number of packages. | |
+- unsigned int npackets = (size - nbytes) / PAGESIZE; | |
++ unsigned int npackets = (size - nbytes) / XPAGESIZE; | |
+ if (npackets > MULTIPAGE) | |
+ npackets = MULTIPAGE; | |
+ | |
+ // Read the package. | |
+- unsigned int first = address / PAGESIZE; | |
++ unsigned int first = address / XPAGESIZE; | |
+ unsigned int last = first + npackets - 1; | |
+- unsigned char answer[(PAGESIZE + 1) * MULTIPAGE] = {0}; | |
++ unsigned char answer[(XPAGESIZE + 1) * MULTIPAGE] = {0}; | |
+ unsigned char command[6] = {0x34, | |
+ (first >> 8) & 0xFF, // high | |
+ (first ) & 0xFF, // low | |
+ (last >> 8) & 0xFF, // high | |
+ (last ) & 0xFF, // low | |
+ 0x00}; | |
+- dc_status_t rc = oceanic_vtpro_transfer (device, command, sizeof (command), answer, (PAGESIZE + 1) * npackets); | |
++ dc_status_t rc = oceanic_vtpro_transfer (device, command, sizeof (command), answer, (XPAGESIZE + 1) * npackets); | |
+ if (rc != DC_STATUS_SUCCESS) | |
+ return rc; | |
+ | |
+ unsigned int offset = 0; | |
+ for (unsigned int i = 0; i < npackets; ++i) { | |
+ // Verify the checksum of the answer. | |
+- unsigned char crc = answer[offset + PAGESIZE]; | |
+- unsigned char ccrc = checksum_add_uint8 (answer + offset, PAGESIZE, 0x00); | |
++ unsigned char crc = answer[offset + XPAGESIZE]; | |
++ unsigned char ccrc = checksum_add_uint8 (answer + offset, XPAGESIZE, 0x00); | |
+ if (crc != ccrc) { | |
+ ERROR (abstract->context, "Unexpected answer checksum."); | |
+ return DC_STATUS_PROTOCOL; | |
+ } | |
+ | |
+- memcpy (data, answer + offset, PAGESIZE); | |
++ memcpy (data, answer + offset, XPAGESIZE); | |
+ | |
+- offset += PAGESIZE + 1; | |
+- nbytes += PAGESIZE; | |
+- address += PAGESIZE; | |
+- data += PAGESIZE; | |
++ offset += XPAGESIZE + 1; | |
++ nbytes += XPAGESIZE; | |
++ address += XPAGESIZE; | |
++ data += XPAGESIZE; | |
+ } | |
+ } | |
+ | |
+--- a/src/oceanic_vtpro_parser.c | |
++++ b/src/oceanic_vtpro_parser.c | |
+@@ -155,7 +155,7 @@ oceanic_vtpro_parser_get_field (dc_parse | |
+ const unsigned char *data = abstract->data; | |
+ unsigned int size = abstract->size; | |
+ | |
+- if (size < 7 * PAGESIZE / 2) | |
++ if (size < 7 * XPAGESIZE / 2) | |
+ return DC_STATUS_DATAFORMAT; | |
+ | |
+ if (!parser->cached) { | |
+@@ -170,7 +170,7 @@ oceanic_vtpro_parser_get_field (dc_parse | |
+ parser->maxdepth = statistics.maxdepth; | |
+ } | |
+ | |
+- unsigned int footer = size - PAGESIZE; | |
++ unsigned int footer = size - XPAGESIZE; | |
+ | |
+ unsigned int oxygen = 0; | |
+ unsigned int maxdepth = 0; | |
+@@ -237,7 +237,7 @@ oceanic_vtpro_parser_samples_foreach (dc | |
+ const unsigned char *data = abstract->data; | |
+ unsigned int size = abstract->size; | |
+ | |
+- if (size < 7 * PAGESIZE / 2) | |
++ if (size < 7 * XPAGESIZE / 2) | |
+ return DC_STATUS_DATAFORMAT; | |
+ | |
+ unsigned int time = 0; | |
+@@ -259,14 +259,14 @@ oceanic_vtpro_parser_samples_foreach (dc | |
+ // Initialize the state for the timestamp processing. | |
+ unsigned int timestamp = 0, count = 0, i = 0; | |
+ | |
+- unsigned int offset = 5 * PAGESIZE / 2; | |
+- while (offset + PAGESIZE / 2 <= size - PAGESIZE) { | |
++ unsigned int offset = 5 * XPAGESIZE / 2; | |
++ while (offset + XPAGESIZE / 2 <= size - XPAGESIZE) { | |
+ dc_sample_value_t sample = {0}; | |
+ | |
+ // Ignore empty samples. | |
+- if (array_isequal (data + offset, PAGESIZE / 2, 0x00) || | |
+- array_isequal (data + offset, PAGESIZE / 2, 0xFF)) { | |
+- offset += PAGESIZE / 2; | |
++ if (array_isequal (data + offset, XPAGESIZE / 2, 0x00) || | |
++ array_isequal (data + offset, XPAGESIZE / 2, 0xFF)) { | |
++ offset += XPAGESIZE / 2; | |
+ continue; | |
+ } | |
+ | |
+@@ -288,12 +288,12 @@ oceanic_vtpro_parser_samples_foreach (dc | |
+ // With a depth based sample interval, the exact number | |
+ // of samples for a single timestamp needs to be counted. | |
+ count = 1; | |
+- unsigned int idx = offset + PAGESIZE / 2 ; | |
+- while (idx + PAGESIZE / 2 <= size - PAGESIZE) { | |
++ unsigned int idx = offset + XPAGESIZE / 2 ; | |
++ while (idx + XPAGESIZE / 2 <= size - XPAGESIZE) { | |
+ // Ignore empty samples. | |
+- if (array_isequal (data + idx, PAGESIZE / 2, 0x00) || | |
+- array_isequal (data + idx, PAGESIZE / 2, 0xFF)) { | |
+- idx += PAGESIZE / 2; | |
++ if (array_isequal (data + idx, XPAGESIZE / 2, 0x00) || | |
++ array_isequal (data + idx, XPAGESIZE / 2, 0xFF)) { | |
++ idx += XPAGESIZE / 2; | |
+ continue; | |
+ } | |
+ | |
+@@ -301,7 +301,7 @@ oceanic_vtpro_parser_samples_foreach (dc | |
+ if (next != current) | |
+ break; | |
+ | |
+- idx += PAGESIZE / 2; | |
++ idx += XPAGESIZE / 2; | |
+ count++; | |
+ } | |
+ } | |
+@@ -317,7 +317,7 @@ oceanic_vtpro_parser_samples_foreach (dc | |
+ } | |
+ if (i >= count) { | |
+ WARNING (abstract->context, "Unexpected sample with the same timestamp ignored."); | |
+- offset += PAGESIZE / 2; | |
++ offset += XPAGESIZE / 2; | |
+ continue; | |
+ } | |
+ } | |
+@@ -335,7 +335,7 @@ oceanic_vtpro_parser_samples_foreach (dc | |
+ | |
+ // Vendor specific data | |
+ sample.vendor.type = SAMPLE_VENDOR_OCEANIC_VTPRO; | |
+- sample.vendor.size = PAGESIZE / 2; | |
++ sample.vendor.size = XPAGESIZE / 2; | |
+ sample.vendor.data = data + offset; | |
+ if (callback) callback (DC_SAMPLE_VENDOR, sample, userdata); | |
+ | |
+@@ -374,7 +374,7 @@ oceanic_vtpro_parser_samples_foreach (dc | |
+ if (callback) callback (DC_SAMPLE_DECO, sample, userdata); | |
+ } | |
+ | |
+- offset += PAGESIZE / 2; | |
++ offset += XPAGESIZE / 2; | |
+ } | |
+ | |
+ return DC_STATUS_SUCCESS; | |
diff --git a/srcpkgs/libdivecomputer-subsurface/template b/srcpkgs/libdivecomputer-subsurface/template | |
index 30b595dfd1..e996984352 100644 | |
--- a/srcpkgs/libdivecomputer-subsurface/template | |
+++ b/srcpkgs/libdivecomputer-subsurface/template | |
@@ -5,13 +5,13 @@ revision=1 | |
wrksrc="libdivecomputer-subsurface-branch-${version}" | |
build_style=gnu-configure | |
hostmakedepends="libtool automake autoconf pkg-config" | |
+makedepends="libusb-devel libmtp-devel hidapi-devel libbluetooth-devel" | |
short_desc="Subsurface version of libdivecomputer" | |
maintainer="Alan Brown <adbrown@rocketmail.com>" | |
license="LGPL-2.1-only" | |
homepage="https://subsurface-divelog.org/" | |
distfiles="${homepage}/downloads/${pkgname}-branch-${version}.tgz" | |
checksum=94b69d1b12d3c35376fdce96088c0cce21392a37a0ff67991246171d22055c02 | |
-shlib_provides="libdivecomputer.so" | |
pre_configure() { | |
autoreconf -fi | |
-- | |
2.34.1 | |
From 27920ca23491545b8b575f8b4cd1dcce9eb92c28 Mon Sep 17 00:00:00 2001 | |
Message-Id: <27920ca23491545b8b575f8b4cd1dcce9eb92c28.1637900640.git.congdanhqx@gmail.com> | |
In-Reply-To: <6ab08252e5c6d8d0d1f025ebce6890be55cd1b40.1637900639.git.congdanhqx@gmail.com> | |
References: <6ab08252e5c6d8d0d1f025ebce6890be55cd1b40.1637900639.git.congdanhqx@gmail.com> | |
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= | |
<congdanhqx@gmail.com> | |
Date: Fri, 26 Nov 2021 11:19:50 +0700 | |
Subject: [PATCH 3/3] fixup! New package: Subsurface-5.0.5 | |
--- | |
.../patches/core-depends-generated-ui.patch | 10 ++++++++++ | |
srcpkgs/Subsurface/patches/make-or-ninja.patch | 11 +++++++++++ | |
srcpkgs/Subsurface/template | 6 +----- | |
3 files changed, 22 insertions(+), 5 deletions(-) | |
create mode 100644 srcpkgs/Subsurface/patches/core-depends-generated-ui.patch | |
create mode 100644 srcpkgs/Subsurface/patches/make-or-ninja.patch | |
diff --git a/srcpkgs/Subsurface/patches/core-depends-generated-ui.patch b/srcpkgs/Subsurface/patches/core-depends-generated-ui.patch | |
new file mode 100644 | |
index 0000000000..f35aa99ef8 | |
--- /dev/null | |
+++ b/srcpkgs/Subsurface/patches/core-depends-generated-ui.patch | |
@@ -0,0 +1,10 @@ | |
+--- a/CMakeLists.txt | |
++++ b/CMakeLists.txt | |
+@@ -414,6 +414,7 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MAT | |
+ add_dependencies(subsurface_interface subsurface_generated_ui) | |
+ add_dependencies(subsurface_profile subsurface_generated_ui) | |
+ add_dependencies(subsurface_models_desktop subsurface_generated_ui) | |
++ add_dependencies(subsurface_corelib subsurface_generated_ui) | |
+ add_dependencies(subsurface_generated_ui version) | |
+ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable") | |
+ set(DOWNLOADER_APP | |
diff --git a/srcpkgs/Subsurface/patches/make-or-ninja.patch b/srcpkgs/Subsurface/patches/make-or-ninja.patch | |
new file mode 100644 | |
index 0000000000..08f11a434b | |
--- /dev/null | |
+++ b/srcpkgs/Subsurface/patches/make-or-ninja.patch | |
@@ -0,0 +1,11 @@ | |
+--- a/cmake/Modules/RunOnBuildDir.cmake | |
++++ b/cmake/Modules/RunOnBuildDir.cmake | |
+@@ -25,7 +25,7 @@ if(NOT NO_DOCS) | |
+ add_custom_target( | |
+ documentation ALL | |
+ COMMAND | |
+- ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}/Documentation OUT=${CMAKE_BINARY_DIR}/Documentation/ doc | |
++ make -C ${CMAKE_SOURCE_DIR}/Documentation OUT=${CMAKE_BINARY_DIR}/Documentation/ doc | |
+ DEPENDS documentationLink | |
+ ) | |
+ endif() | |
diff --git a/srcpkgs/Subsurface/template b/srcpkgs/Subsurface/template | |
index 4bc80569ae..c93cdbe19e 100644 | |
--- a/srcpkgs/Subsurface/template | |
+++ b/srcpkgs/Subsurface/template | |
@@ -4,9 +4,7 @@ version=5.0.5 | |
revision=1 | |
build_style=cmake | |
configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable | |
- -DCMAKE_BUILD_TYPE=Release -DBTSUPPORT=ON -DNO_USERMANUAL=OFF | |
- -DNO_PRINTING=OFF" | |
-make_cmd=make | |
+ -DBTSUPPORT=ON -DNO_USERMANUAL=OFF -DNO_PRINTING=OFF" | |
hostmakedepends="pkg-config autoconf automake libtool qt5-devel" | |
makedepends="libdivecomputer-subsurface-devel libbluetooth-devel libcurl-devel | |
sqlite-devel libssh2-devel eudev-libudev-devel libusb-devel libxml2-devel | |
@@ -20,5 +18,3 @@ license="GPL-2.0-only" | |
homepage="https://subsurface-divelog.org/" | |
distfiles="${homepage}/downloads/${pkgname}-${version}.tgz" | |
checksum=fe0ff8b1f65441b2a76a27a0072fe5faaf734ee08f5e19845400d0fc3d35541c | |
- | |
-export CMAKE_GENERATOR="Unix Makefiles" | |
-- | |
2.34.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment