* [PR PATCH] Subsurface
@ 2021-11-21 15:59 adbrown101
2021-11-21 18:39 ` [PR REVIEW] Subsurface ericonr
` (51 more replies)
0 siblings, 52 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-21 15:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]
There is a new pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 5815 bytes --]
From de00d00e5c2be7db4c70c42f7bfcb41e8e02ec1d Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Sun, 21 Nov 2021 15:44:57 +0000
Subject: [PATCH 1/3] New package: googlemaps-.0.0.0.2
---
srcpkgs/googlemaps/template | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 srcpkgs/googlemaps/template
diff --git a/srcpkgs/googlemaps/template b/srcpkgs/googlemaps/template
new file mode 100644
index 000000000000..7189dd483217
--- /dev/null
+++ b/srcpkgs/googlemaps/template
@@ -0,0 +1,23 @@
+# Template file for 'googlemaps'
+pkgname=googlemaps
+version=.0.0.0.2
+revision=1
+archs="i686 x86_64 x86_64-musl aarch64 aarch64-musl"
+wrksrc=${pkgname}-v${version}
+build_style=qmake
+hostmakedepends="qt5-qmake"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+short_desc="Googlemaps plugin for QtLocation"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="MIT"
+homepage="https://github.com/vladest/googlemaps"
+distfiles="https://github.com/vladest/${pkgname}/archive/v${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" qt5-devel"
+fi
+
+post_install() {
+ vlicense LICENSE.txt
+}
From dfe8a0921c8db7820b24525209f90b847fc87871 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Sun, 21 Nov 2021 15:47:09 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.5
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
srcpkgs/libdivecomputer-subsurface/template | 31 +++++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/update | 2 ++
3 files changed, 34 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/template b/srcpkgs/libdivecomputer-subsurface/template
new file mode 100644
index 000000000000..cc381abd575b
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,31 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.5
+revision=1
+archs="i686 x86_64 x86_64-musl aarch64 aarch64-musl"
+wrksrc="libdivecomputer-subsurface-branch-${version}"
+build_style=gnu-configure
+hostmakedepends="libtool automake autoconf pkg-config"
+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
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From e512220941e297df23750a93e5d041c3bd02fc36 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Sun, 21 Nov 2021 15:48:45 +0000
Subject: [PATCH 3/3] New package: subsurface-5.0.5
---
srcpkgs/subsurface/template | 24 ++++++++++++++++++++++++
srcpkgs/subsurface/update | 3 +++
2 files changed, 27 insertions(+)
create mode 100644 srcpkgs/subsurface/template
create mode 100644 srcpkgs/subsurface/update
diff --git a/srcpkgs/subsurface/template b/srcpkgs/subsurface/template
new file mode 100644
index 000000000000..29796a4f6975
--- /dev/null
+++ b/srcpkgs/subsurface/template
@@ -0,0 +1,24 @@
+# Template file for 'subsurface'
+pkgname=subsurface
+version=5.0.5
+revision=1
+archs="i686 x86_64 x86_64-musl aarch64 aarch64-musl"
+wrksrc="Subsurface-${version}"
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable -DCMAKE_BUILD_TYPE=Release -DBTSUPPORT=ON -DNO_USERMANUAL=OFF -DNO_PRINTING=OFF"
+make_cmd=make
+hostmakedepends="git pkg-config autoconf automake libtool"
+makedepends="libdivecomputer-subsurface-devel libbluetooth-devel libcurl-devel sqlite-devel libssh2-devel eudev-libudev-devel libusb-devel libxml2-devel libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/Subsurface-${version}.tgz"
+checksum=fe0ff8b1f65441b2a76a27a0072fe5faaf734ee08f5e19845400d0fc3d35541c
+
+export CMAKE_GENERATOR="Unix Makefiles"
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" qt5-devel"
+fi
diff --git a/srcpkgs/subsurface/update b/srcpkgs/subsurface/update
new file mode 100644
index 000000000000..daa8b5380ea9
--- /dev/null
+++ b/srcpkgs/subsurface/update
@@ -0,0 +1,3 @@
+site="${homepage}/downloads"
+pkgname="Subsurface"
+pattern="${pkgname}-\K[\d\.]+(?=\.tgz)"
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
2021-11-21 18:39 ` [PR REVIEW] Subsurface ericonr
2021-11-21 18:39 ` ericonr
@ 2021-11-21 18:39 ` ericonr
2021-11-21 18:39 ` ericonr
` (48 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: ericonr @ 2021-11-21 18:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 157 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r753838087
Comment:
Same here.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
@ 2021-11-21 18:39 ` ericonr
2021-11-21 18:39 ` ericonr
` (50 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: ericonr @ 2021-11-21 18:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 214 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r753837988
Comment:
Should be able to build for all archs, so you don't need this line.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
2021-11-21 18:39 ` [PR REVIEW] Subsurface ericonr
@ 2021-11-21 18:39 ` ericonr
2021-11-21 18:39 ` ericonr
` (49 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: ericonr @ 2021-11-21 18:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r753838020
Comment:
That initial dot doesn't belong in the version number.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (3 preceding siblings ...)
2021-11-21 18:39 ` ericonr
@ 2021-11-21 18:39 ` ericonr
2021-11-21 18:39 ` ericonr
` (46 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: ericonr @ 2021-11-21 18:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r753838059
Comment:
I think package name should include `qtplugins`, otherwise it's slightly confusing.
Mageia calls it `qtlocation-plugin-googlemaps`, though that seems a bit long.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (2 preceding siblings ...)
2021-11-21 18:39 ` ericonr
@ 2021-11-21 18:39 ` ericonr
2021-11-21 18:39 ` ericonr
` (47 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: ericonr @ 2021-11-21 18:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r753838117
Comment:
Same here
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (4 preceding siblings ...)
2021-11-21 18:39 ` ericonr
@ 2021-11-21 18:39 ` ericonr
2021-11-22 12:30 ` [PR PATCH] [Updated] Subsurface adbrown101
` (45 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: ericonr @ 2021-11-21 18:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r753838135
Comment:
Break these lines at ~80 columns.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (5 preceding siblings ...)
2021-11-21 18:39 ` ericonr
@ 2021-11-22 12:30 ` adbrown101
2021-11-22 13:45 ` adbrown101
` (44 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-22 12:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 5815 bytes --]
From de00d00e5c2be7db4c70c42f7bfcb41e8e02ec1d Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Sun, 21 Nov 2021 15:44:57 +0000
Subject: [PATCH 1/3] New package: googlemaps-.0.0.0.2
---
srcpkgs/googlemaps/template | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 srcpkgs/googlemaps/template
diff --git a/srcpkgs/googlemaps/template b/srcpkgs/googlemaps/template
new file mode 100644
index 000000000000..7189dd483217
--- /dev/null
+++ b/srcpkgs/googlemaps/template
@@ -0,0 +1,23 @@
+# Template file for 'googlemaps'
+pkgname=googlemaps
+version=.0.0.0.2
+revision=1
+archs="i686 x86_64 x86_64-musl aarch64 aarch64-musl"
+wrksrc=${pkgname}-v${version}
+build_style=qmake
+hostmakedepends="qt5-qmake"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+short_desc="Googlemaps plugin for QtLocation"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="MIT"
+homepage="https://github.com/vladest/googlemaps"
+distfiles="https://github.com/vladest/${pkgname}/archive/v${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" qt5-devel"
+fi
+
+post_install() {
+ vlicense LICENSE.txt
+}
From dfe8a0921c8db7820b24525209f90b847fc87871 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Sun, 21 Nov 2021 15:47:09 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.5
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
srcpkgs/libdivecomputer-subsurface/template | 31 +++++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/update | 2 ++
3 files changed, 34 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/template b/srcpkgs/libdivecomputer-subsurface/template
new file mode 100644
index 000000000000..cc381abd575b
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,31 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.5
+revision=1
+archs="i686 x86_64 x86_64-musl aarch64 aarch64-musl"
+wrksrc="libdivecomputer-subsurface-branch-${version}"
+build_style=gnu-configure
+hostmakedepends="libtool automake autoconf pkg-config"
+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
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From e512220941e297df23750a93e5d041c3bd02fc36 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Sun, 21 Nov 2021 15:48:45 +0000
Subject: [PATCH 3/3] New package: subsurface-5.0.5
---
srcpkgs/subsurface/template | 24 ++++++++++++++++++++++++
srcpkgs/subsurface/update | 3 +++
2 files changed, 27 insertions(+)
create mode 100644 srcpkgs/subsurface/template
create mode 100644 srcpkgs/subsurface/update
diff --git a/srcpkgs/subsurface/template b/srcpkgs/subsurface/template
new file mode 100644
index 000000000000..29796a4f6975
--- /dev/null
+++ b/srcpkgs/subsurface/template
@@ -0,0 +1,24 @@
+# Template file for 'subsurface'
+pkgname=subsurface
+version=5.0.5
+revision=1
+archs="i686 x86_64 x86_64-musl aarch64 aarch64-musl"
+wrksrc="Subsurface-${version}"
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable -DCMAKE_BUILD_TYPE=Release -DBTSUPPORT=ON -DNO_USERMANUAL=OFF -DNO_PRINTING=OFF"
+make_cmd=make
+hostmakedepends="git pkg-config autoconf automake libtool"
+makedepends="libdivecomputer-subsurface-devel libbluetooth-devel libcurl-devel sqlite-devel libssh2-devel eudev-libudev-devel libusb-devel libxml2-devel libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/Subsurface-${version}.tgz"
+checksum=fe0ff8b1f65441b2a76a27a0072fe5faaf734ee08f5e19845400d0fc3d35541c
+
+export CMAKE_GENERATOR="Unix Makefiles"
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" qt5-devel"
+fi
diff --git a/srcpkgs/subsurface/update b/srcpkgs/subsurface/update
new file mode 100644
index 000000000000..daa8b5380ea9
--- /dev/null
+++ b/srcpkgs/subsurface/update
@@ -0,0 +1,3 @@
+site="${homepage}/downloads"
+pkgname="Subsurface"
+pattern="${pkgname}-\K[\d\.]+(?=\.tgz)"
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (6 preceding siblings ...)
2021-11-22 12:30 ` [PR PATCH] [Updated] Subsurface adbrown101
@ 2021-11-22 13:45 ` adbrown101
2021-11-22 14:45 ` [PR REVIEW] Subsurface adbrown101
` (43 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-22 13:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 7018 bytes --]
From d14d546731126d00fbcd42eb053b04c892ddedcc Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Mon, 22 Nov 2021 12:23:26 +0000
Subject: [PATCH 1/4] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 23 +++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 25 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..3201d3c179c8
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,23 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+distpkgnamme=googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=${distpkgname}-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+short_desc="Googlemaps 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"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" qt5-devel"
+fi
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From 75949d40ee85f7ebbb0df929745b1543c2884bd3 Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Mon, 22 Nov 2021 12:27:42 +0000
Subject: [PATCH 2/4] New package: libdivecomputer-subsurface-5.0.5
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
srcpkgs/libdivecomputer-subsurface/template | 30 +++++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/update | 2 ++
3 files changed, 33 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/template b/srcpkgs/libdivecomputer-subsurface/template
new file mode 100644
index 000000000000..30b595dfd170
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.5
+revision=1
+wrksrc="libdivecomputer-subsurface-branch-${version}"
+build_style=gnu-configure
+hostmakedepends="libtool automake autoconf pkg-config"
+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
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From e4c877286d525a45e2ff90f9af6a355a089a04fd Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Mon, 22 Nov 2021 12:28:57 +0000
Subject: [PATCH 3/4] New package: subsurface-5.0.5
---
srcpkgs/subsurface/template | 28 ++++++++++++++++++++++++++++
srcpkgs/subsurface/update | 3 +++
2 files changed, 31 insertions(+)
create mode 100644 srcpkgs/subsurface/template
create mode 100644 srcpkgs/subsurface/update
diff --git a/srcpkgs/subsurface/template b/srcpkgs/subsurface/template
new file mode 100644
index 000000000000..bdaac7c1f13c
--- /dev/null
+++ b/srcpkgs/subsurface/template
@@ -0,0 +1,28 @@
+# Template file for 'subsurface'
+pkgname=subsurface
+version=5.0.5
+revision=1
+wrksrc="Subsurface-${version}"
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+-DCMAKE_BUILD_TYPE=Release -DBTSUPPORT=ON -DNO_USERMANUAL=OFF -DNO_PRINTING=OFF"
+make_cmd=make
+hostmakedepends="git pkg-config autoconf automake libtool"
+makedepends="libdivecomputer-subsurface-devel libbluetooth-devel libcurl-devel
+sqlite-devel libssh2-devel eudev-libudev-devel libusb-devel libxml2-devel
+libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/Subsurface-${version}.tgz"
+checksum=fe0ff8b1f65441b2a76a27a0072fe5faaf734ee08f5e19845400d0fc3d35541c
+
+export CMAKE_GENERATOR="Unix Makefiles"
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" qt5-devel"
+fi
diff --git a/srcpkgs/subsurface/update b/srcpkgs/subsurface/update
new file mode 100644
index 000000000000..daa8b5380ea9
--- /dev/null
+++ b/srcpkgs/subsurface/update
@@ -0,0 +1,3 @@
+site="${homepage}/downloads"
+pkgname="Subsurface"
+pattern="${pkgname}-\K[\d\.]+(?=\.tgz)"
From cad1a72db0e8563c53b42e190f349c6c3b80163c Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Mon, 22 Nov 2021 13:45:27 +0000
Subject: [PATCH 4/4] spelling
---
srcpkgs/qtlocation-plugin-googlemaps/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
index 3201d3c179c8..e83b2e1debda 100644
--- a/srcpkgs/qtlocation-plugin-googlemaps/template
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -1,6 +1,6 @@
# Template file for 'qtlocation-plugin-googlemaps'
pkgname=qtlocation-plugin-googlemaps
-distpkgnamme=googlemaps
+distpkgname=googlemaps
version=0.0.0.2
revision=1
wrksrc=${distpkgname}-v.${version}
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (7 preceding siblings ...)
2021-11-22 13:45 ` adbrown101
@ 2021-11-22 14:45 ` adbrown101
2021-11-22 14:45 ` adbrown101
` (42 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-22 14:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
New review comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r754344933
Comment:
Done
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (8 preceding siblings ...)
2021-11-22 14:45 ` [PR REVIEW] Subsurface adbrown101
@ 2021-11-22 14:45 ` adbrown101
2021-11-22 14:46 ` adbrown101
` (41 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-22 14:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
New review comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r754345088
Comment:
Done
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (9 preceding siblings ...)
2021-11-22 14:45 ` adbrown101
@ 2021-11-22 14:46 ` adbrown101
2021-11-22 14:46 ` adbrown101
` (40 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-22 14:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
New review comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r754345665
Comment:
Done
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (10 preceding siblings ...)
2021-11-22 14:46 ` adbrown101
@ 2021-11-22 14:46 ` adbrown101
2021-11-22 14:46 ` adbrown101
` (39 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-22 14:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
New review comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r754345823
Comment:
Done
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (11 preceding siblings ...)
2021-11-22 14:46 ` adbrown101
@ 2021-11-22 14:46 ` adbrown101
2021-11-22 14:46 ` adbrown101
` (38 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-22 14:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
New review comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r754345979
Comment:
Done
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (12 preceding siblings ...)
2021-11-22 14:46 ` adbrown101
@ 2021-11-22 14:46 ` adbrown101
2021-11-24 9:25 ` [PR PATCH] [Updated] Subsurface adbrown101
` (37 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-22 14:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
New review comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r754346094
Comment:
Done
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (13 preceding siblings ...)
2021-11-22 14:46 ` adbrown101
@ 2021-11-24 9:25 ` adbrown101
2021-11-24 12:08 ` [PR REVIEW] Subsurface adbrown101
` (36 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-24 9:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 7018 bytes --]
From d14d546731126d00fbcd42eb053b04c892ddedcc Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Mon, 22 Nov 2021 12:23:26 +0000
Subject: [PATCH 1/4] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 23 +++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 25 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..3201d3c179c8
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,23 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+distpkgnamme=googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=${distpkgname}-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+short_desc="Googlemaps 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"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" qt5-devel"
+fi
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From 75949d40ee85f7ebbb0df929745b1543c2884bd3 Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Mon, 22 Nov 2021 12:27:42 +0000
Subject: [PATCH 2/4] New package: libdivecomputer-subsurface-5.0.5
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
srcpkgs/libdivecomputer-subsurface/template | 30 +++++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/update | 2 ++
3 files changed, 33 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/template b/srcpkgs/libdivecomputer-subsurface/template
new file mode 100644
index 000000000000..30b595dfd170
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.5
+revision=1
+wrksrc="libdivecomputer-subsurface-branch-${version}"
+build_style=gnu-configure
+hostmakedepends="libtool automake autoconf pkg-config"
+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
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From e4c877286d525a45e2ff90f9af6a355a089a04fd Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Mon, 22 Nov 2021 12:28:57 +0000
Subject: [PATCH 3/4] New package: subsurface-5.0.5
---
srcpkgs/subsurface/template | 28 ++++++++++++++++++++++++++++
srcpkgs/subsurface/update | 3 +++
2 files changed, 31 insertions(+)
create mode 100644 srcpkgs/subsurface/template
create mode 100644 srcpkgs/subsurface/update
diff --git a/srcpkgs/subsurface/template b/srcpkgs/subsurface/template
new file mode 100644
index 000000000000..bdaac7c1f13c
--- /dev/null
+++ b/srcpkgs/subsurface/template
@@ -0,0 +1,28 @@
+# Template file for 'subsurface'
+pkgname=subsurface
+version=5.0.5
+revision=1
+wrksrc="Subsurface-${version}"
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+-DCMAKE_BUILD_TYPE=Release -DBTSUPPORT=ON -DNO_USERMANUAL=OFF -DNO_PRINTING=OFF"
+make_cmd=make
+hostmakedepends="git pkg-config autoconf automake libtool"
+makedepends="libdivecomputer-subsurface-devel libbluetooth-devel libcurl-devel
+sqlite-devel libssh2-devel eudev-libudev-devel libusb-devel libxml2-devel
+libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/Subsurface-${version}.tgz"
+checksum=fe0ff8b1f65441b2a76a27a0072fe5faaf734ee08f5e19845400d0fc3d35541c
+
+export CMAKE_GENERATOR="Unix Makefiles"
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" qt5-devel"
+fi
diff --git a/srcpkgs/subsurface/update b/srcpkgs/subsurface/update
new file mode 100644
index 000000000000..daa8b5380ea9
--- /dev/null
+++ b/srcpkgs/subsurface/update
@@ -0,0 +1,3 @@
+site="${homepage}/downloads"
+pkgname="Subsurface"
+pattern="${pkgname}-\K[\d\.]+(?=\.tgz)"
From cad1a72db0e8563c53b42e190f349c6c3b80163c Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Mon, 22 Nov 2021 13:45:27 +0000
Subject: [PATCH 4/4] spelling
---
srcpkgs/qtlocation-plugin-googlemaps/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
index 3201d3c179c8..e83b2e1debda 100644
--- a/srcpkgs/qtlocation-plugin-googlemaps/template
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -1,6 +1,6 @@
# Template file for 'qtlocation-plugin-googlemaps'
pkgname=qtlocation-plugin-googlemaps
-distpkgnamme=googlemaps
+distpkgname=googlemaps
version=0.0.0.2
revision=1
wrksrc=${distpkgname}-v.${version}
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (14 preceding siblings ...)
2021-11-24 9:25 ` [PR PATCH] [Updated] Subsurface adbrown101
@ 2021-11-24 12:08 ` adbrown101
2021-11-24 12:17 ` Subsurface adbrown101
` (35 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-24 12:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
New review comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r755997021
Comment:
Breaking configure_args causes xlint to fail
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (15 preceding siblings ...)
2021-11-24 12:08 ` [PR REVIEW] Subsurface adbrown101
@ 2021-11-24 12:17 ` adbrown101
2021-11-24 19:36 ` Subsurface Chocimier
` (34 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-24 12:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 237 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-977823371
Comment:
lint fails because I broke configure_args at 80. Not sure why i686 fails. Builds fine locally
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (16 preceding siblings ...)
2021-11-24 12:17 ` Subsurface adbrown101
@ 2021-11-24 19:36 ` Chocimier
2021-11-25 12:04 ` [PR PATCH] [Updated] Subsurface adbrown101
` (33 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: Chocimier @ 2021-11-24 19:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 412 bytes --]
New comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-978166942
Comment:
- should be named `Subsurface`, then no need for wrksrc
- variables continuation should be indented by one space (that fixes lint as side effect)
- don't do conditional hostmakedepends, move into regular variable
- no need for `Subsurface/update`, defaults work here
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (17 preceding siblings ...)
2021-11-24 19:36 ` Subsurface Chocimier
@ 2021-11-25 12:04 ` adbrown101
2021-11-25 12:52 ` adbrown101
` (32 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-25 12:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 5839 bytes --]
From 23ebfb4d92912bede12170d39f694a43eb70cbbd Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Wed, 24 Nov 2021 09:21:13 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 23 +++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 25 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..e83b2e1debda
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,23 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+distpkgname=googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=${distpkgname}-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+short_desc="Googlemaps 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"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" qt5-devel"
+fi
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From 642daa4f53674966de214c17e0980cb0c06b436e Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Wed, 24 Nov 2021 09:22:46 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.5
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
srcpkgs/libdivecomputer-subsurface/template | 30 +++++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/update | 2 ++
3 files changed, 33 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/template b/srcpkgs/libdivecomputer-subsurface/template
new file mode 100644
index 000000000000..30b595dfd170
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.5
+revision=1
+wrksrc="libdivecomputer-subsurface-branch-${version}"
+build_style=gnu-configure
+hostmakedepends="libtool automake autoconf pkg-config"
+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
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From 94361feeb0c3085798a4fa6ba0b8810d624f5da0 Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Wed, 24 Nov 2021 09:24:10 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.5
changed breaking and capitalised
---
srcpkgs/Subsurface/template | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 srcpkgs/Subsurface/template
diff --git a/srcpkgs/Subsurface/template b/srcpkgs/Subsurface/template
new file mode 100644
index 000000000000..4bc80569aeeb
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,24 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+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
+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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=fe0ff8b1f65441b2a76a27a0072fe5faaf734ee08f5e19845400d0fc3d35541c
+
+export CMAKE_GENERATOR="Unix Makefiles"
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (18 preceding siblings ...)
2021-11-25 12:04 ` [PR PATCH] [Updated] Subsurface adbrown101
@ 2021-11-25 12:52 ` adbrown101
2021-11-25 18:24 ` adbrown101
` (31 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-25 12:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 5752 bytes --]
From 9744b4cf5546552586402c7214303d20bc31fa5f Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Thu, 25 Nov 2021 12:46:07 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 19 +++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 21 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..754271e3c7da
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,19 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+_distpkgname=googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=${_distpkgname}-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"
+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"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From cb58c72f35c3e3cf251c5eb380ce9e4d84a2e562 Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Thu, 25 Nov 2021 12:47:23 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.5
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
srcpkgs/libdivecomputer-subsurface/template | 30 +++++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/update | 2 ++
3 files changed, 33 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/template b/srcpkgs/libdivecomputer-subsurface/template
new file mode 100644
index 000000000000..30b595dfd170
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.5
+revision=1
+wrksrc="libdivecomputer-subsurface-branch-${version}"
+build_style=gnu-configure
+hostmakedepends="libtool automake autoconf pkg-config"
+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
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From 1f974df217b1de10714d3df940d408103ff891f7 Mon Sep 17 00:00:00 2001
From: Alan Brown <a.brown@bury.gov.uk>
Date: Thu, 25 Nov 2021 12:48:38 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.5
---
srcpkgs/Subsurface/template | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 srcpkgs/Subsurface/template
diff --git a/srcpkgs/Subsurface/template b/srcpkgs/Subsurface/template
new file mode 100644
index 000000000000..4bc80569aeeb
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,24 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+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
+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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=fe0ff8b1f65441b2a76a27a0072fe5faaf734ee08f5e19845400d0fc3d35541c
+
+export CMAKE_GENERATOR="Unix Makefiles"
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (19 preceding siblings ...)
2021-11-25 12:52 ` adbrown101
@ 2021-11-25 18:24 ` adbrown101
2021-11-25 18:27 ` Subsurface adbrown101
` (30 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-25 18:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 5761 bytes --]
From 6d97f4adff12a37979116ec68d6eeb44f708bf55 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 19 +++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 21 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..754271e3c7da
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,19 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+_distpkgname=googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=${_distpkgname}-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"
+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"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From 8419888b044803eb07545dbf47b08995651f7906 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.5
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
srcpkgs/libdivecomputer-subsurface/template | 30 +++++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/update | 2 ++
3 files changed, 33 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/template b/srcpkgs/libdivecomputer-subsurface/template
new file mode 100644
index 000000000000..30b595dfd170
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.5
+revision=1
+wrksrc="libdivecomputer-subsurface-branch-${version}"
+build_style=gnu-configure
+hostmakedepends="libtool automake autoconf pkg-config"
+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
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From 2a4a98291b38ed1ca8040206a7c8a49b90ab3be2 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.5
---
srcpkgs/Subsurface/template | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 srcpkgs/Subsurface/template
diff --git a/srcpkgs/Subsurface/template b/srcpkgs/Subsurface/template
new file mode 100644
index 000000000000..4bc80569aeeb
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,24 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+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
+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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=fe0ff8b1f65441b2a76a27a0072fe5faaf734ee08f5e19845400d0fc3d35541c
+
+export CMAKE_GENERATOR="Unix Makefiles"
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (20 preceding siblings ...)
2021-11-25 18:24 ` adbrown101
@ 2021-11-25 18:27 ` adbrown101
2021-11-25 19:31 ` Subsurface ericonr
` (29 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-25 18:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-979414482
Comment:
Rebased again to get correct email address on. Will look at test-profile at weekend
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (21 preceding siblings ...)
2021-11-25 18:27 ` Subsurface adbrown101
@ 2021-11-25 19:31 ` ericonr
2021-11-26 3:43 ` [PR REVIEW] Subsurface sgn
` (28 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: ericonr @ 2021-11-25 19:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-979437903
Comment:
Given that it only fails on i686, might be worth reporting to upstream directly.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (22 preceding siblings ...)
2021-11-25 19:31 ` Subsurface ericonr
@ 2021-11-26 3:43 ` sgn
2021-11-26 3:52 ` Subsurface sgn
` (27 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: sgn @ 2021-11-26 3:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r757211965
Comment:
Why `shlib_provides`?
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (23 preceding siblings ...)
2021-11-26 3:43 ` [PR REVIEW] Subsurface sgn
@ 2021-11-26 3:52 ` sgn
2021-11-26 4:24 ` Subsurface sgn
` (26 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: sgn @ 2021-11-26 3:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 264 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-979677093
Comment:
```
oceanic_common.h:31: warning: "PAGESIZE" redefined
31 | #define PAGESIZE 0x10
```
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (24 preceding siblings ...)
2021-11-26 3:52 ` Subsurface sgn
@ 2021-11-26 4:24 ` sgn
2021-11-26 4:28 ` [PR PATCH] [Updated] Subsurface sgn
` (25 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: sgn @ 2021-11-26 4:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 197 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-979687855
Comment:
https://gist.github.com/sgn/15ce90f26cd367499359dc24148dd007
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (25 preceding siblings ...)
2021-11-26 4:24 ` Subsurface sgn
@ 2021-11-26 4:28 ` sgn
2021-11-26 12:56 ` [PR REVIEW] Subsurface adbrown101
` (24 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: sgn @ 2021-11-26 4:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 44854 bytes --]
From 6d97f4adff12a37979116ec68d6eeb44f708bf55 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/6] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 19 +++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 21 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..754271e3c7da
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,19 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+_distpkgname=googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=${_distpkgname}-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"
+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"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From 8419888b044803eb07545dbf47b08995651f7906 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/6] New package: libdivecomputer-subsurface-5.0.5
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
srcpkgs/libdivecomputer-subsurface/template | 30 +++++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/update | 2 ++
3 files changed, 33 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/template b/srcpkgs/libdivecomputer-subsurface/template
new file mode 100644
index 000000000000..30b595dfd170
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.5
+revision=1
+wrksrc="libdivecomputer-subsurface-branch-${version}"
+build_style=gnu-configure
+hostmakedepends="libtool automake autoconf pkg-config"
+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
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From 2a4a98291b38ed1ca8040206a7c8a49b90ab3be2 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/6] New package: Subsurface-5.0.5
---
srcpkgs/Subsurface/template | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 srcpkgs/Subsurface/template
diff --git a/srcpkgs/Subsurface/template b/srcpkgs/Subsurface/template
new file mode 100644
index 000000000000..4bc80569aeeb
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,24 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+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
+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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=fe0ff8b1f65441b2a76a27a0072fe5faaf734ee08f5e19845400d0fc3d35541c
+
+export CMAKE_GENERATOR="Unix Makefiles"
From 00e160208fa27d411978986c39e88e1710c71adb Mon Sep 17 00:00:00 2001
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 4/6] 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 754271e3c7da..ef301d542273 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() {
From f99ed241fa3452a93e63ac19ea9aeea1475174c0 Mon Sep 17 00:00:00 2001
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 5/6] 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 000000000000..7ba54f118098
--- /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 30b595dfd170..e996984352c0 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
From a936797c55abf5f8781382b68a795ca0f842ab1a Mon Sep 17 00:00:00 2001
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 6/6] 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 000000000000..f35aa99ef86e
--- /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 000000000000..08f11a434b58
--- /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 4bc80569aeeb..c93cdbe19ee5 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"
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (26 preceding siblings ...)
2021-11-26 4:28 ` [PR PATCH] [Updated] Subsurface sgn
@ 2021-11-26 12:56 ` adbrown101
2021-11-26 13:08 ` [PR PATCH] [Updated] Subsurface adbrown101
` (23 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-26 12:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
New review comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r757478152
Comment:
Because it is a fork of libdivecomputer even though this is not on void. I must admit I wasn't sure whether to add or not.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (27 preceding siblings ...)
2021-11-26 12:56 ` [PR REVIEW] Subsurface adbrown101
@ 2021-11-26 13:08 ` adbrown101
2021-11-29 12:06 ` Subsurface adbrown101
` (22 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-26 13:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 44854 bytes --]
From 6d97f4adff12a37979116ec68d6eeb44f708bf55 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/6] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 19 +++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 21 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..754271e3c7da
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,19 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+_distpkgname=googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=${_distpkgname}-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"
+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"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From 8419888b044803eb07545dbf47b08995651f7906 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/6] New package: libdivecomputer-subsurface-5.0.5
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
srcpkgs/libdivecomputer-subsurface/template | 30 +++++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/update | 2 ++
3 files changed, 33 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/template b/srcpkgs/libdivecomputer-subsurface/template
new file mode 100644
index 000000000000..30b595dfd170
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.5
+revision=1
+wrksrc="libdivecomputer-subsurface-branch-${version}"
+build_style=gnu-configure
+hostmakedepends="libtool automake autoconf pkg-config"
+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
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From 2a4a98291b38ed1ca8040206a7c8a49b90ab3be2 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/6] New package: Subsurface-5.0.5
---
srcpkgs/Subsurface/template | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 srcpkgs/Subsurface/template
diff --git a/srcpkgs/Subsurface/template b/srcpkgs/Subsurface/template
new file mode 100644
index 000000000000..4bc80569aeeb
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,24 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+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
+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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=fe0ff8b1f65441b2a76a27a0072fe5faaf734ee08f5e19845400d0fc3d35541c
+
+export CMAKE_GENERATOR="Unix Makefiles"
From 00e160208fa27d411978986c39e88e1710c71adb Mon Sep 17 00:00:00 2001
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 4/6] 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 754271e3c7da..ef301d542273 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() {
From f99ed241fa3452a93e63ac19ea9aeea1475174c0 Mon Sep 17 00:00:00 2001
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 5/6] 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 000000000000..7ba54f118098
--- /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 30b595dfd170..e996984352c0 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
From a936797c55abf5f8781382b68a795ca0f842ab1a Mon Sep 17 00:00:00 2001
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 6/6] 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 000000000000..f35aa99ef86e
--- /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 000000000000..08f11a434b58
--- /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 4bc80569aeeb..c93cdbe19ee5 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"
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (28 preceding siblings ...)
2021-11-26 13:08 ` [PR PATCH] [Updated] Subsurface adbrown101
@ 2021-11-29 12:06 ` adbrown101
2021-11-30 13:24 ` Subsurface adbrown101
` (21 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-29 12:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-981572775
Comment:
Spoken to upstream about test profile. The initial suggestion is that it could be a floating point rounding issue in the test. I have recreated the issue in masterdir-x86 in void-packages. Do you know how to enter the build environment and run the test individually e.g. `./testprofile` so it runs as though it is an i686 machine rather than going through `./xbps-src`?
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (29 preceding siblings ...)
2021-11-29 12:06 ` Subsurface adbrown101
@ 2021-11-30 13:24 ` adbrown101
2021-12-03 20:20 ` Subsurface adbrown101
` (20 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-11-30 13:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-981572775
Comment:
Spoken to upstream about test profile. The initial suggestion is that it could be a floating point rounding issue in the test. I have recreated the issue in masterdir-x86 in void-packages. Do you know how to enter the build environment and run the test individually e.g. `./testprofile` so it runs as though it is an i686 machine rather than going through `./xbps-src`? I will try `./xbps-src chroot` not noticed this previously.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (30 preceding siblings ...)
2021-11-30 13:24 ` Subsurface adbrown101
@ 2021-12-03 20:20 ` adbrown101
2021-12-05 22:04 ` Subsurface adbrown101
` (19 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-12-03 20:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 214 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-985802648
Comment:
Differences more significant than rounding errors. Still investigating
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (31 preceding siblings ...)
2021-12-03 20:20 ` Subsurface adbrown101
@ 2021-12-05 22:04 ` adbrown101
2021-12-09 17:15 ` Subsurface adbrown101
` (18 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-12-05 22:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-985802648
Comment:
Differences more significant than rounding errors. Still investigating. Seems to be integer conversion too early in some calculations. The patches are getting closer to clearing the test. Down to 1 or 2 lines of difference now.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (32 preceding siblings ...)
2021-12-05 22:04 ` Subsurface adbrown101
@ 2021-12-09 17:15 ` adbrown101
2022-02-06 15:44 ` [PR PATCH] [Updated] Subsurface adbrown101
` (17 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2021-12-09 17:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 636 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-990052808
Comment:
The [3357 patch](https://github.com/subsurface/subsurface/pull/3357) was provide by the author of TestProfile. This has been merged with the master branch of Subsurface. The problem was an integer conversion which was handled differently producing a difference in the calculation of some informational depths of the order of cm. It is a large patch because the reference profiles had to be updated as part of the patch. We should be able to remove this patch on the next version of Subsurface
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (33 preceding siblings ...)
2021-12-09 17:15 ` Subsurface adbrown101
@ 2022-02-06 15:44 ` adbrown101
2022-02-06 15:47 ` Subsurface adbrown101
` (16 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-02-06 15:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 42982 bytes --]
From dba3dea78198005cfd082bcd6335679a112e6068 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 18 ++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 20 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..ef301d542273
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,18 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=googlemaps-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake qt5-devel"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+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/googlemaps/archive/v.${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From db5928806deb5d9c01fc6d5f13ac21f1a3f75848 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.6
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
.../patches/PAGESIZE.patch | 873 ++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/template | 30 +
srcpkgs/libdivecomputer-subsurface/update | 2 +
4 files changed, 906 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
new file mode 100644
index 000000000000..4daf084ed0d5
--- /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_t *abstract, unsigned int address, unsig
+ 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_t *abstract, unsigned int address, unsig
+
+ nbytes += SEGMENTSIZE;
+ segment++;
+- if (segment == (PAGESIZE / SEGMENTSIZE)) {
++ if (segment == (XPAGESIZE / SEGMENTSIZE)) {
+ segment = 0;
+ page++;
+ }
+@@ -410,13 +410,13 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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_device_t *abstract, dc_dive_callback_t callb
+ 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_t *abstract, unsigned char data[], unsig
+ 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 *abstract, unsigned int address, unsigned
+ 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 *abstract, unsigned int address, unsigned
+ }
+
+ // 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 *abstract, unsigned int address, unsigned
+ 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 *abstract, unsigned int address, unsigned
+
+ 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 *abstract, unsigned int address, const u
+ {
+ 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 *abstract, unsigned int address, const u
+ 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 *abstract, unsigned int address, const u
+ 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 **out, dc_context_t *context, unsigned
+
+ // 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 **out, dc_context_t *context, unsigned
+ 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_atom2_parser_t *parser)
+ 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_atom2_parser_t *parser, const unsigned char
+ // 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_parser_t *abstract, dc_sample_callback_
+ }
+ }
+
+- 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_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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 unsigned char *string, const unsigned char *
+ 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 *abstract, dc_buffer_t *buffer)
+ 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_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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_t *abstract, dc_event_progress_t *progr
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ 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_t *abstract, dc_event_progress_t *progr
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ 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_t *abstract, dc_dive_callback_t callbac
+
+ // 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_t *abstract, dc_dive_callback_t callbac
+ 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_t *abstract, dc_dive_callback_t callbac
+ }
+
+ // 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_vtable_t {
+ } 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_t *abstract, unsigned char data[], unsi
+ 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 *abstract, unsigned int address, unsigne
+ {
+ 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 *abstract, unsigned int address, unsigne
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+
+ // 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 (dc_parser_t *abstract, dc_sample_callback
+ 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_device_t *abstract, dc_event_progress_t *p
+
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ // 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_device_t *abstract, dc_event_progress_t *p
+ }
+
+ // 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_t *abstract, unsigned char data[], unsig
+ 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_t *abstract, unsigned char data[], unsig
+ // 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_t *abstract, unsigned char data[], unsig
+ // 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 *abstract, unsigned int address, unsigned
+ {
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ if (next != current)
+ break;
+
+- idx += PAGESIZE / 2;
++ idx += XPAGESIZE / 2;
+ count++;
+ }
+ }
+@@ -317,7 +317,7 @@ oceanic_vtpro_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ 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_parser_t *abstract, dc_sample_callback_
+
+ // 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_parser_t *abstract, dc_sample_callback_
+ 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
new file mode 100644
index 000000000000..771c9cbffdf6
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.6
+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=52ed95bd2063ca86ced2a92061b5cb47782f4e1282fe49097aae5502778ded2d
+
+pre_configure() {
+ autoreconf -fi
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From d68b3e7907788c7052ec5e0a15a191e9b7aef961 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.6
---
.../patches/core-depends-generated-ui.patch | 10 ++++++++++
.../Subsurface/patches/make-or-ninja.patch | 11 ++++++++++
srcpkgs/Subsurface/template | 20 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
create mode 100644 srcpkgs/Subsurface/patches/make-or-ninja.patch
create mode 100644 srcpkgs/Subsurface/template
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 000000000000..a6a15f6501d1
--- /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 MATCHES "DesktopExecutable")
+ 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 000000000000..08f11a434b58
--- /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
new file mode 100644
index 000000000000..d1954392a246
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,20 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+version=5.0.6
+revision=1
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+ -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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=37751456c14721109cbfb57a938f776c35b65c4223c1159a1f0338285f22de0a
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (34 preceding siblings ...)
2022-02-06 15:44 ` [PR PATCH] [Updated] Subsurface adbrown101
@ 2022-02-06 15:47 ` adbrown101
2022-02-08 12:15 ` [PR REVIEW] Subsurface adbrown101
` (15 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-02-06 15:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-1030859070
Comment:
Updated to version 5.0.6. 3357.patch no-longer required for i686. Profile code rewritten and now i686 passes tests.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR REVIEW] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (35 preceding siblings ...)
2022-02-06 15:47 ` Subsurface adbrown101
@ 2022-02-08 12:15 ` adbrown101
2022-03-30 17:39 ` [PR PATCH] [Updated] Subsurface adbrown101
` (14 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-02-08 12:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 162 bytes --]
New review comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#discussion_r801567793
Comment:
Removed this
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (36 preceding siblings ...)
2022-02-08 12:15 ` [PR REVIEW] Subsurface adbrown101
@ 2022-03-30 17:39 ` adbrown101
2022-04-24 13:18 ` adbrown101
` (13 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-03-30 17:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 42982 bytes --]
From c422e3819210c1540aed67d403ee76a0c9166dfd Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 18 ++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 20 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..ef301d542273
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,18 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=googlemaps-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake qt5-devel"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+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/googlemaps/archive/v.${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From c9e95a261edb25e35a30c88964280f375c43f529 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.6
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
.../patches/PAGESIZE.patch | 873 ++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/template | 30 +
srcpkgs/libdivecomputer-subsurface/update | 2 +
4 files changed, 906 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
new file mode 100644
index 000000000000..4daf084ed0d5
--- /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_t *abstract, unsigned int address, unsig
+ 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_t *abstract, unsigned int address, unsig
+
+ nbytes += SEGMENTSIZE;
+ segment++;
+- if (segment == (PAGESIZE / SEGMENTSIZE)) {
++ if (segment == (XPAGESIZE / SEGMENTSIZE)) {
+ segment = 0;
+ page++;
+ }
+@@ -410,13 +410,13 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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_device_t *abstract, dc_dive_callback_t callb
+ 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_t *abstract, unsigned char data[], unsig
+ 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 *abstract, unsigned int address, unsigned
+ 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 *abstract, unsigned int address, unsigned
+ }
+
+ // 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 *abstract, unsigned int address, unsigned
+ 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 *abstract, unsigned int address, unsigned
+
+ 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 *abstract, unsigned int address, const u
+ {
+ 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 *abstract, unsigned int address, const u
+ 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 *abstract, unsigned int address, const u
+ 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 **out, dc_context_t *context, unsigned
+
+ // 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 **out, dc_context_t *context, unsigned
+ 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_atom2_parser_t *parser)
+ 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_atom2_parser_t *parser, const unsigned char
+ // 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_parser_t *abstract, dc_sample_callback_
+ }
+ }
+
+- 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_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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 unsigned char *string, const unsigned char *
+ 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 *abstract, dc_buffer_t *buffer)
+ 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_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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_t *abstract, dc_event_progress_t *progr
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ 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_t *abstract, dc_event_progress_t *progr
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ 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_t *abstract, dc_dive_callback_t callbac
+
+ // 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_t *abstract, dc_dive_callback_t callbac
+ 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_t *abstract, dc_dive_callback_t callbac
+ }
+
+ // 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_vtable_t {
+ } 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_t *abstract, unsigned char data[], unsi
+ 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 *abstract, unsigned int address, unsigne
+ {
+ 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 *abstract, unsigned int address, unsigne
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+
+ // 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 (dc_parser_t *abstract, dc_sample_callback
+ 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_device_t *abstract, dc_event_progress_t *p
+
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ // 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_device_t *abstract, dc_event_progress_t *p
+ }
+
+ // 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_t *abstract, unsigned char data[], unsig
+ 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_t *abstract, unsigned char data[], unsig
+ // 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_t *abstract, unsigned char data[], unsig
+ // 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 *abstract, unsigned int address, unsigned
+ {
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ if (next != current)
+ break;
+
+- idx += PAGESIZE / 2;
++ idx += XPAGESIZE / 2;
+ count++;
+ }
+ }
+@@ -317,7 +317,7 @@ oceanic_vtpro_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ 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_parser_t *abstract, dc_sample_callback_
+
+ // 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_parser_t *abstract, dc_sample_callback_
+ 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
new file mode 100644
index 000000000000..771c9cbffdf6
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.6
+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=52ed95bd2063ca86ced2a92061b5cb47782f4e1282fe49097aae5502778ded2d
+
+pre_configure() {
+ autoreconf -fi
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From b0b664c7cfff703d4ef1747e5c8afe94e3242126 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.6
---
.../patches/core-depends-generated-ui.patch | 10 ++++++++++
.../Subsurface/patches/make-or-ninja.patch | 11 ++++++++++
srcpkgs/Subsurface/template | 20 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
create mode 100644 srcpkgs/Subsurface/patches/make-or-ninja.patch
create mode 100644 srcpkgs/Subsurface/template
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 000000000000..a6a15f6501d1
--- /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 MATCHES "DesktopExecutable")
+ 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 000000000000..08f11a434b58
--- /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
new file mode 100644
index 000000000000..d1954392a246
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,20 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+version=5.0.6
+revision=1
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+ -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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=37751456c14721109cbfb57a938f776c35b65c4223c1159a1f0338285f22de0a
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (37 preceding siblings ...)
2022-03-30 17:39 ` [PR PATCH] [Updated] Subsurface adbrown101
@ 2022-04-24 13:18 ` adbrown101
2022-07-24 2:13 ` Subsurface github-actions
` (12 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-04-24 13:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 42984 bytes --]
From 83d47fdf9772ec07d52a4712d92d7c278cc25ffc Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 18 ++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 20 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..ef301d542273
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,18 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=googlemaps-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake qt5-devel"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+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/googlemaps/archive/v.${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From a437609e28e350720d7646b48ae450f962b49c15 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.8
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
.../patches/PAGESIZE.patch | 873 ++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/template | 30 +
srcpkgs/libdivecomputer-subsurface/update | 2 +
4 files changed, 906 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
new file mode 100644
index 000000000000..e1c3bd3d066f
--- /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_t *abstract, unsigned int address, unsig
+ 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_t *abstract, unsigned int address, unsig
+
+ nbytes += SEGMENTSIZE;
+ segment++;
+- if (segment == (PAGESIZE / SEGMENTSIZE)) {
++ if (segment == (XPAGESIZE / SEGMENTSIZE)) {
+ segment = 0;
+ page++;
+ }
+@@ -410,13 +410,13 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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_device_t *abstract, dc_dive_callback_t callb
+ 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
+@@ -1009,11 +1009,11 @@ oceanic_atom2_device_version (dc_device_t *abstract, unsigned char data[], unsig
+ 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;
+
+@@ -1027,8 +1027,8 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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.
+@@ -1052,7 +1052,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ }
+
+ // 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;
+@@ -1064,7 +1064,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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
+@@ -1073,7 +1073,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+
+ 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
+@@ -1108,8 +1108,8 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ {
+ 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.
+@@ -1119,7 +1119,7 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -1129,16 +1129,16 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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 **out, dc_context_t *context, unsigned
+
+ // 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 **out, dc_context_t *context, unsigned
+ 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_atom2_parser_t *parser)
+ 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_atom2_parser_t *parser, const unsigned char
+ // 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_parser_t *abstract, dc_sample_callback_
+ }
+ }
+
+- 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_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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 unsigned char *string, const unsigned char *
+ 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 *abstract, dc_buffer_t *buffer)
+ 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_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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_t *abstract, dc_event_progress_t *progr
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ 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_t *abstract, dc_event_progress_t *progr
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ 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_t *abstract, dc_dive_callback_t callbac
+
+ // 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_t *abstract, dc_dive_callback_t callbac
+ 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_t *abstract, dc_dive_callback_t callbac
+ }
+
+ // 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_vtable_t {
+ } 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_t *abstract, unsigned char data[], unsi
+ 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 *abstract, unsigned int address, unsigne
+ {
+ 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 *abstract, unsigned int address, unsigne
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+
+ // 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 (dc_parser_t *abstract, dc_sample_callback
+ 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_device_t *abstract, dc_event_progress_t *p
+
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ // 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_device_t *abstract, dc_event_progress_t *p
+ }
+
+ // 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_t *abstract, unsigned char data[], unsig
+ 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_t *abstract, unsigned char data[], unsig
+ // 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_t *abstract, unsigned char data[], unsig
+ // 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 *abstract, unsigned int address, unsigned
+ {
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ if (next != current)
+ break;
+
+- idx += PAGESIZE / 2;
++ idx += XPAGESIZE / 2;
+ count++;
+ }
+ }
+@@ -317,7 +317,7 @@ oceanic_vtpro_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ 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_parser_t *abstract, dc_sample_callback_
+
+ // 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_parser_t *abstract, dc_sample_callback_
+ 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
new file mode 100644
index 000000000000..03995bfbfc1b
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.8
+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=f6953421148d36dc7e1ca95981bc9873894e0ab51f87ac332fd62322e77c76f2
+
+pre_configure() {
+ autoreconf -fi
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From 78a68f1189a4494178a1c1de8104a83803d4f25c Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.8
---
.../patches/core-depends-generated-ui.patch | 10 ++++++++++
.../Subsurface/patches/make-or-ninja.patch | 11 ++++++++++
srcpkgs/Subsurface/template | 20 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
create mode 100644 srcpkgs/Subsurface/patches/make-or-ninja.patch
create mode 100644 srcpkgs/Subsurface/template
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 000000000000..d422e705df09
--- /dev/null
+++ b/srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -455,6 +455,7 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
+ 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 000000000000..08f11a434b58
--- /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
new file mode 100644
index 000000000000..b860e95ff561
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,20 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+version=5.0.8
+revision=1
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+ -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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=38803a84ef6c3efce937f06d99fca365bdc22789c28c57d219838748fbc810cf
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (38 preceding siblings ...)
2022-04-24 13:18 ` adbrown101
@ 2022-07-24 2:13 ` github-actions
2022-07-26 18:39 ` [PR PATCH] [Updated] Subsurface adbrown101
` (11 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: github-actions @ 2022-07-24 2:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-1193229419
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (39 preceding siblings ...)
2022-07-24 2:13 ` Subsurface github-actions
@ 2022-07-26 18:39 ` adbrown101
2022-07-26 18:42 ` Subsurface adbrown101
` (10 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-07-26 18:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 42984 bytes --]
From ac76c915e34f1cf01a8021f168a146959bf76bed Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 18 ++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 20 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..ef301d542273
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,18 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=googlemaps-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake qt5-devel"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+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/googlemaps/archive/v.${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From dee74f529b156343e1a98a25de3c68b3af961430 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.8
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
.../patches/PAGESIZE.patch | 873 ++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/template | 30 +
srcpkgs/libdivecomputer-subsurface/update | 2 +
4 files changed, 906 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
new file mode 100644
index 000000000000..e1c3bd3d066f
--- /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_t *abstract, unsigned int address, unsig
+ 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_t *abstract, unsigned int address, unsig
+
+ nbytes += SEGMENTSIZE;
+ segment++;
+- if (segment == (PAGESIZE / SEGMENTSIZE)) {
++ if (segment == (XPAGESIZE / SEGMENTSIZE)) {
+ segment = 0;
+ page++;
+ }
+@@ -410,13 +410,13 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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_device_t *abstract, dc_dive_callback_t callb
+ 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
+@@ -1009,11 +1009,11 @@ oceanic_atom2_device_version (dc_device_t *abstract, unsigned char data[], unsig
+ 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;
+
+@@ -1027,8 +1027,8 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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.
+@@ -1052,7 +1052,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ }
+
+ // 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;
+@@ -1064,7 +1064,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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
+@@ -1073,7 +1073,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+
+ 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
+@@ -1108,8 +1108,8 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ {
+ 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.
+@@ -1119,7 +1119,7 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -1129,16 +1129,16 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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 **out, dc_context_t *context, unsigned
+
+ // 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 **out, dc_context_t *context, unsigned
+ 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_atom2_parser_t *parser)
+ 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_atom2_parser_t *parser, const unsigned char
+ // 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_parser_t *abstract, dc_sample_callback_
+ }
+ }
+
+- 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_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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 unsigned char *string, const unsigned char *
+ 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 *abstract, dc_buffer_t *buffer)
+ 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_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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_t *abstract, dc_event_progress_t *progr
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ 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_t *abstract, dc_event_progress_t *progr
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ 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_t *abstract, dc_dive_callback_t callbac
+
+ // 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_t *abstract, dc_dive_callback_t callbac
+ 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_t *abstract, dc_dive_callback_t callbac
+ }
+
+ // 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_vtable_t {
+ } 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_t *abstract, unsigned char data[], unsi
+ 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 *abstract, unsigned int address, unsigne
+ {
+ 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 *abstract, unsigned int address, unsigne
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+
+ // 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 (dc_parser_t *abstract, dc_sample_callback
+ 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_device_t *abstract, dc_event_progress_t *p
+
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ // 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_device_t *abstract, dc_event_progress_t *p
+ }
+
+ // 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_t *abstract, unsigned char data[], unsig
+ 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_t *abstract, unsigned char data[], unsig
+ // 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_t *abstract, unsigned char data[], unsig
+ // 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 *abstract, unsigned int address, unsigned
+ {
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ if (next != current)
+ break;
+
+- idx += PAGESIZE / 2;
++ idx += XPAGESIZE / 2;
+ count++;
+ }
+ }
+@@ -317,7 +317,7 @@ oceanic_vtpro_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ 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_parser_t *abstract, dc_sample_callback_
+
+ // 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_parser_t *abstract, dc_sample_callback_
+ 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
new file mode 100644
index 000000000000..03995bfbfc1b
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.8
+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=f6953421148d36dc7e1ca95981bc9873894e0ab51f87ac332fd62322e77c76f2
+
+pre_configure() {
+ autoreconf -fi
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From 19099c56dd36d3b3ca71549ba57b5ac9188de954 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.8
---
.../patches/core-depends-generated-ui.patch | 10 ++++++++++
.../Subsurface/patches/make-or-ninja.patch | 11 ++++++++++
srcpkgs/Subsurface/template | 20 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
create mode 100644 srcpkgs/Subsurface/patches/make-or-ninja.patch
create mode 100644 srcpkgs/Subsurface/template
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 000000000000..d422e705df09
--- /dev/null
+++ b/srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -455,6 +455,7 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
+ 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 000000000000..08f11a434b58
--- /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
new file mode 100644
index 000000000000..b860e95ff561
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,20 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+version=5.0.8
+revision=1
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+ -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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=38803a84ef6c3efce937f06d99fca365bdc22789c28c57d219838748fbc810cf
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (40 preceding siblings ...)
2022-07-26 18:39 ` [PR PATCH] [Updated] Subsurface adbrown101
@ 2022-07-26 18:42 ` adbrown101
2022-08-06 15:51 ` [PR PATCH] [Updated] Subsurface adbrown101
` (9 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-07-26 18:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-1195850563
Comment:
Hi, I had a message about this pull request going stale. Is there anything more I can do to get this accepted?
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (41 preceding siblings ...)
2022-07-26 18:42 ` Subsurface adbrown101
@ 2022-08-06 15:51 ` adbrown101
2022-08-07 15:51 ` adbrown101
` (8 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-08-06 15:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 42984 bytes --]
From 67048d170e2fe052679ff8d2210c08ef699b2da2 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 18 ++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 20 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..ef301d542273
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,18 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=googlemaps-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake qt5-devel"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+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/googlemaps/archive/v.${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From 037bf1f8a974fd9050bfb292829102ce0de010d5 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.8
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
.../patches/PAGESIZE.patch | 873 ++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/template | 30 +
srcpkgs/libdivecomputer-subsurface/update | 2 +
4 files changed, 906 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
new file mode 100644
index 000000000000..e1c3bd3d066f
--- /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_t *abstract, unsigned int address, unsig
+ 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_t *abstract, unsigned int address, unsig
+
+ nbytes += SEGMENTSIZE;
+ segment++;
+- if (segment == (PAGESIZE / SEGMENTSIZE)) {
++ if (segment == (XPAGESIZE / SEGMENTSIZE)) {
+ segment = 0;
+ page++;
+ }
+@@ -410,13 +410,13 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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_device_t *abstract, dc_dive_callback_t callb
+ 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
+@@ -1009,11 +1009,11 @@ oceanic_atom2_device_version (dc_device_t *abstract, unsigned char data[], unsig
+ 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;
+
+@@ -1027,8 +1027,8 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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.
+@@ -1052,7 +1052,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ }
+
+ // 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;
+@@ -1064,7 +1064,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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
+@@ -1073,7 +1073,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+
+ 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
+@@ -1108,8 +1108,8 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ {
+ 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.
+@@ -1119,7 +1119,7 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -1129,16 +1129,16 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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 **out, dc_context_t *context, unsigned
+
+ // 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 **out, dc_context_t *context, unsigned
+ 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_atom2_parser_t *parser)
+ 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_atom2_parser_t *parser, const unsigned char
+ // 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_parser_t *abstract, dc_sample_callback_
+ }
+ }
+
+- 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_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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 unsigned char *string, const unsigned char *
+ 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 *abstract, dc_buffer_t *buffer)
+ 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_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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_t *abstract, dc_event_progress_t *progr
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ 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_t *abstract, dc_event_progress_t *progr
+
+ // 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_t *abstract, dc_event_progress_t *progr
+ 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_t *abstract, dc_dive_callback_t callbac
+
+ // 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_t *abstract, dc_dive_callback_t callbac
+ 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_t *abstract, dc_dive_callback_t callbac
+ }
+
+ // 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_vtable_t {
+ } 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_t *abstract, unsigned char data[], unsi
+ 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 *abstract, unsigned int address, unsigne
+ {
+ 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 *abstract, unsigned int address, unsigne
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+
+ // 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 (dc_parser_t *abstract, dc_sample_callback
+ 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_device_t *abstract, dc_event_progress_t *p
+
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ // 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_device_t *abstract, dc_event_progress_t *p
+ }
+
+ // 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_t *abstract, unsigned char data[], unsig
+ 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_t *abstract, unsigned char data[], unsig
+ // 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_t *abstract, unsigned char data[], unsig
+ // 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 *abstract, unsigned int address, unsigned
+ {
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ if (next != current)
+ break;
+
+- idx += PAGESIZE / 2;
++ idx += XPAGESIZE / 2;
+ count++;
+ }
+ }
+@@ -317,7 +317,7 @@ oceanic_vtpro_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ 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_parser_t *abstract, dc_sample_callback_
+
+ // 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_parser_t *abstract, dc_sample_callback_
+ 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
new file mode 100644
index 000000000000..03995bfbfc1b
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.8
+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=f6953421148d36dc7e1ca95981bc9873894e0ab51f87ac332fd62322e77c76f2
+
+pre_configure() {
+ autoreconf -fi
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From 405b889de25ce0789b362901e6946b495e026a6a Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.8
---
.../patches/core-depends-generated-ui.patch | 10 ++++++++++
.../Subsurface/patches/make-or-ninja.patch | 11 ++++++++++
srcpkgs/Subsurface/template | 20 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
create mode 100644 srcpkgs/Subsurface/patches/make-or-ninja.patch
create mode 100644 srcpkgs/Subsurface/template
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 000000000000..d422e705df09
--- /dev/null
+++ b/srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -455,6 +455,7 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
+ 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 000000000000..08f11a434b58
--- /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
new file mode 100644
index 000000000000..b860e95ff561
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,20 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+version=5.0.8
+revision=1
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+ -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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=38803a84ef6c3efce937f06d99fca365bdc22789c28c57d219838748fbc810cf
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (42 preceding siblings ...)
2022-08-06 15:51 ` [PR PATCH] [Updated] Subsurface adbrown101
@ 2022-08-07 15:51 ` adbrown101
2022-08-07 15:52 ` Subsurface adbrown101
` (7 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-08-07 15:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 43038 bytes --]
From 67048d170e2fe052679ff8d2210c08ef699b2da2 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 18 ++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 20 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..ef301d542273
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,18 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=googlemaps-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake qt5-devel"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+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/googlemaps/archive/v.${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From bb8330f97f775e7253a8dce6ce9987ad1d0e3e7a Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.9
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
.../patches/PAGESIZE.patch | 874 ++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/template | 30 +
srcpkgs/libdivecomputer-subsurface/update | 2 +
4 files changed, 907 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
new file mode 100644
index 000000000000..6476247a554f
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
@@ -0,0 +1,874 @@
+--- 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)
+
+@@ -329,8 +329,8 @@ liquivision_lynx_device_read (dc_device_t *abstract, unsigned int address, unsig
+ 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) {
+@@ -354,7 +354,7 @@ liquivision_lynx_device_read (dc_device_t *abstract, unsigned int address, unsig
+
+ nbytes += SEGMENTSIZE;
+ segment++;
+- if (segment == (PAGESIZE / SEGMENTSIZE)) {
++ if (segment == (XPAGESIZE / SEGMENTSIZE)) {
+ segment = 0;
+ page++;
+ }
+@@ -420,13 +420,13 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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).",
+@@ -488,8 +488,8 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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
+@@ -1011,11 +1011,11 @@ oceanic_atom2_device_version (dc_device_t *abstract, unsigned char data[], unsig
+ 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;
+
+@@ -1029,8 +1029,8 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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.
+@@ -1054,7 +1054,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ }
+
+ // 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;
+@@ -1066,7 +1066,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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
+@@ -1075,7 +1075,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+
+ 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
+@@ -1110,8 +1110,8 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ {
+ 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.
+@@ -1121,7 +1121,7 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -1131,16 +1131,16 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -167,8 +167,8 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
+
+ // 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 ||
+@@ -179,31 +179,31 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
+ 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 ||
+ model == I200CV2) {
+- parser->headersize = 5 * PAGESIZE / 2;
++ parser->headersize = 5 * XPAGESIZE / 2;
+ }
+
+ parser->serial = serial;
+@@ -433,12 +433,12 @@ oceanic_atom2_parser_cache (oceanic_atom2_parser_t *parser)
+ 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.
+@@ -665,7 +665,7 @@ oceanic_atom2_parser_vendor (oceanic_atom2_parser_t *parser, const unsigned char
+ // Get the sample size.
+ unsigned int length = samplesize;
+ if (sampletype == 0xBB) {
+- length = PAGESIZE;
++ length = XPAGESIZE;
+ }
+
+ // Vendor specific data
+@@ -720,7 +720,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ }
+
+- 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 ||
+@@ -736,7 +736,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ 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;
+@@ -806,7 +806,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ // 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 unsigned char *string, const unsigned char *
+ 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)
+@@ -210,7 +210,7 @@ oceanic_common_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
+
+ // Download the memory dump.
+ status = device_dump_read (abstract, 0, dc_buffer_get_data (buffer),
+- dc_buffer_get_size (buffer), PAGESIZE * device->multipage);
++ dc_buffer_get_size (buffer), XPAGESIZE * device->multipage);
+ if (status != DC_STATUS_SUCCESS) {
+ return status;
+ }
+@@ -260,7 +260,7 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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.");
+@@ -304,8 +304,8 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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);
+
+@@ -323,7 +323,7 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+
+ // 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;
+@@ -400,7 +400,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+ 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);
+@@ -485,7 +485,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+
+ // 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;
+@@ -578,7 +578,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+ 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;
+ }
+@@ -609,7 +609,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+
+ // 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);
+@@ -621,7 +621,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+ 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.");
+@@ -629,7 +629,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+ }
+
+ // 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_vtable_t {
+ } 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_t *abstract, unsigned char data[], unsi
+ 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 *abstract, unsigned int address, unsigne
+ {
+ 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 *abstract, unsigned int address, unsigne
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+
+ // 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 (dc_parser_t *abstract, dc_sample_callback
+ 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_device_t *abstract, dc_event_progress_t *p
+
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ // 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_device_t *abstract, dc_event_progress_t *p
+ }
+
+ // 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_t *abstract, unsigned char data[], unsig
+ 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_t *abstract, unsigned char data[], unsig
+ // 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_t *abstract, unsigned char data[], unsig
+ // 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 *abstract, unsigned int address, unsigned
+ {
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ if (next != current)
+ break;
+
+- idx += PAGESIZE / 2;
++ idx += XPAGESIZE / 2;
+ count++;
+ }
+ }
+@@ -317,7 +317,7 @@ oceanic_vtpro_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ 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_parser_t *abstract, dc_sample_callback_
+
+ // 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_parser_t *abstract, dc_sample_callback_
+ 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
new file mode 100644
index 000000000000..5d354c572302
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.9
+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=dc64d235cced88d8db44fd9b9debd735caf7cbd199b79fabe61fecb8f64c7905
+
+pre_configure() {
+ autoreconf -fi
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From e3c38ebe83071ca7bbaf46be4fbf20fd349211c7 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.9
---
.../patches/core-depends-generated-ui.patch | 10 ++++++++++
.../Subsurface/patches/make-or-ninja.patch | 11 ++++++++++
srcpkgs/Subsurface/template | 20 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
create mode 100644 srcpkgs/Subsurface/patches/make-or-ninja.patch
create mode 100644 srcpkgs/Subsurface/template
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 000000000000..0c94df6e91ad
--- /dev/null
+++ b/srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -507,6 +507,7 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
+ 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 000000000000..08f11a434b58
--- /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
new file mode 100644
index 000000000000..63109a8b6487
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,20 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+version=5.0.9
+revision=1
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+ -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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=7ad324e936727300cb08ce035075782f0ebd1003dd80df7118588590afdf63c1
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (43 preceding siblings ...)
2022-08-07 15:51 ` adbrown101
@ 2022-08-07 15:52 ` adbrown101
2022-10-29 14:13 ` [PR PATCH] [Updated] Subsurface adbrown101
` (6 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-08-07 15:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 161 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-1207436052
Comment:
Updated to 5.0.9
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (44 preceding siblings ...)
2022-08-07 15:52 ` Subsurface adbrown101
@ 2022-10-29 14:13 ` adbrown101
2022-10-29 16:06 ` adbrown101
` (5 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-10-29 14:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 43038 bytes --]
From 123fed6dde52549820d20ac7014e8821ddfa71be Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 18 ++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 20 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..ef301d542273
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,18 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=googlemaps-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake qt5-devel"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+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/googlemaps/archive/v.${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From f334737406fce3722328f51337e88f49c4b1a695 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.9
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
.../patches/PAGESIZE.patch | 874 ++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/template | 30 +
srcpkgs/libdivecomputer-subsurface/update | 2 +
4 files changed, 907 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
new file mode 100644
index 000000000000..6476247a554f
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
@@ -0,0 +1,874 @@
+--- 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)
+
+@@ -329,8 +329,8 @@ liquivision_lynx_device_read (dc_device_t *abstract, unsigned int address, unsig
+ 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) {
+@@ -354,7 +354,7 @@ liquivision_lynx_device_read (dc_device_t *abstract, unsigned int address, unsig
+
+ nbytes += SEGMENTSIZE;
+ segment++;
+- if (segment == (PAGESIZE / SEGMENTSIZE)) {
++ if (segment == (XPAGESIZE / SEGMENTSIZE)) {
+ segment = 0;
+ page++;
+ }
+@@ -420,13 +420,13 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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).",
+@@ -488,8 +488,8 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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
+@@ -1011,11 +1011,11 @@ oceanic_atom2_device_version (dc_device_t *abstract, unsigned char data[], unsig
+ 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;
+
+@@ -1029,8 +1029,8 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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.
+@@ -1054,7 +1054,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ }
+
+ // 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;
+@@ -1066,7 +1066,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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
+@@ -1075,7 +1075,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+
+ 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
+@@ -1110,8 +1110,8 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ {
+ 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.
+@@ -1121,7 +1121,7 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -1131,16 +1131,16 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -167,8 +167,8 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
+
+ // 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 ||
+@@ -179,31 +179,31 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
+ 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 ||
+ model == I200CV2) {
+- parser->headersize = 5 * PAGESIZE / 2;
++ parser->headersize = 5 * XPAGESIZE / 2;
+ }
+
+ parser->serial = serial;
+@@ -433,12 +433,12 @@ oceanic_atom2_parser_cache (oceanic_atom2_parser_t *parser)
+ 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.
+@@ -665,7 +665,7 @@ oceanic_atom2_parser_vendor (oceanic_atom2_parser_t *parser, const unsigned char
+ // Get the sample size.
+ unsigned int length = samplesize;
+ if (sampletype == 0xBB) {
+- length = PAGESIZE;
++ length = XPAGESIZE;
+ }
+
+ // Vendor specific data
+@@ -720,7 +720,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ }
+
+- 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 ||
+@@ -736,7 +736,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ 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;
+@@ -806,7 +806,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ // 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 unsigned char *string, const unsigned char *
+ 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)
+@@ -210,7 +210,7 @@ oceanic_common_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
+
+ // Download the memory dump.
+ status = device_dump_read (abstract, 0, dc_buffer_get_data (buffer),
+- dc_buffer_get_size (buffer), PAGESIZE * device->multipage);
++ dc_buffer_get_size (buffer), XPAGESIZE * device->multipage);
+ if (status != DC_STATUS_SUCCESS) {
+ return status;
+ }
+@@ -260,7 +260,7 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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.");
+@@ -304,8 +304,8 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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);
+
+@@ -323,7 +323,7 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+
+ // 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;
+@@ -400,7 +400,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+ 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);
+@@ -485,7 +485,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+
+ // 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;
+@@ -578,7 +578,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+ 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;
+ }
+@@ -609,7 +609,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+
+ // 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);
+@@ -621,7 +621,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+ 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.");
+@@ -629,7 +629,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+ }
+
+ // 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_vtable_t {
+ } 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_t *abstract, unsigned char data[], unsi
+ 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 *abstract, unsigned int address, unsigne
+ {
+ 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 *abstract, unsigned int address, unsigne
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+
+ // 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 (dc_parser_t *abstract, dc_sample_callback
+ 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_device_t *abstract, dc_event_progress_t *p
+
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ // 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_device_t *abstract, dc_event_progress_t *p
+ }
+
+ // 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_t *abstract, unsigned char data[], unsig
+ 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_t *abstract, unsigned char data[], unsig
+ // 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_t *abstract, unsigned char data[], unsig
+ // 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 *abstract, unsigned int address, unsigned
+ {
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ if (next != current)
+ break;
+
+- idx += PAGESIZE / 2;
++ idx += XPAGESIZE / 2;
+ count++;
+ }
+ }
+@@ -317,7 +317,7 @@ oceanic_vtpro_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ 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_parser_t *abstract, dc_sample_callback_
+
+ // 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_parser_t *abstract, dc_sample_callback_
+ 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
new file mode 100644
index 000000000000..5d354c572302
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.9
+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=dc64d235cced88d8db44fd9b9debd735caf7cbd199b79fabe61fecb8f64c7905
+
+pre_configure() {
+ autoreconf -fi
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From caf46e8e8585bfd250c5dd59de868e532595708e Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.9
---
.../patches/core-depends-generated-ui.patch | 10 ++++++++++
.../Subsurface/patches/make-or-ninja.patch | 11 ++++++++++
srcpkgs/Subsurface/template | 20 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
create mode 100644 srcpkgs/Subsurface/patches/make-or-ninja.patch
create mode 100644 srcpkgs/Subsurface/template
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 000000000000..0c94df6e91ad
--- /dev/null
+++ b/srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -507,6 +507,7 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
+ 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 000000000000..08f11a434b58
--- /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
new file mode 100644
index 000000000000..63109a8b6487
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,20 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+version=5.0.9
+revision=1
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+ -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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=7ad324e936727300cb08ce035075782f0ebd1003dd80df7118588590afdf63c1
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (45 preceding siblings ...)
2022-10-29 14:13 ` [PR PATCH] [Updated] Subsurface adbrown101
@ 2022-10-29 16:06 ` adbrown101
2022-10-29 16:06 ` Subsurface adbrown101
` (4 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-10-29 16:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 43042 bytes --]
From 123fed6dde52549820d20ac7014e8821ddfa71be Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 18 ++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 20 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..ef301d542273
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,18 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=googlemaps-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake qt5-devel"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+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/googlemaps/archive/v.${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From 7524c37890cee750bb4b135ce71b3e795fdbc7fd Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.10
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
.../patches/PAGESIZE.patch | 874 ++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/template | 30 +
srcpkgs/libdivecomputer-subsurface/update | 2 +
4 files changed, 907 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
new file mode 100644
index 000000000000..6476247a554f
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
@@ -0,0 +1,874 @@
+--- 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)
+
+@@ -329,8 +329,8 @@ liquivision_lynx_device_read (dc_device_t *abstract, unsigned int address, unsig
+ 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) {
+@@ -354,7 +354,7 @@ liquivision_lynx_device_read (dc_device_t *abstract, unsigned int address, unsig
+
+ nbytes += SEGMENTSIZE;
+ segment++;
+- if (segment == (PAGESIZE / SEGMENTSIZE)) {
++ if (segment == (XPAGESIZE / SEGMENTSIZE)) {
+ segment = 0;
+ page++;
+ }
+@@ -420,13 +420,13 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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).",
+@@ -488,8 +488,8 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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
+@@ -1011,11 +1011,11 @@ oceanic_atom2_device_version (dc_device_t *abstract, unsigned char data[], unsig
+ 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;
+
+@@ -1029,8 +1029,8 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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.
+@@ -1054,7 +1054,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ }
+
+ // 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;
+@@ -1066,7 +1066,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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
+@@ -1075,7 +1075,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+
+ 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
+@@ -1110,8 +1110,8 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ {
+ 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.
+@@ -1121,7 +1121,7 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -1131,16 +1131,16 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -167,8 +167,8 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
+
+ // 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 ||
+@@ -179,31 +179,31 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
+ 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 ||
+ model == I200CV2) {
+- parser->headersize = 5 * PAGESIZE / 2;
++ parser->headersize = 5 * XPAGESIZE / 2;
+ }
+
+ parser->serial = serial;
+@@ -433,12 +433,12 @@ oceanic_atom2_parser_cache (oceanic_atom2_parser_t *parser)
+ 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.
+@@ -665,7 +665,7 @@ oceanic_atom2_parser_vendor (oceanic_atom2_parser_t *parser, const unsigned char
+ // Get the sample size.
+ unsigned int length = samplesize;
+ if (sampletype == 0xBB) {
+- length = PAGESIZE;
++ length = XPAGESIZE;
+ }
+
+ // Vendor specific data
+@@ -720,7 +720,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ }
+
+- 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 ||
+@@ -736,7 +736,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ 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;
+@@ -806,7 +806,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ // 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 unsigned char *string, const unsigned char *
+ 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)
+@@ -210,7 +210,7 @@ oceanic_common_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
+
+ // Download the memory dump.
+ status = device_dump_read (abstract, 0, dc_buffer_get_data (buffer),
+- dc_buffer_get_size (buffer), PAGESIZE * device->multipage);
++ dc_buffer_get_size (buffer), XPAGESIZE * device->multipage);
+ if (status != DC_STATUS_SUCCESS) {
+ return status;
+ }
+@@ -260,7 +260,7 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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.");
+@@ -304,8 +304,8 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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);
+
+@@ -323,7 +323,7 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+
+ // 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;
+@@ -400,7 +400,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+ 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);
+@@ -485,7 +485,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+
+ // 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;
+@@ -578,7 +578,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+ 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;
+ }
+@@ -609,7 +609,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+
+ // 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);
+@@ -621,7 +621,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+ 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.");
+@@ -629,7 +629,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+ }
+
+ // 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_vtable_t {
+ } 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_t *abstract, unsigned char data[], unsi
+ 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 *abstract, unsigned int address, unsigne
+ {
+ 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 *abstract, unsigned int address, unsigne
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+
+ // 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 (dc_parser_t *abstract, dc_sample_callback
+ 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_device_t *abstract, dc_event_progress_t *p
+
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ // 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_device_t *abstract, dc_event_progress_t *p
+ }
+
+ // 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_t *abstract, unsigned char data[], unsig
+ 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_t *abstract, unsigned char data[], unsig
+ // 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_t *abstract, unsigned char data[], unsig
+ // 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 *abstract, unsigned int address, unsigned
+ {
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ if (next != current)
+ break;
+
+- idx += PAGESIZE / 2;
++ idx += XPAGESIZE / 2;
+ count++;
+ }
+ }
+@@ -317,7 +317,7 @@ oceanic_vtpro_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ 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_parser_t *abstract, dc_sample_callback_
+
+ // 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_parser_t *abstract, dc_sample_callback_
+ 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
new file mode 100644
index 000000000000..b281bb84cd10
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.10
+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=5dc13c5e82c35e5041cdde2ee206b6c5972e6755ea399373df7cfd77d7275f14
+
+pre_configure() {
+ autoreconf -fi
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From b337de2bfae5685883e1213a683d3071a07509cb Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.10
---
.../patches/core-depends-generated-ui.patch | 10 ++++++++++
.../Subsurface/patches/make-or-ninja.patch | 11 ++++++++++
srcpkgs/Subsurface/template | 20 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
create mode 100644 srcpkgs/Subsurface/patches/make-or-ninja.patch
create mode 100644 srcpkgs/Subsurface/template
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 000000000000..0c94df6e91ad
--- /dev/null
+++ b/srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -507,6 +507,7 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
+ 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 000000000000..08f11a434b58
--- /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
new file mode 100644
index 000000000000..953266b62ec2
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,20 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+version=5.0.10
+revision=1
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+ -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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=f1a97828a726443c8e8beb977e8d048edb18a3cbd0560baf257d5aedc44edd96
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (46 preceding siblings ...)
2022-10-29 16:06 ` adbrown101
@ 2022-10-29 16:06 ` adbrown101
2023-01-28 2:00 ` Subsurface github-actions
` (3 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2022-10-29 16:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 162 bytes --]
New comment by adbrown101 on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-1295884677
Comment:
Updated to 5.0.10
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (47 preceding siblings ...)
2022-10-29 16:06 ` Subsurface adbrown101
@ 2023-01-28 2:00 ` github-actions
2023-02-01 12:26 ` [PR PATCH] [Updated] Subsurface adbrown101
` (2 subsequent siblings)
51 siblings, 0 replies; 53+ messages in thread
From: github-actions @ 2023-01-28 2:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-1407252994
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Updated] Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (48 preceding siblings ...)
2023-01-28 2:00 ` Subsurface github-actions
@ 2023-02-01 12:26 ` adbrown101
2023-05-04 1:51 ` Subsurface github-actions
2023-05-18 1:52 ` [PR PATCH] [Closed]: Subsurface github-actions
51 siblings, 0 replies; 53+ messages in thread
From: adbrown101 @ 2023-02-01 12:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by adbrown101 against master on the void-packages repository
https://github.com/adbrown101/void-packages subsurface
https://github.com/void-linux/void-packages/pull/34187
Subsurface
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
A patch file from https://github.com/void-linux/void-packages/pull/34187.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-subsurface-34187.patch --]
[-- Type: text/x-diff, Size: 43042 bytes --]
From f7943bce1ff55d9025575253c0439aca48985ecd Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:22:14 +0000
Subject: [PATCH 1/3] New package: qtlocation-plugin-googlemaps-0.0.0.2
---
srcpkgs/qtlocation-plugin-googlemaps/template | 18 ++++++++++++++++++
srcpkgs/qtlocation-plugin-googlemaps/update | 2 ++
2 files changed, 20 insertions(+)
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/template
create mode 100644 srcpkgs/qtlocation-plugin-googlemaps/update
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/template b/srcpkgs/qtlocation-plugin-googlemaps/template
new file mode 100644
index 000000000000..ef301d542273
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/template
@@ -0,0 +1,18 @@
+# Template file for 'qtlocation-plugin-googlemaps'
+pkgname=qtlocation-plugin-googlemaps
+version=0.0.0.2
+revision=1
+wrksrc=googlemaps-v.${version}
+build_style=qmake
+hostmakedepends="qt5-qmake qt5-devel"
+makedepends="qt5-devel qt5-location-devel qt5-declarative-devel"
+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/googlemaps/archive/v.${version}.tar.gz"
+checksum=aac2f995917e75dff2861ce38049ccbb1cd51d078cb45d78158caa40a97a5bf0
+
+post_install() {
+ vlicense LICENSE.txt
+}
diff --git a/srcpkgs/qtlocation-plugin-googlemaps/update b/srcpkgs/qtlocation-plugin-googlemaps/update
new file mode 100644
index 000000000000..7b68f9be62e3
--- /dev/null
+++ b/srcpkgs/qtlocation-plugin-googlemaps/update
@@ -0,0 +1,2 @@
+pkgname=googlemaps
+pattern="v\.\K[\d\.]+(?=\.tar\.gz)"
From 49b8e0a6ad8e7e86a028b0e7fa4e7ac3bba2a409 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:04 +0000
Subject: [PATCH 2/3] New package: libdivecomputer-subsurface-5.0.10
---
srcpkgs/libdivecomputer-subsurface-devel | 1 +
.../patches/PAGESIZE.patch | 874 ++++++++++++++++++
srcpkgs/libdivecomputer-subsurface/template | 30 +
srcpkgs/libdivecomputer-subsurface/update | 2 +
4 files changed, 907 insertions(+)
create mode 120000 srcpkgs/libdivecomputer-subsurface-devel
create mode 100644 srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
create mode 100644 srcpkgs/libdivecomputer-subsurface/template
create mode 100644 srcpkgs/libdivecomputer-subsurface/update
diff --git a/srcpkgs/libdivecomputer-subsurface-devel b/srcpkgs/libdivecomputer-subsurface-devel
new file mode 120000
index 000000000000..3500e0b5b0d5
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface-devel
@@ -0,0 +1 @@
+libdivecomputer-subsurface
\ No newline at end of file
diff --git a/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
new file mode 100644
index 000000000000..6476247a554f
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/patches/PAGESIZE.patch
@@ -0,0 +1,874 @@
+--- 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)
+
+@@ -329,8 +329,8 @@ liquivision_lynx_device_read (dc_device_t *abstract, unsigned int address, unsig
+ 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) {
+@@ -354,7 +354,7 @@ liquivision_lynx_device_read (dc_device_t *abstract, unsigned int address, unsig
+
+ nbytes += SEGMENTSIZE;
+ segment++;
+- if (segment == (PAGESIZE / SEGMENTSIZE)) {
++ if (segment == (XPAGESIZE / SEGMENTSIZE)) {
+ segment = 0;
+ page++;
+ }
+@@ -420,13 +420,13 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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).",
+@@ -488,8 +488,8 @@ liquivision_lynx_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
+ 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
+@@ -1011,11 +1011,11 @@ oceanic_atom2_device_version (dc_device_t *abstract, unsigned char data[], unsig
+ 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;
+
+@@ -1029,8 +1029,8 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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.
+@@ -1054,7 +1054,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ }
+
+ // 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;
+@@ -1066,7 +1066,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+ 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
+@@ -1075,7 +1075,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
+
+ 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
+@@ -1110,8 +1110,8 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ {
+ 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.
+@@ -1121,7 +1121,7 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -1131,16 +1131,16 @@ oceanic_atom2_device_write (dc_device_t *abstract, unsigned int address, const u
+ 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
+@@ -167,8 +167,8 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
+
+ // 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 ||
+@@ -179,31 +179,31 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
+ 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 ||
+ model == I200CV2) {
+- parser->headersize = 5 * PAGESIZE / 2;
++ parser->headersize = 5 * XPAGESIZE / 2;
+ }
+
+ parser->serial = serial;
+@@ -433,12 +433,12 @@ oceanic_atom2_parser_cache (oceanic_atom2_parser_t *parser)
+ 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.
+@@ -665,7 +665,7 @@ oceanic_atom2_parser_vendor (oceanic_atom2_parser_t *parser, const unsigned char
+ // Get the sample size.
+ unsigned int length = samplesize;
+ if (sampletype == 0xBB) {
+- length = PAGESIZE;
++ length = XPAGESIZE;
+ }
+
+ // Vendor specific data
+@@ -720,7 +720,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ }
+
+- 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 ||
+@@ -736,7 +736,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ 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;
+@@ -806,7 +806,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ // 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 unsigned char *string, const unsigned char *
+ 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)
+@@ -210,7 +210,7 @@ oceanic_common_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
+
+ // Download the memory dump.
+ status = device_dump_read (abstract, 0, dc_buffer_get_data (buffer),
+- dc_buffer_get_size (buffer), PAGESIZE * device->multipage);
++ dc_buffer_get_size (buffer), XPAGESIZE * device->multipage);
+ if (status != DC_STATUS_SUCCESS) {
+ return status;
+ }
+@@ -260,7 +260,7 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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.");
+@@ -304,8 +304,8 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+ }
+
+ // 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);
+
+@@ -323,7 +323,7 @@ oceanic_common_device_logbook (dc_device_t *abstract, dc_event_progress_t *progr
+
+ // 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;
+@@ -400,7 +400,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+ 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);
+@@ -485,7 +485,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+
+ // 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;
+@@ -578,7 +578,7 @@ oceanic_common_device_profile (dc_device_t *abstract, dc_event_progress_t *progr
+ 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;
+ }
+@@ -609,7 +609,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+
+ // 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);
+@@ -621,7 +621,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+ 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.");
+@@ -629,7 +629,7 @@ oceanic_common_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
+ }
+
+ // 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_vtable_t {
+ } 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_t *abstract, unsigned char data[], unsi
+ 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 *abstract, unsigned int address, unsigne
+ {
+ 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 *abstract, unsigned int address, unsigne
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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_parser_t *abstract, dc_field_type_t type, un
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+ 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 (dc_parser_t *abstract, dc_sample_callback
+
+ // 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 (dc_parser_t *abstract, dc_sample_callback
+ 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_device_t *abstract, dc_event_progress_t *p
+
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ 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_device_t *abstract, dc_event_progress_t *p
+ // 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_device_t *abstract, dc_event_progress_t *p
+ }
+
+ // 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_t *abstract, unsigned char data[], unsig
+ 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_t *abstract, unsigned char data[], unsig
+ // 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_t *abstract, unsigned char data[], unsig
+ // 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 *abstract, unsigned int address, unsigned
+ {
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_field_type_t type, uns
+ 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_parser_t *abstract, dc_sample_callback_
+ 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ // 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_parser_t *abstract, dc_sample_callback_
+ if (next != current)
+ break;
+
+- idx += PAGESIZE / 2;
++ idx += XPAGESIZE / 2;
+ count++;
+ }
+ }
+@@ -317,7 +317,7 @@ oceanic_vtpro_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
+ }
+ 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_parser_t *abstract, dc_sample_callback_
+
+ // 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_parser_t *abstract, dc_sample_callback_
+ 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
new file mode 100644
index 000000000000..b281bb84cd10
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/template
@@ -0,0 +1,30 @@
+# Template file for 'libdivecomputer-subsurface'
+pkgname=libdivecomputer-subsurface
+version=5.0.10
+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=5dc13c5e82c35e5041cdde2ee206b6c5972e6755ea399373df7cfd77d7275f14
+
+pre_configure() {
+ autoreconf -fi
+}
+
+libdivecomputer-subsurface-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/*.a"
+ vmove usr/share/man/man3
+ }
+}
diff --git a/srcpkgs/libdivecomputer-subsurface/update b/srcpkgs/libdivecomputer-subsurface/update
new file mode 100644
index 000000000000..61fff2459745
--- /dev/null
+++ b/srcpkgs/libdivecomputer-subsurface/update
@@ -0,0 +1,2 @@
+site="${homepage}/downloads"
+pattern="${pkgname}-branch-\K[\d\.]+(?=\.tgz)"
From d8f54a6b1d5b2667a7f6c1e7471ee26588888160 Mon Sep 17 00:00:00 2001
From: Alan Brown <adbrown@rocketmail.com>
Date: Thu, 25 Nov 2021 18:23:39 +0000
Subject: [PATCH 3/3] New package: Subsurface-5.0.10
---
.../patches/core-depends-generated-ui.patch | 10 ++++++++++
.../Subsurface/patches/make-or-ninja.patch | 11 ++++++++++
srcpkgs/Subsurface/template | 20 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
create mode 100644 srcpkgs/Subsurface/patches/make-or-ninja.patch
create mode 100644 srcpkgs/Subsurface/template
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 000000000000..0c94df6e91ad
--- /dev/null
+++ b/srcpkgs/Subsurface/patches/core-depends-generated-ui.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -507,6 +507,7 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
+ 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 000000000000..08f11a434b58
--- /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
new file mode 100644
index 000000000000..953266b62ec2
--- /dev/null
+++ b/srcpkgs/Subsurface/template
@@ -0,0 +1,20 @@
+# Template file for 'Subsurface'
+pkgname=Subsurface
+version=5.0.10
+revision=1
+build_style=cmake
+configure_args="-DSUBSURFACE_TARGET_EXECUTABLE=DesktopExecutable
+ -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
+ libxslt-devel qt5-devel qt5-connectivity-devel qt5-declarative-devel
+ qt5-location-devel qt5-script-devel qt5-svg-devel qt5-tools-devel
+ qt5-webkit-devel bluez-qt5-devel libgit2-devel libzip-devel libmtp-devel"
+depends="libdivecomputer-subsurface qtlocation-plugin-googlemaps"
+short_desc="Multi-platform divelog software"
+maintainer="Alan Brown <adbrown@rocketmail.com>"
+license="GPL-2.0-only"
+homepage="https://subsurface-divelog.org/"
+distfiles="${homepage}/downloads/${pkgname}-${version}.tgz"
+checksum=f1a97828a726443c8e8beb977e8d048edb18a3cbd0560baf257d5aedc44edd96
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (49 preceding siblings ...)
2023-02-01 12:26 ` [PR PATCH] [Updated] Subsurface adbrown101
@ 2023-05-04 1:51 ` github-actions
2023-05-18 1:52 ` [PR PATCH] [Closed]: Subsurface github-actions
51 siblings, 0 replies; 53+ messages in thread
From: github-actions @ 2023-05-04 1:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/34187#issuecomment-1533974071
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PR PATCH] [Closed]: Subsurface
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
` (50 preceding siblings ...)
2023-05-04 1:51 ` Subsurface github-actions
@ 2023-05-18 1:52 ` github-actions
51 siblings, 0 replies; 53+ messages in thread
From: github-actions @ 2023-05-18 1:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]
There's a closed pull request on the void-packages repository
Subsurface
https://github.com/void-linux/void-packages/pull/34187
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64, x86_64-musl, i686
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64, aarch64-musl
I have been using subsurface for some time and have used on x86_64 and x86_64-musl. Works well on void.
^ permalink raw reply [flat|nested] 53+ messages in thread
end of thread, other threads:[~2023-05-18 1:53 UTC | newest]
Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-21 15:59 [PR PATCH] Subsurface adbrown101
2021-11-21 18:39 ` [PR REVIEW] Subsurface ericonr
2021-11-21 18:39 ` ericonr
2021-11-21 18:39 ` ericonr
2021-11-21 18:39 ` ericonr
2021-11-21 18:39 ` ericonr
2021-11-21 18:39 ` ericonr
2021-11-22 12:30 ` [PR PATCH] [Updated] Subsurface adbrown101
2021-11-22 13:45 ` adbrown101
2021-11-22 14:45 ` [PR REVIEW] Subsurface adbrown101
2021-11-22 14:45 ` adbrown101
2021-11-22 14:46 ` adbrown101
2021-11-22 14:46 ` adbrown101
2021-11-22 14:46 ` adbrown101
2021-11-22 14:46 ` adbrown101
2021-11-24 9:25 ` [PR PATCH] [Updated] Subsurface adbrown101
2021-11-24 12:08 ` [PR REVIEW] Subsurface adbrown101
2021-11-24 12:17 ` Subsurface adbrown101
2021-11-24 19:36 ` Subsurface Chocimier
2021-11-25 12:04 ` [PR PATCH] [Updated] Subsurface adbrown101
2021-11-25 12:52 ` adbrown101
2021-11-25 18:24 ` adbrown101
2021-11-25 18:27 ` Subsurface adbrown101
2021-11-25 19:31 ` Subsurface ericonr
2021-11-26 3:43 ` [PR REVIEW] Subsurface sgn
2021-11-26 3:52 ` Subsurface sgn
2021-11-26 4:24 ` Subsurface sgn
2021-11-26 4:28 ` [PR PATCH] [Updated] Subsurface sgn
2021-11-26 12:56 ` [PR REVIEW] Subsurface adbrown101
2021-11-26 13:08 ` [PR PATCH] [Updated] Subsurface adbrown101
2021-11-29 12:06 ` Subsurface adbrown101
2021-11-30 13:24 ` Subsurface adbrown101
2021-12-03 20:20 ` Subsurface adbrown101
2021-12-05 22:04 ` Subsurface adbrown101
2021-12-09 17:15 ` Subsurface adbrown101
2022-02-06 15:44 ` [PR PATCH] [Updated] Subsurface adbrown101
2022-02-06 15:47 ` Subsurface adbrown101
2022-02-08 12:15 ` [PR REVIEW] Subsurface adbrown101
2022-03-30 17:39 ` [PR PATCH] [Updated] Subsurface adbrown101
2022-04-24 13:18 ` adbrown101
2022-07-24 2:13 ` Subsurface github-actions
2022-07-26 18:39 ` [PR PATCH] [Updated] Subsurface adbrown101
2022-07-26 18:42 ` Subsurface adbrown101
2022-08-06 15:51 ` [PR PATCH] [Updated] Subsurface adbrown101
2022-08-07 15:51 ` adbrown101
2022-08-07 15:52 ` Subsurface adbrown101
2022-10-29 14:13 ` [PR PATCH] [Updated] Subsurface adbrown101
2022-10-29 16:06 ` adbrown101
2022-10-29 16:06 ` Subsurface adbrown101
2023-01-28 2:00 ` Subsurface github-actions
2023-02-01 12:26 ` [PR PATCH] [Updated] Subsurface adbrown101
2023-05-04 1:51 ` Subsurface github-actions
2023-05-18 1:52 ` [PR PATCH] [Closed]: Subsurface github-actions
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).