Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WiP] Update libgdal and proj and rebuild against them
@ 2021-06-27 21:17 ar-jan
  2021-06-27 21:20 ` [PR PATCH] [Updated] " ar-jan
                   ` (57 more replies)
  0 siblings, 58 replies; 59+ messages in thread
From: ar-jan @ 2021-06-27 21:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]

There is a new pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

[WiP] Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 22381 bytes --]

From f0e34faa3ad69932a3c85c09a715c9babd87a435 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Fri, 27 Nov 2020 07:02:22 +0100
Subject: [PATCH 1/8] libgdal: update to 3.2.3.

- update to 3.2.2.
- --with-expat / --with-spatialite added (OSM support)
- postgresql and kml support added
- python3-gdal module added
---
 common/shlibs                                 |  2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch | 53 -------------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch | 31 --------
 srcpkgs/libgdal/template                      | 74 ++++++++++++++++---
 srcpkgs/python3-gdal                          |  1 +
 5 files changed, 64 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 8a7eef8df8c3..d801c4095354 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2498,7 +2498,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.28 libgdal-3.2.3_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 72c96ff67605..8e9c7fbbfc6e 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,27 +1,63 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=9
+version=3.2.3
+revision=1
+# aarch & arm temporary disabled
+archs="~aarch* ~armv*"
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-podofo=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes
+ $(vopt_if kml libkml)
+ $(vopt_with postgresql pg)"
+hostmakedepends="gettext-devel pkg-config python3-numpy json-c-devel swig"
+makedepends="boost-devel expat-devel freexl-devel geos-devel jasper-devel
+ json-c-devel libcurl-devel libopenexr-devel libopenjpeg2-devel
+ libpodofo-devel libqhull-devel libspatialite-devel libwebp-devel
+ libxml2-devel libzstd-devel netcdf-devel ocl-icd-devel opencl-headers
+ pcre2-devel proj-devel python3-devel sqlite-devel
+ $(vopt_if kml libkml-devel)
+ $(vopt_if postgresql postgresql-libs-devel)"
 short_desc="Geospatial Data Abstraction Library"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Nyx70 <n.y.x@bluewin.ch>"
 license="MIT"
 homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=86a35aad60a1eb87c2c0c145f9bccd83a47c4781254544ed5246f64d55ee1f18
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
 
+do_build() {
+	: ${make_cmd:=make}
+	${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}
+	# python modules
+	rm -f swig/python/*_wrap.cpp
+	${make_cmd} -C swig/python generate
+	cd swig/python
+	${make_cmd} ${makejobs} PYTHON=python3 ${makejobs} ${make_build_args} ${make_build_target}
+}
+
+do_install() {
+	: ${make_cmd:=make}
+	${make_cmd} DESTDIR=${DESTDIR} install
+	# python modules
+	cd swig/python
+	${make_cmd} PYTHON=python3 DESTDIR=${DESTDIR}/ install
+}
+
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
@@ -46,3 +82,17 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove usr/bin/*.py
+		vmove "usr/lib/python*"
+		vlicense $wrksrc/$build_wrksrc/LICENSE.TXT
+		vdoc $wrksrc/$build_wrksrc/swig/python/README.rst
+		mkdir -p ${PKGDESTDIR}/usr/share/${pkgname}
+		cp -r $wrksrc/$build_wrksrc/swig/python/samples ${PKGDESTDIR}/usr/share/${pkgname}/examples
+		rm -rf ${PKGDESTDIR}/lib
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 8474e709d2bd31d210182253f1d2db6bb0a5352c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=BDx?= <n.y.x@bluewin.ch>
Date: Tue, 11 May 2021 07:00:33 +0200
Subject: [PATCH 2/8] proj: update to 7.2.1.

---
 common/shlibs                |  2 +-
 srcpkgs/proj/template        | 13 ++++++-------
 srcpkgs/proj~WIP_qmapshack   |  1 +
 srcpkgs/proj~WIP_qmapshack_0 |  1 +
 4 files changed, 9 insertions(+), 8 deletions(-)
 create mode 120000 srcpkgs/proj~WIP_qmapshack
 create mode 120000 srcpkgs/proj~WIP_qmapshack_0

diff --git a/common/shlibs b/common/shlibs
index d801c4095354..8627cea7893f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3053,7 +3053,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.0 libmygui-3.4.0_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..a101b8ffa8f8 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF" 
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="sqlite-devel tiff-devel libcurl-devel"
 short_desc="Cartographic Projections Library"
-maintainer="John <me@johnnynator.dev>"
+maintainer="Nyx70 <n.y.x@bluewin.ch>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}
diff --git a/srcpkgs/proj~WIP_qmapshack b/srcpkgs/proj~WIP_qmapshack
new file mode 120000
index 000000000000..9f431e856b94
--- /dev/null
+++ b/srcpkgs/proj~WIP_qmapshack
@@ -0,0 +1 @@
+proj7
\ No newline at end of file
diff --git a/srcpkgs/proj~WIP_qmapshack_0 b/srcpkgs/proj~WIP_qmapshack_0
new file mode 120000
index 000000000000..9f431e856b94
--- /dev/null
+++ b/srcpkgs/proj~WIP_qmapshack_0
@@ -0,0 +1 @@
+proj7
\ No newline at end of file

From 4245eaf69a14c922560f43bb353c535e62bf2f40 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 3/8] New package: libkml-1.3.0

libkml is a library to process Google-KML GEO files.
It can be used in GDAL (libgdal), OSSIM, OTB and osgEarth
---
 common/shlibs                          | 15 +++++++++++++++
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 +++++++++++++++++
 srcpkgs/libkml/template                | 24 ++++++++++++++++++++++++
 4 files changed, 57 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/common/shlibs b/common/shlibs
index 8627cea7893f..fc3036cbd4af 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4013,3 +4013,18 @@ libbasu.so.0 basu-0.2.0_1
 libXcomp.so.3 nx-libs-3.5.99.24_1
 libXcompshad.so.3 nx-libs-3.5.99.24_1
 libNX_X11.so.6 nx-libs-3.5.99.24_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.0_1
+libspatialindex.so.6 libspatialindex-1.9.3_1
+libgrass_gis.7.8.so grass-7.8.5_1
+libgrass_raster.7.8.so grass-7.8.5_1
+libgrass_gproj.7.8.so grass-7.8.5_1
+libgrass_dbmiclient.7.8.so grass-7.8.5_1
+libgrass_vector.7.8.so grass-7.8.5_1    
+libgrass_dbmibase.7.8.so grass-7.8.5_1
+libgrass_imagery.7.8.so grass-7.8.5_1
+libkmlconvenience.so.1 libkml-1.3.0_1
diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..7d4f5a726606
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,24 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="zlib-devel expat-devel boost-devel minizip-devel uriparser-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Nyx70 <n.y.x@bluewin.ch>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+patch_args=-Np1
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From 9fc01afb2a923c852d34a1ce6802982f91a6fe5a Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Sun, 20 Dec 2020 14:49:30 +0100
Subject: [PATCH 4/8] New package: libspatialite-5.0.0

SpatiaLite is an open source library intended to extend the SQLite core
to support fully fledged Spatial SQL capabilities.

i686/i686               : ok
x86_64-musl/x86_64-musl : ok
aarch64/x86_64          : ok
aarch64-musl/x86_64-musl: ok
armv7l/x86_64           : ok
armv6l-musl/x86_64-musl : ok
---
 common/shlibs                                 |  1 +
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_sql.patch           | 29 +++++++++++++++
 srcpkgs/libspatialite/template                | 36 +++++++++++++++++++
 4 files changed, 67 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index fc3036cbd4af..a4d36eae29e8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4028,3 +4028,4 @@ libgrass_vector.7.8.so grass-7.8.5_1
 libgrass_dbmibase.7.8.so grass-7.8.5_1
 libgrass_imagery.7.8.so grass-7.8.5_1
 libkmlconvenience.so.1 libkml-1.3.0_1
+mod_spatialite.so.7 libspatialite-5.0.0_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql.patch b/srcpkgs/libspatialite/patches/disable_check_sql.patch
new file mode 100644
index 000000000000..951c1ac1724d
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql.patch
@@ -0,0 +1,29 @@
+disable check_sql_stmt test
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..8cd61a37f726
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,36 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config libxml2"
+makedepends="sqlite-devel minizip-devel zlib-devel proj-devel freexl-devel
+ geos-devel libxml2-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Nyx70 <n.y.x@bluewin.ch>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=7b7fd70243f5a0b175696d87c46dde0ace030eacc27f39241c24bac5dfac6dac
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 8dc06e451bd1d15f7c1071555a4dc619664076a9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 5/8] postgis: rebuild against libgdal-3.2.3 and proj-7.2.1

---
 srcpkgs/postgis/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index 4a3235c3815c..c364b08fa2ca 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis'
 pkgname=postgis
 version=3.1.2
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 1a2519100765bfc55d6a28e44fd1538458aed996 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:07:47 +0200
Subject: [PATCH 6/8] postgis-postgresql12: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql12/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql12/template b/srcpkgs/postgis-postgresql12/template
index a5f578bfaed3..5006e3a45717 100644
--- a/srcpkgs/postgis-postgresql12/template
+++ b/srcpkgs/postgis-postgresql12/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql12'
 pkgname=postgis-postgresql12
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From ceee78675045da465b7bc3d66341f9ae1ab5a326 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:10:31 +0200
Subject: [PATCH 7/8] postgis-postgresql13: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 23b6807d853b..c2d43de02c34 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 8f6772bda179afe5930151d92e27a1619d2fc58a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 8/8] merkaartor: rebuild against libgdal-3.2.3 and proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 17c8d5dc361d..72c59006e968 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.18.4
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
@ 2021-06-27 21:20 ` ar-jan
  2021-06-28 18:20 ` ar-jan
                   ` (56 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-06-27 21:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

[WiP] Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 22380 bytes --]

From f0e34faa3ad69932a3c85c09a715c9babd87a435 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Fri, 27 Nov 2020 07:02:22 +0100
Subject: [PATCH 1/8] libgdal: update to 3.2.3.

- update to 3.2.2.
- --with-expat / --with-spatialite added (OSM support)
- postgresql and kml support added
- python3-gdal module added
---
 common/shlibs                                 |  2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch | 53 -------------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch | 31 --------
 srcpkgs/libgdal/template                      | 74 ++++++++++++++++---
 srcpkgs/python3-gdal                          |  1 +
 5 files changed, 64 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 8a7eef8df8c3..d801c4095354 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2498,7 +2498,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.28 libgdal-3.2.3_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 72c96ff67605..8e9c7fbbfc6e 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,27 +1,63 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=9
+version=3.2.3
+revision=1
+# aarch & arm temporary disabled
+archs="~aarch* ~armv*"
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-podofo=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes
+ $(vopt_if kml libkml)
+ $(vopt_with postgresql pg)"
+hostmakedepends="gettext-devel pkg-config python3-numpy json-c-devel swig"
+makedepends="boost-devel expat-devel freexl-devel geos-devel jasper-devel
+ json-c-devel libcurl-devel libopenexr-devel libopenjpeg2-devel
+ libpodofo-devel libqhull-devel libspatialite-devel libwebp-devel
+ libxml2-devel libzstd-devel netcdf-devel ocl-icd-devel opencl-headers
+ pcre2-devel proj-devel python3-devel sqlite-devel
+ $(vopt_if kml libkml-devel)
+ $(vopt_if postgresql postgresql-libs-devel)"
 short_desc="Geospatial Data Abstraction Library"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Nyx70 <n.y.x@bluewin.ch>"
 license="MIT"
 homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=86a35aad60a1eb87c2c0c145f9bccd83a47c4781254544ed5246f64d55ee1f18
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
 
+do_build() {
+	: ${make_cmd:=make}
+	${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}
+	# python modules
+	rm -f swig/python/*_wrap.cpp
+	${make_cmd} -C swig/python generate
+	cd swig/python
+	${make_cmd} ${makejobs} PYTHON=python3 ${makejobs} ${make_build_args} ${make_build_target}
+}
+
+do_install() {
+	: ${make_cmd:=make}
+	${make_cmd} DESTDIR=${DESTDIR} install
+	# python modules
+	cd swig/python
+	${make_cmd} PYTHON=python3 DESTDIR=${DESTDIR}/ install
+}
+
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
@@ -46,3 +82,17 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove usr/bin/*.py
+		vmove "usr/lib/python*"
+		vlicense $wrksrc/$build_wrksrc/LICENSE.TXT
+		vdoc $wrksrc/$build_wrksrc/swig/python/README.rst
+		mkdir -p ${PKGDESTDIR}/usr/share/${pkgname}
+		cp -r $wrksrc/$build_wrksrc/swig/python/samples ${PKGDESTDIR}/usr/share/${pkgname}/examples
+		rm -rf ${PKGDESTDIR}/lib
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 8f14c2adddf38042eeb914368ba839d7de9f2870 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=BDx?= <n.y.x@bluewin.ch>
Date: Tue, 11 May 2021 07:00:33 +0200
Subject: [PATCH 2/8] proj: update to 7.2.1.

---
 common/shlibs                |  2 +-
 srcpkgs/proj/template        | 13 ++++++-------
 srcpkgs/proj~WIP_qmapshack   |  1 +
 srcpkgs/proj~WIP_qmapshack_0 |  1 +
 4 files changed, 9 insertions(+), 8 deletions(-)
 create mode 120000 srcpkgs/proj~WIP_qmapshack
 create mode 120000 srcpkgs/proj~WIP_qmapshack_0

diff --git a/common/shlibs b/common/shlibs
index d801c4095354..8627cea7893f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3053,7 +3053,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.0 libmygui-3.4.0_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e9b2b6fefe29 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="sqlite-devel tiff-devel libcurl-devel"
 short_desc="Cartographic Projections Library"
-maintainer="John <me@johnnynator.dev>"
+maintainer="Nyx70 <n.y.x@bluewin.ch>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}
diff --git a/srcpkgs/proj~WIP_qmapshack b/srcpkgs/proj~WIP_qmapshack
new file mode 120000
index 000000000000..9f431e856b94
--- /dev/null
+++ b/srcpkgs/proj~WIP_qmapshack
@@ -0,0 +1 @@
+proj7
\ No newline at end of file
diff --git a/srcpkgs/proj~WIP_qmapshack_0 b/srcpkgs/proj~WIP_qmapshack_0
new file mode 120000
index 000000000000..9f431e856b94
--- /dev/null
+++ b/srcpkgs/proj~WIP_qmapshack_0
@@ -0,0 +1 @@
+proj7
\ No newline at end of file

From 55a419da6bdf620ed28d43b6f7dd5993e0288a29 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 3/8] New package: libkml-1.3.0

libkml is a library to process Google-KML GEO files.
It can be used in GDAL (libgdal), OSSIM, OTB and osgEarth
---
 common/shlibs                          | 15 +++++++++++++++
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 +++++++++++++++++
 srcpkgs/libkml/template                | 24 ++++++++++++++++++++++++
 4 files changed, 57 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/common/shlibs b/common/shlibs
index 8627cea7893f..fc3036cbd4af 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4013,3 +4013,18 @@ libbasu.so.0 basu-0.2.0_1
 libXcomp.so.3 nx-libs-3.5.99.24_1
 libXcompshad.so.3 nx-libs-3.5.99.24_1
 libNX_X11.so.6 nx-libs-3.5.99.24_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.0_1
+libspatialindex.so.6 libspatialindex-1.9.3_1
+libgrass_gis.7.8.so grass-7.8.5_1
+libgrass_raster.7.8.so grass-7.8.5_1
+libgrass_gproj.7.8.so grass-7.8.5_1
+libgrass_dbmiclient.7.8.so grass-7.8.5_1
+libgrass_vector.7.8.so grass-7.8.5_1    
+libgrass_dbmibase.7.8.so grass-7.8.5_1
+libgrass_imagery.7.8.so grass-7.8.5_1
+libkmlconvenience.so.1 libkml-1.3.0_1
diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..7d4f5a726606
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,24 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="zlib-devel expat-devel boost-devel minizip-devel uriparser-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Nyx70 <n.y.x@bluewin.ch>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+patch_args=-Np1
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From 6a2828a784257606ea982aebcec6047520053eef Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Sun, 20 Dec 2020 14:49:30 +0100
Subject: [PATCH 4/8] New package: libspatialite-5.0.0

SpatiaLite is an open source library intended to extend the SQLite core
to support fully fledged Spatial SQL capabilities.

i686/i686               : ok
x86_64-musl/x86_64-musl : ok
aarch64/x86_64          : ok
aarch64-musl/x86_64-musl: ok
armv7l/x86_64           : ok
armv6l-musl/x86_64-musl : ok
---
 common/shlibs                                 |  1 +
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_sql.patch           | 29 +++++++++++++++
 srcpkgs/libspatialite/template                | 36 +++++++++++++++++++
 4 files changed, 67 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index fc3036cbd4af..a4d36eae29e8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4028,3 +4028,4 @@ libgrass_vector.7.8.so grass-7.8.5_1
 libgrass_dbmibase.7.8.so grass-7.8.5_1
 libgrass_imagery.7.8.so grass-7.8.5_1
 libkmlconvenience.so.1 libkml-1.3.0_1
+mod_spatialite.so.7 libspatialite-5.0.0_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql.patch b/srcpkgs/libspatialite/patches/disable_check_sql.patch
new file mode 100644
index 000000000000..951c1ac1724d
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql.patch
@@ -0,0 +1,29 @@
+disable check_sql_stmt test
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..8cd61a37f726
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,36 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config libxml2"
+makedepends="sqlite-devel minizip-devel zlib-devel proj-devel freexl-devel
+ geos-devel libxml2-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Nyx70 <n.y.x@bluewin.ch>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=7b7fd70243f5a0b175696d87c46dde0ace030eacc27f39241c24bac5dfac6dac
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 51e26f94efea915a1949832cfa44858aaa4e0af4 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 5/8] postgis: rebuild against libgdal-3.2.3 and proj-7.2.1

---
 srcpkgs/postgis/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index 4a3235c3815c..c364b08fa2ca 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis'
 pkgname=postgis
 version=3.1.2
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 4e43634625188162899b5a0b01ab35914cadc124 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:07:47 +0200
Subject: [PATCH 6/8] postgis-postgresql12: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql12/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql12/template b/srcpkgs/postgis-postgresql12/template
index a5f578bfaed3..5006e3a45717 100644
--- a/srcpkgs/postgis-postgresql12/template
+++ b/srcpkgs/postgis-postgresql12/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql12'
 pkgname=postgis-postgresql12
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From dd8f2c516eb4b5a9ddee90888b7ae615a1301009 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:10:31 +0200
Subject: [PATCH 7/8] postgis-postgresql13: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 23b6807d853b..c2d43de02c34 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From e496201f14c1dc4c14ce06548b4e6ed998d7101a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 8/8] merkaartor: rebuild against libgdal-3.2.3 and proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 17c8d5dc361d..72c59006e968 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.18.4
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
  2021-06-27 21:20 ` [PR PATCH] [Updated] " ar-jan
@ 2021-06-28 18:20 ` ar-jan
  2021-06-28 18:42 ` [PR REVIEW] " Johnnynator
                   ` (55 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-06-28 18:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-869913020

Comment:
Hello @Chocimier, do you have any insight into why postgis builds fail the checks in this PR? It's unrelated to the updates of gdal and proj, I see the same thing when just doing a compile locally on master branch. The build against updated gdal/proj (without checks) seems to function correctly locally.

Not sure if missing `xsltproc` is the actual problem, but adding `libxslt` to the template did not resolve that error.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR REVIEW] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
  2021-06-27 21:20 ` [PR PATCH] [Updated] " ar-jan
  2021-06-28 18:20 ` ar-jan
@ 2021-06-28 18:42 ` Johnnynator
  2021-06-28 18:42 ` Johnnynator
                   ` (54 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Johnnynator @ 2021-06-28 18:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 375 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#discussion_r660022541

Comment:
Imo add the last few lines as
```bash
post_build() {
	rm -f swig/python/*_wrap.cpp
	make -C swig/python generate
	cd swig/python
	make ${makejobs} PYTHON=python3 ${makejobs}
}
```
and do not define `do_build` at all

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR REVIEW] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (3 preceding siblings ...)
  2021-06-28 18:42 ` Johnnynator
@ 2021-06-28 18:42 ` Johnnynator
  2021-06-28 18:42 ` Johnnynator
                   ` (52 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Johnnynator @ 2021-06-28 18:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#discussion_r660023297

Comment:
same as with `do_build` move the last 2 lines to `post_install` and do not overwrite `do_install` at all
```bash
	# python modules
	cd swig/python
	make PYTHON=python3 DESTDIR=${DESTDIR}/ install
```

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR REVIEW] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (4 preceding siblings ...)
  2021-06-28 18:42 ` Johnnynator
@ 2021-06-28 18:42 ` Johnnynator
  2021-06-28 18:42 ` Johnnynator
                   ` (51 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Johnnynator @ 2021-06-28 18:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#discussion_r660027517

Comment:
Can you add a reason, or just why you disabled it.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR REVIEW] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (2 preceding siblings ...)
  2021-06-28 18:42 ` [PR REVIEW] " Johnnynator
@ 2021-06-28 18:42 ` Johnnynator
  2021-06-28 18:42 ` Johnnynator
                   ` (53 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Johnnynator @ 2021-06-28 18:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#discussion_r660025890

Comment:
```suggestion
		vmkdir usr/share/python3-gdal
```
(using ${pkgname} isn't wrong, but writing out is imo more clear, and pkgnames usually don't change that often)q

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR REVIEW] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (5 preceding siblings ...)
  2021-06-28 18:42 ` Johnnynator
@ 2021-06-28 18:42 ` Johnnynator
  2021-06-28 18:42 ` Johnnynator
                   ` (50 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Johnnynator @ 2021-06-28 18:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#discussion_r660029669

Comment:
There should only be `/lib` if you would have created one in `pkg_install` but you didn't so this line should be a noop and be removed.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR REVIEW] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (6 preceding siblings ...)
  2021-06-28 18:42 ` Johnnynator
@ 2021-06-28 18:42 ` Johnnynator
  2021-06-28 18:42 ` Johnnynator
                   ` (49 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Johnnynator @ 2021-06-28 18:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 204 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#discussion_r660026683

Comment:
`patch_args=-Np1` is the default, no need to specify.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR REVIEW] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (7 preceding siblings ...)
  2021-06-28 18:42 ` Johnnynator
@ 2021-06-28 18:42 ` Johnnynator
  2021-06-28 18:42 ` Johnnynator
                   ` (48 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Johnnynator @ 2021-06-28 18:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#discussion_r660026292

Comment:
```suggestion
		vcopy swig/python/samples usr/share/python3-gdal/examples
```

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR REVIEW] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (8 preceding siblings ...)
  2021-06-28 18:42 ` Johnnynator
@ 2021-06-28 18:42 ` Johnnynator
  2021-06-28 19:28 ` Chocimier
                   ` (47 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Johnnynator @ 2021-06-28 18:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#discussion_r660024273

Comment:
`$wrksrc/$build_wrksrc` should be cwd, so no need to add it to the path (for all the above)

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (9 preceding siblings ...)
  2021-06-28 18:42 ` Johnnynator
@ 2021-06-28 19:28 ` Chocimier
  2021-06-29 21:11 ` [PR PATCH] [Updated] " ar-jan
                   ` (46 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Chocimier @ 2021-06-28 19:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-869964492

Comment:
Disabled failing tests for now, please rebase.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (10 preceding siblings ...)
  2021-06-28 19:28 ` Chocimier
@ 2021-06-29 21:11 ` ar-jan
  2021-06-29 21:59 ` ar-jan
                   ` (45 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-06-29 21:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

[WiP] Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 29112 bytes --]

From 002d1eafdadca5791f32dbe759272179ef80d0eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=BDx?= <n.y.x@bluewin.ch>
Date: Tue, 11 May 2021 07:00:33 +0200
Subject: [PATCH 01/15] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 8a7eef8df8c3..3ed651a6596b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3053,7 +3053,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.0 libmygui-3.4.0_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..94995256d81d 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="sqlite-devel tiff-devel libcurl-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 59ca31c69baf1ca54ea99ae3bd3efb0f6dd03ba9 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Sun, 20 Dec 2020 14:49:30 +0100
Subject: [PATCH 02/15] New package: libspatialite-5.0.0

SpatiaLite is an open source library intended to extend the SQLite core
to support fully fledged Spatial SQL capabilities.

i686/i686               : ok
x86_64-musl/x86_64-musl : ok
aarch64/x86_64          : ok
aarch64-musl/x86_64-musl: ok
armv7l/x86_64           : ok
armv6l-musl/x86_64-musl : ok
---
 common/shlibs                                 | 16 +++++++++
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_sql.patch           | 29 +++++++++++++++
 srcpkgs/libspatialite/template                | 36 +++++++++++++++++++
 4 files changed, 82 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index 3ed651a6596b..214fb7195103 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4013,3 +4013,19 @@ libbasu.so.0 basu-0.2.0_1
 libXcomp.so.3 nx-libs-3.5.99.24_1
 libXcompshad.so.3 nx-libs-3.5.99.24_1
 libNX_X11.so.6 nx-libs-3.5.99.24_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.0_1
+libspatialindex.so.6 libspatialindex-1.9.3_1
+libgrass_gis.7.8.so grass-7.8.5_1
+libgrass_raster.7.8.so grass-7.8.5_1
+libgrass_gproj.7.8.so grass-7.8.5_1
+libgrass_dbmiclient.7.8.so grass-7.8.5_1
+libgrass_vector.7.8.so grass-7.8.5_1    
+libgrass_dbmibase.7.8.so grass-7.8.5_1
+libgrass_imagery.7.8.so grass-7.8.5_1
+libkmlconvenience.so.1 libkml-1.3.0_1
+mod_spatialite.so.7 libspatialite-5.0.0_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql.patch b/srcpkgs/libspatialite/patches/disable_check_sql.patch
new file mode 100644
index 000000000000..951c1ac1724d
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql.patch
@@ -0,0 +1,29 @@
+disable check_sql_stmt test
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..da7a9439da7e
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,36 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config libxml2"
+makedepends="sqlite-devel minizip-devel zlib-devel proj-devel freexl-devel
+ geos-devel libxml2-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=7b7fd70243f5a0b175696d87c46dde0ace030eacc27f39241c24bac5dfac6dac
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 9492d87af385dd643484ed7cfef826760dd0a48b Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/15] New package: libkml-1.3.0

libkml is a library to process Google-KML GEO files.
It can be used in GDAL (libgdal), OSSIM, OTB and osgEarth
---
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 +++++++++++++++++
 srcpkgs/libkml/template                | 23 +++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..d2abee573fe1
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,23 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="zlib-devel expat-devel boost-devel minizip-devel uriparser-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From a87665a14eb8610699bac3b244766b4913b6c170 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Fri, 27 Nov 2020 07:02:22 +0100
Subject: [PATCH 04/15] libgdal: update to 3.2.3.

- update to 3.2.3.
- --with-expat / --with-spatialite added (OSM support)
- postgresql and kml support added
- python3-gdal module added
---
 common/shlibs                                 |  2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch | 53 ---------------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch | 31 ---------
 srcpkgs/libgdal/template                      | 65 +++++++++++++++----
 srcpkgs/python3-gdal                          |  1 +
 5 files changed, 55 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 214fb7195103..a4d36eae29e8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2498,7 +2498,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.28 libgdal-3.2.3_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 72c96ff67605..2c6f38a32810 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,58 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=9
+version=3.2.3
+revision=1
+# aarch & arm currently failing
+archs="~aarch* ~armv*"
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-podofo=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes
+ $(vopt_if kml libkml)
+ $(vopt_with postgresql pg)"
+hostmakedepends="gettext-devel pkg-config python3-numpy json-c-devel swig"
+makedepends="boost-devel expat-devel freexl-devel geos-devel jasper-devel
+ json-c-devel libcurl-devel libopenexr-devel libopenjpeg2-devel
+ libpodofo-devel libqhull-devel libspatialite-devel libwebp-devel
+ libxml2-devel libzstd-devel netcdf-devel ocl-icd-devel opencl-headers
+ pcre2-devel proj-devel python3-devel sqlite-devel
+ $(vopt_if kml libkml-devel)
+ $(vopt_if postgresql postgresql-libs-devel)"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=86a35aad60a1eb87c2c0c145f9bccd83a47c4781254544ed5246f64d55ee1f18
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
 
+post_build() {
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	make ${makejobs} PYTHON=python3 ${makejobs}
+}
+
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	# python modules
+	cd swig/python
+	make PYTHON=python3 DESTDIR=${DESTDIR}/ install
 }
 
 libgdal-tools_package() {
@@ -46,3 +74,16 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove usr/bin/*.py
+		vmove "usr/lib/python*"
+		vlicense LICENSE.TXT
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+		vcopy swig/python/samples usr/share/python3-gdal/examples
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 22beabcc0a4f6856dbdc4793a5eba39845f3f736 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 05/15] postgis: rebuild against libgdal-3.2.3 and proj-7.2.1

---
 srcpkgs/postgis/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index e73a8e6d351a..63478eba6b73 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis'
 pkgname=postgis
 version=3.1.2
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 3e8db3f4e5fc67dee891280377d9526684e57d22 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:07:47 +0200
Subject: [PATCH 06/15] postgis-postgresql12: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql12/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql12/template b/srcpkgs/postgis-postgresql12/template
index abefe9159680..1df61d2d05d3 100644
--- a/srcpkgs/postgis-postgresql12/template
+++ b/srcpkgs/postgis-postgresql12/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql12'
 pkgname=postgis-postgresql12
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 9ccf0c0b283d0fdf20afddfb738796ace24024b2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:10:31 +0200
Subject: [PATCH 07/15] postgis-postgresql13: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 21e894f61e98..b92c8b463fab 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From b8ada4cb7d0e817dd156ffc691139f3704e935f9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 08/15] merkaartor: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 17c8d5dc361d..72c59006e968 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.18.4
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From f45ee433f00ae3f15ba3023733cbd70f220e3fb6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 09/15] OpenOrienteering-Mapper: rebuild against libgdal-3.2.3
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..115ebef3c170 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

From 7e69e5ecbe50dd79355280da5ba7a3c47b893b2e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 10/15] osg: rebuild against libgdal-3.2.3

---
 srcpkgs/osg/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..9b80c81617ce 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"

From a5489e76b0ec01281ff99e12d696840e82e7ced1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 11/15] sumo: update to 1.9.2 / rebuild against libgdal-3.2.3
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 common/shlibs         |  2 ++
 srcpkgs/sumo/template | 20 +++++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index a4d36eae29e8..9f1689b4f95c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4029,3 +4029,5 @@ libgrass_dbmibase.7.8.so grass-7.8.5_1
 libgrass_imagery.7.8.so grass-7.8.5_1
 libkmlconvenience.so.1 libkml-1.3.0_1
 mod_spatialite.so.7 libspatialite-5.0.0_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index 4c1eb6876a46..5406fcd58f51 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=3
+version=1.9.2
+revision=1
 build_style=cmake
 python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From 8541a88cb2cd3c641db2421b5d8934d88ee05cf2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 12/15] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 4c1710087f83..8811247ae7e5 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=5
+revision=6
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 504cef2604feec9f89dcf2d67602137280c3c636 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 13/15] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index d4aae84f375d..91c6e8dbd5fe 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.4.2
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost python3 python3-psycopg2"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From db1b3fe28da8fd081ca0c41e62f74ffca2d8a01e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 14/15] XyGrib: rebuild against proj-7.2.1

---
 srcpkgs/XyGrib/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..641dd730c786 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel

From aa1c707c43e54092d9106c453b5d7ed028d61a81 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 21:53:09 +0200
Subject: [PATCH 15/15] paraview: rebuild against libgdal-3.2.3

---
 .../paraview/patches/cmake-build-type-none.patch | 16 ++++++++++++++++
 srcpkgs/paraview/template                        |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/paraview/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/paraview/patches/cmake-build-type-none.patch b/srcpkgs/paraview/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..53dfb4edba77
--- /dev/null
+++ b/srcpkgs/paraview/patches/cmake-build-type-none.patch
@@ -0,0 +1,16 @@
+Required to keep using build type None and not override debug flags etc.
+
+--- a/VTK/ThirdParty/eigen/vtkeigen/CMakeLists.txt
++++ b/VTK/ThirdParty/eigen/vtkeigen/CMakeLists.txt
+@@ -22,11 +22,6 @@ if (NOT CMAKE_BUILD_TYPE)
+ endif()
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
+-if(    NOT cmake_build_type_tolower STREQUAL "debug"
+-   AND NOT cmake_build_type_tolower STREQUAL "release"
+-   AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+-  message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
+-endif()
+ 
+ 
+ #############################################################################
diff --git a/srcpkgs/paraview/template b/srcpkgs/paraview/template
index 20a7f5589677..49ad9e48c2c0 100644
--- a/srcpkgs/paraview/template
+++ b/srcpkgs/paraview/template
@@ -1,7 +1,7 @@
 # Template file for 'paraview'
 pkgname=paraview
 version=5.8.1
-revision=3
+revision=4
 wrksrc=ParaView-v${version}
 build_style=cmake
 configure_args="-DCMAKE_PREFIX_PATH=${XBPS_CROSS_BASE}/usr

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (11 preceding siblings ...)
  2021-06-29 21:11 ` [PR PATCH] [Updated] " ar-jan
@ 2021-06-29 21:59 ` ar-jan
  2021-06-30 16:50 ` sgn
                   ` (44 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-06-29 21:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1375 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-870946990

Comment:
I've changed/reverted the maintainer lines where applicable. I'd been in touch with Nyx70 previously and he gave thumbs up on continuing with his work, but wasn't explicit about maintainership.

Re `archs="~aarch* ~armv*"` for libgdal: I tried building for `armv7l`, and it failed with:

> x86_64-unknown-linux-gnu-gcc: error: unrecognized command-line option '-mfpu=vfpv3'
> x86_64-unknown-linux-gnu-gcc: error: unrecognized command-line option '-mfloat-abi=hard'
> error: command '/usr/bin/x86_64-unknown-linux-gnu-gcc' failed with exit code 1
> make: *** [GNUmakefile:73: build] Error 1
> ^[[1m^[[31m=> ERROR: libgdal-3.2.3_1: post_build: 'make ${makejobs} PYTHON=python3 ${makejobs}' exited with 2
> ^[[m^[[1m^[[31m=> ERROR:   in post_build() at srcpkgs/libgdal/template:45

Is this a matter of removing those flags, and if so, how to do that?

Finally there's one more package to be rebuilt against libgdal and proj, grass. The currently packaged version is apparently not working #29209; I built the new grass version 7.8.5 but it still has non-working GUI. So maybe that can be done separately.

I've resolved the xlint license issue for osg, but if I push that it'll trigger another build, maybe that's not desirable?

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (12 preceding siblings ...)
  2021-06-29 21:59 ` ar-jan
@ 2021-06-30 16:50 ` sgn
  2021-06-30 17:36 ` ar-jan
                   ` (43 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: sgn @ 2021-06-30 16:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2194 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-871569727

Comment:
```diff
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 2c6f38a328..f71d947b0a 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -2,8 +2,6 @@
 pkgname=libgdal
 version=3.2.3
 revision=1
-# aarch & arm currently failing
-archs="~aarch* ~armv*"
 wrksrc="gdal-${version}"
 build_style=gnu-configure
 configure_args="
@@ -39,20 +37,41 @@ build_options_default="kml"
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
 
 post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
 	rm -f swig/python/*_wrap.cpp
 	make -C swig/python generate
 	cd swig/python
-	make ${makejobs} PYTHON=python3 ${makejobs}
+	python3 setup.py build
 }
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
-	# python modules
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
 	cd swig/python
-	make PYTHON=python3 DESTDIR=${DESTDIR}/ install
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -79,9 +98,8 @@ python3-gdal_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - Python3 bindings"
 	pkg_install() {
-		vmove usr/bin/*.py
+		vmove "usr/bin/*.py"
 		vmove "usr/lib/python*"
-		vlicense LICENSE.TXT
 		vdoc swig/python/README.rst
 		vmkdir usr/share/python3-gdal
 		vcopy swig/python/samples usr/share/python3-gdal/examples
```

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (13 preceding siblings ...)
  2021-06-30 16:50 ` sgn
@ 2021-06-30 17:36 ` ar-jan
  2021-06-30 17:37 ` Johnnynator
                   ` (42 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-06-30 17:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3520 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-871599597

Comment:
Thanks @sgn!

Re OpenOrienteering-Mapper, tests passed locally, it looks like the following failure is specific to the test runner. How best to handle that?

> 2021-06-30T02:21:26.4698109Z       Start 28: sensors_t
> 2021-06-30T02:21:26.9903615Z 28/28 Test #28: sensors_t ..........................***Failed    0.52 sec
> 2021-06-30T02:21:26.9905394Z QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
> 2021-06-30T02:21:26.9906423Z ********* Start testing of SensorsTest *********
> 2021-06-30T02:21:26.9908172Z Config: Using QtTest library 5.15.2, Qt 5.15.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.2.1 20201203), unknown unknown
> 2021-06-30T02:21:26.9909377Z PASS   : SensorsTest::initTestCase()
> 2021-06-30T02:21:26.9910507Z PASS   : SensorsTest::fakePositionSourcePluginTest()
> 2021-06-30T02:21:26.9911914Z PASS   : SensorsTest::fakePositionSourceSimulatedTest()
> 2021-06-30T02:21:26.9913326Z PASS   : SensorsTest::nmeaPositionSourcePluginTest()
> 2021-06-30T02:21:26.9914999Z QDEBUG : SensorsTest::nmeaPositionSourceSimulatedTest() NmeaPositionSource device: /dev/null
> 2021-06-30T02:21:26.9917801Z QDEBUG : SensorsTest::nmeaPositionSourceSimulatedTest() NmeaPositionSource device: /builddir/mapper-0.9.5/test/data/sensors/nmea.txt
> 2021-06-30T02:21:26.9920082Z QDEBUG : SensorsTest::nmeaPositionSourceSimulatedTest() NmeaPositionSource device: /tmp/sensors_t.EcPCyR
> 2021-06-30T02:21:26.9922022Z FAIL!  : SensorsTest::nmeaPositionSourceSimulatedTest() Compared values are not the same
> 2021-06-30T02:21:26.9923646Z    Actual   (int(source->error()))                    : 3
> 2021-06-30T02:21:26.9924385Z    Expected (int(QGeoPositionInfoSource::AccessError)): 0
> 2021-06-30T02:21:26.9925350Z    Loc: [../test/sensors_t.cpp(150)]
> 2021-06-30T02:21:26.9926306Z PASS   : SensorsTest::powershellPositionSourcePluginTest()
> 2021-06-30T02:21:26.9927534Z SKIP   : SensorsTest::powershellPositionSourceLiveTest() Powershell not available
> 2021-06-30T02:21:26.9928623Z    Loc: [../test/sensors_t.cpp(169)]
> 2021-06-30T02:21:26.9929544Z PASS   : SensorsTest::powershellPositionSourceSimulatedTest()
> 2021-06-30T02:21:26.9930561Z PASS   : SensorsTest::cleanupTestCase()
> 2021-06-30T02:21:26.9931272Z Totals: 7 passed, 1 failed, 1 skipped, 0 blacklisted, 504ms
> 2021-06-30T02:21:26.9931955Z ********* Finished testing of SensorsTest *********
> 2021-06-30T02:21:26.9932756Z CMake Error at sensors_t-RUN.cmake:35 (message):
> 2021-06-30T02:21:26.9933323Z   Test sensors_t failed: 1
> 2021-06-30T02:21:26.9949629Z 96% tests passed, 1 tests failed out of 28
> 2021-06-30T02:21:26.9950377Z Total Test time (real) =  19.33 sec
> 2021-06-30T02:21:26.9951106Z The following tests FAILED:
> 2021-06-30T02:21:26.9951982Z 	 28 - sensors_t (Failed)
> 2021-06-30T02:21:26.9952450Z Errors while running CTest
> 2021-06-30T02:21:26.9952979Z FAILED: CMakeFiles/test.util 
> 2021-06-30T02:21:26.9953967Z cd /builddir/mapper-0.9.5/build && /usr/bin/ctest --force-new-ctest-process
> 2021-06-30T02:21:26.9954852Z ninja: build stopped: subcommand failed.
> 2021-06-30T02:21:26.9956018Z => ERROR: OpenOrienteering-Mapper-0.9.5_2: do_check: '${make_cmd} ${make_check_args} ${make_check_target}' exited with 1
> 2021-06-30T02:21:26.9957145Z => ERROR:   in do_check() at common/build-style/cmake.sh:116

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (14 preceding siblings ...)
  2021-06-30 17:36 ` ar-jan
@ 2021-06-30 17:37 ` Johnnynator
  2021-06-30 18:56 ` [PR PATCH] [Updated] " ar-jan
                   ` (41 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Johnnynator @ 2021-06-30 17:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-871600742

Comment:
You can add
```bash
do_check() {
	cd build
	ctest -E 'sensors_t'
}
```
which disables that specific test

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (15 preceding siblings ...)
  2021-06-30 17:37 ` Johnnynator
@ 2021-06-30 18:56 ` ar-jan
  2021-07-01 15:54 ` ar-jan
                   ` (40 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-06-30 18:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

[WiP] Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 30538 bytes --]

From 002d1eafdadca5791f32dbe759272179ef80d0eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=BDx?= <n.y.x@bluewin.ch>
Date: Tue, 11 May 2021 07:00:33 +0200
Subject: [PATCH 01/15] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 8a7eef8df8c3..3ed651a6596b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3053,7 +3053,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.0 libmygui-3.4.0_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..94995256d81d 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="sqlite-devel tiff-devel libcurl-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 59ca31c69baf1ca54ea99ae3bd3efb0f6dd03ba9 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Sun, 20 Dec 2020 14:49:30 +0100
Subject: [PATCH 02/15] New package: libspatialite-5.0.0

SpatiaLite is an open source library intended to extend the SQLite core
to support fully fledged Spatial SQL capabilities.

i686/i686               : ok
x86_64-musl/x86_64-musl : ok
aarch64/x86_64          : ok
aarch64-musl/x86_64-musl: ok
armv7l/x86_64           : ok
armv6l-musl/x86_64-musl : ok
---
 common/shlibs                                 | 16 +++++++++
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_sql.patch           | 29 +++++++++++++++
 srcpkgs/libspatialite/template                | 36 +++++++++++++++++++
 4 files changed, 82 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index 3ed651a6596b..214fb7195103 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4013,3 +4013,19 @@ libbasu.so.0 basu-0.2.0_1
 libXcomp.so.3 nx-libs-3.5.99.24_1
 libXcompshad.so.3 nx-libs-3.5.99.24_1
 libNX_X11.so.6 nx-libs-3.5.99.24_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.0_1
+libspatialindex.so.6 libspatialindex-1.9.3_1
+libgrass_gis.7.8.so grass-7.8.5_1
+libgrass_raster.7.8.so grass-7.8.5_1
+libgrass_gproj.7.8.so grass-7.8.5_1
+libgrass_dbmiclient.7.8.so grass-7.8.5_1
+libgrass_vector.7.8.so grass-7.8.5_1    
+libgrass_dbmibase.7.8.so grass-7.8.5_1
+libgrass_imagery.7.8.so grass-7.8.5_1
+libkmlconvenience.so.1 libkml-1.3.0_1
+mod_spatialite.so.7 libspatialite-5.0.0_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql.patch b/srcpkgs/libspatialite/patches/disable_check_sql.patch
new file mode 100644
index 000000000000..951c1ac1724d
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql.patch
@@ -0,0 +1,29 @@
+disable check_sql_stmt test
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..da7a9439da7e
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,36 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config libxml2"
+makedepends="sqlite-devel minizip-devel zlib-devel proj-devel freexl-devel
+ geos-devel libxml2-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=7b7fd70243f5a0b175696d87c46dde0ace030eacc27f39241c24bac5dfac6dac
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 9492d87af385dd643484ed7cfef826760dd0a48b Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/15] New package: libkml-1.3.0

libkml is a library to process Google-KML GEO files.
It can be used in GDAL (libgdal), OSSIM, OTB and osgEarth
---
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 +++++++++++++++++
 srcpkgs/libkml/template                | 23 +++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..d2abee573fe1
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,23 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="zlib-devel expat-devel boost-devel minizip-devel uriparser-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From 41b7ec139a46806acec2a0ceac525ed811061a3f Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Fri, 27 Nov 2020 07:02:22 +0100
Subject: [PATCH 04/15] libgdal: update to 3.2.3.

- update to 3.2.3.
- --with-expat / --with-spatialite added (OSM support)
- postgresql and kml support added
- python3-gdal module added
---
 common/shlibs                                 |  2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch | 53 ------------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch | 31 -------
 srcpkgs/libgdal/template                      | 83 ++++++++++++++++---
 srcpkgs/python3-gdal                          |  1 +
 5 files changed, 73 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 214fb7195103..a4d36eae29e8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2498,7 +2498,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.28 libgdal-3.2.3_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 72c96ff67605..f71d947b0aea 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,77 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=9
+version=3.2.3
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-podofo=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes
+ $(vopt_if kml libkml)
+ $(vopt_with postgresql pg)"
+hostmakedepends="gettext-devel pkg-config python3-numpy json-c-devel swig"
+makedepends="boost-devel expat-devel freexl-devel geos-devel jasper-devel
+ json-c-devel libcurl-devel libopenexr-devel libopenjpeg2-devel
+ libpodofo-devel libqhull-devel libspatialite-devel libwebp-devel
+ libxml2-devel libzstd-devel netcdf-devel ocl-icd-devel opencl-headers
+ pcre2-devel proj-devel python3-devel sqlite-devel
+ $(vopt_if kml libkml-devel)
+ $(vopt_if postgresql postgresql-libs-devel)"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=86a35aad60a1eb87c2c0c145f9bccd83a47c4781254544ed5246f64d55ee1f18
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +93,15 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+		vcopy swig/python/samples usr/share/python3-gdal/examples
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 629cd4edc9a5353297d0592a3ed8e8e548b1e5ff Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 05/15] postgis: rebuild against libgdal-3.2.3 and proj-7.2.1

---
 srcpkgs/postgis/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index e73a8e6d351a..63478eba6b73 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis'
 pkgname=postgis
 version=3.1.2
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 41250b9361c55d0aeffa45192f808d02ba653cc7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:07:47 +0200
Subject: [PATCH 06/15] postgis-postgresql12: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql12/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql12/template b/srcpkgs/postgis-postgresql12/template
index abefe9159680..1df61d2d05d3 100644
--- a/srcpkgs/postgis-postgresql12/template
+++ b/srcpkgs/postgis-postgresql12/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql12'
 pkgname=postgis-postgresql12
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 58e3117ff63b3e3fcb80f80896287a048b8443b4 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:10:31 +0200
Subject: [PATCH 07/15] postgis-postgresql13: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 21e894f61e98..b92c8b463fab 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From a46e6f507eb706768a351e94fac95a50aab1489e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 08/15] merkaartor: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 17c8d5dc361d..72c59006e968 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.18.4
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From ce0fe67aaba7d3c0508f209144a4a8599a5bad5e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 09/15] OpenOrienteering-Mapper: rebuild against libgdal-3.2.3
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From dcf6ccee85d67bb8d0dbf0565db34dee2fa03b5f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 10/15] osg: rebuild against libgdal-3.2.3, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From c836581679c3232429bec86bde896d4321d080d2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 11/15] sumo: update to 1.9.2 / rebuild against libgdal-3.2.3
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 common/shlibs         |  2 ++
 srcpkgs/sumo/template | 20 +++++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index a4d36eae29e8..9f1689b4f95c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4029,3 +4029,5 @@ libgrass_dbmibase.7.8.so grass-7.8.5_1
 libgrass_imagery.7.8.so grass-7.8.5_1
 libkmlconvenience.so.1 libkml-1.3.0_1
 mod_spatialite.so.7 libspatialite-5.0.0_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index 4c1eb6876a46..5406fcd58f51 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=3
+version=1.9.2
+revision=1
 build_style=cmake
 python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From dac2f731a87b85666e41496d51bb3cf35444d3f3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 12/15] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 4c1710087f83..8811247ae7e5 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=5
+revision=6
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 6ce255d12b3f564b0e6d7c12b921930575fc1021 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 13/15] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index d4aae84f375d..91c6e8dbd5fe 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.4.2
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost python3 python3-psycopg2"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From a03bd95db966f4b1b4b49351bda9241e5e848b79 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 14/15] XyGrib: rebuild against proj-7.2.1

---
 srcpkgs/XyGrib/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..641dd730c786 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel

From ed07388fd2769e83f5a56c67c61acbd007e117ad Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 21:53:09 +0200
Subject: [PATCH 15/15] paraview: rebuild against libgdal-3.2.3

---
 .../paraview/patches/cmake-build-type-none.patch | 16 ++++++++++++++++
 srcpkgs/paraview/template                        |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/paraview/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/paraview/patches/cmake-build-type-none.patch b/srcpkgs/paraview/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..53dfb4edba77
--- /dev/null
+++ b/srcpkgs/paraview/patches/cmake-build-type-none.patch
@@ -0,0 +1,16 @@
+Required to keep using build type None and not override debug flags etc.
+
+--- a/VTK/ThirdParty/eigen/vtkeigen/CMakeLists.txt
++++ b/VTK/ThirdParty/eigen/vtkeigen/CMakeLists.txt
+@@ -22,11 +22,6 @@ if (NOT CMAKE_BUILD_TYPE)
+ endif()
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
+-if(    NOT cmake_build_type_tolower STREQUAL "debug"
+-   AND NOT cmake_build_type_tolower STREQUAL "release"
+-   AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+-  message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
+-endif()
+ 
+ 
+ #############################################################################
diff --git a/srcpkgs/paraview/template b/srcpkgs/paraview/template
index 20a7f5589677..49ad9e48c2c0 100644
--- a/srcpkgs/paraview/template
+++ b/srcpkgs/paraview/template
@@ -1,7 +1,7 @@
 # Template file for 'paraview'
 pkgname=paraview
 version=5.8.1
-revision=3
+revision=4
 wrksrc=ParaView-v${version}
 build_style=cmake
 configure_args="-DCMAKE_PREFIX_PATH=${XBPS_CROSS_BASE}/usr

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (16 preceding siblings ...)
  2021-06-30 18:56 ` [PR PATCH] [Updated] " ar-jan
@ 2021-07-01 15:54 ` ar-jan
  2021-07-02 10:05 ` ar-jan
                   ` (39 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-07-01 15:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

[WiP] Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 37629 bytes --]

From 002d1eafdadca5791f32dbe759272179ef80d0eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=BDx?= <n.y.x@bluewin.ch>
Date: Tue, 11 May 2021 07:00:33 +0200
Subject: [PATCH 01/16] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 8a7eef8df8c3..3ed651a6596b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3053,7 +3053,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.0 libmygui-3.4.0_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..94995256d81d 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="sqlite-devel tiff-devel libcurl-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 59ca31c69baf1ca54ea99ae3bd3efb0f6dd03ba9 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Sun, 20 Dec 2020 14:49:30 +0100
Subject: [PATCH 02/16] New package: libspatialite-5.0.0

SpatiaLite is an open source library intended to extend the SQLite core
to support fully fledged Spatial SQL capabilities.

i686/i686               : ok
x86_64-musl/x86_64-musl : ok
aarch64/x86_64          : ok
aarch64-musl/x86_64-musl: ok
armv7l/x86_64           : ok
armv6l-musl/x86_64-musl : ok
---
 common/shlibs                                 | 16 +++++++++
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_sql.patch           | 29 +++++++++++++++
 srcpkgs/libspatialite/template                | 36 +++++++++++++++++++
 4 files changed, 82 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index 3ed651a6596b..214fb7195103 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4013,3 +4013,19 @@ libbasu.so.0 basu-0.2.0_1
 libXcomp.so.3 nx-libs-3.5.99.24_1
 libXcompshad.so.3 nx-libs-3.5.99.24_1
 libNX_X11.so.6 nx-libs-3.5.99.24_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.0_1
+libspatialindex.so.6 libspatialindex-1.9.3_1
+libgrass_gis.7.8.so grass-7.8.5_1
+libgrass_raster.7.8.so grass-7.8.5_1
+libgrass_gproj.7.8.so grass-7.8.5_1
+libgrass_dbmiclient.7.8.so grass-7.8.5_1
+libgrass_vector.7.8.so grass-7.8.5_1    
+libgrass_dbmibase.7.8.so grass-7.8.5_1
+libgrass_imagery.7.8.so grass-7.8.5_1
+libkmlconvenience.so.1 libkml-1.3.0_1
+mod_spatialite.so.7 libspatialite-5.0.0_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql.patch b/srcpkgs/libspatialite/patches/disable_check_sql.patch
new file mode 100644
index 000000000000..951c1ac1724d
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql.patch
@@ -0,0 +1,29 @@
+disable check_sql_stmt test
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..da7a9439da7e
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,36 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config libxml2"
+makedepends="sqlite-devel minizip-devel zlib-devel proj-devel freexl-devel
+ geos-devel libxml2-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=7b7fd70243f5a0b175696d87c46dde0ace030eacc27f39241c24bac5dfac6dac
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 9492d87af385dd643484ed7cfef826760dd0a48b Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/16] New package: libkml-1.3.0

libkml is a library to process Google-KML GEO files.
It can be used in GDAL (libgdal), OSSIM, OTB and osgEarth
---
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 +++++++++++++++++
 srcpkgs/libkml/template                | 23 +++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..d2abee573fe1
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,23 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="zlib-devel expat-devel boost-devel minizip-devel uriparser-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From 41b7ec139a46806acec2a0ceac525ed811061a3f Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Fri, 27 Nov 2020 07:02:22 +0100
Subject: [PATCH 04/16] libgdal: update to 3.2.3.

- update to 3.2.3.
- --with-expat / --with-spatialite added (OSM support)
- postgresql and kml support added
- python3-gdal module added
---
 common/shlibs                                 |  2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch | 53 ------------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch | 31 -------
 srcpkgs/libgdal/template                      | 83 ++++++++++++++++---
 srcpkgs/python3-gdal                          |  1 +
 5 files changed, 73 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 214fb7195103..a4d36eae29e8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2498,7 +2498,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.28 libgdal-3.2.3_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 72c96ff67605..f71d947b0aea 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,77 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=9
+version=3.2.3
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-podofo=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes
+ $(vopt_if kml libkml)
+ $(vopt_with postgresql pg)"
+hostmakedepends="gettext-devel pkg-config python3-numpy json-c-devel swig"
+makedepends="boost-devel expat-devel freexl-devel geos-devel jasper-devel
+ json-c-devel libcurl-devel libopenexr-devel libopenjpeg2-devel
+ libpodofo-devel libqhull-devel libspatialite-devel libwebp-devel
+ libxml2-devel libzstd-devel netcdf-devel ocl-icd-devel opencl-headers
+ pcre2-devel proj-devel python3-devel sqlite-devel
+ $(vopt_if kml libkml-devel)
+ $(vopt_if postgresql postgresql-libs-devel)"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=86a35aad60a1eb87c2c0c145f9bccd83a47c4781254544ed5246f64d55ee1f18
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +93,15 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+		vcopy swig/python/samples usr/share/python3-gdal/examples
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 629cd4edc9a5353297d0592a3ed8e8e548b1e5ff Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 05/16] postgis: rebuild against libgdal-3.2.3 and proj-7.2.1

---
 srcpkgs/postgis/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index e73a8e6d351a..63478eba6b73 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis'
 pkgname=postgis
 version=3.1.2
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 41250b9361c55d0aeffa45192f808d02ba653cc7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:07:47 +0200
Subject: [PATCH 06/16] postgis-postgresql12: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql12/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql12/template b/srcpkgs/postgis-postgresql12/template
index abefe9159680..1df61d2d05d3 100644
--- a/srcpkgs/postgis-postgresql12/template
+++ b/srcpkgs/postgis-postgresql12/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql12'
 pkgname=postgis-postgresql12
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 58e3117ff63b3e3fcb80f80896287a048b8443b4 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:10:31 +0200
Subject: [PATCH 07/16] postgis-postgresql13: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 21e894f61e98..b92c8b463fab 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From a46e6f507eb706768a351e94fac95a50aab1489e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 08/16] merkaartor: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 17c8d5dc361d..72c59006e968 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.18.4
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From ce0fe67aaba7d3c0508f209144a4a8599a5bad5e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 09/16] OpenOrienteering-Mapper: rebuild against libgdal-3.2.3
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From dcf6ccee85d67bb8d0dbf0565db34dee2fa03b5f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 10/16] osg: rebuild against libgdal-3.2.3, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From 5946afd7a6a4bf631bfb48a3fa11c8feec639aaa Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 11/16] sumo: update to 1.9.2 / rebuild against libgdal-3.2.3
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 common/shlibs         |  2 ++
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index a4d36eae29e8..9f1689b4f95c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4029,3 +4029,5 @@ libgrass_dbmibase.7.8.so grass-7.8.5_1
 libgrass_imagery.7.8.so grass-7.8.5_1
 libkmlconvenience.so.1 libkml-1.3.0_1
 mod_spatialite.so.7 libspatialite-5.0.0_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index 4c1eb6876a46..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=3
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From 8394fec555d417d4d11a219433acbaa76e6ba400 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 12/16] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 4c1710087f83..8811247ae7e5 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=5
+revision=6
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 283c3909eca10514aefded609e60d15518f47792 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 13/16] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index d4aae84f375d..91c6e8dbd5fe 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.4.2
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost python3 python3-psycopg2"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 17bae3522c68bf9255f6c24447a8a34cd81c75b7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 14/16] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From 1a3a0e410f64eddbc7ed7fa2bd982c8d2dcc759f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 21:53:09 +0200
Subject: [PATCH 15/16] paraview: rebuild against libgdal-3.2.3

---
 .../paraview/patches/cmake-build-type-none.patch | 16 ++++++++++++++++
 srcpkgs/paraview/template                        |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/paraview/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/paraview/patches/cmake-build-type-none.patch b/srcpkgs/paraview/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..53dfb4edba77
--- /dev/null
+++ b/srcpkgs/paraview/patches/cmake-build-type-none.patch
@@ -0,0 +1,16 @@
+Required to keep using build type None and not override debug flags etc.
+
+--- a/VTK/ThirdParty/eigen/vtkeigen/CMakeLists.txt
++++ b/VTK/ThirdParty/eigen/vtkeigen/CMakeLists.txt
+@@ -22,11 +22,6 @@ if (NOT CMAKE_BUILD_TYPE)
+ endif()
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
+-if(    NOT cmake_build_type_tolower STREQUAL "debug"
+-   AND NOT cmake_build_type_tolower STREQUAL "release"
+-   AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+-  message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
+-endif()
+ 
+ 
+ #############################################################################
diff --git a/srcpkgs/paraview/template b/srcpkgs/paraview/template
index 20a7f5589677..49ad9e48c2c0 100644
--- a/srcpkgs/paraview/template
+++ b/srcpkgs/paraview/template
@@ -1,7 +1,7 @@
 # Template file for 'paraview'
 pkgname=paraview
 version=5.8.1
-revision=3
+revision=4
 wrksrc=ParaView-v${version}
 build_style=cmake
 configure_args="-DCMAKE_PREFIX_PATH=${XBPS_CROSS_BASE}/usr

From 881b60da3bbc5b4f70fac8f25d75c00080fc1fbf Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Tue, 8 Dec 2020 15:33:58 +0100
Subject: [PATCH 16/16] grass: update to 7.8.5.

---
 srcpkgs/grass/patches/fix-config.patch     | 18 +++++
 srcpkgs/grass/patches/musl-build-fix.patch | 12 ++++
 srcpkgs/grass/template                     | 81 ++++++++++++++++------
 3 files changed, 90 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/fix-config.patch
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/srcpkgs/grass/patches/fix-config.patch b/srcpkgs/grass/patches/fix-config.patch
new file mode 100644
index 000000000000..28682209c610
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-config.patch
@@ -0,0 +1,18 @@
+--- a/grass.pc.in	2021-05-02 16:45:31.080611475 +0200
++++ b/grass.pc.in	2021-05-02 16:47:26.898147110 +0200
+@@ -4,11 +4,11 @@
+ 
+ prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+ exec_prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-libdir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib
+-includedir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++libdir=/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/lib
++includedir=/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/include
+ 
+ Name: GRASS
+ Description: GRASS GIS
+ Version: @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-Libs: -L@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
+-Cflags: -I@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++Libs: -L/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
++Cflags: -I/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/include
diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..2c4bb7e0f412
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,12 @@
+error: unknown type name 'int64_t' patch for musl
+
+--- a/include/gis.h	2020-10-05 08:39:31.000000000 +0200
++++ b/include/gis.h	2020-12-10 08:21:58.788027542 +0100
+@@ -23,6 +23,7 @@
+ /* System include files */
+ #include <stdio.h>
+ #include <stdarg.h>
++#include <stdint.h>
+ 
+ /* Grass and local include files */
+ #include <grass/config.h>
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..7a327a1384d5 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,69 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.5
+revision=1
+_binver=${version%.*}
+_binver=${_binver//./}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=\${DESTDIR}/usr/lib --bindir=\${DESTDIR}/usr/bin
+ --with-regex --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2
+ $(vopt_with bzip2 bzlib)
+ $(vopt_with geos)
+ $(vopt_with mysql) $(vopt_if mysql --with-mysql-includes=/usr/include/mysql)
+ $(vopt_with nls)
+ $(vopt_with pthread)
+ $(vopt_with postgres)"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar
+ $(vopt_if nls gettext)"
+makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel fftw-devel
+ cairo-devel glu-devel wxPython-devel libzstd-devel bzip2-devel
+ $(vopt_if bzip2 bzip2-devel)
+ $(vopt_if geos geos-devel)
+ $(vopt_if mysql libmysqlclient-devel)
+ $(vopt_if nls gettext-devel)
+ $(vopt_if postgres postgresql-libs-devel)"
+depends="python3-numpy wxPython4 libgdal>=3.2.0_1"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=a359bb665524ecccb643335d70f5436b1c84ffb6a0e428b78dffebacd983ff37
 nocross="tries to execute target binaries"
 
+build_options="geos mysql nls pthread postgres"
+build_options_default="pthread"
+
+shlib_provides="libgrass_dbmibase.${version%.*}.so libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so libgrass_gproj.${version%.*}.so libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass${_binver} \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binver}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binver}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binver}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binver}.sh
+
+	# install .pc file
+	vinstall grass.pc 0644 usr/share/pkgconfig
+
+	# desktop entry
+	vinstall dist.x86_64-unknown-linux-gnu/share/applications/grass.desktop 644 usr/share/applications
+
+	# icons
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (17 preceding siblings ...)
  2021-07-01 15:54 ` ar-jan
@ 2021-07-02 10:05 ` ar-jan
  2021-07-02 17:10 ` ar-jan
                   ` (38 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-07-02 10:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

[WiP] Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 37589 bytes --]

From 002d1eafdadca5791f32dbe759272179ef80d0eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=BDx?= <n.y.x@bluewin.ch>
Date: Tue, 11 May 2021 07:00:33 +0200
Subject: [PATCH 01/16] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 8a7eef8df8c3..3ed651a6596b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3053,7 +3053,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.0 libmygui-3.4.0_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..94995256d81d 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="sqlite-devel tiff-devel libcurl-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 59ca31c69baf1ca54ea99ae3bd3efb0f6dd03ba9 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Sun, 20 Dec 2020 14:49:30 +0100
Subject: [PATCH 02/16] New package: libspatialite-5.0.0

SpatiaLite is an open source library intended to extend the SQLite core
to support fully fledged Spatial SQL capabilities.

i686/i686               : ok
x86_64-musl/x86_64-musl : ok
aarch64/x86_64          : ok
aarch64-musl/x86_64-musl: ok
armv7l/x86_64           : ok
armv6l-musl/x86_64-musl : ok
---
 common/shlibs                                 | 16 +++++++++
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_sql.patch           | 29 +++++++++++++++
 srcpkgs/libspatialite/template                | 36 +++++++++++++++++++
 4 files changed, 82 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index 3ed651a6596b..214fb7195103 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4013,3 +4013,19 @@ libbasu.so.0 basu-0.2.0_1
 libXcomp.so.3 nx-libs-3.5.99.24_1
 libXcompshad.so.3 nx-libs-3.5.99.24_1
 libNX_X11.so.6 nx-libs-3.5.99.24_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.0_1
+libspatialindex.so.6 libspatialindex-1.9.3_1
+libgrass_gis.7.8.so grass-7.8.5_1
+libgrass_raster.7.8.so grass-7.8.5_1
+libgrass_gproj.7.8.so grass-7.8.5_1
+libgrass_dbmiclient.7.8.so grass-7.8.5_1
+libgrass_vector.7.8.so grass-7.8.5_1    
+libgrass_dbmibase.7.8.so grass-7.8.5_1
+libgrass_imagery.7.8.so grass-7.8.5_1
+libkmlconvenience.so.1 libkml-1.3.0_1
+mod_spatialite.so.7 libspatialite-5.0.0_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql.patch b/srcpkgs/libspatialite/patches/disable_check_sql.patch
new file mode 100644
index 000000000000..951c1ac1724d
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql.patch
@@ -0,0 +1,29 @@
+disable check_sql_stmt test
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..da7a9439da7e
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,36 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config libxml2"
+makedepends="sqlite-devel minizip-devel zlib-devel proj-devel freexl-devel
+ geos-devel libxml2-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=7b7fd70243f5a0b175696d87c46dde0ace030eacc27f39241c24bac5dfac6dac
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 9492d87af385dd643484ed7cfef826760dd0a48b Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/16] New package: libkml-1.3.0

libkml is a library to process Google-KML GEO files.
It can be used in GDAL (libgdal), OSSIM, OTB and osgEarth
---
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 +++++++++++++++++
 srcpkgs/libkml/template                | 23 +++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..d2abee573fe1
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,23 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="zlib-devel expat-devel boost-devel minizip-devel uriparser-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From 41b7ec139a46806acec2a0ceac525ed811061a3f Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Fri, 27 Nov 2020 07:02:22 +0100
Subject: [PATCH 04/16] libgdal: update to 3.2.3.

- update to 3.2.3.
- --with-expat / --with-spatialite added (OSM support)
- postgresql and kml support added
- python3-gdal module added
---
 common/shlibs                                 |  2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch | 53 ------------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch | 31 -------
 srcpkgs/libgdal/template                      | 83 ++++++++++++++++---
 srcpkgs/python3-gdal                          |  1 +
 5 files changed, 73 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 214fb7195103..a4d36eae29e8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2498,7 +2498,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.28 libgdal-3.2.3_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 72c96ff67605..f71d947b0aea 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,77 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=9
+version=3.2.3
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-podofo=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes
+ $(vopt_if kml libkml)
+ $(vopt_with postgresql pg)"
+hostmakedepends="gettext-devel pkg-config python3-numpy json-c-devel swig"
+makedepends="boost-devel expat-devel freexl-devel geos-devel jasper-devel
+ json-c-devel libcurl-devel libopenexr-devel libopenjpeg2-devel
+ libpodofo-devel libqhull-devel libspatialite-devel libwebp-devel
+ libxml2-devel libzstd-devel netcdf-devel ocl-icd-devel opencl-headers
+ pcre2-devel proj-devel python3-devel sqlite-devel
+ $(vopt_if kml libkml-devel)
+ $(vopt_if postgresql postgresql-libs-devel)"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=86a35aad60a1eb87c2c0c145f9bccd83a47c4781254544ed5246f64d55ee1f18
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +93,15 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+		vcopy swig/python/samples usr/share/python3-gdal/examples
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 629cd4edc9a5353297d0592a3ed8e8e548b1e5ff Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 05/16] postgis: rebuild against libgdal-3.2.3 and proj-7.2.1

---
 srcpkgs/postgis/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index e73a8e6d351a..63478eba6b73 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis'
 pkgname=postgis
 version=3.1.2
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 41250b9361c55d0aeffa45192f808d02ba653cc7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:07:47 +0200
Subject: [PATCH 06/16] postgis-postgresql12: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql12/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql12/template b/srcpkgs/postgis-postgresql12/template
index abefe9159680..1df61d2d05d3 100644
--- a/srcpkgs/postgis-postgresql12/template
+++ b/srcpkgs/postgis-postgresql12/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql12'
 pkgname=postgis-postgresql12
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 58e3117ff63b3e3fcb80f80896287a048b8443b4 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:10:31 +0200
Subject: [PATCH 07/16] postgis-postgresql13: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 21e894f61e98..b92c8b463fab 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From a46e6f507eb706768a351e94fac95a50aab1489e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 08/16] merkaartor: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 17c8d5dc361d..72c59006e968 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.18.4
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From ce0fe67aaba7d3c0508f209144a4a8599a5bad5e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 09/16] OpenOrienteering-Mapper: rebuild against libgdal-3.2.3
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From dcf6ccee85d67bb8d0dbf0565db34dee2fa03b5f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 10/16] osg: rebuild against libgdal-3.2.3, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From 5946afd7a6a4bf631bfb48a3fa11c8feec639aaa Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 11/16] sumo: update to 1.9.2 / rebuild against libgdal-3.2.3
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 common/shlibs         |  2 ++
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index a4d36eae29e8..9f1689b4f95c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4029,3 +4029,5 @@ libgrass_dbmibase.7.8.so grass-7.8.5_1
 libgrass_imagery.7.8.so grass-7.8.5_1
 libkmlconvenience.so.1 libkml-1.3.0_1
 mod_spatialite.so.7 libspatialite-5.0.0_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index 4c1eb6876a46..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=3
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From 8394fec555d417d4d11a219433acbaa76e6ba400 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 12/16] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 4c1710087f83..8811247ae7e5 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=5
+revision=6
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 283c3909eca10514aefded609e60d15518f47792 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 13/16] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index d4aae84f375d..91c6e8dbd5fe 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.4.2
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost python3 python3-psycopg2"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 17bae3522c68bf9255f6c24447a8a34cd81c75b7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 14/16] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From 1a3a0e410f64eddbc7ed7fa2bd982c8d2dcc759f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 21:53:09 +0200
Subject: [PATCH 15/16] paraview: rebuild against libgdal-3.2.3

---
 .../paraview/patches/cmake-build-type-none.patch | 16 ++++++++++++++++
 srcpkgs/paraview/template                        |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/paraview/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/paraview/patches/cmake-build-type-none.patch b/srcpkgs/paraview/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..53dfb4edba77
--- /dev/null
+++ b/srcpkgs/paraview/patches/cmake-build-type-none.patch
@@ -0,0 +1,16 @@
+Required to keep using build type None and not override debug flags etc.
+
+--- a/VTK/ThirdParty/eigen/vtkeigen/CMakeLists.txt
++++ b/VTK/ThirdParty/eigen/vtkeigen/CMakeLists.txt
+@@ -22,11 +22,6 @@ if (NOT CMAKE_BUILD_TYPE)
+ endif()
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
+-if(    NOT cmake_build_type_tolower STREQUAL "debug"
+-   AND NOT cmake_build_type_tolower STREQUAL "release"
+-   AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+-  message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
+-endif()
+ 
+ 
+ #############################################################################
diff --git a/srcpkgs/paraview/template b/srcpkgs/paraview/template
index 20a7f5589677..49ad9e48c2c0 100644
--- a/srcpkgs/paraview/template
+++ b/srcpkgs/paraview/template
@@ -1,7 +1,7 @@
 # Template file for 'paraview'
 pkgname=paraview
 version=5.8.1
-revision=3
+revision=4
 wrksrc=ParaView-v${version}
 build_style=cmake
 configure_args="-DCMAKE_PREFIX_PATH=${XBPS_CROSS_BASE}/usr

From 77c29c0db51f1a52fde9acef4744b5e9307feace Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Tue, 8 Dec 2020 15:33:58 +0100
Subject: [PATCH 16/16] grass: update to 7.8.5.

---
 srcpkgs/grass/patches/fix-config.patch     | 18 +++++
 srcpkgs/grass/patches/musl-build-fix.patch | 12 ++++
 srcpkgs/grass/template                     | 81 ++++++++++++++++------
 3 files changed, 90 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/fix-config.patch
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/srcpkgs/grass/patches/fix-config.patch b/srcpkgs/grass/patches/fix-config.patch
new file mode 100644
index 000000000000..28682209c610
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-config.patch
@@ -0,0 +1,18 @@
+--- a/grass.pc.in	2021-05-02 16:45:31.080611475 +0200
++++ b/grass.pc.in	2021-05-02 16:47:26.898147110 +0200
+@@ -4,11 +4,11 @@
+ 
+ prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+ exec_prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-libdir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib
+-includedir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++libdir=/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/lib
++includedir=/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/include
+ 
+ Name: GRASS
+ Description: GRASS GIS
+ Version: @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-Libs: -L@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
+-Cflags: -I@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++Libs: -L/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
++Cflags: -I/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/include
diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..2c4bb7e0f412
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,12 @@
+error: unknown type name 'int64_t' patch for musl
+
+--- a/include/gis.h	2020-10-05 08:39:31.000000000 +0200
++++ b/include/gis.h	2020-12-10 08:21:58.788027542 +0100
+@@ -23,6 +23,7 @@
+ /* System include files */
+ #include <stdio.h>
+ #include <stdarg.h>
++#include <stdint.h>
+ 
+ /* Grass and local include files */
+ #include <grass/config.h>
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..45b3087ba034 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,69 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.5
+revision=1
+_binver=${version%.*}
+_binver=${_binver//./}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=\${DESTDIR}/usr/lib --bindir=\${DESTDIR}/usr/bin
+ --with-regex --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2
+ $(vopt_with bzip2 bzlib)
+ $(vopt_with geos)
+ $(vopt_with mysql) $(vopt_if mysql --with-mysql-includes=/usr/include/mysql)
+ $(vopt_with nls)
+ $(vopt_with pthread)
+ $(vopt_with postgres)"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar
+ $(vopt_if nls gettext)"
+makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel fftw-devel
+ cairo-devel glu-devel wxPython-devel libzstd-devel bzip2-devel
+ $(vopt_if bzip2 bzip2-devel)
+ $(vopt_if geos geos-devel)
+ $(vopt_if mysql libmysqlclient-devel)
+ $(vopt_if nls gettext-devel)
+ $(vopt_if postgres postgresql-libs-devel)"
+depends="python3-numpy wxPython4 libgdal>=3.2.0_1"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=a359bb665524ecccb643335d70f5436b1c84ffb6a0e428b78dffebacd983ff37
 nocross="tries to execute target binaries"
 
+build_options="geos mysql nls pthread postgres"
+build_options_default="pthread"
+
+shlib_provides="libgrass_dbmibase.${version%.*}.so libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so libgrass_gproj.${version%.*}.so libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass${_binver} \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binver}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binver}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binver}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binver}.sh
+
+	# install .pc file
+	vinstall grass.pc 644 usr/share/pkgconfig
+
+	# desktop entry
+	vinstall gui/icons/grass.desktop 644 usr/share/applications
+
+	# icons
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [WiP] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (18 preceding siblings ...)
  2021-07-02 10:05 ` ar-jan
@ 2021-07-02 17:10 ` ar-jan
  2021-07-05 13:19 ` ar-jan
                   ` (37 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-07-02 17:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-873141474

Comment:
Apparently, the Grass GUI currently packaged is not functional (#29209). The updated version compiles and starts successfully, but in my testing the GUI disappears as soon as the mouse pointer enters its area. I do not see any error message. Any clues how to find the cause? If not perhaps it can be merged anyway since the GUI is already not functional in the current state and otherwise the library versions are a problem.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (19 preceding siblings ...)
  2021-07-02 17:10 ` ar-jan
@ 2021-07-05 13:19 ` ar-jan
  2021-07-05 15:28 ` ar-jan
                   ` (36 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-07-05 13:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 678 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-874108669

Comment:
The Grass GUI issue is due to to wxPython4 with Python 3.9 which segfaults.

https://github.com/OSGeo/grass/issues/1261
https://github.com/OSGeo/grass/issues/1123

This issue is fixed in wxPython4-4.1.1 which requires wxWidgets 3.1, but I assume it's not desirable to update to the 3.1 branch since it isn't stable like the current 3.0 series. I tried with the backported [patch](https://src.fedoraproject.org/rpms/python-wxpython4/c/f5471fb86aaae46a686b85c654fcbb98516355e6?branch=rawhide) to wxPython4 but still had the same issue.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (20 preceding siblings ...)
  2021-07-05 13:19 ` ar-jan
@ 2021-07-05 15:28 ` ar-jan
  2021-08-09 18:49 ` [PR PATCH] [Updated] " ar-jan
                   ` (35 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-07-05 15:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-874108669

Comment:
The Grass GUI issue is due to to wxPython4 with Python 3.9 which segfaults.

https://github.com/OSGeo/grass/issues/1261
https://github.com/OSGeo/grass/issues/1123

This issue is fixed in wxPython4-4.1.1 which requires wxWidgets 3.1, but I assume it's not desirable to update to the 3.1 branch since it isn't stable like the current 3.0 series. I tried with a backported [patch](https://github.com/wxWidgets/Phoenix/commit/5cace47aaece3cc4f2e6ea97d7fd5bb8ed316ac9) to wxPython4 but still had the same issue.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (21 preceding siblings ...)
  2021-07-05 15:28 ` ar-jan
@ 2021-08-09 18:49 ` ar-jan
  2021-08-12  1:54 ` ericonr
                   ` (34 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-08-09 18:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 37593 bytes --]

From 5ca4d5f38537c1b67c1e16bb73bf5c79a7baaf05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=BDx?= <n.y.x@bluewin.ch>
Date: Tue, 11 May 2021 07:00:33 +0200
Subject: [PATCH 01/16] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 278d2456072f..0312a7a3e376 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3037,7 +3037,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.0 libmygui-3.4.0_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..94995256d81d 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="sqlite-devel tiff-devel libcurl-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 637f591204efa7903036240a31559614250c6fdb Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Sun, 20 Dec 2020 14:49:30 +0100
Subject: [PATCH 02/16] New package: libspatialite-5.0.0

SpatiaLite is an open source library intended to extend the SQLite core
to support fully fledged Spatial SQL capabilities.

i686/i686               : ok
x86_64-musl/x86_64-musl : ok
aarch64/x86_64          : ok
aarch64-musl/x86_64-musl: ok
armv7l/x86_64           : ok
armv6l-musl/x86_64-musl : ok
---
 common/shlibs                                 | 16 +++++++++
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_sql.patch           | 29 +++++++++++++++
 srcpkgs/libspatialite/template                | 36 +++++++++++++++++++
 4 files changed, 82 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index 0312a7a3e376..d154f20ca73e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4004,3 +4004,19 @@ liblhasa.so.0 lhasa-0.3.1_2
 libmt32emu.so.2 libmt32emu-2.5.1_1
 libqrtr-glib.so.0 libqrtr-glib-1.0.0_1
 libstemmer.so.2 libstemmer-2.1.0_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.0_1
+libspatialindex.so.6 libspatialindex-1.9.3_1
+libgrass_gis.7.8.so grass-7.8.5_1
+libgrass_raster.7.8.so grass-7.8.5_1
+libgrass_gproj.7.8.so grass-7.8.5_1
+libgrass_dbmiclient.7.8.so grass-7.8.5_1
+libgrass_vector.7.8.so grass-7.8.5_1    
+libgrass_dbmibase.7.8.so grass-7.8.5_1
+libgrass_imagery.7.8.so grass-7.8.5_1
+libkmlconvenience.so.1 libkml-1.3.0_1
+mod_spatialite.so.7 libspatialite-5.0.0_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql.patch b/srcpkgs/libspatialite/patches/disable_check_sql.patch
new file mode 100644
index 000000000000..951c1ac1724d
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql.patch
@@ -0,0 +1,29 @@
+disable check_sql_stmt test
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..da7a9439da7e
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,36 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config libxml2"
+makedepends="sqlite-devel minizip-devel zlib-devel proj-devel freexl-devel
+ geos-devel libxml2-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=7b7fd70243f5a0b175696d87c46dde0ace030eacc27f39241c24bac5dfac6dac
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 0739d2a08adae678c19f98f6f3e4c0fcfe0751e0 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/16] New package: libkml-1.3.0

libkml is a library to process Google-KML GEO files.
It can be used in GDAL (libgdal), OSSIM, OTB and osgEarth
---
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 +++++++++++++++++
 srcpkgs/libkml/template                | 23 +++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..d2abee573fe1
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,23 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="zlib-devel expat-devel boost-devel minizip-devel uriparser-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From f6f85b4fa0a024f333548d7d5d6dc0401648bc70 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Fri, 27 Nov 2020 07:02:22 +0100
Subject: [PATCH 04/16] libgdal: update to 3.2.3.

- update to 3.2.3.
- --with-expat / --with-spatialite added (OSM support)
- postgresql and kml support added
- python3-gdal module added
---
 common/shlibs                                 |  2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch | 53 ------------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch | 31 -------
 srcpkgs/libgdal/template                      | 83 ++++++++++++++++---
 srcpkgs/python3-gdal                          |  1 +
 5 files changed, 73 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index d154f20ca73e..0030f762a45a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2482,7 +2482,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.28 libgdal-3.2.3_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 72c96ff67605..f71d947b0aea 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,77 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=9
+version=3.2.3
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-podofo=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes
+ $(vopt_if kml libkml)
+ $(vopt_with postgresql pg)"
+hostmakedepends="gettext-devel pkg-config python3-numpy json-c-devel swig"
+makedepends="boost-devel expat-devel freexl-devel geos-devel jasper-devel
+ json-c-devel libcurl-devel libopenexr-devel libopenjpeg2-devel
+ libpodofo-devel libqhull-devel libspatialite-devel libwebp-devel
+ libxml2-devel libzstd-devel netcdf-devel ocl-icd-devel opencl-headers
+ pcre2-devel proj-devel python3-devel sqlite-devel
+ $(vopt_if kml libkml-devel)
+ $(vopt_if postgresql postgresql-libs-devel)"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=86a35aad60a1eb87c2c0c145f9bccd83a47c4781254544ed5246f64d55ee1f18
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +93,15 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+		vcopy swig/python/samples usr/share/python3-gdal/examples
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 064ec43f5e4650aea02b72007941193d98cdf5d3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 05/16] postgis: rebuild against libgdal-3.2.3 and proj-7.2.1

---
 srcpkgs/postgis/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index e73a8e6d351a..63478eba6b73 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis'
 pkgname=postgis
 version=3.1.2
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 474c46335ebedb59276ff578524af72d9e6d4819 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:07:47 +0200
Subject: [PATCH 06/16] postgis-postgresql12: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql12/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql12/template b/srcpkgs/postgis-postgresql12/template
index abefe9159680..1df61d2d05d3 100644
--- a/srcpkgs/postgis-postgresql12/template
+++ b/srcpkgs/postgis-postgresql12/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql12'
 pkgname=postgis-postgresql12
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 4584f5376fc58ecfca6dbd652bd1e8b0cff3373c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:10:31 +0200
Subject: [PATCH 07/16] postgis-postgresql13: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 21e894f61e98..b92c8b463fab 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.1.2
-revision=1
+revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From b64893da36711dba66f408f6a46b6ccc85abf796 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 08/16] merkaartor: rebuild against libgdal-3.2.3 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 17c8d5dc361d..72c59006e968 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.18.4
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 3ccd5b1f2f41ad989cd36c5bb2ce11b373fb5f21 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 09/16] OpenOrienteering-Mapper: rebuild against libgdal-3.2.3
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From bd394736ac4954c9203555a5692493e88ee16511 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 10/16] osg: rebuild against libgdal-3.2.3, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From ed60d56af05a1c825c783f593f53384164aaca6d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 11/16] sumo: update to 1.9.2 / rebuild against libgdal-3.2.3
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 common/shlibs         |  2 ++
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 0030f762a45a..641873822343 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4020,3 +4020,5 @@ libgrass_dbmibase.7.8.so grass-7.8.5_1
 libgrass_imagery.7.8.so grass-7.8.5_1
 libkmlconvenience.so.1 libkml-1.3.0_1
 mod_spatialite.so.7 libspatialite-5.0.0_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index 4c1eb6876a46..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=3
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From c60d079dbb42610bd8f8fe8d43e02d762c37b5c2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 12/16] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 4c1710087f83..8811247ae7e5 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=5
+revision=6
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 58fca19221ed630b28a4d2e5c30e0e3475be5dd6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 13/16] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 9698f63059b6..d9df40f1ffe5 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.5.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost python3 python3-psycopg2"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 6b3e0ba41f2f9facec8565ef6f0c79c8acb99745 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 14/16] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From 79dcf79afa03390eb89c4b8d7bbfa47e1198394b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 21:53:09 +0200
Subject: [PATCH 15/16] paraview: rebuild against libgdal-3.2.3

---
 .../paraview/patches/cmake-build-type-none.patch | 16 ++++++++++++++++
 srcpkgs/paraview/template                        |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/paraview/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/paraview/patches/cmake-build-type-none.patch b/srcpkgs/paraview/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..53dfb4edba77
--- /dev/null
+++ b/srcpkgs/paraview/patches/cmake-build-type-none.patch
@@ -0,0 +1,16 @@
+Required to keep using build type None and not override debug flags etc.
+
+--- a/VTK/ThirdParty/eigen/vtkeigen/CMakeLists.txt
++++ b/VTK/ThirdParty/eigen/vtkeigen/CMakeLists.txt
+@@ -22,11 +22,6 @@ if (NOT CMAKE_BUILD_TYPE)
+ endif()
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
+-if(    NOT cmake_build_type_tolower STREQUAL "debug"
+-   AND NOT cmake_build_type_tolower STREQUAL "release"
+-   AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+-  message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
+-endif()
+ 
+ 
+ #############################################################################
diff --git a/srcpkgs/paraview/template b/srcpkgs/paraview/template
index 20a7f5589677..49ad9e48c2c0 100644
--- a/srcpkgs/paraview/template
+++ b/srcpkgs/paraview/template
@@ -1,7 +1,7 @@
 # Template file for 'paraview'
 pkgname=paraview
 version=5.8.1
-revision=3
+revision=4
 wrksrc=ParaView-v${version}
 build_style=cmake
 configure_args="-DCMAKE_PREFIX_PATH=${XBPS_CROSS_BASE}/usr

From f7f52eb67b2518bcd756e32e36ad4294ae849b9a Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Tue, 8 Dec 2020 15:33:58 +0100
Subject: [PATCH 16/16] grass: update to 7.8.5.

---
 srcpkgs/grass/patches/fix-config.patch     | 18 +++++
 srcpkgs/grass/patches/musl-build-fix.patch | 12 ++++
 srcpkgs/grass/template                     | 81 ++++++++++++++++------
 3 files changed, 90 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/fix-config.patch
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/srcpkgs/grass/patches/fix-config.patch b/srcpkgs/grass/patches/fix-config.patch
new file mode 100644
index 000000000000..28682209c610
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-config.patch
@@ -0,0 +1,18 @@
+--- a/grass.pc.in	2021-05-02 16:45:31.080611475 +0200
++++ b/grass.pc.in	2021-05-02 16:47:26.898147110 +0200
+@@ -4,11 +4,11 @@
+ 
+ prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+ exec_prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-libdir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib
+-includedir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++libdir=/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/lib
++includedir=/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/include
+ 
+ Name: GRASS
+ Description: GRASS GIS
+ Version: @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-Libs: -L@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
+-Cflags: -I@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++Libs: -L/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
++Cflags: -I/usr/lib/grass-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/include
diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..2c4bb7e0f412
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,12 @@
+error: unknown type name 'int64_t' patch for musl
+
+--- a/include/gis.h	2020-10-05 08:39:31.000000000 +0200
++++ b/include/gis.h	2020-12-10 08:21:58.788027542 +0100
+@@ -23,6 +23,7 @@
+ /* System include files */
+ #include <stdio.h>
+ #include <stdarg.h>
++#include <stdint.h>
+ 
+ /* Grass and local include files */
+ #include <grass/config.h>
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..45b3087ba034 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,69 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.5
+revision=1
+_binver=${version%.*}
+_binver=${_binver//./}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=\${DESTDIR}/usr/lib --bindir=\${DESTDIR}/usr/bin
+ --with-regex --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2
+ $(vopt_with bzip2 bzlib)
+ $(vopt_with geos)
+ $(vopt_with mysql) $(vopt_if mysql --with-mysql-includes=/usr/include/mysql)
+ $(vopt_with nls)
+ $(vopt_with pthread)
+ $(vopt_with postgres)"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar
+ $(vopt_if nls gettext)"
+makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel fftw-devel
+ cairo-devel glu-devel wxPython-devel libzstd-devel bzip2-devel
+ $(vopt_if bzip2 bzip2-devel)
+ $(vopt_if geos geos-devel)
+ $(vopt_if mysql libmysqlclient-devel)
+ $(vopt_if nls gettext-devel)
+ $(vopt_if postgres postgresql-libs-devel)"
+depends="python3-numpy wxPython4 libgdal>=3.2.0_1"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=a359bb665524ecccb643335d70f5436b1c84ffb6a0e428b78dffebacd983ff37
 nocross="tries to execute target binaries"
 
+build_options="geos mysql nls pthread postgres"
+build_options_default="pthread"
+
+shlib_provides="libgrass_dbmibase.${version%.*}.so libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so libgrass_gproj.${version%.*}.so libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass${_binver} \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binver}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binver}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binver}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binver}.sh
+
+	# install .pc file
+	vinstall grass.pc 644 usr/share/pkgconfig
+
+	# desktop entry
+	vinstall gui/icons/grass.desktop 644 usr/share/applications
+
+	# icons
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (22 preceding siblings ...)
  2021-08-09 18:49 ` [PR PATCH] [Updated] " ar-jan
@ 2021-08-12  1:54 ` ericonr
  2021-08-12  8:57 ` ar-jan
                   ` (33 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ericonr @ 2021-08-12  1:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-897285767

Comment:
> This issue is fixed in wxPython4-4.1.1 which requires wxWidgets 3.1, but I assume it's not desirable to update to the 3.1 branch since it isn't stable like the current 3.0 series.

Not only that, it doesn't even work for all our applications...

Do you have any suggestions?

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (23 preceding siblings ...)
  2021-08-12  1:54 ` ericonr
@ 2021-08-12  8:57 ` ar-jan
  2021-08-12  8:59 ` ar-jan
                   ` (32 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-08-12  8:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-897466765

Comment:
That first part was probably wrong -- what seems to be the underlying bug is fixed in that version, but I've tried with the backported patch which does work [for Fedora](https://github.com/OSGeo/grass/issues/1123#issuecomment-734248290), but without success. So either I'm doing something wrong in using the patched wxPython, or maybe something else is wrong (but that would be weird given that it fails in exactly the same way as described there).

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (24 preceding siblings ...)
  2021-08-12  8:57 ` ar-jan
@ 2021-08-12  8:59 ` ar-jan
  2021-08-12 11:29 ` ericonr
                   ` (31 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-08-12  8:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-897466765

Comment:
That first part was probably wrong -- what seems to be the underlying bug is fixed in that version, but I've tried with a backported patch which does work [for Fedora](https://github.com/OSGeo/grass/issues/1123#issuecomment-734248290), but without success. So either I'm doing something wrong in using the patched wxPython, or maybe something else is wrong (but that would be weird given that it fails in exactly the same way as described there).

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (25 preceding siblings ...)
  2021-08-12  8:59 ` ar-jan
@ 2021-08-12 11:29 ` ericonr
  2021-08-16 19:04 ` ar-jan
                   ` (30 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ericonr @ 2021-08-12 11:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-897561883

Comment:
What steps did you follow?

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (26 preceding siblings ...)
  2021-08-12 11:29 ` ericonr
@ 2021-08-16 19:04 ` ar-jan
  2022-02-15  0:26 ` [PR PATCH] [Updated] " ar-jan
                   ` (29 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2021-08-16 19:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-899748366

Comment:
I built `wxPython4` with a backport of the patch as in [this branch](https://github.com/ar-jan/void-packages/tree/gdal-proj-wxPython), and built `grass` 7.8.5.

Then installed wxPython4 and grass from this local build, then ran `grass78`.

I supposed it's only a runtime dependency, but to be sure I also built `wxPython` (v3.0) with the same patch backported, since wxPython-devel is used in building grass, then re-built grass. Same result.

I just switched to a new installation using i3 and I'm now seeing an additional error that I didn't see before: `"(wxgui.py:24024): Gtk-CRITICAL: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton"` (maybe unrelated to the GUI crashing).

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (27 preceding siblings ...)
  2021-08-16 19:04 ` ar-jan
@ 2022-02-15  0:26 ` ar-jan
  2022-02-15  0:30 ` ar-jan
                   ` (28 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-15  0:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 204571 bytes --]

From cbbcc5ddb0466c3d823494210358e6b0383a5155 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/16] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 0c60260b4642..b0fcfd04926e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 025f72e94b219c30723901902b52994a01a4db15 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Sun, 20 Dec 2020 14:49:30 +0100
Subject: [PATCH 02/16] New package: libspatialite-5.0.1

---
 common/shlibs                                 | 17 ++++++++
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_sql.patch           | 29 +++++++++++++
 srcpkgs/libspatialite/template                | 42 +++++++++++++++++++
 4 files changed, 89 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index b0fcfd04926e..121c3164f92b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4110,3 +4110,20 @@ libawt_xawt.so openjdk17-jre-17.0.1+12_1
 libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
+libavif.so.12 libavif-0.9.2_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.0_1
+libspatialindex.so.6 libspatialindex-1.9.3_1
+libgrass_gis.7.8.so grass-7.8.5_1
+libgrass_raster.7.8.so grass-7.8.5_1
+libgrass_gproj.7.8.so grass-7.8.5_1
+libgrass_dbmiclient.7.8.so grass-7.8.5_1
+libgrass_vector.7.8.so grass-7.8.5_1    
+libgrass_dbmibase.7.8.so grass-7.8.5_1
+libgrass_imagery.7.8.so grass-7.8.5_1
+libkmlconvenience.so.1 libkml-1.3.0_1
+mod_spatialite.so.7 libspatialite-5.0.0_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql.patch b/srcpkgs/libspatialite/patches/disable_check_sql.patch
new file mode 100644
index 000000000000..951c1ac1724d
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql.patch
@@ -0,0 +1,29 @@
+disable check_sql_stmt test
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..2ea1701d8ae6
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,42 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.1
+revision=1
+build_style=gnu-configure
+configure_args="--disable-rttopo"
+hostmakedepends="pkg-config libxml2"
+makedepends="freexl-devel
+ geos-devel
+ libxml2-devel
+ minizip-devel
+ proj-devel
+ sqlite-devel
+ zlib-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 6b6bc91d6044ae8513961e252bf3db952530fc43 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/16] New package: libkml-1.3.0

---
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 ++++++++++++++++
 srcpkgs/libkml/template                | 27 ++++++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..b67eece4d8ba
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,27 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="boost-devel
+ expat-devel
+ minizip-devel
+ uriparser-devel
+ zlib-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From 9cd42e143b8f09dfa254b0d3db40068ca1a429c6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 04/16] libgdal: update to 3.4.1 and rebuild against proj-7.2.1

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 105 ++++++++++++++++--
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 95 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 121c3164f92b..62b573986051 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2510,7 +2510,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..5fca579954fa 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,100 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.1
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libspatialite-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ libkml-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=e360387bc25ec24940f46afbeada48002d72c74aaf9eccf2a40e8d74e711a2e4
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +116,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 322fcb7177ca3a86b15bfb9e6f6e4d5c049d31e2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 05/16] postgis: update to 3.1.5; rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..f52cd6657988 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.1.5
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From a66776d4df053250467b1bc97d1b5e6f104f45db Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 06/16] postgis-postgresql13: update to 3.1.5; rebuild against
 libgdal-3.4.1 and proj-7.2.1

---
 srcpkgs/postgis-postgresql13/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..a05102a14bca 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
+version=3.1.5
 revision=2
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From cca754e664c0b5e488a7e33beb95d10474a3c5f0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 07/16] postgis-postgresql14: update to 3.1.5; rebuild against
 libgdal-3.4.1 and proj-7.2.1

---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..ad8d0c5c4253 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.1.5
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 670ddf2aa42707eda02164e1dbc8df4f81461754 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 9 Aug 2021 19:53:17 +0200
Subject: [PATCH 08/16] wxPython4: backport patches, and fix tests

Backported patches:
- wxPseudoDC GIL
- Python 3.10 AGW FlatNotebook patch
- Python 3.10 ScrolledWindow argument types
- Python 3.10 Integer division
- wx.WindowID and wx.Region arguments
---
 .../patches/0002-Python-3.10-issues.patch     | 3317 +++++++++++++++++
 .../0003-Python-3.10-AGW-FlatNotebook.patch   |   57 +
 .../patches/restore-gil-pseudodc.patch        |   52 +
 srcpkgs/wxPython4/template                    |    3 +-
 4 files changed, 3428 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
 create mode 100644 srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
 create mode 100644 srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch

diff --git a/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
new file mode 100644
index 000000000000..6c87ff967d01
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
@@ -0,0 +1,3317 @@
+From f55a17c2d3b336c82fb44f7816ec63219847f4cc Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 22 2021 20:23:54 +0000
+Subject: Fix a bunch of Python 3.10 issues
+
+
+---
+
+diff --git a/0d449626d6d298ad96ebd1d514d0e42833bce470.patch b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+new file mode 100644
+index 0000000..d2ccddc
+--- /dev/null
++++ b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+@@ -0,0 +1,22 @@
++From 0d449626d6d298ad96ebd1d514d0e42833bce470 Mon Sep 17 00:00:00 2001
++From: Carolina Feher da Silva <carolfsu@gmail.com>
++Date: Tue, 16 Nov 2021 01:24:31 +0000
++Subject: [PATCH] Fixed integer division in Python 3
++
++---
++ wx/lib/stattext.py | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/wx/lib/stattext.py b/wx/lib/stattext.py
++index 2cfb6e65a..e606e5a89 100644
++--- a/wx/lib/stattext.py
+++++ b/wx/lib/stattext.py
++@@ -302,7 +302,7 @@ def OnPaint(self, event):
++             if style & wx.ALIGN_RIGHT:
++                 x = width - w
++             if style & wx.ALIGN_CENTER:
++-                x = (width - w)/2
+++                x = (width - w)//2
++             dc.DrawText(line, x, y)
++             y += h
++ 
+diff --git a/3eb9eb32dc3285435039f6c420c398665372a1ad.patch b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+new file mode 100644
+index 0000000..08e58a0
+--- /dev/null
++++ b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+@@ -0,0 +1,84 @@
++From 3eb9eb32dc3285435039f6c420c398665372a1ad Mon Sep 17 00:00:00 2001
++From: Glen Whitney <glen@studioinfinity.org>
++Date: Tue, 31 Aug 2021 11:06:27 -0700
++Subject: [PATCH] fix: Correct types of arguments to
++ ScrolledWindow.SetScrollbars
++
++---
++ demo/Mask.py                   |  2 +-
++ demo/OGL.py                    |  2 +-
++ wx/lib/agw/ultimatelistctrl.py | 14 +++++++-------
++ 3 files changed, 9 insertions(+), 9 deletions(-)
++
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 5f0c2cdde..109b8f30b 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -56,7 +56,7 @@ def __init__(self, parent):
++         mask = wx.Mask(self.bmp_withcolourmask, wx.WHITE)
++         self.bmp_withcolourmask.SetMask(mask)
++ 
++-        self.SetScrollbars(20, 20, 700/20, 460/20)
+++        self.SetScrollbars(20, 20, 700//20, 460//20)
++ 
++         self.Bind(wx.EVT_PAINT, self.OnPaint)
++ 
++diff --git a/demo/OGL.py b/demo/OGL.py
++index 72ca543dd..d475e5011 100644
++--- a/demo/OGL.py
+++++ b/demo/OGL.py
++@@ -272,7 +272,7 @@ def __init__(self, parent, log, frame):
++ 
++         maxWidth  = 1000
++         maxHeight = 1000
++-        self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
+++        self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
++ 
++         self.log = log
++         self.frame = frame
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index c60867684..14fc41f86 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -9654,8 +9654,8 @@ def RecalculatePositions(self, noRefresh=False):
++                 self._linesPerPage = clientHeight//lineHeight
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + lineHeight - 1)/lineHeight,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + lineHeight - 1)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9676,8 +9676,8 @@ def RecalculatePositions(self, noRefresh=False):
++                     decrement = SCROLL_UNIT_X
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + SCROLL_UNIT_Y - 1)/SCROLL_UNIT_Y,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + SCROLL_UNIT_Y - 1)//SCROLL_UNIT_Y,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9728,8 +9728,8 @@ def RecalculatePositions(self, noRefresh=False):
++                         line._gi.ExtendWidth(widthMax)
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (x + SCROLL_UNIT_X)/SCROLL_UNIT_X,
++-                                   (y + lineHeight)/lineHeight,
+++                                   (x + SCROLL_UNIT_X)//SCROLL_UNIT_X,
+++                                   (y + lineHeight)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9797,7 +9797,7 @@ def RecalculatePositions(self, noRefresh=False):
++                             break  # Everything fits, no second try required.
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (entireWidth + SCROLL_UNIT_X)/SCROLL_UNIT_X,
+++                                   (entireWidth + SCROLL_UNIT_X)//SCROLL_UNIT_X,
++                                    0,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    0,
+diff --git a/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+new file mode 100644
+index 0000000..f0b9f5d
+--- /dev/null
++++ b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+@@ -0,0 +1,143 @@
++From 9096426603272672d9a676e8bcdcadf0a1cfa1a2 Mon Sep 17 00:00:00 2001
++From: Robin Dunn <robin@alldunn.com>
++Date: Wed, 26 Feb 2020 11:10:27 -0800
++Subject: [PATCH] Add __index__ to wx.WindowID, and __bool__ to wx.Region
++
++---
++ etg/region.py              |  5 +++--
++ etg/windowid.py            | 32 +++++++++++++++++---------------
++ unittests/test_windowid.py | 23 +++++++++++++++++++++--
++ 3 files changed, 41 insertions(+), 19 deletions(-)
++
++diff --git a/etg/region.py b/etg/region.py
++index 0982c1fe5..d5bc45759 100644
++--- a/etg/region.py
+++++ b/etg/region.py
++@@ -88,11 +88,12 @@ def next(self):
++     c.mustHaveApp()
++     c.find('operator++').ignore()
++ 
++-    # SIP maps operator bool() to __int__, but Classic used __nonzero__. Does
++-    # it make any difference either way?
++     c.find('operator bool').ignore()
++     c.addCppMethod('int', '__nonzero__', '()', 'return (int)self->operator bool();',
++                    'Returns true while there are still rectangles available in the iteration.')
+++    c.addCppMethod('int', '__bool__', '()', 'return (int)self->operator bool();',
+++                   'Returns true while there are still rectangles available in the iteration.')
+++
++ 
++     c.addCppMethod('void', 'Next', '()', 'self->operator++();',
++                    'Move the iterator to the next rectangle in the region.')
++diff --git a/etg/windowid.py b/etg/windowid.py
++index 27b041b3d..da2ed395e 100644
++--- a/etg/windowid.py
+++++ b/etg/windowid.py
++@@ -53,12 +53,12 @@ def run():
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Create reference from an ID',
++                     items=[ ParamDef(type='int', name='id') ]),
++-                
+++
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Copy an ID reference',
++                     items=[ ParamDef(type='const wxWindowIDRef&', name='idref') ]),
++                 ]),
++-            
+++
++             MethodDef(name='~wxWindowIDRef', className='wxWindowIDRef', isDtor=True),
++ 
++             MethodDef(type='int', name='GetValue',
++@@ -73,11 +73,13 @@ def run():
++             """)
++ 
++     klass.addCppMethod('int', '__int__', '()',
++-        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or etc.",
++-        body="""\
++-            return self->GetValue();
++-            """)
++-    
+++        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or other places an integer type is needed.",
+++        body="return self->GetValue();")
+++    klass.addCppMethod('int', '__index__', '()',
+++        doc="See :meth:`__int__`",
+++        body="return self->GetValue();")
+++
+++
++     klass.addCppMethod('bool', '__eq__', '(wxWindowID id)', "return self->GetValue() == id;")
++     klass.addCppMethod('bool', '__ne__', '(wxWindowID id)', "return self->GetValue() != id;")
++     klass.addCppMethod('bool', '__lt__', '(wxWindowID id)', "return self->GetValue() < id;")
++@@ -92,17 +94,17 @@ def run():
++     # and finish it up by adding it to the module
++     module.addItem(klass)
++ 
++-    # Now, let's add a new Python function to the global scope that reserves an 
++-    # ID (or range) and returns a ref object for it. 
++-    module.addPyFunction('NewIdRef', '(count=1)', 
+++    # Now, let's add a new Python function to the global scope that reserves an
+++    # ID (or range) and returns a ref object for it.
+++    module.addPyFunction('NewIdRef', '(count=1)',
++         doc="""\
++-            Reserves a new Window ID (or range of WindowIDs) and returns a 
++-            :class:`wx.WindowIDRef` object (or list of them) that will help 
+++            Reserves a new Window ID (or range of WindowIDs) and returns a
+++            :class:`wx.WindowIDRef` object (or list of them) that will help
++             manage the reservation of that ID.
++ 
++-            This function is intended to be a drop-in replacement of the old 
++-            and deprecated :func:`wx.NewId` function, with the added benefit 
++-            that the ID should never conflict with an in-use ID or other IDs 
+++            This function is intended to be a drop-in replacement of the old
+++            and deprecated :func:`wx.NewId` function, with the added benefit
+++            that the ID should never conflict with an in-use ID or other IDs
++             generated by this function.
++             """,
++         body="""\
++diff --git a/unittests/test_windowid.py b/unittests/test_windowid.py
++index 4593e5a69..fc36c9eb8 100644
++--- a/unittests/test_windowid.py
+++++ b/unittests/test_windowid.py
++@@ -31,9 +31,9 @@ def test_newIdRef02(self):
++     def test_newIdRef03(self):
++         """Check that Auto ID Management is enabled (--enable-autoidman)"""
++         # This test is expected to fail if autoID mangagement is turned on
++-        # because a reference to the ID is not being saved, so it will be 
+++        # because a reference to the ID is not being saved, so it will be
++         # unreserved when the first widget is destroyed.
++-        
+++
++         id = wx.Window.NewControlId()
++         b = wx.Button(self.frame, id, 'button')
++         b.Destroy()
++@@ -75,6 +75,7 @@ def test_WindowIDRef01(self):
++         val = ref1 <= ref2
++         assert type(val) == bool
++ 
+++
++     def test_WindowIDRef02(self):
++         d = {wx.NewIdRef(): 'one',
++              wx.NewIdRef(): 'two'}
++@@ -82,6 +83,24 @@ def test_WindowIDRef02(self):
++         for k in keys:
++             val = d[k]
++ 
+++
+++    def test_WindowIDRef03(self):
+++        # Ensure wx.WindowIDRef can be converted to int without warning when
+++        # making a call to warrped method. In Py3.8+ this means there needs to
+++        # be an __index__ method.
+++
+++        # Turn warnings into exceptions so this test will fail if there is
+++        # a warning
+++        import warnings
+++        warnings.simplefilter('error')
+++
+++        wid = wx.NewIdRef()
+++        assert isinstance(wid, wx.WindowIDRef)
+++
+++        b = wx.Button(self.frame, wid, 'button')
+++        assert b.GetId() == wid.GetId()
+++
+++
++ #---------------------------------------------------------------------------
++ 
++ 
+ 
+diff --git a/python3.10-fixes.patch b/python3.10-fixes.patch
+new file mode 100644
+index 0000000..29e8c61
+--- /dev/null
++++ b/python3.10-fixes.patch
+@@ -0,0 +1,3034 @@
++From 173d0796810bb65de9bdfdc6941d24a04628f6c2 Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Wed, 1 Dec 2021 14:19:00 -0500
++Subject: [PATCH] Fix a bunch of Python 3.10 issues with pure-Python classes
++ and demos
++
++In Python 3.10, a change[1] was implemented where extension functions
++that take integer arguments will no longer silently accept non-integer
++arguments (e.g., floats) that can only be converted to integers with a
++loss of precision.  This PR fixes most of these issues in the pure-Python
++classes and demos by explicitly converting the parameters to int before
++passing them to wxWidgets.  There is loss of precision, but this was
++happening before (automatically) anyway as most wxWidgets DeviceContext
++functions operate using integers.
++
++Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
++too small on GTK3.
++
++This is an example of the relevant exception:
++Traceback (most recent call last):
++  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
++    r.width = w
++TypeError: 'float' object cannot be interpreted as an integer
++
++Fixes #2038.
++
++[1] https://bugs.python.org/issue37999
++---
++ demo/GridLabelRenderer.py               |   4 +-
++ demo/Mask.py                            |   4 +-
++ demo/Overlay.py                         |   1 -
++ demo/PenAndBrushStyles.py               |   2 +-
++ demo/PopupWindow.py                     |   2 +-
++ demo/PrintFramework.py                  |   2 +-
++ demo/PropertyGrid.py                    |   2 +-
++ demo/Sizers.py                          |   2 +-
++ demo/UIActionSimulator.py               |   2 +-
++ demo/agw/AUI.py                         |  32 +++----
++ demo/agw/MacLargeDemo.py                |   4 +-
++ demo/agw/PeakMeter.py                   |   6 +-
++ demo/agw/PersistentControls.py          |   2 +-
++ demo/agw/RibbonBar.py                   |   2 +-
++ demo/agw/SpeedMeter.py                  |   2 +-
++ demo/agw/SuperToolTip.py                |   3 +-
++ demo/agw/ThumbDemoConfig.py             |   1 +
++ demo/agw/UltimateReportDemo.py          |   8 +-
++ demo/agw/Windows7Explorer_Contents.py   |  16 ++--
++ demo/agw/ZoomBar.py                     |   2 +-
++ wx/lib/agw/advancedsplash.py            |   2 +-
++ wx/lib/agw/aui/aui_utilities.py         |   4 +-
++ wx/lib/agw/aui/auibook.py               |   4 +-
++ wx/lib/agw/balloontip.py                |   4 +-
++ wx/lib/agw/flatmenu.py                  |  62 ++++++-------
++ wx/lib/agw/flatnotebook.py              |  10 +--
++ wx/lib/agw/floatspin.py                 |   2 +-
++ wx/lib/agw/gradientbutton.py            |   8 +-
++ wx/lib/agw/hypertreelist.py             |   2 +-
++ wx/lib/agw/knobctrl.py                  |  12 +--
++ wx/lib/agw/labelbook.py                 |  32 +++----
++ wx/lib/agw/peakmeter.py                 |   2 +-
++ wx/lib/agw/pygauge.py                   |   4 +-
++ wx/lib/agw/ribbon/art_aui.py            |  22 ++---
++ wx/lib/agw/ribbon/art_internal.py       |  12 +--
++ wx/lib/agw/ribbon/art_msw.py            |  88 +++++++++----------
++ wx/lib/agw/ribbon/bar.py                |   4 +-
++ wx/lib/agw/ribbon/buttonbar.py          |   6 +-
++ wx/lib/agw/ribbon/gallery.py            |   8 +-
++ wx/lib/agw/ribbon/panel.py              |  16 ++--
++ wx/lib/agw/ribbon/toolbar.py            |   2 +-
++ wx/lib/agw/scrolledthumbnail.py         |  24 +++---
++ wx/lib/agw/shapedbutton.py              |  10 +--
++ wx/lib/agw/speedmeter.py                |  72 +++++++++-------
++ wx/lib/agw/supertooltip.py              |  20 ++---
++ wx/lib/agw/toasterbox.py                |   4 +-
++ wx/lib/agw/ultimatelistctrl.py          |  20 ++---
++ wx/lib/agw/xlsgrid.py                   |   4 +-
++ wx/lib/agw/zoombar.py                   |  10 +--
++ wx/lib/analogclock/analogclock.py       |   2 +-
++ wx/lib/analogclock/helpers.py           |  22 ++---
++ wx/lib/analogclock/setup.py             |   6 +-
++ wx/lib/buttons.py                       |  10 +--
++ wx/lib/colourchooser/pycolourchooser.py |   4 +-
++ wx/lib/colourchooser/pypalette.py       |   2 +-
++ wx/lib/floatcanvas/FCObjects.py         |   8 +-
++ wx/lib/gizmos/ledctrl.py                |   8 +-
++ wx/lib/imagebrowser.py                  |   4 +-
++ wx/lib/ogl/basic.py                     |  10 +--
++ wx/lib/ogl/bmpshape.py                  |   2 +-
++ wx/lib/ogl/composit.py                  |   4 +-
++ wx/lib/ogl/divided.py                   |   2 +-
++ wx/lib/ogl/lines.py                     |   2 +-
++ wx/lib/ogl/oglmisc.py                   |   4 +-
++ wx/lib/plot/examples/demo.py            |   4 +-
++ wx/lib/plot/plotcanvas.py               | 110 ++++++++++++------------
++ wx/lib/plot/polyobjects.py              |  22 +++--
++ wx/lib/popupctl.py                      |   2 +-
++ wx/lib/scrolledpanel.py                 |   2 +-
++ wx/lib/throbber.py                      |   6 +-
++ wx/lib/ticker.py                        |   4 +-
++ 71 files changed, 411 insertions(+), 398 deletions(-)
++
++diff --git a/demo/GridLabelRenderer.py b/demo/GridLabelRenderer.py
++index 794dd64e8..1440ef41b 100644
++--- a/demo/GridLabelRenderer.py
+++++ b/demo/GridLabelRenderer.py
++@@ -46,8 +46,8 @@ def __init__(self):
++         self._bmp = images.Smiles.GetBitmap()
++ 
++     def Draw(self, grid, dc, rect, rc):
++-        x = rect.left + (rect.width - self._bmp.GetWidth()) / 2
++-        y = rect.top + (rect.height - self._bmp.GetHeight()) / 2
+++        x = rect.left + (rect.width - self._bmp.GetWidth()) // 2
+++        y = rect.top + (rect.height - self._bmp.GetHeight()) // 2
++         dc.DrawBitmap(self._bmp, x, y, True)
++ 
++ 
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 109b8f30b..e924f95b9 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -90,9 +90,9 @@ def OnPaint (self, e):
++ 
++         for text, code in logicList:
++             x,y = 120+150*(i%4), 20+100*(i/4)
++-            dc.DrawText(text, x, y-20)
+++            dc.DrawText(text, x, int(y-20))
++             mdc.SelectObject(self.bmp_withcolourmask)
++-            dc.Blit(x,y, cx,cy, mdc, 0,0, code, True)
+++            dc.Blit(x,int(y), cx,cy, mdc, 0,0, code, True)
++             i = i + 1
++ 
++ 
++diff --git a/demo/Overlay.py b/demo/Overlay.py
++index 65164cd84..fa65be003 100644
++--- a/demo/Overlay.py
+++++ b/demo/Overlay.py
++@@ -56,7 +56,6 @@ def __init__(self, parent, log):
++         self.penstylesCombo.SetToolTip('Pen Style')
++ 
++         self.overlayPenWidth = wx.SpinCtrl(self, -1, value='',
++-                                           size=(75, -1),
++                                            style=wx.SP_ARROW_KEYS,
++                                            min=1, max=24, initial=1)
++         self.overlayPenWidth.SetToolTip('Pen Width')
++diff --git a/demo/PenAndBrushStyles.py b/demo/PenAndBrushStyles.py
++index 24040b1fc..1183f684a 100644
++--- a/demo/PenAndBrushStyles.py
+++++ b/demo/PenAndBrushStyles.py
++@@ -100,7 +100,7 @@ def OnPaint(self, event):
++ 
++         dc.SetPen(pen)
++         y = labelHeight + (height - labelHeight)/2
++-        dc.DrawLine(5, y, width-5, y)
+++        dc.DrawLine(5, int(y), width-5, int(y))
++ 
++ 
++ class BrushPanel(BasePanel):
++diff --git a/demo/PopupWindow.py b/demo/PopupWindow.py
++index d8e175576..b54b9870d 100644
++--- a/demo/PopupWindow.py
+++++ b/demo/PopupWindow.py
++@@ -89,7 +89,7 @@ def __init__(self, parent, style, log):
++                           "(or its first child) loses focus in \n"
++                           "any other way.")
++         btn = wx.Button(panel, -1, "Press Me")
++-        spin = wx.SpinCtrl(panel, -1, "Hello", size=(100,-1))
+++        spin = wx.SpinCtrl(panel, -1, "Hello")
++         btn.Bind(wx.EVT_BUTTON, self.OnButton)
++ 
++         sizer = wx.BoxSizer(wx.VERTICAL)
++diff --git a/demo/PrintFramework.py b/demo/PrintFramework.py
++index e7a29a077..f0873ae94 100644
++--- a/demo/PrintFramework.py
+++++ b/demo/PrintFramework.py
++@@ -81,7 +81,7 @@ def OnPrintPage(self, page):
++ 
++         #-------------------------------------------
++         self.canvas.DoDrawing(dc, True)
++-        dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
+++        dc.DrawText("Page: %d" % page, marginX//2, maxY-marginY)
++ 
++         return True
++ 
++diff --git a/demo/PropertyGrid.py b/demo/PropertyGrid.py
++index c56e08b60..fbef29e31 100644
++--- a/demo/PropertyGrid.py
+++++ b/demo/PropertyGrid.py
++@@ -150,7 +150,7 @@ def _ConvertValue(self, value):
++         """ Utility convert arbitrary value to a real wx.Size.
++         """
++         import collections
++-        if isinstance(value, collections.Sequence) or hasattr(value, '__getitem__'):
+++        if isinstance(value, collections.abc.Sequence) or hasattr(value, '__getitem__'):
++             value = wx.Size(*value)
++         return value
++ 
++diff --git a/demo/Sizers.py b/demo/Sizers.py
++index 6ababede9..a025050f1 100644
++--- a/demo/Sizers.py
+++++ b/demo/Sizers.py
++@@ -45,7 +45,7 @@ def OnPaint(self, evt):
++         dc = wx.PaintDC(self)
++         w,h = dc.GetTextExtent(self.text)
++         dc.Clear()
++-        dc.DrawText(self.text, (sz.width-w)/2, (sz.height-h)/2)
+++        dc.DrawText(self.text, (sz.width-w)//2, (sz.height-h)//2)
++ 
++     def OnSize(self, evt):
++         self.Refresh()
++diff --git a/demo/UIActionSimulator.py b/demo/UIActionSimulator.py
++index cbba14f5c..0a6fd0234 100644
++--- a/demo/UIActionSimulator.py
+++++ b/demo/UIActionSimulator.py
++@@ -88,7 +88,7 @@ def _playbackKey(self, evtType, key, modifiers):
++ 
++     def _setNextKeyEvent(self):
++         evtType, key, modifiers, milli = self._playbackEvents.pop(0)
++-        milli = max(milli/2, 1) # play back faster than it was recorded
+++        milli = max(milli//2, 1) # play back faster than it was recorded
++         print(evtType, key, modifiers, milli)
++         wx.CallLater(milli, self._playbackKey, evtType, key, modifiers)
++ 
++diff --git a/demo/agw/AUI.py b/demo/agw/AUI.py
++index 7c2196865..b38313c86 100644
++--- a/demo/agw/AUI.py
+++++ b/demo/agw/AUI.py
++@@ -393,7 +393,7 @@ def OnPaint(self, event):
++         dc.SetPen(wx.LIGHT_GREY_PEN)
++         dc.DrawLine(0, 0, size.x, size.y)
++         dc.DrawLine(0, size.y, size.x, 0)
++-        dc.DrawText(s, (size.x-w)/2, (size.y-height*5)/2)
+++        dc.DrawText(s, (size.x-w)//2, (size.y-height*5)//2)
++ 
++         if self._mgr:
++ 
++@@ -401,19 +401,19 @@ def OnPaint(self, event):
++ 
++             s = "Layer: %d"%pi.dock_layer
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*1))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*1))
++ 
++             s = "Dock: %d Row: %d"%(pi.dock_direction, pi.dock_row)
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*2))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*2))
++ 
++             s = "Position: %d"%pi.dock_pos
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*3))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*3))
++ 
++             s = "Proportion: %d"%pi.dock_proportion
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*4))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*4))
++ 
++ 
++     def OnEraseBackground(self, event):
++@@ -435,7 +435,7 @@ def __init__(self, parent, frame):
++ 
++         s1 = wx.BoxSizer(wx.HORIZONTAL)
++         self._border_size = wx.SpinCtrl(self, ID_PaneBorderSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE),
++-                                        wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100,
+++                                        wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100,
++                                         frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE))
++         s1.Add((1, 1), 1, wx.EXPAND)
++         s1.Add(wx.StaticText(self, -1, "Pane Border Size:"))
++@@ -445,7 +445,7 @@ def __init__(self, parent, frame):
++ 
++         s2 = wx.BoxSizer(wx.HORIZONTAL)
++         self._sash_size = wx.SpinCtrl(self, ID_SashSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE), wx.DefaultPosition,
++-                                      wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
+++                                      wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
++         s2.Add((1, 1), 1, wx.EXPAND)
++         s2.Add(wx.StaticText(self, -1, "Sash Size:"))
++         s2.Add(self._sash_size)
++@@ -454,7 +454,7 @@ def __init__(self, parent, frame):
++ 
++         s3 = wx.BoxSizer(wx.HORIZONTAL)
++         self._caption_size = wx.SpinCtrl(self, ID_CaptionSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE),
++-                                         wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
+++                                         wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
++         s3.Add((1, 1), 1, wx.EXPAND)
++         s3.Add(wx.StaticText(self, -1, "Caption Size:"))
++         s3.Add(self._caption_size)
++@@ -807,9 +807,9 @@ def LightColour(self, colour, percent):
++ 
++         # We take the percent way of the colour from colour -> white
++         i = percent
++-        r = colour.Red() + ((i*rd*100)/high)/100
++-        g = colour.Green() + ((i*gd*100)/high)/100
++-        b = colour.Blue() + ((i*bd*100)/high)/100
+++        r = colour.Red() + ((i*rd*100)//high)//100
+++        g = colour.Green() + ((i*gd*100)//high)//100
+++        b = colour.Blue() + ((i*bd*100)//high)//100
++ 
++         return wx.Colour(r, g, b)
++ 
++@@ -826,10 +826,10 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++         x, y, width, height = clientRect
++         x, width = self._pos, interval
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2)
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2)
++         topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-        rc1 = wx.Rect(x, y, width, height/2)
+++        rc1 = wx.Rect(int(x), y, int(width), height//2)
++         path1 = self.GetPath(gc, rc1, 8)
++         br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++         gc.SetBrush(br1)
++@@ -845,14 +845,14 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++ 
++         bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-        rc3 = wx.Rect(x, y+height/2, width, height/2)
+++        rc3 = wx.Rect(int(x), y+height//2, int(width), height//2)
++         path3 = self.GetPath(gc, rc3, 8)
++         br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++         gc.SetBrush(br3)
++         gc.FillPath(path3) #draw main
++ 
++         path4 = gc.CreatePath()
++-        path4.AddRectangle(x, y+height/2, width, 8)
+++        path4.AddRectangle(x, y+height//2, width, 8)
++         path4.CloseSubpath()
++         gc.SetBrush(br3)
++         gc.FillPath(path4)
++@@ -2613,7 +2613,7 @@ def CreateNotebook(self):
++         flex.Add(wx.TextCtrl(panel, -1, "", wx.DefaultPosition, wx.Size(100, -1)),
++                  1, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add(wx.StaticText(panel, -1, "wxSpinCtrl:"), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++-        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.Size(100, -1),
+++        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.DefaultSize,
++                              wx.SP_ARROW_KEYS, 5, 50, 5), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add((5, 5))
++         flex.Add((5, 5))
++diff --git a/demo/agw/MacLargeDemo.py b/demo/agw/MacLargeDemo.py
++index 4d967a546..a5b8a0e25 100644
++--- a/demo/agw/MacLargeDemo.py
+++++ b/demo/agw/MacLargeDemo.py
++@@ -223,12 +223,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = int((w * percent)/100)
++ 
++         if w < 1:
++             return
++diff --git a/demo/agw/PeakMeter.py b/demo/agw/PeakMeter.py
++index a7c9a6f51..e9dab7116 100644
++--- a/demo/agw/PeakMeter.py
+++++ b/demo/agw/PeakMeter.py
++@@ -149,10 +149,10 @@ def OnFalloff(self, event):
++ 
++     def OnStart(self, event):
++ 
++-        self.timer.Start(1000/2)        # 2 fps
+++        self.timer.Start(1000//2)        # 2 fps
++ 
++-        self.vertPeak.Start(1000/18)        # 18 fps
++-        self.horzPeak.Start(1000/20)        # 20 fps
+++        self.vertPeak.Start(1000//18)        # 18 fps
+++        self.horzPeak.Start(1000//20)        # 20 fps
++ 
++ 
++     def OnStop(self, event):
++diff --git a/demo/agw/PersistentControls.py b/demo/agw/PersistentControls.py
++index f19cc4a91..cf97dd9f0 100644
++--- a/demo/agw/PersistentControls.py
+++++ b/demo/agw/PersistentControls.py
++@@ -234,7 +234,7 @@ def BuildPanes(self):
++         sizer_1.Add(label_1, 0, wx.ALL, 5)
++         sizer_1.Add(combo, 0, wx.LEFT|wx.RIGHT, 5)
++         sizer_1.Add((20, 20), 1)
++-        box2.Add(sizer_1, 1, wx.EXPAND|wx.ALIGN_CENTER, 0)
+++        box2.Add(sizer_1, 1, wx.EXPAND, 0)
++         box2.Add((0, 0), 1, 1)
++ 
++         otherPanel.SetSizer(box2)
++diff --git a/demo/agw/RibbonBar.py b/demo/agw/RibbonBar.py
++index 7103e9d81..d28a2c66a 100644
++--- a/demo/agw/RibbonBar.py
+++++ b/demo/agw/RibbonBar.py
++@@ -799,7 +799,7 @@ def AddColourToGallery(self, gallery, colour, dc, value=None):
++                                        (c.Blue() + 192) % 256)
++ 
++             dc.SetTextForeground(foreground)
++-            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) / 2, (iHeight - size.GetHeight()) / 2)
+++            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) // 2, (iHeight - size.GetHeight()) // 2)
++             dc.SelectObjectAsSource(wx.NullBitmap)
++ 
++             item = gallery.Append(bitmap, wx.ID_ANY)
++diff --git a/demo/agw/SpeedMeter.py b/demo/agw/SpeedMeter.py
++index 9f0fdebb2..575e84a80 100644
++--- a/demo/agw/SpeedMeter.py
+++++ b/demo/agw/SpeedMeter.py
++@@ -418,7 +418,7 @@ def __init__(self, parent, log):
++         bsizer3 = wx.BoxSizer(wx.VERTICAL)
++ 
++         hsizer3 = wx.BoxSizer(wx.HORIZONTAL)
++-        sc = wx.SpinCtrl(panel3, -1, size=(60,20))
+++        sc = wx.SpinCtrl(panel3, -1)
++         sc.SetRange(1, 250)
++         sc.SetValue(50)
++ 
++diff --git a/demo/agw/SuperToolTip.py b/demo/agw/SuperToolTip.py
++index 5e65f06b1..88728e54e 100644
++--- a/demo/agw/SuperToolTip.py
+++++ b/demo/agw/SuperToolTip.py
++@@ -43,7 +43,7 @@ def __init__(self, parent):
++         self.topColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.WHITE)
++         system = wx.SystemSettings.GetColour(wx.SYS_COLOUR_ACTIVECAPTION)
++         r, g, b, a = system
++-        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)/2, (255-g)/2, (255-b)/2))
+++        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)//2, (255-g)//2, (255-b)//2))
++         self.bottomColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=system)
++         self.headerCheck = wx.CheckBox(self.mainPanel, -1, "Show Header")
++         self.headerText = wx.TextCtrl(self.mainPanel, -1, "Merge And Center")
++@@ -233,7 +233,6 @@ def DoLayout(self):
++         frameSizer.Add(self.mainPanel, 1, wx.EXPAND, 0)
++         self.SetSizer(frameSizer)
++         frameSizer.Layout()
++-        frameSizer.Fit(self)
++         self.Layout()
++ 
++         wx.CallAfter(mainSizer.Layout)
++diff --git a/demo/agw/UltimateReportDemo.py b/demo/agw/UltimateReportDemo.py
++index 40f49cb8f..ad455847b 100644
++--- a/demo/agw/UltimateReportDemo.py
+++++ b/demo/agw/UltimateReportDemo.py
++@@ -216,7 +216,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         mdc.SetFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
++         text = "%d Mb"%self.progressValue
++         textWidth, dummy = mdc.GetTextExtent(text)
++-        mdc.DrawText(text, rect.width/2 - textWidth/2, rect.height/2 - dummy/2)
+++        mdc.DrawText(text, rect.width//2 - textWidth//2, rect.height//2 - dummy//2)
++         dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
++         dc.Blit(rect.x+3, rect.y, rect.width-6, rect.height, mdc, 0, 0)
++         dc.DestroyClippingRegion()
++@@ -279,12 +279,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = (w * percent)//100
++ 
++         if middle == 0: # not started
++             bitmap = self.REMAINING_BITMAP.GetSubBitmap((1, 0, w, PIPE_HEIGHT))
++@@ -335,7 +335,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         colours = [wx.RED, wx.WHITE, wx.GREEN, wx.Colour("SKY BLUE")]
++         w, h = dc.GetTextExtent("Hg")
++         x = rect.x + 1
++-        y = rect.y + rect.height/2 - h/2
+++        y = rect.y + rect.height//2 - h//2
++ 
++         for ch in self.text:
++             dc.SetTextForeground(random.choice(colours))
++diff --git a/demo/agw/Windows7Explorer_Contents.py b/demo/agw/Windows7Explorer_Contents.py
++index f754d7879..b23df0e1a 100644
++--- a/demo/agw/Windows7Explorer_Contents.py
+++++ b/demo/agw/Windows7Explorer_Contents.py
++@@ -127,13 +127,13 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         """Draw a custom progress bar using double buffering to prevent flicker"""
++ 
++         bmpWidth, bmpHeight = self.icon.GetWidth(), self.icon.GetHeight()
++-        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)/2)
+++        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)//2)
++ 
++         dc.SetFont(self.normalFont)
++ 
++         textWidth, textHeight = dc.GetTextExtent(self.text)
++         dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
++-        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.description:
++             return
++@@ -144,10 +144,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Type: " + self.description)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++@@ -207,10 +207,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Date modified: " + date)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.size:
++             return
++@@ -218,10 +218,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         dummy1, dummy2= dc.GetTextExtent("Size: ")
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++diff --git a/demo/agw/ZoomBar.py b/demo/agw/ZoomBar.py
++index 376ce349b..14b0278e7 100644
++--- a/demo/agw/ZoomBar.py
+++++ b/demo/agw/ZoomBar.py
++@@ -55,7 +55,7 @@ def __init__(self, parent, log):
++         reflections = glob.glob(bitmapDir + "/*96Flip40.png")
++ 
++         separatorImage = bitmapDir + "/separator.gif"
++-        separatorReflection = bitmapDir + "/separatorFlip.png"
+++        separatorReflection = bitmapDir + "/separatorflip.png"
++         count = 0
++ 
++         for std, ref in zip(standard, reflections):
++diff --git a/wx/lib/agw/advancedsplash.py b/wx/lib/agw/advancedsplash.py
++index 1f8c32df5..d351ea06e 100644
++--- a/wx/lib/agw/advancedsplash.py
+++++ b/wx/lib/agw/advancedsplash.py
++@@ -438,7 +438,7 @@ def SetTextFont(self, font=None):
++ 
++         if font is None:
++             self._textfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._textsize = 10.0
+++            self._textsize = 10
++             self._textfont.SetPointSize(self._textsize)
++         else:
++             self._textfont = font
++diff --git a/wx/lib/agw/aui/auibook.py b/wx/lib/agw/aui/auibook.py
++index ba7cf4721..f5ad2a568 100644
++--- a/wx/lib/agw/aui/auibook.py
+++++ b/wx/lib/agw/aui/auibook.py
++@@ -3452,8 +3452,8 @@ def CalculateNewSplitSize(self):
++         # should happen around the middle
++         if tab_ctrl_count < 2:
++             new_split_size = self.GetClientSize()
++-            new_split_size.x /= 2
++-            new_split_size.y /= 2
+++            new_split_size.x //= 2
+++            new_split_size.y //= 2
++ 
++         else:
++ 
++diff --git a/wx/lib/agw/balloontip.py b/wx/lib/agw/balloontip.py
++index b4155d74a..57baca729 100644
++--- a/wx/lib/agw/balloontip.py
+++++ b/wx/lib/agw/balloontip.py
++@@ -615,7 +615,7 @@ def SetStartDelay(self, delay=1):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Creation Should Be Greater Than 1 ms")
++ 
++-        self._startdelaytime = float(delay)
+++        self._startdelaytime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -640,7 +640,7 @@ def SetEndDelay(self, delay=1e6):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Destruction Should Be Greater Than 1 ms")
++ 
++-        self._enddelaytime = float(delay)
+++        self._enddelaytime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/flatmenu.py b/wx/lib/agw/flatmenu.py
++index 5ba28e584..85f295b86 100644
++--- a/wx/lib/agw/flatmenu.py
+++++ b/wx/lib/agw/flatmenu.py
++@@ -736,8 +736,8 @@ def DrawSeparator(self, dc, xCoord, yCoord, textX, sepWidth):
++         """
++ 
++         dcsaver = DCSaver(dc)
++-        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth/2, 1)
++-        sepRect2 = wx.Rect(xCoord + textX + sepWidth/2, yCoord + 1, sepWidth/2-1, 1)
+++        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth//2, 1)
+++        sepRect2 = wx.Rect(xCoord + textX + sepWidth//2, yCoord + 1, sepWidth//2-1, 1)
++ 
++         artMgr = ArtManager.Get()
++         backColour = artMgr.GetMenuFaceColour()
++@@ -817,11 +817,11 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             imgWidth  = bmp.GetWidth()
++ 
++             if imageMarginX == 0:
++-                xx = rect.x + (leftMarginWidth - imgWidth)/2
+++                xx = rect.x + (leftMarginWidth - imgWidth)//2
++             else:
++-                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)/2 + rect.height
+++                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)//2 + rect.height
++ 
++-            yy = rect.y + (rect.height - imgHeight)/2
+++            yy = rect.y + (rect.height - imgHeight)//2
++             dc.DrawBitmap(bmp, xx, yy, True)
++ 
++         if item.GetKind() == wx.ITEM_CHECK:
++@@ -837,7 +837,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         if item.GetKind() == wx.ITEM_RADIO:
++ 
++@@ -852,7 +852,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         # Draw text - without accelerators
++         text = item.GetLabel()
++@@ -890,7 +890,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 w3, dummy = dc.GetTextExtent(text3)
++ 
++                 posx = xCoord + textX + borderXSize
++-                posy = (itemHeight - h)/2 + yCoord
+++                posy = (itemHeight - h)//2 + yCoord
++ 
++                 # Draw first part
++                 dc.DrawText(text1, posx, posy)
++@@ -912,7 +912,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             else:
++ 
++                 w, h = dc.GetTextExtent(text)
++-                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)/2 + yCoord)
+++                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)//2 + yCoord)
++ 
++ 
++         # Now draw accelerator
++@@ -920,7 +920,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++         if item.GetAccelString():
++ 
++             accelWidth, accelHeight = dc.GetTextExtent(item.GetAccelString())
++-            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)/2 + yCoord)
+++            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)//2 + yCoord)
++ 
++         # Check if this item has sub-menu - if it does, draw
++         # right arrow on the right margin
++@@ -932,7 +932,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++ 
++             xx = xCoord + rightMarginX + borderXSize
++             rr = wx.Rect(xx, rect.y + 1, rect.height-2, rect.height-2)
++-            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)/2, True)
+++            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)//2, True)
++ 
++ 
++     def DrawMenuBarButton(self, dc, rect, state):
++@@ -1142,7 +1142,7 @@ def DrawMenuBar(self, menubar, dc):
++             # Get the menu item rect
++             textWidth, textHeight = dc.GetTextExtent(fixedText)
++             #rect = wx.Rect(posx+menubar._spacer/2, posy, textWidth, textHeight)
++-            rect = wx.Rect(posx+padding/2, posy, textWidth, textHeight)
+++            rect = wx.Rect(posx+padding//2, posy, textWidth, textHeight)
++ 
++             # Can we draw more??
++             # the +DROP_DOWN_ARROW_WIDTH  is the width of the drop down arrow
++@@ -1172,7 +1172,7 @@ def DrawMenuBar(self, menubar, dc):
++                 dc.SetTextForeground(textColour)
++ 
++             ww, hh = dc.GetTextExtent(labelOnly)
++-            textOffset = (rect.width - ww) / 2
+++            textOffset = (rect.width - ww) // 2
++ 
++             if not menubar._isLCD and item.GetTextBitmap().IsOk() and not selected:
++                 dc.DrawBitmap(item.GetTextBitmap(), rect.x, rect.y, True)
++@@ -1505,8 +1505,8 @@ def DrawButtonColour(self, dc, rect, state, colour):
++         baseColour = colour
++ 
++         # Define the middle points
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, rect.y + (rect.height // 2))
+++        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height // 2))
++ 
++         # Define the top region
++         top = wx.Rect((rect.GetLeft(), rect.GetTop()), rightPt)
++@@ -1572,11 +1572,11 @@ def DrawMenuBarBackground(self, dc, rect):
++ 
++         factor = artMgr.GetMenuBgFactor()
++ 
++-        leftPt1 = wx.Point(rect.x, rect.y + (rect.height / factor))
++-        leftPt2 = wx.Point(rect.x, rect.y + (rect.height / factor)*(factor-1))
+++        leftPt1 = wx.Point(rect.x, rect.y + (rect.height // factor))
+++        leftPt2 = wx.Point(rect.x, rect.y + (rect.height // factor)*(factor-1))
++ 
++-        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor))
++-        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor)*(factor-1))
+++        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor))
+++        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor)*(factor-1))
++ 
++         # Define the top region
++         topReg = [wx.Point() for ii in range(7)]
++@@ -2707,7 +2707,7 @@ def DrawToolbar(self, dc, rect):
++             elif tbItem.IsCustomControl():
++                 control = tbItem.GetCustomControl()
++                 ctrlSize = control.GetSize()
++-                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)/2)
+++                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)//2)
++                 if control.GetPosition() != ctrlPos:
++                     control.SetPosition(ctrlPos)
++ 
++@@ -2727,9 +2727,9 @@ def DrawToolbar(self, dc, rect):
++             # Draw the toolbar image
++             if bmp.IsOk():
++ 
++-                x = xx - self._toolbarSpacer/2
+++                x = xx - self._toolbarSpacer//2
++                 #y = rect.y + (rect.height - bmp.GetHeight())/2 - 1
++-                y = rect.y + self._toolbarMargin/2
+++                y = rect.y + self._toolbarMargin//2
++ 
++                 buttonRect = wx.Rect(x, y, highlight_width, highlight_height)
++ 
++@@ -2745,8 +2745,8 @@ def DrawToolbar(self, dc, rect):
++                     else:
++                         self._tbButtons[i]._state = ControlNormal
++ 
++-                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())/2
++-                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())/2
+++                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())//2
+++                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())//2
++ 
++                 if self._tbButtons[i]._state == ControlFocus and not self._tbButtons[i]._tbItem.IsSelected():
++ 
++@@ -2827,8 +2827,8 @@ def DrawMoreButton(self, dc, state):
++         dropArrowBmp = self.GetRenderer()._bitmaps["arrow_down"]
++ 
++         # Calc the image coordinates
++-        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())/2
+++        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())//2
++ 
++         dc.DrawBitmap(dropArrowBmp, xx, yy + self._spacer, True)
++         self._dropDownButtonState = state
++@@ -3269,8 +3269,8 @@ def DrawToolbarItem(self, dc, idx, state):
++ 
++         # draw the bitmap over the highlight
++         buttonRect = wx.Rect(*rect)
++-        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())/2
++-        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())/2
+++        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())//2
+++        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())//2
++ 
++         if state == ControlFocus:
++ 
++@@ -3784,7 +3784,7 @@ def PositionAUI(self, mgr, fixToolbar=True):
++         pn.Name("flat_menu_bar")
++         pn.Caption("Menu Bar")
++         pn.Top()
++-        pn.MinSize(wx.Size(xx/2, self._barHeight))
+++        pn.MinSize(wx.Size(xx//2, self._barHeight))
++         pn.LeftDockable(False)
++         pn.RightDockable(False)
++         pn.ToolbarPane()
++@@ -3997,8 +3997,8 @@ def Draw(self, dc):
++         """
++ 
++         rect = wx.Rect(self._pos, self._size)
++-        xx = rect.x + (rect.width - self._normalBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - self._normalBmp.GetHeight())/2
+++        xx = rect.x + (rect.width - self._normalBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - self._normalBmp.GetHeight())//2
++ 
++         self._parent.GetRenderer().DrawScrollButton(dc, rect, self._state)
++         dc.DrawBitmap(self._normalBmp, xx, yy, True)
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index f5e5200b2..561749b89 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -858,9 +858,9 @@ def PaintStraightGradientBox(dc, rect, startColour, endColour, vertical=True):
++ 
++     for i in range(high+1):
++ 
++-        r = startColour.Red() + ((i*rd*100)/high)/100
++-        g = startColour.Green() + ((i*gd*100)/high)/100
++-        b = startColour.Blue() + ((i*bd*100)/high)/100
+++        r = startColour.Red() + ((i*rd*100)//high)//100
+++        g = startColour.Green() + ((i*gd*100)//high)//100
+++        b = startColour.Blue() + ((i*bd*100)//high)//100
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++@@ -2631,9 +2631,9 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         imageYCoord = (pc.HasAGWFlag(FNB_BOTTOM) and [6] or [8])[0]
++ 
++         if hasImage:
++-            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints/2
+++            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints//2
++         else:
++-            textOffset = pc._pParent._nPadding + shapePoints/2
+++            textOffset = pc._pParent._nPadding + shapePoints//2
++ 
++         textOffset += 2
++ 
++diff --git a/wx/lib/agw/floatspin.py b/wx/lib/agw/floatspin.py
++index bdbaf85ec..4559eb5de 100644
++--- a/wx/lib/agw/floatspin.py
+++++ b/wx/lib/agw/floatspin.py
++@@ -336,7 +336,7 @@ class FloatSpin(wx.Control):
++     """
++ 
++     def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++-                 size=(95,-1), style=0, value=0.0, min_val=None, max_val=None,
+++                 size=wx.DefaultSize, style=0, value=0.0, min_val=None, max_val=None,
++                  increment=1.0, digits=-1, agwStyle=FS_LEFT,
++                  name="FloatSpin"):
++         """
++diff --git a/wx/lib/agw/gradientbutton.py b/wx/lib/agw/gradientbutton.py
++index c4633b296..58625c508 100644
++--- a/wx/lib/agw/gradientbutton.py
+++++ b/wx/lib/agw/gradientbutton.py
++@@ -412,14 +412,14 @@ def OnPaint(self, event):
++ 
++         x, y, width, height = clientRect
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2 + ((capture==self and [1] or [0])[0]))
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2 + ((capture==self and [1] or [0])[0]))
++         if capture != self:
++             if self._mouseAction == HOVER:
++                 topStart, topEnd = self.LightColour(self._topStartColour, 10), self.LightColour(self._topEndColour, 10)
++             else:
++                 topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-            rc1 = wx.Rect(x, y, width, height/2)
+++            rc1 = wx.Rect(x, y, width, height//2)
++             path1 = self.GetPath(gc, rc1, 8)
++             br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++             gc.SetBrush(br1)
++@@ -448,7 +448,7 @@ def OnPaint(self, event):
++             else:
++                 bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-            rc3 = wx.Rect(x, y+height/2, width, height/2)
+++            rc3 = wx.Rect(x, y+height//2, width, height//2)
++             path3 = self.GetPath(gc, rc3, 8)
++             br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++             gc.SetBrush(br3)
++@@ -463,7 +463,7 @@ def OnPaint(self, event):
++             shadowOffset = 0
++         else:
++ 
++-            rc2 = wx.Rect(x+1, gradientRect.height/2, gradientRect.width, gradientRect.height)
+++            rc2 = wx.Rect(x+1, gradientRect.height//2, gradientRect.width, gradientRect.height)
++             path2 = self.GetPath(gc, rc2, 8)
++             gc.SetPen(wx.Pen(self._pressedBottomColour))
++             gc.SetBrush(wx.Brush(self._pressedBottomColour))
++diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py
++index 12302f3b0..377ac0121 100644
++--- a/wx/lib/agw/hypertreelist.py
+++++ b/wx/lib/agw/hypertreelist.py
++@@ -3437,7 +3437,7 @@ def PaintLevel(self, item, dc, level, y, x_maincol):
++ 
++             if not self.HasAGWFlag(wx.TR_NO_LINES) and children:
++                 last_child = children[-1]
++-                Y1 = last_child.GetY() + last_child.GetHeight() / 2
+++                Y1 = last_child.GetY() + last_child.GetHeight() // 2
++                 dc.DrawLine(x, oldY, x, Y1)
++ 
++         return y, x_maincol
++diff --git a/wx/lib/agw/knobctrl.py b/wx/lib/agw/knobctrl.py
++index 742097b09..1e5045ff6 100644
++--- a/wx/lib/agw/knobctrl.py
+++++ b/wx/lib/agw/knobctrl.py
++@@ -325,7 +325,7 @@ def OnSize(self,event):
++         memory.Clear()
++ 
++         minradius = min(0.9*self.Width/2.0, 0.9*self.Height/2.0)
++-        memory.DrawCircle(self.Width//2, self.Height//2, minradius)
+++        memory.DrawCircle(self.Width//2, self.Height//2, int(minradius))
++         memory.SelectObject(wx.NullBitmap)
++         self._region = wx.Region(self._Buffer, self.GetBackgroundColour())
++         self._minradius = minradius
++@@ -645,8 +645,8 @@ def DrawTags(self, dc, size):
++             dxi = math.cos(angle)*((width - xshift + tagLen - 6)/2.0 - tagLen)
++             dyi = math.sin(angle)*((height - yshift + tagLen - 6)/2.0 - tagLen)
++ 
++-            dc.DrawLine(width//2 - sxi, height//2 - syi,
++-                        width//2 - dxi, height//2 - dyi)
+++            dc.DrawLine(int(width//2 - sxi), int(height//2 - syi),
+++                        int(width//2 - dxi), int(height//2 - dyi))
++ 
++ 
++     def DrawDiagonalGradient(self, dc, size):
++@@ -759,8 +759,8 @@ def DrawInsetCircle(self, dc, pencolour):
++         p1 = wx.Pen(self.OffsetColour(pencolour, -70), 2)
++         p2 = wx.Pen(self.OffsetColour(pencolour, 10), 1)
++ 
++-        pt1 = wx.Point(cx-r*math.sqrt(2)/2.0, cy+r*math.sqrt(2)/2.0)
++-        pt2 = wx.Point(cx+r*math.sqrt(2)/2.0, cy-r*math.sqrt(2)/2.0)
+++        pt1 = wx.Point(int(cx-r*math.sqrt(2)/2.0), int(cy+r*math.sqrt(2)/2.0))
+++        pt2 = wx.Point(int(cx+r*math.sqrt(2)/2.0), int(cy-r*math.sqrt(2)/2.0))
++ 
++         dc.SetPen(p2)
++         dc.DrawArc(pt1, pt2, (cx, cy))
++@@ -779,7 +779,7 @@ def DrawBoundingCircle(self, dc, size):
++         radius = 0.9*min(size.x, size.y)/2.0
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++         dc.SetPen(wx.Pen(self._boundingcolour))
++-        dc.DrawCircle(self.Width//2, self.Height//2, radius)
+++        dc.DrawCircle(self.Width//2, self.Height//2, int(radius))
++ 
++ 
++     def CircleCoords(self, radius, angle, centerX, centerY):
++diff --git a/wx/lib/agw/labelbook.py b/wx/lib/agw/labelbook.py
++index b716df3a2..f8c9cd54d 100644
++--- a/wx/lib/agw/labelbook.py
+++++ b/wx/lib/agw/labelbook.py
++@@ -1376,13 +1376,13 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    imgXcoord = self._nImgSize / 2
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize / 2] or [pos + imgTopPadding])[0]
+++                    imgXcoord = self._nImgSize // 2
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize // 2] or [pos + imgTopPadding])[0]
++ 
++                 else:
++ 
++-                    imgXcoord = pos + (rectWidth / 2) - (self._nImgSize / 2)
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize / 2] or [imgTopPadding])[0]
+++                    imgXcoord = pos + (rectWidth // 2) - (self._nImgSize // 2)
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize // 2] or [imgTopPadding])[0]
++ 
++                 self._ImageList.Draw(self._pagesInfoVec[i].GetImageIndex(), dc,
++                                      imgXcoord, imgYcoord,
++@@ -1408,15 +1408,15 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    textOffsetX = ((rectWidth - textWidth) / 2 )
+++                    textOffsetX = ((rectWidth - textWidth) // 2 )
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT  and [pos + self._nImgSize  + imgTopPadding + 3] or \
++-                                       [pos + ((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [pos + ((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 else:
++ 
++-                    textOffsetX = (rectWidth - textWidth) / 2  + pos + nTextPaddingLeft
+++                    textOffsetX = (rectWidth - textWidth) // 2  + pos + nTextPaddingLeft
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT and [self._nImgSize + imgTopPadding + 3] or \
++-                                       [((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
++                 dc.DrawText(fixedText, textOffsetX, textOffsetY)
++@@ -1591,8 +1591,8 @@ def OnPaint(self, event):
++             # Draw gradient in the background area
++             startColour = self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR]
++             endColour   = ArtManager.Get().LightColour(self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR], 50)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x / 2, size.y), startColour, endColour, False)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x / 2, 0, size.x / 2, size.y), endColour, startColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x // 2, size.y), startColour, endColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x // 2, 0, size.x // 2, size.y), endColour, startColour, False)
++ 
++         else:
++ 
++@@ -1638,7 +1638,7 @@ def OnPaint(self, event):
++ 
++             if self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++                 font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-                font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++                font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++                 if self.GetParent().GetFontBold():
++                     font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -1954,7 +1954,7 @@ def DrawWebHover(self, dc, caption, xCoord, yCoord, selected):
++ 
++         # Redraw the text with underlined font
++         underLinedFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        underLinedFont.SetPointSize(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        underLinedFont.SetPointSize(int(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++         if self.GetParent().GetFontBold():
++             underLinedFont.SetWeight(wx.FONTWEIGHT_BOLD)
++         elif self.HasAGWFlag(INB_BOLD_TAB_SELECTION) and selected:
++@@ -2050,7 +2050,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++         imgRect = wx.Rect(*rect)
++ 
++         font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++         if self.GetParent().GetFontBold():
++             font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -2069,7 +2069,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++         # Text bounding rectangle
++         textRect.x += nPadding
++-        textRect.y = rect.y + (rect.height - h)/2
+++        textRect.y = rect.y + (rect.height - h)//2
++         textRect.width = rect.width - 2 * nPadding
++ 
++         if bmp.IsOk() and not self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++@@ -2086,7 +2086,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++             imgRect.x += nPadding
++             imgRect.width = bmp.GetWidth()
++-            imgRect.y = rect.y + (rect.height - bmp.GetHeight())/2
+++            imgRect.y = rect.y + (rect.height - bmp.GetHeight())//2
++             imgRect.height = bmp.GetHeight()
++ 
++         # Draw bounding rectangle
++@@ -2496,7 +2496,7 @@ def ResizeTabArea(self):
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(1, 1))
++             font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-            font.SetPointSize(font.GetPointSize()*self._fontSizeMultiple)
+++            font.SetPointSize(int(font.GetPointSize()*self._fontSizeMultiple))
++             if self.GetFontBold() or agwStyle & INB_BOLD_TAB_SELECTION:
++                 font.SetWeight(wx.FONTWEIGHT_BOLD)
++             dc.SetFont(font)
++diff --git a/wx/lib/agw/peakmeter.py b/wx/lib/agw/peakmeter.py
++index 055dbef81..a5f88a9d5 100644
++--- a/wx/lib/agw/peakmeter.py
+++++ b/wx/lib/agw/peakmeter.py
++@@ -784,7 +784,7 @@ def DrawHorzBand(self, dc, rect):
++                 maxWidth = size.x*horzBands
++                 points = [wx.Point() for i in range(2)]
++                 points[0].y = rectPrev.GetTopRight().y - yDecal
++-                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth/self._maxValue
+++                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth//self._maxValue
++                 points[1].y = rectPrev.GetBottomLeft().y + yDecal
++                 points[1].x = points[0].x
++                 dc.SetPen(pen)
++diff --git a/wx/lib/agw/pygauge.py b/wx/lib/agw/pygauge.py
++index bab459a3a..b8654436a 100644
++--- a/wx/lib/agw/pygauge.py
+++++ b/wx/lib/agw/pygauge.py
++@@ -344,7 +344,7 @@ def OnPaint(self, event):
++                 c1,c2 = gradient
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.GradientFillLinear(r, c1, c2, wx.EAST)
++         else:
++             for i, colour in enumerate(self._barColourSorted):
++@@ -352,7 +352,7 @@ def OnPaint(self, event):
++                 dc.SetPen(wx.Pen(colour))
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.DrawRectangle(r)
++ 
++ 
++diff --git a/wx/lib/agw/ribbon/art_aui.py b/wx/lib/agw/ribbon/art_aui.py
++index a1d255843..31fedf487 100644
++--- a/wx/lib/agw/ribbon/art_aui.py
+++++ b/wx/lib/agw/ribbon/art_aui.py
++@@ -390,7 +390,7 @@ def DrawTab(self, dc, wnd, tab):
++             grad_rect = wx.Rect(*tab.rect)
++             grad_rect.height -= 4
++             grad_rect.width -= 1
++-            grad_rect.height /= 2
+++            grad_rect.height //= 2
++             grad_rect.y = grad_rect.y + tab.rect.height - grad_rect.height - 1
++             dc.SetBrush(self._tab_active_top_background_brush)
++             dc.DrawRectangle(tab.rect.x, tab.rect.y + 3, tab.rect.width - 1, grad_rect.y - tab.rect.y - 3)
++@@ -401,7 +401,7 @@ def DrawTab(self, dc, wnd, tab):
++             btm_rect = wx.Rect(*tab.rect)
++             btm_rect.height -= 4
++             btm_rect.width -= 1
++-            btm_rect.height /= 2
+++            btm_rect.height //= 2
++             btm_rect.y = btm_rect.y + tab.rect.height - btm_rect.height - 1
++             dc.SetBrush(self._tab_hover_background_brush)
++             dc.DrawRectangle(btm_rect.x, btm_rect.y, btm_rect.width, btm_rect.height)
++@@ -434,8 +434,8 @@ def DrawTab(self, dc, wnd, tab):
++             icon = tab.page.GetIcon()
++             if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++                 if icon.IsOk():
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
++-                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
+++                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -450,7 +450,7 @@ def DrawTab(self, dc, wnd, tab):
++                     offset += icon.GetWidth() + 2
++ 
++                 text_width, text_height = dc.GetTextExtent(label)
++-                x = (tab.rect.width - 2 - text_width - offset) / 2
+++                x = (tab.rect.width - 2 - text_width - offset) // 2
++                 if x > 8:
++                     x = 8
++                 elif x < 1:
++@@ -458,7 +458,7 @@ def DrawTab(self, dc, wnd, tab):
++ 
++                 width = tab.rect.width - x - 2
++                 x += tab.rect.x + offset
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if icon.IsOk():
++                     dc.DrawBitmap(icon, x - offset, tab.rect.y + (tab.rect.height - icon.GetHeight()) / 2, True)
++@@ -892,8 +892,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def DrawPartialPanelBackground(self, dc, wnd, rect):
++@@ -1024,7 +1024,7 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++             dc.DrawRectangle(reduced_rect.x, reduced_rect.y, reduced_rect.width, reduced_rect.height)
++             btn_bitmap = bitmaps[3]
++ 
++-        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width / 2 - 2, (rect.y + rect.height / 2) - 2, True)
+++        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width // 2 - 2, (rect.y + rect.height // 2) - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1277,7 +1277,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++             if is_split_hybrid:
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++-            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height / 2) - 2, True)
+++            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++diff --git a/wx/lib/agw/ribbon/art_internal.py b/wx/lib/agw/ribbon/art_internal.py
++index 4a8dc7ce0..78e8f3fe4 100644
++--- a/wx/lib/agw/ribbon/art_internal.py
+++++ b/wx/lib/agw/ribbon/art_internal.py
++@@ -32,9 +32,9 @@ def RibbonInterpolateColour(start_colour, end_colour, position, start_position,
++     r = end_colour.Red() - start_colour.Red()
++     g = end_colour.Green() - start_colour.Green()
++     b = end_colour.Blue() - start_colour.Blue()
++-    r = start_colour.Red()   + (((r * position * 100) / end_position) / 100)
++-    g = start_colour.Green() + (((g * position * 100) / end_position) / 100)
++-    b = start_colour.Blue()  + (((b * position * 100) / end_position) / 100)
+++    r = start_colour.Red()   + (((r * position * 100) // end_position) // 100)
+++    g = start_colour.Green() + (((g * position * 100) // end_position) // 100)
+++    b = start_colour.Blue()  + (((b * position * 100) // end_position) // 100)
++ 
++     return wx.Colour(r, g, b)
++ 
++@@ -61,9 +61,9 @@ def RibbonDrawParallelGradientLines(dc, nlines, line_origins, stepx, stepy, nums
++     bd = end_colour.Blue() - start_colour.Blue()
++ 
++     for step in range(numsteps):
++-        r = start_colour.Red() + (((step*rd*100)/numsteps)/100)
++-        g = start_colour.Green() + (((step*gd*100)/numsteps)/100)
++-        b = start_colour.Blue() + (((step*bd*100)/numsteps)/100)
+++        r = start_colour.Red() + (((step*rd*100)//numsteps)//100)
+++        g = start_colour.Green() + (((step*gd*100)//numsteps)//100)
+++        b = start_colour.Blue() + (((step*bd*100)//numsteps)//100)
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++diff --git a/wx/lib/agw/ribbon/art_msw.py b/wx/lib/agw/ribbon/art_msw.py
++index e7317d59b..00c3dfe2b 100644
++--- a/wx/lib/agw/ribbon/art_msw.py
+++++ b/wx/lib/agw/ribbon/art_msw.py
++@@ -982,7 +982,7 @@ def DrawTab(self, dc, wnd, tab):
++                 background.width -= 4
++                 background.height -= 3
++                 h = background.height
++-                background.height /= 2
+++                background.height //= 2
++                 dc.GradientFillLinear(background, self._tab_hover_background_top_colour,
++                                       self._tab_hover_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1024,9 +1024,9 @@ def DrawTab(self, dc, wnd, tab):
++             if icon.IsOk():
++                 x = tab.rect.x + 4
++                 if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
++ 
++-                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -1043,13 +1043,13 @@ def DrawTab(self, dc, wnd, tab):
++                     x += 3 + tab.page.GetIcon().GetWidth()
++                     width -= 3 + tab.page.GetIcon().GetWidth()
++ 
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if width <= text_width:
++                     dc.SetClippingRegion(x, tab.rect.y, width, tab.rect.height)
++                     dc.DrawText(label, x, y)
++                 else:
++-                    dc.DrawText(label, x + (width - text_width) / 2 + 1, y)
+++                    dc.DrawText(label, x + (width - text_width) // 2 + 1, y)
++ 
++ 
++     def DrawTabSeparator(self, dc, wnd, rect, visibility):
++@@ -1093,7 +1093,7 @@ def ReallyDrawTabSeparator(self, wnd, rect, visibility):
++         dc = wx.MemoryDC(self._cached_tab_separator)
++         self.DrawTabCtrlBackground(dc, wnd, rect)
++ 
++-        x = rect.x + rect.width / 2
+++        x = rect.x + rect.width // 2
++         h = float(rect.height - 1)
++ 
++         r1 = self._tab_ctrl_background_brush.GetColour().Red() * (1.0 - visibility) + 0.5
++@@ -1146,7 +1146,7 @@ def DrawPartialPageBackground1(self, dc, wnd, rect, page, offset, hovered=False)
++ 
++         # upper_rect, lower_rect, paint_rect are all in page co-ordinates
++         upper_rect = wx.Rect(*background)
++-        upper_rect.height /= 5
+++        upper_rect.height //= 5
++ 
++         lower_rect = wx.Rect(*background)
++         lower_rect.y += upper_rect.height
++@@ -1229,7 +1229,7 @@ def DrawPageBackground(self, dc, wnd, rect):
++         background.width -= 4
++         background.height -= 2
++ 
++-        background.height /= 5
+++        background.height //= 5
++         dc.GradientFillLinear(background, self._page_background_top_colour,
++                               self._page_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1493,10 +1493,10 @@ def DrawPanelBackground(self, dc, wnd, rect):
++ 
++         if clip_label:
++             clip = wx.DCClipper(dc, label_rect)
++-            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++         else:
++-            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) / 2,
++-                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) // 2,
+++                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++ 
++         if has_ext_button:
++             if wnd.IsExtButtonHovered():
++@@ -1577,7 +1577,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x, rect.y + rect.height - 15, rect.x + rect.width, rect.y + rect.height - 15)
++ 
++-            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width / 3, 15)
+++            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width // 3, 15)
++             down_btn = wx.Rect(up_btn.GetRight() + 1, up_btn.GetTop(), up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetLeft(), down_btn.GetBottom())
++             ext_btn = wx.Rect(down_btn.GetRight() + 1, up_btn.GetTop(), rect.width - up_btn.GetWidth() - down_btn.GetWidth() - 1, up_btn.GetHeight())
++@@ -1587,7 +1587,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x + rect.width - 15, rect.y, rect.x + rect.width - 15, rect.y + rect.height)
++ 
++-            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height / 3)
+++            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height // 3)
++             down_btn = wx.Rect(up_btn.GetLeft(), up_btn.GetBottom() + 1, up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetRight(), down_btn.GetTop())
++             ext_btn = wx.Rect(up_btn.GetLeft(), down_btn.GetBottom() + 1, up_btn.GetWidth(), rect.height - up_btn.GetHeight() - down_btn.GetHeight() - 1)
++@@ -1633,14 +1633,14 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++ 
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(btn_top_brush)
++-        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height / 2)
+++        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height // 2)
++ 
++         lower = wx.Rect(*rect)
++-        lower.height = (lower.height + 1) / 2
+++        lower.height = (lower.height + 1) // 2
++         lower.y += rect.height - lower.height
++         dc.GradientFillLinear(lower, btn_colour, btn_grad_colour, wx.SOUTH)
++ 
++-        dc.DrawBitmap(btn_bitmap, rect.x + rect.width / 2 - 2, lower.y - 2, True)
+++        dc.DrawBitmap(btn_bitmap, rect.x + rect.width // 2 - 2, lower.y - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1691,7 +1691,7 @@ def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++         upper.x += 1
++         upper.width -= 2
++         upper.y += 1
++-        upper.height /= 3
+++        upper.height //= 3
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(top_brush)
++         dc.DrawRectangle(upper.x, upper.y, upper.width, upper.height)
++@@ -1760,7 +1760,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++             client_rect.x += 1
++             client_rect.width -= 2
++             client_rect.y += 1
++-            client_rect.height = (rect.y + rect.height / 5) - client_rect.x
+++            client_rect.height = (rect.y + rect.height // 5) - client_rect.x
++             dc.GradientFillLinear(client_rect,
++                                   self._panel_active_background_top_colour,
++                                   self._panel_active_background_top_gradient_colour, wx.SOUTH)
++@@ -1785,7 +1785,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.DrawRectangle(preview.x + 1, preview.y + preview.height - 8, preview.width - 2, 7)
++ 
++-        mid_pos = rect.y + rect.height / 5 - preview.y
+++        mid_pos = rect.y + rect.height // 5 - preview.y
++ 
++         if mid_pos < 0 or mid_pos >= preview.height:
++             full_rect = wx.Rect(*preview)
++@@ -1816,8 +1816,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - 7 - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - 7 - bitmap.GetHeight()) // 2, True)
++ 
++         self.DrawPanelBorder(dc, preview, self._panel_border_pen, self._panel_border_gradient_pen)
++         self.DrawPanelBorder(dc, true_rect, self._panel_minimised_border_pen, self._panel_minimised_border_gradient_pen)
++@@ -1829,20 +1829,20 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             preview.x = true_rect.x + 4
++-            preview.y = true_rect.y + (true_rect.height - preview.height) / 2
+++            preview.y = true_rect.y + (true_rect.height - preview.height) // 2
++         else:
++-            preview.x = true_rect.x + (true_rect.width - preview.width) / 2
+++            preview.x = true_rect.x + (true_rect.width - preview.width) // 2
++             preview.y = true_rect.y + 4
++ 
++         dc.SetFont(self._panel_label_font)
++         label_width, label_height = dc.GetTextExtent(wnd.GetLabel())
++ 
++-        xpos = true_rect.x + (true_rect.width - label_width + 1) / 2
+++        xpos = true_rect.x + (true_rect.width - label_width + 1) // 2
++         ypos = preview.y + preview.height + 5
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos = preview.x + preview.width + 5
++-            ypos = true_rect.y + (true_rect.height - label_height) / 2
+++            ypos = true_rect.y + (true_rect.height - label_height) // 2
++ 
++         dc.SetTextForeground(self._panel_minimised_label_colour)
++         dc.DrawText(wnd.GetLabel(), xpos, ypos)
++@@ -1851,12 +1851,12 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos += label_width
++-            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height / 2)
+++            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height // 2)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3,  3)
++             arrow_points[2] = arrow_points[0] + wx.Point(-3, -3)
++         else:
++             ypos += label_height
++-            arrow_points[0] = wx.Point(true_rect.width / 2, ypos + 5)
+++            arrow_points[0] = wx.Point(true_rect.width // 2, ypos + 5)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3, -3)
++             arrow_points[2] = arrow_points[0] + wx.Point( 3, -3)
++ 
++@@ -1967,7 +1967,7 @@ def DrawButtonBarButton(self, dc, wnd, rect, kind, state, label, bitmap_large, b
++             bg_rect.height -= 2
++ 
++             bg_rect_top = wx.Rect(*bg_rect)
++-            bg_rect_top.height /= 3
+++            bg_rect_top.height //= 3
++             bg_rect.y += bg_rect_top.height
++             bg_rect.height -= bg_rect_top.height
++ 
++@@ -2043,7 +2043,7 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         if result == RIBBON_BUTTONBAR_BUTTON_LARGE:
++ 
++             padding = 2
++-            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) / 2,
+++            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) // 2,
++                           rect.y + padding, True)
++             ypos = rect.y + padding + bitmap_large.GetHeight() + padding
++             arrow_width = (kind == RIBBON_BUTTON_NORMAL and [0] or [8])[0]
++@@ -2052,10 +2052,10 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++ 
++             if label_w + 2 * padding <= rect.width:
++ 
++-                dc.DrawText(label, rect.x + (rect.width - label_w) / 2, ypos)
+++                dc.DrawText(label, rect.x + (rect.width - label_w) // 2, ypos)
++                 if arrow_width != 0:
++-                    self.DrawDropdownArrow(dc, rect.x + rect.width / 2,
++-                                           ypos + (label_h * 3) / 2,
+++                    self.DrawDropdownArrow(dc, rect.x + rect.width // 2,
+++                                           ypos + (label_h * 3) // 2,
++                                            self._button_bar_label_colour)
++             else:
++                 breaki = len(label)
++@@ -2067,17 +2067,17 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++                         label_w, label_h = dc.GetTextExtent(label_top)
++ 
++                         if label_w + 2 * padding <= rect.width:
++-                            dc.DrawText(label_top, rect.x + (rect.width - label_w) / 2, ypos)
+++                            dc.DrawText(label_top, rect.x + (rect.width - label_w) // 2, ypos)
++                             ypos += label_h
++                             label_bottom = label[breaki:]
++                             label_w, label_h = dc.GetTextExtent(label_bottom)
++                             label_w += arrow_width
++-                            iX = rect.x + (rect.width - label_w) / 2
+++                            iX = rect.x + (rect.width - label_w) // 2
++                             dc.DrawText(label_bottom, iX, ypos)
++ 
++                             if arrow_width != 0:
++                                 self.DrawDropdownArrow(dc, iX + 2 +label_w - arrow_width,
++-                                                       ypos + label_h / 2 + 1,
+++                                                       ypos + label_h // 2 + 1,
++                                                        self._button_bar_label_colour)
++ 
++                             break
++@@ -2085,14 +2085,14 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         elif result == RIBBON_BUTTONBAR_BUTTON_MEDIUM:
++ 
++             x_cursor = rect.x + 2
++-            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())/2, True)
+++            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())//2, True)
++             x_cursor += bitmap_small.GetWidth() + 2
++             label_w, label_h = dc.GetTextExtent(label)
++-            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) / 2)
+++            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) // 2)
++             x_cursor += label_w + 3
++ 
++             if kind != RIBBON_BUTTON_NORMAL:
++-                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2,
+++                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height // 2,
++                                        self._button_bar_label_colour)
++ 
++         else:
++@@ -2184,7 +2184,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++ 
++         # Background
++         bg_rect_top = wx.Rect(*bg_rect)
++-        bg_rect_top.height = (bg_rect_top.height * 2) / 5
+++        bg_rect_top.height = (bg_rect_top.height * 2) // 5
++         bg_rect_btm = wx.Rect(*bg_rect)
++         bg_rect_btm.y += bg_rect_top.height
++         bg_rect_btm.height -= bg_rect_top.height
++@@ -2244,10 +2244,10 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++             dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
++-                          bg_rect.y + (bg_rect.height / 2) - 2, True)
+++                          bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2,
++-                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2,
+++                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def GetBarTabWidth(self, dc, wnd, label, bitmap, ideal=None, small_begin_need_separator=None,
++@@ -2474,7 +2474,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.y = size.GetHeight() - 15
++             scroll_up.height = 15
++             scroll_up.x = 0
++-            scroll_up.width = (size.GetWidth() + 2) / 3
+++            scroll_up.width = (size.GetWidth() + 2) // 3
++             scroll_down.y = scroll_up.y
++             scroll_down.height = scroll_up.height
++             scroll_down.x = scroll_up.x + scroll_up.width
++@@ -2491,7 +2491,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.x = size.GetWidth() - 15
++             scroll_up.width = 15
++             scroll_up.y = 0
++-            scroll_up.height = (size.GetHeight() + 2) / 3
+++            scroll_up.height = (size.GetHeight() + 2) // 3
++             scroll_down.x = scroll_up.x
++             scroll_down.width = scroll_up.width
++             scroll_down.y = scroll_up.y + scroll_up.height
++diff --git a/wx/lib/agw/ribbon/bar.py b/wx/lib/agw/ribbon/bar.py
++index ae8b6a19c..b0d28776d 100644
++--- a/wx/lib/agw/ribbon/bar.py
+++++ b/wx/lib/agw/ribbon/bar.py
++@@ -743,7 +743,7 @@ def RecalculateTabSizes(self):
++                     delta = info.ideal_width - info.small_must_have_separator_width
++                     info.rect.x = x
++                     info.rect.y = y
++-                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)/total_delta
+++                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)//total_delta
++                     info.rect.height = self._tab_height
++ 
++                     x += info.rect.width + tabsep
++@@ -797,7 +797,7 @@ def RecalculateTabSizes(self):
++                         delta = smallest_tab_width - info.minimum_width
++                         info.rect.x = x
++                         info.rect.y = y
++-                        info.rect.width = info.minimum_width + delta*(width - total_small_width)/total_delta
+++                        info.rect.width = info.minimum_width + delta*(width - total_small_width)//total_delta
++                         info.rect.height = self._tab_height
++ 
++                         x += info.rect.width + tabsep
++diff --git a/wx/lib/agw/ribbon/buttonbar.py b/wx/lib/agw/ribbon/buttonbar.py
++index 25ee49a82..4690f483d 100644
++--- a/wx/lib/agw/ribbon/buttonbar.py
+++++ b/wx/lib/agw/ribbon/buttonbar.py
++@@ -354,7 +354,7 @@ def InsertButton(self, pos, button_id, label, bitmap, bitmap_small=wx.NullBitmap
++                 self._bitmap_size_large = bitmap.GetSize()
++                 if not bitmap_small.IsOk():
++                     w, h = self._bitmap_size_large
++-                    self._bitmap_size_small = wx.Size(0.5*w, 0.5*h)
+++                    self._bitmap_size_small = wx.Size(w//2, h//2)
++ 
++             if bitmap_small.IsOk():
++ 
++@@ -867,8 +867,8 @@ def OnSize(self, event):
++ 
++             layout_size = self._layouts[layout_i].overall_size
++             if layout_size.x <= new_size.x and layout_size.y <= new_size.y:
++-                self._layout_offset.x = (new_size.x - layout_size.x)/2
++-                self._layout_offset.y = (new_size.y - layout_size.y)/2
+++                self._layout_offset.x = (new_size.x - layout_size.x)//2
+++                self._layout_offset.y = (new_size.y - layout_size.y)//2
++                 self._current_layout = layout_i
++                 break
++ 
++diff --git a/wx/lib/agw/ribbon/gallery.py b/wx/lib/agw/ribbon/gallery.py
++index b830fab7d..b86528865 100644
++--- a/wx/lib/agw/ribbon/gallery.py
+++++ b/wx/lib/agw/ribbon/gallery.py
++@@ -805,8 +805,8 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         if client.GetWidth() < 0 or client.GetHeight() < 0:
++             return relative_to
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++@@ -849,8 +849,8 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         elif direction == wx.BOTH:
++             client.IncBy(self._bitmap_padded_size)
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++diff --git a/wx/lib/agw/ribbon/panel.py b/wx/lib/agw/ribbon/panel.py
++index 79fd9bc58..901c765b6 100644
++--- a/wx/lib/agw/ribbon/panel.py
+++++ b/wx/lib/agw/ribbon/panel.py
++@@ -584,12 +584,12 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         minimum = wx.Size(*self.GetMinSize())
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 4) / 5
+++            current.x = (current.x * 4) // 5
++             if current.x < minimum.x:
++                 current.x = minimum.x
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 4) / 5
+++            current.y = (current.y * 4) // 5
++             if current.y < minimum.y:
++                 current.y = minimum.y
++ 
++@@ -668,10 +668,10 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         current = wx.Size(*relative_to)
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 5 + 3) / 4
+++            current.x = (current.x * 5 + 3) // 4
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 5 + 3) / 4
+++            current.y = (current.y * 5 + 3) // 4
++ 
++         return current
++ 
++@@ -1076,25 +1076,25 @@ def GetExpandedPosition(self, panel, expanded_size, direction):
++         pos = wx.Point()
++ 
++         if direction == wx.NORTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetY() - expanded_size.GetHeight()
++             primary_x = True
++             secondary_y = 1
++ 
++         elif direction == wx.EAST:
++             pos.x = panel.GetRight()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = -1
++ 
++         elif direction == wx.SOUTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetBottom()
++             primary_x = True
++             secondary_y = -1
++ 
++         else:
++             pos.x = panel.GetX() - expanded_size.GetWidth()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = 1
++ 
++         expanded = wx.Rect(pos, expanded_size)
++diff --git a/wx/lib/agw/ribbon/toolbar.py b/wx/lib/agw/ribbon/toolbar.py
++index 1771c6506..8c6f8b522 100644
++--- a/wx/lib/agw/ribbon/toolbar.py
+++++ b/wx/lib/agw/ribbon/toolbar.py
++@@ -1159,7 +1159,7 @@ def OnSize(self, event):
++ 
++         # Set group y positions
++         for group in self._groups:
++-            group.position.y = rowypos[group.position.y]
+++            group.position.y = int(rowypos[group.position.y])
++ 
++ 
++     def GetBestSizeForParentSize(self, parentSize):
++diff --git a/wx/lib/agw/shapedbutton.py b/wx/lib/agw/shapedbutton.py
++index f015d4e39..49523366a 100644
++--- a/wx/lib/agw/shapedbutton.py
+++++ b/wx/lib/agw/shapedbutton.py
++@@ -569,9 +569,9 @@ def DrawMainButton(self, dc, width, height):
++                 rect2 = w*main//secondary
++ 
++             if self._isup:
++-                img = self._mainbuttonup.Scale(rect2, rect3)
+++                img = self._mainbuttonup.Scale(int(rect2), int(rect3))
++             else:
++-                img = self._mainbuttondown.Scale(rect2, rect3)
+++                img = self._mainbuttondown.Scale(int(rect2), int(rect3))
++ 
++         bmp = img.ConvertToBitmap()
++ 
++@@ -599,7 +599,7 @@ def DrawMainButton(self, dc, width, height):
++                     ypos = 0
++ 
++         # Draw Finally The Bitmap
++-        dc.DrawBitmap(bmp, xpos, ypos, True)
+++        dc.DrawBitmap(bmp, int(xpos), int(ypos), True)
++ 
++         # Store Bitmap Position And Size To Draw An Elliptical Focus Indicator
++         self._xpos = xpos
++@@ -646,7 +646,7 @@ def DrawLabel(self, dc, width, height, dw=0, dh=0):
++             xp = xc - (tw//2)* cos(angle) - (th//2)*sin(angle)
++             yp = yc + (tw//2)*sin(angle) - (th//2)*cos(angle)
++ 
++-            dc.DrawRotatedText(label, xp + dw, yp + dh , angle*180/pi)
+++            dc.DrawRotatedText(label, int(xp + dw), int(yp + dh), angle*180/pi)
++ 
++ 
++     def DrawFocusIndicator(self, dc, width, height):
++@@ -676,7 +676,7 @@ def DrawFocusIndicator(self, dc, width, height):
++         else:
++             # This Is An Ellipse
++             if hasattr(self, "_xpos"):
++-                dc.DrawEllipse(self._xpos + 2, self._ypos + 2, self._imgx - 4, self._imgy - 4)
+++                dc.DrawEllipse(int(self._xpos + 2), int(self._ypos + 2), self._imgx - 4, self._imgy - 4)
++ 
++         dc.SetLogicalFunction(wx.COPY)
++ 
++diff --git a/wx/lib/agw/speedmeter.py b/wx/lib/agw/speedmeter.py
++index f196b51f2..606901d27 100644
++--- a/wx/lib/agw/speedmeter.py
+++++ b/wx/lib/agw/speedmeter.py
++@@ -580,8 +580,8 @@ def Draw(self, dc):
++         dc.SetBackground(wx.Brush(speedbackground))
++         dc.Clear()
++ 
++-        centerX = self.faceBitmap.GetWidth()/2
++-        centerY = self.faceBitmap.GetHeight()/2
+++        centerX = self.faceBitmap.GetWidth()//2
+++        centerY = self.faceBitmap.GetHeight()//2
++ 
++         self.CenterX = centerX
++         self.CenterY = centerY
++@@ -681,7 +681,7 @@ def Draw(self, dc):
++             # Draw The Filler (Both In "Advance" And "Reverse" Directions)
++ 
++             dc.SetBrush(wx.Brush(fillercolour))
++-            dc.DrawArc(xs2, ys2, xe2, ye2, centerX, centerY)
+++            dc.DrawArc(xs2, ys2, xe2, ye2, int(centerX), int(centerY))
++ 
++             if self._agwStyle & SM_DRAW_SECTORS == 0:
++                 dc.SetBrush(wx.Brush(speedbackground))
++@@ -952,7 +952,7 @@ def Draw(self, dc):
++                     y = y - height/2.0 - height*sin(angis)/2.0
++                     fancytext.RenderToDC(fancystr, dc, x, y)
++                 else:
++-                    dc.DrawText(strings, x, y)
+++                    dc.DrawText(strings, int(x), int(y))
++ 
++             # This Is The Small Rectangle --> Tick Mark
++             rectangle = colourangles[ii] + pi/2.0
++@@ -969,6 +969,7 @@ def Draw(self, dc):
++             y4 = y3 + 3*self.scale*sinrect
++ 
++             points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++            points = [(int(p[0]), int(p[1])) for p in points]
++ 
++             dc.DrawPolygon(points)
++ 
++@@ -1003,6 +1004,7 @@ def Draw(self, dc):
++                         y4 = y3 + self.scale*sinrect
++ 
++                         points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++                        points = [(int(p[0]), int(p[1])) for p in points]
++ 
++                         dc.DrawPolygon(points)
++ 
++@@ -1017,7 +1019,7 @@ def Draw(self, dc):
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++ 
++         if self._drawarc:
++-            dc.SetPen(wx.Pen(self.GetArcColour(), 2.0))
+++            dc.SetPen(wx.Pen(self.GetArcColour(), 2))
++             # If It's Not A Complete Circle, Draw The Connecting Lines And The Arc
++             if abs(abs(startangle - endangle) - 2*pi) > 1.0/180.0:
++                 dc.DrawArc(xstart, ystart, xend, yend, centerX, centerY)
++@@ -1046,7 +1048,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++             dc.SetTextForeground(middlecolour)
++-            dc.DrawText(middletext, newx, newy)
+++            dc.DrawText(middletext, int(newx), int(newy))
++ 
++         # Here We Draw The Icon In The Middle, Near The Start Of The Arrow (If Present)
++         # This Is Like The "Fuel" Icon In The Cars
++@@ -1054,8 +1056,8 @@ def Draw(self, dc):
++ 
++             middleicon = self.GetMiddleIcon()
++             middlewidth, middleheight = self.GetMiddleIconDimens()
++-            middleicon.SetWidth(middlewidth*self.scale)
++-            middleicon.SetHeight(middleheight*self.scale)
+++            middleicon.SetWidth(int(middlewidth*self.scale))
+++            middleicon.SetHeight(int(middleheight*self.scale))
++             middleangle = (startangle + endangle)/2.0
++ 
++             mw = middleicon.GetWidth()
++@@ -1064,7 +1066,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++ 
++-            dc.DrawIcon(middleicon, newx, newy)
+++            dc.DrawIcon(middleicon, int(newx), int(newy))
++ 
++             # Restore Icon Dimension, If Not Something Strange Happens
++             middleicon.SetWidth(middlewidth)
++@@ -1109,53 +1111,61 @@ def Draw(self, dc):
++                 if handstyle == "Arrow":
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++-                    dc.SetPen(wx.Pen(shadowcolour, 5*log(self.scale+1)))
+++                    dc.SetPen(wx.Pen(shadowcolour, int(5*log(self.scale+1))))
++                     dc.SetBrush(wx.Brush(shadowcolour))
++                     shadowdistance = 2.0*self.scale
++-                    dc.DrawLine(newx + shadowdistance, newy + shadowdistance,
++-                                xarr + shadowdistance, yarr + shadowdistance)
++-
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance)])
+++                    dc.DrawLine(int(newx + shadowdistance), int(newy + shadowdistance),
+++                                int(xarr + shadowdistance), int(yarr + shadowdistance))
+++
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++                 else:
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++                     dc.SetBrush(wx.Brush(shadowcolour))
++-                    dc.SetPen(wx.Pen(shadowcolour, 1.0))
+++                    dc.SetPen(wx.Pen(shadowcolour, 1))
++                     shadowdistance = 1.5*self.scale
++ 
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance),
++-                                    (x4+shadowdistance, y4+shadowdistance)])
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance),
+++                              (x4+shadowdistance, y4+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++ 
++             if handstyle == "Arrow":
++ 
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++-                dc.SetPen(wx.Pen(handcolour, 5*log(self.scale+1)))
+++                dc.SetPen(wx.Pen(handcolour, int(5*log(self.scale+1))))
++                 # Draw The "Hand", An Arrow
++-                dc.DrawLine(newx, newy, xarr, yarr)
+++                dc.DrawLine(int(newx), int(newy), int(xarr), int(yarr))
++ 
++                 # Draw The Arrow Pointer
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3)])
+++                points = [(x1, y1), (x2, y2), (x3, y3)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++             else:
++ 
++                 # Draw The Hand Pointer
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3), (x4, y4)])
+++                points = [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++ 
++     def SetIntervals(self, intervals=None):
++@@ -1527,7 +1537,7 @@ def SetMiddleTextFont(self, font=None):
++ 
++         if font is None:
++             self._middletextfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._middletextsize = 10.0
+++            self._middletextsize = 10
++             self._middletextfont.SetPointSize(self._middletextsize)
++         else:
++             self._middletextfont = font
++@@ -1599,7 +1609,7 @@ def CircleCoords(self, radius, angle, centerX, centerY):
++         x = radius*cos(angle) + centerX
++         y = radius*sin(angle) + centerY
++ 
++-        return x, y
+++        return int(x), int(y)
++ 
++ 
++     def GetIntersection(self, current, intervals):
++diff --git a/wx/lib/agw/supertooltip.py b/wx/lib/agw/supertooltip.py
++index a92ce10d1..cd0f0c9f7 100644
++--- a/wx/lib/agw/supertooltip.py
+++++ b/wx/lib/agw/supertooltip.py
++@@ -295,8 +295,8 @@ def OnPaint(self, event):
++ 
++         # Get the user options for header, bitmaps etc...
++         drawHeader, drawFooter = classParent.GetDrawHeaderLine(), classParent.GetDrawFooterLine()
++-        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height/2)
++-        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height/2, frameRect.width, frameRect.height/2+1)
+++        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height//2)
+++        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height//2, frameRect.width, frameRect.height//2+1)
++         # Fill the triple-gradient
++         dc.GradientFillLinear(topRect, topColour, middleColour, wx.SOUTH)
++         dc.GradientFillLinear(bottomRect, middleColour, bottomColour, wx.SOUTH)
++@@ -324,9 +324,9 @@ def OnPaint(self, event):
++         normalText = classParent.GetTextColour()
++         if header:
++             dc.SetTextForeground(normalText)
++-            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)/2)
+++            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)//2)
++         if headerBmp and headerBmp.IsOk():
++-            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)/2, True)
+++            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)//2, True)
++ 
++         if header or (headerBmp and headerBmp.IsOk()):
++             yPos += height
++@@ -376,7 +376,7 @@ def OnPaint(self, event):
++                 messageHeight += textHeight
++ 
++                 xText = (bmpWidth + 2 * self._spacing) if bmpWidth > 0 else self._spacing
++-                yText += textHeight/2+self._spacing
+++                yText += textHeight//2+self._spacing
++                 maxWidth = max(xText + textWidth + self._spacing, maxWidth)
++                 dc.DrawText(line, xText, yText)
++                 if isLink:
++@@ -412,8 +412,8 @@ def OnPaint(self, event):
++             if drawFooter:
++                 # Draw the separator line before the footer
++                 dc.SetPen(wx.GREY_PEN)
++-                dc.DrawLine(self._spacing, yPos-self._spacing/2+toAdd,
++-                            width-self._spacing, yPos-self._spacing/2+toAdd)
+++                dc.DrawLine(self._spacing, yPos-self._spacing//2+toAdd,
+++                            width-self._spacing, yPos-self._spacing//2+toAdd)
++         # Draw the footer and footer bitmap (if any)
++         dc.SetTextForeground(normalText)
++         height = max(textHeight, bmpHeight)
++@@ -424,7 +424,7 @@ def OnPaint(self, event):
++             maxWidth = max(bmpXPos + bmpWidth + (self._spacing*2) + textWidth, maxWidth)
++         if footerBmp and footerBmp.IsOk():
++             toAdd = (height - bmpHeight + self._spacing) / 2
++-            dc.DrawBitmap(footerBmp, bmpXPos, yPos + toAdd, True)
+++            dc.DrawBitmap(footerBmp, bmpXPos, int(yPos + toAdd), True)
++             maxWidth = max(footerBmp.GetSize().GetWidth() + bmpXPos, maxWidth)
++ 
++         maxHeight = yPos + height + toAdd
++@@ -815,7 +815,7 @@ def SetStartDelay(self, delay=1):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._startDelayTime = float(delay)
+++        self._startDelayTime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -831,7 +831,7 @@ def SetEndDelay(self, delay=1e6):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._endDelayTime = float(delay)
+++        self._endDelayTime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/toasterbox.py b/wx/lib/agw/toasterbox.py
++index b73429dd2..8efb5869b 100644
++--- a/wx/lib/agw/toasterbox.py
+++++ b/wx/lib/agw/toasterbox.py
++@@ -1316,11 +1316,11 @@ def _getTextCoords(self, dc):
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++             fh += h + textPadding
++-        y = (th - fh) / 2; coords = []
+++        y = (th - fh) // 2; coords = []
++ 
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++-            x = (tw - w) / 2
+++            x = (tw - w) // 2
++             coords.append((x, y))
++             y += h + textPadding
++ 
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index 14fc41f86..caa5e5cf4 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -914,7 +914,7 @@ def Draw(self, index, dc, x, y, flags, solidBackground=True):
++             raise Exception("Wrong index in image list")
++ 
++         bmp = self._images[index]
++-        dc.DrawBitmap(bmp, x, y, (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
+++        dc.DrawBitmap(bmp, x, int(y), (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
++ 
++         return True
++ 
++@@ -4022,7 +4022,7 @@ def SetPosition(self, x, y, spacing):
++ 
++             if item.HasImage():
++ 
++-                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)/2
+++                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)//2
++                 self._gi._rectIcon.y = self._gi._rectAll.y + 4
++ 
++             if item.HasText():
++@@ -4030,7 +4030,7 @@ def SetPosition(self, x, y, spacing):
++                 if self._gi._rectLabel.width > spacing:
++                     self._gi._rectLabel.x = self._gi._rectAll.x + 2
++                 else:
++-                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing/2) - (self._gi._rectLabel.width/2)
+++                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing//2) - (self._gi._rectLabel.width//2)
++ 
++                 self._gi._rectLabel.y = self._gi._rectAll.y + self._gi._rectAll.height + 2 - self._gi._rectLabel.height
++                 self._gi._rectHighlight.x = self._gi._rectLabel.x - 2
++@@ -4546,7 +4546,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 checked = item.IsChecked()
++-                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)/2, item.GetKind(), checked, enabled)
+++                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)//2, item.GetKind(), checked, enabled)
++                 xOld += ix
++                 width -= ix
++ 
++@@ -4557,7 +4557,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 for img in images:
++ 
++                     ix, iy = self._owner.GetImageSize([img])
++-                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)/2, enabled)
+++                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)//2, enabled)
++ 
++                     xOld += ix
++                     width -= ix
++@@ -5230,7 +5230,7 @@ def OnPaint(self, event):
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 # We draw it on the left, always
++-                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)/2, kind, checked, enabled)
+++                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)//2, kind, checked, enabled)
++                 wcheck += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++                 cw -= ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++ 
++@@ -6819,7 +6819,7 @@ def HitTestLine(self, line, x, y):
++                     # We got a checkbox-type item
++                     ix, iy = self.GetCheckboxImageSize()
++                     LH = self.GetLineHeight(line)
++-                    rect = wx.Rect(xOld, lineY + LH/2 - iy/2, ix, iy)
+++                    rect = wx.Rect(xOld, lineY + LH//2 - iy//2, ix, iy)
++                     if rect.Contains((x, y)):
++                         newItem = self.GetParent().GetItem(line, col)
++                         return newItem, ULC_HITTEST_ONITEMCHECK
++@@ -7937,13 +7937,13 @@ def MoveToItem(self, item):
++                     while start_y > view_y:
++                         start_y -= SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, start_y/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, start_y//SCROLL_UNIT_Y)
++ 
++                 if start_y + height > view_y + client_h:
++                     while start_y + height < view_y + client_h:
++                         start_y += SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)//SCROLL_UNIT_Y)
++ 
++         else: # !report
++ 
++@@ -7960,7 +7960,7 @@ def MoveToItem(self, item):
++             if rect.y + rect.height - 5 > view_y + client_h:
++                 sy = (rect.y + rect.height - client_h + hLine)/hLine
++ 
++-            self.Scroll(sx, sy)
+++            self.Scroll(int(sx), int(sy))
++ 
++ 
++ # ----------------------------------------------------------------------------
++diff --git a/wx/lib/agw/xlsgrid.py b/wx/lib/agw/xlsgrid.py
++index b505aebb4..17267fabc 100644
++--- a/wx/lib/agw/xlsgrid.py
+++++ b/wx/lib/agw/xlsgrid.py
++@@ -965,7 +965,7 @@ def Draw(self, dc, rect):
++             xp = xc - (text_width/2)*xshift - (text_height/2)*yshift
++             yp = yc + (text_width/2)*yshift - (text_height/2)*xshift
++ 
++-            dc.DrawRotatedText(value, xp, yp, self.rotation)
+++            dc.DrawRotatedText(value, int(xp), int(yp), self.rotation)
++ 
++         else:
++ 
++@@ -1125,7 +1125,7 @@ def Draw(self, dc, rect):
++             if font.escapement == 1:
++                 ypos = ypos - maxH + height
++ 
++-            dc.DrawText(chunk, start, ypos)
+++            dc.DrawText(chunk, start, int(ypos))
++             start += width
++ 
++ 
++diff --git a/wx/lib/agw/zoombar.py b/wx/lib/agw/zoombar.py
++index 1e6ec5da3..8c2afd058 100644
++--- a/wx/lib/agw/zoombar.py
+++++ b/wx/lib/agw/zoombar.py
++@@ -463,7 +463,7 @@ def SetSize(self, width, height):
++     def GetPosition(self):
++         """ Returns the button position. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -601,7 +601,7 @@ def __init__(self, bitmap=None):
++     def GetPosition(self):
++         """ Returns the position of :class:`wx.ImageBar`, as a :class:`wx.Point`. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -660,7 +660,7 @@ def SetBarColour(self, colour, xSize=None, ySize=None):
++         if xSize is not None:
++             self._size = wx.Size(xSize, ySize)
++ 
++-        bitmap.Rescale(self._size.width, self._size.height/2)
+++        bitmap.Rescale(self._size.width, self._size.height//2)
++ 
++         r1, g1, b1 = self._startColour.Red(), self._startColour.Green(), self._startColour.Blue()
++         r2, g2, b2 = colour.Red(), colour.Green(), colour.Blue()
++@@ -1065,7 +1065,7 @@ def ResetSize(self):
++             ySize += yextent
++ 
++         if self._showReflections:
++-            ySize += self._buttonSize/2
+++            ySize += self._buttonSize//2
++         if self._centerZoom:
++             ySize += self._buttonSize
++ 
++@@ -1240,7 +1240,7 @@ def DrawLabels(self, dc):
++             textWidth, textHeight = dc.GetTextExtent(label)
++             buttonPos = button.GetPosition()
++             buttonSize = button.GetSize()
++-            xpos = buttonPos.x + (buttonSize.width - textWidth)/2
+++            xpos = buttonPos.x + (buttonSize.width - textWidth)//2
++             ypos = buttonPos.y - textHeight - 2
++ 
++             dc.DrawRectangle(xpos-2, ypos-1, textWidth+4, textHeight+2)
++diff --git a/wx/lib/analogclock/analogclock.py b/wx/lib/analogclock/analogclock.py
++index 7c4b18979..1ee1d6742 100644
++--- a/wx/lib/analogclock/analogclock.py
+++++ b/wx/lib/analogclock/analogclock.py
++@@ -173,7 +173,7 @@ def _recalcCoords(self, size):
++         scale = min([float(size.width) / self.basesize.width,
++                      float(size.height) / self.basesize.height])
++ 
++-        centre = wx.Point(size.width / 2., size.height / 2.)
+++        centre = wx.Point(size.width // 2, size.height // 2)
++ 
++         self.Box.RecalcCoords(size, centre, scale)
++         self.Hands.RecalcCoords(size, centre, scale)
++diff --git a/wx/lib/analogclock/helpers.py b/wx/lib/analogclock/helpers.py
++index 88d198bee..9674de912 100644
++--- a/wx/lib/analogclock/helpers.py
+++++ b/wx/lib/analogclock/helpers.py
++@@ -37,7 +37,7 @@ def __init__(self, idx=0, pos=None, size=None, offset=0, clocksize=None,
++ 
++ 
++     def _pol2rect(self, m, t):
++-        return m * math.cos(math.radians(t)), m * math.sin(math.radians(t))
+++        return int(m * math.cos(math.radians(t))), int(m * math.sin(math.radians(t)))
++ 
++ 
++     def _rect2pol(self, x, y):
++@@ -174,7 +174,7 @@ def __init__(self, **kwargs):
++ 
++     def Draw(self, dc):
++         self.dyer.Select(dc)
++-        dc.DrawCircle(self.pos.x, self.pos.y, self.radius)
+++        dc.DrawCircle(self.pos.x, self.pos.y, int(self.radius))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -205,7 +205,7 @@ def Draw(self, dc, end, offset=0):
++             m, t = self._rect2pol(x, y)
++             polygon[i] = self._pol2rect(m, t - angle)
++ 
++-        dc.DrawPolygon(polygon, centre.x + offset, centre.y + offset)
+++        dc.DrawPolygon(polygon, int(centre.x + offset), int(centre.y + offset))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -226,7 +226,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawRectangle(x + offset, y + offset, width, height)
+++        dc.DrawRectangle(int(x + offset), int(y + offset), int(width), int(height))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -242,7 +242,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x
++         y = self.pos.y
++ 
++-        dc.DrawCircle(x + offset, y + offset, radius)
+++        dc.DrawCircle(int(x + offset), int(y + offset), int(radius))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -273,7 +273,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -290,7 +290,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -309,7 +309,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawText(self.text, x + offset, y + offset)
+++        dc.DrawText(self.text, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -321,7 +321,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawRotatedText(self.text, x + offset, y + offset, angle)
+++        dc.DrawRotatedText(self.text, int(x + offset), int(y + offset), int(angle))
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -656,7 +656,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++ 
++         # Try to find a 'good' max size for text-based ticks.
++         if a_tick.text is not None:
++-            self.font.SetPointSize(size)
+++            self.font.SetPointSize(int(size))
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(*clocksize.Get()))
++             dc.SetFont(self.font)
++@@ -686,7 +686,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++             x = centre.x + radius * math.sin(angle)
++             y = centre.y + radius * math.cos(angle)
++ 
++-            tick.SetPosition(wx.Point(x, y))
+++            tick.SetPosition(wx.Point(int(x), int(y)))
++ 
++ 
++     def GetSize(self):
++diff --git a/wx/lib/analogclock/setup.py b/wx/lib/analogclock/setup.py
++index a83c8639d..a7dffb901 100644
++--- a/wx/lib/analogclock/setup.py
+++++ b/wx/lib/analogclock/setup.py
++@@ -179,7 +179,7 @@ def __init__(self, parent, title, group="Hands"):
++         p.SetCustomColours(self.customcolours)
++         sizer.Add(p, pos=(0, 1), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.bw = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.bw = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(0, 2), span=(1, 2), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -193,7 +193,7 @@ def __init__(self, parent, title, group="Hands"):
++         p = self.ls = wx.StaticText(self, label="Size:")
++         sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.sz = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.sz = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -212,7 +212,7 @@ def __init__(self, parent, title, group="Ticks"):
++         p = wx.StaticText(self, label="Offset:")
++         sizer.Add(p, pos=(3, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.of = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.of = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(3, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++diff --git a/wx/lib/buttons.py b/wx/lib/buttons.py
++index 46d1b8747..f01a54d41 100644
++--- a/wx/lib/buttons.py
+++++ b/wx/lib/buttons.py
++@@ -453,7 +453,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         tw, th = dc.GetTextExtent(label)
++         if not self.up:
++             dx = dy = self.labelDelta
++-        dc.DrawText(label, (width-tw)/2+dx, (height-th)/2+dy)
+++        dc.DrawText(label, (width-tw)//2+dx, (height-th)//2+dy)
++ 
++ 
++     def DrawFocusIndicator(self, dc, w, h):
++@@ -844,7 +844,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++         hasMask = bmp.GetMask() != None
++-        dc.DrawBitmap(bmp, (width-bw)/2+dx, (height-bh)/2+dy, hasMask)
+++        dc.DrawBitmap(bmp, (width-bw)//2+dx, (height-bh)//2+dy, hasMask)
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -926,12 +926,12 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++ 
++-        pos_x = (width-bw-tw)/2+dx      # adjust for bitmap and text to centre
+++        pos_x = (width-bw-tw)//2+dx      # adjust for bitmap and text to centre
++         if bmp is not None:
++-            dc.DrawBitmap(bmp, pos_x, (height-bh)/2+dy, hasMask) # draw bitmap if available
+++            dc.DrawBitmap(bmp, pos_x, (height-bh)//2+dy, hasMask) # draw bitmap if available
++             pos_x = pos_x + 2   # extra spacing from bitmap
++ 
++-        dc.DrawText(label, pos_x + dx+bw, (height-th)/2+dy)      # draw the text
+++        dc.DrawText(label, pos_x + dx+bw, (height-th)//2+dy)      # draw the text
++ 
++ 
++ #----------------------------------------------------------------------
++diff --git a/wx/lib/colourchooser/pycolourchooser.py b/wx/lib/colourchooser/pycolourchooser.py
++index 61dbc02d2..124376483 100644
++--- a/wx/lib/colourchooser/pycolourchooser.py
+++++ b/wx/lib/colourchooser/pycolourchooser.py
++@@ -188,7 +188,7 @@ def __init__(self, parent, id):
++         self.colour_slider.Bind(wx.EVT_MOTION, self.onSliderMotion)
++         self.slider = wx.Slider(
++                         self, self.idSCROLL, 86, 0, self.colour_slider.HEIGHT - 1,
++-                        style=wx.SL_VERTICAL, size=(15, self.colour_slider.HEIGHT)
+++                        style=wx.SL_VERTICAL, size=(-1, self.colour_slider.HEIGHT)
++                         )
++ 
++         self.Bind(wx.EVT_COMMAND_SCROLL, self.onScroll, self.slider)
++@@ -338,7 +338,7 @@ def setSliderToV(self, v):
++         min = self.slider.GetMin()
++         max = self.slider.GetMax()
++         val = (1 - v) * max
++-        self.slider.SetValue(val)
+++        self.slider.SetValue(int(val))
++ 
++     def getVFromSlider(self):
++         """Get the current value of "V" from the v slider."""
++diff --git a/wx/lib/colourchooser/pypalette.py b/wx/lib/colourchooser/pypalette.py
++index ff1fb840c..71b9fc2df 100644
++--- a/wx/lib/colourchooser/pypalette.py
+++++ b/wx/lib/colourchooser/pypalette.py
++@@ -165,7 +165,7 @@ def DrawBuffer(self):
++             colour = wx.Colour(0, 0, 0)
++             self.buffer.SetPen(wx.Pen(colour, 1, wx.PENSTYLE_SOLID))
++             self.buffer.SetBrush(wx.Brush(colour, wx.BRUSHSTYLE_TRANSPARENT))
++-            self.buffer.DrawCircle(self.point[0], self.point[1], 3)
+++            self.buffer.DrawCircle(int(self.point[0]), int(self.point[1]), 3)
++ 
++     def HighlightPoint(self, x, y):
++         """Highlights an area of the palette with a little circle around
++diff --git a/wx/lib/floatcanvas/FCObjects.py b/wx/lib/floatcanvas/FCObjects.py
++index 58becd38c..cdf8cc53e 100644
++--- a/wx/lib/floatcanvas/FCObjects.py
+++++ b/wx/lib/floatcanvas/FCObjects.py
++@@ -296,7 +296,7 @@ def SetPen(self, LineColor, LineStyle, LineWidth):
++         else:
++             self.Pen = self.PenList.setdefault(
++                 (LineColor, LineStyle, LineWidth),
++-                wx.Pen(LineColor, LineWidth, self.LineStyleList[LineStyle]))
+++                wx.Pen(LineColor, int(LineWidth), self.LineStyleList[LineStyle]))
++ 
++     def SetHitBrush(self, HitColor):
++         """
++@@ -1202,14 +1202,14 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++             x = xc - Size/2.0
++             y = yc - Size/2.0
++             dc.SetBrush(self.Brush)
++-            dc.DrawRectangle(x, y, Size, Size)
+++            dc.DrawRectangle(int(x), int(y), Size, Size)
++         if HTdc and self.HitAble:
++             HTdc.SetPen(self.HitPen)
++             if self.Size <= 1:
++                 HTdc.DrawPoint(xc, xc)
++             else:
++                 HTdc.SetBrush(self.HitBrush)
++-                HTdc.DrawRectangle(x, y, Size, Size)
+++                HTdc.DrawRectangle(int(x), int(y), Size, Size)
++ 
++ class RectEllipse(XYObjectMixin, LineAndFillMixin, DrawObject):
++     """A RectEllipse draw object."""
++@@ -2161,7 +2161,7 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++         W = H * (self.bmpWidth / self.bmpHeight)
++         if (self.ScaledBitmap is None) or (H != self.ScaledHeight) :
++             self.ScaledHeight = H
++-            Img = self.Image.Scale(W, H)
+++            Img = self.Image.Scale(int(W), int(H))
++             self.ScaledBitmap = wx.Bitmap(Img)
++ 
++         XY = self.ShiftFun(XY[0], XY[1], W, H)
++diff --git a/wx/lib/gizmos/ledctrl.py b/wx/lib/gizmos/ledctrl.py
++index f185d5105..7f4d3fcf9 100644
++--- a/wx/lib/gizmos/ledctrl.py
+++++ b/wx/lib/gizmos/ledctrl.py
++@@ -293,7 +293,7 @@ def _drawDigit(self, dc, digit, column):
++ 
++         if digit & c.COLON:
++             dc.SetBrush(wx.Brush(lineColor))
++-            centerX = XPos + (self.m_lineLength + self.m_digitMargin) / 2
++-            radius = self.m_lineWidth / 2
++-            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) / 2, radius)
++-            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 / 4, radius)
+++            centerX = XPos + (self.m_lineLength + self.m_digitMargin) // 2
+++            radius = self.m_lineWidth // 2
+++            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) // 2, radius)
+++            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 // 4, radius)
++diff --git a/wx/lib/imagebrowser.py b/wx/lib/imagebrowser.py
++index 795e90dca..8e14727e7 100644
++--- a/wx/lib/imagebrowser.py
+++++ b/wx/lib/imagebrowser.py
++@@ -347,8 +347,8 @@ def DrawImage(self, dc):
++         owidth = int(scale*iwidth)
++         oheight = int(scale*iheight)
++ 
++-        diffx = (wwidth - owidth)/2   # center calc
++-        diffy = (wheight - oheight)/2   # center calc
+++        diffx = (wwidth - owidth)//2   # center calc
+++        diffy = (wheight - oheight)//2   # center calc
++ 
++         if not bmp:
++             if owidth!=iwidth or oheight!=iheight:
++diff --git a/wx/lib/ogl/basic.py b/wx/lib/ogl/basic.py
++index b08859ab9..0107f21fc 100644
++--- a/wx/lib/ogl/basic.py
+++++ b/wx/lib/ogl/basic.py
++@@ -1051,7 +1051,7 @@ def OnEraseContents(self, dc):
++         dc.SetPen(self.GetBackgroundPen())
++         dc.SetBrush(self.GetBackgroundBrush())
++ 
++-        dc.DrawRectangle(topLeftX - penWidth, topLeftY - penWidth, maxX + penWidth * 2 + 4, maxY + penWidth * 2 + 4)
+++        dc.DrawRectangle(int(topLeftX - penWidth), int(topLeftY - penWidth), int(maxX + penWidth * 2 + 4), int(maxY + penWidth * 2 + 4))
++ 
++     def EraseLinks(self, dc, attachment = -1, recurse = False):
++         """
++@@ -2769,9 +2769,9 @@ def OnDraw(self, dc):
++             dc.SetBrush(self._brush)
++ 
++         if self._cornerRadius:
++-            dc.DrawRoundedRectangle(x1, y1, self._width, self._height, self._cornerRadius)
+++            dc.DrawRoundedRectangle(int(x1), int(y1), self._width, self._height, self._cornerRadius)
++         else:
++-            dc.DrawRectangle(x1, y1, self._width, self._height)
+++            dc.DrawRectangle(int(x1), int(y1), self._width, self._height)
++ 
++     def GetBoundingBoxMin(self):
++         """Get the bounding box minimum."""
++@@ -2882,7 +2882,7 @@ def Create(self, the_points = None):
++             # Duplicate the list of points
++             self._points = []
++             for point in the_points:
++-                new_point = wx.Point(point[0], point[1])
+++                new_point = wx.Point(int(point[0]), int(point[1]))
++                 self._points.append(new_point)
++             self.CalculateBoundingBox()
++             self._originalWidth = self._boundWidth
++@@ -3444,7 +3444,7 @@ def OnDraw(self, dc):
++                 dc.SetPen(self._pen)
++         if self._brush:
++             dc.SetBrush(self._brush)
++-        dc.DrawEllipse(self._xpos - self.GetWidth() / 2.0, self._ypos - self.GetHeight() / 2.0, self.GetWidth(), self.GetHeight())
+++        dc.DrawEllipse(int(self._xpos - self.GetWidth() / 2.0), int(self._ypos - self.GetHeight() / 2.0), self.GetWidth(), self.GetHeight())
++ 
++     def SetSize(self, x, y, recursive = True):
++         """
++diff --git a/wx/lib/ogl/bmpshape.py b/wx/lib/ogl/bmpshape.py
++index ee2859527..e53ddb136 100644
++--- a/wx/lib/ogl/bmpshape.py
+++++ b/wx/lib/ogl/bmpshape.py
++@@ -32,7 +32,7 @@ def OnDraw(self, dc):
++ 
++         x = self._xpos - self._bitmap.GetWidth() / 2.0
++         y = self._ypos - self._bitmap.GetHeight() / 2.0
++-        dc.DrawBitmap(self._bitmap, x, y, True)
+++        dc.DrawBitmap(self._bitmap, int(x), int(y), True)
++ 
++     def SetSize(self, w, h, recursive = True):
++         """
++diff --git a/wx/lib/ogl/composit.py b/wx/lib/ogl/composit.py
++index c3b623952..eecaafb3f 100644
++--- a/wx/lib/ogl/composit.py
+++++ b/wx/lib/ogl/composit.py
++@@ -1131,11 +1131,11 @@ def OnDraw(self, dc):
++ 
++         if self._leftSide:
++             dc.SetPen(self._leftSidePen)
++-            dc.DrawLine(x1, y2, x1, y1)
+++            dc.DrawLine(int(x1), int(y2), int(x1), int(y1))
++ 
++         if self._topSide:
++             dc.SetPen(self._topSidePen)
++-            dc.DrawLine(x1, y1, x2, y1)
+++            dc.DrawLine(int(x1), int(y1), int(x2), int(y1))
++ 
++         # For testing purposes, draw a rectangle so we know
++         # how big the division is.
++diff --git a/wx/lib/ogl/divided.py b/wx/lib/ogl/divided.py
++index 0bfb1919f..0809be58c 100644
++--- a/wx/lib/ogl/divided.py
+++++ b/wx/lib/ogl/divided.py
++@@ -231,7 +231,7 @@ def OnDrawContents(self, dc):
++                 regionPen = region.GetActualPen()
++                 if regionPen:
++                     dc.SetPen(regionPen)
++-                    dc.DrawLine(leftX, y, rightX, y)
+++                    dc.DrawLine(int(leftX), int(y), int(rightX), int(y))
++ 
++             currentY = actualY
++ 
++diff --git a/wx/lib/ogl/lines.py b/wx/lib/ogl/lines.py
++index 948b85d82..50c07e046 100644
++--- a/wx/lib/ogl/lines.py
+++++ b/wx/lib/ogl/lines.py
++@@ -1200,7 +1200,7 @@ def OnDraw(self, dc):
++ 
++         points = []
++         for point in self._lineControlPoints:
++-            points.append(wx.Point(point[0], point[1]))
+++            points.append(wx.Point(int(point[0]), int(point[1])))
++ 
++         if self._isSpline:
++             dc.DrawSpline(points)
++diff --git a/wx/lib/ogl/oglmisc.py b/wx/lib/ogl/oglmisc.py
++index 8588a72b7..a8be3fc53 100644
++--- a/wx/lib/ogl/oglmisc.py
+++++ b/wx/lib/ogl/oglmisc.py
++@@ -300,10 +300,10 @@ def DrawFormattedText(dc, text_list, xpos, ypos, width, height, formatMode):
++         yoffset = ypos - height / 2.0
++ 
++     # +1 to allow for rounding errors
++-    dc.SetClippingRegion(xpos - width / 2.0, ypos - height / 2.0, width + 1, height + 1)
+++    dc.SetClippingRegion(int(xpos - width / 2.0), int(ypos - height / 2.0), int(width + 1), int(height + 1))
++ 
++     for line in text_list:
++-        dc.DrawText(line.GetText(), xoffset + line.GetX(), yoffset + line.GetY())
+++        dc.DrawText(line.GetText(), int(xoffset + line.GetX()), int(yoffset + line.GetY()))
++ 
++     dc.DestroyClippingRegion()
++ 
++diff --git a/wx/lib/plot/examples/demo.py b/wx/lib/plot/examples/demo.py
++index 98fbaad3a..02bec1d9f 100644
++--- a/wx/lib/plot/examples/demo.py
+++++ b/wx/lib/plot/examples/demo.py
++@@ -984,7 +984,7 @@ def DrawPointLabel(self, dc, mDataDict):
++ 
++         sx, sy = mDataDict["scaledXY"]  # scaled x,y of closest point
++         # 10by10 square centered on point
++-        dc.DrawRectangle(sx - 5, sy - 5, 10, 10)
+++        dc.DrawRectangle(int(sx - 5), int(sy - 5), 10, 10)
++         px, py = mDataDict["pointXY"]
++         cNum = mDataDict["curveNum"]
++         pntIn = mDataDict["pIndex"]
++@@ -992,7 +992,7 @@ def DrawPointLabel(self, dc, mDataDict):
++         # make a string to display
++         s = "Crv# %i, '%s', Pt. (%.2f,%.2f), PtInd %i" % (
++             cNum, legend, px, py, pntIn)
++-        dc.DrawText(s, sx, sy + 1)
+++        dc.DrawText(s, int(sx), int(sy + 1))
++ 
++ 
++ def run_demo():
++diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py
++index dd3f77d52..abee47efb 100644
++--- a/wx/lib/plot/plotcanvas.py
+++++ b/wx/lib/plot/plotcanvas.py
++@@ -174,24 +174,24 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++ 
++         # Default Pens
++         self._gridPen = wx.Pen(wx.Colour(180, 180, 180, 255),
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_DOT)
++ 
++         self._centerLinePen = wx.Pen(wx.RED,
++-                                     self._pointSize[0],
+++                                     int(self._pointSize[0]),
++                                      wx.PENSTYLE_SHORT_DASH)
++ 
++         self._axesPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++ 
++         self._tickPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++         self._tickLength = tuple(-x * 2 for x in self._pointSize)
++ 
++         self._diagonalPen = wx.Pen(wx.BLUE,
++-                                   self._pointSize[0],
+++                                   int(self._pointSize[0]),
++                                    wx.PENSTYLE_DOT_DASH)
++ 
++     def SetCursor(self, cursor):
++@@ -1925,10 +1925,10 @@ def _Draw(self, graphics, xAxis=None, yAxis=None, dc=None):
++         # set clipping area so drawing does not occur outside axis box
++         ptx, pty, rectWidth, rectHeight = self._point2ClientCoord(p1, p2)
++         # allow graph to overlap axis lines by adding units to w and h
++-        dc.SetClippingRegion(ptx * self._pointSize[0],
++-                             pty * self._pointSize[1],
++-                             rectWidth * self._pointSize[0] + 2,
++-                             rectHeight * self._pointSize[1] + 1)
+++        dc.SetClippingRegion(int(ptx * self._pointSize[0]),
+++                             int(pty * self._pointSize[1]),
+++                             int(rectWidth * self._pointSize[0] + 2),
+++                             int(rectHeight * self._pointSize[1] + 1))
++         # Draw the lines and markers
++ #        start = _time.perf_counter()
++         graphics.draw(dc)
++@@ -2280,7 +2280,7 @@ def _drawLegend(self, dc, graphics, rhsW, topH, legendBoxWH,
++             pnt = ((trhc[0] + legendLHS + legendSymExt[0]
++                     + 5 * self._pointSize[0]),
++                    trhc[1] + s + lineHeight / 2. - legendTextExt[1] / 2)
++-            dc.DrawText(o.getLegend(), pnt[0], pnt[1])
+++            dc.DrawText(o.getLegend(), int(pnt[0]), int(pnt[1]))
++         dc.SetFont(self._getFont(self._fontSizeAxis))  # reset
++ 
++     def _titleLablesWH(self, dc, graphics):
++@@ -2329,7 +2329,7 @@ def _drawRubberBand(self, corner1, corner2):
++         dc.SetPen(wx.Pen(wx.BLACK))
++         dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_TRANSPARENT))
++         dc.SetLogicalFunction(wx.INVERT)
++-        dc.DrawRectangle(ptx, pty, rectWidth, rectHeight)
+++        dc.DrawRectangle(int(ptx), int(pty), int(rectWidth), int(rectHeight))
++         dc.SetLogicalFunction(wx.COPY)
++ 
++     def _getFont(self, size):
++@@ -2423,7 +2423,7 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.gridPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         x, y, width, height = self._point2ClientCoord(p1, p2)
++@@ -2432,13 +2432,13 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++             if self.enableGrid[0]:
++                 for x, _ in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0], pt[1] - height)
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - height))
++ 
++         if self._ySpec != 'none':
++             if self.enableGrid[1]:
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0] + width, pt[1])
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0] + width), int(pt[1]))
++ 
++     @TempStyle('pen')
++     def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2471,7 +2471,7 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.tickPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         # lengthen lines for printing
++@@ -2484,13 +2484,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] - xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - xTickLength)))
++                 dc.DrawLineList(lines)
++             if ticks.top:
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] + xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] + xTickLength)))
++                 dc.DrawLineList(lines)
++ 
++         if self.ySpec != 'none':
++@@ -2498,13 +2498,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] + yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] + yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++             if ticks.right:
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] - yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] - yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++ 
++     @TempStyle('pen')
++@@ -2531,25 +2531,25 @@ def _drawCenterLines(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.centerLinePen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._centerLinesEnabled in ('Horizontal', True):
++             y1 = scale[1] * p1[1] + shift[1]
++             y2 = scale[1] * p2[1] + shift[1]
++             y = (y1 - y2) / 2.0 + y2
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        y,
++-                        scale[0] * p2[0] + shift[0],
++-                        y)
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(y),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(y))
++         if self._centerLinesEnabled in ('Vertical', True):
++             x1 = scale[0] * p1[0] + shift[0]
++             x2 = scale[0] * p2[0] + shift[0]
++             x = (x1 - x2) / 2.0 + x2
++-            dc.DrawLine(x,
++-                        scale[1] * p1[1] + shift[1],
++-                        x,
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(x),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(x),
+++                        int(scale[1] * p2[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawDiagonals(self, dc, p1, p2, scale, shift):
++@@ -2575,19 +2575,19 @@ def _drawDiagonals(self, dc, p1, p2, scale, shift):
++         """
++         pen = self.diagonalPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._diagonalsEnabled in ('Bottomleft-Topright', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]))
++         if self._diagonalsEnabled in ('Bottomright-Topleft', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxes(self, dc, p1, p2, scale, shift):
++@@ -2614,7 +2614,7 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.axesPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         axes = self.enableAxes
++@@ -2623,24 +2623,24 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p1[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p1[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.top:
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p2[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p2[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++         if self.ySpec != 'none':
++             if axes.left:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p1[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p1[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.right:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p2[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p2[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2686,8 +2686,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] + 2 * self._pointSize[1] - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] + 2 * self._pointSize[1] - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2698,8 +2698,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w, h = dc.GetTextExtent(label)
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] - 2 * self._pointSize[1] - h - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] - 2 * self._pointSize[1] - h - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2712,8 +2712,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] - w - 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] - w - 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2725,8 +2725,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] + 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] + 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2785,7 +2785,7 @@ def _drawPlotTitle(self, dc, graphics, lhsW, rhsW, titleWH):
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - titleWH[0] / 2.,
++             self.plotbox_origin[1] - self.plotbox_size[1]
++         )
++-        dc.DrawText(graphics.title, titlePos[0], titlePos[1])
+++        dc.DrawText(graphics.title, int(titlePos[0]), int(titlePos[1]))
++ 
++     def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++                         xLabelWH, yLabelWH):
++@@ -2806,7 +2806,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - xLabelWH[0] / 2.,
++             self.plotbox_origin[1] - xLabelWH[1] - yTickLength
++         )
++-        dc.DrawText(graphics.xLabel, xLabelPos[0], xLabelPos[1])
+++        dc.DrawText(graphics.xLabel, int(xLabelPos[0]), int(xLabelPos[1]))
++         yLabelPos = (
++             self.plotbox_origin[0] - 3 * self._pointSize[0] + xTickLength,
++             self.plotbox_origin[1] - bottomH
++@@ -2814,7 +2814,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++         )
++         if graphics.yLabel:  # bug fix for Linux
++             dc.DrawRotatedText(
++-                graphics.yLabel, yLabelPos[0], yLabelPos[1], 90)
+++                graphics.yLabel, int(yLabelPos[0]), int(yLabelPos[1]), 90)
++ 
++     @TempStyle('pen')
++     def _drawPlotAreaLabels(self, dc, graphics, lhsW, rhsW, titleWH,
++@@ -2942,7 +2942,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++ 
++-            self.sb_hor.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_hor.SetScrollbar(pos, pagesize, int(sbfullrange), pagesize)
++             self._sb_xunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++@@ -2964,7 +2964,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++             pos = (sbfullrange - 1 - pos - pagesize)
++-            self.sb_vert.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_vert.SetScrollbar(int(pos), pagesize, int(sbfullrange), pagesize)
++             self._sb_yunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++diff --git a/wx/lib/plot/polyobjects.py b/wx/lib/plot/polyobjects.py
++index 26a54f8f7..725b0164e 100644
++--- a/wx/lib/plot/polyobjects.py
+++++ b/wx/lib/plot/polyobjects.py
++@@ -417,7 +417,7 @@ def draw(self, dc, printerScale, coord=None):
++ 
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_BUTT)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -518,7 +518,7 @@ def draw(self, dc, printerScale, coord=None):
++         style = self.attributes['style']
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_ROUND)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -590,7 +590,7 @@ def draw(self, dc, printerScale, coord=None):
++         if fillcolour and not isinstance(fillcolour, wx.Colour):
++             fillcolour = wx.Colour(fillcolour)
++ 
++-        dc.SetPen(wx.Pen(colour, width))
+++        dc.SetPen(wx.Pen(colour, int(width)))
++         if fillcolour:
++             dc.SetBrush(wx.Brush(fillcolour, fillstyle))
++         else:
++@@ -618,6 +618,7 @@ def _circle(self, dc, coords, size=1):
++         dc.DrawEllipseList(rect.astype(np.int32))
++ 
++     def _dot(self, dc, coords, size=1):
+++        coords = [(int(c[0]), int(c[1])) for c in coords]
++         dc.DrawPointList(coords)
++ 
++     def _square(self, dc, coords, size=1):
++@@ -699,7 +700,7 @@ def set_pen_and_brush(self, dc, printerScale):
++ 
++         if not isinstance(pencolour, wx.Colour):
++             pencolour = wx.Colour(pencolour)
++-        pen = wx.Pen(pencolour, penwidth, penstyle)
+++        pen = wx.Pen(pencolour, int(penwidth), penstyle)
++         pen.SetCap(wx.CAP_BUTT)
++ 
++         if not isinstance(fillcolour, wx.Colour):
++@@ -790,6 +791,7 @@ def draw(self, dc, printerScale, coord=None):
++                 raise TypeError(err_str.format(type(barwidth)))
++ 
++             rects = [self.calc_rect(x, y, w) for x, y, w in pts]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3])) for r in rects]
++             dc.DrawRectangleList(rects)
++         else:
++             dc.DrawLines(coord)  # draw legend line
++@@ -858,6 +860,8 @@ def draw(self, dc, printerScale, coord=None):
++             rects = [self.calc_rect(y, low, high)
++                      for y, (low, high)
++                      in zip(self.hist, self.bins)]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3]))
+++                     for r in rects]
++ 
++             dc.DrawRectangleList(rects)
++         else:
++@@ -1114,10 +1118,10 @@ def _draw_iqr_box(self, dc, printerScale):
++                                       self.currentShift)
++ 
++         # rectangles are drawn (left, top, width, height) so adjust
++-        iqr_box = [iqr_box[0][0],                   # X (left)
++-                   iqr_box[0][1],                   # Y (top)
++-                   iqr_box[1][0] - iqr_box[0][0],   # Width
++-                   iqr_box[1][1] - iqr_box[0][1]]   # Height
+++        iqr_box = [int(iqr_box[0][0]),                   # X (left)
+++                   int(iqr_box[0][1]),                   # Y (top)
+++                   int(iqr_box[1][0] - iqr_box[0][0]),   # Width
+++                   int(iqr_box[1][1] - iqr_box[0][1])]   # Height
++ 
++         box_pen = wx.Pen(wx.BLACK, 3, wx.PENSTYLE_SOLID)
++         box_brush = wx.Brush(wx.GREEN, wx.BRUSHSTYLE_SOLID)
++@@ -1503,7 +1507,7 @@ def OnPrintPage(self, page):
++         self.graph._setSize(plotAreaW, plotAreaH)
++ 
++         # Set offset and scale
++-        dc.SetDeviceOrigin(pixLeft, pixTop)
+++        dc.SetDeviceOrigin(int(pixLeft), int(pixTop))
++ 
++         # Thicken up pens and increase marker size for printing
++         ratioW = float(plotAreaW) / clientDcSize[0]
++diff --git a/wx/lib/popupctl.py b/wx/lib/popupctl.py
++index 883be5ae5..236501f6d 100644
++--- a/wx/lib/popupctl.py
+++++ b/wx/lib/popupctl.py
++@@ -124,7 +124,7 @@ def Display(self):
++         selfSize = self.GetSize()
++         tcSize = self.ctrl.GetSize()
++ 
++-        pos.x -= (selfSize.width - tcSize.width) / 2
+++        pos.x -= (selfSize.width - tcSize.width) // 2
++         if pos.x + selfSize.width > dSize.width:
++             pos.x = dSize.width - selfSize.width
++         if pos.x < 0:
++diff --git a/wx/lib/scrolledpanel.py b/wx/lib/scrolledpanel.py
++index e4c482af9..1f783ea97 100644
++--- a/wx/lib/scrolledpanel.py
+++++ b/wx/lib/scrolledpanel.py
++@@ -222,4 +222,4 @@ def ScrollChildIntoView(self, child):
++         # if we need to adjust
++         if new_vs_x != -1 or new_vs_y != -1:
++             #print("%s: (%s, %s)" % (self.GetName(), new_vs_x, new_vs_y))
++-            self.Scroll(new_vs_x, new_vs_y)
+++            self.Scroll(int(new_vs_x), int(new_vs_y))
++diff --git a/wx/lib/throbber.py b/wx/lib/throbber.py
++index 9954d6b27..ee8c51209 100644
++--- a/wx/lib/throbber.py
+++++ b/wx/lib/throbber.py
++@@ -200,11 +200,11 @@ def Draw(self, dc):
++         """
++         dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True)
++         if self.overlay and self.showOverlay:
++-            dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True)
+++            dc.DrawBitmap(self.overlay, int(self.overlayX), int(self.overlayY), True)
++         if self.label and self.showLabel:
++-            dc.DrawText(self.label, self.labelX, self.labelY)
+++            dc.DrawText(self.label, int(self.labelX), int(self.labelY))
++             dc.SetTextForeground(wx.WHITE)
++-            dc.DrawText(self.label, self.labelX-1, self.labelY-1)
+++            dc.DrawText(self.label, int(self.labelX-1), int(self.labelY-1))
++ 
++ 
++     def OnPaint(self, event):
++diff --git a/wx/lib/ticker.py b/wx/lib/ticker.py
++index 04abf0d44..4e684b4cd 100644
++--- a/wx/lib/ticker.py
+++++ b/wx/lib/ticker.py
++@@ -86,7 +86,7 @@ def Stop(self):
++     def Start(self):
++         """Starts the text moving"""
++         if not self.timer.IsRunning():
++-            self.timer.Start(1000 / self._fps)
+++            self.timer.Start(1000 // self._fps)
++ 
++ 
++     def IsTicking(self):
++@@ -208,7 +208,7 @@ def DrawText(self, dc):
++             offx = self._offset - self._extent[0]
++         else:
++             offx = self.GetSize()[0] - self._offset
++-        offy = (self.GetSize()[1] - self._extent[1]) / 2 #centered vertically
+++        offy = (self.GetSize()[1] - self._extent[1]) // 2 #centered vertically
++         dc.DrawText(self._text, offx, offy)
++ 
++ 
+
diff --git a/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
new file mode 100644
index 000000000000..88c3ca189647
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
@@ -0,0 +1,57 @@
+From 1d5fd72dff63d62dd19b77e489d4115245d4d453 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 28 2021 02:58:12 +0000
+Subject: Fix more Python 3.10 issues with AGW FlatNotebook (#2035790)
+
+
+---
+
+diff --git a/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+new file mode 100644
+index 0000000..e8b74ac
+--- /dev/null
++++ b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+@@ -0,0 +1,43 @@
++From aa3dca0e40bd0701e82ce40297a982b5b84844dc Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Mon, 27 Dec 2021 19:48:55 -0500
++Subject: [PATCH] Fix additional Python 3.10 issues with AGW FlatNotebook
++
++---
++ wx/lib/agw/flatnotebook.py | 14 +++++++-------
++ 1 file changed, 7 insertions(+), 7 deletions(-)
++
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index d33f71d51..61bc4efb3 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -925,14 +925,14 @@ def DrawButton(dc, rect, focus, upperTabs):
++ 
++     if focus:
++         if upperTabs:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*8)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*8)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*8))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*8))
++         else:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*5)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*5)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*5))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*5))
++     else:
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 2)))
+++        rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 2)))
++ 
++     # Define the top region
++     top = wx.Rect(rect.GetTopLeft(), rightPt)
++@@ -2766,7 +2766,7 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         if pageTextColour is not None:
++             dc.SetTextForeground(pageTextColour)
++ 
++-        dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset, imageYCoord)
+++        dc.DrawText(pc.GetPageText(tabIdx), int(posx + textOffset), imageYCoord)
++ 
++         # draw 'x' on tab (if enabled)
++         if pc.HasAGWFlag(FNB_X_ON_TAB) and tabIdx == pc.GetSelection():
diff --git a/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
new file mode 100644
index 000000000000..6f21ecb7a718
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
@@ -0,0 +1,52 @@
+Backport https://github.com/wxWidgets/Phoenix/pull/1849
+Regarding segfault as in https://github.com/OSGeo/grass/issues/1123
+
+From 5cace47aaece3cc4f2e6ea97d7fd5bb8ed316ac9 Mon Sep 17 00:00:00 2001
+From: Robin Dunn <robin@alldunn.com>
+Date: Wed, 18 Nov 2020 10:52:53 -0800
+Subject: [PATCH] Restore GIL acquisition in wxPseudoDC::FindObjects*
+
+---
+ src/pseudodc.cpp | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/pseudodc.cpp b/src/pseudodc.cpp
+index 5890ed7e2..ed4bcd06a 100644
+--- a/src/pseudodc.cpp
++++ b/src/pseudodc.cpp
+@@ -483,7 +483,7 @@ bool wxPseudoDC::GetIdGreyedOut(int id)
+ // ----------------------------------------------------------------------------
+ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -501,7 +501,6 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+         }
+         pt = pt->GetNext();
+     }
+-    //wxPyEndBlockThreads(blocked);
+     return pyList;
+ }
+ 
+@@ -511,7 +510,7 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+                                   wxCoord radius, const wxColor& bg)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -611,8 +610,7 @@ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+         maskdc.SelectObject(wxNullBitmap);
+         memdc.SelectObject(wxNullBitmap);
+     }
+-    //wxPyEndBlockThreads(blocked);
+-    return pyList;
++     return pyList;
+ }
+ 
+ // ----------------------------------------------------------------------------
diff --git a/srcpkgs/wxPython4/template b/srcpkgs/wxPython4/template
index 554174105a36..afea1b55bf90 100644
--- a/srcpkgs/wxPython4/template
+++ b/srcpkgs/wxPython4/template
@@ -1,7 +1,7 @@
 # Template file for 'wxPython4'
 pkgname=wxPython4
 version=4.0.7
-revision=4
+revision=5
 wrksrc="wxPython-${version}"
 build_style=python3-module
 make_build_args="--skip-build"
@@ -10,6 +10,7 @@ hostmakedepends="pkg-config python3-setuptools python3-pathlib2"
 makedepends="python3-devel wxWidgets-gtk3-devel SDL2-devel webkit2gtk-devel
  gst-plugins-base1-devel"
 depends="python3 python3-six python3-numpy python3-Pillow"
+checkdepends="python3-six python3-numpy python3-Pillow"
 short_desc="WxWidgets GUI toolkit library (Python3 Bindings)"
 maintainer="Jasper Chan <jasperchan515@gmail.com>"
 license="custom:wxWindows"

From a63aabf5d89024ad91edbe82d808a3c9dd7caab5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 21:56:03 +0100
Subject: [PATCH 09/16] grass: update to 7.8.7RC1; rebuild against libgdal and
 proj

Version 7.8.7RC1 includes a workaround for a wxPython issue
https://github.com/OSGeo/grass/issues/1971#issuecomment-993622613
---
 srcpkgs/grass/patches/musl-build-fix.patch |  13 +++
 srcpkgs/grass/template                     | 128 +++++++++++++++++----
 2 files changed, 120 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..364ee30be4d9
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,13 @@
+error: unknown type name 'int64_t' patch for musl
+
+diff --git a/include/gis.h b/include/gis.h
+--- a/include/gis.h
++++ b/include/gis.h
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ 
+ 
+ /* Grass and local include files */
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..167faa401385 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,116 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.7RC1
+revision=1
+_binversion=${version//./}
+_binversion=${_binversion:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=/usr/lib
+ --bindir=/usr/bin
+ --libdir=/usr/lib
+ --libexec=/usr/libexec
+ --enable-largefile
+ --with-blas
+ --with-blas-includes=/usr/include
+ --with-bzip2
+ --with-bzlib
+ --with-cairo
+ --with-cxx
+ --with-freetype
+ --with-freetype-includes=/usr/include/freetype2
+ --with-gdal
+ --with-geos
+ --with-glw
+ --with-lapack
+ --with-lapack-includes=/usr/include
+ --with-mysql
+ --with-mysql-includes=/usr/include/mysql
+ --with-netcdf=/usr/bin/nc-config
+ --with-nls
+ --with-openmp
+ --with-postgres
+ --with-postgres-includes=/usr/include/postgresql
+ --with-postgres-libs=/usr/lib/psql14/lib/postgresql
+ --with-proj
+ --with-proj-share=/usr/share
+ --with-pthread
+ --with-python=/usr/bin/python3-config
+ --with-readline
+ --with-regex
+ --with-sqlite
+ --with-wxwidgets"
+hostmakedepends="flex
+ gettext
+ libgdal-tools
+ pkg-config
+ python3-numpy
+ python3-six
+ tar"
+makedepends="bison
+ blas-devel
+ bzip2-devel
+ cairo-devel
+ fftw-devel
+ freetype-devel
+ geos-devel
+ gettext-devel
+ glu-devel
+ lapack-devel
+ libgdal-devel
+ libgomp-devel
+ libmysqlclient-devel
+ libpng-devel
+ libzstd-devel
+ netcdf-devel
+ postgresql-libs-devel
+ proj-devel
+ python3-devel
+ python3-Pillow
+ python3-six
+ readline-devel
+ sqlite-devel
+ tiff-devel
+ zlib-devel"
+depends="libgdal python3-numpy wxPython4"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=fa1d6ccc1fde4cbea0be095256729421c41c1a12bf621fe124d0d2c8e826de6a
 nocross="tries to execute target binaries"
 
+shlib_provides="
+ libgrass_dbmibase.${version%.*}.so
+ libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so
+ libgrass_gproj.${version%.*}.so
+ libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so
+ libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass78 \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binversion}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binversion}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binversion}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binversion}.sh
+
+	vinstall grass.pc 644 usr/share/pkgconfig
+	vinstall gui/icons/grass.desktop 644 usr/share/applications
+
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

From 2269fca2f69d209a9314fbf78a3ef2da74e8eab1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 10/16] merkaartor: rebuild against libgdal-3.4.1 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From b6d1eeedbc270554237e1b94bd951a1e2edb0386 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 11/16] OpenOrienteering-Mapper: rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From 30cd7508e87b5476a3800433d88629b69afda1be Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 12/16] osg: rebuild against libgdal-3.4.1, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From 4ffd56999324f2616614f5d2a56e52558b8b9ab7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 13/16] sumo: update to 1.9.2; rebuild against libgdal-3.4.1
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 common/shlibs         |  2 ++
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 62b573986051..ae4de3bd14b6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4127,3 +4127,5 @@ libgrass_dbmibase.7.8.so grass-7.8.5_1
 libgrass_imagery.7.8.so grass-7.8.5_1
 libkmlconvenience.so.1 libkml-1.3.0_1
 mod_spatialite.so.7 libspatialite-5.0.0_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index e760fdd45aee..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=4
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From 03fa0d388e1bfc402d4b07829c90ae0e3916c48b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 14/16] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 414dca58f5cdab6dc4c9576e68f8b523c26c1bc0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 15/16] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From ffa33b8f63fe945766f143f9229db94c97348904 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 16/16] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (28 preceding siblings ...)
  2022-02-15  0:26 ` [PR PATCH] [Updated] " ar-jan
@ 2022-02-15  0:30 ` ar-jan
  2022-02-15  0:35 ` ar-jan
                   ` (27 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-15  0:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 204603 bytes --]

From cbbcc5ddb0466c3d823494210358e6b0383a5155 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/16] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 0c60260b4642..b0fcfd04926e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 025f72e94b219c30723901902b52994a01a4db15 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Sun, 20 Dec 2020 14:49:30 +0100
Subject: [PATCH 02/16] New package: libspatialite-5.0.1

---
 common/shlibs                                 | 17 ++++++++
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_sql.patch           | 29 +++++++++++++
 srcpkgs/libspatialite/template                | 42 +++++++++++++++++++
 4 files changed, 89 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index b0fcfd04926e..121c3164f92b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4110,3 +4110,20 @@ libawt_xawt.so openjdk17-jre-17.0.1+12_1
 libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
+libavif.so.12 libavif-0.9.2_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.0_1
+libspatialindex.so.6 libspatialindex-1.9.3_1
+libgrass_gis.7.8.so grass-7.8.5_1
+libgrass_raster.7.8.so grass-7.8.5_1
+libgrass_gproj.7.8.so grass-7.8.5_1
+libgrass_dbmiclient.7.8.so grass-7.8.5_1
+libgrass_vector.7.8.so grass-7.8.5_1    
+libgrass_dbmibase.7.8.so grass-7.8.5_1
+libgrass_imagery.7.8.so grass-7.8.5_1
+libkmlconvenience.so.1 libkml-1.3.0_1
+mod_spatialite.so.7 libspatialite-5.0.0_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql.patch b/srcpkgs/libspatialite/patches/disable_check_sql.patch
new file mode 100644
index 000000000000..951c1ac1724d
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql.patch
@@ -0,0 +1,29 @@
+disable check_sql_stmt test
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..2ea1701d8ae6
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,42 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.1
+revision=1
+build_style=gnu-configure
+configure_args="--disable-rttopo"
+hostmakedepends="pkg-config libxml2"
+makedepends="freexl-devel
+ geos-devel
+ libxml2-devel
+ minizip-devel
+ proj-devel
+ sqlite-devel
+ zlib-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 6b6bc91d6044ae8513961e252bf3db952530fc43 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/16] New package: libkml-1.3.0

---
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 ++++++++++++++++
 srcpkgs/libkml/template                | 27 ++++++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..b67eece4d8ba
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,27 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="boost-devel
+ expat-devel
+ minizip-devel
+ uriparser-devel
+ zlib-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From 9cd42e143b8f09dfa254b0d3db40068ca1a429c6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 04/16] libgdal: update to 3.4.1 and rebuild against proj-7.2.1

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 105 ++++++++++++++++--
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 95 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 121c3164f92b..62b573986051 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2510,7 +2510,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..5fca579954fa 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,100 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.1
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libspatialite-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ libkml-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=e360387bc25ec24940f46afbeada48002d72c74aaf9eccf2a40e8d74e711a2e4
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +116,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 322fcb7177ca3a86b15bfb9e6f6e4d5c049d31e2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 05/16] postgis: update to 3.1.5; rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..f52cd6657988 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.1.5
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From c9b0216f16fe853667d51e455af3c8ca42032c80 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 06/16] postgis-postgresql13: update to 3.1.5; rebuild against
 libgdal-3.4.1 and proj-7.2.1

---
 srcpkgs/postgis-postgresql13/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..a0f5c89ef4da 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
-revision=2
+version=3.1.5
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 3f4084e37ab10b6410f71725305026f889720daa Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 07/16] postgis-postgresql14: update to 3.1.5; rebuild against
 libgdal-3.4.1 and proj-7.2.1

---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..ad8d0c5c4253 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.1.5
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 2993f12a6fcd29c10bb298519a7119e65a410135 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 9 Aug 2021 19:53:17 +0200
Subject: [PATCH 08/16] wxPython4: backport patches, and fix tests

Backported patches:
- wxPseudoDC GIL
- Python 3.10 AGW FlatNotebook patch
- Python 3.10 ScrolledWindow argument types
- Python 3.10 Integer division
- wx.WindowID and wx.Region arguments
---
 .../patches/0002-Python-3.10-issues.patch     | 3317 +++++++++++++++++
 .../0003-Python-3.10-AGW-FlatNotebook.patch   |   57 +
 .../patches/restore-gil-pseudodc.patch        |   52 +
 srcpkgs/wxPython4/template                    |    3 +-
 4 files changed, 3428 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
 create mode 100644 srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
 create mode 100644 srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch

diff --git a/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
new file mode 100644
index 000000000000..6c87ff967d01
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
@@ -0,0 +1,3317 @@
+From f55a17c2d3b336c82fb44f7816ec63219847f4cc Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 22 2021 20:23:54 +0000
+Subject: Fix a bunch of Python 3.10 issues
+
+
+---
+
+diff --git a/0d449626d6d298ad96ebd1d514d0e42833bce470.patch b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+new file mode 100644
+index 0000000..d2ccddc
+--- /dev/null
++++ b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+@@ -0,0 +1,22 @@
++From 0d449626d6d298ad96ebd1d514d0e42833bce470 Mon Sep 17 00:00:00 2001
++From: Carolina Feher da Silva <carolfsu@gmail.com>
++Date: Tue, 16 Nov 2021 01:24:31 +0000
++Subject: [PATCH] Fixed integer division in Python 3
++
++---
++ wx/lib/stattext.py | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/wx/lib/stattext.py b/wx/lib/stattext.py
++index 2cfb6e65a..e606e5a89 100644
++--- a/wx/lib/stattext.py
+++++ b/wx/lib/stattext.py
++@@ -302,7 +302,7 @@ def OnPaint(self, event):
++             if style & wx.ALIGN_RIGHT:
++                 x = width - w
++             if style & wx.ALIGN_CENTER:
++-                x = (width - w)/2
+++                x = (width - w)//2
++             dc.DrawText(line, x, y)
++             y += h
++ 
+diff --git a/3eb9eb32dc3285435039f6c420c398665372a1ad.patch b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+new file mode 100644
+index 0000000..08e58a0
+--- /dev/null
++++ b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+@@ -0,0 +1,84 @@
++From 3eb9eb32dc3285435039f6c420c398665372a1ad Mon Sep 17 00:00:00 2001
++From: Glen Whitney <glen@studioinfinity.org>
++Date: Tue, 31 Aug 2021 11:06:27 -0700
++Subject: [PATCH] fix: Correct types of arguments to
++ ScrolledWindow.SetScrollbars
++
++---
++ demo/Mask.py                   |  2 +-
++ demo/OGL.py                    |  2 +-
++ wx/lib/agw/ultimatelistctrl.py | 14 +++++++-------
++ 3 files changed, 9 insertions(+), 9 deletions(-)
++
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 5f0c2cdde..109b8f30b 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -56,7 +56,7 @@ def __init__(self, parent):
++         mask = wx.Mask(self.bmp_withcolourmask, wx.WHITE)
++         self.bmp_withcolourmask.SetMask(mask)
++ 
++-        self.SetScrollbars(20, 20, 700/20, 460/20)
+++        self.SetScrollbars(20, 20, 700//20, 460//20)
++ 
++         self.Bind(wx.EVT_PAINT, self.OnPaint)
++ 
++diff --git a/demo/OGL.py b/demo/OGL.py
++index 72ca543dd..d475e5011 100644
++--- a/demo/OGL.py
+++++ b/demo/OGL.py
++@@ -272,7 +272,7 @@ def __init__(self, parent, log, frame):
++ 
++         maxWidth  = 1000
++         maxHeight = 1000
++-        self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
+++        self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
++ 
++         self.log = log
++         self.frame = frame
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index c60867684..14fc41f86 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -9654,8 +9654,8 @@ def RecalculatePositions(self, noRefresh=False):
++                 self._linesPerPage = clientHeight//lineHeight
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + lineHeight - 1)/lineHeight,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + lineHeight - 1)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9676,8 +9676,8 @@ def RecalculatePositions(self, noRefresh=False):
++                     decrement = SCROLL_UNIT_X
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + SCROLL_UNIT_Y - 1)/SCROLL_UNIT_Y,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + SCROLL_UNIT_Y - 1)//SCROLL_UNIT_Y,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9728,8 +9728,8 @@ def RecalculatePositions(self, noRefresh=False):
++                         line._gi.ExtendWidth(widthMax)
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (x + SCROLL_UNIT_X)/SCROLL_UNIT_X,
++-                                   (y + lineHeight)/lineHeight,
+++                                   (x + SCROLL_UNIT_X)//SCROLL_UNIT_X,
+++                                   (y + lineHeight)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9797,7 +9797,7 @@ def RecalculatePositions(self, noRefresh=False):
++                             break  # Everything fits, no second try required.
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (entireWidth + SCROLL_UNIT_X)/SCROLL_UNIT_X,
+++                                   (entireWidth + SCROLL_UNIT_X)//SCROLL_UNIT_X,
++                                    0,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    0,
+diff --git a/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+new file mode 100644
+index 0000000..f0b9f5d
+--- /dev/null
++++ b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+@@ -0,0 +1,143 @@
++From 9096426603272672d9a676e8bcdcadf0a1cfa1a2 Mon Sep 17 00:00:00 2001
++From: Robin Dunn <robin@alldunn.com>
++Date: Wed, 26 Feb 2020 11:10:27 -0800
++Subject: [PATCH] Add __index__ to wx.WindowID, and __bool__ to wx.Region
++
++---
++ etg/region.py              |  5 +++--
++ etg/windowid.py            | 32 +++++++++++++++++---------------
++ unittests/test_windowid.py | 23 +++++++++++++++++++++--
++ 3 files changed, 41 insertions(+), 19 deletions(-)
++
++diff --git a/etg/region.py b/etg/region.py
++index 0982c1fe5..d5bc45759 100644
++--- a/etg/region.py
+++++ b/etg/region.py
++@@ -88,11 +88,12 @@ def next(self):
++     c.mustHaveApp()
++     c.find('operator++').ignore()
++ 
++-    # SIP maps operator bool() to __int__, but Classic used __nonzero__. Does
++-    # it make any difference either way?
++     c.find('operator bool').ignore()
++     c.addCppMethod('int', '__nonzero__', '()', 'return (int)self->operator bool();',
++                    'Returns true while there are still rectangles available in the iteration.')
+++    c.addCppMethod('int', '__bool__', '()', 'return (int)self->operator bool();',
+++                   'Returns true while there are still rectangles available in the iteration.')
+++
++ 
++     c.addCppMethod('void', 'Next', '()', 'self->operator++();',
++                    'Move the iterator to the next rectangle in the region.')
++diff --git a/etg/windowid.py b/etg/windowid.py
++index 27b041b3d..da2ed395e 100644
++--- a/etg/windowid.py
+++++ b/etg/windowid.py
++@@ -53,12 +53,12 @@ def run():
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Create reference from an ID',
++                     items=[ ParamDef(type='int', name='id') ]),
++-                
+++
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Copy an ID reference',
++                     items=[ ParamDef(type='const wxWindowIDRef&', name='idref') ]),
++                 ]),
++-            
+++
++             MethodDef(name='~wxWindowIDRef', className='wxWindowIDRef', isDtor=True),
++ 
++             MethodDef(type='int', name='GetValue',
++@@ -73,11 +73,13 @@ def run():
++             """)
++ 
++     klass.addCppMethod('int', '__int__', '()',
++-        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or etc.",
++-        body="""\
++-            return self->GetValue();
++-            """)
++-    
+++        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or other places an integer type is needed.",
+++        body="return self->GetValue();")
+++    klass.addCppMethod('int', '__index__', '()',
+++        doc="See :meth:`__int__`",
+++        body="return self->GetValue();")
+++
+++
++     klass.addCppMethod('bool', '__eq__', '(wxWindowID id)', "return self->GetValue() == id;")
++     klass.addCppMethod('bool', '__ne__', '(wxWindowID id)', "return self->GetValue() != id;")
++     klass.addCppMethod('bool', '__lt__', '(wxWindowID id)', "return self->GetValue() < id;")
++@@ -92,17 +94,17 @@ def run():
++     # and finish it up by adding it to the module
++     module.addItem(klass)
++ 
++-    # Now, let's add a new Python function to the global scope that reserves an 
++-    # ID (or range) and returns a ref object for it. 
++-    module.addPyFunction('NewIdRef', '(count=1)', 
+++    # Now, let's add a new Python function to the global scope that reserves an
+++    # ID (or range) and returns a ref object for it.
+++    module.addPyFunction('NewIdRef', '(count=1)',
++         doc="""\
++-            Reserves a new Window ID (or range of WindowIDs) and returns a 
++-            :class:`wx.WindowIDRef` object (or list of them) that will help 
+++            Reserves a new Window ID (or range of WindowIDs) and returns a
+++            :class:`wx.WindowIDRef` object (or list of them) that will help
++             manage the reservation of that ID.
++ 
++-            This function is intended to be a drop-in replacement of the old 
++-            and deprecated :func:`wx.NewId` function, with the added benefit 
++-            that the ID should never conflict with an in-use ID or other IDs 
+++            This function is intended to be a drop-in replacement of the old
+++            and deprecated :func:`wx.NewId` function, with the added benefit
+++            that the ID should never conflict with an in-use ID or other IDs
++             generated by this function.
++             """,
++         body="""\
++diff --git a/unittests/test_windowid.py b/unittests/test_windowid.py
++index 4593e5a69..fc36c9eb8 100644
++--- a/unittests/test_windowid.py
+++++ b/unittests/test_windowid.py
++@@ -31,9 +31,9 @@ def test_newIdRef02(self):
++     def test_newIdRef03(self):
++         """Check that Auto ID Management is enabled (--enable-autoidman)"""
++         # This test is expected to fail if autoID mangagement is turned on
++-        # because a reference to the ID is not being saved, so it will be 
+++        # because a reference to the ID is not being saved, so it will be
++         # unreserved when the first widget is destroyed.
++-        
+++
++         id = wx.Window.NewControlId()
++         b = wx.Button(self.frame, id, 'button')
++         b.Destroy()
++@@ -75,6 +75,7 @@ def test_WindowIDRef01(self):
++         val = ref1 <= ref2
++         assert type(val) == bool
++ 
+++
++     def test_WindowIDRef02(self):
++         d = {wx.NewIdRef(): 'one',
++              wx.NewIdRef(): 'two'}
++@@ -82,6 +83,24 @@ def test_WindowIDRef02(self):
++         for k in keys:
++             val = d[k]
++ 
+++
+++    def test_WindowIDRef03(self):
+++        # Ensure wx.WindowIDRef can be converted to int without warning when
+++        # making a call to warrped method. In Py3.8+ this means there needs to
+++        # be an __index__ method.
+++
+++        # Turn warnings into exceptions so this test will fail if there is
+++        # a warning
+++        import warnings
+++        warnings.simplefilter('error')
+++
+++        wid = wx.NewIdRef()
+++        assert isinstance(wid, wx.WindowIDRef)
+++
+++        b = wx.Button(self.frame, wid, 'button')
+++        assert b.GetId() == wid.GetId()
+++
+++
++ #---------------------------------------------------------------------------
++ 
++ 
+ 
+diff --git a/python3.10-fixes.patch b/python3.10-fixes.patch
+new file mode 100644
+index 0000000..29e8c61
+--- /dev/null
++++ b/python3.10-fixes.patch
+@@ -0,0 +1,3034 @@
++From 173d0796810bb65de9bdfdc6941d24a04628f6c2 Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Wed, 1 Dec 2021 14:19:00 -0500
++Subject: [PATCH] Fix a bunch of Python 3.10 issues with pure-Python classes
++ and demos
++
++In Python 3.10, a change[1] was implemented where extension functions
++that take integer arguments will no longer silently accept non-integer
++arguments (e.g., floats) that can only be converted to integers with a
++loss of precision.  This PR fixes most of these issues in the pure-Python
++classes and demos by explicitly converting the parameters to int before
++passing them to wxWidgets.  There is loss of precision, but this was
++happening before (automatically) anyway as most wxWidgets DeviceContext
++functions operate using integers.
++
++Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
++too small on GTK3.
++
++This is an example of the relevant exception:
++Traceback (most recent call last):
++  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
++    r.width = w
++TypeError: 'float' object cannot be interpreted as an integer
++
++Fixes #2038.
++
++[1] https://bugs.python.org/issue37999
++---
++ demo/GridLabelRenderer.py               |   4 +-
++ demo/Mask.py                            |   4 +-
++ demo/Overlay.py                         |   1 -
++ demo/PenAndBrushStyles.py               |   2 +-
++ demo/PopupWindow.py                     |   2 +-
++ demo/PrintFramework.py                  |   2 +-
++ demo/PropertyGrid.py                    |   2 +-
++ demo/Sizers.py                          |   2 +-
++ demo/UIActionSimulator.py               |   2 +-
++ demo/agw/AUI.py                         |  32 +++----
++ demo/agw/MacLargeDemo.py                |   4 +-
++ demo/agw/PeakMeter.py                   |   6 +-
++ demo/agw/PersistentControls.py          |   2 +-
++ demo/agw/RibbonBar.py                   |   2 +-
++ demo/agw/SpeedMeter.py                  |   2 +-
++ demo/agw/SuperToolTip.py                |   3 +-
++ demo/agw/ThumbDemoConfig.py             |   1 +
++ demo/agw/UltimateReportDemo.py          |   8 +-
++ demo/agw/Windows7Explorer_Contents.py   |  16 ++--
++ demo/agw/ZoomBar.py                     |   2 +-
++ wx/lib/agw/advancedsplash.py            |   2 +-
++ wx/lib/agw/aui/aui_utilities.py         |   4 +-
++ wx/lib/agw/aui/auibook.py               |   4 +-
++ wx/lib/agw/balloontip.py                |   4 +-
++ wx/lib/agw/flatmenu.py                  |  62 ++++++-------
++ wx/lib/agw/flatnotebook.py              |  10 +--
++ wx/lib/agw/floatspin.py                 |   2 +-
++ wx/lib/agw/gradientbutton.py            |   8 +-
++ wx/lib/agw/hypertreelist.py             |   2 +-
++ wx/lib/agw/knobctrl.py                  |  12 +--
++ wx/lib/agw/labelbook.py                 |  32 +++----
++ wx/lib/agw/peakmeter.py                 |   2 +-
++ wx/lib/agw/pygauge.py                   |   4 +-
++ wx/lib/agw/ribbon/art_aui.py            |  22 ++---
++ wx/lib/agw/ribbon/art_internal.py       |  12 +--
++ wx/lib/agw/ribbon/art_msw.py            |  88 +++++++++----------
++ wx/lib/agw/ribbon/bar.py                |   4 +-
++ wx/lib/agw/ribbon/buttonbar.py          |   6 +-
++ wx/lib/agw/ribbon/gallery.py            |   8 +-
++ wx/lib/agw/ribbon/panel.py              |  16 ++--
++ wx/lib/agw/ribbon/toolbar.py            |   2 +-
++ wx/lib/agw/scrolledthumbnail.py         |  24 +++---
++ wx/lib/agw/shapedbutton.py              |  10 +--
++ wx/lib/agw/speedmeter.py                |  72 +++++++++-------
++ wx/lib/agw/supertooltip.py              |  20 ++---
++ wx/lib/agw/toasterbox.py                |   4 +-
++ wx/lib/agw/ultimatelistctrl.py          |  20 ++---
++ wx/lib/agw/xlsgrid.py                   |   4 +-
++ wx/lib/agw/zoombar.py                   |  10 +--
++ wx/lib/analogclock/analogclock.py       |   2 +-
++ wx/lib/analogclock/helpers.py           |  22 ++---
++ wx/lib/analogclock/setup.py             |   6 +-
++ wx/lib/buttons.py                       |  10 +--
++ wx/lib/colourchooser/pycolourchooser.py |   4 +-
++ wx/lib/colourchooser/pypalette.py       |   2 +-
++ wx/lib/floatcanvas/FCObjects.py         |   8 +-
++ wx/lib/gizmos/ledctrl.py                |   8 +-
++ wx/lib/imagebrowser.py                  |   4 +-
++ wx/lib/ogl/basic.py                     |  10 +--
++ wx/lib/ogl/bmpshape.py                  |   2 +-
++ wx/lib/ogl/composit.py                  |   4 +-
++ wx/lib/ogl/divided.py                   |   2 +-
++ wx/lib/ogl/lines.py                     |   2 +-
++ wx/lib/ogl/oglmisc.py                   |   4 +-
++ wx/lib/plot/examples/demo.py            |   4 +-
++ wx/lib/plot/plotcanvas.py               | 110 ++++++++++++------------
++ wx/lib/plot/polyobjects.py              |  22 +++--
++ wx/lib/popupctl.py                      |   2 +-
++ wx/lib/scrolledpanel.py                 |   2 +-
++ wx/lib/throbber.py                      |   6 +-
++ wx/lib/ticker.py                        |   4 +-
++ 71 files changed, 411 insertions(+), 398 deletions(-)
++
++diff --git a/demo/GridLabelRenderer.py b/demo/GridLabelRenderer.py
++index 794dd64e8..1440ef41b 100644
++--- a/demo/GridLabelRenderer.py
+++++ b/demo/GridLabelRenderer.py
++@@ -46,8 +46,8 @@ def __init__(self):
++         self._bmp = images.Smiles.GetBitmap()
++ 
++     def Draw(self, grid, dc, rect, rc):
++-        x = rect.left + (rect.width - self._bmp.GetWidth()) / 2
++-        y = rect.top + (rect.height - self._bmp.GetHeight()) / 2
+++        x = rect.left + (rect.width - self._bmp.GetWidth()) // 2
+++        y = rect.top + (rect.height - self._bmp.GetHeight()) // 2
++         dc.DrawBitmap(self._bmp, x, y, True)
++ 
++ 
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 109b8f30b..e924f95b9 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -90,9 +90,9 @@ def OnPaint (self, e):
++ 
++         for text, code in logicList:
++             x,y = 120+150*(i%4), 20+100*(i/4)
++-            dc.DrawText(text, x, y-20)
+++            dc.DrawText(text, x, int(y-20))
++             mdc.SelectObject(self.bmp_withcolourmask)
++-            dc.Blit(x,y, cx,cy, mdc, 0,0, code, True)
+++            dc.Blit(x,int(y), cx,cy, mdc, 0,0, code, True)
++             i = i + 1
++ 
++ 
++diff --git a/demo/Overlay.py b/demo/Overlay.py
++index 65164cd84..fa65be003 100644
++--- a/demo/Overlay.py
+++++ b/demo/Overlay.py
++@@ -56,7 +56,6 @@ def __init__(self, parent, log):
++         self.penstylesCombo.SetToolTip('Pen Style')
++ 
++         self.overlayPenWidth = wx.SpinCtrl(self, -1, value='',
++-                                           size=(75, -1),
++                                            style=wx.SP_ARROW_KEYS,
++                                            min=1, max=24, initial=1)
++         self.overlayPenWidth.SetToolTip('Pen Width')
++diff --git a/demo/PenAndBrushStyles.py b/demo/PenAndBrushStyles.py
++index 24040b1fc..1183f684a 100644
++--- a/demo/PenAndBrushStyles.py
+++++ b/demo/PenAndBrushStyles.py
++@@ -100,7 +100,7 @@ def OnPaint(self, event):
++ 
++         dc.SetPen(pen)
++         y = labelHeight + (height - labelHeight)/2
++-        dc.DrawLine(5, y, width-5, y)
+++        dc.DrawLine(5, int(y), width-5, int(y))
++ 
++ 
++ class BrushPanel(BasePanel):
++diff --git a/demo/PopupWindow.py b/demo/PopupWindow.py
++index d8e175576..b54b9870d 100644
++--- a/demo/PopupWindow.py
+++++ b/demo/PopupWindow.py
++@@ -89,7 +89,7 @@ def __init__(self, parent, style, log):
++                           "(or its first child) loses focus in \n"
++                           "any other way.")
++         btn = wx.Button(panel, -1, "Press Me")
++-        spin = wx.SpinCtrl(panel, -1, "Hello", size=(100,-1))
+++        spin = wx.SpinCtrl(panel, -1, "Hello")
++         btn.Bind(wx.EVT_BUTTON, self.OnButton)
++ 
++         sizer = wx.BoxSizer(wx.VERTICAL)
++diff --git a/demo/PrintFramework.py b/demo/PrintFramework.py
++index e7a29a077..f0873ae94 100644
++--- a/demo/PrintFramework.py
+++++ b/demo/PrintFramework.py
++@@ -81,7 +81,7 @@ def OnPrintPage(self, page):
++ 
++         #-------------------------------------------
++         self.canvas.DoDrawing(dc, True)
++-        dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
+++        dc.DrawText("Page: %d" % page, marginX//2, maxY-marginY)
++ 
++         return True
++ 
++diff --git a/demo/PropertyGrid.py b/demo/PropertyGrid.py
++index c56e08b60..fbef29e31 100644
++--- a/demo/PropertyGrid.py
+++++ b/demo/PropertyGrid.py
++@@ -150,7 +150,7 @@ def _ConvertValue(self, value):
++         """ Utility convert arbitrary value to a real wx.Size.
++         """
++         import collections
++-        if isinstance(value, collections.Sequence) or hasattr(value, '__getitem__'):
+++        if isinstance(value, collections.abc.Sequence) or hasattr(value, '__getitem__'):
++             value = wx.Size(*value)
++         return value
++ 
++diff --git a/demo/Sizers.py b/demo/Sizers.py
++index 6ababede9..a025050f1 100644
++--- a/demo/Sizers.py
+++++ b/demo/Sizers.py
++@@ -45,7 +45,7 @@ def OnPaint(self, evt):
++         dc = wx.PaintDC(self)
++         w,h = dc.GetTextExtent(self.text)
++         dc.Clear()
++-        dc.DrawText(self.text, (sz.width-w)/2, (sz.height-h)/2)
+++        dc.DrawText(self.text, (sz.width-w)//2, (sz.height-h)//2)
++ 
++     def OnSize(self, evt):
++         self.Refresh()
++diff --git a/demo/UIActionSimulator.py b/demo/UIActionSimulator.py
++index cbba14f5c..0a6fd0234 100644
++--- a/demo/UIActionSimulator.py
+++++ b/demo/UIActionSimulator.py
++@@ -88,7 +88,7 @@ def _playbackKey(self, evtType, key, modifiers):
++ 
++     def _setNextKeyEvent(self):
++         evtType, key, modifiers, milli = self._playbackEvents.pop(0)
++-        milli = max(milli/2, 1) # play back faster than it was recorded
+++        milli = max(milli//2, 1) # play back faster than it was recorded
++         print(evtType, key, modifiers, milli)
++         wx.CallLater(milli, self._playbackKey, evtType, key, modifiers)
++ 
++diff --git a/demo/agw/AUI.py b/demo/agw/AUI.py
++index 7c2196865..b38313c86 100644
++--- a/demo/agw/AUI.py
+++++ b/demo/agw/AUI.py
++@@ -393,7 +393,7 @@ def OnPaint(self, event):
++         dc.SetPen(wx.LIGHT_GREY_PEN)
++         dc.DrawLine(0, 0, size.x, size.y)
++         dc.DrawLine(0, size.y, size.x, 0)
++-        dc.DrawText(s, (size.x-w)/2, (size.y-height*5)/2)
+++        dc.DrawText(s, (size.x-w)//2, (size.y-height*5)//2)
++ 
++         if self._mgr:
++ 
++@@ -401,19 +401,19 @@ def OnPaint(self, event):
++ 
++             s = "Layer: %d"%pi.dock_layer
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*1))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*1))
++ 
++             s = "Dock: %d Row: %d"%(pi.dock_direction, pi.dock_row)
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*2))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*2))
++ 
++             s = "Position: %d"%pi.dock_pos
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*3))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*3))
++ 
++             s = "Proportion: %d"%pi.dock_proportion
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*4))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*4))
++ 
++ 
++     def OnEraseBackground(self, event):
++@@ -435,7 +435,7 @@ def __init__(self, parent, frame):
++ 
++         s1 = wx.BoxSizer(wx.HORIZONTAL)
++         self._border_size = wx.SpinCtrl(self, ID_PaneBorderSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE),
++-                                        wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100,
+++                                        wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100,
++                                         frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE))
++         s1.Add((1, 1), 1, wx.EXPAND)
++         s1.Add(wx.StaticText(self, -1, "Pane Border Size:"))
++@@ -445,7 +445,7 @@ def __init__(self, parent, frame):
++ 
++         s2 = wx.BoxSizer(wx.HORIZONTAL)
++         self._sash_size = wx.SpinCtrl(self, ID_SashSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE), wx.DefaultPosition,
++-                                      wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
+++                                      wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
++         s2.Add((1, 1), 1, wx.EXPAND)
++         s2.Add(wx.StaticText(self, -1, "Sash Size:"))
++         s2.Add(self._sash_size)
++@@ -454,7 +454,7 @@ def __init__(self, parent, frame):
++ 
++         s3 = wx.BoxSizer(wx.HORIZONTAL)
++         self._caption_size = wx.SpinCtrl(self, ID_CaptionSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE),
++-                                         wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
+++                                         wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
++         s3.Add((1, 1), 1, wx.EXPAND)
++         s3.Add(wx.StaticText(self, -1, "Caption Size:"))
++         s3.Add(self._caption_size)
++@@ -807,9 +807,9 @@ def LightColour(self, colour, percent):
++ 
++         # We take the percent way of the colour from colour -> white
++         i = percent
++-        r = colour.Red() + ((i*rd*100)/high)/100
++-        g = colour.Green() + ((i*gd*100)/high)/100
++-        b = colour.Blue() + ((i*bd*100)/high)/100
+++        r = colour.Red() + ((i*rd*100)//high)//100
+++        g = colour.Green() + ((i*gd*100)//high)//100
+++        b = colour.Blue() + ((i*bd*100)//high)//100
++ 
++         return wx.Colour(r, g, b)
++ 
++@@ -826,10 +826,10 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++         x, y, width, height = clientRect
++         x, width = self._pos, interval
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2)
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2)
++         topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-        rc1 = wx.Rect(x, y, width, height/2)
+++        rc1 = wx.Rect(int(x), y, int(width), height//2)
++         path1 = self.GetPath(gc, rc1, 8)
++         br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++         gc.SetBrush(br1)
++@@ -845,14 +845,14 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++ 
++         bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-        rc3 = wx.Rect(x, y+height/2, width, height/2)
+++        rc3 = wx.Rect(int(x), y+height//2, int(width), height//2)
++         path3 = self.GetPath(gc, rc3, 8)
++         br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++         gc.SetBrush(br3)
++         gc.FillPath(path3) #draw main
++ 
++         path4 = gc.CreatePath()
++-        path4.AddRectangle(x, y+height/2, width, 8)
+++        path4.AddRectangle(x, y+height//2, width, 8)
++         path4.CloseSubpath()
++         gc.SetBrush(br3)
++         gc.FillPath(path4)
++@@ -2613,7 +2613,7 @@ def CreateNotebook(self):
++         flex.Add(wx.TextCtrl(panel, -1, "", wx.DefaultPosition, wx.Size(100, -1)),
++                  1, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add(wx.StaticText(panel, -1, "wxSpinCtrl:"), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++-        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.Size(100, -1),
+++        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.DefaultSize,
++                              wx.SP_ARROW_KEYS, 5, 50, 5), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add((5, 5))
++         flex.Add((5, 5))
++diff --git a/demo/agw/MacLargeDemo.py b/demo/agw/MacLargeDemo.py
++index 4d967a546..a5b8a0e25 100644
++--- a/demo/agw/MacLargeDemo.py
+++++ b/demo/agw/MacLargeDemo.py
++@@ -223,12 +223,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = int((w * percent)/100)
++ 
++         if w < 1:
++             return
++diff --git a/demo/agw/PeakMeter.py b/demo/agw/PeakMeter.py
++index a7c9a6f51..e9dab7116 100644
++--- a/demo/agw/PeakMeter.py
+++++ b/demo/agw/PeakMeter.py
++@@ -149,10 +149,10 @@ def OnFalloff(self, event):
++ 
++     def OnStart(self, event):
++ 
++-        self.timer.Start(1000/2)        # 2 fps
+++        self.timer.Start(1000//2)        # 2 fps
++ 
++-        self.vertPeak.Start(1000/18)        # 18 fps
++-        self.horzPeak.Start(1000/20)        # 20 fps
+++        self.vertPeak.Start(1000//18)        # 18 fps
+++        self.horzPeak.Start(1000//20)        # 20 fps
++ 
++ 
++     def OnStop(self, event):
++diff --git a/demo/agw/PersistentControls.py b/demo/agw/PersistentControls.py
++index f19cc4a91..cf97dd9f0 100644
++--- a/demo/agw/PersistentControls.py
+++++ b/demo/agw/PersistentControls.py
++@@ -234,7 +234,7 @@ def BuildPanes(self):
++         sizer_1.Add(label_1, 0, wx.ALL, 5)
++         sizer_1.Add(combo, 0, wx.LEFT|wx.RIGHT, 5)
++         sizer_1.Add((20, 20), 1)
++-        box2.Add(sizer_1, 1, wx.EXPAND|wx.ALIGN_CENTER, 0)
+++        box2.Add(sizer_1, 1, wx.EXPAND, 0)
++         box2.Add((0, 0), 1, 1)
++ 
++         otherPanel.SetSizer(box2)
++diff --git a/demo/agw/RibbonBar.py b/demo/agw/RibbonBar.py
++index 7103e9d81..d28a2c66a 100644
++--- a/demo/agw/RibbonBar.py
+++++ b/demo/agw/RibbonBar.py
++@@ -799,7 +799,7 @@ def AddColourToGallery(self, gallery, colour, dc, value=None):
++                                        (c.Blue() + 192) % 256)
++ 
++             dc.SetTextForeground(foreground)
++-            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) / 2, (iHeight - size.GetHeight()) / 2)
+++            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) // 2, (iHeight - size.GetHeight()) // 2)
++             dc.SelectObjectAsSource(wx.NullBitmap)
++ 
++             item = gallery.Append(bitmap, wx.ID_ANY)
++diff --git a/demo/agw/SpeedMeter.py b/demo/agw/SpeedMeter.py
++index 9f0fdebb2..575e84a80 100644
++--- a/demo/agw/SpeedMeter.py
+++++ b/demo/agw/SpeedMeter.py
++@@ -418,7 +418,7 @@ def __init__(self, parent, log):
++         bsizer3 = wx.BoxSizer(wx.VERTICAL)
++ 
++         hsizer3 = wx.BoxSizer(wx.HORIZONTAL)
++-        sc = wx.SpinCtrl(panel3, -1, size=(60,20))
+++        sc = wx.SpinCtrl(panel3, -1)
++         sc.SetRange(1, 250)
++         sc.SetValue(50)
++ 
++diff --git a/demo/agw/SuperToolTip.py b/demo/agw/SuperToolTip.py
++index 5e65f06b1..88728e54e 100644
++--- a/demo/agw/SuperToolTip.py
+++++ b/demo/agw/SuperToolTip.py
++@@ -43,7 +43,7 @@ def __init__(self, parent):
++         self.topColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.WHITE)
++         system = wx.SystemSettings.GetColour(wx.SYS_COLOUR_ACTIVECAPTION)
++         r, g, b, a = system
++-        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)/2, (255-g)/2, (255-b)/2))
+++        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)//2, (255-g)//2, (255-b)//2))
++         self.bottomColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=system)
++         self.headerCheck = wx.CheckBox(self.mainPanel, -1, "Show Header")
++         self.headerText = wx.TextCtrl(self.mainPanel, -1, "Merge And Center")
++@@ -233,7 +233,6 @@ def DoLayout(self):
++         frameSizer.Add(self.mainPanel, 1, wx.EXPAND, 0)
++         self.SetSizer(frameSizer)
++         frameSizer.Layout()
++-        frameSizer.Fit(self)
++         self.Layout()
++ 
++         wx.CallAfter(mainSizer.Layout)
++diff --git a/demo/agw/UltimateReportDemo.py b/demo/agw/UltimateReportDemo.py
++index 40f49cb8f..ad455847b 100644
++--- a/demo/agw/UltimateReportDemo.py
+++++ b/demo/agw/UltimateReportDemo.py
++@@ -216,7 +216,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         mdc.SetFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
++         text = "%d Mb"%self.progressValue
++         textWidth, dummy = mdc.GetTextExtent(text)
++-        mdc.DrawText(text, rect.width/2 - textWidth/2, rect.height/2 - dummy/2)
+++        mdc.DrawText(text, rect.width//2 - textWidth//2, rect.height//2 - dummy//2)
++         dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
++         dc.Blit(rect.x+3, rect.y, rect.width-6, rect.height, mdc, 0, 0)
++         dc.DestroyClippingRegion()
++@@ -279,12 +279,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = (w * percent)//100
++ 
++         if middle == 0: # not started
++             bitmap = self.REMAINING_BITMAP.GetSubBitmap((1, 0, w, PIPE_HEIGHT))
++@@ -335,7 +335,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         colours = [wx.RED, wx.WHITE, wx.GREEN, wx.Colour("SKY BLUE")]
++         w, h = dc.GetTextExtent("Hg")
++         x = rect.x + 1
++-        y = rect.y + rect.height/2 - h/2
+++        y = rect.y + rect.height//2 - h//2
++ 
++         for ch in self.text:
++             dc.SetTextForeground(random.choice(colours))
++diff --git a/demo/agw/Windows7Explorer_Contents.py b/demo/agw/Windows7Explorer_Contents.py
++index f754d7879..b23df0e1a 100644
++--- a/demo/agw/Windows7Explorer_Contents.py
+++++ b/demo/agw/Windows7Explorer_Contents.py
++@@ -127,13 +127,13 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         """Draw a custom progress bar using double buffering to prevent flicker"""
++ 
++         bmpWidth, bmpHeight = self.icon.GetWidth(), self.icon.GetHeight()
++-        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)/2)
+++        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)//2)
++ 
++         dc.SetFont(self.normalFont)
++ 
++         textWidth, textHeight = dc.GetTextExtent(self.text)
++         dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
++-        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.description:
++             return
++@@ -144,10 +144,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Type: " + self.description)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++@@ -207,10 +207,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Date modified: " + date)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.size:
++             return
++@@ -218,10 +218,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         dummy1, dummy2= dc.GetTextExtent("Size: ")
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++diff --git a/demo/agw/ZoomBar.py b/demo/agw/ZoomBar.py
++index 376ce349b..14b0278e7 100644
++--- a/demo/agw/ZoomBar.py
+++++ b/demo/agw/ZoomBar.py
++@@ -55,7 +55,7 @@ def __init__(self, parent, log):
++         reflections = glob.glob(bitmapDir + "/*96Flip40.png")
++ 
++         separatorImage = bitmapDir + "/separator.gif"
++-        separatorReflection = bitmapDir + "/separatorFlip.png"
+++        separatorReflection = bitmapDir + "/separatorflip.png"
++         count = 0
++ 
++         for std, ref in zip(standard, reflections):
++diff --git a/wx/lib/agw/advancedsplash.py b/wx/lib/agw/advancedsplash.py
++index 1f8c32df5..d351ea06e 100644
++--- a/wx/lib/agw/advancedsplash.py
+++++ b/wx/lib/agw/advancedsplash.py
++@@ -438,7 +438,7 @@ def SetTextFont(self, font=None):
++ 
++         if font is None:
++             self._textfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._textsize = 10.0
+++            self._textsize = 10
++             self._textfont.SetPointSize(self._textsize)
++         else:
++             self._textfont = font
++diff --git a/wx/lib/agw/aui/auibook.py b/wx/lib/agw/aui/auibook.py
++index ba7cf4721..f5ad2a568 100644
++--- a/wx/lib/agw/aui/auibook.py
+++++ b/wx/lib/agw/aui/auibook.py
++@@ -3452,8 +3452,8 @@ def CalculateNewSplitSize(self):
++         # should happen around the middle
++         if tab_ctrl_count < 2:
++             new_split_size = self.GetClientSize()
++-            new_split_size.x /= 2
++-            new_split_size.y /= 2
+++            new_split_size.x //= 2
+++            new_split_size.y //= 2
++ 
++         else:
++ 
++diff --git a/wx/lib/agw/balloontip.py b/wx/lib/agw/balloontip.py
++index b4155d74a..57baca729 100644
++--- a/wx/lib/agw/balloontip.py
+++++ b/wx/lib/agw/balloontip.py
++@@ -615,7 +615,7 @@ def SetStartDelay(self, delay=1):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Creation Should Be Greater Than 1 ms")
++ 
++-        self._startdelaytime = float(delay)
+++        self._startdelaytime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -640,7 +640,7 @@ def SetEndDelay(self, delay=1e6):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Destruction Should Be Greater Than 1 ms")
++ 
++-        self._enddelaytime = float(delay)
+++        self._enddelaytime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/flatmenu.py b/wx/lib/agw/flatmenu.py
++index 5ba28e584..85f295b86 100644
++--- a/wx/lib/agw/flatmenu.py
+++++ b/wx/lib/agw/flatmenu.py
++@@ -736,8 +736,8 @@ def DrawSeparator(self, dc, xCoord, yCoord, textX, sepWidth):
++         """
++ 
++         dcsaver = DCSaver(dc)
++-        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth/2, 1)
++-        sepRect2 = wx.Rect(xCoord + textX + sepWidth/2, yCoord + 1, sepWidth/2-1, 1)
+++        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth//2, 1)
+++        sepRect2 = wx.Rect(xCoord + textX + sepWidth//2, yCoord + 1, sepWidth//2-1, 1)
++ 
++         artMgr = ArtManager.Get()
++         backColour = artMgr.GetMenuFaceColour()
++@@ -817,11 +817,11 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             imgWidth  = bmp.GetWidth()
++ 
++             if imageMarginX == 0:
++-                xx = rect.x + (leftMarginWidth - imgWidth)/2
+++                xx = rect.x + (leftMarginWidth - imgWidth)//2
++             else:
++-                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)/2 + rect.height
+++                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)//2 + rect.height
++ 
++-            yy = rect.y + (rect.height - imgHeight)/2
+++            yy = rect.y + (rect.height - imgHeight)//2
++             dc.DrawBitmap(bmp, xx, yy, True)
++ 
++         if item.GetKind() == wx.ITEM_CHECK:
++@@ -837,7 +837,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         if item.GetKind() == wx.ITEM_RADIO:
++ 
++@@ -852,7 +852,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         # Draw text - without accelerators
++         text = item.GetLabel()
++@@ -890,7 +890,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 w3, dummy = dc.GetTextExtent(text3)
++ 
++                 posx = xCoord + textX + borderXSize
++-                posy = (itemHeight - h)/2 + yCoord
+++                posy = (itemHeight - h)//2 + yCoord
++ 
++                 # Draw first part
++                 dc.DrawText(text1, posx, posy)
++@@ -912,7 +912,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             else:
++ 
++                 w, h = dc.GetTextExtent(text)
++-                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)/2 + yCoord)
+++                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)//2 + yCoord)
++ 
++ 
++         # Now draw accelerator
++@@ -920,7 +920,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++         if item.GetAccelString():
++ 
++             accelWidth, accelHeight = dc.GetTextExtent(item.GetAccelString())
++-            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)/2 + yCoord)
+++            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)//2 + yCoord)
++ 
++         # Check if this item has sub-menu - if it does, draw
++         # right arrow on the right margin
++@@ -932,7 +932,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++ 
++             xx = xCoord + rightMarginX + borderXSize
++             rr = wx.Rect(xx, rect.y + 1, rect.height-2, rect.height-2)
++-            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)/2, True)
+++            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)//2, True)
++ 
++ 
++     def DrawMenuBarButton(self, dc, rect, state):
++@@ -1142,7 +1142,7 @@ def DrawMenuBar(self, menubar, dc):
++             # Get the menu item rect
++             textWidth, textHeight = dc.GetTextExtent(fixedText)
++             #rect = wx.Rect(posx+menubar._spacer/2, posy, textWidth, textHeight)
++-            rect = wx.Rect(posx+padding/2, posy, textWidth, textHeight)
+++            rect = wx.Rect(posx+padding//2, posy, textWidth, textHeight)
++ 
++             # Can we draw more??
++             # the +DROP_DOWN_ARROW_WIDTH  is the width of the drop down arrow
++@@ -1172,7 +1172,7 @@ def DrawMenuBar(self, menubar, dc):
++                 dc.SetTextForeground(textColour)
++ 
++             ww, hh = dc.GetTextExtent(labelOnly)
++-            textOffset = (rect.width - ww) / 2
+++            textOffset = (rect.width - ww) // 2
++ 
++             if not menubar._isLCD and item.GetTextBitmap().IsOk() and not selected:
++                 dc.DrawBitmap(item.GetTextBitmap(), rect.x, rect.y, True)
++@@ -1505,8 +1505,8 @@ def DrawButtonColour(self, dc, rect, state, colour):
++         baseColour = colour
++ 
++         # Define the middle points
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, rect.y + (rect.height // 2))
+++        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height // 2))
++ 
++         # Define the top region
++         top = wx.Rect((rect.GetLeft(), rect.GetTop()), rightPt)
++@@ -1572,11 +1572,11 @@ def DrawMenuBarBackground(self, dc, rect):
++ 
++         factor = artMgr.GetMenuBgFactor()
++ 
++-        leftPt1 = wx.Point(rect.x, rect.y + (rect.height / factor))
++-        leftPt2 = wx.Point(rect.x, rect.y + (rect.height / factor)*(factor-1))
+++        leftPt1 = wx.Point(rect.x, rect.y + (rect.height // factor))
+++        leftPt2 = wx.Point(rect.x, rect.y + (rect.height // factor)*(factor-1))
++ 
++-        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor))
++-        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor)*(factor-1))
+++        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor))
+++        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor)*(factor-1))
++ 
++         # Define the top region
++         topReg = [wx.Point() for ii in range(7)]
++@@ -2707,7 +2707,7 @@ def DrawToolbar(self, dc, rect):
++             elif tbItem.IsCustomControl():
++                 control = tbItem.GetCustomControl()
++                 ctrlSize = control.GetSize()
++-                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)/2)
+++                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)//2)
++                 if control.GetPosition() != ctrlPos:
++                     control.SetPosition(ctrlPos)
++ 
++@@ -2727,9 +2727,9 @@ def DrawToolbar(self, dc, rect):
++             # Draw the toolbar image
++             if bmp.IsOk():
++ 
++-                x = xx - self._toolbarSpacer/2
+++                x = xx - self._toolbarSpacer//2
++                 #y = rect.y + (rect.height - bmp.GetHeight())/2 - 1
++-                y = rect.y + self._toolbarMargin/2
+++                y = rect.y + self._toolbarMargin//2
++ 
++                 buttonRect = wx.Rect(x, y, highlight_width, highlight_height)
++ 
++@@ -2745,8 +2745,8 @@ def DrawToolbar(self, dc, rect):
++                     else:
++                         self._tbButtons[i]._state = ControlNormal
++ 
++-                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())/2
++-                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())/2
+++                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())//2
+++                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())//2
++ 
++                 if self._tbButtons[i]._state == ControlFocus and not self._tbButtons[i]._tbItem.IsSelected():
++ 
++@@ -2827,8 +2827,8 @@ def DrawMoreButton(self, dc, state):
++         dropArrowBmp = self.GetRenderer()._bitmaps["arrow_down"]
++ 
++         # Calc the image coordinates
++-        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())/2
+++        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())//2
++ 
++         dc.DrawBitmap(dropArrowBmp, xx, yy + self._spacer, True)
++         self._dropDownButtonState = state
++@@ -3269,8 +3269,8 @@ def DrawToolbarItem(self, dc, idx, state):
++ 
++         # draw the bitmap over the highlight
++         buttonRect = wx.Rect(*rect)
++-        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())/2
++-        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())/2
+++        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())//2
+++        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())//2
++ 
++         if state == ControlFocus:
++ 
++@@ -3784,7 +3784,7 @@ def PositionAUI(self, mgr, fixToolbar=True):
++         pn.Name("flat_menu_bar")
++         pn.Caption("Menu Bar")
++         pn.Top()
++-        pn.MinSize(wx.Size(xx/2, self._barHeight))
+++        pn.MinSize(wx.Size(xx//2, self._barHeight))
++         pn.LeftDockable(False)
++         pn.RightDockable(False)
++         pn.ToolbarPane()
++@@ -3997,8 +3997,8 @@ def Draw(self, dc):
++         """
++ 
++         rect = wx.Rect(self._pos, self._size)
++-        xx = rect.x + (rect.width - self._normalBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - self._normalBmp.GetHeight())/2
+++        xx = rect.x + (rect.width - self._normalBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - self._normalBmp.GetHeight())//2
++ 
++         self._parent.GetRenderer().DrawScrollButton(dc, rect, self._state)
++         dc.DrawBitmap(self._normalBmp, xx, yy, True)
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index f5e5200b2..561749b89 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -858,9 +858,9 @@ def PaintStraightGradientBox(dc, rect, startColour, endColour, vertical=True):
++ 
++     for i in range(high+1):
++ 
++-        r = startColour.Red() + ((i*rd*100)/high)/100
++-        g = startColour.Green() + ((i*gd*100)/high)/100
++-        b = startColour.Blue() + ((i*bd*100)/high)/100
+++        r = startColour.Red() + ((i*rd*100)//high)//100
+++        g = startColour.Green() + ((i*gd*100)//high)//100
+++        b = startColour.Blue() + ((i*bd*100)//high)//100
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++@@ -2631,9 +2631,9 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         imageYCoord = (pc.HasAGWFlag(FNB_BOTTOM) and [6] or [8])[0]
++ 
++         if hasImage:
++-            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints/2
+++            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints//2
++         else:
++-            textOffset = pc._pParent._nPadding + shapePoints/2
+++            textOffset = pc._pParent._nPadding + shapePoints//2
++ 
++         textOffset += 2
++ 
++diff --git a/wx/lib/agw/floatspin.py b/wx/lib/agw/floatspin.py
++index bdbaf85ec..4559eb5de 100644
++--- a/wx/lib/agw/floatspin.py
+++++ b/wx/lib/agw/floatspin.py
++@@ -336,7 +336,7 @@ class FloatSpin(wx.Control):
++     """
++ 
++     def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++-                 size=(95,-1), style=0, value=0.0, min_val=None, max_val=None,
+++                 size=wx.DefaultSize, style=0, value=0.0, min_val=None, max_val=None,
++                  increment=1.0, digits=-1, agwStyle=FS_LEFT,
++                  name="FloatSpin"):
++         """
++diff --git a/wx/lib/agw/gradientbutton.py b/wx/lib/agw/gradientbutton.py
++index c4633b296..58625c508 100644
++--- a/wx/lib/agw/gradientbutton.py
+++++ b/wx/lib/agw/gradientbutton.py
++@@ -412,14 +412,14 @@ def OnPaint(self, event):
++ 
++         x, y, width, height = clientRect
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2 + ((capture==self and [1] or [0])[0]))
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2 + ((capture==self and [1] or [0])[0]))
++         if capture != self:
++             if self._mouseAction == HOVER:
++                 topStart, topEnd = self.LightColour(self._topStartColour, 10), self.LightColour(self._topEndColour, 10)
++             else:
++                 topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-            rc1 = wx.Rect(x, y, width, height/2)
+++            rc1 = wx.Rect(x, y, width, height//2)
++             path1 = self.GetPath(gc, rc1, 8)
++             br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++             gc.SetBrush(br1)
++@@ -448,7 +448,7 @@ def OnPaint(self, event):
++             else:
++                 bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-            rc3 = wx.Rect(x, y+height/2, width, height/2)
+++            rc3 = wx.Rect(x, y+height//2, width, height//2)
++             path3 = self.GetPath(gc, rc3, 8)
++             br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++             gc.SetBrush(br3)
++@@ -463,7 +463,7 @@ def OnPaint(self, event):
++             shadowOffset = 0
++         else:
++ 
++-            rc2 = wx.Rect(x+1, gradientRect.height/2, gradientRect.width, gradientRect.height)
+++            rc2 = wx.Rect(x+1, gradientRect.height//2, gradientRect.width, gradientRect.height)
++             path2 = self.GetPath(gc, rc2, 8)
++             gc.SetPen(wx.Pen(self._pressedBottomColour))
++             gc.SetBrush(wx.Brush(self._pressedBottomColour))
++diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py
++index 12302f3b0..377ac0121 100644
++--- a/wx/lib/agw/hypertreelist.py
+++++ b/wx/lib/agw/hypertreelist.py
++@@ -3437,7 +3437,7 @@ def PaintLevel(self, item, dc, level, y, x_maincol):
++ 
++             if not self.HasAGWFlag(wx.TR_NO_LINES) and children:
++                 last_child = children[-1]
++-                Y1 = last_child.GetY() + last_child.GetHeight() / 2
+++                Y1 = last_child.GetY() + last_child.GetHeight() // 2
++                 dc.DrawLine(x, oldY, x, Y1)
++ 
++         return y, x_maincol
++diff --git a/wx/lib/agw/knobctrl.py b/wx/lib/agw/knobctrl.py
++index 742097b09..1e5045ff6 100644
++--- a/wx/lib/agw/knobctrl.py
+++++ b/wx/lib/agw/knobctrl.py
++@@ -325,7 +325,7 @@ def OnSize(self,event):
++         memory.Clear()
++ 
++         minradius = min(0.9*self.Width/2.0, 0.9*self.Height/2.0)
++-        memory.DrawCircle(self.Width//2, self.Height//2, minradius)
+++        memory.DrawCircle(self.Width//2, self.Height//2, int(minradius))
++         memory.SelectObject(wx.NullBitmap)
++         self._region = wx.Region(self._Buffer, self.GetBackgroundColour())
++         self._minradius = minradius
++@@ -645,8 +645,8 @@ def DrawTags(self, dc, size):
++             dxi = math.cos(angle)*((width - xshift + tagLen - 6)/2.0 - tagLen)
++             dyi = math.sin(angle)*((height - yshift + tagLen - 6)/2.0 - tagLen)
++ 
++-            dc.DrawLine(width//2 - sxi, height//2 - syi,
++-                        width//2 - dxi, height//2 - dyi)
+++            dc.DrawLine(int(width//2 - sxi), int(height//2 - syi),
+++                        int(width//2 - dxi), int(height//2 - dyi))
++ 
++ 
++     def DrawDiagonalGradient(self, dc, size):
++@@ -759,8 +759,8 @@ def DrawInsetCircle(self, dc, pencolour):
++         p1 = wx.Pen(self.OffsetColour(pencolour, -70), 2)
++         p2 = wx.Pen(self.OffsetColour(pencolour, 10), 1)
++ 
++-        pt1 = wx.Point(cx-r*math.sqrt(2)/2.0, cy+r*math.sqrt(2)/2.0)
++-        pt2 = wx.Point(cx+r*math.sqrt(2)/2.0, cy-r*math.sqrt(2)/2.0)
+++        pt1 = wx.Point(int(cx-r*math.sqrt(2)/2.0), int(cy+r*math.sqrt(2)/2.0))
+++        pt2 = wx.Point(int(cx+r*math.sqrt(2)/2.0), int(cy-r*math.sqrt(2)/2.0))
++ 
++         dc.SetPen(p2)
++         dc.DrawArc(pt1, pt2, (cx, cy))
++@@ -779,7 +779,7 @@ def DrawBoundingCircle(self, dc, size):
++         radius = 0.9*min(size.x, size.y)/2.0
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++         dc.SetPen(wx.Pen(self._boundingcolour))
++-        dc.DrawCircle(self.Width//2, self.Height//2, radius)
+++        dc.DrawCircle(self.Width//2, self.Height//2, int(radius))
++ 
++ 
++     def CircleCoords(self, radius, angle, centerX, centerY):
++diff --git a/wx/lib/agw/labelbook.py b/wx/lib/agw/labelbook.py
++index b716df3a2..f8c9cd54d 100644
++--- a/wx/lib/agw/labelbook.py
+++++ b/wx/lib/agw/labelbook.py
++@@ -1376,13 +1376,13 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    imgXcoord = self._nImgSize / 2
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize / 2] or [pos + imgTopPadding])[0]
+++                    imgXcoord = self._nImgSize // 2
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize // 2] or [pos + imgTopPadding])[0]
++ 
++                 else:
++ 
++-                    imgXcoord = pos + (rectWidth / 2) - (self._nImgSize / 2)
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize / 2] or [imgTopPadding])[0]
+++                    imgXcoord = pos + (rectWidth // 2) - (self._nImgSize // 2)
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize // 2] or [imgTopPadding])[0]
++ 
++                 self._ImageList.Draw(self._pagesInfoVec[i].GetImageIndex(), dc,
++                                      imgXcoord, imgYcoord,
++@@ -1408,15 +1408,15 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    textOffsetX = ((rectWidth - textWidth) / 2 )
+++                    textOffsetX = ((rectWidth - textWidth) // 2 )
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT  and [pos + self._nImgSize  + imgTopPadding + 3] or \
++-                                       [pos + ((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [pos + ((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 else:
++ 
++-                    textOffsetX = (rectWidth - textWidth) / 2  + pos + nTextPaddingLeft
+++                    textOffsetX = (rectWidth - textWidth) // 2  + pos + nTextPaddingLeft
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT and [self._nImgSize + imgTopPadding + 3] or \
++-                                       [((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
++                 dc.DrawText(fixedText, textOffsetX, textOffsetY)
++@@ -1591,8 +1591,8 @@ def OnPaint(self, event):
++             # Draw gradient in the background area
++             startColour = self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR]
++             endColour   = ArtManager.Get().LightColour(self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR], 50)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x / 2, size.y), startColour, endColour, False)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x / 2, 0, size.x / 2, size.y), endColour, startColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x // 2, size.y), startColour, endColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x // 2, 0, size.x // 2, size.y), endColour, startColour, False)
++ 
++         else:
++ 
++@@ -1638,7 +1638,7 @@ def OnPaint(self, event):
++ 
++             if self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++                 font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-                font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++                font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++                 if self.GetParent().GetFontBold():
++                     font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -1954,7 +1954,7 @@ def DrawWebHover(self, dc, caption, xCoord, yCoord, selected):
++ 
++         # Redraw the text with underlined font
++         underLinedFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        underLinedFont.SetPointSize(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        underLinedFont.SetPointSize(int(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++         if self.GetParent().GetFontBold():
++             underLinedFont.SetWeight(wx.FONTWEIGHT_BOLD)
++         elif self.HasAGWFlag(INB_BOLD_TAB_SELECTION) and selected:
++@@ -2050,7 +2050,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++         imgRect = wx.Rect(*rect)
++ 
++         font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++         if self.GetParent().GetFontBold():
++             font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -2069,7 +2069,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++         # Text bounding rectangle
++         textRect.x += nPadding
++-        textRect.y = rect.y + (rect.height - h)/2
+++        textRect.y = rect.y + (rect.height - h)//2
++         textRect.width = rect.width - 2 * nPadding
++ 
++         if bmp.IsOk() and not self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++@@ -2086,7 +2086,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++             imgRect.x += nPadding
++             imgRect.width = bmp.GetWidth()
++-            imgRect.y = rect.y + (rect.height - bmp.GetHeight())/2
+++            imgRect.y = rect.y + (rect.height - bmp.GetHeight())//2
++             imgRect.height = bmp.GetHeight()
++ 
++         # Draw bounding rectangle
++@@ -2496,7 +2496,7 @@ def ResizeTabArea(self):
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(1, 1))
++             font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-            font.SetPointSize(font.GetPointSize()*self._fontSizeMultiple)
+++            font.SetPointSize(int(font.GetPointSize()*self._fontSizeMultiple))
++             if self.GetFontBold() or agwStyle & INB_BOLD_TAB_SELECTION:
++                 font.SetWeight(wx.FONTWEIGHT_BOLD)
++             dc.SetFont(font)
++diff --git a/wx/lib/agw/peakmeter.py b/wx/lib/agw/peakmeter.py
++index 055dbef81..a5f88a9d5 100644
++--- a/wx/lib/agw/peakmeter.py
+++++ b/wx/lib/agw/peakmeter.py
++@@ -784,7 +784,7 @@ def DrawHorzBand(self, dc, rect):
++                 maxWidth = size.x*horzBands
++                 points = [wx.Point() for i in range(2)]
++                 points[0].y = rectPrev.GetTopRight().y - yDecal
++-                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth/self._maxValue
+++                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth//self._maxValue
++                 points[1].y = rectPrev.GetBottomLeft().y + yDecal
++                 points[1].x = points[0].x
++                 dc.SetPen(pen)
++diff --git a/wx/lib/agw/pygauge.py b/wx/lib/agw/pygauge.py
++index bab459a3a..b8654436a 100644
++--- a/wx/lib/agw/pygauge.py
+++++ b/wx/lib/agw/pygauge.py
++@@ -344,7 +344,7 @@ def OnPaint(self, event):
++                 c1,c2 = gradient
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.GradientFillLinear(r, c1, c2, wx.EAST)
++         else:
++             for i, colour in enumerate(self._barColourSorted):
++@@ -352,7 +352,7 @@ def OnPaint(self, event):
++                 dc.SetPen(wx.Pen(colour))
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.DrawRectangle(r)
++ 
++ 
++diff --git a/wx/lib/agw/ribbon/art_aui.py b/wx/lib/agw/ribbon/art_aui.py
++index a1d255843..31fedf487 100644
++--- a/wx/lib/agw/ribbon/art_aui.py
+++++ b/wx/lib/agw/ribbon/art_aui.py
++@@ -390,7 +390,7 @@ def DrawTab(self, dc, wnd, tab):
++             grad_rect = wx.Rect(*tab.rect)
++             grad_rect.height -= 4
++             grad_rect.width -= 1
++-            grad_rect.height /= 2
+++            grad_rect.height //= 2
++             grad_rect.y = grad_rect.y + tab.rect.height - grad_rect.height - 1
++             dc.SetBrush(self._tab_active_top_background_brush)
++             dc.DrawRectangle(tab.rect.x, tab.rect.y + 3, tab.rect.width - 1, grad_rect.y - tab.rect.y - 3)
++@@ -401,7 +401,7 @@ def DrawTab(self, dc, wnd, tab):
++             btm_rect = wx.Rect(*tab.rect)
++             btm_rect.height -= 4
++             btm_rect.width -= 1
++-            btm_rect.height /= 2
+++            btm_rect.height //= 2
++             btm_rect.y = btm_rect.y + tab.rect.height - btm_rect.height - 1
++             dc.SetBrush(self._tab_hover_background_brush)
++             dc.DrawRectangle(btm_rect.x, btm_rect.y, btm_rect.width, btm_rect.height)
++@@ -434,8 +434,8 @@ def DrawTab(self, dc, wnd, tab):
++             icon = tab.page.GetIcon()
++             if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++                 if icon.IsOk():
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
++-                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
+++                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -450,7 +450,7 @@ def DrawTab(self, dc, wnd, tab):
++                     offset += icon.GetWidth() + 2
++ 
++                 text_width, text_height = dc.GetTextExtent(label)
++-                x = (tab.rect.width - 2 - text_width - offset) / 2
+++                x = (tab.rect.width - 2 - text_width - offset) // 2
++                 if x > 8:
++                     x = 8
++                 elif x < 1:
++@@ -458,7 +458,7 @@ def DrawTab(self, dc, wnd, tab):
++ 
++                 width = tab.rect.width - x - 2
++                 x += tab.rect.x + offset
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if icon.IsOk():
++                     dc.DrawBitmap(icon, x - offset, tab.rect.y + (tab.rect.height - icon.GetHeight()) / 2, True)
++@@ -892,8 +892,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def DrawPartialPanelBackground(self, dc, wnd, rect):
++@@ -1024,7 +1024,7 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++             dc.DrawRectangle(reduced_rect.x, reduced_rect.y, reduced_rect.width, reduced_rect.height)
++             btn_bitmap = bitmaps[3]
++ 
++-        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width / 2 - 2, (rect.y + rect.height / 2) - 2, True)
+++        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width // 2 - 2, (rect.y + rect.height // 2) - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1277,7 +1277,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++             if is_split_hybrid:
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++-            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height / 2) - 2, True)
+++            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++diff --git a/wx/lib/agw/ribbon/art_internal.py b/wx/lib/agw/ribbon/art_internal.py
++index 4a8dc7ce0..78e8f3fe4 100644
++--- a/wx/lib/agw/ribbon/art_internal.py
+++++ b/wx/lib/agw/ribbon/art_internal.py
++@@ -32,9 +32,9 @@ def RibbonInterpolateColour(start_colour, end_colour, position, start_position,
++     r = end_colour.Red() - start_colour.Red()
++     g = end_colour.Green() - start_colour.Green()
++     b = end_colour.Blue() - start_colour.Blue()
++-    r = start_colour.Red()   + (((r * position * 100) / end_position) / 100)
++-    g = start_colour.Green() + (((g * position * 100) / end_position) / 100)
++-    b = start_colour.Blue()  + (((b * position * 100) / end_position) / 100)
+++    r = start_colour.Red()   + (((r * position * 100) // end_position) // 100)
+++    g = start_colour.Green() + (((g * position * 100) // end_position) // 100)
+++    b = start_colour.Blue()  + (((b * position * 100) // end_position) // 100)
++ 
++     return wx.Colour(r, g, b)
++ 
++@@ -61,9 +61,9 @@ def RibbonDrawParallelGradientLines(dc, nlines, line_origins, stepx, stepy, nums
++     bd = end_colour.Blue() - start_colour.Blue()
++ 
++     for step in range(numsteps):
++-        r = start_colour.Red() + (((step*rd*100)/numsteps)/100)
++-        g = start_colour.Green() + (((step*gd*100)/numsteps)/100)
++-        b = start_colour.Blue() + (((step*bd*100)/numsteps)/100)
+++        r = start_colour.Red() + (((step*rd*100)//numsteps)//100)
+++        g = start_colour.Green() + (((step*gd*100)//numsteps)//100)
+++        b = start_colour.Blue() + (((step*bd*100)//numsteps)//100)
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++diff --git a/wx/lib/agw/ribbon/art_msw.py b/wx/lib/agw/ribbon/art_msw.py
++index e7317d59b..00c3dfe2b 100644
++--- a/wx/lib/agw/ribbon/art_msw.py
+++++ b/wx/lib/agw/ribbon/art_msw.py
++@@ -982,7 +982,7 @@ def DrawTab(self, dc, wnd, tab):
++                 background.width -= 4
++                 background.height -= 3
++                 h = background.height
++-                background.height /= 2
+++                background.height //= 2
++                 dc.GradientFillLinear(background, self._tab_hover_background_top_colour,
++                                       self._tab_hover_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1024,9 +1024,9 @@ def DrawTab(self, dc, wnd, tab):
++             if icon.IsOk():
++                 x = tab.rect.x + 4
++                 if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
++ 
++-                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -1043,13 +1043,13 @@ def DrawTab(self, dc, wnd, tab):
++                     x += 3 + tab.page.GetIcon().GetWidth()
++                     width -= 3 + tab.page.GetIcon().GetWidth()
++ 
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if width <= text_width:
++                     dc.SetClippingRegion(x, tab.rect.y, width, tab.rect.height)
++                     dc.DrawText(label, x, y)
++                 else:
++-                    dc.DrawText(label, x + (width - text_width) / 2 + 1, y)
+++                    dc.DrawText(label, x + (width - text_width) // 2 + 1, y)
++ 
++ 
++     def DrawTabSeparator(self, dc, wnd, rect, visibility):
++@@ -1093,7 +1093,7 @@ def ReallyDrawTabSeparator(self, wnd, rect, visibility):
++         dc = wx.MemoryDC(self._cached_tab_separator)
++         self.DrawTabCtrlBackground(dc, wnd, rect)
++ 
++-        x = rect.x + rect.width / 2
+++        x = rect.x + rect.width // 2
++         h = float(rect.height - 1)
++ 
++         r1 = self._tab_ctrl_background_brush.GetColour().Red() * (1.0 - visibility) + 0.5
++@@ -1146,7 +1146,7 @@ def DrawPartialPageBackground1(self, dc, wnd, rect, page, offset, hovered=False)
++ 
++         # upper_rect, lower_rect, paint_rect are all in page co-ordinates
++         upper_rect = wx.Rect(*background)
++-        upper_rect.height /= 5
+++        upper_rect.height //= 5
++ 
++         lower_rect = wx.Rect(*background)
++         lower_rect.y += upper_rect.height
++@@ -1229,7 +1229,7 @@ def DrawPageBackground(self, dc, wnd, rect):
++         background.width -= 4
++         background.height -= 2
++ 
++-        background.height /= 5
+++        background.height //= 5
++         dc.GradientFillLinear(background, self._page_background_top_colour,
++                               self._page_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1493,10 +1493,10 @@ def DrawPanelBackground(self, dc, wnd, rect):
++ 
++         if clip_label:
++             clip = wx.DCClipper(dc, label_rect)
++-            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++         else:
++-            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) / 2,
++-                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) // 2,
+++                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++ 
++         if has_ext_button:
++             if wnd.IsExtButtonHovered():
++@@ -1577,7 +1577,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x, rect.y + rect.height - 15, rect.x + rect.width, rect.y + rect.height - 15)
++ 
++-            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width / 3, 15)
+++            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width // 3, 15)
++             down_btn = wx.Rect(up_btn.GetRight() + 1, up_btn.GetTop(), up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetLeft(), down_btn.GetBottom())
++             ext_btn = wx.Rect(down_btn.GetRight() + 1, up_btn.GetTop(), rect.width - up_btn.GetWidth() - down_btn.GetWidth() - 1, up_btn.GetHeight())
++@@ -1587,7 +1587,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x + rect.width - 15, rect.y, rect.x + rect.width - 15, rect.y + rect.height)
++ 
++-            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height / 3)
+++            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height // 3)
++             down_btn = wx.Rect(up_btn.GetLeft(), up_btn.GetBottom() + 1, up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetRight(), down_btn.GetTop())
++             ext_btn = wx.Rect(up_btn.GetLeft(), down_btn.GetBottom() + 1, up_btn.GetWidth(), rect.height - up_btn.GetHeight() - down_btn.GetHeight() - 1)
++@@ -1633,14 +1633,14 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++ 
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(btn_top_brush)
++-        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height / 2)
+++        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height // 2)
++ 
++         lower = wx.Rect(*rect)
++-        lower.height = (lower.height + 1) / 2
+++        lower.height = (lower.height + 1) // 2
++         lower.y += rect.height - lower.height
++         dc.GradientFillLinear(lower, btn_colour, btn_grad_colour, wx.SOUTH)
++ 
++-        dc.DrawBitmap(btn_bitmap, rect.x + rect.width / 2 - 2, lower.y - 2, True)
+++        dc.DrawBitmap(btn_bitmap, rect.x + rect.width // 2 - 2, lower.y - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1691,7 +1691,7 @@ def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++         upper.x += 1
++         upper.width -= 2
++         upper.y += 1
++-        upper.height /= 3
+++        upper.height //= 3
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(top_brush)
++         dc.DrawRectangle(upper.x, upper.y, upper.width, upper.height)
++@@ -1760,7 +1760,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++             client_rect.x += 1
++             client_rect.width -= 2
++             client_rect.y += 1
++-            client_rect.height = (rect.y + rect.height / 5) - client_rect.x
+++            client_rect.height = (rect.y + rect.height // 5) - client_rect.x
++             dc.GradientFillLinear(client_rect,
++                                   self._panel_active_background_top_colour,
++                                   self._panel_active_background_top_gradient_colour, wx.SOUTH)
++@@ -1785,7 +1785,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.DrawRectangle(preview.x + 1, preview.y + preview.height - 8, preview.width - 2, 7)
++ 
++-        mid_pos = rect.y + rect.height / 5 - preview.y
+++        mid_pos = rect.y + rect.height // 5 - preview.y
++ 
++         if mid_pos < 0 or mid_pos >= preview.height:
++             full_rect = wx.Rect(*preview)
++@@ -1816,8 +1816,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - 7 - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - 7 - bitmap.GetHeight()) // 2, True)
++ 
++         self.DrawPanelBorder(dc, preview, self._panel_border_pen, self._panel_border_gradient_pen)
++         self.DrawPanelBorder(dc, true_rect, self._panel_minimised_border_pen, self._panel_minimised_border_gradient_pen)
++@@ -1829,20 +1829,20 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             preview.x = true_rect.x + 4
++-            preview.y = true_rect.y + (true_rect.height - preview.height) / 2
+++            preview.y = true_rect.y + (true_rect.height - preview.height) // 2
++         else:
++-            preview.x = true_rect.x + (true_rect.width - preview.width) / 2
+++            preview.x = true_rect.x + (true_rect.width - preview.width) // 2
++             preview.y = true_rect.y + 4
++ 
++         dc.SetFont(self._panel_label_font)
++         label_width, label_height = dc.GetTextExtent(wnd.GetLabel())
++ 
++-        xpos = true_rect.x + (true_rect.width - label_width + 1) / 2
+++        xpos = true_rect.x + (true_rect.width - label_width + 1) // 2
++         ypos = preview.y + preview.height + 5
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos = preview.x + preview.width + 5
++-            ypos = true_rect.y + (true_rect.height - label_height) / 2
+++            ypos = true_rect.y + (true_rect.height - label_height) // 2
++ 
++         dc.SetTextForeground(self._panel_minimised_label_colour)
++         dc.DrawText(wnd.GetLabel(), xpos, ypos)
++@@ -1851,12 +1851,12 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos += label_width
++-            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height / 2)
+++            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height // 2)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3,  3)
++             arrow_points[2] = arrow_points[0] + wx.Point(-3, -3)
++         else:
++             ypos += label_height
++-            arrow_points[0] = wx.Point(true_rect.width / 2, ypos + 5)
+++            arrow_points[0] = wx.Point(true_rect.width // 2, ypos + 5)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3, -3)
++             arrow_points[2] = arrow_points[0] + wx.Point( 3, -3)
++ 
++@@ -1967,7 +1967,7 @@ def DrawButtonBarButton(self, dc, wnd, rect, kind, state, label, bitmap_large, b
++             bg_rect.height -= 2
++ 
++             bg_rect_top = wx.Rect(*bg_rect)
++-            bg_rect_top.height /= 3
+++            bg_rect_top.height //= 3
++             bg_rect.y += bg_rect_top.height
++             bg_rect.height -= bg_rect_top.height
++ 
++@@ -2043,7 +2043,7 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         if result == RIBBON_BUTTONBAR_BUTTON_LARGE:
++ 
++             padding = 2
++-            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) / 2,
+++            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) // 2,
++                           rect.y + padding, True)
++             ypos = rect.y + padding + bitmap_large.GetHeight() + padding
++             arrow_width = (kind == RIBBON_BUTTON_NORMAL and [0] or [8])[0]
++@@ -2052,10 +2052,10 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++ 
++             if label_w + 2 * padding <= rect.width:
++ 
++-                dc.DrawText(label, rect.x + (rect.width - label_w) / 2, ypos)
+++                dc.DrawText(label, rect.x + (rect.width - label_w) // 2, ypos)
++                 if arrow_width != 0:
++-                    self.DrawDropdownArrow(dc, rect.x + rect.width / 2,
++-                                           ypos + (label_h * 3) / 2,
+++                    self.DrawDropdownArrow(dc, rect.x + rect.width // 2,
+++                                           ypos + (label_h * 3) // 2,
++                                            self._button_bar_label_colour)
++             else:
++                 breaki = len(label)
++@@ -2067,17 +2067,17 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++                         label_w, label_h = dc.GetTextExtent(label_top)
++ 
++                         if label_w + 2 * padding <= rect.width:
++-                            dc.DrawText(label_top, rect.x + (rect.width - label_w) / 2, ypos)
+++                            dc.DrawText(label_top, rect.x + (rect.width - label_w) // 2, ypos)
++                             ypos += label_h
++                             label_bottom = label[breaki:]
++                             label_w, label_h = dc.GetTextExtent(label_bottom)
++                             label_w += arrow_width
++-                            iX = rect.x + (rect.width - label_w) / 2
+++                            iX = rect.x + (rect.width - label_w) // 2
++                             dc.DrawText(label_bottom, iX, ypos)
++ 
++                             if arrow_width != 0:
++                                 self.DrawDropdownArrow(dc, iX + 2 +label_w - arrow_width,
++-                                                       ypos + label_h / 2 + 1,
+++                                                       ypos + label_h // 2 + 1,
++                                                        self._button_bar_label_colour)
++ 
++                             break
++@@ -2085,14 +2085,14 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         elif result == RIBBON_BUTTONBAR_BUTTON_MEDIUM:
++ 
++             x_cursor = rect.x + 2
++-            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())/2, True)
+++            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())//2, True)
++             x_cursor += bitmap_small.GetWidth() + 2
++             label_w, label_h = dc.GetTextExtent(label)
++-            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) / 2)
+++            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) // 2)
++             x_cursor += label_w + 3
++ 
++             if kind != RIBBON_BUTTON_NORMAL:
++-                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2,
+++                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height // 2,
++                                        self._button_bar_label_colour)
++ 
++         else:
++@@ -2184,7 +2184,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++ 
++         # Background
++         bg_rect_top = wx.Rect(*bg_rect)
++-        bg_rect_top.height = (bg_rect_top.height * 2) / 5
+++        bg_rect_top.height = (bg_rect_top.height * 2) // 5
++         bg_rect_btm = wx.Rect(*bg_rect)
++         bg_rect_btm.y += bg_rect_top.height
++         bg_rect_btm.height -= bg_rect_top.height
++@@ -2244,10 +2244,10 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++             dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
++-                          bg_rect.y + (bg_rect.height / 2) - 2, True)
+++                          bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2,
++-                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2,
+++                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def GetBarTabWidth(self, dc, wnd, label, bitmap, ideal=None, small_begin_need_separator=None,
++@@ -2474,7 +2474,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.y = size.GetHeight() - 15
++             scroll_up.height = 15
++             scroll_up.x = 0
++-            scroll_up.width = (size.GetWidth() + 2) / 3
+++            scroll_up.width = (size.GetWidth() + 2) // 3
++             scroll_down.y = scroll_up.y
++             scroll_down.height = scroll_up.height
++             scroll_down.x = scroll_up.x + scroll_up.width
++@@ -2491,7 +2491,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.x = size.GetWidth() - 15
++             scroll_up.width = 15
++             scroll_up.y = 0
++-            scroll_up.height = (size.GetHeight() + 2) / 3
+++            scroll_up.height = (size.GetHeight() + 2) // 3
++             scroll_down.x = scroll_up.x
++             scroll_down.width = scroll_up.width
++             scroll_down.y = scroll_up.y + scroll_up.height
++diff --git a/wx/lib/agw/ribbon/bar.py b/wx/lib/agw/ribbon/bar.py
++index ae8b6a19c..b0d28776d 100644
++--- a/wx/lib/agw/ribbon/bar.py
+++++ b/wx/lib/agw/ribbon/bar.py
++@@ -743,7 +743,7 @@ def RecalculateTabSizes(self):
++                     delta = info.ideal_width - info.small_must_have_separator_width
++                     info.rect.x = x
++                     info.rect.y = y
++-                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)/total_delta
+++                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)//total_delta
++                     info.rect.height = self._tab_height
++ 
++                     x += info.rect.width + tabsep
++@@ -797,7 +797,7 @@ def RecalculateTabSizes(self):
++                         delta = smallest_tab_width - info.minimum_width
++                         info.rect.x = x
++                         info.rect.y = y
++-                        info.rect.width = info.minimum_width + delta*(width - total_small_width)/total_delta
+++                        info.rect.width = info.minimum_width + delta*(width - total_small_width)//total_delta
++                         info.rect.height = self._tab_height
++ 
++                         x += info.rect.width + tabsep
++diff --git a/wx/lib/agw/ribbon/buttonbar.py b/wx/lib/agw/ribbon/buttonbar.py
++index 25ee49a82..4690f483d 100644
++--- a/wx/lib/agw/ribbon/buttonbar.py
+++++ b/wx/lib/agw/ribbon/buttonbar.py
++@@ -354,7 +354,7 @@ def InsertButton(self, pos, button_id, label, bitmap, bitmap_small=wx.NullBitmap
++                 self._bitmap_size_large = bitmap.GetSize()
++                 if not bitmap_small.IsOk():
++                     w, h = self._bitmap_size_large
++-                    self._bitmap_size_small = wx.Size(0.5*w, 0.5*h)
+++                    self._bitmap_size_small = wx.Size(w//2, h//2)
++ 
++             if bitmap_small.IsOk():
++ 
++@@ -867,8 +867,8 @@ def OnSize(self, event):
++ 
++             layout_size = self._layouts[layout_i].overall_size
++             if layout_size.x <= new_size.x and layout_size.y <= new_size.y:
++-                self._layout_offset.x = (new_size.x - layout_size.x)/2
++-                self._layout_offset.y = (new_size.y - layout_size.y)/2
+++                self._layout_offset.x = (new_size.x - layout_size.x)//2
+++                self._layout_offset.y = (new_size.y - layout_size.y)//2
++                 self._current_layout = layout_i
++                 break
++ 
++diff --git a/wx/lib/agw/ribbon/gallery.py b/wx/lib/agw/ribbon/gallery.py
++index b830fab7d..b86528865 100644
++--- a/wx/lib/agw/ribbon/gallery.py
+++++ b/wx/lib/agw/ribbon/gallery.py
++@@ -805,8 +805,8 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         if client.GetWidth() < 0 or client.GetHeight() < 0:
++             return relative_to
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++@@ -849,8 +849,8 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         elif direction == wx.BOTH:
++             client.IncBy(self._bitmap_padded_size)
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++diff --git a/wx/lib/agw/ribbon/panel.py b/wx/lib/agw/ribbon/panel.py
++index 79fd9bc58..901c765b6 100644
++--- a/wx/lib/agw/ribbon/panel.py
+++++ b/wx/lib/agw/ribbon/panel.py
++@@ -584,12 +584,12 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         minimum = wx.Size(*self.GetMinSize())
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 4) / 5
+++            current.x = (current.x * 4) // 5
++             if current.x < minimum.x:
++                 current.x = minimum.x
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 4) / 5
+++            current.y = (current.y * 4) // 5
++             if current.y < minimum.y:
++                 current.y = minimum.y
++ 
++@@ -668,10 +668,10 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         current = wx.Size(*relative_to)
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 5 + 3) / 4
+++            current.x = (current.x * 5 + 3) // 4
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 5 + 3) / 4
+++            current.y = (current.y * 5 + 3) // 4
++ 
++         return current
++ 
++@@ -1076,25 +1076,25 @@ def GetExpandedPosition(self, panel, expanded_size, direction):
++         pos = wx.Point()
++ 
++         if direction == wx.NORTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetY() - expanded_size.GetHeight()
++             primary_x = True
++             secondary_y = 1
++ 
++         elif direction == wx.EAST:
++             pos.x = panel.GetRight()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = -1
++ 
++         elif direction == wx.SOUTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetBottom()
++             primary_x = True
++             secondary_y = -1
++ 
++         else:
++             pos.x = panel.GetX() - expanded_size.GetWidth()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = 1
++ 
++         expanded = wx.Rect(pos, expanded_size)
++diff --git a/wx/lib/agw/ribbon/toolbar.py b/wx/lib/agw/ribbon/toolbar.py
++index 1771c6506..8c6f8b522 100644
++--- a/wx/lib/agw/ribbon/toolbar.py
+++++ b/wx/lib/agw/ribbon/toolbar.py
++@@ -1159,7 +1159,7 @@ def OnSize(self, event):
++ 
++         # Set group y positions
++         for group in self._groups:
++-            group.position.y = rowypos[group.position.y]
+++            group.position.y = int(rowypos[group.position.y])
++ 
++ 
++     def GetBestSizeForParentSize(self, parentSize):
++diff --git a/wx/lib/agw/shapedbutton.py b/wx/lib/agw/shapedbutton.py
++index f015d4e39..49523366a 100644
++--- a/wx/lib/agw/shapedbutton.py
+++++ b/wx/lib/agw/shapedbutton.py
++@@ -569,9 +569,9 @@ def DrawMainButton(self, dc, width, height):
++                 rect2 = w*main//secondary
++ 
++             if self._isup:
++-                img = self._mainbuttonup.Scale(rect2, rect3)
+++                img = self._mainbuttonup.Scale(int(rect2), int(rect3))
++             else:
++-                img = self._mainbuttondown.Scale(rect2, rect3)
+++                img = self._mainbuttondown.Scale(int(rect2), int(rect3))
++ 
++         bmp = img.ConvertToBitmap()
++ 
++@@ -599,7 +599,7 @@ def DrawMainButton(self, dc, width, height):
++                     ypos = 0
++ 
++         # Draw Finally The Bitmap
++-        dc.DrawBitmap(bmp, xpos, ypos, True)
+++        dc.DrawBitmap(bmp, int(xpos), int(ypos), True)
++ 
++         # Store Bitmap Position And Size To Draw An Elliptical Focus Indicator
++         self._xpos = xpos
++@@ -646,7 +646,7 @@ def DrawLabel(self, dc, width, height, dw=0, dh=0):
++             xp = xc - (tw//2)* cos(angle) - (th//2)*sin(angle)
++             yp = yc + (tw//2)*sin(angle) - (th//2)*cos(angle)
++ 
++-            dc.DrawRotatedText(label, xp + dw, yp + dh , angle*180/pi)
+++            dc.DrawRotatedText(label, int(xp + dw), int(yp + dh), angle*180/pi)
++ 
++ 
++     def DrawFocusIndicator(self, dc, width, height):
++@@ -676,7 +676,7 @@ def DrawFocusIndicator(self, dc, width, height):
++         else:
++             # This Is An Ellipse
++             if hasattr(self, "_xpos"):
++-                dc.DrawEllipse(self._xpos + 2, self._ypos + 2, self._imgx - 4, self._imgy - 4)
+++                dc.DrawEllipse(int(self._xpos + 2), int(self._ypos + 2), self._imgx - 4, self._imgy - 4)
++ 
++         dc.SetLogicalFunction(wx.COPY)
++ 
++diff --git a/wx/lib/agw/speedmeter.py b/wx/lib/agw/speedmeter.py
++index f196b51f2..606901d27 100644
++--- a/wx/lib/agw/speedmeter.py
+++++ b/wx/lib/agw/speedmeter.py
++@@ -580,8 +580,8 @@ def Draw(self, dc):
++         dc.SetBackground(wx.Brush(speedbackground))
++         dc.Clear()
++ 
++-        centerX = self.faceBitmap.GetWidth()/2
++-        centerY = self.faceBitmap.GetHeight()/2
+++        centerX = self.faceBitmap.GetWidth()//2
+++        centerY = self.faceBitmap.GetHeight()//2
++ 
++         self.CenterX = centerX
++         self.CenterY = centerY
++@@ -681,7 +681,7 @@ def Draw(self, dc):
++             # Draw The Filler (Both In "Advance" And "Reverse" Directions)
++ 
++             dc.SetBrush(wx.Brush(fillercolour))
++-            dc.DrawArc(xs2, ys2, xe2, ye2, centerX, centerY)
+++            dc.DrawArc(xs2, ys2, xe2, ye2, int(centerX), int(centerY))
++ 
++             if self._agwStyle & SM_DRAW_SECTORS == 0:
++                 dc.SetBrush(wx.Brush(speedbackground))
++@@ -952,7 +952,7 @@ def Draw(self, dc):
++                     y = y - height/2.0 - height*sin(angis)/2.0
++                     fancytext.RenderToDC(fancystr, dc, x, y)
++                 else:
++-                    dc.DrawText(strings, x, y)
+++                    dc.DrawText(strings, int(x), int(y))
++ 
++             # This Is The Small Rectangle --> Tick Mark
++             rectangle = colourangles[ii] + pi/2.0
++@@ -969,6 +969,7 @@ def Draw(self, dc):
++             y4 = y3 + 3*self.scale*sinrect
++ 
++             points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++            points = [(int(p[0]), int(p[1])) for p in points]
++ 
++             dc.DrawPolygon(points)
++ 
++@@ -1003,6 +1004,7 @@ def Draw(self, dc):
++                         y4 = y3 + self.scale*sinrect
++ 
++                         points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++                        points = [(int(p[0]), int(p[1])) for p in points]
++ 
++                         dc.DrawPolygon(points)
++ 
++@@ -1017,7 +1019,7 @@ def Draw(self, dc):
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++ 
++         if self._drawarc:
++-            dc.SetPen(wx.Pen(self.GetArcColour(), 2.0))
+++            dc.SetPen(wx.Pen(self.GetArcColour(), 2))
++             # If It's Not A Complete Circle, Draw The Connecting Lines And The Arc
++             if abs(abs(startangle - endangle) - 2*pi) > 1.0/180.0:
++                 dc.DrawArc(xstart, ystart, xend, yend, centerX, centerY)
++@@ -1046,7 +1048,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++             dc.SetTextForeground(middlecolour)
++-            dc.DrawText(middletext, newx, newy)
+++            dc.DrawText(middletext, int(newx), int(newy))
++ 
++         # Here We Draw The Icon In The Middle, Near The Start Of The Arrow (If Present)
++         # This Is Like The "Fuel" Icon In The Cars
++@@ -1054,8 +1056,8 @@ def Draw(self, dc):
++ 
++             middleicon = self.GetMiddleIcon()
++             middlewidth, middleheight = self.GetMiddleIconDimens()
++-            middleicon.SetWidth(middlewidth*self.scale)
++-            middleicon.SetHeight(middleheight*self.scale)
+++            middleicon.SetWidth(int(middlewidth*self.scale))
+++            middleicon.SetHeight(int(middleheight*self.scale))
++             middleangle = (startangle + endangle)/2.0
++ 
++             mw = middleicon.GetWidth()
++@@ -1064,7 +1066,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++ 
++-            dc.DrawIcon(middleicon, newx, newy)
+++            dc.DrawIcon(middleicon, int(newx), int(newy))
++ 
++             # Restore Icon Dimension, If Not Something Strange Happens
++             middleicon.SetWidth(middlewidth)
++@@ -1109,53 +1111,61 @@ def Draw(self, dc):
++                 if handstyle == "Arrow":
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++-                    dc.SetPen(wx.Pen(shadowcolour, 5*log(self.scale+1)))
+++                    dc.SetPen(wx.Pen(shadowcolour, int(5*log(self.scale+1))))
++                     dc.SetBrush(wx.Brush(shadowcolour))
++                     shadowdistance = 2.0*self.scale
++-                    dc.DrawLine(newx + shadowdistance, newy + shadowdistance,
++-                                xarr + shadowdistance, yarr + shadowdistance)
++-
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance)])
+++                    dc.DrawLine(int(newx + shadowdistance), int(newy + shadowdistance),
+++                                int(xarr + shadowdistance), int(yarr + shadowdistance))
+++
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++                 else:
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++                     dc.SetBrush(wx.Brush(shadowcolour))
++-                    dc.SetPen(wx.Pen(shadowcolour, 1.0))
+++                    dc.SetPen(wx.Pen(shadowcolour, 1))
++                     shadowdistance = 1.5*self.scale
++ 
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance),
++-                                    (x4+shadowdistance, y4+shadowdistance)])
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance),
+++                              (x4+shadowdistance, y4+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++ 
++             if handstyle == "Arrow":
++ 
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++-                dc.SetPen(wx.Pen(handcolour, 5*log(self.scale+1)))
+++                dc.SetPen(wx.Pen(handcolour, int(5*log(self.scale+1))))
++                 # Draw The "Hand", An Arrow
++-                dc.DrawLine(newx, newy, xarr, yarr)
+++                dc.DrawLine(int(newx), int(newy), int(xarr), int(yarr))
++ 
++                 # Draw The Arrow Pointer
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3)])
+++                points = [(x1, y1), (x2, y2), (x3, y3)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++             else:
++ 
++                 # Draw The Hand Pointer
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3), (x4, y4)])
+++                points = [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++ 
++     def SetIntervals(self, intervals=None):
++@@ -1527,7 +1537,7 @@ def SetMiddleTextFont(self, font=None):
++ 
++         if font is None:
++             self._middletextfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._middletextsize = 10.0
+++            self._middletextsize = 10
++             self._middletextfont.SetPointSize(self._middletextsize)
++         else:
++             self._middletextfont = font
++@@ -1599,7 +1609,7 @@ def CircleCoords(self, radius, angle, centerX, centerY):
++         x = radius*cos(angle) + centerX
++         y = radius*sin(angle) + centerY
++ 
++-        return x, y
+++        return int(x), int(y)
++ 
++ 
++     def GetIntersection(self, current, intervals):
++diff --git a/wx/lib/agw/supertooltip.py b/wx/lib/agw/supertooltip.py
++index a92ce10d1..cd0f0c9f7 100644
++--- a/wx/lib/agw/supertooltip.py
+++++ b/wx/lib/agw/supertooltip.py
++@@ -295,8 +295,8 @@ def OnPaint(self, event):
++ 
++         # Get the user options for header, bitmaps etc...
++         drawHeader, drawFooter = classParent.GetDrawHeaderLine(), classParent.GetDrawFooterLine()
++-        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height/2)
++-        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height/2, frameRect.width, frameRect.height/2+1)
+++        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height//2)
+++        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height//2, frameRect.width, frameRect.height//2+1)
++         # Fill the triple-gradient
++         dc.GradientFillLinear(topRect, topColour, middleColour, wx.SOUTH)
++         dc.GradientFillLinear(bottomRect, middleColour, bottomColour, wx.SOUTH)
++@@ -324,9 +324,9 @@ def OnPaint(self, event):
++         normalText = classParent.GetTextColour()
++         if header:
++             dc.SetTextForeground(normalText)
++-            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)/2)
+++            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)//2)
++         if headerBmp and headerBmp.IsOk():
++-            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)/2, True)
+++            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)//2, True)
++ 
++         if header or (headerBmp and headerBmp.IsOk()):
++             yPos += height
++@@ -376,7 +376,7 @@ def OnPaint(self, event):
++                 messageHeight += textHeight
++ 
++                 xText = (bmpWidth + 2 * self._spacing) if bmpWidth > 0 else self._spacing
++-                yText += textHeight/2+self._spacing
+++                yText += textHeight//2+self._spacing
++                 maxWidth = max(xText + textWidth + self._spacing, maxWidth)
++                 dc.DrawText(line, xText, yText)
++                 if isLink:
++@@ -412,8 +412,8 @@ def OnPaint(self, event):
++             if drawFooter:
++                 # Draw the separator line before the footer
++                 dc.SetPen(wx.GREY_PEN)
++-                dc.DrawLine(self._spacing, yPos-self._spacing/2+toAdd,
++-                            width-self._spacing, yPos-self._spacing/2+toAdd)
+++                dc.DrawLine(self._spacing, yPos-self._spacing//2+toAdd,
+++                            width-self._spacing, yPos-self._spacing//2+toAdd)
++         # Draw the footer and footer bitmap (if any)
++         dc.SetTextForeground(normalText)
++         height = max(textHeight, bmpHeight)
++@@ -424,7 +424,7 @@ def OnPaint(self, event):
++             maxWidth = max(bmpXPos + bmpWidth + (self._spacing*2) + textWidth, maxWidth)
++         if footerBmp and footerBmp.IsOk():
++             toAdd = (height - bmpHeight + self._spacing) / 2
++-            dc.DrawBitmap(footerBmp, bmpXPos, yPos + toAdd, True)
+++            dc.DrawBitmap(footerBmp, bmpXPos, int(yPos + toAdd), True)
++             maxWidth = max(footerBmp.GetSize().GetWidth() + bmpXPos, maxWidth)
++ 
++         maxHeight = yPos + height + toAdd
++@@ -815,7 +815,7 @@ def SetStartDelay(self, delay=1):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._startDelayTime = float(delay)
+++        self._startDelayTime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -831,7 +831,7 @@ def SetEndDelay(self, delay=1e6):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._endDelayTime = float(delay)
+++        self._endDelayTime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/toasterbox.py b/wx/lib/agw/toasterbox.py
++index b73429dd2..8efb5869b 100644
++--- a/wx/lib/agw/toasterbox.py
+++++ b/wx/lib/agw/toasterbox.py
++@@ -1316,11 +1316,11 @@ def _getTextCoords(self, dc):
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++             fh += h + textPadding
++-        y = (th - fh) / 2; coords = []
+++        y = (th - fh) // 2; coords = []
++ 
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++-            x = (tw - w) / 2
+++            x = (tw - w) // 2
++             coords.append((x, y))
++             y += h + textPadding
++ 
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index 14fc41f86..caa5e5cf4 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -914,7 +914,7 @@ def Draw(self, index, dc, x, y, flags, solidBackground=True):
++             raise Exception("Wrong index in image list")
++ 
++         bmp = self._images[index]
++-        dc.DrawBitmap(bmp, x, y, (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
+++        dc.DrawBitmap(bmp, x, int(y), (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
++ 
++         return True
++ 
++@@ -4022,7 +4022,7 @@ def SetPosition(self, x, y, spacing):
++ 
++             if item.HasImage():
++ 
++-                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)/2
+++                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)//2
++                 self._gi._rectIcon.y = self._gi._rectAll.y + 4
++ 
++             if item.HasText():
++@@ -4030,7 +4030,7 @@ def SetPosition(self, x, y, spacing):
++                 if self._gi._rectLabel.width > spacing:
++                     self._gi._rectLabel.x = self._gi._rectAll.x + 2
++                 else:
++-                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing/2) - (self._gi._rectLabel.width/2)
+++                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing//2) - (self._gi._rectLabel.width//2)
++ 
++                 self._gi._rectLabel.y = self._gi._rectAll.y + self._gi._rectAll.height + 2 - self._gi._rectLabel.height
++                 self._gi._rectHighlight.x = self._gi._rectLabel.x - 2
++@@ -4546,7 +4546,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 checked = item.IsChecked()
++-                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)/2, item.GetKind(), checked, enabled)
+++                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)//2, item.GetKind(), checked, enabled)
++                 xOld += ix
++                 width -= ix
++ 
++@@ -4557,7 +4557,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 for img in images:
++ 
++                     ix, iy = self._owner.GetImageSize([img])
++-                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)/2, enabled)
+++                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)//2, enabled)
++ 
++                     xOld += ix
++                     width -= ix
++@@ -5230,7 +5230,7 @@ def OnPaint(self, event):
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 # We draw it on the left, always
++-                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)/2, kind, checked, enabled)
+++                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)//2, kind, checked, enabled)
++                 wcheck += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++                 cw -= ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++ 
++@@ -6819,7 +6819,7 @@ def HitTestLine(self, line, x, y):
++                     # We got a checkbox-type item
++                     ix, iy = self.GetCheckboxImageSize()
++                     LH = self.GetLineHeight(line)
++-                    rect = wx.Rect(xOld, lineY + LH/2 - iy/2, ix, iy)
+++                    rect = wx.Rect(xOld, lineY + LH//2 - iy//2, ix, iy)
++                     if rect.Contains((x, y)):
++                         newItem = self.GetParent().GetItem(line, col)
++                         return newItem, ULC_HITTEST_ONITEMCHECK
++@@ -7937,13 +7937,13 @@ def MoveToItem(self, item):
++                     while start_y > view_y:
++                         start_y -= SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, start_y/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, start_y//SCROLL_UNIT_Y)
++ 
++                 if start_y + height > view_y + client_h:
++                     while start_y + height < view_y + client_h:
++                         start_y += SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)//SCROLL_UNIT_Y)
++ 
++         else: # !report
++ 
++@@ -7960,7 +7960,7 @@ def MoveToItem(self, item):
++             if rect.y + rect.height - 5 > view_y + client_h:
++                 sy = (rect.y + rect.height - client_h + hLine)/hLine
++ 
++-            self.Scroll(sx, sy)
+++            self.Scroll(int(sx), int(sy))
++ 
++ 
++ # ----------------------------------------------------------------------------
++diff --git a/wx/lib/agw/xlsgrid.py b/wx/lib/agw/xlsgrid.py
++index b505aebb4..17267fabc 100644
++--- a/wx/lib/agw/xlsgrid.py
+++++ b/wx/lib/agw/xlsgrid.py
++@@ -965,7 +965,7 @@ def Draw(self, dc, rect):
++             xp = xc - (text_width/2)*xshift - (text_height/2)*yshift
++             yp = yc + (text_width/2)*yshift - (text_height/2)*xshift
++ 
++-            dc.DrawRotatedText(value, xp, yp, self.rotation)
+++            dc.DrawRotatedText(value, int(xp), int(yp), self.rotation)
++ 
++         else:
++ 
++@@ -1125,7 +1125,7 @@ def Draw(self, dc, rect):
++             if font.escapement == 1:
++                 ypos = ypos - maxH + height
++ 
++-            dc.DrawText(chunk, start, ypos)
+++            dc.DrawText(chunk, start, int(ypos))
++             start += width
++ 
++ 
++diff --git a/wx/lib/agw/zoombar.py b/wx/lib/agw/zoombar.py
++index 1e6ec5da3..8c2afd058 100644
++--- a/wx/lib/agw/zoombar.py
+++++ b/wx/lib/agw/zoombar.py
++@@ -463,7 +463,7 @@ def SetSize(self, width, height):
++     def GetPosition(self):
++         """ Returns the button position. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -601,7 +601,7 @@ def __init__(self, bitmap=None):
++     def GetPosition(self):
++         """ Returns the position of :class:`wx.ImageBar`, as a :class:`wx.Point`. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -660,7 +660,7 @@ def SetBarColour(self, colour, xSize=None, ySize=None):
++         if xSize is not None:
++             self._size = wx.Size(xSize, ySize)
++ 
++-        bitmap.Rescale(self._size.width, self._size.height/2)
+++        bitmap.Rescale(self._size.width, self._size.height//2)
++ 
++         r1, g1, b1 = self._startColour.Red(), self._startColour.Green(), self._startColour.Blue()
++         r2, g2, b2 = colour.Red(), colour.Green(), colour.Blue()
++@@ -1065,7 +1065,7 @@ def ResetSize(self):
++             ySize += yextent
++ 
++         if self._showReflections:
++-            ySize += self._buttonSize/2
+++            ySize += self._buttonSize//2
++         if self._centerZoom:
++             ySize += self._buttonSize
++ 
++@@ -1240,7 +1240,7 @@ def DrawLabels(self, dc):
++             textWidth, textHeight = dc.GetTextExtent(label)
++             buttonPos = button.GetPosition()
++             buttonSize = button.GetSize()
++-            xpos = buttonPos.x + (buttonSize.width - textWidth)/2
+++            xpos = buttonPos.x + (buttonSize.width - textWidth)//2
++             ypos = buttonPos.y - textHeight - 2
++ 
++             dc.DrawRectangle(xpos-2, ypos-1, textWidth+4, textHeight+2)
++diff --git a/wx/lib/analogclock/analogclock.py b/wx/lib/analogclock/analogclock.py
++index 7c4b18979..1ee1d6742 100644
++--- a/wx/lib/analogclock/analogclock.py
+++++ b/wx/lib/analogclock/analogclock.py
++@@ -173,7 +173,7 @@ def _recalcCoords(self, size):
++         scale = min([float(size.width) / self.basesize.width,
++                      float(size.height) / self.basesize.height])
++ 
++-        centre = wx.Point(size.width / 2., size.height / 2.)
+++        centre = wx.Point(size.width // 2, size.height // 2)
++ 
++         self.Box.RecalcCoords(size, centre, scale)
++         self.Hands.RecalcCoords(size, centre, scale)
++diff --git a/wx/lib/analogclock/helpers.py b/wx/lib/analogclock/helpers.py
++index 88d198bee..9674de912 100644
++--- a/wx/lib/analogclock/helpers.py
+++++ b/wx/lib/analogclock/helpers.py
++@@ -37,7 +37,7 @@ def __init__(self, idx=0, pos=None, size=None, offset=0, clocksize=None,
++ 
++ 
++     def _pol2rect(self, m, t):
++-        return m * math.cos(math.radians(t)), m * math.sin(math.radians(t))
+++        return int(m * math.cos(math.radians(t))), int(m * math.sin(math.radians(t)))
++ 
++ 
++     def _rect2pol(self, x, y):
++@@ -174,7 +174,7 @@ def __init__(self, **kwargs):
++ 
++     def Draw(self, dc):
++         self.dyer.Select(dc)
++-        dc.DrawCircle(self.pos.x, self.pos.y, self.radius)
+++        dc.DrawCircle(self.pos.x, self.pos.y, int(self.radius))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -205,7 +205,7 @@ def Draw(self, dc, end, offset=0):
++             m, t = self._rect2pol(x, y)
++             polygon[i] = self._pol2rect(m, t - angle)
++ 
++-        dc.DrawPolygon(polygon, centre.x + offset, centre.y + offset)
+++        dc.DrawPolygon(polygon, int(centre.x + offset), int(centre.y + offset))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -226,7 +226,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawRectangle(x + offset, y + offset, width, height)
+++        dc.DrawRectangle(int(x + offset), int(y + offset), int(width), int(height))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -242,7 +242,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x
++         y = self.pos.y
++ 
++-        dc.DrawCircle(x + offset, y + offset, radius)
+++        dc.DrawCircle(int(x + offset), int(y + offset), int(radius))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -273,7 +273,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -290,7 +290,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -309,7 +309,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawText(self.text, x + offset, y + offset)
+++        dc.DrawText(self.text, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -321,7 +321,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawRotatedText(self.text, x + offset, y + offset, angle)
+++        dc.DrawRotatedText(self.text, int(x + offset), int(y + offset), int(angle))
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -656,7 +656,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++ 
++         # Try to find a 'good' max size for text-based ticks.
++         if a_tick.text is not None:
++-            self.font.SetPointSize(size)
+++            self.font.SetPointSize(int(size))
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(*clocksize.Get()))
++             dc.SetFont(self.font)
++@@ -686,7 +686,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++             x = centre.x + radius * math.sin(angle)
++             y = centre.y + radius * math.cos(angle)
++ 
++-            tick.SetPosition(wx.Point(x, y))
+++            tick.SetPosition(wx.Point(int(x), int(y)))
++ 
++ 
++     def GetSize(self):
++diff --git a/wx/lib/analogclock/setup.py b/wx/lib/analogclock/setup.py
++index a83c8639d..a7dffb901 100644
++--- a/wx/lib/analogclock/setup.py
+++++ b/wx/lib/analogclock/setup.py
++@@ -179,7 +179,7 @@ def __init__(self, parent, title, group="Hands"):
++         p.SetCustomColours(self.customcolours)
++         sizer.Add(p, pos=(0, 1), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.bw = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.bw = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(0, 2), span=(1, 2), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -193,7 +193,7 @@ def __init__(self, parent, title, group="Hands"):
++         p = self.ls = wx.StaticText(self, label="Size:")
++         sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.sz = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.sz = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -212,7 +212,7 @@ def __init__(self, parent, title, group="Ticks"):
++         p = wx.StaticText(self, label="Offset:")
++         sizer.Add(p, pos=(3, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.of = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.of = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(3, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++diff --git a/wx/lib/buttons.py b/wx/lib/buttons.py
++index 46d1b8747..f01a54d41 100644
++--- a/wx/lib/buttons.py
+++++ b/wx/lib/buttons.py
++@@ -453,7 +453,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         tw, th = dc.GetTextExtent(label)
++         if not self.up:
++             dx = dy = self.labelDelta
++-        dc.DrawText(label, (width-tw)/2+dx, (height-th)/2+dy)
+++        dc.DrawText(label, (width-tw)//2+dx, (height-th)//2+dy)
++ 
++ 
++     def DrawFocusIndicator(self, dc, w, h):
++@@ -844,7 +844,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++         hasMask = bmp.GetMask() != None
++-        dc.DrawBitmap(bmp, (width-bw)/2+dx, (height-bh)/2+dy, hasMask)
+++        dc.DrawBitmap(bmp, (width-bw)//2+dx, (height-bh)//2+dy, hasMask)
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -926,12 +926,12 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++ 
++-        pos_x = (width-bw-tw)/2+dx      # adjust for bitmap and text to centre
+++        pos_x = (width-bw-tw)//2+dx      # adjust for bitmap and text to centre
++         if bmp is not None:
++-            dc.DrawBitmap(bmp, pos_x, (height-bh)/2+dy, hasMask) # draw bitmap if available
+++            dc.DrawBitmap(bmp, pos_x, (height-bh)//2+dy, hasMask) # draw bitmap if available
++             pos_x = pos_x + 2   # extra spacing from bitmap
++ 
++-        dc.DrawText(label, pos_x + dx+bw, (height-th)/2+dy)      # draw the text
+++        dc.DrawText(label, pos_x + dx+bw, (height-th)//2+dy)      # draw the text
++ 
++ 
++ #----------------------------------------------------------------------
++diff --git a/wx/lib/colourchooser/pycolourchooser.py b/wx/lib/colourchooser/pycolourchooser.py
++index 61dbc02d2..124376483 100644
++--- a/wx/lib/colourchooser/pycolourchooser.py
+++++ b/wx/lib/colourchooser/pycolourchooser.py
++@@ -188,7 +188,7 @@ def __init__(self, parent, id):
++         self.colour_slider.Bind(wx.EVT_MOTION, self.onSliderMotion)
++         self.slider = wx.Slider(
++                         self, self.idSCROLL, 86, 0, self.colour_slider.HEIGHT - 1,
++-                        style=wx.SL_VERTICAL, size=(15, self.colour_slider.HEIGHT)
+++                        style=wx.SL_VERTICAL, size=(-1, self.colour_slider.HEIGHT)
++                         )
++ 
++         self.Bind(wx.EVT_COMMAND_SCROLL, self.onScroll, self.slider)
++@@ -338,7 +338,7 @@ def setSliderToV(self, v):
++         min = self.slider.GetMin()
++         max = self.slider.GetMax()
++         val = (1 - v) * max
++-        self.slider.SetValue(val)
+++        self.slider.SetValue(int(val))
++ 
++     def getVFromSlider(self):
++         """Get the current value of "V" from the v slider."""
++diff --git a/wx/lib/colourchooser/pypalette.py b/wx/lib/colourchooser/pypalette.py
++index ff1fb840c..71b9fc2df 100644
++--- a/wx/lib/colourchooser/pypalette.py
+++++ b/wx/lib/colourchooser/pypalette.py
++@@ -165,7 +165,7 @@ def DrawBuffer(self):
++             colour = wx.Colour(0, 0, 0)
++             self.buffer.SetPen(wx.Pen(colour, 1, wx.PENSTYLE_SOLID))
++             self.buffer.SetBrush(wx.Brush(colour, wx.BRUSHSTYLE_TRANSPARENT))
++-            self.buffer.DrawCircle(self.point[0], self.point[1], 3)
+++            self.buffer.DrawCircle(int(self.point[0]), int(self.point[1]), 3)
++ 
++     def HighlightPoint(self, x, y):
++         """Highlights an area of the palette with a little circle around
++diff --git a/wx/lib/floatcanvas/FCObjects.py b/wx/lib/floatcanvas/FCObjects.py
++index 58becd38c..cdf8cc53e 100644
++--- a/wx/lib/floatcanvas/FCObjects.py
+++++ b/wx/lib/floatcanvas/FCObjects.py
++@@ -296,7 +296,7 @@ def SetPen(self, LineColor, LineStyle, LineWidth):
++         else:
++             self.Pen = self.PenList.setdefault(
++                 (LineColor, LineStyle, LineWidth),
++-                wx.Pen(LineColor, LineWidth, self.LineStyleList[LineStyle]))
+++                wx.Pen(LineColor, int(LineWidth), self.LineStyleList[LineStyle]))
++ 
++     def SetHitBrush(self, HitColor):
++         """
++@@ -1202,14 +1202,14 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++             x = xc - Size/2.0
++             y = yc - Size/2.0
++             dc.SetBrush(self.Brush)
++-            dc.DrawRectangle(x, y, Size, Size)
+++            dc.DrawRectangle(int(x), int(y), Size, Size)
++         if HTdc and self.HitAble:
++             HTdc.SetPen(self.HitPen)
++             if self.Size <= 1:
++                 HTdc.DrawPoint(xc, xc)
++             else:
++                 HTdc.SetBrush(self.HitBrush)
++-                HTdc.DrawRectangle(x, y, Size, Size)
+++                HTdc.DrawRectangle(int(x), int(y), Size, Size)
++ 
++ class RectEllipse(XYObjectMixin, LineAndFillMixin, DrawObject):
++     """A RectEllipse draw object."""
++@@ -2161,7 +2161,7 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++         W = H * (self.bmpWidth / self.bmpHeight)
++         if (self.ScaledBitmap is None) or (H != self.ScaledHeight) :
++             self.ScaledHeight = H
++-            Img = self.Image.Scale(W, H)
+++            Img = self.Image.Scale(int(W), int(H))
++             self.ScaledBitmap = wx.Bitmap(Img)
++ 
++         XY = self.ShiftFun(XY[0], XY[1], W, H)
++diff --git a/wx/lib/gizmos/ledctrl.py b/wx/lib/gizmos/ledctrl.py
++index f185d5105..7f4d3fcf9 100644
++--- a/wx/lib/gizmos/ledctrl.py
+++++ b/wx/lib/gizmos/ledctrl.py
++@@ -293,7 +293,7 @@ def _drawDigit(self, dc, digit, column):
++ 
++         if digit & c.COLON:
++             dc.SetBrush(wx.Brush(lineColor))
++-            centerX = XPos + (self.m_lineLength + self.m_digitMargin) / 2
++-            radius = self.m_lineWidth / 2
++-            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) / 2, radius)
++-            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 / 4, radius)
+++            centerX = XPos + (self.m_lineLength + self.m_digitMargin) // 2
+++            radius = self.m_lineWidth // 2
+++            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) // 2, radius)
+++            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 // 4, radius)
++diff --git a/wx/lib/imagebrowser.py b/wx/lib/imagebrowser.py
++index 795e90dca..8e14727e7 100644
++--- a/wx/lib/imagebrowser.py
+++++ b/wx/lib/imagebrowser.py
++@@ -347,8 +347,8 @@ def DrawImage(self, dc):
++         owidth = int(scale*iwidth)
++         oheight = int(scale*iheight)
++ 
++-        diffx = (wwidth - owidth)/2   # center calc
++-        diffy = (wheight - oheight)/2   # center calc
+++        diffx = (wwidth - owidth)//2   # center calc
+++        diffy = (wheight - oheight)//2   # center calc
++ 
++         if not bmp:
++             if owidth!=iwidth or oheight!=iheight:
++diff --git a/wx/lib/ogl/basic.py b/wx/lib/ogl/basic.py
++index b08859ab9..0107f21fc 100644
++--- a/wx/lib/ogl/basic.py
+++++ b/wx/lib/ogl/basic.py
++@@ -1051,7 +1051,7 @@ def OnEraseContents(self, dc):
++         dc.SetPen(self.GetBackgroundPen())
++         dc.SetBrush(self.GetBackgroundBrush())
++ 
++-        dc.DrawRectangle(topLeftX - penWidth, topLeftY - penWidth, maxX + penWidth * 2 + 4, maxY + penWidth * 2 + 4)
+++        dc.DrawRectangle(int(topLeftX - penWidth), int(topLeftY - penWidth), int(maxX + penWidth * 2 + 4), int(maxY + penWidth * 2 + 4))
++ 
++     def EraseLinks(self, dc, attachment = -1, recurse = False):
++         """
++@@ -2769,9 +2769,9 @@ def OnDraw(self, dc):
++             dc.SetBrush(self._brush)
++ 
++         if self._cornerRadius:
++-            dc.DrawRoundedRectangle(x1, y1, self._width, self._height, self._cornerRadius)
+++            dc.DrawRoundedRectangle(int(x1), int(y1), self._width, self._height, self._cornerRadius)
++         else:
++-            dc.DrawRectangle(x1, y1, self._width, self._height)
+++            dc.DrawRectangle(int(x1), int(y1), self._width, self._height)
++ 
++     def GetBoundingBoxMin(self):
++         """Get the bounding box minimum."""
++@@ -2882,7 +2882,7 @@ def Create(self, the_points = None):
++             # Duplicate the list of points
++             self._points = []
++             for point in the_points:
++-                new_point = wx.Point(point[0], point[1])
+++                new_point = wx.Point(int(point[0]), int(point[1]))
++                 self._points.append(new_point)
++             self.CalculateBoundingBox()
++             self._originalWidth = self._boundWidth
++@@ -3444,7 +3444,7 @@ def OnDraw(self, dc):
++                 dc.SetPen(self._pen)
++         if self._brush:
++             dc.SetBrush(self._brush)
++-        dc.DrawEllipse(self._xpos - self.GetWidth() / 2.0, self._ypos - self.GetHeight() / 2.0, self.GetWidth(), self.GetHeight())
+++        dc.DrawEllipse(int(self._xpos - self.GetWidth() / 2.0), int(self._ypos - self.GetHeight() / 2.0), self.GetWidth(), self.GetHeight())
++ 
++     def SetSize(self, x, y, recursive = True):
++         """
++diff --git a/wx/lib/ogl/bmpshape.py b/wx/lib/ogl/bmpshape.py
++index ee2859527..e53ddb136 100644
++--- a/wx/lib/ogl/bmpshape.py
+++++ b/wx/lib/ogl/bmpshape.py
++@@ -32,7 +32,7 @@ def OnDraw(self, dc):
++ 
++         x = self._xpos - self._bitmap.GetWidth() / 2.0
++         y = self._ypos - self._bitmap.GetHeight() / 2.0
++-        dc.DrawBitmap(self._bitmap, x, y, True)
+++        dc.DrawBitmap(self._bitmap, int(x), int(y), True)
++ 
++     def SetSize(self, w, h, recursive = True):
++         """
++diff --git a/wx/lib/ogl/composit.py b/wx/lib/ogl/composit.py
++index c3b623952..eecaafb3f 100644
++--- a/wx/lib/ogl/composit.py
+++++ b/wx/lib/ogl/composit.py
++@@ -1131,11 +1131,11 @@ def OnDraw(self, dc):
++ 
++         if self._leftSide:
++             dc.SetPen(self._leftSidePen)
++-            dc.DrawLine(x1, y2, x1, y1)
+++            dc.DrawLine(int(x1), int(y2), int(x1), int(y1))
++ 
++         if self._topSide:
++             dc.SetPen(self._topSidePen)
++-            dc.DrawLine(x1, y1, x2, y1)
+++            dc.DrawLine(int(x1), int(y1), int(x2), int(y1))
++ 
++         # For testing purposes, draw a rectangle so we know
++         # how big the division is.
++diff --git a/wx/lib/ogl/divided.py b/wx/lib/ogl/divided.py
++index 0bfb1919f..0809be58c 100644
++--- a/wx/lib/ogl/divided.py
+++++ b/wx/lib/ogl/divided.py
++@@ -231,7 +231,7 @@ def OnDrawContents(self, dc):
++                 regionPen = region.GetActualPen()
++                 if regionPen:
++                     dc.SetPen(regionPen)
++-                    dc.DrawLine(leftX, y, rightX, y)
+++                    dc.DrawLine(int(leftX), int(y), int(rightX), int(y))
++ 
++             currentY = actualY
++ 
++diff --git a/wx/lib/ogl/lines.py b/wx/lib/ogl/lines.py
++index 948b85d82..50c07e046 100644
++--- a/wx/lib/ogl/lines.py
+++++ b/wx/lib/ogl/lines.py
++@@ -1200,7 +1200,7 @@ def OnDraw(self, dc):
++ 
++         points = []
++         for point in self._lineControlPoints:
++-            points.append(wx.Point(point[0], point[1]))
+++            points.append(wx.Point(int(point[0]), int(point[1])))
++ 
++         if self._isSpline:
++             dc.DrawSpline(points)
++diff --git a/wx/lib/ogl/oglmisc.py b/wx/lib/ogl/oglmisc.py
++index 8588a72b7..a8be3fc53 100644
++--- a/wx/lib/ogl/oglmisc.py
+++++ b/wx/lib/ogl/oglmisc.py
++@@ -300,10 +300,10 @@ def DrawFormattedText(dc, text_list, xpos, ypos, width, height, formatMode):
++         yoffset = ypos - height / 2.0
++ 
++     # +1 to allow for rounding errors
++-    dc.SetClippingRegion(xpos - width / 2.0, ypos - height / 2.0, width + 1, height + 1)
+++    dc.SetClippingRegion(int(xpos - width / 2.0), int(ypos - height / 2.0), int(width + 1), int(height + 1))
++ 
++     for line in text_list:
++-        dc.DrawText(line.GetText(), xoffset + line.GetX(), yoffset + line.GetY())
+++        dc.DrawText(line.GetText(), int(xoffset + line.GetX()), int(yoffset + line.GetY()))
++ 
++     dc.DestroyClippingRegion()
++ 
++diff --git a/wx/lib/plot/examples/demo.py b/wx/lib/plot/examples/demo.py
++index 98fbaad3a..02bec1d9f 100644
++--- a/wx/lib/plot/examples/demo.py
+++++ b/wx/lib/plot/examples/demo.py
++@@ -984,7 +984,7 @@ def DrawPointLabel(self, dc, mDataDict):
++ 
++         sx, sy = mDataDict["scaledXY"]  # scaled x,y of closest point
++         # 10by10 square centered on point
++-        dc.DrawRectangle(sx - 5, sy - 5, 10, 10)
+++        dc.DrawRectangle(int(sx - 5), int(sy - 5), 10, 10)
++         px, py = mDataDict["pointXY"]
++         cNum = mDataDict["curveNum"]
++         pntIn = mDataDict["pIndex"]
++@@ -992,7 +992,7 @@ def DrawPointLabel(self, dc, mDataDict):
++         # make a string to display
++         s = "Crv# %i, '%s', Pt. (%.2f,%.2f), PtInd %i" % (
++             cNum, legend, px, py, pntIn)
++-        dc.DrawText(s, sx, sy + 1)
+++        dc.DrawText(s, int(sx), int(sy + 1))
++ 
++ 
++ def run_demo():
++diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py
++index dd3f77d52..abee47efb 100644
++--- a/wx/lib/plot/plotcanvas.py
+++++ b/wx/lib/plot/plotcanvas.py
++@@ -174,24 +174,24 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++ 
++         # Default Pens
++         self._gridPen = wx.Pen(wx.Colour(180, 180, 180, 255),
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_DOT)
++ 
++         self._centerLinePen = wx.Pen(wx.RED,
++-                                     self._pointSize[0],
+++                                     int(self._pointSize[0]),
++                                      wx.PENSTYLE_SHORT_DASH)
++ 
++         self._axesPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++ 
++         self._tickPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++         self._tickLength = tuple(-x * 2 for x in self._pointSize)
++ 
++         self._diagonalPen = wx.Pen(wx.BLUE,
++-                                   self._pointSize[0],
+++                                   int(self._pointSize[0]),
++                                    wx.PENSTYLE_DOT_DASH)
++ 
++     def SetCursor(self, cursor):
++@@ -1925,10 +1925,10 @@ def _Draw(self, graphics, xAxis=None, yAxis=None, dc=None):
++         # set clipping area so drawing does not occur outside axis box
++         ptx, pty, rectWidth, rectHeight = self._point2ClientCoord(p1, p2)
++         # allow graph to overlap axis lines by adding units to w and h
++-        dc.SetClippingRegion(ptx * self._pointSize[0],
++-                             pty * self._pointSize[1],
++-                             rectWidth * self._pointSize[0] + 2,
++-                             rectHeight * self._pointSize[1] + 1)
+++        dc.SetClippingRegion(int(ptx * self._pointSize[0]),
+++                             int(pty * self._pointSize[1]),
+++                             int(rectWidth * self._pointSize[0] + 2),
+++                             int(rectHeight * self._pointSize[1] + 1))
++         # Draw the lines and markers
++ #        start = _time.perf_counter()
++         graphics.draw(dc)
++@@ -2280,7 +2280,7 @@ def _drawLegend(self, dc, graphics, rhsW, topH, legendBoxWH,
++             pnt = ((trhc[0] + legendLHS + legendSymExt[0]
++                     + 5 * self._pointSize[0]),
++                    trhc[1] + s + lineHeight / 2. - legendTextExt[1] / 2)
++-            dc.DrawText(o.getLegend(), pnt[0], pnt[1])
+++            dc.DrawText(o.getLegend(), int(pnt[0]), int(pnt[1]))
++         dc.SetFont(self._getFont(self._fontSizeAxis))  # reset
++ 
++     def _titleLablesWH(self, dc, graphics):
++@@ -2329,7 +2329,7 @@ def _drawRubberBand(self, corner1, corner2):
++         dc.SetPen(wx.Pen(wx.BLACK))
++         dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_TRANSPARENT))
++         dc.SetLogicalFunction(wx.INVERT)
++-        dc.DrawRectangle(ptx, pty, rectWidth, rectHeight)
+++        dc.DrawRectangle(int(ptx), int(pty), int(rectWidth), int(rectHeight))
++         dc.SetLogicalFunction(wx.COPY)
++ 
++     def _getFont(self, size):
++@@ -2423,7 +2423,7 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.gridPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         x, y, width, height = self._point2ClientCoord(p1, p2)
++@@ -2432,13 +2432,13 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++             if self.enableGrid[0]:
++                 for x, _ in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0], pt[1] - height)
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - height))
++ 
++         if self._ySpec != 'none':
++             if self.enableGrid[1]:
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0] + width, pt[1])
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0] + width), int(pt[1]))
++ 
++     @TempStyle('pen')
++     def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2471,7 +2471,7 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.tickPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         # lengthen lines for printing
++@@ -2484,13 +2484,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] - xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - xTickLength)))
++                 dc.DrawLineList(lines)
++             if ticks.top:
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] + xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] + xTickLength)))
++                 dc.DrawLineList(lines)
++ 
++         if self.ySpec != 'none':
++@@ -2498,13 +2498,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] + yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] + yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++             if ticks.right:
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] - yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] - yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++ 
++     @TempStyle('pen')
++@@ -2531,25 +2531,25 @@ def _drawCenterLines(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.centerLinePen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._centerLinesEnabled in ('Horizontal', True):
++             y1 = scale[1] * p1[1] + shift[1]
++             y2 = scale[1] * p2[1] + shift[1]
++             y = (y1 - y2) / 2.0 + y2
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        y,
++-                        scale[0] * p2[0] + shift[0],
++-                        y)
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(y),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(y))
++         if self._centerLinesEnabled in ('Vertical', True):
++             x1 = scale[0] * p1[0] + shift[0]
++             x2 = scale[0] * p2[0] + shift[0]
++             x = (x1 - x2) / 2.0 + x2
++-            dc.DrawLine(x,
++-                        scale[1] * p1[1] + shift[1],
++-                        x,
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(x),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(x),
+++                        int(scale[1] * p2[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawDiagonals(self, dc, p1, p2, scale, shift):
++@@ -2575,19 +2575,19 @@ def _drawDiagonals(self, dc, p1, p2, scale, shift):
++         """
++         pen = self.diagonalPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._diagonalsEnabled in ('Bottomleft-Topright', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]))
++         if self._diagonalsEnabled in ('Bottomright-Topleft', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxes(self, dc, p1, p2, scale, shift):
++@@ -2614,7 +2614,7 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.axesPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         axes = self.enableAxes
++@@ -2623,24 +2623,24 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p1[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p1[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.top:
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p2[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p2[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++         if self.ySpec != 'none':
++             if axes.left:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p1[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p1[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.right:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p2[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p2[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2686,8 +2686,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] + 2 * self._pointSize[1] - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] + 2 * self._pointSize[1] - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2698,8 +2698,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w, h = dc.GetTextExtent(label)
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] - 2 * self._pointSize[1] - h - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] - 2 * self._pointSize[1] - h - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2712,8 +2712,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] - w - 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] - w - 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2725,8 +2725,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] + 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] + 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2785,7 +2785,7 @@ def _drawPlotTitle(self, dc, graphics, lhsW, rhsW, titleWH):
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - titleWH[0] / 2.,
++             self.plotbox_origin[1] - self.plotbox_size[1]
++         )
++-        dc.DrawText(graphics.title, titlePos[0], titlePos[1])
+++        dc.DrawText(graphics.title, int(titlePos[0]), int(titlePos[1]))
++ 
++     def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++                         xLabelWH, yLabelWH):
++@@ -2806,7 +2806,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - xLabelWH[0] / 2.,
++             self.plotbox_origin[1] - xLabelWH[1] - yTickLength
++         )
++-        dc.DrawText(graphics.xLabel, xLabelPos[0], xLabelPos[1])
+++        dc.DrawText(graphics.xLabel, int(xLabelPos[0]), int(xLabelPos[1]))
++         yLabelPos = (
++             self.plotbox_origin[0] - 3 * self._pointSize[0] + xTickLength,
++             self.plotbox_origin[1] - bottomH
++@@ -2814,7 +2814,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++         )
++         if graphics.yLabel:  # bug fix for Linux
++             dc.DrawRotatedText(
++-                graphics.yLabel, yLabelPos[0], yLabelPos[1], 90)
+++                graphics.yLabel, int(yLabelPos[0]), int(yLabelPos[1]), 90)
++ 
++     @TempStyle('pen')
++     def _drawPlotAreaLabels(self, dc, graphics, lhsW, rhsW, titleWH,
++@@ -2942,7 +2942,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++ 
++-            self.sb_hor.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_hor.SetScrollbar(pos, pagesize, int(sbfullrange), pagesize)
++             self._sb_xunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++@@ -2964,7 +2964,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++             pos = (sbfullrange - 1 - pos - pagesize)
++-            self.sb_vert.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_vert.SetScrollbar(int(pos), pagesize, int(sbfullrange), pagesize)
++             self._sb_yunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++diff --git a/wx/lib/plot/polyobjects.py b/wx/lib/plot/polyobjects.py
++index 26a54f8f7..725b0164e 100644
++--- a/wx/lib/plot/polyobjects.py
+++++ b/wx/lib/plot/polyobjects.py
++@@ -417,7 +417,7 @@ def draw(self, dc, printerScale, coord=None):
++ 
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_BUTT)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -518,7 +518,7 @@ def draw(self, dc, printerScale, coord=None):
++         style = self.attributes['style']
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_ROUND)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -590,7 +590,7 @@ def draw(self, dc, printerScale, coord=None):
++         if fillcolour and not isinstance(fillcolour, wx.Colour):
++             fillcolour = wx.Colour(fillcolour)
++ 
++-        dc.SetPen(wx.Pen(colour, width))
+++        dc.SetPen(wx.Pen(colour, int(width)))
++         if fillcolour:
++             dc.SetBrush(wx.Brush(fillcolour, fillstyle))
++         else:
++@@ -618,6 +618,7 @@ def _circle(self, dc, coords, size=1):
++         dc.DrawEllipseList(rect.astype(np.int32))
++ 
++     def _dot(self, dc, coords, size=1):
+++        coords = [(int(c[0]), int(c[1])) for c in coords]
++         dc.DrawPointList(coords)
++ 
++     def _square(self, dc, coords, size=1):
++@@ -699,7 +700,7 @@ def set_pen_and_brush(self, dc, printerScale):
++ 
++         if not isinstance(pencolour, wx.Colour):
++             pencolour = wx.Colour(pencolour)
++-        pen = wx.Pen(pencolour, penwidth, penstyle)
+++        pen = wx.Pen(pencolour, int(penwidth), penstyle)
++         pen.SetCap(wx.CAP_BUTT)
++ 
++         if not isinstance(fillcolour, wx.Colour):
++@@ -790,6 +791,7 @@ def draw(self, dc, printerScale, coord=None):
++                 raise TypeError(err_str.format(type(barwidth)))
++ 
++             rects = [self.calc_rect(x, y, w) for x, y, w in pts]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3])) for r in rects]
++             dc.DrawRectangleList(rects)
++         else:
++             dc.DrawLines(coord)  # draw legend line
++@@ -858,6 +860,8 @@ def draw(self, dc, printerScale, coord=None):
++             rects = [self.calc_rect(y, low, high)
++                      for y, (low, high)
++                      in zip(self.hist, self.bins)]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3]))
+++                     for r in rects]
++ 
++             dc.DrawRectangleList(rects)
++         else:
++@@ -1114,10 +1118,10 @@ def _draw_iqr_box(self, dc, printerScale):
++                                       self.currentShift)
++ 
++         # rectangles are drawn (left, top, width, height) so adjust
++-        iqr_box = [iqr_box[0][0],                   # X (left)
++-                   iqr_box[0][1],                   # Y (top)
++-                   iqr_box[1][0] - iqr_box[0][0],   # Width
++-                   iqr_box[1][1] - iqr_box[0][1]]   # Height
+++        iqr_box = [int(iqr_box[0][0]),                   # X (left)
+++                   int(iqr_box[0][1]),                   # Y (top)
+++                   int(iqr_box[1][0] - iqr_box[0][0]),   # Width
+++                   int(iqr_box[1][1] - iqr_box[0][1])]   # Height
++ 
++         box_pen = wx.Pen(wx.BLACK, 3, wx.PENSTYLE_SOLID)
++         box_brush = wx.Brush(wx.GREEN, wx.BRUSHSTYLE_SOLID)
++@@ -1503,7 +1507,7 @@ def OnPrintPage(self, page):
++         self.graph._setSize(plotAreaW, plotAreaH)
++ 
++         # Set offset and scale
++-        dc.SetDeviceOrigin(pixLeft, pixTop)
+++        dc.SetDeviceOrigin(int(pixLeft), int(pixTop))
++ 
++         # Thicken up pens and increase marker size for printing
++         ratioW = float(plotAreaW) / clientDcSize[0]
++diff --git a/wx/lib/popupctl.py b/wx/lib/popupctl.py
++index 883be5ae5..236501f6d 100644
++--- a/wx/lib/popupctl.py
+++++ b/wx/lib/popupctl.py
++@@ -124,7 +124,7 @@ def Display(self):
++         selfSize = self.GetSize()
++         tcSize = self.ctrl.GetSize()
++ 
++-        pos.x -= (selfSize.width - tcSize.width) / 2
+++        pos.x -= (selfSize.width - tcSize.width) // 2
++         if pos.x + selfSize.width > dSize.width:
++             pos.x = dSize.width - selfSize.width
++         if pos.x < 0:
++diff --git a/wx/lib/scrolledpanel.py b/wx/lib/scrolledpanel.py
++index e4c482af9..1f783ea97 100644
++--- a/wx/lib/scrolledpanel.py
+++++ b/wx/lib/scrolledpanel.py
++@@ -222,4 +222,4 @@ def ScrollChildIntoView(self, child):
++         # if we need to adjust
++         if new_vs_x != -1 or new_vs_y != -1:
++             #print("%s: (%s, %s)" % (self.GetName(), new_vs_x, new_vs_y))
++-            self.Scroll(new_vs_x, new_vs_y)
+++            self.Scroll(int(new_vs_x), int(new_vs_y))
++diff --git a/wx/lib/throbber.py b/wx/lib/throbber.py
++index 9954d6b27..ee8c51209 100644
++--- a/wx/lib/throbber.py
+++++ b/wx/lib/throbber.py
++@@ -200,11 +200,11 @@ def Draw(self, dc):
++         """
++         dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True)
++         if self.overlay and self.showOverlay:
++-            dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True)
+++            dc.DrawBitmap(self.overlay, int(self.overlayX), int(self.overlayY), True)
++         if self.label and self.showLabel:
++-            dc.DrawText(self.label, self.labelX, self.labelY)
+++            dc.DrawText(self.label, int(self.labelX), int(self.labelY))
++             dc.SetTextForeground(wx.WHITE)
++-            dc.DrawText(self.label, self.labelX-1, self.labelY-1)
+++            dc.DrawText(self.label, int(self.labelX-1), int(self.labelY-1))
++ 
++ 
++     def OnPaint(self, event):
++diff --git a/wx/lib/ticker.py b/wx/lib/ticker.py
++index 04abf0d44..4e684b4cd 100644
++--- a/wx/lib/ticker.py
+++++ b/wx/lib/ticker.py
++@@ -86,7 +86,7 @@ def Stop(self):
++     def Start(self):
++         """Starts the text moving"""
++         if not self.timer.IsRunning():
++-            self.timer.Start(1000 / self._fps)
+++            self.timer.Start(1000 // self._fps)
++ 
++ 
++     def IsTicking(self):
++@@ -208,7 +208,7 @@ def DrawText(self, dc):
++             offx = self._offset - self._extent[0]
++         else:
++             offx = self.GetSize()[0] - self._offset
++-        offy = (self.GetSize()[1] - self._extent[1]) / 2 #centered vertically
+++        offy = (self.GetSize()[1] - self._extent[1]) // 2 #centered vertically
++         dc.DrawText(self._text, offx, offy)
++ 
++ 
+
diff --git a/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
new file mode 100644
index 000000000000..88c3ca189647
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
@@ -0,0 +1,57 @@
+From 1d5fd72dff63d62dd19b77e489d4115245d4d453 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 28 2021 02:58:12 +0000
+Subject: Fix more Python 3.10 issues with AGW FlatNotebook (#2035790)
+
+
+---
+
+diff --git a/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+new file mode 100644
+index 0000000..e8b74ac
+--- /dev/null
++++ b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+@@ -0,0 +1,43 @@
++From aa3dca0e40bd0701e82ce40297a982b5b84844dc Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Mon, 27 Dec 2021 19:48:55 -0500
++Subject: [PATCH] Fix additional Python 3.10 issues with AGW FlatNotebook
++
++---
++ wx/lib/agw/flatnotebook.py | 14 +++++++-------
++ 1 file changed, 7 insertions(+), 7 deletions(-)
++
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index d33f71d51..61bc4efb3 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -925,14 +925,14 @@ def DrawButton(dc, rect, focus, upperTabs):
++ 
++     if focus:
++         if upperTabs:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*8)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*8)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*8))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*8))
++         else:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*5)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*5)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*5))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*5))
++     else:
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 2)))
+++        rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 2)))
++ 
++     # Define the top region
++     top = wx.Rect(rect.GetTopLeft(), rightPt)
++@@ -2766,7 +2766,7 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         if pageTextColour is not None:
++             dc.SetTextForeground(pageTextColour)
++ 
++-        dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset, imageYCoord)
+++        dc.DrawText(pc.GetPageText(tabIdx), int(posx + textOffset), imageYCoord)
++ 
++         # draw 'x' on tab (if enabled)
++         if pc.HasAGWFlag(FNB_X_ON_TAB) and tabIdx == pc.GetSelection():
diff --git a/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
new file mode 100644
index 000000000000..6f21ecb7a718
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
@@ -0,0 +1,52 @@
+Backport https://github.com/wxWidgets/Phoenix/pull/1849
+Regarding segfault as in https://github.com/OSGeo/grass/issues/1123
+
+From 5cace47aaece3cc4f2e6ea97d7fd5bb8ed316ac9 Mon Sep 17 00:00:00 2001
+From: Robin Dunn <robin@alldunn.com>
+Date: Wed, 18 Nov 2020 10:52:53 -0800
+Subject: [PATCH] Restore GIL acquisition in wxPseudoDC::FindObjects*
+
+---
+ src/pseudodc.cpp | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/pseudodc.cpp b/src/pseudodc.cpp
+index 5890ed7e2..ed4bcd06a 100644
+--- a/src/pseudodc.cpp
++++ b/src/pseudodc.cpp
+@@ -483,7 +483,7 @@ bool wxPseudoDC::GetIdGreyedOut(int id)
+ // ----------------------------------------------------------------------------
+ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -501,7 +501,6 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+         }
+         pt = pt->GetNext();
+     }
+-    //wxPyEndBlockThreads(blocked);
+     return pyList;
+ }
+ 
+@@ -511,7 +510,7 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+                                   wxCoord radius, const wxColor& bg)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -611,8 +610,7 @@ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+         maskdc.SelectObject(wxNullBitmap);
+         memdc.SelectObject(wxNullBitmap);
+     }
+-    //wxPyEndBlockThreads(blocked);
+-    return pyList;
++     return pyList;
+ }
+ 
+ // ----------------------------------------------------------------------------
diff --git a/srcpkgs/wxPython4/template b/srcpkgs/wxPython4/template
index 554174105a36..afea1b55bf90 100644
--- a/srcpkgs/wxPython4/template
+++ b/srcpkgs/wxPython4/template
@@ -1,7 +1,7 @@
 # Template file for 'wxPython4'
 pkgname=wxPython4
 version=4.0.7
-revision=4
+revision=5
 wrksrc="wxPython-${version}"
 build_style=python3-module
 make_build_args="--skip-build"
@@ -10,6 +10,7 @@ hostmakedepends="pkg-config python3-setuptools python3-pathlib2"
 makedepends="python3-devel wxWidgets-gtk3-devel SDL2-devel webkit2gtk-devel
  gst-plugins-base1-devel"
 depends="python3 python3-six python3-numpy python3-Pillow"
+checkdepends="python3-six python3-numpy python3-Pillow"
 short_desc="WxWidgets GUI toolkit library (Python3 Bindings)"
 maintainer="Jasper Chan <jasperchan515@gmail.com>"
 license="custom:wxWindows"

From b5547740e409875cae2b910b3cc5ae14fd1b3b87 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 21:56:03 +0100
Subject: [PATCH 09/16] grass: update to 7.8.7RC1; rebuild against libgdal and
 proj

Version 7.8.7RC1 includes a workaround for a wxPython issue
https://github.com/OSGeo/grass/issues/1971#issuecomment-993622613
---
 srcpkgs/grass/patches/musl-build-fix.patch |  13 +++
 srcpkgs/grass/template                     | 128 +++++++++++++++++----
 2 files changed, 120 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..364ee30be4d9
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,13 @@
+error: unknown type name 'int64_t' patch for musl
+
+diff --git a/include/gis.h b/include/gis.h
+--- a/include/gis.h
++++ b/include/gis.h
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ 
+ 
+ /* Grass and local include files */
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..167faa401385 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,116 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.7RC1
+revision=1
+_binversion=${version//./}
+_binversion=${_binversion:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=/usr/lib
+ --bindir=/usr/bin
+ --libdir=/usr/lib
+ --libexec=/usr/libexec
+ --enable-largefile
+ --with-blas
+ --with-blas-includes=/usr/include
+ --with-bzip2
+ --with-bzlib
+ --with-cairo
+ --with-cxx
+ --with-freetype
+ --with-freetype-includes=/usr/include/freetype2
+ --with-gdal
+ --with-geos
+ --with-glw
+ --with-lapack
+ --with-lapack-includes=/usr/include
+ --with-mysql
+ --with-mysql-includes=/usr/include/mysql
+ --with-netcdf=/usr/bin/nc-config
+ --with-nls
+ --with-openmp
+ --with-postgres
+ --with-postgres-includes=/usr/include/postgresql
+ --with-postgres-libs=/usr/lib/psql14/lib/postgresql
+ --with-proj
+ --with-proj-share=/usr/share
+ --with-pthread
+ --with-python=/usr/bin/python3-config
+ --with-readline
+ --with-regex
+ --with-sqlite
+ --with-wxwidgets"
+hostmakedepends="flex
+ gettext
+ libgdal-tools
+ pkg-config
+ python3-numpy
+ python3-six
+ tar"
+makedepends="bison
+ blas-devel
+ bzip2-devel
+ cairo-devel
+ fftw-devel
+ freetype-devel
+ geos-devel
+ gettext-devel
+ glu-devel
+ lapack-devel
+ libgdal-devel
+ libgomp-devel
+ libmysqlclient-devel
+ libpng-devel
+ libzstd-devel
+ netcdf-devel
+ postgresql-libs-devel
+ proj-devel
+ python3-devel
+ python3-Pillow
+ python3-six
+ readline-devel
+ sqlite-devel
+ tiff-devel
+ zlib-devel"
+depends="libgdal python3-numpy wxPython4"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=fa1d6ccc1fde4cbea0be095256729421c41c1a12bf621fe124d0d2c8e826de6a
 nocross="tries to execute target binaries"
 
+shlib_provides="
+ libgrass_dbmibase.${version%.*}.so
+ libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so
+ libgrass_gproj.${version%.*}.so
+ libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so
+ libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass78 \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binversion}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binversion}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binversion}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binversion}.sh
+
+	vinstall grass.pc 644 usr/share/pkgconfig
+	vinstall gui/icons/grass.desktop 644 usr/share/applications
+
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

From 5788f754339f7ab01f2e81703daa015d131d6513 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 10/16] merkaartor: rebuild against libgdal-3.4.1 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From a653866f964176f39743f9620f2adaf96879dfa5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 11/16] OpenOrienteering-Mapper: rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From 8c3e70f69e64390b2ce3c0137055c59ef19904f9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 12/16] osg: rebuild against libgdal-3.4.1, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From fb04a6571791ae2b46dc8d4702da64381e3c37a5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 13/16] sumo: update to 1.9.2; rebuild against libgdal-3.4.1
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 common/shlibs         |  2 ++
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 62b573986051..ae4de3bd14b6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4127,3 +4127,5 @@ libgrass_dbmibase.7.8.so grass-7.8.5_1
 libgrass_imagery.7.8.so grass-7.8.5_1
 libkmlconvenience.so.1 libkml-1.3.0_1
 mod_spatialite.so.7 libspatialite-5.0.0_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index e760fdd45aee..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=4
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From 42b77533bc7798fe20a8f788771a99d6db00b84e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 14/16] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From f7056546446ed442e5b353f74b885ff990f87a15 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 15/16] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 4f920c912836d4754544bd962b7d7a4e6b05d8d6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 16/16] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (29 preceding siblings ...)
  2022-02-15  0:30 ` ar-jan
@ 2022-02-15  0:35 ` ar-jan
  2022-02-15  0:58 ` ar-jan
                   ` (26 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-15  0:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 204629 bytes --]

From cbbcc5ddb0466c3d823494210358e6b0383a5155 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/16] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 0c60260b4642..b0fcfd04926e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 025f72e94b219c30723901902b52994a01a4db15 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Sun, 20 Dec 2020 14:49:30 +0100
Subject: [PATCH 02/16] New package: libspatialite-5.0.1

---
 common/shlibs                                 | 17 ++++++++
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_sql.patch           | 29 +++++++++++++
 srcpkgs/libspatialite/template                | 42 +++++++++++++++++++
 4 files changed, 89 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index b0fcfd04926e..121c3164f92b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4110,3 +4110,20 @@ libawt_xawt.so openjdk17-jre-17.0.1+12_1
 libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
+libavif.so.12 libavif-0.9.2_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.0_1
+libspatialindex.so.6 libspatialindex-1.9.3_1
+libgrass_gis.7.8.so grass-7.8.5_1
+libgrass_raster.7.8.so grass-7.8.5_1
+libgrass_gproj.7.8.so grass-7.8.5_1
+libgrass_dbmiclient.7.8.so grass-7.8.5_1
+libgrass_vector.7.8.so grass-7.8.5_1    
+libgrass_dbmibase.7.8.so grass-7.8.5_1
+libgrass_imagery.7.8.so grass-7.8.5_1
+libkmlconvenience.so.1 libkml-1.3.0_1
+mod_spatialite.so.7 libspatialite-5.0.0_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql.patch b/srcpkgs/libspatialite/patches/disable_check_sql.patch
new file mode 100644
index 000000000000..951c1ac1724d
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql.patch
@@ -0,0 +1,29 @@
+disable check_sql_stmt test
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..2ea1701d8ae6
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,42 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.1
+revision=1
+build_style=gnu-configure
+configure_args="--disable-rttopo"
+hostmakedepends="pkg-config libxml2"
+makedepends="freexl-devel
+ geos-devel
+ libxml2-devel
+ minizip-devel
+ proj-devel
+ sqlite-devel
+ zlib-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 6b6bc91d6044ae8513961e252bf3db952530fc43 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/16] New package: libkml-1.3.0

---
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 ++++++++++++++++
 srcpkgs/libkml/template                | 27 ++++++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..b67eece4d8ba
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,27 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="boost-devel
+ expat-devel
+ minizip-devel
+ uriparser-devel
+ zlib-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From 9cd42e143b8f09dfa254b0d3db40068ca1a429c6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 04/16] libgdal: update to 3.4.1 and rebuild against proj-7.2.1

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 105 ++++++++++++++++--
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 95 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 121c3164f92b..62b573986051 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2510,7 +2510,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..5fca579954fa 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,100 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.1
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libspatialite-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ libkml-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=e360387bc25ec24940f46afbeada48002d72c74aaf9eccf2a40e8d74e711a2e4
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +116,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 322fcb7177ca3a86b15bfb9e6f6e4d5c049d31e2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 05/16] postgis: update to 3.1.5; rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..f52cd6657988 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.1.5
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From b5f8b10380a78af7284a88021a71ec5656c5a3e0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 06/16] postgis-postgresql13: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..a0f5c89ef4da 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
-revision=2
+version=3.1.5
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From f3b40ee6faad2e82403c33d1e60831906ed5165c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 07/16] postgis-postgresql14: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..ad8d0c5c4253 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.1.5
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 1018a000653786242976983b2e673af79dbec2be Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 9 Aug 2021 19:53:17 +0200
Subject: [PATCH 08/16] wxPython4: backport patches, and fix tests

Backported patches:
- wxPseudoDC GIL
- Python 3.10 AGW FlatNotebook patch
- Python 3.10 ScrolledWindow argument types
- Python 3.10 Integer division
- wx.WindowID and wx.Region arguments
---
 .../patches/0002-Python-3.10-issues.patch     | 3317 +++++++++++++++++
 .../0003-Python-3.10-AGW-FlatNotebook.patch   |   57 +
 .../patches/restore-gil-pseudodc.patch        |   52 +
 srcpkgs/wxPython4/template                    |    3 +-
 4 files changed, 3428 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
 create mode 100644 srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
 create mode 100644 srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch

diff --git a/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
new file mode 100644
index 000000000000..6c87ff967d01
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
@@ -0,0 +1,3317 @@
+From f55a17c2d3b336c82fb44f7816ec63219847f4cc Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 22 2021 20:23:54 +0000
+Subject: Fix a bunch of Python 3.10 issues
+
+
+---
+
+diff --git a/0d449626d6d298ad96ebd1d514d0e42833bce470.patch b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+new file mode 100644
+index 0000000..d2ccddc
+--- /dev/null
++++ b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+@@ -0,0 +1,22 @@
++From 0d449626d6d298ad96ebd1d514d0e42833bce470 Mon Sep 17 00:00:00 2001
++From: Carolina Feher da Silva <carolfsu@gmail.com>
++Date: Tue, 16 Nov 2021 01:24:31 +0000
++Subject: [PATCH] Fixed integer division in Python 3
++
++---
++ wx/lib/stattext.py | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/wx/lib/stattext.py b/wx/lib/stattext.py
++index 2cfb6e65a..e606e5a89 100644
++--- a/wx/lib/stattext.py
+++++ b/wx/lib/stattext.py
++@@ -302,7 +302,7 @@ def OnPaint(self, event):
++             if style & wx.ALIGN_RIGHT:
++                 x = width - w
++             if style & wx.ALIGN_CENTER:
++-                x = (width - w)/2
+++                x = (width - w)//2
++             dc.DrawText(line, x, y)
++             y += h
++ 
+diff --git a/3eb9eb32dc3285435039f6c420c398665372a1ad.patch b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+new file mode 100644
+index 0000000..08e58a0
+--- /dev/null
++++ b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+@@ -0,0 +1,84 @@
++From 3eb9eb32dc3285435039f6c420c398665372a1ad Mon Sep 17 00:00:00 2001
++From: Glen Whitney <glen@studioinfinity.org>
++Date: Tue, 31 Aug 2021 11:06:27 -0700
++Subject: [PATCH] fix: Correct types of arguments to
++ ScrolledWindow.SetScrollbars
++
++---
++ demo/Mask.py                   |  2 +-
++ demo/OGL.py                    |  2 +-
++ wx/lib/agw/ultimatelistctrl.py | 14 +++++++-------
++ 3 files changed, 9 insertions(+), 9 deletions(-)
++
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 5f0c2cdde..109b8f30b 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -56,7 +56,7 @@ def __init__(self, parent):
++         mask = wx.Mask(self.bmp_withcolourmask, wx.WHITE)
++         self.bmp_withcolourmask.SetMask(mask)
++ 
++-        self.SetScrollbars(20, 20, 700/20, 460/20)
+++        self.SetScrollbars(20, 20, 700//20, 460//20)
++ 
++         self.Bind(wx.EVT_PAINT, self.OnPaint)
++ 
++diff --git a/demo/OGL.py b/demo/OGL.py
++index 72ca543dd..d475e5011 100644
++--- a/demo/OGL.py
+++++ b/demo/OGL.py
++@@ -272,7 +272,7 @@ def __init__(self, parent, log, frame):
++ 
++         maxWidth  = 1000
++         maxHeight = 1000
++-        self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
+++        self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
++ 
++         self.log = log
++         self.frame = frame
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index c60867684..14fc41f86 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -9654,8 +9654,8 @@ def RecalculatePositions(self, noRefresh=False):
++                 self._linesPerPage = clientHeight//lineHeight
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + lineHeight - 1)/lineHeight,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + lineHeight - 1)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9676,8 +9676,8 @@ def RecalculatePositions(self, noRefresh=False):
++                     decrement = SCROLL_UNIT_X
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + SCROLL_UNIT_Y - 1)/SCROLL_UNIT_Y,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + SCROLL_UNIT_Y - 1)//SCROLL_UNIT_Y,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9728,8 +9728,8 @@ def RecalculatePositions(self, noRefresh=False):
++                         line._gi.ExtendWidth(widthMax)
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (x + SCROLL_UNIT_X)/SCROLL_UNIT_X,
++-                                   (y + lineHeight)/lineHeight,
+++                                   (x + SCROLL_UNIT_X)//SCROLL_UNIT_X,
+++                                   (y + lineHeight)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9797,7 +9797,7 @@ def RecalculatePositions(self, noRefresh=False):
++                             break  # Everything fits, no second try required.
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (entireWidth + SCROLL_UNIT_X)/SCROLL_UNIT_X,
+++                                   (entireWidth + SCROLL_UNIT_X)//SCROLL_UNIT_X,
++                                    0,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    0,
+diff --git a/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+new file mode 100644
+index 0000000..f0b9f5d
+--- /dev/null
++++ b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+@@ -0,0 +1,143 @@
++From 9096426603272672d9a676e8bcdcadf0a1cfa1a2 Mon Sep 17 00:00:00 2001
++From: Robin Dunn <robin@alldunn.com>
++Date: Wed, 26 Feb 2020 11:10:27 -0800
++Subject: [PATCH] Add __index__ to wx.WindowID, and __bool__ to wx.Region
++
++---
++ etg/region.py              |  5 +++--
++ etg/windowid.py            | 32 +++++++++++++++++---------------
++ unittests/test_windowid.py | 23 +++++++++++++++++++++--
++ 3 files changed, 41 insertions(+), 19 deletions(-)
++
++diff --git a/etg/region.py b/etg/region.py
++index 0982c1fe5..d5bc45759 100644
++--- a/etg/region.py
+++++ b/etg/region.py
++@@ -88,11 +88,12 @@ def next(self):
++     c.mustHaveApp()
++     c.find('operator++').ignore()
++ 
++-    # SIP maps operator bool() to __int__, but Classic used __nonzero__. Does
++-    # it make any difference either way?
++     c.find('operator bool').ignore()
++     c.addCppMethod('int', '__nonzero__', '()', 'return (int)self->operator bool();',
++                    'Returns true while there are still rectangles available in the iteration.')
+++    c.addCppMethod('int', '__bool__', '()', 'return (int)self->operator bool();',
+++                   'Returns true while there are still rectangles available in the iteration.')
+++
++ 
++     c.addCppMethod('void', 'Next', '()', 'self->operator++();',
++                    'Move the iterator to the next rectangle in the region.')
++diff --git a/etg/windowid.py b/etg/windowid.py
++index 27b041b3d..da2ed395e 100644
++--- a/etg/windowid.py
+++++ b/etg/windowid.py
++@@ -53,12 +53,12 @@ def run():
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Create reference from an ID',
++                     items=[ ParamDef(type='int', name='id') ]),
++-                
+++
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Copy an ID reference',
++                     items=[ ParamDef(type='const wxWindowIDRef&', name='idref') ]),
++                 ]),
++-            
+++
++             MethodDef(name='~wxWindowIDRef', className='wxWindowIDRef', isDtor=True),
++ 
++             MethodDef(type='int', name='GetValue',
++@@ -73,11 +73,13 @@ def run():
++             """)
++ 
++     klass.addCppMethod('int', '__int__', '()',
++-        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or etc.",
++-        body="""\
++-            return self->GetValue();
++-            """)
++-    
+++        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or other places an integer type is needed.",
+++        body="return self->GetValue();")
+++    klass.addCppMethod('int', '__index__', '()',
+++        doc="See :meth:`__int__`",
+++        body="return self->GetValue();")
+++
+++
++     klass.addCppMethod('bool', '__eq__', '(wxWindowID id)', "return self->GetValue() == id;")
++     klass.addCppMethod('bool', '__ne__', '(wxWindowID id)', "return self->GetValue() != id;")
++     klass.addCppMethod('bool', '__lt__', '(wxWindowID id)', "return self->GetValue() < id;")
++@@ -92,17 +94,17 @@ def run():
++     # and finish it up by adding it to the module
++     module.addItem(klass)
++ 
++-    # Now, let's add a new Python function to the global scope that reserves an 
++-    # ID (or range) and returns a ref object for it. 
++-    module.addPyFunction('NewIdRef', '(count=1)', 
+++    # Now, let's add a new Python function to the global scope that reserves an
+++    # ID (or range) and returns a ref object for it.
+++    module.addPyFunction('NewIdRef', '(count=1)',
++         doc="""\
++-            Reserves a new Window ID (or range of WindowIDs) and returns a 
++-            :class:`wx.WindowIDRef` object (or list of them) that will help 
+++            Reserves a new Window ID (or range of WindowIDs) and returns a
+++            :class:`wx.WindowIDRef` object (or list of them) that will help
++             manage the reservation of that ID.
++ 
++-            This function is intended to be a drop-in replacement of the old 
++-            and deprecated :func:`wx.NewId` function, with the added benefit 
++-            that the ID should never conflict with an in-use ID or other IDs 
+++            This function is intended to be a drop-in replacement of the old
+++            and deprecated :func:`wx.NewId` function, with the added benefit
+++            that the ID should never conflict with an in-use ID or other IDs
++             generated by this function.
++             """,
++         body="""\
++diff --git a/unittests/test_windowid.py b/unittests/test_windowid.py
++index 4593e5a69..fc36c9eb8 100644
++--- a/unittests/test_windowid.py
+++++ b/unittests/test_windowid.py
++@@ -31,9 +31,9 @@ def test_newIdRef02(self):
++     def test_newIdRef03(self):
++         """Check that Auto ID Management is enabled (--enable-autoidman)"""
++         # This test is expected to fail if autoID mangagement is turned on
++-        # because a reference to the ID is not being saved, so it will be 
+++        # because a reference to the ID is not being saved, so it will be
++         # unreserved when the first widget is destroyed.
++-        
+++
++         id = wx.Window.NewControlId()
++         b = wx.Button(self.frame, id, 'button')
++         b.Destroy()
++@@ -75,6 +75,7 @@ def test_WindowIDRef01(self):
++         val = ref1 <= ref2
++         assert type(val) == bool
++ 
+++
++     def test_WindowIDRef02(self):
++         d = {wx.NewIdRef(): 'one',
++              wx.NewIdRef(): 'two'}
++@@ -82,6 +83,24 @@ def test_WindowIDRef02(self):
++         for k in keys:
++             val = d[k]
++ 
+++
+++    def test_WindowIDRef03(self):
+++        # Ensure wx.WindowIDRef can be converted to int without warning when
+++        # making a call to warrped method. In Py3.8+ this means there needs to
+++        # be an __index__ method.
+++
+++        # Turn warnings into exceptions so this test will fail if there is
+++        # a warning
+++        import warnings
+++        warnings.simplefilter('error')
+++
+++        wid = wx.NewIdRef()
+++        assert isinstance(wid, wx.WindowIDRef)
+++
+++        b = wx.Button(self.frame, wid, 'button')
+++        assert b.GetId() == wid.GetId()
+++
+++
++ #---------------------------------------------------------------------------
++ 
++ 
+ 
+diff --git a/python3.10-fixes.patch b/python3.10-fixes.patch
+new file mode 100644
+index 0000000..29e8c61
+--- /dev/null
++++ b/python3.10-fixes.patch
+@@ -0,0 +1,3034 @@
++From 173d0796810bb65de9bdfdc6941d24a04628f6c2 Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Wed, 1 Dec 2021 14:19:00 -0500
++Subject: [PATCH] Fix a bunch of Python 3.10 issues with pure-Python classes
++ and demos
++
++In Python 3.10, a change[1] was implemented where extension functions
++that take integer arguments will no longer silently accept non-integer
++arguments (e.g., floats) that can only be converted to integers with a
++loss of precision.  This PR fixes most of these issues in the pure-Python
++classes and demos by explicitly converting the parameters to int before
++passing them to wxWidgets.  There is loss of precision, but this was
++happening before (automatically) anyway as most wxWidgets DeviceContext
++functions operate using integers.
++
++Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
++too small on GTK3.
++
++This is an example of the relevant exception:
++Traceback (most recent call last):
++  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
++    r.width = w
++TypeError: 'float' object cannot be interpreted as an integer
++
++Fixes #2038.
++
++[1] https://bugs.python.org/issue37999
++---
++ demo/GridLabelRenderer.py               |   4 +-
++ demo/Mask.py                            |   4 +-
++ demo/Overlay.py                         |   1 -
++ demo/PenAndBrushStyles.py               |   2 +-
++ demo/PopupWindow.py                     |   2 +-
++ demo/PrintFramework.py                  |   2 +-
++ demo/PropertyGrid.py                    |   2 +-
++ demo/Sizers.py                          |   2 +-
++ demo/UIActionSimulator.py               |   2 +-
++ demo/agw/AUI.py                         |  32 +++----
++ demo/agw/MacLargeDemo.py                |   4 +-
++ demo/agw/PeakMeter.py                   |   6 +-
++ demo/agw/PersistentControls.py          |   2 +-
++ demo/agw/RibbonBar.py                   |   2 +-
++ demo/agw/SpeedMeter.py                  |   2 +-
++ demo/agw/SuperToolTip.py                |   3 +-
++ demo/agw/ThumbDemoConfig.py             |   1 +
++ demo/agw/UltimateReportDemo.py          |   8 +-
++ demo/agw/Windows7Explorer_Contents.py   |  16 ++--
++ demo/agw/ZoomBar.py                     |   2 +-
++ wx/lib/agw/advancedsplash.py            |   2 +-
++ wx/lib/agw/aui/aui_utilities.py         |   4 +-
++ wx/lib/agw/aui/auibook.py               |   4 +-
++ wx/lib/agw/balloontip.py                |   4 +-
++ wx/lib/agw/flatmenu.py                  |  62 ++++++-------
++ wx/lib/agw/flatnotebook.py              |  10 +--
++ wx/lib/agw/floatspin.py                 |   2 +-
++ wx/lib/agw/gradientbutton.py            |   8 +-
++ wx/lib/agw/hypertreelist.py             |   2 +-
++ wx/lib/agw/knobctrl.py                  |  12 +--
++ wx/lib/agw/labelbook.py                 |  32 +++----
++ wx/lib/agw/peakmeter.py                 |   2 +-
++ wx/lib/agw/pygauge.py                   |   4 +-
++ wx/lib/agw/ribbon/art_aui.py            |  22 ++---
++ wx/lib/agw/ribbon/art_internal.py       |  12 +--
++ wx/lib/agw/ribbon/art_msw.py            |  88 +++++++++----------
++ wx/lib/agw/ribbon/bar.py                |   4 +-
++ wx/lib/agw/ribbon/buttonbar.py          |   6 +-
++ wx/lib/agw/ribbon/gallery.py            |   8 +-
++ wx/lib/agw/ribbon/panel.py              |  16 ++--
++ wx/lib/agw/ribbon/toolbar.py            |   2 +-
++ wx/lib/agw/scrolledthumbnail.py         |  24 +++---
++ wx/lib/agw/shapedbutton.py              |  10 +--
++ wx/lib/agw/speedmeter.py                |  72 +++++++++-------
++ wx/lib/agw/supertooltip.py              |  20 ++---
++ wx/lib/agw/toasterbox.py                |   4 +-
++ wx/lib/agw/ultimatelistctrl.py          |  20 ++---
++ wx/lib/agw/xlsgrid.py                   |   4 +-
++ wx/lib/agw/zoombar.py                   |  10 +--
++ wx/lib/analogclock/analogclock.py       |   2 +-
++ wx/lib/analogclock/helpers.py           |  22 ++---
++ wx/lib/analogclock/setup.py             |   6 +-
++ wx/lib/buttons.py                       |  10 +--
++ wx/lib/colourchooser/pycolourchooser.py |   4 +-
++ wx/lib/colourchooser/pypalette.py       |   2 +-
++ wx/lib/floatcanvas/FCObjects.py         |   8 +-
++ wx/lib/gizmos/ledctrl.py                |   8 +-
++ wx/lib/imagebrowser.py                  |   4 +-
++ wx/lib/ogl/basic.py                     |  10 +--
++ wx/lib/ogl/bmpshape.py                  |   2 +-
++ wx/lib/ogl/composit.py                  |   4 +-
++ wx/lib/ogl/divided.py                   |   2 +-
++ wx/lib/ogl/lines.py                     |   2 +-
++ wx/lib/ogl/oglmisc.py                   |   4 +-
++ wx/lib/plot/examples/demo.py            |   4 +-
++ wx/lib/plot/plotcanvas.py               | 110 ++++++++++++------------
++ wx/lib/plot/polyobjects.py              |  22 +++--
++ wx/lib/popupctl.py                      |   2 +-
++ wx/lib/scrolledpanel.py                 |   2 +-
++ wx/lib/throbber.py                      |   6 +-
++ wx/lib/ticker.py                        |   4 +-
++ 71 files changed, 411 insertions(+), 398 deletions(-)
++
++diff --git a/demo/GridLabelRenderer.py b/demo/GridLabelRenderer.py
++index 794dd64e8..1440ef41b 100644
++--- a/demo/GridLabelRenderer.py
+++++ b/demo/GridLabelRenderer.py
++@@ -46,8 +46,8 @@ def __init__(self):
++         self._bmp = images.Smiles.GetBitmap()
++ 
++     def Draw(self, grid, dc, rect, rc):
++-        x = rect.left + (rect.width - self._bmp.GetWidth()) / 2
++-        y = rect.top + (rect.height - self._bmp.GetHeight()) / 2
+++        x = rect.left + (rect.width - self._bmp.GetWidth()) // 2
+++        y = rect.top + (rect.height - self._bmp.GetHeight()) // 2
++         dc.DrawBitmap(self._bmp, x, y, True)
++ 
++ 
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 109b8f30b..e924f95b9 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -90,9 +90,9 @@ def OnPaint (self, e):
++ 
++         for text, code in logicList:
++             x,y = 120+150*(i%4), 20+100*(i/4)
++-            dc.DrawText(text, x, y-20)
+++            dc.DrawText(text, x, int(y-20))
++             mdc.SelectObject(self.bmp_withcolourmask)
++-            dc.Blit(x,y, cx,cy, mdc, 0,0, code, True)
+++            dc.Blit(x,int(y), cx,cy, mdc, 0,0, code, True)
++             i = i + 1
++ 
++ 
++diff --git a/demo/Overlay.py b/demo/Overlay.py
++index 65164cd84..fa65be003 100644
++--- a/demo/Overlay.py
+++++ b/demo/Overlay.py
++@@ -56,7 +56,6 @@ def __init__(self, parent, log):
++         self.penstylesCombo.SetToolTip('Pen Style')
++ 
++         self.overlayPenWidth = wx.SpinCtrl(self, -1, value='',
++-                                           size=(75, -1),
++                                            style=wx.SP_ARROW_KEYS,
++                                            min=1, max=24, initial=1)
++         self.overlayPenWidth.SetToolTip('Pen Width')
++diff --git a/demo/PenAndBrushStyles.py b/demo/PenAndBrushStyles.py
++index 24040b1fc..1183f684a 100644
++--- a/demo/PenAndBrushStyles.py
+++++ b/demo/PenAndBrushStyles.py
++@@ -100,7 +100,7 @@ def OnPaint(self, event):
++ 
++         dc.SetPen(pen)
++         y = labelHeight + (height - labelHeight)/2
++-        dc.DrawLine(5, y, width-5, y)
+++        dc.DrawLine(5, int(y), width-5, int(y))
++ 
++ 
++ class BrushPanel(BasePanel):
++diff --git a/demo/PopupWindow.py b/demo/PopupWindow.py
++index d8e175576..b54b9870d 100644
++--- a/demo/PopupWindow.py
+++++ b/demo/PopupWindow.py
++@@ -89,7 +89,7 @@ def __init__(self, parent, style, log):
++                           "(or its first child) loses focus in \n"
++                           "any other way.")
++         btn = wx.Button(panel, -1, "Press Me")
++-        spin = wx.SpinCtrl(panel, -1, "Hello", size=(100,-1))
+++        spin = wx.SpinCtrl(panel, -1, "Hello")
++         btn.Bind(wx.EVT_BUTTON, self.OnButton)
++ 
++         sizer = wx.BoxSizer(wx.VERTICAL)
++diff --git a/demo/PrintFramework.py b/demo/PrintFramework.py
++index e7a29a077..f0873ae94 100644
++--- a/demo/PrintFramework.py
+++++ b/demo/PrintFramework.py
++@@ -81,7 +81,7 @@ def OnPrintPage(self, page):
++ 
++         #-------------------------------------------
++         self.canvas.DoDrawing(dc, True)
++-        dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
+++        dc.DrawText("Page: %d" % page, marginX//2, maxY-marginY)
++ 
++         return True
++ 
++diff --git a/demo/PropertyGrid.py b/demo/PropertyGrid.py
++index c56e08b60..fbef29e31 100644
++--- a/demo/PropertyGrid.py
+++++ b/demo/PropertyGrid.py
++@@ -150,7 +150,7 @@ def _ConvertValue(self, value):
++         """ Utility convert arbitrary value to a real wx.Size.
++         """
++         import collections
++-        if isinstance(value, collections.Sequence) or hasattr(value, '__getitem__'):
+++        if isinstance(value, collections.abc.Sequence) or hasattr(value, '__getitem__'):
++             value = wx.Size(*value)
++         return value
++ 
++diff --git a/demo/Sizers.py b/demo/Sizers.py
++index 6ababede9..a025050f1 100644
++--- a/demo/Sizers.py
+++++ b/demo/Sizers.py
++@@ -45,7 +45,7 @@ def OnPaint(self, evt):
++         dc = wx.PaintDC(self)
++         w,h = dc.GetTextExtent(self.text)
++         dc.Clear()
++-        dc.DrawText(self.text, (sz.width-w)/2, (sz.height-h)/2)
+++        dc.DrawText(self.text, (sz.width-w)//2, (sz.height-h)//2)
++ 
++     def OnSize(self, evt):
++         self.Refresh()
++diff --git a/demo/UIActionSimulator.py b/demo/UIActionSimulator.py
++index cbba14f5c..0a6fd0234 100644
++--- a/demo/UIActionSimulator.py
+++++ b/demo/UIActionSimulator.py
++@@ -88,7 +88,7 @@ def _playbackKey(self, evtType, key, modifiers):
++ 
++     def _setNextKeyEvent(self):
++         evtType, key, modifiers, milli = self._playbackEvents.pop(0)
++-        milli = max(milli/2, 1) # play back faster than it was recorded
+++        milli = max(milli//2, 1) # play back faster than it was recorded
++         print(evtType, key, modifiers, milli)
++         wx.CallLater(milli, self._playbackKey, evtType, key, modifiers)
++ 
++diff --git a/demo/agw/AUI.py b/demo/agw/AUI.py
++index 7c2196865..b38313c86 100644
++--- a/demo/agw/AUI.py
+++++ b/demo/agw/AUI.py
++@@ -393,7 +393,7 @@ def OnPaint(self, event):
++         dc.SetPen(wx.LIGHT_GREY_PEN)
++         dc.DrawLine(0, 0, size.x, size.y)
++         dc.DrawLine(0, size.y, size.x, 0)
++-        dc.DrawText(s, (size.x-w)/2, (size.y-height*5)/2)
+++        dc.DrawText(s, (size.x-w)//2, (size.y-height*5)//2)
++ 
++         if self._mgr:
++ 
++@@ -401,19 +401,19 @@ def OnPaint(self, event):
++ 
++             s = "Layer: %d"%pi.dock_layer
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*1))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*1))
++ 
++             s = "Dock: %d Row: %d"%(pi.dock_direction, pi.dock_row)
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*2))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*2))
++ 
++             s = "Position: %d"%pi.dock_pos
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*3))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*3))
++ 
++             s = "Proportion: %d"%pi.dock_proportion
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*4))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*4))
++ 
++ 
++     def OnEraseBackground(self, event):
++@@ -435,7 +435,7 @@ def __init__(self, parent, frame):
++ 
++         s1 = wx.BoxSizer(wx.HORIZONTAL)
++         self._border_size = wx.SpinCtrl(self, ID_PaneBorderSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE),
++-                                        wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100,
+++                                        wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100,
++                                         frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE))
++         s1.Add((1, 1), 1, wx.EXPAND)
++         s1.Add(wx.StaticText(self, -1, "Pane Border Size:"))
++@@ -445,7 +445,7 @@ def __init__(self, parent, frame):
++ 
++         s2 = wx.BoxSizer(wx.HORIZONTAL)
++         self._sash_size = wx.SpinCtrl(self, ID_SashSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE), wx.DefaultPosition,
++-                                      wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
+++                                      wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
++         s2.Add((1, 1), 1, wx.EXPAND)
++         s2.Add(wx.StaticText(self, -1, "Sash Size:"))
++         s2.Add(self._sash_size)
++@@ -454,7 +454,7 @@ def __init__(self, parent, frame):
++ 
++         s3 = wx.BoxSizer(wx.HORIZONTAL)
++         self._caption_size = wx.SpinCtrl(self, ID_CaptionSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE),
++-                                         wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
+++                                         wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
++         s3.Add((1, 1), 1, wx.EXPAND)
++         s3.Add(wx.StaticText(self, -1, "Caption Size:"))
++         s3.Add(self._caption_size)
++@@ -807,9 +807,9 @@ def LightColour(self, colour, percent):
++ 
++         # We take the percent way of the colour from colour -> white
++         i = percent
++-        r = colour.Red() + ((i*rd*100)/high)/100
++-        g = colour.Green() + ((i*gd*100)/high)/100
++-        b = colour.Blue() + ((i*bd*100)/high)/100
+++        r = colour.Red() + ((i*rd*100)//high)//100
+++        g = colour.Green() + ((i*gd*100)//high)//100
+++        b = colour.Blue() + ((i*bd*100)//high)//100
++ 
++         return wx.Colour(r, g, b)
++ 
++@@ -826,10 +826,10 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++         x, y, width, height = clientRect
++         x, width = self._pos, interval
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2)
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2)
++         topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-        rc1 = wx.Rect(x, y, width, height/2)
+++        rc1 = wx.Rect(int(x), y, int(width), height//2)
++         path1 = self.GetPath(gc, rc1, 8)
++         br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++         gc.SetBrush(br1)
++@@ -845,14 +845,14 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++ 
++         bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-        rc3 = wx.Rect(x, y+height/2, width, height/2)
+++        rc3 = wx.Rect(int(x), y+height//2, int(width), height//2)
++         path3 = self.GetPath(gc, rc3, 8)
++         br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++         gc.SetBrush(br3)
++         gc.FillPath(path3) #draw main
++ 
++         path4 = gc.CreatePath()
++-        path4.AddRectangle(x, y+height/2, width, 8)
+++        path4.AddRectangle(x, y+height//2, width, 8)
++         path4.CloseSubpath()
++         gc.SetBrush(br3)
++         gc.FillPath(path4)
++@@ -2613,7 +2613,7 @@ def CreateNotebook(self):
++         flex.Add(wx.TextCtrl(panel, -1, "", wx.DefaultPosition, wx.Size(100, -1)),
++                  1, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add(wx.StaticText(panel, -1, "wxSpinCtrl:"), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++-        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.Size(100, -1),
+++        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.DefaultSize,
++                              wx.SP_ARROW_KEYS, 5, 50, 5), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add((5, 5))
++         flex.Add((5, 5))
++diff --git a/demo/agw/MacLargeDemo.py b/demo/agw/MacLargeDemo.py
++index 4d967a546..a5b8a0e25 100644
++--- a/demo/agw/MacLargeDemo.py
+++++ b/demo/agw/MacLargeDemo.py
++@@ -223,12 +223,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = int((w * percent)/100)
++ 
++         if w < 1:
++             return
++diff --git a/demo/agw/PeakMeter.py b/demo/agw/PeakMeter.py
++index a7c9a6f51..e9dab7116 100644
++--- a/demo/agw/PeakMeter.py
+++++ b/demo/agw/PeakMeter.py
++@@ -149,10 +149,10 @@ def OnFalloff(self, event):
++ 
++     def OnStart(self, event):
++ 
++-        self.timer.Start(1000/2)        # 2 fps
+++        self.timer.Start(1000//2)        # 2 fps
++ 
++-        self.vertPeak.Start(1000/18)        # 18 fps
++-        self.horzPeak.Start(1000/20)        # 20 fps
+++        self.vertPeak.Start(1000//18)        # 18 fps
+++        self.horzPeak.Start(1000//20)        # 20 fps
++ 
++ 
++     def OnStop(self, event):
++diff --git a/demo/agw/PersistentControls.py b/demo/agw/PersistentControls.py
++index f19cc4a91..cf97dd9f0 100644
++--- a/demo/agw/PersistentControls.py
+++++ b/demo/agw/PersistentControls.py
++@@ -234,7 +234,7 @@ def BuildPanes(self):
++         sizer_1.Add(label_1, 0, wx.ALL, 5)
++         sizer_1.Add(combo, 0, wx.LEFT|wx.RIGHT, 5)
++         sizer_1.Add((20, 20), 1)
++-        box2.Add(sizer_1, 1, wx.EXPAND|wx.ALIGN_CENTER, 0)
+++        box2.Add(sizer_1, 1, wx.EXPAND, 0)
++         box2.Add((0, 0), 1, 1)
++ 
++         otherPanel.SetSizer(box2)
++diff --git a/demo/agw/RibbonBar.py b/demo/agw/RibbonBar.py
++index 7103e9d81..d28a2c66a 100644
++--- a/demo/agw/RibbonBar.py
+++++ b/demo/agw/RibbonBar.py
++@@ -799,7 +799,7 @@ def AddColourToGallery(self, gallery, colour, dc, value=None):
++                                        (c.Blue() + 192) % 256)
++ 
++             dc.SetTextForeground(foreground)
++-            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) / 2, (iHeight - size.GetHeight()) / 2)
+++            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) // 2, (iHeight - size.GetHeight()) // 2)
++             dc.SelectObjectAsSource(wx.NullBitmap)
++ 
++             item = gallery.Append(bitmap, wx.ID_ANY)
++diff --git a/demo/agw/SpeedMeter.py b/demo/agw/SpeedMeter.py
++index 9f0fdebb2..575e84a80 100644
++--- a/demo/agw/SpeedMeter.py
+++++ b/demo/agw/SpeedMeter.py
++@@ -418,7 +418,7 @@ def __init__(self, parent, log):
++         bsizer3 = wx.BoxSizer(wx.VERTICAL)
++ 
++         hsizer3 = wx.BoxSizer(wx.HORIZONTAL)
++-        sc = wx.SpinCtrl(panel3, -1, size=(60,20))
+++        sc = wx.SpinCtrl(panel3, -1)
++         sc.SetRange(1, 250)
++         sc.SetValue(50)
++ 
++diff --git a/demo/agw/SuperToolTip.py b/demo/agw/SuperToolTip.py
++index 5e65f06b1..88728e54e 100644
++--- a/demo/agw/SuperToolTip.py
+++++ b/demo/agw/SuperToolTip.py
++@@ -43,7 +43,7 @@ def __init__(self, parent):
++         self.topColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.WHITE)
++         system = wx.SystemSettings.GetColour(wx.SYS_COLOUR_ACTIVECAPTION)
++         r, g, b, a = system
++-        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)/2, (255-g)/2, (255-b)/2))
+++        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)//2, (255-g)//2, (255-b)//2))
++         self.bottomColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=system)
++         self.headerCheck = wx.CheckBox(self.mainPanel, -1, "Show Header")
++         self.headerText = wx.TextCtrl(self.mainPanel, -1, "Merge And Center")
++@@ -233,7 +233,6 @@ def DoLayout(self):
++         frameSizer.Add(self.mainPanel, 1, wx.EXPAND, 0)
++         self.SetSizer(frameSizer)
++         frameSizer.Layout()
++-        frameSizer.Fit(self)
++         self.Layout()
++ 
++         wx.CallAfter(mainSizer.Layout)
++diff --git a/demo/agw/UltimateReportDemo.py b/demo/agw/UltimateReportDemo.py
++index 40f49cb8f..ad455847b 100644
++--- a/demo/agw/UltimateReportDemo.py
+++++ b/demo/agw/UltimateReportDemo.py
++@@ -216,7 +216,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         mdc.SetFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
++         text = "%d Mb"%self.progressValue
++         textWidth, dummy = mdc.GetTextExtent(text)
++-        mdc.DrawText(text, rect.width/2 - textWidth/2, rect.height/2 - dummy/2)
+++        mdc.DrawText(text, rect.width//2 - textWidth//2, rect.height//2 - dummy//2)
++         dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
++         dc.Blit(rect.x+3, rect.y, rect.width-6, rect.height, mdc, 0, 0)
++         dc.DestroyClippingRegion()
++@@ -279,12 +279,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = (w * percent)//100
++ 
++         if middle == 0: # not started
++             bitmap = self.REMAINING_BITMAP.GetSubBitmap((1, 0, w, PIPE_HEIGHT))
++@@ -335,7 +335,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         colours = [wx.RED, wx.WHITE, wx.GREEN, wx.Colour("SKY BLUE")]
++         w, h = dc.GetTextExtent("Hg")
++         x = rect.x + 1
++-        y = rect.y + rect.height/2 - h/2
+++        y = rect.y + rect.height//2 - h//2
++ 
++         for ch in self.text:
++             dc.SetTextForeground(random.choice(colours))
++diff --git a/demo/agw/Windows7Explorer_Contents.py b/demo/agw/Windows7Explorer_Contents.py
++index f754d7879..b23df0e1a 100644
++--- a/demo/agw/Windows7Explorer_Contents.py
+++++ b/demo/agw/Windows7Explorer_Contents.py
++@@ -127,13 +127,13 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         """Draw a custom progress bar using double buffering to prevent flicker"""
++ 
++         bmpWidth, bmpHeight = self.icon.GetWidth(), self.icon.GetHeight()
++-        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)/2)
+++        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)//2)
++ 
++         dc.SetFont(self.normalFont)
++ 
++         textWidth, textHeight = dc.GetTextExtent(self.text)
++         dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
++-        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.description:
++             return
++@@ -144,10 +144,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Type: " + self.description)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++@@ -207,10 +207,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Date modified: " + date)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.size:
++             return
++@@ -218,10 +218,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         dummy1, dummy2= dc.GetTextExtent("Size: ")
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++diff --git a/demo/agw/ZoomBar.py b/demo/agw/ZoomBar.py
++index 376ce349b..14b0278e7 100644
++--- a/demo/agw/ZoomBar.py
+++++ b/demo/agw/ZoomBar.py
++@@ -55,7 +55,7 @@ def __init__(self, parent, log):
++         reflections = glob.glob(bitmapDir + "/*96Flip40.png")
++ 
++         separatorImage = bitmapDir + "/separator.gif"
++-        separatorReflection = bitmapDir + "/separatorFlip.png"
+++        separatorReflection = bitmapDir + "/separatorflip.png"
++         count = 0
++ 
++         for std, ref in zip(standard, reflections):
++diff --git a/wx/lib/agw/advancedsplash.py b/wx/lib/agw/advancedsplash.py
++index 1f8c32df5..d351ea06e 100644
++--- a/wx/lib/agw/advancedsplash.py
+++++ b/wx/lib/agw/advancedsplash.py
++@@ -438,7 +438,7 @@ def SetTextFont(self, font=None):
++ 
++         if font is None:
++             self._textfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._textsize = 10.0
+++            self._textsize = 10
++             self._textfont.SetPointSize(self._textsize)
++         else:
++             self._textfont = font
++diff --git a/wx/lib/agw/aui/auibook.py b/wx/lib/agw/aui/auibook.py
++index ba7cf4721..f5ad2a568 100644
++--- a/wx/lib/agw/aui/auibook.py
+++++ b/wx/lib/agw/aui/auibook.py
++@@ -3452,8 +3452,8 @@ def CalculateNewSplitSize(self):
++         # should happen around the middle
++         if tab_ctrl_count < 2:
++             new_split_size = self.GetClientSize()
++-            new_split_size.x /= 2
++-            new_split_size.y /= 2
+++            new_split_size.x //= 2
+++            new_split_size.y //= 2
++ 
++         else:
++ 
++diff --git a/wx/lib/agw/balloontip.py b/wx/lib/agw/balloontip.py
++index b4155d74a..57baca729 100644
++--- a/wx/lib/agw/balloontip.py
+++++ b/wx/lib/agw/balloontip.py
++@@ -615,7 +615,7 @@ def SetStartDelay(self, delay=1):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Creation Should Be Greater Than 1 ms")
++ 
++-        self._startdelaytime = float(delay)
+++        self._startdelaytime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -640,7 +640,7 @@ def SetEndDelay(self, delay=1e6):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Destruction Should Be Greater Than 1 ms")
++ 
++-        self._enddelaytime = float(delay)
+++        self._enddelaytime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/flatmenu.py b/wx/lib/agw/flatmenu.py
++index 5ba28e584..85f295b86 100644
++--- a/wx/lib/agw/flatmenu.py
+++++ b/wx/lib/agw/flatmenu.py
++@@ -736,8 +736,8 @@ def DrawSeparator(self, dc, xCoord, yCoord, textX, sepWidth):
++         """
++ 
++         dcsaver = DCSaver(dc)
++-        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth/2, 1)
++-        sepRect2 = wx.Rect(xCoord + textX + sepWidth/2, yCoord + 1, sepWidth/2-1, 1)
+++        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth//2, 1)
+++        sepRect2 = wx.Rect(xCoord + textX + sepWidth//2, yCoord + 1, sepWidth//2-1, 1)
++ 
++         artMgr = ArtManager.Get()
++         backColour = artMgr.GetMenuFaceColour()
++@@ -817,11 +817,11 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             imgWidth  = bmp.GetWidth()
++ 
++             if imageMarginX == 0:
++-                xx = rect.x + (leftMarginWidth - imgWidth)/2
+++                xx = rect.x + (leftMarginWidth - imgWidth)//2
++             else:
++-                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)/2 + rect.height
+++                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)//2 + rect.height
++ 
++-            yy = rect.y + (rect.height - imgHeight)/2
+++            yy = rect.y + (rect.height - imgHeight)//2
++             dc.DrawBitmap(bmp, xx, yy, True)
++ 
++         if item.GetKind() == wx.ITEM_CHECK:
++@@ -837,7 +837,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         if item.GetKind() == wx.ITEM_RADIO:
++ 
++@@ -852,7 +852,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         # Draw text - without accelerators
++         text = item.GetLabel()
++@@ -890,7 +890,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 w3, dummy = dc.GetTextExtent(text3)
++ 
++                 posx = xCoord + textX + borderXSize
++-                posy = (itemHeight - h)/2 + yCoord
+++                posy = (itemHeight - h)//2 + yCoord
++ 
++                 # Draw first part
++                 dc.DrawText(text1, posx, posy)
++@@ -912,7 +912,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             else:
++ 
++                 w, h = dc.GetTextExtent(text)
++-                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)/2 + yCoord)
+++                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)//2 + yCoord)
++ 
++ 
++         # Now draw accelerator
++@@ -920,7 +920,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++         if item.GetAccelString():
++ 
++             accelWidth, accelHeight = dc.GetTextExtent(item.GetAccelString())
++-            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)/2 + yCoord)
+++            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)//2 + yCoord)
++ 
++         # Check if this item has sub-menu - if it does, draw
++         # right arrow on the right margin
++@@ -932,7 +932,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++ 
++             xx = xCoord + rightMarginX + borderXSize
++             rr = wx.Rect(xx, rect.y + 1, rect.height-2, rect.height-2)
++-            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)/2, True)
+++            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)//2, True)
++ 
++ 
++     def DrawMenuBarButton(self, dc, rect, state):
++@@ -1142,7 +1142,7 @@ def DrawMenuBar(self, menubar, dc):
++             # Get the menu item rect
++             textWidth, textHeight = dc.GetTextExtent(fixedText)
++             #rect = wx.Rect(posx+menubar._spacer/2, posy, textWidth, textHeight)
++-            rect = wx.Rect(posx+padding/2, posy, textWidth, textHeight)
+++            rect = wx.Rect(posx+padding//2, posy, textWidth, textHeight)
++ 
++             # Can we draw more??
++             # the +DROP_DOWN_ARROW_WIDTH  is the width of the drop down arrow
++@@ -1172,7 +1172,7 @@ def DrawMenuBar(self, menubar, dc):
++                 dc.SetTextForeground(textColour)
++ 
++             ww, hh = dc.GetTextExtent(labelOnly)
++-            textOffset = (rect.width - ww) / 2
+++            textOffset = (rect.width - ww) // 2
++ 
++             if not menubar._isLCD and item.GetTextBitmap().IsOk() and not selected:
++                 dc.DrawBitmap(item.GetTextBitmap(), rect.x, rect.y, True)
++@@ -1505,8 +1505,8 @@ def DrawButtonColour(self, dc, rect, state, colour):
++         baseColour = colour
++ 
++         # Define the middle points
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, rect.y + (rect.height // 2))
+++        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height // 2))
++ 
++         # Define the top region
++         top = wx.Rect((rect.GetLeft(), rect.GetTop()), rightPt)
++@@ -1572,11 +1572,11 @@ def DrawMenuBarBackground(self, dc, rect):
++ 
++         factor = artMgr.GetMenuBgFactor()
++ 
++-        leftPt1 = wx.Point(rect.x, rect.y + (rect.height / factor))
++-        leftPt2 = wx.Point(rect.x, rect.y + (rect.height / factor)*(factor-1))
+++        leftPt1 = wx.Point(rect.x, rect.y + (rect.height // factor))
+++        leftPt2 = wx.Point(rect.x, rect.y + (rect.height // factor)*(factor-1))
++ 
++-        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor))
++-        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor)*(factor-1))
+++        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor))
+++        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor)*(factor-1))
++ 
++         # Define the top region
++         topReg = [wx.Point() for ii in range(7)]
++@@ -2707,7 +2707,7 @@ def DrawToolbar(self, dc, rect):
++             elif tbItem.IsCustomControl():
++                 control = tbItem.GetCustomControl()
++                 ctrlSize = control.GetSize()
++-                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)/2)
+++                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)//2)
++                 if control.GetPosition() != ctrlPos:
++                     control.SetPosition(ctrlPos)
++ 
++@@ -2727,9 +2727,9 @@ def DrawToolbar(self, dc, rect):
++             # Draw the toolbar image
++             if bmp.IsOk():
++ 
++-                x = xx - self._toolbarSpacer/2
+++                x = xx - self._toolbarSpacer//2
++                 #y = rect.y + (rect.height - bmp.GetHeight())/2 - 1
++-                y = rect.y + self._toolbarMargin/2
+++                y = rect.y + self._toolbarMargin//2
++ 
++                 buttonRect = wx.Rect(x, y, highlight_width, highlight_height)
++ 
++@@ -2745,8 +2745,8 @@ def DrawToolbar(self, dc, rect):
++                     else:
++                         self._tbButtons[i]._state = ControlNormal
++ 
++-                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())/2
++-                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())/2
+++                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())//2
+++                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())//2
++ 
++                 if self._tbButtons[i]._state == ControlFocus and not self._tbButtons[i]._tbItem.IsSelected():
++ 
++@@ -2827,8 +2827,8 @@ def DrawMoreButton(self, dc, state):
++         dropArrowBmp = self.GetRenderer()._bitmaps["arrow_down"]
++ 
++         # Calc the image coordinates
++-        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())/2
+++        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())//2
++ 
++         dc.DrawBitmap(dropArrowBmp, xx, yy + self._spacer, True)
++         self._dropDownButtonState = state
++@@ -3269,8 +3269,8 @@ def DrawToolbarItem(self, dc, idx, state):
++ 
++         # draw the bitmap over the highlight
++         buttonRect = wx.Rect(*rect)
++-        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())/2
++-        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())/2
+++        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())//2
+++        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())//2
++ 
++         if state == ControlFocus:
++ 
++@@ -3784,7 +3784,7 @@ def PositionAUI(self, mgr, fixToolbar=True):
++         pn.Name("flat_menu_bar")
++         pn.Caption("Menu Bar")
++         pn.Top()
++-        pn.MinSize(wx.Size(xx/2, self._barHeight))
+++        pn.MinSize(wx.Size(xx//2, self._barHeight))
++         pn.LeftDockable(False)
++         pn.RightDockable(False)
++         pn.ToolbarPane()
++@@ -3997,8 +3997,8 @@ def Draw(self, dc):
++         """
++ 
++         rect = wx.Rect(self._pos, self._size)
++-        xx = rect.x + (rect.width - self._normalBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - self._normalBmp.GetHeight())/2
+++        xx = rect.x + (rect.width - self._normalBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - self._normalBmp.GetHeight())//2
++ 
++         self._parent.GetRenderer().DrawScrollButton(dc, rect, self._state)
++         dc.DrawBitmap(self._normalBmp, xx, yy, True)
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index f5e5200b2..561749b89 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -858,9 +858,9 @@ def PaintStraightGradientBox(dc, rect, startColour, endColour, vertical=True):
++ 
++     for i in range(high+1):
++ 
++-        r = startColour.Red() + ((i*rd*100)/high)/100
++-        g = startColour.Green() + ((i*gd*100)/high)/100
++-        b = startColour.Blue() + ((i*bd*100)/high)/100
+++        r = startColour.Red() + ((i*rd*100)//high)//100
+++        g = startColour.Green() + ((i*gd*100)//high)//100
+++        b = startColour.Blue() + ((i*bd*100)//high)//100
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++@@ -2631,9 +2631,9 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         imageYCoord = (pc.HasAGWFlag(FNB_BOTTOM) and [6] or [8])[0]
++ 
++         if hasImage:
++-            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints/2
+++            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints//2
++         else:
++-            textOffset = pc._pParent._nPadding + shapePoints/2
+++            textOffset = pc._pParent._nPadding + shapePoints//2
++ 
++         textOffset += 2
++ 
++diff --git a/wx/lib/agw/floatspin.py b/wx/lib/agw/floatspin.py
++index bdbaf85ec..4559eb5de 100644
++--- a/wx/lib/agw/floatspin.py
+++++ b/wx/lib/agw/floatspin.py
++@@ -336,7 +336,7 @@ class FloatSpin(wx.Control):
++     """
++ 
++     def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++-                 size=(95,-1), style=0, value=0.0, min_val=None, max_val=None,
+++                 size=wx.DefaultSize, style=0, value=0.0, min_val=None, max_val=None,
++                  increment=1.0, digits=-1, agwStyle=FS_LEFT,
++                  name="FloatSpin"):
++         """
++diff --git a/wx/lib/agw/gradientbutton.py b/wx/lib/agw/gradientbutton.py
++index c4633b296..58625c508 100644
++--- a/wx/lib/agw/gradientbutton.py
+++++ b/wx/lib/agw/gradientbutton.py
++@@ -412,14 +412,14 @@ def OnPaint(self, event):
++ 
++         x, y, width, height = clientRect
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2 + ((capture==self and [1] or [0])[0]))
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2 + ((capture==self and [1] or [0])[0]))
++         if capture != self:
++             if self._mouseAction == HOVER:
++                 topStart, topEnd = self.LightColour(self._topStartColour, 10), self.LightColour(self._topEndColour, 10)
++             else:
++                 topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-            rc1 = wx.Rect(x, y, width, height/2)
+++            rc1 = wx.Rect(x, y, width, height//2)
++             path1 = self.GetPath(gc, rc1, 8)
++             br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++             gc.SetBrush(br1)
++@@ -448,7 +448,7 @@ def OnPaint(self, event):
++             else:
++                 bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-            rc3 = wx.Rect(x, y+height/2, width, height/2)
+++            rc3 = wx.Rect(x, y+height//2, width, height//2)
++             path3 = self.GetPath(gc, rc3, 8)
++             br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++             gc.SetBrush(br3)
++@@ -463,7 +463,7 @@ def OnPaint(self, event):
++             shadowOffset = 0
++         else:
++ 
++-            rc2 = wx.Rect(x+1, gradientRect.height/2, gradientRect.width, gradientRect.height)
+++            rc2 = wx.Rect(x+1, gradientRect.height//2, gradientRect.width, gradientRect.height)
++             path2 = self.GetPath(gc, rc2, 8)
++             gc.SetPen(wx.Pen(self._pressedBottomColour))
++             gc.SetBrush(wx.Brush(self._pressedBottomColour))
++diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py
++index 12302f3b0..377ac0121 100644
++--- a/wx/lib/agw/hypertreelist.py
+++++ b/wx/lib/agw/hypertreelist.py
++@@ -3437,7 +3437,7 @@ def PaintLevel(self, item, dc, level, y, x_maincol):
++ 
++             if not self.HasAGWFlag(wx.TR_NO_LINES) and children:
++                 last_child = children[-1]
++-                Y1 = last_child.GetY() + last_child.GetHeight() / 2
+++                Y1 = last_child.GetY() + last_child.GetHeight() // 2
++                 dc.DrawLine(x, oldY, x, Y1)
++ 
++         return y, x_maincol
++diff --git a/wx/lib/agw/knobctrl.py b/wx/lib/agw/knobctrl.py
++index 742097b09..1e5045ff6 100644
++--- a/wx/lib/agw/knobctrl.py
+++++ b/wx/lib/agw/knobctrl.py
++@@ -325,7 +325,7 @@ def OnSize(self,event):
++         memory.Clear()
++ 
++         minradius = min(0.9*self.Width/2.0, 0.9*self.Height/2.0)
++-        memory.DrawCircle(self.Width//2, self.Height//2, minradius)
+++        memory.DrawCircle(self.Width//2, self.Height//2, int(minradius))
++         memory.SelectObject(wx.NullBitmap)
++         self._region = wx.Region(self._Buffer, self.GetBackgroundColour())
++         self._minradius = minradius
++@@ -645,8 +645,8 @@ def DrawTags(self, dc, size):
++             dxi = math.cos(angle)*((width - xshift + tagLen - 6)/2.0 - tagLen)
++             dyi = math.sin(angle)*((height - yshift + tagLen - 6)/2.0 - tagLen)
++ 
++-            dc.DrawLine(width//2 - sxi, height//2 - syi,
++-                        width//2 - dxi, height//2 - dyi)
+++            dc.DrawLine(int(width//2 - sxi), int(height//2 - syi),
+++                        int(width//2 - dxi), int(height//2 - dyi))
++ 
++ 
++     def DrawDiagonalGradient(self, dc, size):
++@@ -759,8 +759,8 @@ def DrawInsetCircle(self, dc, pencolour):
++         p1 = wx.Pen(self.OffsetColour(pencolour, -70), 2)
++         p2 = wx.Pen(self.OffsetColour(pencolour, 10), 1)
++ 
++-        pt1 = wx.Point(cx-r*math.sqrt(2)/2.0, cy+r*math.sqrt(2)/2.0)
++-        pt2 = wx.Point(cx+r*math.sqrt(2)/2.0, cy-r*math.sqrt(2)/2.0)
+++        pt1 = wx.Point(int(cx-r*math.sqrt(2)/2.0), int(cy+r*math.sqrt(2)/2.0))
+++        pt2 = wx.Point(int(cx+r*math.sqrt(2)/2.0), int(cy-r*math.sqrt(2)/2.0))
++ 
++         dc.SetPen(p2)
++         dc.DrawArc(pt1, pt2, (cx, cy))
++@@ -779,7 +779,7 @@ def DrawBoundingCircle(self, dc, size):
++         radius = 0.9*min(size.x, size.y)/2.0
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++         dc.SetPen(wx.Pen(self._boundingcolour))
++-        dc.DrawCircle(self.Width//2, self.Height//2, radius)
+++        dc.DrawCircle(self.Width//2, self.Height//2, int(radius))
++ 
++ 
++     def CircleCoords(self, radius, angle, centerX, centerY):
++diff --git a/wx/lib/agw/labelbook.py b/wx/lib/agw/labelbook.py
++index b716df3a2..f8c9cd54d 100644
++--- a/wx/lib/agw/labelbook.py
+++++ b/wx/lib/agw/labelbook.py
++@@ -1376,13 +1376,13 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    imgXcoord = self._nImgSize / 2
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize / 2] or [pos + imgTopPadding])[0]
+++                    imgXcoord = self._nImgSize // 2
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize // 2] or [pos + imgTopPadding])[0]
++ 
++                 else:
++ 
++-                    imgXcoord = pos + (rectWidth / 2) - (self._nImgSize / 2)
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize / 2] or [imgTopPadding])[0]
+++                    imgXcoord = pos + (rectWidth // 2) - (self._nImgSize // 2)
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize // 2] or [imgTopPadding])[0]
++ 
++                 self._ImageList.Draw(self._pagesInfoVec[i].GetImageIndex(), dc,
++                                      imgXcoord, imgYcoord,
++@@ -1408,15 +1408,15 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    textOffsetX = ((rectWidth - textWidth) / 2 )
+++                    textOffsetX = ((rectWidth - textWidth) // 2 )
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT  and [pos + self._nImgSize  + imgTopPadding + 3] or \
++-                                       [pos + ((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [pos + ((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 else:
++ 
++-                    textOffsetX = (rectWidth - textWidth) / 2  + pos + nTextPaddingLeft
+++                    textOffsetX = (rectWidth - textWidth) // 2  + pos + nTextPaddingLeft
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT and [self._nImgSize + imgTopPadding + 3] or \
++-                                       [((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
++                 dc.DrawText(fixedText, textOffsetX, textOffsetY)
++@@ -1591,8 +1591,8 @@ def OnPaint(self, event):
++             # Draw gradient in the background area
++             startColour = self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR]
++             endColour   = ArtManager.Get().LightColour(self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR], 50)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x / 2, size.y), startColour, endColour, False)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x / 2, 0, size.x / 2, size.y), endColour, startColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x // 2, size.y), startColour, endColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x // 2, 0, size.x // 2, size.y), endColour, startColour, False)
++ 
++         else:
++ 
++@@ -1638,7 +1638,7 @@ def OnPaint(self, event):
++ 
++             if self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++                 font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-                font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++                font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++                 if self.GetParent().GetFontBold():
++                     font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -1954,7 +1954,7 @@ def DrawWebHover(self, dc, caption, xCoord, yCoord, selected):
++ 
++         # Redraw the text with underlined font
++         underLinedFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        underLinedFont.SetPointSize(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        underLinedFont.SetPointSize(int(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++         if self.GetParent().GetFontBold():
++             underLinedFont.SetWeight(wx.FONTWEIGHT_BOLD)
++         elif self.HasAGWFlag(INB_BOLD_TAB_SELECTION) and selected:
++@@ -2050,7 +2050,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++         imgRect = wx.Rect(*rect)
++ 
++         font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++         if self.GetParent().GetFontBold():
++             font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -2069,7 +2069,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++         # Text bounding rectangle
++         textRect.x += nPadding
++-        textRect.y = rect.y + (rect.height - h)/2
+++        textRect.y = rect.y + (rect.height - h)//2
++         textRect.width = rect.width - 2 * nPadding
++ 
++         if bmp.IsOk() and not self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++@@ -2086,7 +2086,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++             imgRect.x += nPadding
++             imgRect.width = bmp.GetWidth()
++-            imgRect.y = rect.y + (rect.height - bmp.GetHeight())/2
+++            imgRect.y = rect.y + (rect.height - bmp.GetHeight())//2
++             imgRect.height = bmp.GetHeight()
++ 
++         # Draw bounding rectangle
++@@ -2496,7 +2496,7 @@ def ResizeTabArea(self):
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(1, 1))
++             font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-            font.SetPointSize(font.GetPointSize()*self._fontSizeMultiple)
+++            font.SetPointSize(int(font.GetPointSize()*self._fontSizeMultiple))
++             if self.GetFontBold() or agwStyle & INB_BOLD_TAB_SELECTION:
++                 font.SetWeight(wx.FONTWEIGHT_BOLD)
++             dc.SetFont(font)
++diff --git a/wx/lib/agw/peakmeter.py b/wx/lib/agw/peakmeter.py
++index 055dbef81..a5f88a9d5 100644
++--- a/wx/lib/agw/peakmeter.py
+++++ b/wx/lib/agw/peakmeter.py
++@@ -784,7 +784,7 @@ def DrawHorzBand(self, dc, rect):
++                 maxWidth = size.x*horzBands
++                 points = [wx.Point() for i in range(2)]
++                 points[0].y = rectPrev.GetTopRight().y - yDecal
++-                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth/self._maxValue
+++                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth//self._maxValue
++                 points[1].y = rectPrev.GetBottomLeft().y + yDecal
++                 points[1].x = points[0].x
++                 dc.SetPen(pen)
++diff --git a/wx/lib/agw/pygauge.py b/wx/lib/agw/pygauge.py
++index bab459a3a..b8654436a 100644
++--- a/wx/lib/agw/pygauge.py
+++++ b/wx/lib/agw/pygauge.py
++@@ -344,7 +344,7 @@ def OnPaint(self, event):
++                 c1,c2 = gradient
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.GradientFillLinear(r, c1, c2, wx.EAST)
++         else:
++             for i, colour in enumerate(self._barColourSorted):
++@@ -352,7 +352,7 @@ def OnPaint(self, event):
++                 dc.SetPen(wx.Pen(colour))
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.DrawRectangle(r)
++ 
++ 
++diff --git a/wx/lib/agw/ribbon/art_aui.py b/wx/lib/agw/ribbon/art_aui.py
++index a1d255843..31fedf487 100644
++--- a/wx/lib/agw/ribbon/art_aui.py
+++++ b/wx/lib/agw/ribbon/art_aui.py
++@@ -390,7 +390,7 @@ def DrawTab(self, dc, wnd, tab):
++             grad_rect = wx.Rect(*tab.rect)
++             grad_rect.height -= 4
++             grad_rect.width -= 1
++-            grad_rect.height /= 2
+++            grad_rect.height //= 2
++             grad_rect.y = grad_rect.y + tab.rect.height - grad_rect.height - 1
++             dc.SetBrush(self._tab_active_top_background_brush)
++             dc.DrawRectangle(tab.rect.x, tab.rect.y + 3, tab.rect.width - 1, grad_rect.y - tab.rect.y - 3)
++@@ -401,7 +401,7 @@ def DrawTab(self, dc, wnd, tab):
++             btm_rect = wx.Rect(*tab.rect)
++             btm_rect.height -= 4
++             btm_rect.width -= 1
++-            btm_rect.height /= 2
+++            btm_rect.height //= 2
++             btm_rect.y = btm_rect.y + tab.rect.height - btm_rect.height - 1
++             dc.SetBrush(self._tab_hover_background_brush)
++             dc.DrawRectangle(btm_rect.x, btm_rect.y, btm_rect.width, btm_rect.height)
++@@ -434,8 +434,8 @@ def DrawTab(self, dc, wnd, tab):
++             icon = tab.page.GetIcon()
++             if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++                 if icon.IsOk():
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
++-                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
+++                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -450,7 +450,7 @@ def DrawTab(self, dc, wnd, tab):
++                     offset += icon.GetWidth() + 2
++ 
++                 text_width, text_height = dc.GetTextExtent(label)
++-                x = (tab.rect.width - 2 - text_width - offset) / 2
+++                x = (tab.rect.width - 2 - text_width - offset) // 2
++                 if x > 8:
++                     x = 8
++                 elif x < 1:
++@@ -458,7 +458,7 @@ def DrawTab(self, dc, wnd, tab):
++ 
++                 width = tab.rect.width - x - 2
++                 x += tab.rect.x + offset
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if icon.IsOk():
++                     dc.DrawBitmap(icon, x - offset, tab.rect.y + (tab.rect.height - icon.GetHeight()) / 2, True)
++@@ -892,8 +892,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def DrawPartialPanelBackground(self, dc, wnd, rect):
++@@ -1024,7 +1024,7 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++             dc.DrawRectangle(reduced_rect.x, reduced_rect.y, reduced_rect.width, reduced_rect.height)
++             btn_bitmap = bitmaps[3]
++ 
++-        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width / 2 - 2, (rect.y + rect.height / 2) - 2, True)
+++        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width // 2 - 2, (rect.y + rect.height // 2) - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1277,7 +1277,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++             if is_split_hybrid:
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++-            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height / 2) - 2, True)
+++            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++diff --git a/wx/lib/agw/ribbon/art_internal.py b/wx/lib/agw/ribbon/art_internal.py
++index 4a8dc7ce0..78e8f3fe4 100644
++--- a/wx/lib/agw/ribbon/art_internal.py
+++++ b/wx/lib/agw/ribbon/art_internal.py
++@@ -32,9 +32,9 @@ def RibbonInterpolateColour(start_colour, end_colour, position, start_position,
++     r = end_colour.Red() - start_colour.Red()
++     g = end_colour.Green() - start_colour.Green()
++     b = end_colour.Blue() - start_colour.Blue()
++-    r = start_colour.Red()   + (((r * position * 100) / end_position) / 100)
++-    g = start_colour.Green() + (((g * position * 100) / end_position) / 100)
++-    b = start_colour.Blue()  + (((b * position * 100) / end_position) / 100)
+++    r = start_colour.Red()   + (((r * position * 100) // end_position) // 100)
+++    g = start_colour.Green() + (((g * position * 100) // end_position) // 100)
+++    b = start_colour.Blue()  + (((b * position * 100) // end_position) // 100)
++ 
++     return wx.Colour(r, g, b)
++ 
++@@ -61,9 +61,9 @@ def RibbonDrawParallelGradientLines(dc, nlines, line_origins, stepx, stepy, nums
++     bd = end_colour.Blue() - start_colour.Blue()
++ 
++     for step in range(numsteps):
++-        r = start_colour.Red() + (((step*rd*100)/numsteps)/100)
++-        g = start_colour.Green() + (((step*gd*100)/numsteps)/100)
++-        b = start_colour.Blue() + (((step*bd*100)/numsteps)/100)
+++        r = start_colour.Red() + (((step*rd*100)//numsteps)//100)
+++        g = start_colour.Green() + (((step*gd*100)//numsteps)//100)
+++        b = start_colour.Blue() + (((step*bd*100)//numsteps)//100)
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++diff --git a/wx/lib/agw/ribbon/art_msw.py b/wx/lib/agw/ribbon/art_msw.py
++index e7317d59b..00c3dfe2b 100644
++--- a/wx/lib/agw/ribbon/art_msw.py
+++++ b/wx/lib/agw/ribbon/art_msw.py
++@@ -982,7 +982,7 @@ def DrawTab(self, dc, wnd, tab):
++                 background.width -= 4
++                 background.height -= 3
++                 h = background.height
++-                background.height /= 2
+++                background.height //= 2
++                 dc.GradientFillLinear(background, self._tab_hover_background_top_colour,
++                                       self._tab_hover_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1024,9 +1024,9 @@ def DrawTab(self, dc, wnd, tab):
++             if icon.IsOk():
++                 x = tab.rect.x + 4
++                 if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
++ 
++-                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -1043,13 +1043,13 @@ def DrawTab(self, dc, wnd, tab):
++                     x += 3 + tab.page.GetIcon().GetWidth()
++                     width -= 3 + tab.page.GetIcon().GetWidth()
++ 
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if width <= text_width:
++                     dc.SetClippingRegion(x, tab.rect.y, width, tab.rect.height)
++                     dc.DrawText(label, x, y)
++                 else:
++-                    dc.DrawText(label, x + (width - text_width) / 2 + 1, y)
+++                    dc.DrawText(label, x + (width - text_width) // 2 + 1, y)
++ 
++ 
++     def DrawTabSeparator(self, dc, wnd, rect, visibility):
++@@ -1093,7 +1093,7 @@ def ReallyDrawTabSeparator(self, wnd, rect, visibility):
++         dc = wx.MemoryDC(self._cached_tab_separator)
++         self.DrawTabCtrlBackground(dc, wnd, rect)
++ 
++-        x = rect.x + rect.width / 2
+++        x = rect.x + rect.width // 2
++         h = float(rect.height - 1)
++ 
++         r1 = self._tab_ctrl_background_brush.GetColour().Red() * (1.0 - visibility) + 0.5
++@@ -1146,7 +1146,7 @@ def DrawPartialPageBackground1(self, dc, wnd, rect, page, offset, hovered=False)
++ 
++         # upper_rect, lower_rect, paint_rect are all in page co-ordinates
++         upper_rect = wx.Rect(*background)
++-        upper_rect.height /= 5
+++        upper_rect.height //= 5
++ 
++         lower_rect = wx.Rect(*background)
++         lower_rect.y += upper_rect.height
++@@ -1229,7 +1229,7 @@ def DrawPageBackground(self, dc, wnd, rect):
++         background.width -= 4
++         background.height -= 2
++ 
++-        background.height /= 5
+++        background.height //= 5
++         dc.GradientFillLinear(background, self._page_background_top_colour,
++                               self._page_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1493,10 +1493,10 @@ def DrawPanelBackground(self, dc, wnd, rect):
++ 
++         if clip_label:
++             clip = wx.DCClipper(dc, label_rect)
++-            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++         else:
++-            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) / 2,
++-                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) // 2,
+++                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++ 
++         if has_ext_button:
++             if wnd.IsExtButtonHovered():
++@@ -1577,7 +1577,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x, rect.y + rect.height - 15, rect.x + rect.width, rect.y + rect.height - 15)
++ 
++-            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width / 3, 15)
+++            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width // 3, 15)
++             down_btn = wx.Rect(up_btn.GetRight() + 1, up_btn.GetTop(), up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetLeft(), down_btn.GetBottom())
++             ext_btn = wx.Rect(down_btn.GetRight() + 1, up_btn.GetTop(), rect.width - up_btn.GetWidth() - down_btn.GetWidth() - 1, up_btn.GetHeight())
++@@ -1587,7 +1587,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x + rect.width - 15, rect.y, rect.x + rect.width - 15, rect.y + rect.height)
++ 
++-            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height / 3)
+++            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height // 3)
++             down_btn = wx.Rect(up_btn.GetLeft(), up_btn.GetBottom() + 1, up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetRight(), down_btn.GetTop())
++             ext_btn = wx.Rect(up_btn.GetLeft(), down_btn.GetBottom() + 1, up_btn.GetWidth(), rect.height - up_btn.GetHeight() - down_btn.GetHeight() - 1)
++@@ -1633,14 +1633,14 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++ 
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(btn_top_brush)
++-        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height / 2)
+++        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height // 2)
++ 
++         lower = wx.Rect(*rect)
++-        lower.height = (lower.height + 1) / 2
+++        lower.height = (lower.height + 1) // 2
++         lower.y += rect.height - lower.height
++         dc.GradientFillLinear(lower, btn_colour, btn_grad_colour, wx.SOUTH)
++ 
++-        dc.DrawBitmap(btn_bitmap, rect.x + rect.width / 2 - 2, lower.y - 2, True)
+++        dc.DrawBitmap(btn_bitmap, rect.x + rect.width // 2 - 2, lower.y - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1691,7 +1691,7 @@ def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++         upper.x += 1
++         upper.width -= 2
++         upper.y += 1
++-        upper.height /= 3
+++        upper.height //= 3
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(top_brush)
++         dc.DrawRectangle(upper.x, upper.y, upper.width, upper.height)
++@@ -1760,7 +1760,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++             client_rect.x += 1
++             client_rect.width -= 2
++             client_rect.y += 1
++-            client_rect.height = (rect.y + rect.height / 5) - client_rect.x
+++            client_rect.height = (rect.y + rect.height // 5) - client_rect.x
++             dc.GradientFillLinear(client_rect,
++                                   self._panel_active_background_top_colour,
++                                   self._panel_active_background_top_gradient_colour, wx.SOUTH)
++@@ -1785,7 +1785,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.DrawRectangle(preview.x + 1, preview.y + preview.height - 8, preview.width - 2, 7)
++ 
++-        mid_pos = rect.y + rect.height / 5 - preview.y
+++        mid_pos = rect.y + rect.height // 5 - preview.y
++ 
++         if mid_pos < 0 or mid_pos >= preview.height:
++             full_rect = wx.Rect(*preview)
++@@ -1816,8 +1816,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - 7 - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - 7 - bitmap.GetHeight()) // 2, True)
++ 
++         self.DrawPanelBorder(dc, preview, self._panel_border_pen, self._panel_border_gradient_pen)
++         self.DrawPanelBorder(dc, true_rect, self._panel_minimised_border_pen, self._panel_minimised_border_gradient_pen)
++@@ -1829,20 +1829,20 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             preview.x = true_rect.x + 4
++-            preview.y = true_rect.y + (true_rect.height - preview.height) / 2
+++            preview.y = true_rect.y + (true_rect.height - preview.height) // 2
++         else:
++-            preview.x = true_rect.x + (true_rect.width - preview.width) / 2
+++            preview.x = true_rect.x + (true_rect.width - preview.width) // 2
++             preview.y = true_rect.y + 4
++ 
++         dc.SetFont(self._panel_label_font)
++         label_width, label_height = dc.GetTextExtent(wnd.GetLabel())
++ 
++-        xpos = true_rect.x + (true_rect.width - label_width + 1) / 2
+++        xpos = true_rect.x + (true_rect.width - label_width + 1) // 2
++         ypos = preview.y + preview.height + 5
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos = preview.x + preview.width + 5
++-            ypos = true_rect.y + (true_rect.height - label_height) / 2
+++            ypos = true_rect.y + (true_rect.height - label_height) // 2
++ 
++         dc.SetTextForeground(self._panel_minimised_label_colour)
++         dc.DrawText(wnd.GetLabel(), xpos, ypos)
++@@ -1851,12 +1851,12 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos += label_width
++-            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height / 2)
+++            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height // 2)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3,  3)
++             arrow_points[2] = arrow_points[0] + wx.Point(-3, -3)
++         else:
++             ypos += label_height
++-            arrow_points[0] = wx.Point(true_rect.width / 2, ypos + 5)
+++            arrow_points[0] = wx.Point(true_rect.width // 2, ypos + 5)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3, -3)
++             arrow_points[2] = arrow_points[0] + wx.Point( 3, -3)
++ 
++@@ -1967,7 +1967,7 @@ def DrawButtonBarButton(self, dc, wnd, rect, kind, state, label, bitmap_large, b
++             bg_rect.height -= 2
++ 
++             bg_rect_top = wx.Rect(*bg_rect)
++-            bg_rect_top.height /= 3
+++            bg_rect_top.height //= 3
++             bg_rect.y += bg_rect_top.height
++             bg_rect.height -= bg_rect_top.height
++ 
++@@ -2043,7 +2043,7 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         if result == RIBBON_BUTTONBAR_BUTTON_LARGE:
++ 
++             padding = 2
++-            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) / 2,
+++            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) // 2,
++                           rect.y + padding, True)
++             ypos = rect.y + padding + bitmap_large.GetHeight() + padding
++             arrow_width = (kind == RIBBON_BUTTON_NORMAL and [0] or [8])[0]
++@@ -2052,10 +2052,10 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++ 
++             if label_w + 2 * padding <= rect.width:
++ 
++-                dc.DrawText(label, rect.x + (rect.width - label_w) / 2, ypos)
+++                dc.DrawText(label, rect.x + (rect.width - label_w) // 2, ypos)
++                 if arrow_width != 0:
++-                    self.DrawDropdownArrow(dc, rect.x + rect.width / 2,
++-                                           ypos + (label_h * 3) / 2,
+++                    self.DrawDropdownArrow(dc, rect.x + rect.width // 2,
+++                                           ypos + (label_h * 3) // 2,
++                                            self._button_bar_label_colour)
++             else:
++                 breaki = len(label)
++@@ -2067,17 +2067,17 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++                         label_w, label_h = dc.GetTextExtent(label_top)
++ 
++                         if label_w + 2 * padding <= rect.width:
++-                            dc.DrawText(label_top, rect.x + (rect.width - label_w) / 2, ypos)
+++                            dc.DrawText(label_top, rect.x + (rect.width - label_w) // 2, ypos)
++                             ypos += label_h
++                             label_bottom = label[breaki:]
++                             label_w, label_h = dc.GetTextExtent(label_bottom)
++                             label_w += arrow_width
++-                            iX = rect.x + (rect.width - label_w) / 2
+++                            iX = rect.x + (rect.width - label_w) // 2
++                             dc.DrawText(label_bottom, iX, ypos)
++ 
++                             if arrow_width != 0:
++                                 self.DrawDropdownArrow(dc, iX + 2 +label_w - arrow_width,
++-                                                       ypos + label_h / 2 + 1,
+++                                                       ypos + label_h // 2 + 1,
++                                                        self._button_bar_label_colour)
++ 
++                             break
++@@ -2085,14 +2085,14 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         elif result == RIBBON_BUTTONBAR_BUTTON_MEDIUM:
++ 
++             x_cursor = rect.x + 2
++-            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())/2, True)
+++            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())//2, True)
++             x_cursor += bitmap_small.GetWidth() + 2
++             label_w, label_h = dc.GetTextExtent(label)
++-            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) / 2)
+++            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) // 2)
++             x_cursor += label_w + 3
++ 
++             if kind != RIBBON_BUTTON_NORMAL:
++-                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2,
+++                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height // 2,
++                                        self._button_bar_label_colour)
++ 
++         else:
++@@ -2184,7 +2184,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++ 
++         # Background
++         bg_rect_top = wx.Rect(*bg_rect)
++-        bg_rect_top.height = (bg_rect_top.height * 2) / 5
+++        bg_rect_top.height = (bg_rect_top.height * 2) // 5
++         bg_rect_btm = wx.Rect(*bg_rect)
++         bg_rect_btm.y += bg_rect_top.height
++         bg_rect_btm.height -= bg_rect_top.height
++@@ -2244,10 +2244,10 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++             dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
++-                          bg_rect.y + (bg_rect.height / 2) - 2, True)
+++                          bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2,
++-                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2,
+++                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def GetBarTabWidth(self, dc, wnd, label, bitmap, ideal=None, small_begin_need_separator=None,
++@@ -2474,7 +2474,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.y = size.GetHeight() - 15
++             scroll_up.height = 15
++             scroll_up.x = 0
++-            scroll_up.width = (size.GetWidth() + 2) / 3
+++            scroll_up.width = (size.GetWidth() + 2) // 3
++             scroll_down.y = scroll_up.y
++             scroll_down.height = scroll_up.height
++             scroll_down.x = scroll_up.x + scroll_up.width
++@@ -2491,7 +2491,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.x = size.GetWidth() - 15
++             scroll_up.width = 15
++             scroll_up.y = 0
++-            scroll_up.height = (size.GetHeight() + 2) / 3
+++            scroll_up.height = (size.GetHeight() + 2) // 3
++             scroll_down.x = scroll_up.x
++             scroll_down.width = scroll_up.width
++             scroll_down.y = scroll_up.y + scroll_up.height
++diff --git a/wx/lib/agw/ribbon/bar.py b/wx/lib/agw/ribbon/bar.py
++index ae8b6a19c..b0d28776d 100644
++--- a/wx/lib/agw/ribbon/bar.py
+++++ b/wx/lib/agw/ribbon/bar.py
++@@ -743,7 +743,7 @@ def RecalculateTabSizes(self):
++                     delta = info.ideal_width - info.small_must_have_separator_width
++                     info.rect.x = x
++                     info.rect.y = y
++-                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)/total_delta
+++                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)//total_delta
++                     info.rect.height = self._tab_height
++ 
++                     x += info.rect.width + tabsep
++@@ -797,7 +797,7 @@ def RecalculateTabSizes(self):
++                         delta = smallest_tab_width - info.minimum_width
++                         info.rect.x = x
++                         info.rect.y = y
++-                        info.rect.width = info.minimum_width + delta*(width - total_small_width)/total_delta
+++                        info.rect.width = info.minimum_width + delta*(width - total_small_width)//total_delta
++                         info.rect.height = self._tab_height
++ 
++                         x += info.rect.width + tabsep
++diff --git a/wx/lib/agw/ribbon/buttonbar.py b/wx/lib/agw/ribbon/buttonbar.py
++index 25ee49a82..4690f483d 100644
++--- a/wx/lib/agw/ribbon/buttonbar.py
+++++ b/wx/lib/agw/ribbon/buttonbar.py
++@@ -354,7 +354,7 @@ def InsertButton(self, pos, button_id, label, bitmap, bitmap_small=wx.NullBitmap
++                 self._bitmap_size_large = bitmap.GetSize()
++                 if not bitmap_small.IsOk():
++                     w, h = self._bitmap_size_large
++-                    self._bitmap_size_small = wx.Size(0.5*w, 0.5*h)
+++                    self._bitmap_size_small = wx.Size(w//2, h//2)
++ 
++             if bitmap_small.IsOk():
++ 
++@@ -867,8 +867,8 @@ def OnSize(self, event):
++ 
++             layout_size = self._layouts[layout_i].overall_size
++             if layout_size.x <= new_size.x and layout_size.y <= new_size.y:
++-                self._layout_offset.x = (new_size.x - layout_size.x)/2
++-                self._layout_offset.y = (new_size.y - layout_size.y)/2
+++                self._layout_offset.x = (new_size.x - layout_size.x)//2
+++                self._layout_offset.y = (new_size.y - layout_size.y)//2
++                 self._current_layout = layout_i
++                 break
++ 
++diff --git a/wx/lib/agw/ribbon/gallery.py b/wx/lib/agw/ribbon/gallery.py
++index b830fab7d..b86528865 100644
++--- a/wx/lib/agw/ribbon/gallery.py
+++++ b/wx/lib/agw/ribbon/gallery.py
++@@ -805,8 +805,8 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         if client.GetWidth() < 0 or client.GetHeight() < 0:
++             return relative_to
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++@@ -849,8 +849,8 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         elif direction == wx.BOTH:
++             client.IncBy(self._bitmap_padded_size)
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++diff --git a/wx/lib/agw/ribbon/panel.py b/wx/lib/agw/ribbon/panel.py
++index 79fd9bc58..901c765b6 100644
++--- a/wx/lib/agw/ribbon/panel.py
+++++ b/wx/lib/agw/ribbon/panel.py
++@@ -584,12 +584,12 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         minimum = wx.Size(*self.GetMinSize())
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 4) / 5
+++            current.x = (current.x * 4) // 5
++             if current.x < minimum.x:
++                 current.x = minimum.x
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 4) / 5
+++            current.y = (current.y * 4) // 5
++             if current.y < minimum.y:
++                 current.y = minimum.y
++ 
++@@ -668,10 +668,10 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         current = wx.Size(*relative_to)
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 5 + 3) / 4
+++            current.x = (current.x * 5 + 3) // 4
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 5 + 3) / 4
+++            current.y = (current.y * 5 + 3) // 4
++ 
++         return current
++ 
++@@ -1076,25 +1076,25 @@ def GetExpandedPosition(self, panel, expanded_size, direction):
++         pos = wx.Point()
++ 
++         if direction == wx.NORTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetY() - expanded_size.GetHeight()
++             primary_x = True
++             secondary_y = 1
++ 
++         elif direction == wx.EAST:
++             pos.x = panel.GetRight()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = -1
++ 
++         elif direction == wx.SOUTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetBottom()
++             primary_x = True
++             secondary_y = -1
++ 
++         else:
++             pos.x = panel.GetX() - expanded_size.GetWidth()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = 1
++ 
++         expanded = wx.Rect(pos, expanded_size)
++diff --git a/wx/lib/agw/ribbon/toolbar.py b/wx/lib/agw/ribbon/toolbar.py
++index 1771c6506..8c6f8b522 100644
++--- a/wx/lib/agw/ribbon/toolbar.py
+++++ b/wx/lib/agw/ribbon/toolbar.py
++@@ -1159,7 +1159,7 @@ def OnSize(self, event):
++ 
++         # Set group y positions
++         for group in self._groups:
++-            group.position.y = rowypos[group.position.y]
+++            group.position.y = int(rowypos[group.position.y])
++ 
++ 
++     def GetBestSizeForParentSize(self, parentSize):
++diff --git a/wx/lib/agw/shapedbutton.py b/wx/lib/agw/shapedbutton.py
++index f015d4e39..49523366a 100644
++--- a/wx/lib/agw/shapedbutton.py
+++++ b/wx/lib/agw/shapedbutton.py
++@@ -569,9 +569,9 @@ def DrawMainButton(self, dc, width, height):
++                 rect2 = w*main//secondary
++ 
++             if self._isup:
++-                img = self._mainbuttonup.Scale(rect2, rect3)
+++                img = self._mainbuttonup.Scale(int(rect2), int(rect3))
++             else:
++-                img = self._mainbuttondown.Scale(rect2, rect3)
+++                img = self._mainbuttondown.Scale(int(rect2), int(rect3))
++ 
++         bmp = img.ConvertToBitmap()
++ 
++@@ -599,7 +599,7 @@ def DrawMainButton(self, dc, width, height):
++                     ypos = 0
++ 
++         # Draw Finally The Bitmap
++-        dc.DrawBitmap(bmp, xpos, ypos, True)
+++        dc.DrawBitmap(bmp, int(xpos), int(ypos), True)
++ 
++         # Store Bitmap Position And Size To Draw An Elliptical Focus Indicator
++         self._xpos = xpos
++@@ -646,7 +646,7 @@ def DrawLabel(self, dc, width, height, dw=0, dh=0):
++             xp = xc - (tw//2)* cos(angle) - (th//2)*sin(angle)
++             yp = yc + (tw//2)*sin(angle) - (th//2)*cos(angle)
++ 
++-            dc.DrawRotatedText(label, xp + dw, yp + dh , angle*180/pi)
+++            dc.DrawRotatedText(label, int(xp + dw), int(yp + dh), angle*180/pi)
++ 
++ 
++     def DrawFocusIndicator(self, dc, width, height):
++@@ -676,7 +676,7 @@ def DrawFocusIndicator(self, dc, width, height):
++         else:
++             # This Is An Ellipse
++             if hasattr(self, "_xpos"):
++-                dc.DrawEllipse(self._xpos + 2, self._ypos + 2, self._imgx - 4, self._imgy - 4)
+++                dc.DrawEllipse(int(self._xpos + 2), int(self._ypos + 2), self._imgx - 4, self._imgy - 4)
++ 
++         dc.SetLogicalFunction(wx.COPY)
++ 
++diff --git a/wx/lib/agw/speedmeter.py b/wx/lib/agw/speedmeter.py
++index f196b51f2..606901d27 100644
++--- a/wx/lib/agw/speedmeter.py
+++++ b/wx/lib/agw/speedmeter.py
++@@ -580,8 +580,8 @@ def Draw(self, dc):
++         dc.SetBackground(wx.Brush(speedbackground))
++         dc.Clear()
++ 
++-        centerX = self.faceBitmap.GetWidth()/2
++-        centerY = self.faceBitmap.GetHeight()/2
+++        centerX = self.faceBitmap.GetWidth()//2
+++        centerY = self.faceBitmap.GetHeight()//2
++ 
++         self.CenterX = centerX
++         self.CenterY = centerY
++@@ -681,7 +681,7 @@ def Draw(self, dc):
++             # Draw The Filler (Both In "Advance" And "Reverse" Directions)
++ 
++             dc.SetBrush(wx.Brush(fillercolour))
++-            dc.DrawArc(xs2, ys2, xe2, ye2, centerX, centerY)
+++            dc.DrawArc(xs2, ys2, xe2, ye2, int(centerX), int(centerY))
++ 
++             if self._agwStyle & SM_DRAW_SECTORS == 0:
++                 dc.SetBrush(wx.Brush(speedbackground))
++@@ -952,7 +952,7 @@ def Draw(self, dc):
++                     y = y - height/2.0 - height*sin(angis)/2.0
++                     fancytext.RenderToDC(fancystr, dc, x, y)
++                 else:
++-                    dc.DrawText(strings, x, y)
+++                    dc.DrawText(strings, int(x), int(y))
++ 
++             # This Is The Small Rectangle --> Tick Mark
++             rectangle = colourangles[ii] + pi/2.0
++@@ -969,6 +969,7 @@ def Draw(self, dc):
++             y4 = y3 + 3*self.scale*sinrect
++ 
++             points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++            points = [(int(p[0]), int(p[1])) for p in points]
++ 
++             dc.DrawPolygon(points)
++ 
++@@ -1003,6 +1004,7 @@ def Draw(self, dc):
++                         y4 = y3 + self.scale*sinrect
++ 
++                         points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++                        points = [(int(p[0]), int(p[1])) for p in points]
++ 
++                         dc.DrawPolygon(points)
++ 
++@@ -1017,7 +1019,7 @@ def Draw(self, dc):
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++ 
++         if self._drawarc:
++-            dc.SetPen(wx.Pen(self.GetArcColour(), 2.0))
+++            dc.SetPen(wx.Pen(self.GetArcColour(), 2))
++             # If It's Not A Complete Circle, Draw The Connecting Lines And The Arc
++             if abs(abs(startangle - endangle) - 2*pi) > 1.0/180.0:
++                 dc.DrawArc(xstart, ystart, xend, yend, centerX, centerY)
++@@ -1046,7 +1048,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++             dc.SetTextForeground(middlecolour)
++-            dc.DrawText(middletext, newx, newy)
+++            dc.DrawText(middletext, int(newx), int(newy))
++ 
++         # Here We Draw The Icon In The Middle, Near The Start Of The Arrow (If Present)
++         # This Is Like The "Fuel" Icon In The Cars
++@@ -1054,8 +1056,8 @@ def Draw(self, dc):
++ 
++             middleicon = self.GetMiddleIcon()
++             middlewidth, middleheight = self.GetMiddleIconDimens()
++-            middleicon.SetWidth(middlewidth*self.scale)
++-            middleicon.SetHeight(middleheight*self.scale)
+++            middleicon.SetWidth(int(middlewidth*self.scale))
+++            middleicon.SetHeight(int(middleheight*self.scale))
++             middleangle = (startangle + endangle)/2.0
++ 
++             mw = middleicon.GetWidth()
++@@ -1064,7 +1066,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++ 
++-            dc.DrawIcon(middleicon, newx, newy)
+++            dc.DrawIcon(middleicon, int(newx), int(newy))
++ 
++             # Restore Icon Dimension, If Not Something Strange Happens
++             middleicon.SetWidth(middlewidth)
++@@ -1109,53 +1111,61 @@ def Draw(self, dc):
++                 if handstyle == "Arrow":
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++-                    dc.SetPen(wx.Pen(shadowcolour, 5*log(self.scale+1)))
+++                    dc.SetPen(wx.Pen(shadowcolour, int(5*log(self.scale+1))))
++                     dc.SetBrush(wx.Brush(shadowcolour))
++                     shadowdistance = 2.0*self.scale
++-                    dc.DrawLine(newx + shadowdistance, newy + shadowdistance,
++-                                xarr + shadowdistance, yarr + shadowdistance)
++-
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance)])
+++                    dc.DrawLine(int(newx + shadowdistance), int(newy + shadowdistance),
+++                                int(xarr + shadowdistance), int(yarr + shadowdistance))
+++
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++                 else:
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++                     dc.SetBrush(wx.Brush(shadowcolour))
++-                    dc.SetPen(wx.Pen(shadowcolour, 1.0))
+++                    dc.SetPen(wx.Pen(shadowcolour, 1))
++                     shadowdistance = 1.5*self.scale
++ 
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance),
++-                                    (x4+shadowdistance, y4+shadowdistance)])
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance),
+++                              (x4+shadowdistance, y4+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++ 
++             if handstyle == "Arrow":
++ 
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++-                dc.SetPen(wx.Pen(handcolour, 5*log(self.scale+1)))
+++                dc.SetPen(wx.Pen(handcolour, int(5*log(self.scale+1))))
++                 # Draw The "Hand", An Arrow
++-                dc.DrawLine(newx, newy, xarr, yarr)
+++                dc.DrawLine(int(newx), int(newy), int(xarr), int(yarr))
++ 
++                 # Draw The Arrow Pointer
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3)])
+++                points = [(x1, y1), (x2, y2), (x3, y3)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++             else:
++ 
++                 # Draw The Hand Pointer
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3), (x4, y4)])
+++                points = [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++ 
++     def SetIntervals(self, intervals=None):
++@@ -1527,7 +1537,7 @@ def SetMiddleTextFont(self, font=None):
++ 
++         if font is None:
++             self._middletextfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._middletextsize = 10.0
+++            self._middletextsize = 10
++             self._middletextfont.SetPointSize(self._middletextsize)
++         else:
++             self._middletextfont = font
++@@ -1599,7 +1609,7 @@ def CircleCoords(self, radius, angle, centerX, centerY):
++         x = radius*cos(angle) + centerX
++         y = radius*sin(angle) + centerY
++ 
++-        return x, y
+++        return int(x), int(y)
++ 
++ 
++     def GetIntersection(self, current, intervals):
++diff --git a/wx/lib/agw/supertooltip.py b/wx/lib/agw/supertooltip.py
++index a92ce10d1..cd0f0c9f7 100644
++--- a/wx/lib/agw/supertooltip.py
+++++ b/wx/lib/agw/supertooltip.py
++@@ -295,8 +295,8 @@ def OnPaint(self, event):
++ 
++         # Get the user options for header, bitmaps etc...
++         drawHeader, drawFooter = classParent.GetDrawHeaderLine(), classParent.GetDrawFooterLine()
++-        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height/2)
++-        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height/2, frameRect.width, frameRect.height/2+1)
+++        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height//2)
+++        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height//2, frameRect.width, frameRect.height//2+1)
++         # Fill the triple-gradient
++         dc.GradientFillLinear(topRect, topColour, middleColour, wx.SOUTH)
++         dc.GradientFillLinear(bottomRect, middleColour, bottomColour, wx.SOUTH)
++@@ -324,9 +324,9 @@ def OnPaint(self, event):
++         normalText = classParent.GetTextColour()
++         if header:
++             dc.SetTextForeground(normalText)
++-            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)/2)
+++            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)//2)
++         if headerBmp and headerBmp.IsOk():
++-            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)/2, True)
+++            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)//2, True)
++ 
++         if header or (headerBmp and headerBmp.IsOk()):
++             yPos += height
++@@ -376,7 +376,7 @@ def OnPaint(self, event):
++                 messageHeight += textHeight
++ 
++                 xText = (bmpWidth + 2 * self._spacing) if bmpWidth > 0 else self._spacing
++-                yText += textHeight/2+self._spacing
+++                yText += textHeight//2+self._spacing
++                 maxWidth = max(xText + textWidth + self._spacing, maxWidth)
++                 dc.DrawText(line, xText, yText)
++                 if isLink:
++@@ -412,8 +412,8 @@ def OnPaint(self, event):
++             if drawFooter:
++                 # Draw the separator line before the footer
++                 dc.SetPen(wx.GREY_PEN)
++-                dc.DrawLine(self._spacing, yPos-self._spacing/2+toAdd,
++-                            width-self._spacing, yPos-self._spacing/2+toAdd)
+++                dc.DrawLine(self._spacing, yPos-self._spacing//2+toAdd,
+++                            width-self._spacing, yPos-self._spacing//2+toAdd)
++         # Draw the footer and footer bitmap (if any)
++         dc.SetTextForeground(normalText)
++         height = max(textHeight, bmpHeight)
++@@ -424,7 +424,7 @@ def OnPaint(self, event):
++             maxWidth = max(bmpXPos + bmpWidth + (self._spacing*2) + textWidth, maxWidth)
++         if footerBmp and footerBmp.IsOk():
++             toAdd = (height - bmpHeight + self._spacing) / 2
++-            dc.DrawBitmap(footerBmp, bmpXPos, yPos + toAdd, True)
+++            dc.DrawBitmap(footerBmp, bmpXPos, int(yPos + toAdd), True)
++             maxWidth = max(footerBmp.GetSize().GetWidth() + bmpXPos, maxWidth)
++ 
++         maxHeight = yPos + height + toAdd
++@@ -815,7 +815,7 @@ def SetStartDelay(self, delay=1):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._startDelayTime = float(delay)
+++        self._startDelayTime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -831,7 +831,7 @@ def SetEndDelay(self, delay=1e6):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._endDelayTime = float(delay)
+++        self._endDelayTime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/toasterbox.py b/wx/lib/agw/toasterbox.py
++index b73429dd2..8efb5869b 100644
++--- a/wx/lib/agw/toasterbox.py
+++++ b/wx/lib/agw/toasterbox.py
++@@ -1316,11 +1316,11 @@ def _getTextCoords(self, dc):
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++             fh += h + textPadding
++-        y = (th - fh) / 2; coords = []
+++        y = (th - fh) // 2; coords = []
++ 
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++-            x = (tw - w) / 2
+++            x = (tw - w) // 2
++             coords.append((x, y))
++             y += h + textPadding
++ 
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index 14fc41f86..caa5e5cf4 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -914,7 +914,7 @@ def Draw(self, index, dc, x, y, flags, solidBackground=True):
++             raise Exception("Wrong index in image list")
++ 
++         bmp = self._images[index]
++-        dc.DrawBitmap(bmp, x, y, (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
+++        dc.DrawBitmap(bmp, x, int(y), (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
++ 
++         return True
++ 
++@@ -4022,7 +4022,7 @@ def SetPosition(self, x, y, spacing):
++ 
++             if item.HasImage():
++ 
++-                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)/2
+++                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)//2
++                 self._gi._rectIcon.y = self._gi._rectAll.y + 4
++ 
++             if item.HasText():
++@@ -4030,7 +4030,7 @@ def SetPosition(self, x, y, spacing):
++                 if self._gi._rectLabel.width > spacing:
++                     self._gi._rectLabel.x = self._gi._rectAll.x + 2
++                 else:
++-                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing/2) - (self._gi._rectLabel.width/2)
+++                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing//2) - (self._gi._rectLabel.width//2)
++ 
++                 self._gi._rectLabel.y = self._gi._rectAll.y + self._gi._rectAll.height + 2 - self._gi._rectLabel.height
++                 self._gi._rectHighlight.x = self._gi._rectLabel.x - 2
++@@ -4546,7 +4546,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 checked = item.IsChecked()
++-                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)/2, item.GetKind(), checked, enabled)
+++                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)//2, item.GetKind(), checked, enabled)
++                 xOld += ix
++                 width -= ix
++ 
++@@ -4557,7 +4557,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 for img in images:
++ 
++                     ix, iy = self._owner.GetImageSize([img])
++-                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)/2, enabled)
+++                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)//2, enabled)
++ 
++                     xOld += ix
++                     width -= ix
++@@ -5230,7 +5230,7 @@ def OnPaint(self, event):
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 # We draw it on the left, always
++-                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)/2, kind, checked, enabled)
+++                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)//2, kind, checked, enabled)
++                 wcheck += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++                 cw -= ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++ 
++@@ -6819,7 +6819,7 @@ def HitTestLine(self, line, x, y):
++                     # We got a checkbox-type item
++                     ix, iy = self.GetCheckboxImageSize()
++                     LH = self.GetLineHeight(line)
++-                    rect = wx.Rect(xOld, lineY + LH/2 - iy/2, ix, iy)
+++                    rect = wx.Rect(xOld, lineY + LH//2 - iy//2, ix, iy)
++                     if rect.Contains((x, y)):
++                         newItem = self.GetParent().GetItem(line, col)
++                         return newItem, ULC_HITTEST_ONITEMCHECK
++@@ -7937,13 +7937,13 @@ def MoveToItem(self, item):
++                     while start_y > view_y:
++                         start_y -= SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, start_y/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, start_y//SCROLL_UNIT_Y)
++ 
++                 if start_y + height > view_y + client_h:
++                     while start_y + height < view_y + client_h:
++                         start_y += SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)//SCROLL_UNIT_Y)
++ 
++         else: # !report
++ 
++@@ -7960,7 +7960,7 @@ def MoveToItem(self, item):
++             if rect.y + rect.height - 5 > view_y + client_h:
++                 sy = (rect.y + rect.height - client_h + hLine)/hLine
++ 
++-            self.Scroll(sx, sy)
+++            self.Scroll(int(sx), int(sy))
++ 
++ 
++ # ----------------------------------------------------------------------------
++diff --git a/wx/lib/agw/xlsgrid.py b/wx/lib/agw/xlsgrid.py
++index b505aebb4..17267fabc 100644
++--- a/wx/lib/agw/xlsgrid.py
+++++ b/wx/lib/agw/xlsgrid.py
++@@ -965,7 +965,7 @@ def Draw(self, dc, rect):
++             xp = xc - (text_width/2)*xshift - (text_height/2)*yshift
++             yp = yc + (text_width/2)*yshift - (text_height/2)*xshift
++ 
++-            dc.DrawRotatedText(value, xp, yp, self.rotation)
+++            dc.DrawRotatedText(value, int(xp), int(yp), self.rotation)
++ 
++         else:
++ 
++@@ -1125,7 +1125,7 @@ def Draw(self, dc, rect):
++             if font.escapement == 1:
++                 ypos = ypos - maxH + height
++ 
++-            dc.DrawText(chunk, start, ypos)
+++            dc.DrawText(chunk, start, int(ypos))
++             start += width
++ 
++ 
++diff --git a/wx/lib/agw/zoombar.py b/wx/lib/agw/zoombar.py
++index 1e6ec5da3..8c2afd058 100644
++--- a/wx/lib/agw/zoombar.py
+++++ b/wx/lib/agw/zoombar.py
++@@ -463,7 +463,7 @@ def SetSize(self, width, height):
++     def GetPosition(self):
++         """ Returns the button position. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -601,7 +601,7 @@ def __init__(self, bitmap=None):
++     def GetPosition(self):
++         """ Returns the position of :class:`wx.ImageBar`, as a :class:`wx.Point`. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -660,7 +660,7 @@ def SetBarColour(self, colour, xSize=None, ySize=None):
++         if xSize is not None:
++             self._size = wx.Size(xSize, ySize)
++ 
++-        bitmap.Rescale(self._size.width, self._size.height/2)
+++        bitmap.Rescale(self._size.width, self._size.height//2)
++ 
++         r1, g1, b1 = self._startColour.Red(), self._startColour.Green(), self._startColour.Blue()
++         r2, g2, b2 = colour.Red(), colour.Green(), colour.Blue()
++@@ -1065,7 +1065,7 @@ def ResetSize(self):
++             ySize += yextent
++ 
++         if self._showReflections:
++-            ySize += self._buttonSize/2
+++            ySize += self._buttonSize//2
++         if self._centerZoom:
++             ySize += self._buttonSize
++ 
++@@ -1240,7 +1240,7 @@ def DrawLabels(self, dc):
++             textWidth, textHeight = dc.GetTextExtent(label)
++             buttonPos = button.GetPosition()
++             buttonSize = button.GetSize()
++-            xpos = buttonPos.x + (buttonSize.width - textWidth)/2
+++            xpos = buttonPos.x + (buttonSize.width - textWidth)//2
++             ypos = buttonPos.y - textHeight - 2
++ 
++             dc.DrawRectangle(xpos-2, ypos-1, textWidth+4, textHeight+2)
++diff --git a/wx/lib/analogclock/analogclock.py b/wx/lib/analogclock/analogclock.py
++index 7c4b18979..1ee1d6742 100644
++--- a/wx/lib/analogclock/analogclock.py
+++++ b/wx/lib/analogclock/analogclock.py
++@@ -173,7 +173,7 @@ def _recalcCoords(self, size):
++         scale = min([float(size.width) / self.basesize.width,
++                      float(size.height) / self.basesize.height])
++ 
++-        centre = wx.Point(size.width / 2., size.height / 2.)
+++        centre = wx.Point(size.width // 2, size.height // 2)
++ 
++         self.Box.RecalcCoords(size, centre, scale)
++         self.Hands.RecalcCoords(size, centre, scale)
++diff --git a/wx/lib/analogclock/helpers.py b/wx/lib/analogclock/helpers.py
++index 88d198bee..9674de912 100644
++--- a/wx/lib/analogclock/helpers.py
+++++ b/wx/lib/analogclock/helpers.py
++@@ -37,7 +37,7 @@ def __init__(self, idx=0, pos=None, size=None, offset=0, clocksize=None,
++ 
++ 
++     def _pol2rect(self, m, t):
++-        return m * math.cos(math.radians(t)), m * math.sin(math.radians(t))
+++        return int(m * math.cos(math.radians(t))), int(m * math.sin(math.radians(t)))
++ 
++ 
++     def _rect2pol(self, x, y):
++@@ -174,7 +174,7 @@ def __init__(self, **kwargs):
++ 
++     def Draw(self, dc):
++         self.dyer.Select(dc)
++-        dc.DrawCircle(self.pos.x, self.pos.y, self.radius)
+++        dc.DrawCircle(self.pos.x, self.pos.y, int(self.radius))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -205,7 +205,7 @@ def Draw(self, dc, end, offset=0):
++             m, t = self._rect2pol(x, y)
++             polygon[i] = self._pol2rect(m, t - angle)
++ 
++-        dc.DrawPolygon(polygon, centre.x + offset, centre.y + offset)
+++        dc.DrawPolygon(polygon, int(centre.x + offset), int(centre.y + offset))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -226,7 +226,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawRectangle(x + offset, y + offset, width, height)
+++        dc.DrawRectangle(int(x + offset), int(y + offset), int(width), int(height))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -242,7 +242,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x
++         y = self.pos.y
++ 
++-        dc.DrawCircle(x + offset, y + offset, radius)
+++        dc.DrawCircle(int(x + offset), int(y + offset), int(radius))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -273,7 +273,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -290,7 +290,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -309,7 +309,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawText(self.text, x + offset, y + offset)
+++        dc.DrawText(self.text, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -321,7 +321,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawRotatedText(self.text, x + offset, y + offset, angle)
+++        dc.DrawRotatedText(self.text, int(x + offset), int(y + offset), int(angle))
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -656,7 +656,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++ 
++         # Try to find a 'good' max size for text-based ticks.
++         if a_tick.text is not None:
++-            self.font.SetPointSize(size)
+++            self.font.SetPointSize(int(size))
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(*clocksize.Get()))
++             dc.SetFont(self.font)
++@@ -686,7 +686,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++             x = centre.x + radius * math.sin(angle)
++             y = centre.y + radius * math.cos(angle)
++ 
++-            tick.SetPosition(wx.Point(x, y))
+++            tick.SetPosition(wx.Point(int(x), int(y)))
++ 
++ 
++     def GetSize(self):
++diff --git a/wx/lib/analogclock/setup.py b/wx/lib/analogclock/setup.py
++index a83c8639d..a7dffb901 100644
++--- a/wx/lib/analogclock/setup.py
+++++ b/wx/lib/analogclock/setup.py
++@@ -179,7 +179,7 @@ def __init__(self, parent, title, group="Hands"):
++         p.SetCustomColours(self.customcolours)
++         sizer.Add(p, pos=(0, 1), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.bw = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.bw = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(0, 2), span=(1, 2), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -193,7 +193,7 @@ def __init__(self, parent, title, group="Hands"):
++         p = self.ls = wx.StaticText(self, label="Size:")
++         sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.sz = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.sz = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -212,7 +212,7 @@ def __init__(self, parent, title, group="Ticks"):
++         p = wx.StaticText(self, label="Offset:")
++         sizer.Add(p, pos=(3, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.of = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.of = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(3, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++diff --git a/wx/lib/buttons.py b/wx/lib/buttons.py
++index 46d1b8747..f01a54d41 100644
++--- a/wx/lib/buttons.py
+++++ b/wx/lib/buttons.py
++@@ -453,7 +453,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         tw, th = dc.GetTextExtent(label)
++         if not self.up:
++             dx = dy = self.labelDelta
++-        dc.DrawText(label, (width-tw)/2+dx, (height-th)/2+dy)
+++        dc.DrawText(label, (width-tw)//2+dx, (height-th)//2+dy)
++ 
++ 
++     def DrawFocusIndicator(self, dc, w, h):
++@@ -844,7 +844,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++         hasMask = bmp.GetMask() != None
++-        dc.DrawBitmap(bmp, (width-bw)/2+dx, (height-bh)/2+dy, hasMask)
+++        dc.DrawBitmap(bmp, (width-bw)//2+dx, (height-bh)//2+dy, hasMask)
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -926,12 +926,12 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++ 
++-        pos_x = (width-bw-tw)/2+dx      # adjust for bitmap and text to centre
+++        pos_x = (width-bw-tw)//2+dx      # adjust for bitmap and text to centre
++         if bmp is not None:
++-            dc.DrawBitmap(bmp, pos_x, (height-bh)/2+dy, hasMask) # draw bitmap if available
+++            dc.DrawBitmap(bmp, pos_x, (height-bh)//2+dy, hasMask) # draw bitmap if available
++             pos_x = pos_x + 2   # extra spacing from bitmap
++ 
++-        dc.DrawText(label, pos_x + dx+bw, (height-th)/2+dy)      # draw the text
+++        dc.DrawText(label, pos_x + dx+bw, (height-th)//2+dy)      # draw the text
++ 
++ 
++ #----------------------------------------------------------------------
++diff --git a/wx/lib/colourchooser/pycolourchooser.py b/wx/lib/colourchooser/pycolourchooser.py
++index 61dbc02d2..124376483 100644
++--- a/wx/lib/colourchooser/pycolourchooser.py
+++++ b/wx/lib/colourchooser/pycolourchooser.py
++@@ -188,7 +188,7 @@ def __init__(self, parent, id):
++         self.colour_slider.Bind(wx.EVT_MOTION, self.onSliderMotion)
++         self.slider = wx.Slider(
++                         self, self.idSCROLL, 86, 0, self.colour_slider.HEIGHT - 1,
++-                        style=wx.SL_VERTICAL, size=(15, self.colour_slider.HEIGHT)
+++                        style=wx.SL_VERTICAL, size=(-1, self.colour_slider.HEIGHT)
++                         )
++ 
++         self.Bind(wx.EVT_COMMAND_SCROLL, self.onScroll, self.slider)
++@@ -338,7 +338,7 @@ def setSliderToV(self, v):
++         min = self.slider.GetMin()
++         max = self.slider.GetMax()
++         val = (1 - v) * max
++-        self.slider.SetValue(val)
+++        self.slider.SetValue(int(val))
++ 
++     def getVFromSlider(self):
++         """Get the current value of "V" from the v slider."""
++diff --git a/wx/lib/colourchooser/pypalette.py b/wx/lib/colourchooser/pypalette.py
++index ff1fb840c..71b9fc2df 100644
++--- a/wx/lib/colourchooser/pypalette.py
+++++ b/wx/lib/colourchooser/pypalette.py
++@@ -165,7 +165,7 @@ def DrawBuffer(self):
++             colour = wx.Colour(0, 0, 0)
++             self.buffer.SetPen(wx.Pen(colour, 1, wx.PENSTYLE_SOLID))
++             self.buffer.SetBrush(wx.Brush(colour, wx.BRUSHSTYLE_TRANSPARENT))
++-            self.buffer.DrawCircle(self.point[0], self.point[1], 3)
+++            self.buffer.DrawCircle(int(self.point[0]), int(self.point[1]), 3)
++ 
++     def HighlightPoint(self, x, y):
++         """Highlights an area of the palette with a little circle around
++diff --git a/wx/lib/floatcanvas/FCObjects.py b/wx/lib/floatcanvas/FCObjects.py
++index 58becd38c..cdf8cc53e 100644
++--- a/wx/lib/floatcanvas/FCObjects.py
+++++ b/wx/lib/floatcanvas/FCObjects.py
++@@ -296,7 +296,7 @@ def SetPen(self, LineColor, LineStyle, LineWidth):
++         else:
++             self.Pen = self.PenList.setdefault(
++                 (LineColor, LineStyle, LineWidth),
++-                wx.Pen(LineColor, LineWidth, self.LineStyleList[LineStyle]))
+++                wx.Pen(LineColor, int(LineWidth), self.LineStyleList[LineStyle]))
++ 
++     def SetHitBrush(self, HitColor):
++         """
++@@ -1202,14 +1202,14 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++             x = xc - Size/2.0
++             y = yc - Size/2.0
++             dc.SetBrush(self.Brush)
++-            dc.DrawRectangle(x, y, Size, Size)
+++            dc.DrawRectangle(int(x), int(y), Size, Size)
++         if HTdc and self.HitAble:
++             HTdc.SetPen(self.HitPen)
++             if self.Size <= 1:
++                 HTdc.DrawPoint(xc, xc)
++             else:
++                 HTdc.SetBrush(self.HitBrush)
++-                HTdc.DrawRectangle(x, y, Size, Size)
+++                HTdc.DrawRectangle(int(x), int(y), Size, Size)
++ 
++ class RectEllipse(XYObjectMixin, LineAndFillMixin, DrawObject):
++     """A RectEllipse draw object."""
++@@ -2161,7 +2161,7 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++         W = H * (self.bmpWidth / self.bmpHeight)
++         if (self.ScaledBitmap is None) or (H != self.ScaledHeight) :
++             self.ScaledHeight = H
++-            Img = self.Image.Scale(W, H)
+++            Img = self.Image.Scale(int(W), int(H))
++             self.ScaledBitmap = wx.Bitmap(Img)
++ 
++         XY = self.ShiftFun(XY[0], XY[1], W, H)
++diff --git a/wx/lib/gizmos/ledctrl.py b/wx/lib/gizmos/ledctrl.py
++index f185d5105..7f4d3fcf9 100644
++--- a/wx/lib/gizmos/ledctrl.py
+++++ b/wx/lib/gizmos/ledctrl.py
++@@ -293,7 +293,7 @@ def _drawDigit(self, dc, digit, column):
++ 
++         if digit & c.COLON:
++             dc.SetBrush(wx.Brush(lineColor))
++-            centerX = XPos + (self.m_lineLength + self.m_digitMargin) / 2
++-            radius = self.m_lineWidth / 2
++-            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) / 2, radius)
++-            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 / 4, radius)
+++            centerX = XPos + (self.m_lineLength + self.m_digitMargin) // 2
+++            radius = self.m_lineWidth // 2
+++            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) // 2, radius)
+++            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 // 4, radius)
++diff --git a/wx/lib/imagebrowser.py b/wx/lib/imagebrowser.py
++index 795e90dca..8e14727e7 100644
++--- a/wx/lib/imagebrowser.py
+++++ b/wx/lib/imagebrowser.py
++@@ -347,8 +347,8 @@ def DrawImage(self, dc):
++         owidth = int(scale*iwidth)
++         oheight = int(scale*iheight)
++ 
++-        diffx = (wwidth - owidth)/2   # center calc
++-        diffy = (wheight - oheight)/2   # center calc
+++        diffx = (wwidth - owidth)//2   # center calc
+++        diffy = (wheight - oheight)//2   # center calc
++ 
++         if not bmp:
++             if owidth!=iwidth or oheight!=iheight:
++diff --git a/wx/lib/ogl/basic.py b/wx/lib/ogl/basic.py
++index b08859ab9..0107f21fc 100644
++--- a/wx/lib/ogl/basic.py
+++++ b/wx/lib/ogl/basic.py
++@@ -1051,7 +1051,7 @@ def OnEraseContents(self, dc):
++         dc.SetPen(self.GetBackgroundPen())
++         dc.SetBrush(self.GetBackgroundBrush())
++ 
++-        dc.DrawRectangle(topLeftX - penWidth, topLeftY - penWidth, maxX + penWidth * 2 + 4, maxY + penWidth * 2 + 4)
+++        dc.DrawRectangle(int(topLeftX - penWidth), int(topLeftY - penWidth), int(maxX + penWidth * 2 + 4), int(maxY + penWidth * 2 + 4))
++ 
++     def EraseLinks(self, dc, attachment = -1, recurse = False):
++         """
++@@ -2769,9 +2769,9 @@ def OnDraw(self, dc):
++             dc.SetBrush(self._brush)
++ 
++         if self._cornerRadius:
++-            dc.DrawRoundedRectangle(x1, y1, self._width, self._height, self._cornerRadius)
+++            dc.DrawRoundedRectangle(int(x1), int(y1), self._width, self._height, self._cornerRadius)
++         else:
++-            dc.DrawRectangle(x1, y1, self._width, self._height)
+++            dc.DrawRectangle(int(x1), int(y1), self._width, self._height)
++ 
++     def GetBoundingBoxMin(self):
++         """Get the bounding box minimum."""
++@@ -2882,7 +2882,7 @@ def Create(self, the_points = None):
++             # Duplicate the list of points
++             self._points = []
++             for point in the_points:
++-                new_point = wx.Point(point[0], point[1])
+++                new_point = wx.Point(int(point[0]), int(point[1]))
++                 self._points.append(new_point)
++             self.CalculateBoundingBox()
++             self._originalWidth = self._boundWidth
++@@ -3444,7 +3444,7 @@ def OnDraw(self, dc):
++                 dc.SetPen(self._pen)
++         if self._brush:
++             dc.SetBrush(self._brush)
++-        dc.DrawEllipse(self._xpos - self.GetWidth() / 2.0, self._ypos - self.GetHeight() / 2.0, self.GetWidth(), self.GetHeight())
+++        dc.DrawEllipse(int(self._xpos - self.GetWidth() / 2.0), int(self._ypos - self.GetHeight() / 2.0), self.GetWidth(), self.GetHeight())
++ 
++     def SetSize(self, x, y, recursive = True):
++         """
++diff --git a/wx/lib/ogl/bmpshape.py b/wx/lib/ogl/bmpshape.py
++index ee2859527..e53ddb136 100644
++--- a/wx/lib/ogl/bmpshape.py
+++++ b/wx/lib/ogl/bmpshape.py
++@@ -32,7 +32,7 @@ def OnDraw(self, dc):
++ 
++         x = self._xpos - self._bitmap.GetWidth() / 2.0
++         y = self._ypos - self._bitmap.GetHeight() / 2.0
++-        dc.DrawBitmap(self._bitmap, x, y, True)
+++        dc.DrawBitmap(self._bitmap, int(x), int(y), True)
++ 
++     def SetSize(self, w, h, recursive = True):
++         """
++diff --git a/wx/lib/ogl/composit.py b/wx/lib/ogl/composit.py
++index c3b623952..eecaafb3f 100644
++--- a/wx/lib/ogl/composit.py
+++++ b/wx/lib/ogl/composit.py
++@@ -1131,11 +1131,11 @@ def OnDraw(self, dc):
++ 
++         if self._leftSide:
++             dc.SetPen(self._leftSidePen)
++-            dc.DrawLine(x1, y2, x1, y1)
+++            dc.DrawLine(int(x1), int(y2), int(x1), int(y1))
++ 
++         if self._topSide:
++             dc.SetPen(self._topSidePen)
++-            dc.DrawLine(x1, y1, x2, y1)
+++            dc.DrawLine(int(x1), int(y1), int(x2), int(y1))
++ 
++         # For testing purposes, draw a rectangle so we know
++         # how big the division is.
++diff --git a/wx/lib/ogl/divided.py b/wx/lib/ogl/divided.py
++index 0bfb1919f..0809be58c 100644
++--- a/wx/lib/ogl/divided.py
+++++ b/wx/lib/ogl/divided.py
++@@ -231,7 +231,7 @@ def OnDrawContents(self, dc):
++                 regionPen = region.GetActualPen()
++                 if regionPen:
++                     dc.SetPen(regionPen)
++-                    dc.DrawLine(leftX, y, rightX, y)
+++                    dc.DrawLine(int(leftX), int(y), int(rightX), int(y))
++ 
++             currentY = actualY
++ 
++diff --git a/wx/lib/ogl/lines.py b/wx/lib/ogl/lines.py
++index 948b85d82..50c07e046 100644
++--- a/wx/lib/ogl/lines.py
+++++ b/wx/lib/ogl/lines.py
++@@ -1200,7 +1200,7 @@ def OnDraw(self, dc):
++ 
++         points = []
++         for point in self._lineControlPoints:
++-            points.append(wx.Point(point[0], point[1]))
+++            points.append(wx.Point(int(point[0]), int(point[1])))
++ 
++         if self._isSpline:
++             dc.DrawSpline(points)
++diff --git a/wx/lib/ogl/oglmisc.py b/wx/lib/ogl/oglmisc.py
++index 8588a72b7..a8be3fc53 100644
++--- a/wx/lib/ogl/oglmisc.py
+++++ b/wx/lib/ogl/oglmisc.py
++@@ -300,10 +300,10 @@ def DrawFormattedText(dc, text_list, xpos, ypos, width, height, formatMode):
++         yoffset = ypos - height / 2.0
++ 
++     # +1 to allow for rounding errors
++-    dc.SetClippingRegion(xpos - width / 2.0, ypos - height / 2.0, width + 1, height + 1)
+++    dc.SetClippingRegion(int(xpos - width / 2.0), int(ypos - height / 2.0), int(width + 1), int(height + 1))
++ 
++     for line in text_list:
++-        dc.DrawText(line.GetText(), xoffset + line.GetX(), yoffset + line.GetY())
+++        dc.DrawText(line.GetText(), int(xoffset + line.GetX()), int(yoffset + line.GetY()))
++ 
++     dc.DestroyClippingRegion()
++ 
++diff --git a/wx/lib/plot/examples/demo.py b/wx/lib/plot/examples/demo.py
++index 98fbaad3a..02bec1d9f 100644
++--- a/wx/lib/plot/examples/demo.py
+++++ b/wx/lib/plot/examples/demo.py
++@@ -984,7 +984,7 @@ def DrawPointLabel(self, dc, mDataDict):
++ 
++         sx, sy = mDataDict["scaledXY"]  # scaled x,y of closest point
++         # 10by10 square centered on point
++-        dc.DrawRectangle(sx - 5, sy - 5, 10, 10)
+++        dc.DrawRectangle(int(sx - 5), int(sy - 5), 10, 10)
++         px, py = mDataDict["pointXY"]
++         cNum = mDataDict["curveNum"]
++         pntIn = mDataDict["pIndex"]
++@@ -992,7 +992,7 @@ def DrawPointLabel(self, dc, mDataDict):
++         # make a string to display
++         s = "Crv# %i, '%s', Pt. (%.2f,%.2f), PtInd %i" % (
++             cNum, legend, px, py, pntIn)
++-        dc.DrawText(s, sx, sy + 1)
+++        dc.DrawText(s, int(sx), int(sy + 1))
++ 
++ 
++ def run_demo():
++diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py
++index dd3f77d52..abee47efb 100644
++--- a/wx/lib/plot/plotcanvas.py
+++++ b/wx/lib/plot/plotcanvas.py
++@@ -174,24 +174,24 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++ 
++         # Default Pens
++         self._gridPen = wx.Pen(wx.Colour(180, 180, 180, 255),
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_DOT)
++ 
++         self._centerLinePen = wx.Pen(wx.RED,
++-                                     self._pointSize[0],
+++                                     int(self._pointSize[0]),
++                                      wx.PENSTYLE_SHORT_DASH)
++ 
++         self._axesPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++ 
++         self._tickPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++         self._tickLength = tuple(-x * 2 for x in self._pointSize)
++ 
++         self._diagonalPen = wx.Pen(wx.BLUE,
++-                                   self._pointSize[0],
+++                                   int(self._pointSize[0]),
++                                    wx.PENSTYLE_DOT_DASH)
++ 
++     def SetCursor(self, cursor):
++@@ -1925,10 +1925,10 @@ def _Draw(self, graphics, xAxis=None, yAxis=None, dc=None):
++         # set clipping area so drawing does not occur outside axis box
++         ptx, pty, rectWidth, rectHeight = self._point2ClientCoord(p1, p2)
++         # allow graph to overlap axis lines by adding units to w and h
++-        dc.SetClippingRegion(ptx * self._pointSize[0],
++-                             pty * self._pointSize[1],
++-                             rectWidth * self._pointSize[0] + 2,
++-                             rectHeight * self._pointSize[1] + 1)
+++        dc.SetClippingRegion(int(ptx * self._pointSize[0]),
+++                             int(pty * self._pointSize[1]),
+++                             int(rectWidth * self._pointSize[0] + 2),
+++                             int(rectHeight * self._pointSize[1] + 1))
++         # Draw the lines and markers
++ #        start = _time.perf_counter()
++         graphics.draw(dc)
++@@ -2280,7 +2280,7 @@ def _drawLegend(self, dc, graphics, rhsW, topH, legendBoxWH,
++             pnt = ((trhc[0] + legendLHS + legendSymExt[0]
++                     + 5 * self._pointSize[0]),
++                    trhc[1] + s + lineHeight / 2. - legendTextExt[1] / 2)
++-            dc.DrawText(o.getLegend(), pnt[0], pnt[1])
+++            dc.DrawText(o.getLegend(), int(pnt[0]), int(pnt[1]))
++         dc.SetFont(self._getFont(self._fontSizeAxis))  # reset
++ 
++     def _titleLablesWH(self, dc, graphics):
++@@ -2329,7 +2329,7 @@ def _drawRubberBand(self, corner1, corner2):
++         dc.SetPen(wx.Pen(wx.BLACK))
++         dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_TRANSPARENT))
++         dc.SetLogicalFunction(wx.INVERT)
++-        dc.DrawRectangle(ptx, pty, rectWidth, rectHeight)
+++        dc.DrawRectangle(int(ptx), int(pty), int(rectWidth), int(rectHeight))
++         dc.SetLogicalFunction(wx.COPY)
++ 
++     def _getFont(self, size):
++@@ -2423,7 +2423,7 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.gridPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         x, y, width, height = self._point2ClientCoord(p1, p2)
++@@ -2432,13 +2432,13 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++             if self.enableGrid[0]:
++                 for x, _ in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0], pt[1] - height)
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - height))
++ 
++         if self._ySpec != 'none':
++             if self.enableGrid[1]:
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0] + width, pt[1])
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0] + width), int(pt[1]))
++ 
++     @TempStyle('pen')
++     def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2471,7 +2471,7 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.tickPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         # lengthen lines for printing
++@@ -2484,13 +2484,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] - xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - xTickLength)))
++                 dc.DrawLineList(lines)
++             if ticks.top:
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] + xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] + xTickLength)))
++                 dc.DrawLineList(lines)
++ 
++         if self.ySpec != 'none':
++@@ -2498,13 +2498,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] + yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] + yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++             if ticks.right:
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] - yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] - yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++ 
++     @TempStyle('pen')
++@@ -2531,25 +2531,25 @@ def _drawCenterLines(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.centerLinePen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._centerLinesEnabled in ('Horizontal', True):
++             y1 = scale[1] * p1[1] + shift[1]
++             y2 = scale[1] * p2[1] + shift[1]
++             y = (y1 - y2) / 2.0 + y2
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        y,
++-                        scale[0] * p2[0] + shift[0],
++-                        y)
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(y),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(y))
++         if self._centerLinesEnabled in ('Vertical', True):
++             x1 = scale[0] * p1[0] + shift[0]
++             x2 = scale[0] * p2[0] + shift[0]
++             x = (x1 - x2) / 2.0 + x2
++-            dc.DrawLine(x,
++-                        scale[1] * p1[1] + shift[1],
++-                        x,
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(x),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(x),
+++                        int(scale[1] * p2[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawDiagonals(self, dc, p1, p2, scale, shift):
++@@ -2575,19 +2575,19 @@ def _drawDiagonals(self, dc, p1, p2, scale, shift):
++         """
++         pen = self.diagonalPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._diagonalsEnabled in ('Bottomleft-Topright', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]))
++         if self._diagonalsEnabled in ('Bottomright-Topleft', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxes(self, dc, p1, p2, scale, shift):
++@@ -2614,7 +2614,7 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.axesPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         axes = self.enableAxes
++@@ -2623,24 +2623,24 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p1[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p1[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.top:
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p2[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p2[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++         if self.ySpec != 'none':
++             if axes.left:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p1[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p1[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.right:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p2[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p2[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2686,8 +2686,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] + 2 * self._pointSize[1] - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] + 2 * self._pointSize[1] - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2698,8 +2698,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w, h = dc.GetTextExtent(label)
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] - 2 * self._pointSize[1] - h - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] - 2 * self._pointSize[1] - h - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2712,8 +2712,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] - w - 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] - w - 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2725,8 +2725,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] + 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] + 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2785,7 +2785,7 @@ def _drawPlotTitle(self, dc, graphics, lhsW, rhsW, titleWH):
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - titleWH[0] / 2.,
++             self.plotbox_origin[1] - self.plotbox_size[1]
++         )
++-        dc.DrawText(graphics.title, titlePos[0], titlePos[1])
+++        dc.DrawText(graphics.title, int(titlePos[0]), int(titlePos[1]))
++ 
++     def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++                         xLabelWH, yLabelWH):
++@@ -2806,7 +2806,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - xLabelWH[0] / 2.,
++             self.plotbox_origin[1] - xLabelWH[1] - yTickLength
++         )
++-        dc.DrawText(graphics.xLabel, xLabelPos[0], xLabelPos[1])
+++        dc.DrawText(graphics.xLabel, int(xLabelPos[0]), int(xLabelPos[1]))
++         yLabelPos = (
++             self.plotbox_origin[0] - 3 * self._pointSize[0] + xTickLength,
++             self.plotbox_origin[1] - bottomH
++@@ -2814,7 +2814,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++         )
++         if graphics.yLabel:  # bug fix for Linux
++             dc.DrawRotatedText(
++-                graphics.yLabel, yLabelPos[0], yLabelPos[1], 90)
+++                graphics.yLabel, int(yLabelPos[0]), int(yLabelPos[1]), 90)
++ 
++     @TempStyle('pen')
++     def _drawPlotAreaLabels(self, dc, graphics, lhsW, rhsW, titleWH,
++@@ -2942,7 +2942,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++ 
++-            self.sb_hor.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_hor.SetScrollbar(pos, pagesize, int(sbfullrange), pagesize)
++             self._sb_xunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++@@ -2964,7 +2964,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++             pos = (sbfullrange - 1 - pos - pagesize)
++-            self.sb_vert.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_vert.SetScrollbar(int(pos), pagesize, int(sbfullrange), pagesize)
++             self._sb_yunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++diff --git a/wx/lib/plot/polyobjects.py b/wx/lib/plot/polyobjects.py
++index 26a54f8f7..725b0164e 100644
++--- a/wx/lib/plot/polyobjects.py
+++++ b/wx/lib/plot/polyobjects.py
++@@ -417,7 +417,7 @@ def draw(self, dc, printerScale, coord=None):
++ 
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_BUTT)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -518,7 +518,7 @@ def draw(self, dc, printerScale, coord=None):
++         style = self.attributes['style']
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_ROUND)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -590,7 +590,7 @@ def draw(self, dc, printerScale, coord=None):
++         if fillcolour and not isinstance(fillcolour, wx.Colour):
++             fillcolour = wx.Colour(fillcolour)
++ 
++-        dc.SetPen(wx.Pen(colour, width))
+++        dc.SetPen(wx.Pen(colour, int(width)))
++         if fillcolour:
++             dc.SetBrush(wx.Brush(fillcolour, fillstyle))
++         else:
++@@ -618,6 +618,7 @@ def _circle(self, dc, coords, size=1):
++         dc.DrawEllipseList(rect.astype(np.int32))
++ 
++     def _dot(self, dc, coords, size=1):
+++        coords = [(int(c[0]), int(c[1])) for c in coords]
++         dc.DrawPointList(coords)
++ 
++     def _square(self, dc, coords, size=1):
++@@ -699,7 +700,7 @@ def set_pen_and_brush(self, dc, printerScale):
++ 
++         if not isinstance(pencolour, wx.Colour):
++             pencolour = wx.Colour(pencolour)
++-        pen = wx.Pen(pencolour, penwidth, penstyle)
+++        pen = wx.Pen(pencolour, int(penwidth), penstyle)
++         pen.SetCap(wx.CAP_BUTT)
++ 
++         if not isinstance(fillcolour, wx.Colour):
++@@ -790,6 +791,7 @@ def draw(self, dc, printerScale, coord=None):
++                 raise TypeError(err_str.format(type(barwidth)))
++ 
++             rects = [self.calc_rect(x, y, w) for x, y, w in pts]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3])) for r in rects]
++             dc.DrawRectangleList(rects)
++         else:
++             dc.DrawLines(coord)  # draw legend line
++@@ -858,6 +860,8 @@ def draw(self, dc, printerScale, coord=None):
++             rects = [self.calc_rect(y, low, high)
++                      for y, (low, high)
++                      in zip(self.hist, self.bins)]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3]))
+++                     for r in rects]
++ 
++             dc.DrawRectangleList(rects)
++         else:
++@@ -1114,10 +1118,10 @@ def _draw_iqr_box(self, dc, printerScale):
++                                       self.currentShift)
++ 
++         # rectangles are drawn (left, top, width, height) so adjust
++-        iqr_box = [iqr_box[0][0],                   # X (left)
++-                   iqr_box[0][1],                   # Y (top)
++-                   iqr_box[1][0] - iqr_box[0][0],   # Width
++-                   iqr_box[1][1] - iqr_box[0][1]]   # Height
+++        iqr_box = [int(iqr_box[0][0]),                   # X (left)
+++                   int(iqr_box[0][1]),                   # Y (top)
+++                   int(iqr_box[1][0] - iqr_box[0][0]),   # Width
+++                   int(iqr_box[1][1] - iqr_box[0][1])]   # Height
++ 
++         box_pen = wx.Pen(wx.BLACK, 3, wx.PENSTYLE_SOLID)
++         box_brush = wx.Brush(wx.GREEN, wx.BRUSHSTYLE_SOLID)
++@@ -1503,7 +1507,7 @@ def OnPrintPage(self, page):
++         self.graph._setSize(plotAreaW, plotAreaH)
++ 
++         # Set offset and scale
++-        dc.SetDeviceOrigin(pixLeft, pixTop)
+++        dc.SetDeviceOrigin(int(pixLeft), int(pixTop))
++ 
++         # Thicken up pens and increase marker size for printing
++         ratioW = float(plotAreaW) / clientDcSize[0]
++diff --git a/wx/lib/popupctl.py b/wx/lib/popupctl.py
++index 883be5ae5..236501f6d 100644
++--- a/wx/lib/popupctl.py
+++++ b/wx/lib/popupctl.py
++@@ -124,7 +124,7 @@ def Display(self):
++         selfSize = self.GetSize()
++         tcSize = self.ctrl.GetSize()
++ 
++-        pos.x -= (selfSize.width - tcSize.width) / 2
+++        pos.x -= (selfSize.width - tcSize.width) // 2
++         if pos.x + selfSize.width > dSize.width:
++             pos.x = dSize.width - selfSize.width
++         if pos.x < 0:
++diff --git a/wx/lib/scrolledpanel.py b/wx/lib/scrolledpanel.py
++index e4c482af9..1f783ea97 100644
++--- a/wx/lib/scrolledpanel.py
+++++ b/wx/lib/scrolledpanel.py
++@@ -222,4 +222,4 @@ def ScrollChildIntoView(self, child):
++         # if we need to adjust
++         if new_vs_x != -1 or new_vs_y != -1:
++             #print("%s: (%s, %s)" % (self.GetName(), new_vs_x, new_vs_y))
++-            self.Scroll(new_vs_x, new_vs_y)
+++            self.Scroll(int(new_vs_x), int(new_vs_y))
++diff --git a/wx/lib/throbber.py b/wx/lib/throbber.py
++index 9954d6b27..ee8c51209 100644
++--- a/wx/lib/throbber.py
+++++ b/wx/lib/throbber.py
++@@ -200,11 +200,11 @@ def Draw(self, dc):
++         """
++         dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True)
++         if self.overlay and self.showOverlay:
++-            dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True)
+++            dc.DrawBitmap(self.overlay, int(self.overlayX), int(self.overlayY), True)
++         if self.label and self.showLabel:
++-            dc.DrawText(self.label, self.labelX, self.labelY)
+++            dc.DrawText(self.label, int(self.labelX), int(self.labelY))
++             dc.SetTextForeground(wx.WHITE)
++-            dc.DrawText(self.label, self.labelX-1, self.labelY-1)
+++            dc.DrawText(self.label, int(self.labelX-1), int(self.labelY-1))
++ 
++ 
++     def OnPaint(self, event):
++diff --git a/wx/lib/ticker.py b/wx/lib/ticker.py
++index 04abf0d44..4e684b4cd 100644
++--- a/wx/lib/ticker.py
+++++ b/wx/lib/ticker.py
++@@ -86,7 +86,7 @@ def Stop(self):
++     def Start(self):
++         """Starts the text moving"""
++         if not self.timer.IsRunning():
++-            self.timer.Start(1000 / self._fps)
+++            self.timer.Start(1000 // self._fps)
++ 
++ 
++     def IsTicking(self):
++@@ -208,7 +208,7 @@ def DrawText(self, dc):
++             offx = self._offset - self._extent[0]
++         else:
++             offx = self.GetSize()[0] - self._offset
++-        offy = (self.GetSize()[1] - self._extent[1]) / 2 #centered vertically
+++        offy = (self.GetSize()[1] - self._extent[1]) // 2 #centered vertically
++         dc.DrawText(self._text, offx, offy)
++ 
++ 
+
diff --git a/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
new file mode 100644
index 000000000000..88c3ca189647
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
@@ -0,0 +1,57 @@
+From 1d5fd72dff63d62dd19b77e489d4115245d4d453 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 28 2021 02:58:12 +0000
+Subject: Fix more Python 3.10 issues with AGW FlatNotebook (#2035790)
+
+
+---
+
+diff --git a/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+new file mode 100644
+index 0000000..e8b74ac
+--- /dev/null
++++ b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+@@ -0,0 +1,43 @@
++From aa3dca0e40bd0701e82ce40297a982b5b84844dc Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Mon, 27 Dec 2021 19:48:55 -0500
++Subject: [PATCH] Fix additional Python 3.10 issues with AGW FlatNotebook
++
++---
++ wx/lib/agw/flatnotebook.py | 14 +++++++-------
++ 1 file changed, 7 insertions(+), 7 deletions(-)
++
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index d33f71d51..61bc4efb3 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -925,14 +925,14 @@ def DrawButton(dc, rect, focus, upperTabs):
++ 
++     if focus:
++         if upperTabs:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*8)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*8)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*8))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*8))
++         else:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*5)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*5)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*5))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*5))
++     else:
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 2)))
+++        rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 2)))
++ 
++     # Define the top region
++     top = wx.Rect(rect.GetTopLeft(), rightPt)
++@@ -2766,7 +2766,7 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         if pageTextColour is not None:
++             dc.SetTextForeground(pageTextColour)
++ 
++-        dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset, imageYCoord)
+++        dc.DrawText(pc.GetPageText(tabIdx), int(posx + textOffset), imageYCoord)
++ 
++         # draw 'x' on tab (if enabled)
++         if pc.HasAGWFlag(FNB_X_ON_TAB) and tabIdx == pc.GetSelection():
diff --git a/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
new file mode 100644
index 000000000000..6f21ecb7a718
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
@@ -0,0 +1,52 @@
+Backport https://github.com/wxWidgets/Phoenix/pull/1849
+Regarding segfault as in https://github.com/OSGeo/grass/issues/1123
+
+From 5cace47aaece3cc4f2e6ea97d7fd5bb8ed316ac9 Mon Sep 17 00:00:00 2001
+From: Robin Dunn <robin@alldunn.com>
+Date: Wed, 18 Nov 2020 10:52:53 -0800
+Subject: [PATCH] Restore GIL acquisition in wxPseudoDC::FindObjects*
+
+---
+ src/pseudodc.cpp | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/pseudodc.cpp b/src/pseudodc.cpp
+index 5890ed7e2..ed4bcd06a 100644
+--- a/src/pseudodc.cpp
++++ b/src/pseudodc.cpp
+@@ -483,7 +483,7 @@ bool wxPseudoDC::GetIdGreyedOut(int id)
+ // ----------------------------------------------------------------------------
+ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -501,7 +501,6 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+         }
+         pt = pt->GetNext();
+     }
+-    //wxPyEndBlockThreads(blocked);
+     return pyList;
+ }
+ 
+@@ -511,7 +510,7 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+                                   wxCoord radius, const wxColor& bg)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -611,8 +610,7 @@ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+         maskdc.SelectObject(wxNullBitmap);
+         memdc.SelectObject(wxNullBitmap);
+     }
+-    //wxPyEndBlockThreads(blocked);
+-    return pyList;
++     return pyList;
+ }
+ 
+ // ----------------------------------------------------------------------------
diff --git a/srcpkgs/wxPython4/template b/srcpkgs/wxPython4/template
index 554174105a36..afea1b55bf90 100644
--- a/srcpkgs/wxPython4/template
+++ b/srcpkgs/wxPython4/template
@@ -1,7 +1,7 @@
 # Template file for 'wxPython4'
 pkgname=wxPython4
 version=4.0.7
-revision=4
+revision=5
 wrksrc="wxPython-${version}"
 build_style=python3-module
 make_build_args="--skip-build"
@@ -10,6 +10,7 @@ hostmakedepends="pkg-config python3-setuptools python3-pathlib2"
 makedepends="python3-devel wxWidgets-gtk3-devel SDL2-devel webkit2gtk-devel
  gst-plugins-base1-devel"
 depends="python3 python3-six python3-numpy python3-Pillow"
+checkdepends="python3-six python3-numpy python3-Pillow"
 short_desc="WxWidgets GUI toolkit library (Python3 Bindings)"
 maintainer="Jasper Chan <jasperchan515@gmail.com>"
 license="custom:wxWindows"

From 416ebf020dd126b08ff2a570505ee0ff932172f6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 21:56:03 +0100
Subject: [PATCH 09/16] grass: update to 7.8.7RC1; rebuild against libgdal and
 proj

Version 7.8.7RC1 includes a workaround for a wxPython issue
https://github.com/OSGeo/grass/issues/1971#issuecomment-993622613
---
 srcpkgs/grass/patches/musl-build-fix.patch |  13 +++
 srcpkgs/grass/template                     | 128 +++++++++++++++++----
 2 files changed, 120 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..364ee30be4d9
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,13 @@
+error: unknown type name 'int64_t' patch for musl
+
+diff --git a/include/gis.h b/include/gis.h
+--- a/include/gis.h
++++ b/include/gis.h
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ 
+ 
+ /* Grass and local include files */
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..167faa401385 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,116 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.7RC1
+revision=1
+_binversion=${version//./}
+_binversion=${_binversion:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=/usr/lib
+ --bindir=/usr/bin
+ --libdir=/usr/lib
+ --libexec=/usr/libexec
+ --enable-largefile
+ --with-blas
+ --with-blas-includes=/usr/include
+ --with-bzip2
+ --with-bzlib
+ --with-cairo
+ --with-cxx
+ --with-freetype
+ --with-freetype-includes=/usr/include/freetype2
+ --with-gdal
+ --with-geos
+ --with-glw
+ --with-lapack
+ --with-lapack-includes=/usr/include
+ --with-mysql
+ --with-mysql-includes=/usr/include/mysql
+ --with-netcdf=/usr/bin/nc-config
+ --with-nls
+ --with-openmp
+ --with-postgres
+ --with-postgres-includes=/usr/include/postgresql
+ --with-postgres-libs=/usr/lib/psql14/lib/postgresql
+ --with-proj
+ --with-proj-share=/usr/share
+ --with-pthread
+ --with-python=/usr/bin/python3-config
+ --with-readline
+ --with-regex
+ --with-sqlite
+ --with-wxwidgets"
+hostmakedepends="flex
+ gettext
+ libgdal-tools
+ pkg-config
+ python3-numpy
+ python3-six
+ tar"
+makedepends="bison
+ blas-devel
+ bzip2-devel
+ cairo-devel
+ fftw-devel
+ freetype-devel
+ geos-devel
+ gettext-devel
+ glu-devel
+ lapack-devel
+ libgdal-devel
+ libgomp-devel
+ libmysqlclient-devel
+ libpng-devel
+ libzstd-devel
+ netcdf-devel
+ postgresql-libs-devel
+ proj-devel
+ python3-devel
+ python3-Pillow
+ python3-six
+ readline-devel
+ sqlite-devel
+ tiff-devel
+ zlib-devel"
+depends="libgdal python3-numpy wxPython4"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=fa1d6ccc1fde4cbea0be095256729421c41c1a12bf621fe124d0d2c8e826de6a
 nocross="tries to execute target binaries"
 
+shlib_provides="
+ libgrass_dbmibase.${version%.*}.so
+ libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so
+ libgrass_gproj.${version%.*}.so
+ libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so
+ libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass78 \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binversion}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binversion}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binversion}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binversion}.sh
+
+	vinstall grass.pc 644 usr/share/pkgconfig
+	vinstall gui/icons/grass.desktop 644 usr/share/applications
+
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

From 2bb5e49a0b8d54e8bc7211b6f60142ec2513f3d9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 10/16] merkaartor: rebuild against libgdal-3.4.1 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From ad245303d53921af7bc2eda0a4f280e0be6e8294 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 11/16] OpenOrienteering-Mapper: rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From 516fc3a0ea236b2c50a64e0f3dfd8506bf4f2dd2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 12/16] osg: rebuild against libgdal-3.4.1, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From d7f1a38b1833167e70edf1171c0e86f8628fd7d6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 13/16] sumo: update to 1.9.2; rebuild against libgdal-3.4.1
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 common/shlibs         |  2 ++
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 62b573986051..ae4de3bd14b6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4127,3 +4127,5 @@ libgrass_dbmibase.7.8.so grass-7.8.5_1
 libgrass_imagery.7.8.so grass-7.8.5_1
 libkmlconvenience.so.1 libkml-1.3.0_1
 mod_spatialite.so.7 libspatialite-5.0.0_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index e760fdd45aee..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=4
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From aa100336b28ef3d7dae6937333a71020847b1bda Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 14/16] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 98ec8e636a2efda9132ff84ce9cc17a93018bf5e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 15/16] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 13c821f46812906a33eb1883a97a2a98db3cdf19 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 16/16] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (30 preceding siblings ...)
  2022-02-15  0:35 ` ar-jan
@ 2022-02-15  0:58 ` ar-jan
  2022-02-15 21:57 ` [PR PATCH] [Updated] " ar-jan
                   ` (25 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-15  0:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1586 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1039736240

Comment:
The grass package held things back six months ago, otherwise everything looked good.

I've given it another try, but it doesn't look hopeful: Python 3.10 + wxPython < 4.1 just doesn't seem to work. I've used grass-7.8.7RC1, which contains a workaround for a [wxPython issue](https://github.com/OSGeo/grass/issues/1971) as well as fixes related to Python 3.10.
I've also backported patches from wxPython 4.1 to 4.0.7 (following Fedora [here](https://src.fedoraproject.org/rpms/python-wxpython4/c/f5471fb86aaae46a686b85c654fcbb98516355e6?branch=rawhide), [here](https://src.fedoraproject.org/rpms/python-wxpython4/c/f55a17c2d3b336c82fb44f7816ec63219847f4cc?branch=rawhide), and [here](https://src.fedoraproject.org/rpms/python-wxpython4/c/1d5fd72dff63d62dd19b77e489d4115245d4d453?branch=rawhide))

With these changes the grass gui still doesn't work, and it looks like it is simply [not feasible with wxPython 4.0](https://github.com/OSGeo/grass/issues/2019). I've included the grass and wxPython4 commits hoping someone can sanity-check this.

If there's no progress with grass, I propose to either:

1. Include 7.8.7RC1 as is: the --text mode is functional (I think, I rarely use grass), and since the curently packaged grass gui doesn't work either it's not a regression afaict.
2. Remove the grass package.

In both cases the wxPython4 update can be left out -- unless these Python 3.10-related patches are helpful in other places?

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (31 preceding siblings ...)
  2022-02-15  0:58 ` ar-jan
@ 2022-02-15 21:57 ` ar-jan
  2022-02-15 22:02 ` ar-jan
                   ` (24 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-15 21:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 208910 bytes --]

From cbbcc5ddb0466c3d823494210358e6b0383a5155 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/17] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 0c60260b4642..b0fcfd04926e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From fabcd963a71ec2a7b65dc1013801fa8364b85ad9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Feb 2022 14:44:54 +0100
Subject: [PATCH 02/17] New package: librttopo-1.1.0

The RT Topology Library exposes an API to create and manage standard
(ISO 13249 aka SQL/MM) topologies using user-provided data stores.

It is needed to build libspatialite (as of v5.0.1) with tests passing.
---
 common/shlibs              |  1 +
 srcpkgs/librttopo-devel    |  1 +
 srcpkgs/librttopo/template | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 120000 srcpkgs/librttopo-devel
 create mode 100644 srcpkgs/librttopo/template

diff --git a/common/shlibs b/common/shlibs
index b0fcfd04926e..734c16281f0e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4110,3 +4110,4 @@ libawt_xawt.so openjdk17-jre-17.0.1+12_1
 libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
+librttopo.so.1 librttopo-1.1.0_1
diff --git a/srcpkgs/librttopo-devel b/srcpkgs/librttopo-devel
new file mode 120000
index 000000000000..acf3607f5fec
--- /dev/null
+++ b/srcpkgs/librttopo-devel
@@ -0,0 +1 @@
+librttopo
\ No newline at end of file
diff --git a/srcpkgs/librttopo/template b/srcpkgs/librttopo/template
new file mode 100644
index 000000000000..aa51bb45f185
--- /dev/null
+++ b/srcpkgs/librttopo/template
@@ -0,0 +1,29 @@
+# Template file for 'librttopo'
+pkgname=librttopo
+version=1.1.0
+revision=1
+wrksrc="${pkgname}"
+build_style=gnu-configure
+hostmakedepends="base-devel autoconf-archive"
+makedepends="base-devel autoconf-archive geos-devel"
+short_desc="RT Topology Library exposes an API for managing standard topologies"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://git.osgeo.org/gitea/rttopo/librttopo"
+distfiles="https://git.osgeo.org/gitea/rttopo/librttopo/archive/librttopo-${version}.tar.gz"
+checksum="2e2fcabb48193a712a6c76ac9a9be2a53f82e32f91a2bc834d9f1b4fa9cd879f"
+
+pre_configure() {
+    autoreconf -if
+}
+
+librttopo-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+		vmove usr/lib/pkgconfig
+	}
+}

From 36a68990161c861e695a87db17e0655a57310978 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/17] New package: libkml-1.3.0

---
 common/shlibs                          |  6 ++++++
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 ++++++++++++++++
 srcpkgs/libkml/template                | 27 ++++++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/common/shlibs b/common/shlibs
index 734c16281f0e..7cf876600089 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4111,3 +4111,9 @@ libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
 librttopo.so.1 librttopo-1.1.0_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libkmlconvenience.so.1 libkml-1.3.0_1
diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..b67eece4d8ba
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,27 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="boost-devel
+ expat-devel
+ minizip-devel
+ uriparser-devel
+ zlib-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From f3f538ec09e224a3945bae2a984199b4896a0a28 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 04/17] libgdal: update to 3.4.1 and rebuild against proj-7.2.1

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 105 ++++++++++++++++--
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 95 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 7cf876600089..5a76dc9ee9e0 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2510,7 +2510,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..5fca579954fa 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,100 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.1
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libspatialite-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ libkml-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=e360387bc25ec24940f46afbeada48002d72c74aaf9eccf2a40e8d74e711a2e4
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +116,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 859483d4759bfe24fd0ddea6176d97ef22cb8814 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 05/17] postgis: update to 3.1.5; rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..f52cd6657988 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.1.5
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 4b4e12ed3800544bacf7cad7dd8c70dba46bb689 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 06/17] postgis-postgresql13: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..a0f5c89ef4da 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
-revision=2
+version=3.1.5
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 13ed6d0194a3b18a7b98b4fa8f1447a66e74c89c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 07/17] postgis-postgresql14: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..ad8d0c5c4253 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.1.5
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From b29c97c5a9b83f42c2ca145263acac782e847ddc Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 9 Aug 2021 19:53:17 +0200
Subject: [PATCH 08/17] wxPython4: backport patches, and fix tests

Backported patches:
- wxPseudoDC GIL
- Python 3.10 AGW FlatNotebook patch
- Python 3.10 ScrolledWindow argument types
- Python 3.10 Integer division
- wx.WindowID and wx.Region arguments
---
 .../patches/0002-Python-3.10-issues.patch     | 3317 +++++++++++++++++
 .../0003-Python-3.10-AGW-FlatNotebook.patch   |   57 +
 .../patches/restore-gil-pseudodc.patch        |   52 +
 srcpkgs/wxPython4/template                    |    3 +-
 4 files changed, 3428 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
 create mode 100644 srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
 create mode 100644 srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch

diff --git a/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
new file mode 100644
index 000000000000..6c87ff967d01
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
@@ -0,0 +1,3317 @@
+From f55a17c2d3b336c82fb44f7816ec63219847f4cc Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 22 2021 20:23:54 +0000
+Subject: Fix a bunch of Python 3.10 issues
+
+
+---
+
+diff --git a/0d449626d6d298ad96ebd1d514d0e42833bce470.patch b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+new file mode 100644
+index 0000000..d2ccddc
+--- /dev/null
++++ b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+@@ -0,0 +1,22 @@
++From 0d449626d6d298ad96ebd1d514d0e42833bce470 Mon Sep 17 00:00:00 2001
++From: Carolina Feher da Silva <carolfsu@gmail.com>
++Date: Tue, 16 Nov 2021 01:24:31 +0000
++Subject: [PATCH] Fixed integer division in Python 3
++
++---
++ wx/lib/stattext.py | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/wx/lib/stattext.py b/wx/lib/stattext.py
++index 2cfb6e65a..e606e5a89 100644
++--- a/wx/lib/stattext.py
+++++ b/wx/lib/stattext.py
++@@ -302,7 +302,7 @@ def OnPaint(self, event):
++             if style & wx.ALIGN_RIGHT:
++                 x = width - w
++             if style & wx.ALIGN_CENTER:
++-                x = (width - w)/2
+++                x = (width - w)//2
++             dc.DrawText(line, x, y)
++             y += h
++ 
+diff --git a/3eb9eb32dc3285435039f6c420c398665372a1ad.patch b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+new file mode 100644
+index 0000000..08e58a0
+--- /dev/null
++++ b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+@@ -0,0 +1,84 @@
++From 3eb9eb32dc3285435039f6c420c398665372a1ad Mon Sep 17 00:00:00 2001
++From: Glen Whitney <glen@studioinfinity.org>
++Date: Tue, 31 Aug 2021 11:06:27 -0700
++Subject: [PATCH] fix: Correct types of arguments to
++ ScrolledWindow.SetScrollbars
++
++---
++ demo/Mask.py                   |  2 +-
++ demo/OGL.py                    |  2 +-
++ wx/lib/agw/ultimatelistctrl.py | 14 +++++++-------
++ 3 files changed, 9 insertions(+), 9 deletions(-)
++
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 5f0c2cdde..109b8f30b 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -56,7 +56,7 @@ def __init__(self, parent):
++         mask = wx.Mask(self.bmp_withcolourmask, wx.WHITE)
++         self.bmp_withcolourmask.SetMask(mask)
++ 
++-        self.SetScrollbars(20, 20, 700/20, 460/20)
+++        self.SetScrollbars(20, 20, 700//20, 460//20)
++ 
++         self.Bind(wx.EVT_PAINT, self.OnPaint)
++ 
++diff --git a/demo/OGL.py b/demo/OGL.py
++index 72ca543dd..d475e5011 100644
++--- a/demo/OGL.py
+++++ b/demo/OGL.py
++@@ -272,7 +272,7 @@ def __init__(self, parent, log, frame):
++ 
++         maxWidth  = 1000
++         maxHeight = 1000
++-        self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
+++        self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
++ 
++         self.log = log
++         self.frame = frame
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index c60867684..14fc41f86 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -9654,8 +9654,8 @@ def RecalculatePositions(self, noRefresh=False):
++                 self._linesPerPage = clientHeight//lineHeight
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + lineHeight - 1)/lineHeight,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + lineHeight - 1)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9676,8 +9676,8 @@ def RecalculatePositions(self, noRefresh=False):
++                     decrement = SCROLL_UNIT_X
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + SCROLL_UNIT_Y - 1)/SCROLL_UNIT_Y,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + SCROLL_UNIT_Y - 1)//SCROLL_UNIT_Y,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9728,8 +9728,8 @@ def RecalculatePositions(self, noRefresh=False):
++                         line._gi.ExtendWidth(widthMax)
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (x + SCROLL_UNIT_X)/SCROLL_UNIT_X,
++-                                   (y + lineHeight)/lineHeight,
+++                                   (x + SCROLL_UNIT_X)//SCROLL_UNIT_X,
+++                                   (y + lineHeight)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9797,7 +9797,7 @@ def RecalculatePositions(self, noRefresh=False):
++                             break  # Everything fits, no second try required.
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (entireWidth + SCROLL_UNIT_X)/SCROLL_UNIT_X,
+++                                   (entireWidth + SCROLL_UNIT_X)//SCROLL_UNIT_X,
++                                    0,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    0,
+diff --git a/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+new file mode 100644
+index 0000000..f0b9f5d
+--- /dev/null
++++ b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+@@ -0,0 +1,143 @@
++From 9096426603272672d9a676e8bcdcadf0a1cfa1a2 Mon Sep 17 00:00:00 2001
++From: Robin Dunn <robin@alldunn.com>
++Date: Wed, 26 Feb 2020 11:10:27 -0800
++Subject: [PATCH] Add __index__ to wx.WindowID, and __bool__ to wx.Region
++
++---
++ etg/region.py              |  5 +++--
++ etg/windowid.py            | 32 +++++++++++++++++---------------
++ unittests/test_windowid.py | 23 +++++++++++++++++++++--
++ 3 files changed, 41 insertions(+), 19 deletions(-)
++
++diff --git a/etg/region.py b/etg/region.py
++index 0982c1fe5..d5bc45759 100644
++--- a/etg/region.py
+++++ b/etg/region.py
++@@ -88,11 +88,12 @@ def next(self):
++     c.mustHaveApp()
++     c.find('operator++').ignore()
++ 
++-    # SIP maps operator bool() to __int__, but Classic used __nonzero__. Does
++-    # it make any difference either way?
++     c.find('operator bool').ignore()
++     c.addCppMethod('int', '__nonzero__', '()', 'return (int)self->operator bool();',
++                    'Returns true while there are still rectangles available in the iteration.')
+++    c.addCppMethod('int', '__bool__', '()', 'return (int)self->operator bool();',
+++                   'Returns true while there are still rectangles available in the iteration.')
+++
++ 
++     c.addCppMethod('void', 'Next', '()', 'self->operator++();',
++                    'Move the iterator to the next rectangle in the region.')
++diff --git a/etg/windowid.py b/etg/windowid.py
++index 27b041b3d..da2ed395e 100644
++--- a/etg/windowid.py
+++++ b/etg/windowid.py
++@@ -53,12 +53,12 @@ def run():
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Create reference from an ID',
++                     items=[ ParamDef(type='int', name='id') ]),
++-                
+++
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Copy an ID reference',
++                     items=[ ParamDef(type='const wxWindowIDRef&', name='idref') ]),
++                 ]),
++-            
+++
++             MethodDef(name='~wxWindowIDRef', className='wxWindowIDRef', isDtor=True),
++ 
++             MethodDef(type='int', name='GetValue',
++@@ -73,11 +73,13 @@ def run():
++             """)
++ 
++     klass.addCppMethod('int', '__int__', '()',
++-        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or etc.",
++-        body="""\
++-            return self->GetValue();
++-            """)
++-    
+++        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or other places an integer type is needed.",
+++        body="return self->GetValue();")
+++    klass.addCppMethod('int', '__index__', '()',
+++        doc="See :meth:`__int__`",
+++        body="return self->GetValue();")
+++
+++
++     klass.addCppMethod('bool', '__eq__', '(wxWindowID id)', "return self->GetValue() == id;")
++     klass.addCppMethod('bool', '__ne__', '(wxWindowID id)', "return self->GetValue() != id;")
++     klass.addCppMethod('bool', '__lt__', '(wxWindowID id)', "return self->GetValue() < id;")
++@@ -92,17 +94,17 @@ def run():
++     # and finish it up by adding it to the module
++     module.addItem(klass)
++ 
++-    # Now, let's add a new Python function to the global scope that reserves an 
++-    # ID (or range) and returns a ref object for it. 
++-    module.addPyFunction('NewIdRef', '(count=1)', 
+++    # Now, let's add a new Python function to the global scope that reserves an
+++    # ID (or range) and returns a ref object for it.
+++    module.addPyFunction('NewIdRef', '(count=1)',
++         doc="""\
++-            Reserves a new Window ID (or range of WindowIDs) and returns a 
++-            :class:`wx.WindowIDRef` object (or list of them) that will help 
+++            Reserves a new Window ID (or range of WindowIDs) and returns a
+++            :class:`wx.WindowIDRef` object (or list of them) that will help
++             manage the reservation of that ID.
++ 
++-            This function is intended to be a drop-in replacement of the old 
++-            and deprecated :func:`wx.NewId` function, with the added benefit 
++-            that the ID should never conflict with an in-use ID or other IDs 
+++            This function is intended to be a drop-in replacement of the old
+++            and deprecated :func:`wx.NewId` function, with the added benefit
+++            that the ID should never conflict with an in-use ID or other IDs
++             generated by this function.
++             """,
++         body="""\
++diff --git a/unittests/test_windowid.py b/unittests/test_windowid.py
++index 4593e5a69..fc36c9eb8 100644
++--- a/unittests/test_windowid.py
+++++ b/unittests/test_windowid.py
++@@ -31,9 +31,9 @@ def test_newIdRef02(self):
++     def test_newIdRef03(self):
++         """Check that Auto ID Management is enabled (--enable-autoidman)"""
++         # This test is expected to fail if autoID mangagement is turned on
++-        # because a reference to the ID is not being saved, so it will be 
+++        # because a reference to the ID is not being saved, so it will be
++         # unreserved when the first widget is destroyed.
++-        
+++
++         id = wx.Window.NewControlId()
++         b = wx.Button(self.frame, id, 'button')
++         b.Destroy()
++@@ -75,6 +75,7 @@ def test_WindowIDRef01(self):
++         val = ref1 <= ref2
++         assert type(val) == bool
++ 
+++
++     def test_WindowIDRef02(self):
++         d = {wx.NewIdRef(): 'one',
++              wx.NewIdRef(): 'two'}
++@@ -82,6 +83,24 @@ def test_WindowIDRef02(self):
++         for k in keys:
++             val = d[k]
++ 
+++
+++    def test_WindowIDRef03(self):
+++        # Ensure wx.WindowIDRef can be converted to int without warning when
+++        # making a call to warrped method. In Py3.8+ this means there needs to
+++        # be an __index__ method.
+++
+++        # Turn warnings into exceptions so this test will fail if there is
+++        # a warning
+++        import warnings
+++        warnings.simplefilter('error')
+++
+++        wid = wx.NewIdRef()
+++        assert isinstance(wid, wx.WindowIDRef)
+++
+++        b = wx.Button(self.frame, wid, 'button')
+++        assert b.GetId() == wid.GetId()
+++
+++
++ #---------------------------------------------------------------------------
++ 
++ 
+ 
+diff --git a/python3.10-fixes.patch b/python3.10-fixes.patch
+new file mode 100644
+index 0000000..29e8c61
+--- /dev/null
++++ b/python3.10-fixes.patch
+@@ -0,0 +1,3034 @@
++From 173d0796810bb65de9bdfdc6941d24a04628f6c2 Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Wed, 1 Dec 2021 14:19:00 -0500
++Subject: [PATCH] Fix a bunch of Python 3.10 issues with pure-Python classes
++ and demos
++
++In Python 3.10, a change[1] was implemented where extension functions
++that take integer arguments will no longer silently accept non-integer
++arguments (e.g., floats) that can only be converted to integers with a
++loss of precision.  This PR fixes most of these issues in the pure-Python
++classes and demos by explicitly converting the parameters to int before
++passing them to wxWidgets.  There is loss of precision, but this was
++happening before (automatically) anyway as most wxWidgets DeviceContext
++functions operate using integers.
++
++Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
++too small on GTK3.
++
++This is an example of the relevant exception:
++Traceback (most recent call last):
++  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
++    r.width = w
++TypeError: 'float' object cannot be interpreted as an integer
++
++Fixes #2038.
++
++[1] https://bugs.python.org/issue37999
++---
++ demo/GridLabelRenderer.py               |   4 +-
++ demo/Mask.py                            |   4 +-
++ demo/Overlay.py                         |   1 -
++ demo/PenAndBrushStyles.py               |   2 +-
++ demo/PopupWindow.py                     |   2 +-
++ demo/PrintFramework.py                  |   2 +-
++ demo/PropertyGrid.py                    |   2 +-
++ demo/Sizers.py                          |   2 +-
++ demo/UIActionSimulator.py               |   2 +-
++ demo/agw/AUI.py                         |  32 +++----
++ demo/agw/MacLargeDemo.py                |   4 +-
++ demo/agw/PeakMeter.py                   |   6 +-
++ demo/agw/PersistentControls.py          |   2 +-
++ demo/agw/RibbonBar.py                   |   2 +-
++ demo/agw/SpeedMeter.py                  |   2 +-
++ demo/agw/SuperToolTip.py                |   3 +-
++ demo/agw/ThumbDemoConfig.py             |   1 +
++ demo/agw/UltimateReportDemo.py          |   8 +-
++ demo/agw/Windows7Explorer_Contents.py   |  16 ++--
++ demo/agw/ZoomBar.py                     |   2 +-
++ wx/lib/agw/advancedsplash.py            |   2 +-
++ wx/lib/agw/aui/aui_utilities.py         |   4 +-
++ wx/lib/agw/aui/auibook.py               |   4 +-
++ wx/lib/agw/balloontip.py                |   4 +-
++ wx/lib/agw/flatmenu.py                  |  62 ++++++-------
++ wx/lib/agw/flatnotebook.py              |  10 +--
++ wx/lib/agw/floatspin.py                 |   2 +-
++ wx/lib/agw/gradientbutton.py            |   8 +-
++ wx/lib/agw/hypertreelist.py             |   2 +-
++ wx/lib/agw/knobctrl.py                  |  12 +--
++ wx/lib/agw/labelbook.py                 |  32 +++----
++ wx/lib/agw/peakmeter.py                 |   2 +-
++ wx/lib/agw/pygauge.py                   |   4 +-
++ wx/lib/agw/ribbon/art_aui.py            |  22 ++---
++ wx/lib/agw/ribbon/art_internal.py       |  12 +--
++ wx/lib/agw/ribbon/art_msw.py            |  88 +++++++++----------
++ wx/lib/agw/ribbon/bar.py                |   4 +-
++ wx/lib/agw/ribbon/buttonbar.py          |   6 +-
++ wx/lib/agw/ribbon/gallery.py            |   8 +-
++ wx/lib/agw/ribbon/panel.py              |  16 ++--
++ wx/lib/agw/ribbon/toolbar.py            |   2 +-
++ wx/lib/agw/scrolledthumbnail.py         |  24 +++---
++ wx/lib/agw/shapedbutton.py              |  10 +--
++ wx/lib/agw/speedmeter.py                |  72 +++++++++-------
++ wx/lib/agw/supertooltip.py              |  20 ++---
++ wx/lib/agw/toasterbox.py                |   4 +-
++ wx/lib/agw/ultimatelistctrl.py          |  20 ++---
++ wx/lib/agw/xlsgrid.py                   |   4 +-
++ wx/lib/agw/zoombar.py                   |  10 +--
++ wx/lib/analogclock/analogclock.py       |   2 +-
++ wx/lib/analogclock/helpers.py           |  22 ++---
++ wx/lib/analogclock/setup.py             |   6 +-
++ wx/lib/buttons.py                       |  10 +--
++ wx/lib/colourchooser/pycolourchooser.py |   4 +-
++ wx/lib/colourchooser/pypalette.py       |   2 +-
++ wx/lib/floatcanvas/FCObjects.py         |   8 +-
++ wx/lib/gizmos/ledctrl.py                |   8 +-
++ wx/lib/imagebrowser.py                  |   4 +-
++ wx/lib/ogl/basic.py                     |  10 +--
++ wx/lib/ogl/bmpshape.py                  |   2 +-
++ wx/lib/ogl/composit.py                  |   4 +-
++ wx/lib/ogl/divided.py                   |   2 +-
++ wx/lib/ogl/lines.py                     |   2 +-
++ wx/lib/ogl/oglmisc.py                   |   4 +-
++ wx/lib/plot/examples/demo.py            |   4 +-
++ wx/lib/plot/plotcanvas.py               | 110 ++++++++++++------------
++ wx/lib/plot/polyobjects.py              |  22 +++--
++ wx/lib/popupctl.py                      |   2 +-
++ wx/lib/scrolledpanel.py                 |   2 +-
++ wx/lib/throbber.py                      |   6 +-
++ wx/lib/ticker.py                        |   4 +-
++ 71 files changed, 411 insertions(+), 398 deletions(-)
++
++diff --git a/demo/GridLabelRenderer.py b/demo/GridLabelRenderer.py
++index 794dd64e8..1440ef41b 100644
++--- a/demo/GridLabelRenderer.py
+++++ b/demo/GridLabelRenderer.py
++@@ -46,8 +46,8 @@ def __init__(self):
++         self._bmp = images.Smiles.GetBitmap()
++ 
++     def Draw(self, grid, dc, rect, rc):
++-        x = rect.left + (rect.width - self._bmp.GetWidth()) / 2
++-        y = rect.top + (rect.height - self._bmp.GetHeight()) / 2
+++        x = rect.left + (rect.width - self._bmp.GetWidth()) // 2
+++        y = rect.top + (rect.height - self._bmp.GetHeight()) // 2
++         dc.DrawBitmap(self._bmp, x, y, True)
++ 
++ 
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 109b8f30b..e924f95b9 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -90,9 +90,9 @@ def OnPaint (self, e):
++ 
++         for text, code in logicList:
++             x,y = 120+150*(i%4), 20+100*(i/4)
++-            dc.DrawText(text, x, y-20)
+++            dc.DrawText(text, x, int(y-20))
++             mdc.SelectObject(self.bmp_withcolourmask)
++-            dc.Blit(x,y, cx,cy, mdc, 0,0, code, True)
+++            dc.Blit(x,int(y), cx,cy, mdc, 0,0, code, True)
++             i = i + 1
++ 
++ 
++diff --git a/demo/Overlay.py b/demo/Overlay.py
++index 65164cd84..fa65be003 100644
++--- a/demo/Overlay.py
+++++ b/demo/Overlay.py
++@@ -56,7 +56,6 @@ def __init__(self, parent, log):
++         self.penstylesCombo.SetToolTip('Pen Style')
++ 
++         self.overlayPenWidth = wx.SpinCtrl(self, -1, value='',
++-                                           size=(75, -1),
++                                            style=wx.SP_ARROW_KEYS,
++                                            min=1, max=24, initial=1)
++         self.overlayPenWidth.SetToolTip('Pen Width')
++diff --git a/demo/PenAndBrushStyles.py b/demo/PenAndBrushStyles.py
++index 24040b1fc..1183f684a 100644
++--- a/demo/PenAndBrushStyles.py
+++++ b/demo/PenAndBrushStyles.py
++@@ -100,7 +100,7 @@ def OnPaint(self, event):
++ 
++         dc.SetPen(pen)
++         y = labelHeight + (height - labelHeight)/2
++-        dc.DrawLine(5, y, width-5, y)
+++        dc.DrawLine(5, int(y), width-5, int(y))
++ 
++ 
++ class BrushPanel(BasePanel):
++diff --git a/demo/PopupWindow.py b/demo/PopupWindow.py
++index d8e175576..b54b9870d 100644
++--- a/demo/PopupWindow.py
+++++ b/demo/PopupWindow.py
++@@ -89,7 +89,7 @@ def __init__(self, parent, style, log):
++                           "(or its first child) loses focus in \n"
++                           "any other way.")
++         btn = wx.Button(panel, -1, "Press Me")
++-        spin = wx.SpinCtrl(panel, -1, "Hello", size=(100,-1))
+++        spin = wx.SpinCtrl(panel, -1, "Hello")
++         btn.Bind(wx.EVT_BUTTON, self.OnButton)
++ 
++         sizer = wx.BoxSizer(wx.VERTICAL)
++diff --git a/demo/PrintFramework.py b/demo/PrintFramework.py
++index e7a29a077..f0873ae94 100644
++--- a/demo/PrintFramework.py
+++++ b/demo/PrintFramework.py
++@@ -81,7 +81,7 @@ def OnPrintPage(self, page):
++ 
++         #-------------------------------------------
++         self.canvas.DoDrawing(dc, True)
++-        dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
+++        dc.DrawText("Page: %d" % page, marginX//2, maxY-marginY)
++ 
++         return True
++ 
++diff --git a/demo/PropertyGrid.py b/demo/PropertyGrid.py
++index c56e08b60..fbef29e31 100644
++--- a/demo/PropertyGrid.py
+++++ b/demo/PropertyGrid.py
++@@ -150,7 +150,7 @@ def _ConvertValue(self, value):
++         """ Utility convert arbitrary value to a real wx.Size.
++         """
++         import collections
++-        if isinstance(value, collections.Sequence) or hasattr(value, '__getitem__'):
+++        if isinstance(value, collections.abc.Sequence) or hasattr(value, '__getitem__'):
++             value = wx.Size(*value)
++         return value
++ 
++diff --git a/demo/Sizers.py b/demo/Sizers.py
++index 6ababede9..a025050f1 100644
++--- a/demo/Sizers.py
+++++ b/demo/Sizers.py
++@@ -45,7 +45,7 @@ def OnPaint(self, evt):
++         dc = wx.PaintDC(self)
++         w,h = dc.GetTextExtent(self.text)
++         dc.Clear()
++-        dc.DrawText(self.text, (sz.width-w)/2, (sz.height-h)/2)
+++        dc.DrawText(self.text, (sz.width-w)//2, (sz.height-h)//2)
++ 
++     def OnSize(self, evt):
++         self.Refresh()
++diff --git a/demo/UIActionSimulator.py b/demo/UIActionSimulator.py
++index cbba14f5c..0a6fd0234 100644
++--- a/demo/UIActionSimulator.py
+++++ b/demo/UIActionSimulator.py
++@@ -88,7 +88,7 @@ def _playbackKey(self, evtType, key, modifiers):
++ 
++     def _setNextKeyEvent(self):
++         evtType, key, modifiers, milli = self._playbackEvents.pop(0)
++-        milli = max(milli/2, 1) # play back faster than it was recorded
+++        milli = max(milli//2, 1) # play back faster than it was recorded
++         print(evtType, key, modifiers, milli)
++         wx.CallLater(milli, self._playbackKey, evtType, key, modifiers)
++ 
++diff --git a/demo/agw/AUI.py b/demo/agw/AUI.py
++index 7c2196865..b38313c86 100644
++--- a/demo/agw/AUI.py
+++++ b/demo/agw/AUI.py
++@@ -393,7 +393,7 @@ def OnPaint(self, event):
++         dc.SetPen(wx.LIGHT_GREY_PEN)
++         dc.DrawLine(0, 0, size.x, size.y)
++         dc.DrawLine(0, size.y, size.x, 0)
++-        dc.DrawText(s, (size.x-w)/2, (size.y-height*5)/2)
+++        dc.DrawText(s, (size.x-w)//2, (size.y-height*5)//2)
++ 
++         if self._mgr:
++ 
++@@ -401,19 +401,19 @@ def OnPaint(self, event):
++ 
++             s = "Layer: %d"%pi.dock_layer
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*1))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*1))
++ 
++             s = "Dock: %d Row: %d"%(pi.dock_direction, pi.dock_row)
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*2))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*2))
++ 
++             s = "Position: %d"%pi.dock_pos
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*3))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*3))
++ 
++             s = "Proportion: %d"%pi.dock_proportion
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*4))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*4))
++ 
++ 
++     def OnEraseBackground(self, event):
++@@ -435,7 +435,7 @@ def __init__(self, parent, frame):
++ 
++         s1 = wx.BoxSizer(wx.HORIZONTAL)
++         self._border_size = wx.SpinCtrl(self, ID_PaneBorderSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE),
++-                                        wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100,
+++                                        wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100,
++                                         frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE))
++         s1.Add((1, 1), 1, wx.EXPAND)
++         s1.Add(wx.StaticText(self, -1, "Pane Border Size:"))
++@@ -445,7 +445,7 @@ def __init__(self, parent, frame):
++ 
++         s2 = wx.BoxSizer(wx.HORIZONTAL)
++         self._sash_size = wx.SpinCtrl(self, ID_SashSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE), wx.DefaultPosition,
++-                                      wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
+++                                      wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
++         s2.Add((1, 1), 1, wx.EXPAND)
++         s2.Add(wx.StaticText(self, -1, "Sash Size:"))
++         s2.Add(self._sash_size)
++@@ -454,7 +454,7 @@ def __init__(self, parent, frame):
++ 
++         s3 = wx.BoxSizer(wx.HORIZONTAL)
++         self._caption_size = wx.SpinCtrl(self, ID_CaptionSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE),
++-                                         wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
+++                                         wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
++         s3.Add((1, 1), 1, wx.EXPAND)
++         s3.Add(wx.StaticText(self, -1, "Caption Size:"))
++         s3.Add(self._caption_size)
++@@ -807,9 +807,9 @@ def LightColour(self, colour, percent):
++ 
++         # We take the percent way of the colour from colour -> white
++         i = percent
++-        r = colour.Red() + ((i*rd*100)/high)/100
++-        g = colour.Green() + ((i*gd*100)/high)/100
++-        b = colour.Blue() + ((i*bd*100)/high)/100
+++        r = colour.Red() + ((i*rd*100)//high)//100
+++        g = colour.Green() + ((i*gd*100)//high)//100
+++        b = colour.Blue() + ((i*bd*100)//high)//100
++ 
++         return wx.Colour(r, g, b)
++ 
++@@ -826,10 +826,10 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++         x, y, width, height = clientRect
++         x, width = self._pos, interval
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2)
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2)
++         topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-        rc1 = wx.Rect(x, y, width, height/2)
+++        rc1 = wx.Rect(int(x), y, int(width), height//2)
++         path1 = self.GetPath(gc, rc1, 8)
++         br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++         gc.SetBrush(br1)
++@@ -845,14 +845,14 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++ 
++         bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-        rc3 = wx.Rect(x, y+height/2, width, height/2)
+++        rc3 = wx.Rect(int(x), y+height//2, int(width), height//2)
++         path3 = self.GetPath(gc, rc3, 8)
++         br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++         gc.SetBrush(br3)
++         gc.FillPath(path3) #draw main
++ 
++         path4 = gc.CreatePath()
++-        path4.AddRectangle(x, y+height/2, width, 8)
+++        path4.AddRectangle(x, y+height//2, width, 8)
++         path4.CloseSubpath()
++         gc.SetBrush(br3)
++         gc.FillPath(path4)
++@@ -2613,7 +2613,7 @@ def CreateNotebook(self):
++         flex.Add(wx.TextCtrl(panel, -1, "", wx.DefaultPosition, wx.Size(100, -1)),
++                  1, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add(wx.StaticText(panel, -1, "wxSpinCtrl:"), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++-        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.Size(100, -1),
+++        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.DefaultSize,
++                              wx.SP_ARROW_KEYS, 5, 50, 5), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add((5, 5))
++         flex.Add((5, 5))
++diff --git a/demo/agw/MacLargeDemo.py b/demo/agw/MacLargeDemo.py
++index 4d967a546..a5b8a0e25 100644
++--- a/demo/agw/MacLargeDemo.py
+++++ b/demo/agw/MacLargeDemo.py
++@@ -223,12 +223,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = int((w * percent)/100)
++ 
++         if w < 1:
++             return
++diff --git a/demo/agw/PeakMeter.py b/demo/agw/PeakMeter.py
++index a7c9a6f51..e9dab7116 100644
++--- a/demo/agw/PeakMeter.py
+++++ b/demo/agw/PeakMeter.py
++@@ -149,10 +149,10 @@ def OnFalloff(self, event):
++ 
++     def OnStart(self, event):
++ 
++-        self.timer.Start(1000/2)        # 2 fps
+++        self.timer.Start(1000//2)        # 2 fps
++ 
++-        self.vertPeak.Start(1000/18)        # 18 fps
++-        self.horzPeak.Start(1000/20)        # 20 fps
+++        self.vertPeak.Start(1000//18)        # 18 fps
+++        self.horzPeak.Start(1000//20)        # 20 fps
++ 
++ 
++     def OnStop(self, event):
++diff --git a/demo/agw/PersistentControls.py b/demo/agw/PersistentControls.py
++index f19cc4a91..cf97dd9f0 100644
++--- a/demo/agw/PersistentControls.py
+++++ b/demo/agw/PersistentControls.py
++@@ -234,7 +234,7 @@ def BuildPanes(self):
++         sizer_1.Add(label_1, 0, wx.ALL, 5)
++         sizer_1.Add(combo, 0, wx.LEFT|wx.RIGHT, 5)
++         sizer_1.Add((20, 20), 1)
++-        box2.Add(sizer_1, 1, wx.EXPAND|wx.ALIGN_CENTER, 0)
+++        box2.Add(sizer_1, 1, wx.EXPAND, 0)
++         box2.Add((0, 0), 1, 1)
++ 
++         otherPanel.SetSizer(box2)
++diff --git a/demo/agw/RibbonBar.py b/demo/agw/RibbonBar.py
++index 7103e9d81..d28a2c66a 100644
++--- a/demo/agw/RibbonBar.py
+++++ b/demo/agw/RibbonBar.py
++@@ -799,7 +799,7 @@ def AddColourToGallery(self, gallery, colour, dc, value=None):
++                                        (c.Blue() + 192) % 256)
++ 
++             dc.SetTextForeground(foreground)
++-            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) / 2, (iHeight - size.GetHeight()) / 2)
+++            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) // 2, (iHeight - size.GetHeight()) // 2)
++             dc.SelectObjectAsSource(wx.NullBitmap)
++ 
++             item = gallery.Append(bitmap, wx.ID_ANY)
++diff --git a/demo/agw/SpeedMeter.py b/demo/agw/SpeedMeter.py
++index 9f0fdebb2..575e84a80 100644
++--- a/demo/agw/SpeedMeter.py
+++++ b/demo/agw/SpeedMeter.py
++@@ -418,7 +418,7 @@ def __init__(self, parent, log):
++         bsizer3 = wx.BoxSizer(wx.VERTICAL)
++ 
++         hsizer3 = wx.BoxSizer(wx.HORIZONTAL)
++-        sc = wx.SpinCtrl(panel3, -1, size=(60,20))
+++        sc = wx.SpinCtrl(panel3, -1)
++         sc.SetRange(1, 250)
++         sc.SetValue(50)
++ 
++diff --git a/demo/agw/SuperToolTip.py b/demo/agw/SuperToolTip.py
++index 5e65f06b1..88728e54e 100644
++--- a/demo/agw/SuperToolTip.py
+++++ b/demo/agw/SuperToolTip.py
++@@ -43,7 +43,7 @@ def __init__(self, parent):
++         self.topColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.WHITE)
++         system = wx.SystemSettings.GetColour(wx.SYS_COLOUR_ACTIVECAPTION)
++         r, g, b, a = system
++-        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)/2, (255-g)/2, (255-b)/2))
+++        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)//2, (255-g)//2, (255-b)//2))
++         self.bottomColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=system)
++         self.headerCheck = wx.CheckBox(self.mainPanel, -1, "Show Header")
++         self.headerText = wx.TextCtrl(self.mainPanel, -1, "Merge And Center")
++@@ -233,7 +233,6 @@ def DoLayout(self):
++         frameSizer.Add(self.mainPanel, 1, wx.EXPAND, 0)
++         self.SetSizer(frameSizer)
++         frameSizer.Layout()
++-        frameSizer.Fit(self)
++         self.Layout()
++ 
++         wx.CallAfter(mainSizer.Layout)
++diff --git a/demo/agw/UltimateReportDemo.py b/demo/agw/UltimateReportDemo.py
++index 40f49cb8f..ad455847b 100644
++--- a/demo/agw/UltimateReportDemo.py
+++++ b/demo/agw/UltimateReportDemo.py
++@@ -216,7 +216,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         mdc.SetFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
++         text = "%d Mb"%self.progressValue
++         textWidth, dummy = mdc.GetTextExtent(text)
++-        mdc.DrawText(text, rect.width/2 - textWidth/2, rect.height/2 - dummy/2)
+++        mdc.DrawText(text, rect.width//2 - textWidth//2, rect.height//2 - dummy//2)
++         dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
++         dc.Blit(rect.x+3, rect.y, rect.width-6, rect.height, mdc, 0, 0)
++         dc.DestroyClippingRegion()
++@@ -279,12 +279,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = (w * percent)//100
++ 
++         if middle == 0: # not started
++             bitmap = self.REMAINING_BITMAP.GetSubBitmap((1, 0, w, PIPE_HEIGHT))
++@@ -335,7 +335,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         colours = [wx.RED, wx.WHITE, wx.GREEN, wx.Colour("SKY BLUE")]
++         w, h = dc.GetTextExtent("Hg")
++         x = rect.x + 1
++-        y = rect.y + rect.height/2 - h/2
+++        y = rect.y + rect.height//2 - h//2
++ 
++         for ch in self.text:
++             dc.SetTextForeground(random.choice(colours))
++diff --git a/demo/agw/Windows7Explorer_Contents.py b/demo/agw/Windows7Explorer_Contents.py
++index f754d7879..b23df0e1a 100644
++--- a/demo/agw/Windows7Explorer_Contents.py
+++++ b/demo/agw/Windows7Explorer_Contents.py
++@@ -127,13 +127,13 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         """Draw a custom progress bar using double buffering to prevent flicker"""
++ 
++         bmpWidth, bmpHeight = self.icon.GetWidth(), self.icon.GetHeight()
++-        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)/2)
+++        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)//2)
++ 
++         dc.SetFont(self.normalFont)
++ 
++         textWidth, textHeight = dc.GetTextExtent(self.text)
++         dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
++-        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.description:
++             return
++@@ -144,10 +144,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Type: " + self.description)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++@@ -207,10 +207,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Date modified: " + date)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.size:
++             return
++@@ -218,10 +218,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         dummy1, dummy2= dc.GetTextExtent("Size: ")
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++diff --git a/demo/agw/ZoomBar.py b/demo/agw/ZoomBar.py
++index 376ce349b..14b0278e7 100644
++--- a/demo/agw/ZoomBar.py
+++++ b/demo/agw/ZoomBar.py
++@@ -55,7 +55,7 @@ def __init__(self, parent, log):
++         reflections = glob.glob(bitmapDir + "/*96Flip40.png")
++ 
++         separatorImage = bitmapDir + "/separator.gif"
++-        separatorReflection = bitmapDir + "/separatorFlip.png"
+++        separatorReflection = bitmapDir + "/separatorflip.png"
++         count = 0
++ 
++         for std, ref in zip(standard, reflections):
++diff --git a/wx/lib/agw/advancedsplash.py b/wx/lib/agw/advancedsplash.py
++index 1f8c32df5..d351ea06e 100644
++--- a/wx/lib/agw/advancedsplash.py
+++++ b/wx/lib/agw/advancedsplash.py
++@@ -438,7 +438,7 @@ def SetTextFont(self, font=None):
++ 
++         if font is None:
++             self._textfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._textsize = 10.0
+++            self._textsize = 10
++             self._textfont.SetPointSize(self._textsize)
++         else:
++             self._textfont = font
++diff --git a/wx/lib/agw/aui/auibook.py b/wx/lib/agw/aui/auibook.py
++index ba7cf4721..f5ad2a568 100644
++--- a/wx/lib/agw/aui/auibook.py
+++++ b/wx/lib/agw/aui/auibook.py
++@@ -3452,8 +3452,8 @@ def CalculateNewSplitSize(self):
++         # should happen around the middle
++         if tab_ctrl_count < 2:
++             new_split_size = self.GetClientSize()
++-            new_split_size.x /= 2
++-            new_split_size.y /= 2
+++            new_split_size.x //= 2
+++            new_split_size.y //= 2
++ 
++         else:
++ 
++diff --git a/wx/lib/agw/balloontip.py b/wx/lib/agw/balloontip.py
++index b4155d74a..57baca729 100644
++--- a/wx/lib/agw/balloontip.py
+++++ b/wx/lib/agw/balloontip.py
++@@ -615,7 +615,7 @@ def SetStartDelay(self, delay=1):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Creation Should Be Greater Than 1 ms")
++ 
++-        self._startdelaytime = float(delay)
+++        self._startdelaytime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -640,7 +640,7 @@ def SetEndDelay(self, delay=1e6):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Destruction Should Be Greater Than 1 ms")
++ 
++-        self._enddelaytime = float(delay)
+++        self._enddelaytime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/flatmenu.py b/wx/lib/agw/flatmenu.py
++index 5ba28e584..85f295b86 100644
++--- a/wx/lib/agw/flatmenu.py
+++++ b/wx/lib/agw/flatmenu.py
++@@ -736,8 +736,8 @@ def DrawSeparator(self, dc, xCoord, yCoord, textX, sepWidth):
++         """
++ 
++         dcsaver = DCSaver(dc)
++-        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth/2, 1)
++-        sepRect2 = wx.Rect(xCoord + textX + sepWidth/2, yCoord + 1, sepWidth/2-1, 1)
+++        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth//2, 1)
+++        sepRect2 = wx.Rect(xCoord + textX + sepWidth//2, yCoord + 1, sepWidth//2-1, 1)
++ 
++         artMgr = ArtManager.Get()
++         backColour = artMgr.GetMenuFaceColour()
++@@ -817,11 +817,11 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             imgWidth  = bmp.GetWidth()
++ 
++             if imageMarginX == 0:
++-                xx = rect.x + (leftMarginWidth - imgWidth)/2
+++                xx = rect.x + (leftMarginWidth - imgWidth)//2
++             else:
++-                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)/2 + rect.height
+++                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)//2 + rect.height
++ 
++-            yy = rect.y + (rect.height - imgHeight)/2
+++            yy = rect.y + (rect.height - imgHeight)//2
++             dc.DrawBitmap(bmp, xx, yy, True)
++ 
++         if item.GetKind() == wx.ITEM_CHECK:
++@@ -837,7 +837,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         if item.GetKind() == wx.ITEM_RADIO:
++ 
++@@ -852,7 +852,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         # Draw text - without accelerators
++         text = item.GetLabel()
++@@ -890,7 +890,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 w3, dummy = dc.GetTextExtent(text3)
++ 
++                 posx = xCoord + textX + borderXSize
++-                posy = (itemHeight - h)/2 + yCoord
+++                posy = (itemHeight - h)//2 + yCoord
++ 
++                 # Draw first part
++                 dc.DrawText(text1, posx, posy)
++@@ -912,7 +912,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             else:
++ 
++                 w, h = dc.GetTextExtent(text)
++-                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)/2 + yCoord)
+++                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)//2 + yCoord)
++ 
++ 
++         # Now draw accelerator
++@@ -920,7 +920,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++         if item.GetAccelString():
++ 
++             accelWidth, accelHeight = dc.GetTextExtent(item.GetAccelString())
++-            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)/2 + yCoord)
+++            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)//2 + yCoord)
++ 
++         # Check if this item has sub-menu - if it does, draw
++         # right arrow on the right margin
++@@ -932,7 +932,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++ 
++             xx = xCoord + rightMarginX + borderXSize
++             rr = wx.Rect(xx, rect.y + 1, rect.height-2, rect.height-2)
++-            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)/2, True)
+++            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)//2, True)
++ 
++ 
++     def DrawMenuBarButton(self, dc, rect, state):
++@@ -1142,7 +1142,7 @@ def DrawMenuBar(self, menubar, dc):
++             # Get the menu item rect
++             textWidth, textHeight = dc.GetTextExtent(fixedText)
++             #rect = wx.Rect(posx+menubar._spacer/2, posy, textWidth, textHeight)
++-            rect = wx.Rect(posx+padding/2, posy, textWidth, textHeight)
+++            rect = wx.Rect(posx+padding//2, posy, textWidth, textHeight)
++ 
++             # Can we draw more??
++             # the +DROP_DOWN_ARROW_WIDTH  is the width of the drop down arrow
++@@ -1172,7 +1172,7 @@ def DrawMenuBar(self, menubar, dc):
++                 dc.SetTextForeground(textColour)
++ 
++             ww, hh = dc.GetTextExtent(labelOnly)
++-            textOffset = (rect.width - ww) / 2
+++            textOffset = (rect.width - ww) // 2
++ 
++             if not menubar._isLCD and item.GetTextBitmap().IsOk() and not selected:
++                 dc.DrawBitmap(item.GetTextBitmap(), rect.x, rect.y, True)
++@@ -1505,8 +1505,8 @@ def DrawButtonColour(self, dc, rect, state, colour):
++         baseColour = colour
++ 
++         # Define the middle points
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, rect.y + (rect.height // 2))
+++        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height // 2))
++ 
++         # Define the top region
++         top = wx.Rect((rect.GetLeft(), rect.GetTop()), rightPt)
++@@ -1572,11 +1572,11 @@ def DrawMenuBarBackground(self, dc, rect):
++ 
++         factor = artMgr.GetMenuBgFactor()
++ 
++-        leftPt1 = wx.Point(rect.x, rect.y + (rect.height / factor))
++-        leftPt2 = wx.Point(rect.x, rect.y + (rect.height / factor)*(factor-1))
+++        leftPt1 = wx.Point(rect.x, rect.y + (rect.height // factor))
+++        leftPt2 = wx.Point(rect.x, rect.y + (rect.height // factor)*(factor-1))
++ 
++-        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor))
++-        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor)*(factor-1))
+++        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor))
+++        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor)*(factor-1))
++ 
++         # Define the top region
++         topReg = [wx.Point() for ii in range(7)]
++@@ -2707,7 +2707,7 @@ def DrawToolbar(self, dc, rect):
++             elif tbItem.IsCustomControl():
++                 control = tbItem.GetCustomControl()
++                 ctrlSize = control.GetSize()
++-                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)/2)
+++                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)//2)
++                 if control.GetPosition() != ctrlPos:
++                     control.SetPosition(ctrlPos)
++ 
++@@ -2727,9 +2727,9 @@ def DrawToolbar(self, dc, rect):
++             # Draw the toolbar image
++             if bmp.IsOk():
++ 
++-                x = xx - self._toolbarSpacer/2
+++                x = xx - self._toolbarSpacer//2
++                 #y = rect.y + (rect.height - bmp.GetHeight())/2 - 1
++-                y = rect.y + self._toolbarMargin/2
+++                y = rect.y + self._toolbarMargin//2
++ 
++                 buttonRect = wx.Rect(x, y, highlight_width, highlight_height)
++ 
++@@ -2745,8 +2745,8 @@ def DrawToolbar(self, dc, rect):
++                     else:
++                         self._tbButtons[i]._state = ControlNormal
++ 
++-                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())/2
++-                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())/2
+++                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())//2
+++                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())//2
++ 
++                 if self._tbButtons[i]._state == ControlFocus and not self._tbButtons[i]._tbItem.IsSelected():
++ 
++@@ -2827,8 +2827,8 @@ def DrawMoreButton(self, dc, state):
++         dropArrowBmp = self.GetRenderer()._bitmaps["arrow_down"]
++ 
++         # Calc the image coordinates
++-        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())/2
+++        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())//2
++ 
++         dc.DrawBitmap(dropArrowBmp, xx, yy + self._spacer, True)
++         self._dropDownButtonState = state
++@@ -3269,8 +3269,8 @@ def DrawToolbarItem(self, dc, idx, state):
++ 
++         # draw the bitmap over the highlight
++         buttonRect = wx.Rect(*rect)
++-        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())/2
++-        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())/2
+++        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())//2
+++        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())//2
++ 
++         if state == ControlFocus:
++ 
++@@ -3784,7 +3784,7 @@ def PositionAUI(self, mgr, fixToolbar=True):
++         pn.Name("flat_menu_bar")
++         pn.Caption("Menu Bar")
++         pn.Top()
++-        pn.MinSize(wx.Size(xx/2, self._barHeight))
+++        pn.MinSize(wx.Size(xx//2, self._barHeight))
++         pn.LeftDockable(False)
++         pn.RightDockable(False)
++         pn.ToolbarPane()
++@@ -3997,8 +3997,8 @@ def Draw(self, dc):
++         """
++ 
++         rect = wx.Rect(self._pos, self._size)
++-        xx = rect.x + (rect.width - self._normalBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - self._normalBmp.GetHeight())/2
+++        xx = rect.x + (rect.width - self._normalBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - self._normalBmp.GetHeight())//2
++ 
++         self._parent.GetRenderer().DrawScrollButton(dc, rect, self._state)
++         dc.DrawBitmap(self._normalBmp, xx, yy, True)
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index f5e5200b2..561749b89 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -858,9 +858,9 @@ def PaintStraightGradientBox(dc, rect, startColour, endColour, vertical=True):
++ 
++     for i in range(high+1):
++ 
++-        r = startColour.Red() + ((i*rd*100)/high)/100
++-        g = startColour.Green() + ((i*gd*100)/high)/100
++-        b = startColour.Blue() + ((i*bd*100)/high)/100
+++        r = startColour.Red() + ((i*rd*100)//high)//100
+++        g = startColour.Green() + ((i*gd*100)//high)//100
+++        b = startColour.Blue() + ((i*bd*100)//high)//100
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++@@ -2631,9 +2631,9 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         imageYCoord = (pc.HasAGWFlag(FNB_BOTTOM) and [6] or [8])[0]
++ 
++         if hasImage:
++-            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints/2
+++            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints//2
++         else:
++-            textOffset = pc._pParent._nPadding + shapePoints/2
+++            textOffset = pc._pParent._nPadding + shapePoints//2
++ 
++         textOffset += 2
++ 
++diff --git a/wx/lib/agw/floatspin.py b/wx/lib/agw/floatspin.py
++index bdbaf85ec..4559eb5de 100644
++--- a/wx/lib/agw/floatspin.py
+++++ b/wx/lib/agw/floatspin.py
++@@ -336,7 +336,7 @@ class FloatSpin(wx.Control):
++     """
++ 
++     def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++-                 size=(95,-1), style=0, value=0.0, min_val=None, max_val=None,
+++                 size=wx.DefaultSize, style=0, value=0.0, min_val=None, max_val=None,
++                  increment=1.0, digits=-1, agwStyle=FS_LEFT,
++                  name="FloatSpin"):
++         """
++diff --git a/wx/lib/agw/gradientbutton.py b/wx/lib/agw/gradientbutton.py
++index c4633b296..58625c508 100644
++--- a/wx/lib/agw/gradientbutton.py
+++++ b/wx/lib/agw/gradientbutton.py
++@@ -412,14 +412,14 @@ def OnPaint(self, event):
++ 
++         x, y, width, height = clientRect
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2 + ((capture==self and [1] or [0])[0]))
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2 + ((capture==self and [1] or [0])[0]))
++         if capture != self:
++             if self._mouseAction == HOVER:
++                 topStart, topEnd = self.LightColour(self._topStartColour, 10), self.LightColour(self._topEndColour, 10)
++             else:
++                 topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-            rc1 = wx.Rect(x, y, width, height/2)
+++            rc1 = wx.Rect(x, y, width, height//2)
++             path1 = self.GetPath(gc, rc1, 8)
++             br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++             gc.SetBrush(br1)
++@@ -448,7 +448,7 @@ def OnPaint(self, event):
++             else:
++                 bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-            rc3 = wx.Rect(x, y+height/2, width, height/2)
+++            rc3 = wx.Rect(x, y+height//2, width, height//2)
++             path3 = self.GetPath(gc, rc3, 8)
++             br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++             gc.SetBrush(br3)
++@@ -463,7 +463,7 @@ def OnPaint(self, event):
++             shadowOffset = 0
++         else:
++ 
++-            rc2 = wx.Rect(x+1, gradientRect.height/2, gradientRect.width, gradientRect.height)
+++            rc2 = wx.Rect(x+1, gradientRect.height//2, gradientRect.width, gradientRect.height)
++             path2 = self.GetPath(gc, rc2, 8)
++             gc.SetPen(wx.Pen(self._pressedBottomColour))
++             gc.SetBrush(wx.Brush(self._pressedBottomColour))
++diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py
++index 12302f3b0..377ac0121 100644
++--- a/wx/lib/agw/hypertreelist.py
+++++ b/wx/lib/agw/hypertreelist.py
++@@ -3437,7 +3437,7 @@ def PaintLevel(self, item, dc, level, y, x_maincol):
++ 
++             if not self.HasAGWFlag(wx.TR_NO_LINES) and children:
++                 last_child = children[-1]
++-                Y1 = last_child.GetY() + last_child.GetHeight() / 2
+++                Y1 = last_child.GetY() + last_child.GetHeight() // 2
++                 dc.DrawLine(x, oldY, x, Y1)
++ 
++         return y, x_maincol
++diff --git a/wx/lib/agw/knobctrl.py b/wx/lib/agw/knobctrl.py
++index 742097b09..1e5045ff6 100644
++--- a/wx/lib/agw/knobctrl.py
+++++ b/wx/lib/agw/knobctrl.py
++@@ -325,7 +325,7 @@ def OnSize(self,event):
++         memory.Clear()
++ 
++         minradius = min(0.9*self.Width/2.0, 0.9*self.Height/2.0)
++-        memory.DrawCircle(self.Width//2, self.Height//2, minradius)
+++        memory.DrawCircle(self.Width//2, self.Height//2, int(minradius))
++         memory.SelectObject(wx.NullBitmap)
++         self._region = wx.Region(self._Buffer, self.GetBackgroundColour())
++         self._minradius = minradius
++@@ -645,8 +645,8 @@ def DrawTags(self, dc, size):
++             dxi = math.cos(angle)*((width - xshift + tagLen - 6)/2.0 - tagLen)
++             dyi = math.sin(angle)*((height - yshift + tagLen - 6)/2.0 - tagLen)
++ 
++-            dc.DrawLine(width//2 - sxi, height//2 - syi,
++-                        width//2 - dxi, height//2 - dyi)
+++            dc.DrawLine(int(width//2 - sxi), int(height//2 - syi),
+++                        int(width//2 - dxi), int(height//2 - dyi))
++ 
++ 
++     def DrawDiagonalGradient(self, dc, size):
++@@ -759,8 +759,8 @@ def DrawInsetCircle(self, dc, pencolour):
++         p1 = wx.Pen(self.OffsetColour(pencolour, -70), 2)
++         p2 = wx.Pen(self.OffsetColour(pencolour, 10), 1)
++ 
++-        pt1 = wx.Point(cx-r*math.sqrt(2)/2.0, cy+r*math.sqrt(2)/2.0)
++-        pt2 = wx.Point(cx+r*math.sqrt(2)/2.0, cy-r*math.sqrt(2)/2.0)
+++        pt1 = wx.Point(int(cx-r*math.sqrt(2)/2.0), int(cy+r*math.sqrt(2)/2.0))
+++        pt2 = wx.Point(int(cx+r*math.sqrt(2)/2.0), int(cy-r*math.sqrt(2)/2.0))
++ 
++         dc.SetPen(p2)
++         dc.DrawArc(pt1, pt2, (cx, cy))
++@@ -779,7 +779,7 @@ def DrawBoundingCircle(self, dc, size):
++         radius = 0.9*min(size.x, size.y)/2.0
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++         dc.SetPen(wx.Pen(self._boundingcolour))
++-        dc.DrawCircle(self.Width//2, self.Height//2, radius)
+++        dc.DrawCircle(self.Width//2, self.Height//2, int(radius))
++ 
++ 
++     def CircleCoords(self, radius, angle, centerX, centerY):
++diff --git a/wx/lib/agw/labelbook.py b/wx/lib/agw/labelbook.py
++index b716df3a2..f8c9cd54d 100644
++--- a/wx/lib/agw/labelbook.py
+++++ b/wx/lib/agw/labelbook.py
++@@ -1376,13 +1376,13 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    imgXcoord = self._nImgSize / 2
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize / 2] or [pos + imgTopPadding])[0]
+++                    imgXcoord = self._nImgSize // 2
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize // 2] or [pos + imgTopPadding])[0]
++ 
++                 else:
++ 
++-                    imgXcoord = pos + (rectWidth / 2) - (self._nImgSize / 2)
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize / 2] or [imgTopPadding])[0]
+++                    imgXcoord = pos + (rectWidth // 2) - (self._nImgSize // 2)
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize // 2] or [imgTopPadding])[0]
++ 
++                 self._ImageList.Draw(self._pagesInfoVec[i].GetImageIndex(), dc,
++                                      imgXcoord, imgYcoord,
++@@ -1408,15 +1408,15 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    textOffsetX = ((rectWidth - textWidth) / 2 )
+++                    textOffsetX = ((rectWidth - textWidth) // 2 )
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT  and [pos + self._nImgSize  + imgTopPadding + 3] or \
++-                                       [pos + ((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [pos + ((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 else:
++ 
++-                    textOffsetX = (rectWidth - textWidth) / 2  + pos + nTextPaddingLeft
+++                    textOffsetX = (rectWidth - textWidth) // 2  + pos + nTextPaddingLeft
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT and [self._nImgSize + imgTopPadding + 3] or \
++-                                       [((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
++                 dc.DrawText(fixedText, textOffsetX, textOffsetY)
++@@ -1591,8 +1591,8 @@ def OnPaint(self, event):
++             # Draw gradient in the background area
++             startColour = self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR]
++             endColour   = ArtManager.Get().LightColour(self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR], 50)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x / 2, size.y), startColour, endColour, False)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x / 2, 0, size.x / 2, size.y), endColour, startColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x // 2, size.y), startColour, endColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x // 2, 0, size.x // 2, size.y), endColour, startColour, False)
++ 
++         else:
++ 
++@@ -1638,7 +1638,7 @@ def OnPaint(self, event):
++ 
++             if self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++                 font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-                font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++                font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++                 if self.GetParent().GetFontBold():
++                     font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -1954,7 +1954,7 @@ def DrawWebHover(self, dc, caption, xCoord, yCoord, selected):
++ 
++         # Redraw the text with underlined font
++         underLinedFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        underLinedFont.SetPointSize(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        underLinedFont.SetPointSize(int(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++         if self.GetParent().GetFontBold():
++             underLinedFont.SetWeight(wx.FONTWEIGHT_BOLD)
++         elif self.HasAGWFlag(INB_BOLD_TAB_SELECTION) and selected:
++@@ -2050,7 +2050,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++         imgRect = wx.Rect(*rect)
++ 
++         font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++         if self.GetParent().GetFontBold():
++             font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -2069,7 +2069,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++         # Text bounding rectangle
++         textRect.x += nPadding
++-        textRect.y = rect.y + (rect.height - h)/2
+++        textRect.y = rect.y + (rect.height - h)//2
++         textRect.width = rect.width - 2 * nPadding
++ 
++         if bmp.IsOk() and not self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++@@ -2086,7 +2086,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++             imgRect.x += nPadding
++             imgRect.width = bmp.GetWidth()
++-            imgRect.y = rect.y + (rect.height - bmp.GetHeight())/2
+++            imgRect.y = rect.y + (rect.height - bmp.GetHeight())//2
++             imgRect.height = bmp.GetHeight()
++ 
++         # Draw bounding rectangle
++@@ -2496,7 +2496,7 @@ def ResizeTabArea(self):
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(1, 1))
++             font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-            font.SetPointSize(font.GetPointSize()*self._fontSizeMultiple)
+++            font.SetPointSize(int(font.GetPointSize()*self._fontSizeMultiple))
++             if self.GetFontBold() or agwStyle & INB_BOLD_TAB_SELECTION:
++                 font.SetWeight(wx.FONTWEIGHT_BOLD)
++             dc.SetFont(font)
++diff --git a/wx/lib/agw/peakmeter.py b/wx/lib/agw/peakmeter.py
++index 055dbef81..a5f88a9d5 100644
++--- a/wx/lib/agw/peakmeter.py
+++++ b/wx/lib/agw/peakmeter.py
++@@ -784,7 +784,7 @@ def DrawHorzBand(self, dc, rect):
++                 maxWidth = size.x*horzBands
++                 points = [wx.Point() for i in range(2)]
++                 points[0].y = rectPrev.GetTopRight().y - yDecal
++-                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth/self._maxValue
+++                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth//self._maxValue
++                 points[1].y = rectPrev.GetBottomLeft().y + yDecal
++                 points[1].x = points[0].x
++                 dc.SetPen(pen)
++diff --git a/wx/lib/agw/pygauge.py b/wx/lib/agw/pygauge.py
++index bab459a3a..b8654436a 100644
++--- a/wx/lib/agw/pygauge.py
+++++ b/wx/lib/agw/pygauge.py
++@@ -344,7 +344,7 @@ def OnPaint(self, event):
++                 c1,c2 = gradient
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.GradientFillLinear(r, c1, c2, wx.EAST)
++         else:
++             for i, colour in enumerate(self._barColourSorted):
++@@ -352,7 +352,7 @@ def OnPaint(self, event):
++                 dc.SetPen(wx.Pen(colour))
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.DrawRectangle(r)
++ 
++ 
++diff --git a/wx/lib/agw/ribbon/art_aui.py b/wx/lib/agw/ribbon/art_aui.py
++index a1d255843..31fedf487 100644
++--- a/wx/lib/agw/ribbon/art_aui.py
+++++ b/wx/lib/agw/ribbon/art_aui.py
++@@ -390,7 +390,7 @@ def DrawTab(self, dc, wnd, tab):
++             grad_rect = wx.Rect(*tab.rect)
++             grad_rect.height -= 4
++             grad_rect.width -= 1
++-            grad_rect.height /= 2
+++            grad_rect.height //= 2
++             grad_rect.y = grad_rect.y + tab.rect.height - grad_rect.height - 1
++             dc.SetBrush(self._tab_active_top_background_brush)
++             dc.DrawRectangle(tab.rect.x, tab.rect.y + 3, tab.rect.width - 1, grad_rect.y - tab.rect.y - 3)
++@@ -401,7 +401,7 @@ def DrawTab(self, dc, wnd, tab):
++             btm_rect = wx.Rect(*tab.rect)
++             btm_rect.height -= 4
++             btm_rect.width -= 1
++-            btm_rect.height /= 2
+++            btm_rect.height //= 2
++             btm_rect.y = btm_rect.y + tab.rect.height - btm_rect.height - 1
++             dc.SetBrush(self._tab_hover_background_brush)
++             dc.DrawRectangle(btm_rect.x, btm_rect.y, btm_rect.width, btm_rect.height)
++@@ -434,8 +434,8 @@ def DrawTab(self, dc, wnd, tab):
++             icon = tab.page.GetIcon()
++             if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++                 if icon.IsOk():
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
++-                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
+++                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -450,7 +450,7 @@ def DrawTab(self, dc, wnd, tab):
++                     offset += icon.GetWidth() + 2
++ 
++                 text_width, text_height = dc.GetTextExtent(label)
++-                x = (tab.rect.width - 2 - text_width - offset) / 2
+++                x = (tab.rect.width - 2 - text_width - offset) // 2
++                 if x > 8:
++                     x = 8
++                 elif x < 1:
++@@ -458,7 +458,7 @@ def DrawTab(self, dc, wnd, tab):
++ 
++                 width = tab.rect.width - x - 2
++                 x += tab.rect.x + offset
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if icon.IsOk():
++                     dc.DrawBitmap(icon, x - offset, tab.rect.y + (tab.rect.height - icon.GetHeight()) / 2, True)
++@@ -892,8 +892,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def DrawPartialPanelBackground(self, dc, wnd, rect):
++@@ -1024,7 +1024,7 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++             dc.DrawRectangle(reduced_rect.x, reduced_rect.y, reduced_rect.width, reduced_rect.height)
++             btn_bitmap = bitmaps[3]
++ 
++-        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width / 2 - 2, (rect.y + rect.height / 2) - 2, True)
+++        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width // 2 - 2, (rect.y + rect.height // 2) - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1277,7 +1277,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++             if is_split_hybrid:
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++-            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height / 2) - 2, True)
+++            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++diff --git a/wx/lib/agw/ribbon/art_internal.py b/wx/lib/agw/ribbon/art_internal.py
++index 4a8dc7ce0..78e8f3fe4 100644
++--- a/wx/lib/agw/ribbon/art_internal.py
+++++ b/wx/lib/agw/ribbon/art_internal.py
++@@ -32,9 +32,9 @@ def RibbonInterpolateColour(start_colour, end_colour, position, start_position,
++     r = end_colour.Red() - start_colour.Red()
++     g = end_colour.Green() - start_colour.Green()
++     b = end_colour.Blue() - start_colour.Blue()
++-    r = start_colour.Red()   + (((r * position * 100) / end_position) / 100)
++-    g = start_colour.Green() + (((g * position * 100) / end_position) / 100)
++-    b = start_colour.Blue()  + (((b * position * 100) / end_position) / 100)
+++    r = start_colour.Red()   + (((r * position * 100) // end_position) // 100)
+++    g = start_colour.Green() + (((g * position * 100) // end_position) // 100)
+++    b = start_colour.Blue()  + (((b * position * 100) // end_position) // 100)
++ 
++     return wx.Colour(r, g, b)
++ 
++@@ -61,9 +61,9 @@ def RibbonDrawParallelGradientLines(dc, nlines, line_origins, stepx, stepy, nums
++     bd = end_colour.Blue() - start_colour.Blue()
++ 
++     for step in range(numsteps):
++-        r = start_colour.Red() + (((step*rd*100)/numsteps)/100)
++-        g = start_colour.Green() + (((step*gd*100)/numsteps)/100)
++-        b = start_colour.Blue() + (((step*bd*100)/numsteps)/100)
+++        r = start_colour.Red() + (((step*rd*100)//numsteps)//100)
+++        g = start_colour.Green() + (((step*gd*100)//numsteps)//100)
+++        b = start_colour.Blue() + (((step*bd*100)//numsteps)//100)
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++diff --git a/wx/lib/agw/ribbon/art_msw.py b/wx/lib/agw/ribbon/art_msw.py
++index e7317d59b..00c3dfe2b 100644
++--- a/wx/lib/agw/ribbon/art_msw.py
+++++ b/wx/lib/agw/ribbon/art_msw.py
++@@ -982,7 +982,7 @@ def DrawTab(self, dc, wnd, tab):
++                 background.width -= 4
++                 background.height -= 3
++                 h = background.height
++-                background.height /= 2
+++                background.height //= 2
++                 dc.GradientFillLinear(background, self._tab_hover_background_top_colour,
++                                       self._tab_hover_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1024,9 +1024,9 @@ def DrawTab(self, dc, wnd, tab):
++             if icon.IsOk():
++                 x = tab.rect.x + 4
++                 if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
++ 
++-                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -1043,13 +1043,13 @@ def DrawTab(self, dc, wnd, tab):
++                     x += 3 + tab.page.GetIcon().GetWidth()
++                     width -= 3 + tab.page.GetIcon().GetWidth()
++ 
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if width <= text_width:
++                     dc.SetClippingRegion(x, tab.rect.y, width, tab.rect.height)
++                     dc.DrawText(label, x, y)
++                 else:
++-                    dc.DrawText(label, x + (width - text_width) / 2 + 1, y)
+++                    dc.DrawText(label, x + (width - text_width) // 2 + 1, y)
++ 
++ 
++     def DrawTabSeparator(self, dc, wnd, rect, visibility):
++@@ -1093,7 +1093,7 @@ def ReallyDrawTabSeparator(self, wnd, rect, visibility):
++         dc = wx.MemoryDC(self._cached_tab_separator)
++         self.DrawTabCtrlBackground(dc, wnd, rect)
++ 
++-        x = rect.x + rect.width / 2
+++        x = rect.x + rect.width // 2
++         h = float(rect.height - 1)
++ 
++         r1 = self._tab_ctrl_background_brush.GetColour().Red() * (1.0 - visibility) + 0.5
++@@ -1146,7 +1146,7 @@ def DrawPartialPageBackground1(self, dc, wnd, rect, page, offset, hovered=False)
++ 
++         # upper_rect, lower_rect, paint_rect are all in page co-ordinates
++         upper_rect = wx.Rect(*background)
++-        upper_rect.height /= 5
+++        upper_rect.height //= 5
++ 
++         lower_rect = wx.Rect(*background)
++         lower_rect.y += upper_rect.height
++@@ -1229,7 +1229,7 @@ def DrawPageBackground(self, dc, wnd, rect):
++         background.width -= 4
++         background.height -= 2
++ 
++-        background.height /= 5
+++        background.height //= 5
++         dc.GradientFillLinear(background, self._page_background_top_colour,
++                               self._page_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1493,10 +1493,10 @@ def DrawPanelBackground(self, dc, wnd, rect):
++ 
++         if clip_label:
++             clip = wx.DCClipper(dc, label_rect)
++-            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++         else:
++-            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) / 2,
++-                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) // 2,
+++                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++ 
++         if has_ext_button:
++             if wnd.IsExtButtonHovered():
++@@ -1577,7 +1577,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x, rect.y + rect.height - 15, rect.x + rect.width, rect.y + rect.height - 15)
++ 
++-            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width / 3, 15)
+++            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width // 3, 15)
++             down_btn = wx.Rect(up_btn.GetRight() + 1, up_btn.GetTop(), up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetLeft(), down_btn.GetBottom())
++             ext_btn = wx.Rect(down_btn.GetRight() + 1, up_btn.GetTop(), rect.width - up_btn.GetWidth() - down_btn.GetWidth() - 1, up_btn.GetHeight())
++@@ -1587,7 +1587,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x + rect.width - 15, rect.y, rect.x + rect.width - 15, rect.y + rect.height)
++ 
++-            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height / 3)
+++            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height // 3)
++             down_btn = wx.Rect(up_btn.GetLeft(), up_btn.GetBottom() + 1, up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetRight(), down_btn.GetTop())
++             ext_btn = wx.Rect(up_btn.GetLeft(), down_btn.GetBottom() + 1, up_btn.GetWidth(), rect.height - up_btn.GetHeight() - down_btn.GetHeight() - 1)
++@@ -1633,14 +1633,14 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++ 
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(btn_top_brush)
++-        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height / 2)
+++        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height // 2)
++ 
++         lower = wx.Rect(*rect)
++-        lower.height = (lower.height + 1) / 2
+++        lower.height = (lower.height + 1) // 2
++         lower.y += rect.height - lower.height
++         dc.GradientFillLinear(lower, btn_colour, btn_grad_colour, wx.SOUTH)
++ 
++-        dc.DrawBitmap(btn_bitmap, rect.x + rect.width / 2 - 2, lower.y - 2, True)
+++        dc.DrawBitmap(btn_bitmap, rect.x + rect.width // 2 - 2, lower.y - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1691,7 +1691,7 @@ def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++         upper.x += 1
++         upper.width -= 2
++         upper.y += 1
++-        upper.height /= 3
+++        upper.height //= 3
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(top_brush)
++         dc.DrawRectangle(upper.x, upper.y, upper.width, upper.height)
++@@ -1760,7 +1760,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++             client_rect.x += 1
++             client_rect.width -= 2
++             client_rect.y += 1
++-            client_rect.height = (rect.y + rect.height / 5) - client_rect.x
+++            client_rect.height = (rect.y + rect.height // 5) - client_rect.x
++             dc.GradientFillLinear(client_rect,
++                                   self._panel_active_background_top_colour,
++                                   self._panel_active_background_top_gradient_colour, wx.SOUTH)
++@@ -1785,7 +1785,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.DrawRectangle(preview.x + 1, preview.y + preview.height - 8, preview.width - 2, 7)
++ 
++-        mid_pos = rect.y + rect.height / 5 - preview.y
+++        mid_pos = rect.y + rect.height // 5 - preview.y
++ 
++         if mid_pos < 0 or mid_pos >= preview.height:
++             full_rect = wx.Rect(*preview)
++@@ -1816,8 +1816,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - 7 - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - 7 - bitmap.GetHeight()) // 2, True)
++ 
++         self.DrawPanelBorder(dc, preview, self._panel_border_pen, self._panel_border_gradient_pen)
++         self.DrawPanelBorder(dc, true_rect, self._panel_minimised_border_pen, self._panel_minimised_border_gradient_pen)
++@@ -1829,20 +1829,20 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             preview.x = true_rect.x + 4
++-            preview.y = true_rect.y + (true_rect.height - preview.height) / 2
+++            preview.y = true_rect.y + (true_rect.height - preview.height) // 2
++         else:
++-            preview.x = true_rect.x + (true_rect.width - preview.width) / 2
+++            preview.x = true_rect.x + (true_rect.width - preview.width) // 2
++             preview.y = true_rect.y + 4
++ 
++         dc.SetFont(self._panel_label_font)
++         label_width, label_height = dc.GetTextExtent(wnd.GetLabel())
++ 
++-        xpos = true_rect.x + (true_rect.width - label_width + 1) / 2
+++        xpos = true_rect.x + (true_rect.width - label_width + 1) // 2
++         ypos = preview.y + preview.height + 5
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos = preview.x + preview.width + 5
++-            ypos = true_rect.y + (true_rect.height - label_height) / 2
+++            ypos = true_rect.y + (true_rect.height - label_height) // 2
++ 
++         dc.SetTextForeground(self._panel_minimised_label_colour)
++         dc.DrawText(wnd.GetLabel(), xpos, ypos)
++@@ -1851,12 +1851,12 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos += label_width
++-            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height / 2)
+++            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height // 2)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3,  3)
++             arrow_points[2] = arrow_points[0] + wx.Point(-3, -3)
++         else:
++             ypos += label_height
++-            arrow_points[0] = wx.Point(true_rect.width / 2, ypos + 5)
+++            arrow_points[0] = wx.Point(true_rect.width // 2, ypos + 5)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3, -3)
++             arrow_points[2] = arrow_points[0] + wx.Point( 3, -3)
++ 
++@@ -1967,7 +1967,7 @@ def DrawButtonBarButton(self, dc, wnd, rect, kind, state, label, bitmap_large, b
++             bg_rect.height -= 2
++ 
++             bg_rect_top = wx.Rect(*bg_rect)
++-            bg_rect_top.height /= 3
+++            bg_rect_top.height //= 3
++             bg_rect.y += bg_rect_top.height
++             bg_rect.height -= bg_rect_top.height
++ 
++@@ -2043,7 +2043,7 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         if result == RIBBON_BUTTONBAR_BUTTON_LARGE:
++ 
++             padding = 2
++-            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) / 2,
+++            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) // 2,
++                           rect.y + padding, True)
++             ypos = rect.y + padding + bitmap_large.GetHeight() + padding
++             arrow_width = (kind == RIBBON_BUTTON_NORMAL and [0] or [8])[0]
++@@ -2052,10 +2052,10 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++ 
++             if label_w + 2 * padding <= rect.width:
++ 
++-                dc.DrawText(label, rect.x + (rect.width - label_w) / 2, ypos)
+++                dc.DrawText(label, rect.x + (rect.width - label_w) // 2, ypos)
++                 if arrow_width != 0:
++-                    self.DrawDropdownArrow(dc, rect.x + rect.width / 2,
++-                                           ypos + (label_h * 3) / 2,
+++                    self.DrawDropdownArrow(dc, rect.x + rect.width // 2,
+++                                           ypos + (label_h * 3) // 2,
++                                            self._button_bar_label_colour)
++             else:
++                 breaki = len(label)
++@@ -2067,17 +2067,17 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++                         label_w, label_h = dc.GetTextExtent(label_top)
++ 
++                         if label_w + 2 * padding <= rect.width:
++-                            dc.DrawText(label_top, rect.x + (rect.width - label_w) / 2, ypos)
+++                            dc.DrawText(label_top, rect.x + (rect.width - label_w) // 2, ypos)
++                             ypos += label_h
++                             label_bottom = label[breaki:]
++                             label_w, label_h = dc.GetTextExtent(label_bottom)
++                             label_w += arrow_width
++-                            iX = rect.x + (rect.width - label_w) / 2
+++                            iX = rect.x + (rect.width - label_w) // 2
++                             dc.DrawText(label_bottom, iX, ypos)
++ 
++                             if arrow_width != 0:
++                                 self.DrawDropdownArrow(dc, iX + 2 +label_w - arrow_width,
++-                                                       ypos + label_h / 2 + 1,
+++                                                       ypos + label_h // 2 + 1,
++                                                        self._button_bar_label_colour)
++ 
++                             break
++@@ -2085,14 +2085,14 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         elif result == RIBBON_BUTTONBAR_BUTTON_MEDIUM:
++ 
++             x_cursor = rect.x + 2
++-            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())/2, True)
+++            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())//2, True)
++             x_cursor += bitmap_small.GetWidth() + 2
++             label_w, label_h = dc.GetTextExtent(label)
++-            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) / 2)
+++            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) // 2)
++             x_cursor += label_w + 3
++ 
++             if kind != RIBBON_BUTTON_NORMAL:
++-                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2,
+++                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height // 2,
++                                        self._button_bar_label_colour)
++ 
++         else:
++@@ -2184,7 +2184,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++ 
++         # Background
++         bg_rect_top = wx.Rect(*bg_rect)
++-        bg_rect_top.height = (bg_rect_top.height * 2) / 5
+++        bg_rect_top.height = (bg_rect_top.height * 2) // 5
++         bg_rect_btm = wx.Rect(*bg_rect)
++         bg_rect_btm.y += bg_rect_top.height
++         bg_rect_btm.height -= bg_rect_top.height
++@@ -2244,10 +2244,10 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++             dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
++-                          bg_rect.y + (bg_rect.height / 2) - 2, True)
+++                          bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2,
++-                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2,
+++                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def GetBarTabWidth(self, dc, wnd, label, bitmap, ideal=None, small_begin_need_separator=None,
++@@ -2474,7 +2474,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.y = size.GetHeight() - 15
++             scroll_up.height = 15
++             scroll_up.x = 0
++-            scroll_up.width = (size.GetWidth() + 2) / 3
+++            scroll_up.width = (size.GetWidth() + 2) // 3
++             scroll_down.y = scroll_up.y
++             scroll_down.height = scroll_up.height
++             scroll_down.x = scroll_up.x + scroll_up.width
++@@ -2491,7 +2491,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.x = size.GetWidth() - 15
++             scroll_up.width = 15
++             scroll_up.y = 0
++-            scroll_up.height = (size.GetHeight() + 2) / 3
+++            scroll_up.height = (size.GetHeight() + 2) // 3
++             scroll_down.x = scroll_up.x
++             scroll_down.width = scroll_up.width
++             scroll_down.y = scroll_up.y + scroll_up.height
++diff --git a/wx/lib/agw/ribbon/bar.py b/wx/lib/agw/ribbon/bar.py
++index ae8b6a19c..b0d28776d 100644
++--- a/wx/lib/agw/ribbon/bar.py
+++++ b/wx/lib/agw/ribbon/bar.py
++@@ -743,7 +743,7 @@ def RecalculateTabSizes(self):
++                     delta = info.ideal_width - info.small_must_have_separator_width
++                     info.rect.x = x
++                     info.rect.y = y
++-                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)/total_delta
+++                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)//total_delta
++                     info.rect.height = self._tab_height
++ 
++                     x += info.rect.width + tabsep
++@@ -797,7 +797,7 @@ def RecalculateTabSizes(self):
++                         delta = smallest_tab_width - info.minimum_width
++                         info.rect.x = x
++                         info.rect.y = y
++-                        info.rect.width = info.minimum_width + delta*(width - total_small_width)/total_delta
+++                        info.rect.width = info.minimum_width + delta*(width - total_small_width)//total_delta
++                         info.rect.height = self._tab_height
++ 
++                         x += info.rect.width + tabsep
++diff --git a/wx/lib/agw/ribbon/buttonbar.py b/wx/lib/agw/ribbon/buttonbar.py
++index 25ee49a82..4690f483d 100644
++--- a/wx/lib/agw/ribbon/buttonbar.py
+++++ b/wx/lib/agw/ribbon/buttonbar.py
++@@ -354,7 +354,7 @@ def InsertButton(self, pos, button_id, label, bitmap, bitmap_small=wx.NullBitmap
++                 self._bitmap_size_large = bitmap.GetSize()
++                 if not bitmap_small.IsOk():
++                     w, h = self._bitmap_size_large
++-                    self._bitmap_size_small = wx.Size(0.5*w, 0.5*h)
+++                    self._bitmap_size_small = wx.Size(w//2, h//2)
++ 
++             if bitmap_small.IsOk():
++ 
++@@ -867,8 +867,8 @@ def OnSize(self, event):
++ 
++             layout_size = self._layouts[layout_i].overall_size
++             if layout_size.x <= new_size.x and layout_size.y <= new_size.y:
++-                self._layout_offset.x = (new_size.x - layout_size.x)/2
++-                self._layout_offset.y = (new_size.y - layout_size.y)/2
+++                self._layout_offset.x = (new_size.x - layout_size.x)//2
+++                self._layout_offset.y = (new_size.y - layout_size.y)//2
++                 self._current_layout = layout_i
++                 break
++ 
++diff --git a/wx/lib/agw/ribbon/gallery.py b/wx/lib/agw/ribbon/gallery.py
++index b830fab7d..b86528865 100644
++--- a/wx/lib/agw/ribbon/gallery.py
+++++ b/wx/lib/agw/ribbon/gallery.py
++@@ -805,8 +805,8 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         if client.GetWidth() < 0 or client.GetHeight() < 0:
++             return relative_to
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++@@ -849,8 +849,8 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         elif direction == wx.BOTH:
++             client.IncBy(self._bitmap_padded_size)
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++diff --git a/wx/lib/agw/ribbon/panel.py b/wx/lib/agw/ribbon/panel.py
++index 79fd9bc58..901c765b6 100644
++--- a/wx/lib/agw/ribbon/panel.py
+++++ b/wx/lib/agw/ribbon/panel.py
++@@ -584,12 +584,12 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         minimum = wx.Size(*self.GetMinSize())
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 4) / 5
+++            current.x = (current.x * 4) // 5
++             if current.x < minimum.x:
++                 current.x = minimum.x
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 4) / 5
+++            current.y = (current.y * 4) // 5
++             if current.y < minimum.y:
++                 current.y = minimum.y
++ 
++@@ -668,10 +668,10 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         current = wx.Size(*relative_to)
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 5 + 3) / 4
+++            current.x = (current.x * 5 + 3) // 4
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 5 + 3) / 4
+++            current.y = (current.y * 5 + 3) // 4
++ 
++         return current
++ 
++@@ -1076,25 +1076,25 @@ def GetExpandedPosition(self, panel, expanded_size, direction):
++         pos = wx.Point()
++ 
++         if direction == wx.NORTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetY() - expanded_size.GetHeight()
++             primary_x = True
++             secondary_y = 1
++ 
++         elif direction == wx.EAST:
++             pos.x = panel.GetRight()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = -1
++ 
++         elif direction == wx.SOUTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetBottom()
++             primary_x = True
++             secondary_y = -1
++ 
++         else:
++             pos.x = panel.GetX() - expanded_size.GetWidth()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = 1
++ 
++         expanded = wx.Rect(pos, expanded_size)
++diff --git a/wx/lib/agw/ribbon/toolbar.py b/wx/lib/agw/ribbon/toolbar.py
++index 1771c6506..8c6f8b522 100644
++--- a/wx/lib/agw/ribbon/toolbar.py
+++++ b/wx/lib/agw/ribbon/toolbar.py
++@@ -1159,7 +1159,7 @@ def OnSize(self, event):
++ 
++         # Set group y positions
++         for group in self._groups:
++-            group.position.y = rowypos[group.position.y]
+++            group.position.y = int(rowypos[group.position.y])
++ 
++ 
++     def GetBestSizeForParentSize(self, parentSize):
++diff --git a/wx/lib/agw/shapedbutton.py b/wx/lib/agw/shapedbutton.py
++index f015d4e39..49523366a 100644
++--- a/wx/lib/agw/shapedbutton.py
+++++ b/wx/lib/agw/shapedbutton.py
++@@ -569,9 +569,9 @@ def DrawMainButton(self, dc, width, height):
++                 rect2 = w*main//secondary
++ 
++             if self._isup:
++-                img = self._mainbuttonup.Scale(rect2, rect3)
+++                img = self._mainbuttonup.Scale(int(rect2), int(rect3))
++             else:
++-                img = self._mainbuttondown.Scale(rect2, rect3)
+++                img = self._mainbuttondown.Scale(int(rect2), int(rect3))
++ 
++         bmp = img.ConvertToBitmap()
++ 
++@@ -599,7 +599,7 @@ def DrawMainButton(self, dc, width, height):
++                     ypos = 0
++ 
++         # Draw Finally The Bitmap
++-        dc.DrawBitmap(bmp, xpos, ypos, True)
+++        dc.DrawBitmap(bmp, int(xpos), int(ypos), True)
++ 
++         # Store Bitmap Position And Size To Draw An Elliptical Focus Indicator
++         self._xpos = xpos
++@@ -646,7 +646,7 @@ def DrawLabel(self, dc, width, height, dw=0, dh=0):
++             xp = xc - (tw//2)* cos(angle) - (th//2)*sin(angle)
++             yp = yc + (tw//2)*sin(angle) - (th//2)*cos(angle)
++ 
++-            dc.DrawRotatedText(label, xp + dw, yp + dh , angle*180/pi)
+++            dc.DrawRotatedText(label, int(xp + dw), int(yp + dh), angle*180/pi)
++ 
++ 
++     def DrawFocusIndicator(self, dc, width, height):
++@@ -676,7 +676,7 @@ def DrawFocusIndicator(self, dc, width, height):
++         else:
++             # This Is An Ellipse
++             if hasattr(self, "_xpos"):
++-                dc.DrawEllipse(self._xpos + 2, self._ypos + 2, self._imgx - 4, self._imgy - 4)
+++                dc.DrawEllipse(int(self._xpos + 2), int(self._ypos + 2), self._imgx - 4, self._imgy - 4)
++ 
++         dc.SetLogicalFunction(wx.COPY)
++ 
++diff --git a/wx/lib/agw/speedmeter.py b/wx/lib/agw/speedmeter.py
++index f196b51f2..606901d27 100644
++--- a/wx/lib/agw/speedmeter.py
+++++ b/wx/lib/agw/speedmeter.py
++@@ -580,8 +580,8 @@ def Draw(self, dc):
++         dc.SetBackground(wx.Brush(speedbackground))
++         dc.Clear()
++ 
++-        centerX = self.faceBitmap.GetWidth()/2
++-        centerY = self.faceBitmap.GetHeight()/2
+++        centerX = self.faceBitmap.GetWidth()//2
+++        centerY = self.faceBitmap.GetHeight()//2
++ 
++         self.CenterX = centerX
++         self.CenterY = centerY
++@@ -681,7 +681,7 @@ def Draw(self, dc):
++             # Draw The Filler (Both In "Advance" And "Reverse" Directions)
++ 
++             dc.SetBrush(wx.Brush(fillercolour))
++-            dc.DrawArc(xs2, ys2, xe2, ye2, centerX, centerY)
+++            dc.DrawArc(xs2, ys2, xe2, ye2, int(centerX), int(centerY))
++ 
++             if self._agwStyle & SM_DRAW_SECTORS == 0:
++                 dc.SetBrush(wx.Brush(speedbackground))
++@@ -952,7 +952,7 @@ def Draw(self, dc):
++                     y = y - height/2.0 - height*sin(angis)/2.0
++                     fancytext.RenderToDC(fancystr, dc, x, y)
++                 else:
++-                    dc.DrawText(strings, x, y)
+++                    dc.DrawText(strings, int(x), int(y))
++ 
++             # This Is The Small Rectangle --> Tick Mark
++             rectangle = colourangles[ii] + pi/2.0
++@@ -969,6 +969,7 @@ def Draw(self, dc):
++             y4 = y3 + 3*self.scale*sinrect
++ 
++             points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++            points = [(int(p[0]), int(p[1])) for p in points]
++ 
++             dc.DrawPolygon(points)
++ 
++@@ -1003,6 +1004,7 @@ def Draw(self, dc):
++                         y4 = y3 + self.scale*sinrect
++ 
++                         points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++                        points = [(int(p[0]), int(p[1])) for p in points]
++ 
++                         dc.DrawPolygon(points)
++ 
++@@ -1017,7 +1019,7 @@ def Draw(self, dc):
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++ 
++         if self._drawarc:
++-            dc.SetPen(wx.Pen(self.GetArcColour(), 2.0))
+++            dc.SetPen(wx.Pen(self.GetArcColour(), 2))
++             # If It's Not A Complete Circle, Draw The Connecting Lines And The Arc
++             if abs(abs(startangle - endangle) - 2*pi) > 1.0/180.0:
++                 dc.DrawArc(xstart, ystart, xend, yend, centerX, centerY)
++@@ -1046,7 +1048,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++             dc.SetTextForeground(middlecolour)
++-            dc.DrawText(middletext, newx, newy)
+++            dc.DrawText(middletext, int(newx), int(newy))
++ 
++         # Here We Draw The Icon In The Middle, Near The Start Of The Arrow (If Present)
++         # This Is Like The "Fuel" Icon In The Cars
++@@ -1054,8 +1056,8 @@ def Draw(self, dc):
++ 
++             middleicon = self.GetMiddleIcon()
++             middlewidth, middleheight = self.GetMiddleIconDimens()
++-            middleicon.SetWidth(middlewidth*self.scale)
++-            middleicon.SetHeight(middleheight*self.scale)
+++            middleicon.SetWidth(int(middlewidth*self.scale))
+++            middleicon.SetHeight(int(middleheight*self.scale))
++             middleangle = (startangle + endangle)/2.0
++ 
++             mw = middleicon.GetWidth()
++@@ -1064,7 +1066,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++ 
++-            dc.DrawIcon(middleicon, newx, newy)
+++            dc.DrawIcon(middleicon, int(newx), int(newy))
++ 
++             # Restore Icon Dimension, If Not Something Strange Happens
++             middleicon.SetWidth(middlewidth)
++@@ -1109,53 +1111,61 @@ def Draw(self, dc):
++                 if handstyle == "Arrow":
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++-                    dc.SetPen(wx.Pen(shadowcolour, 5*log(self.scale+1)))
+++                    dc.SetPen(wx.Pen(shadowcolour, int(5*log(self.scale+1))))
++                     dc.SetBrush(wx.Brush(shadowcolour))
++                     shadowdistance = 2.0*self.scale
++-                    dc.DrawLine(newx + shadowdistance, newy + shadowdistance,
++-                                xarr + shadowdistance, yarr + shadowdistance)
++-
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance)])
+++                    dc.DrawLine(int(newx + shadowdistance), int(newy + shadowdistance),
+++                                int(xarr + shadowdistance), int(yarr + shadowdistance))
+++
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++                 else:
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++                     dc.SetBrush(wx.Brush(shadowcolour))
++-                    dc.SetPen(wx.Pen(shadowcolour, 1.0))
+++                    dc.SetPen(wx.Pen(shadowcolour, 1))
++                     shadowdistance = 1.5*self.scale
++ 
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance),
++-                                    (x4+shadowdistance, y4+shadowdistance)])
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance),
+++                              (x4+shadowdistance, y4+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++ 
++             if handstyle == "Arrow":
++ 
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++-                dc.SetPen(wx.Pen(handcolour, 5*log(self.scale+1)))
+++                dc.SetPen(wx.Pen(handcolour, int(5*log(self.scale+1))))
++                 # Draw The "Hand", An Arrow
++-                dc.DrawLine(newx, newy, xarr, yarr)
+++                dc.DrawLine(int(newx), int(newy), int(xarr), int(yarr))
++ 
++                 # Draw The Arrow Pointer
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3)])
+++                points = [(x1, y1), (x2, y2), (x3, y3)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++             else:
++ 
++                 # Draw The Hand Pointer
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3), (x4, y4)])
+++                points = [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++ 
++     def SetIntervals(self, intervals=None):
++@@ -1527,7 +1537,7 @@ def SetMiddleTextFont(self, font=None):
++ 
++         if font is None:
++             self._middletextfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._middletextsize = 10.0
+++            self._middletextsize = 10
++             self._middletextfont.SetPointSize(self._middletextsize)
++         else:
++             self._middletextfont = font
++@@ -1599,7 +1609,7 @@ def CircleCoords(self, radius, angle, centerX, centerY):
++         x = radius*cos(angle) + centerX
++         y = radius*sin(angle) + centerY
++ 
++-        return x, y
+++        return int(x), int(y)
++ 
++ 
++     def GetIntersection(self, current, intervals):
++diff --git a/wx/lib/agw/supertooltip.py b/wx/lib/agw/supertooltip.py
++index a92ce10d1..cd0f0c9f7 100644
++--- a/wx/lib/agw/supertooltip.py
+++++ b/wx/lib/agw/supertooltip.py
++@@ -295,8 +295,8 @@ def OnPaint(self, event):
++ 
++         # Get the user options for header, bitmaps etc...
++         drawHeader, drawFooter = classParent.GetDrawHeaderLine(), classParent.GetDrawFooterLine()
++-        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height/2)
++-        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height/2, frameRect.width, frameRect.height/2+1)
+++        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height//2)
+++        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height//2, frameRect.width, frameRect.height//2+1)
++         # Fill the triple-gradient
++         dc.GradientFillLinear(topRect, topColour, middleColour, wx.SOUTH)
++         dc.GradientFillLinear(bottomRect, middleColour, bottomColour, wx.SOUTH)
++@@ -324,9 +324,9 @@ def OnPaint(self, event):
++         normalText = classParent.GetTextColour()
++         if header:
++             dc.SetTextForeground(normalText)
++-            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)/2)
+++            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)//2)
++         if headerBmp and headerBmp.IsOk():
++-            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)/2, True)
+++            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)//2, True)
++ 
++         if header or (headerBmp and headerBmp.IsOk()):
++             yPos += height
++@@ -376,7 +376,7 @@ def OnPaint(self, event):
++                 messageHeight += textHeight
++ 
++                 xText = (bmpWidth + 2 * self._spacing) if bmpWidth > 0 else self._spacing
++-                yText += textHeight/2+self._spacing
+++                yText += textHeight//2+self._spacing
++                 maxWidth = max(xText + textWidth + self._spacing, maxWidth)
++                 dc.DrawText(line, xText, yText)
++                 if isLink:
++@@ -412,8 +412,8 @@ def OnPaint(self, event):
++             if drawFooter:
++                 # Draw the separator line before the footer
++                 dc.SetPen(wx.GREY_PEN)
++-                dc.DrawLine(self._spacing, yPos-self._spacing/2+toAdd,
++-                            width-self._spacing, yPos-self._spacing/2+toAdd)
+++                dc.DrawLine(self._spacing, yPos-self._spacing//2+toAdd,
+++                            width-self._spacing, yPos-self._spacing//2+toAdd)
++         # Draw the footer and footer bitmap (if any)
++         dc.SetTextForeground(normalText)
++         height = max(textHeight, bmpHeight)
++@@ -424,7 +424,7 @@ def OnPaint(self, event):
++             maxWidth = max(bmpXPos + bmpWidth + (self._spacing*2) + textWidth, maxWidth)
++         if footerBmp and footerBmp.IsOk():
++             toAdd = (height - bmpHeight + self._spacing) / 2
++-            dc.DrawBitmap(footerBmp, bmpXPos, yPos + toAdd, True)
+++            dc.DrawBitmap(footerBmp, bmpXPos, int(yPos + toAdd), True)
++             maxWidth = max(footerBmp.GetSize().GetWidth() + bmpXPos, maxWidth)
++ 
++         maxHeight = yPos + height + toAdd
++@@ -815,7 +815,7 @@ def SetStartDelay(self, delay=1):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._startDelayTime = float(delay)
+++        self._startDelayTime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -831,7 +831,7 @@ def SetEndDelay(self, delay=1e6):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._endDelayTime = float(delay)
+++        self._endDelayTime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/toasterbox.py b/wx/lib/agw/toasterbox.py
++index b73429dd2..8efb5869b 100644
++--- a/wx/lib/agw/toasterbox.py
+++++ b/wx/lib/agw/toasterbox.py
++@@ -1316,11 +1316,11 @@ def _getTextCoords(self, dc):
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++             fh += h + textPadding
++-        y = (th - fh) / 2; coords = []
+++        y = (th - fh) // 2; coords = []
++ 
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++-            x = (tw - w) / 2
+++            x = (tw - w) // 2
++             coords.append((x, y))
++             y += h + textPadding
++ 
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index 14fc41f86..caa5e5cf4 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -914,7 +914,7 @@ def Draw(self, index, dc, x, y, flags, solidBackground=True):
++             raise Exception("Wrong index in image list")
++ 
++         bmp = self._images[index]
++-        dc.DrawBitmap(bmp, x, y, (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
+++        dc.DrawBitmap(bmp, x, int(y), (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
++ 
++         return True
++ 
++@@ -4022,7 +4022,7 @@ def SetPosition(self, x, y, spacing):
++ 
++             if item.HasImage():
++ 
++-                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)/2
+++                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)//2
++                 self._gi._rectIcon.y = self._gi._rectAll.y + 4
++ 
++             if item.HasText():
++@@ -4030,7 +4030,7 @@ def SetPosition(self, x, y, spacing):
++                 if self._gi._rectLabel.width > spacing:
++                     self._gi._rectLabel.x = self._gi._rectAll.x + 2
++                 else:
++-                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing/2) - (self._gi._rectLabel.width/2)
+++                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing//2) - (self._gi._rectLabel.width//2)
++ 
++                 self._gi._rectLabel.y = self._gi._rectAll.y + self._gi._rectAll.height + 2 - self._gi._rectLabel.height
++                 self._gi._rectHighlight.x = self._gi._rectLabel.x - 2
++@@ -4546,7 +4546,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 checked = item.IsChecked()
++-                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)/2, item.GetKind(), checked, enabled)
+++                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)//2, item.GetKind(), checked, enabled)
++                 xOld += ix
++                 width -= ix
++ 
++@@ -4557,7 +4557,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 for img in images:
++ 
++                     ix, iy = self._owner.GetImageSize([img])
++-                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)/2, enabled)
+++                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)//2, enabled)
++ 
++                     xOld += ix
++                     width -= ix
++@@ -5230,7 +5230,7 @@ def OnPaint(self, event):
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 # We draw it on the left, always
++-                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)/2, kind, checked, enabled)
+++                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)//2, kind, checked, enabled)
++                 wcheck += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++                 cw -= ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++ 
++@@ -6819,7 +6819,7 @@ def HitTestLine(self, line, x, y):
++                     # We got a checkbox-type item
++                     ix, iy = self.GetCheckboxImageSize()
++                     LH = self.GetLineHeight(line)
++-                    rect = wx.Rect(xOld, lineY + LH/2 - iy/2, ix, iy)
+++                    rect = wx.Rect(xOld, lineY + LH//2 - iy//2, ix, iy)
++                     if rect.Contains((x, y)):
++                         newItem = self.GetParent().GetItem(line, col)
++                         return newItem, ULC_HITTEST_ONITEMCHECK
++@@ -7937,13 +7937,13 @@ def MoveToItem(self, item):
++                     while start_y > view_y:
++                         start_y -= SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, start_y/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, start_y//SCROLL_UNIT_Y)
++ 
++                 if start_y + height > view_y + client_h:
++                     while start_y + height < view_y + client_h:
++                         start_y += SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)//SCROLL_UNIT_Y)
++ 
++         else: # !report
++ 
++@@ -7960,7 +7960,7 @@ def MoveToItem(self, item):
++             if rect.y + rect.height - 5 > view_y + client_h:
++                 sy = (rect.y + rect.height - client_h + hLine)/hLine
++ 
++-            self.Scroll(sx, sy)
+++            self.Scroll(int(sx), int(sy))
++ 
++ 
++ # ----------------------------------------------------------------------------
++diff --git a/wx/lib/agw/xlsgrid.py b/wx/lib/agw/xlsgrid.py
++index b505aebb4..17267fabc 100644
++--- a/wx/lib/agw/xlsgrid.py
+++++ b/wx/lib/agw/xlsgrid.py
++@@ -965,7 +965,7 @@ def Draw(self, dc, rect):
++             xp = xc - (text_width/2)*xshift - (text_height/2)*yshift
++             yp = yc + (text_width/2)*yshift - (text_height/2)*xshift
++ 
++-            dc.DrawRotatedText(value, xp, yp, self.rotation)
+++            dc.DrawRotatedText(value, int(xp), int(yp), self.rotation)
++ 
++         else:
++ 
++@@ -1125,7 +1125,7 @@ def Draw(self, dc, rect):
++             if font.escapement == 1:
++                 ypos = ypos - maxH + height
++ 
++-            dc.DrawText(chunk, start, ypos)
+++            dc.DrawText(chunk, start, int(ypos))
++             start += width
++ 
++ 
++diff --git a/wx/lib/agw/zoombar.py b/wx/lib/agw/zoombar.py
++index 1e6ec5da3..8c2afd058 100644
++--- a/wx/lib/agw/zoombar.py
+++++ b/wx/lib/agw/zoombar.py
++@@ -463,7 +463,7 @@ def SetSize(self, width, height):
++     def GetPosition(self):
++         """ Returns the button position. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -601,7 +601,7 @@ def __init__(self, bitmap=None):
++     def GetPosition(self):
++         """ Returns the position of :class:`wx.ImageBar`, as a :class:`wx.Point`. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -660,7 +660,7 @@ def SetBarColour(self, colour, xSize=None, ySize=None):
++         if xSize is not None:
++             self._size = wx.Size(xSize, ySize)
++ 
++-        bitmap.Rescale(self._size.width, self._size.height/2)
+++        bitmap.Rescale(self._size.width, self._size.height//2)
++ 
++         r1, g1, b1 = self._startColour.Red(), self._startColour.Green(), self._startColour.Blue()
++         r2, g2, b2 = colour.Red(), colour.Green(), colour.Blue()
++@@ -1065,7 +1065,7 @@ def ResetSize(self):
++             ySize += yextent
++ 
++         if self._showReflections:
++-            ySize += self._buttonSize/2
+++            ySize += self._buttonSize//2
++         if self._centerZoom:
++             ySize += self._buttonSize
++ 
++@@ -1240,7 +1240,7 @@ def DrawLabels(self, dc):
++             textWidth, textHeight = dc.GetTextExtent(label)
++             buttonPos = button.GetPosition()
++             buttonSize = button.GetSize()
++-            xpos = buttonPos.x + (buttonSize.width - textWidth)/2
+++            xpos = buttonPos.x + (buttonSize.width - textWidth)//2
++             ypos = buttonPos.y - textHeight - 2
++ 
++             dc.DrawRectangle(xpos-2, ypos-1, textWidth+4, textHeight+2)
++diff --git a/wx/lib/analogclock/analogclock.py b/wx/lib/analogclock/analogclock.py
++index 7c4b18979..1ee1d6742 100644
++--- a/wx/lib/analogclock/analogclock.py
+++++ b/wx/lib/analogclock/analogclock.py
++@@ -173,7 +173,7 @@ def _recalcCoords(self, size):
++         scale = min([float(size.width) / self.basesize.width,
++                      float(size.height) / self.basesize.height])
++ 
++-        centre = wx.Point(size.width / 2., size.height / 2.)
+++        centre = wx.Point(size.width // 2, size.height // 2)
++ 
++         self.Box.RecalcCoords(size, centre, scale)
++         self.Hands.RecalcCoords(size, centre, scale)
++diff --git a/wx/lib/analogclock/helpers.py b/wx/lib/analogclock/helpers.py
++index 88d198bee..9674de912 100644
++--- a/wx/lib/analogclock/helpers.py
+++++ b/wx/lib/analogclock/helpers.py
++@@ -37,7 +37,7 @@ def __init__(self, idx=0, pos=None, size=None, offset=0, clocksize=None,
++ 
++ 
++     def _pol2rect(self, m, t):
++-        return m * math.cos(math.radians(t)), m * math.sin(math.radians(t))
+++        return int(m * math.cos(math.radians(t))), int(m * math.sin(math.radians(t)))
++ 
++ 
++     def _rect2pol(self, x, y):
++@@ -174,7 +174,7 @@ def __init__(self, **kwargs):
++ 
++     def Draw(self, dc):
++         self.dyer.Select(dc)
++-        dc.DrawCircle(self.pos.x, self.pos.y, self.radius)
+++        dc.DrawCircle(self.pos.x, self.pos.y, int(self.radius))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -205,7 +205,7 @@ def Draw(self, dc, end, offset=0):
++             m, t = self._rect2pol(x, y)
++             polygon[i] = self._pol2rect(m, t - angle)
++ 
++-        dc.DrawPolygon(polygon, centre.x + offset, centre.y + offset)
+++        dc.DrawPolygon(polygon, int(centre.x + offset), int(centre.y + offset))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -226,7 +226,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawRectangle(x + offset, y + offset, width, height)
+++        dc.DrawRectangle(int(x + offset), int(y + offset), int(width), int(height))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -242,7 +242,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x
++         y = self.pos.y
++ 
++-        dc.DrawCircle(x + offset, y + offset, radius)
+++        dc.DrawCircle(int(x + offset), int(y + offset), int(radius))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -273,7 +273,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -290,7 +290,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -309,7 +309,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawText(self.text, x + offset, y + offset)
+++        dc.DrawText(self.text, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -321,7 +321,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawRotatedText(self.text, x + offset, y + offset, angle)
+++        dc.DrawRotatedText(self.text, int(x + offset), int(y + offset), int(angle))
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -656,7 +656,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++ 
++         # Try to find a 'good' max size for text-based ticks.
++         if a_tick.text is not None:
++-            self.font.SetPointSize(size)
+++            self.font.SetPointSize(int(size))
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(*clocksize.Get()))
++             dc.SetFont(self.font)
++@@ -686,7 +686,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++             x = centre.x + radius * math.sin(angle)
++             y = centre.y + radius * math.cos(angle)
++ 
++-            tick.SetPosition(wx.Point(x, y))
+++            tick.SetPosition(wx.Point(int(x), int(y)))
++ 
++ 
++     def GetSize(self):
++diff --git a/wx/lib/analogclock/setup.py b/wx/lib/analogclock/setup.py
++index a83c8639d..a7dffb901 100644
++--- a/wx/lib/analogclock/setup.py
+++++ b/wx/lib/analogclock/setup.py
++@@ -179,7 +179,7 @@ def __init__(self, parent, title, group="Hands"):
++         p.SetCustomColours(self.customcolours)
++         sizer.Add(p, pos=(0, 1), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.bw = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.bw = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(0, 2), span=(1, 2), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -193,7 +193,7 @@ def __init__(self, parent, title, group="Hands"):
++         p = self.ls = wx.StaticText(self, label="Size:")
++         sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.sz = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.sz = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -212,7 +212,7 @@ def __init__(self, parent, title, group="Ticks"):
++         p = wx.StaticText(self, label="Offset:")
++         sizer.Add(p, pos=(3, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.of = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.of = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(3, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++diff --git a/wx/lib/buttons.py b/wx/lib/buttons.py
++index 46d1b8747..f01a54d41 100644
++--- a/wx/lib/buttons.py
+++++ b/wx/lib/buttons.py
++@@ -453,7 +453,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         tw, th = dc.GetTextExtent(label)
++         if not self.up:
++             dx = dy = self.labelDelta
++-        dc.DrawText(label, (width-tw)/2+dx, (height-th)/2+dy)
+++        dc.DrawText(label, (width-tw)//2+dx, (height-th)//2+dy)
++ 
++ 
++     def DrawFocusIndicator(self, dc, w, h):
++@@ -844,7 +844,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++         hasMask = bmp.GetMask() != None
++-        dc.DrawBitmap(bmp, (width-bw)/2+dx, (height-bh)/2+dy, hasMask)
+++        dc.DrawBitmap(bmp, (width-bw)//2+dx, (height-bh)//2+dy, hasMask)
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -926,12 +926,12 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++ 
++-        pos_x = (width-bw-tw)/2+dx      # adjust for bitmap and text to centre
+++        pos_x = (width-bw-tw)//2+dx      # adjust for bitmap and text to centre
++         if bmp is not None:
++-            dc.DrawBitmap(bmp, pos_x, (height-bh)/2+dy, hasMask) # draw bitmap if available
+++            dc.DrawBitmap(bmp, pos_x, (height-bh)//2+dy, hasMask) # draw bitmap if available
++             pos_x = pos_x + 2   # extra spacing from bitmap
++ 
++-        dc.DrawText(label, pos_x + dx+bw, (height-th)/2+dy)      # draw the text
+++        dc.DrawText(label, pos_x + dx+bw, (height-th)//2+dy)      # draw the text
++ 
++ 
++ #----------------------------------------------------------------------
++diff --git a/wx/lib/colourchooser/pycolourchooser.py b/wx/lib/colourchooser/pycolourchooser.py
++index 61dbc02d2..124376483 100644
++--- a/wx/lib/colourchooser/pycolourchooser.py
+++++ b/wx/lib/colourchooser/pycolourchooser.py
++@@ -188,7 +188,7 @@ def __init__(self, parent, id):
++         self.colour_slider.Bind(wx.EVT_MOTION, self.onSliderMotion)
++         self.slider = wx.Slider(
++                         self, self.idSCROLL, 86, 0, self.colour_slider.HEIGHT - 1,
++-                        style=wx.SL_VERTICAL, size=(15, self.colour_slider.HEIGHT)
+++                        style=wx.SL_VERTICAL, size=(-1, self.colour_slider.HEIGHT)
++                         )
++ 
++         self.Bind(wx.EVT_COMMAND_SCROLL, self.onScroll, self.slider)
++@@ -338,7 +338,7 @@ def setSliderToV(self, v):
++         min = self.slider.GetMin()
++         max = self.slider.GetMax()
++         val = (1 - v) * max
++-        self.slider.SetValue(val)
+++        self.slider.SetValue(int(val))
++ 
++     def getVFromSlider(self):
++         """Get the current value of "V" from the v slider."""
++diff --git a/wx/lib/colourchooser/pypalette.py b/wx/lib/colourchooser/pypalette.py
++index ff1fb840c..71b9fc2df 100644
++--- a/wx/lib/colourchooser/pypalette.py
+++++ b/wx/lib/colourchooser/pypalette.py
++@@ -165,7 +165,7 @@ def DrawBuffer(self):
++             colour = wx.Colour(0, 0, 0)
++             self.buffer.SetPen(wx.Pen(colour, 1, wx.PENSTYLE_SOLID))
++             self.buffer.SetBrush(wx.Brush(colour, wx.BRUSHSTYLE_TRANSPARENT))
++-            self.buffer.DrawCircle(self.point[0], self.point[1], 3)
+++            self.buffer.DrawCircle(int(self.point[0]), int(self.point[1]), 3)
++ 
++     def HighlightPoint(self, x, y):
++         """Highlights an area of the palette with a little circle around
++diff --git a/wx/lib/floatcanvas/FCObjects.py b/wx/lib/floatcanvas/FCObjects.py
++index 58becd38c..cdf8cc53e 100644
++--- a/wx/lib/floatcanvas/FCObjects.py
+++++ b/wx/lib/floatcanvas/FCObjects.py
++@@ -296,7 +296,7 @@ def SetPen(self, LineColor, LineStyle, LineWidth):
++         else:
++             self.Pen = self.PenList.setdefault(
++                 (LineColor, LineStyle, LineWidth),
++-                wx.Pen(LineColor, LineWidth, self.LineStyleList[LineStyle]))
+++                wx.Pen(LineColor, int(LineWidth), self.LineStyleList[LineStyle]))
++ 
++     def SetHitBrush(self, HitColor):
++         """
++@@ -1202,14 +1202,14 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++             x = xc - Size/2.0
++             y = yc - Size/2.0
++             dc.SetBrush(self.Brush)
++-            dc.DrawRectangle(x, y, Size, Size)
+++            dc.DrawRectangle(int(x), int(y), Size, Size)
++         if HTdc and self.HitAble:
++             HTdc.SetPen(self.HitPen)
++             if self.Size <= 1:
++                 HTdc.DrawPoint(xc, xc)
++             else:
++                 HTdc.SetBrush(self.HitBrush)
++-                HTdc.DrawRectangle(x, y, Size, Size)
+++                HTdc.DrawRectangle(int(x), int(y), Size, Size)
++ 
++ class RectEllipse(XYObjectMixin, LineAndFillMixin, DrawObject):
++     """A RectEllipse draw object."""
++@@ -2161,7 +2161,7 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++         W = H * (self.bmpWidth / self.bmpHeight)
++         if (self.ScaledBitmap is None) or (H != self.ScaledHeight) :
++             self.ScaledHeight = H
++-            Img = self.Image.Scale(W, H)
+++            Img = self.Image.Scale(int(W), int(H))
++             self.ScaledBitmap = wx.Bitmap(Img)
++ 
++         XY = self.ShiftFun(XY[0], XY[1], W, H)
++diff --git a/wx/lib/gizmos/ledctrl.py b/wx/lib/gizmos/ledctrl.py
++index f185d5105..7f4d3fcf9 100644
++--- a/wx/lib/gizmos/ledctrl.py
+++++ b/wx/lib/gizmos/ledctrl.py
++@@ -293,7 +293,7 @@ def _drawDigit(self, dc, digit, column):
++ 
++         if digit & c.COLON:
++             dc.SetBrush(wx.Brush(lineColor))
++-            centerX = XPos + (self.m_lineLength + self.m_digitMargin) / 2
++-            radius = self.m_lineWidth / 2
++-            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) / 2, radius)
++-            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 / 4, radius)
+++            centerX = XPos + (self.m_lineLength + self.m_digitMargin) // 2
+++            radius = self.m_lineWidth // 2
+++            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) // 2, radius)
+++            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 // 4, radius)
++diff --git a/wx/lib/imagebrowser.py b/wx/lib/imagebrowser.py
++index 795e90dca..8e14727e7 100644
++--- a/wx/lib/imagebrowser.py
+++++ b/wx/lib/imagebrowser.py
++@@ -347,8 +347,8 @@ def DrawImage(self, dc):
++         owidth = int(scale*iwidth)
++         oheight = int(scale*iheight)
++ 
++-        diffx = (wwidth - owidth)/2   # center calc
++-        diffy = (wheight - oheight)/2   # center calc
+++        diffx = (wwidth - owidth)//2   # center calc
+++        diffy = (wheight - oheight)//2   # center calc
++ 
++         if not bmp:
++             if owidth!=iwidth or oheight!=iheight:
++diff --git a/wx/lib/ogl/basic.py b/wx/lib/ogl/basic.py
++index b08859ab9..0107f21fc 100644
++--- a/wx/lib/ogl/basic.py
+++++ b/wx/lib/ogl/basic.py
++@@ -1051,7 +1051,7 @@ def OnEraseContents(self, dc):
++         dc.SetPen(self.GetBackgroundPen())
++         dc.SetBrush(self.GetBackgroundBrush())
++ 
++-        dc.DrawRectangle(topLeftX - penWidth, topLeftY - penWidth, maxX + penWidth * 2 + 4, maxY + penWidth * 2 + 4)
+++        dc.DrawRectangle(int(topLeftX - penWidth), int(topLeftY - penWidth), int(maxX + penWidth * 2 + 4), int(maxY + penWidth * 2 + 4))
++ 
++     def EraseLinks(self, dc, attachment = -1, recurse = False):
++         """
++@@ -2769,9 +2769,9 @@ def OnDraw(self, dc):
++             dc.SetBrush(self._brush)
++ 
++         if self._cornerRadius:
++-            dc.DrawRoundedRectangle(x1, y1, self._width, self._height, self._cornerRadius)
+++            dc.DrawRoundedRectangle(int(x1), int(y1), self._width, self._height, self._cornerRadius)
++         else:
++-            dc.DrawRectangle(x1, y1, self._width, self._height)
+++            dc.DrawRectangle(int(x1), int(y1), self._width, self._height)
++ 
++     def GetBoundingBoxMin(self):
++         """Get the bounding box minimum."""
++@@ -2882,7 +2882,7 @@ def Create(self, the_points = None):
++             # Duplicate the list of points
++             self._points = []
++             for point in the_points:
++-                new_point = wx.Point(point[0], point[1])
+++                new_point = wx.Point(int(point[0]), int(point[1]))
++                 self._points.append(new_point)
++             self.CalculateBoundingBox()
++             self._originalWidth = self._boundWidth
++@@ -3444,7 +3444,7 @@ def OnDraw(self, dc):
++                 dc.SetPen(self._pen)
++         if self._brush:
++             dc.SetBrush(self._brush)
++-        dc.DrawEllipse(self._xpos - self.GetWidth() / 2.0, self._ypos - self.GetHeight() / 2.0, self.GetWidth(), self.GetHeight())
+++        dc.DrawEllipse(int(self._xpos - self.GetWidth() / 2.0), int(self._ypos - self.GetHeight() / 2.0), self.GetWidth(), self.GetHeight())
++ 
++     def SetSize(self, x, y, recursive = True):
++         """
++diff --git a/wx/lib/ogl/bmpshape.py b/wx/lib/ogl/bmpshape.py
++index ee2859527..e53ddb136 100644
++--- a/wx/lib/ogl/bmpshape.py
+++++ b/wx/lib/ogl/bmpshape.py
++@@ -32,7 +32,7 @@ def OnDraw(self, dc):
++ 
++         x = self._xpos - self._bitmap.GetWidth() / 2.0
++         y = self._ypos - self._bitmap.GetHeight() / 2.0
++-        dc.DrawBitmap(self._bitmap, x, y, True)
+++        dc.DrawBitmap(self._bitmap, int(x), int(y), True)
++ 
++     def SetSize(self, w, h, recursive = True):
++         """
++diff --git a/wx/lib/ogl/composit.py b/wx/lib/ogl/composit.py
++index c3b623952..eecaafb3f 100644
++--- a/wx/lib/ogl/composit.py
+++++ b/wx/lib/ogl/composit.py
++@@ -1131,11 +1131,11 @@ def OnDraw(self, dc):
++ 
++         if self._leftSide:
++             dc.SetPen(self._leftSidePen)
++-            dc.DrawLine(x1, y2, x1, y1)
+++            dc.DrawLine(int(x1), int(y2), int(x1), int(y1))
++ 
++         if self._topSide:
++             dc.SetPen(self._topSidePen)
++-            dc.DrawLine(x1, y1, x2, y1)
+++            dc.DrawLine(int(x1), int(y1), int(x2), int(y1))
++ 
++         # For testing purposes, draw a rectangle so we know
++         # how big the division is.
++diff --git a/wx/lib/ogl/divided.py b/wx/lib/ogl/divided.py
++index 0bfb1919f..0809be58c 100644
++--- a/wx/lib/ogl/divided.py
+++++ b/wx/lib/ogl/divided.py
++@@ -231,7 +231,7 @@ def OnDrawContents(self, dc):
++                 regionPen = region.GetActualPen()
++                 if regionPen:
++                     dc.SetPen(regionPen)
++-                    dc.DrawLine(leftX, y, rightX, y)
+++                    dc.DrawLine(int(leftX), int(y), int(rightX), int(y))
++ 
++             currentY = actualY
++ 
++diff --git a/wx/lib/ogl/lines.py b/wx/lib/ogl/lines.py
++index 948b85d82..50c07e046 100644
++--- a/wx/lib/ogl/lines.py
+++++ b/wx/lib/ogl/lines.py
++@@ -1200,7 +1200,7 @@ def OnDraw(self, dc):
++ 
++         points = []
++         for point in self._lineControlPoints:
++-            points.append(wx.Point(point[0], point[1]))
+++            points.append(wx.Point(int(point[0]), int(point[1])))
++ 
++         if self._isSpline:
++             dc.DrawSpline(points)
++diff --git a/wx/lib/ogl/oglmisc.py b/wx/lib/ogl/oglmisc.py
++index 8588a72b7..a8be3fc53 100644
++--- a/wx/lib/ogl/oglmisc.py
+++++ b/wx/lib/ogl/oglmisc.py
++@@ -300,10 +300,10 @@ def DrawFormattedText(dc, text_list, xpos, ypos, width, height, formatMode):
++         yoffset = ypos - height / 2.0
++ 
++     # +1 to allow for rounding errors
++-    dc.SetClippingRegion(xpos - width / 2.0, ypos - height / 2.0, width + 1, height + 1)
+++    dc.SetClippingRegion(int(xpos - width / 2.0), int(ypos - height / 2.0), int(width + 1), int(height + 1))
++ 
++     for line in text_list:
++-        dc.DrawText(line.GetText(), xoffset + line.GetX(), yoffset + line.GetY())
+++        dc.DrawText(line.GetText(), int(xoffset + line.GetX()), int(yoffset + line.GetY()))
++ 
++     dc.DestroyClippingRegion()
++ 
++diff --git a/wx/lib/plot/examples/demo.py b/wx/lib/plot/examples/demo.py
++index 98fbaad3a..02bec1d9f 100644
++--- a/wx/lib/plot/examples/demo.py
+++++ b/wx/lib/plot/examples/demo.py
++@@ -984,7 +984,7 @@ def DrawPointLabel(self, dc, mDataDict):
++ 
++         sx, sy = mDataDict["scaledXY"]  # scaled x,y of closest point
++         # 10by10 square centered on point
++-        dc.DrawRectangle(sx - 5, sy - 5, 10, 10)
+++        dc.DrawRectangle(int(sx - 5), int(sy - 5), 10, 10)
++         px, py = mDataDict["pointXY"]
++         cNum = mDataDict["curveNum"]
++         pntIn = mDataDict["pIndex"]
++@@ -992,7 +992,7 @@ def DrawPointLabel(self, dc, mDataDict):
++         # make a string to display
++         s = "Crv# %i, '%s', Pt. (%.2f,%.2f), PtInd %i" % (
++             cNum, legend, px, py, pntIn)
++-        dc.DrawText(s, sx, sy + 1)
+++        dc.DrawText(s, int(sx), int(sy + 1))
++ 
++ 
++ def run_demo():
++diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py
++index dd3f77d52..abee47efb 100644
++--- a/wx/lib/plot/plotcanvas.py
+++++ b/wx/lib/plot/plotcanvas.py
++@@ -174,24 +174,24 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++ 
++         # Default Pens
++         self._gridPen = wx.Pen(wx.Colour(180, 180, 180, 255),
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_DOT)
++ 
++         self._centerLinePen = wx.Pen(wx.RED,
++-                                     self._pointSize[0],
+++                                     int(self._pointSize[0]),
++                                      wx.PENSTYLE_SHORT_DASH)
++ 
++         self._axesPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++ 
++         self._tickPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++         self._tickLength = tuple(-x * 2 for x in self._pointSize)
++ 
++         self._diagonalPen = wx.Pen(wx.BLUE,
++-                                   self._pointSize[0],
+++                                   int(self._pointSize[0]),
++                                    wx.PENSTYLE_DOT_DASH)
++ 
++     def SetCursor(self, cursor):
++@@ -1925,10 +1925,10 @@ def _Draw(self, graphics, xAxis=None, yAxis=None, dc=None):
++         # set clipping area so drawing does not occur outside axis box
++         ptx, pty, rectWidth, rectHeight = self._point2ClientCoord(p1, p2)
++         # allow graph to overlap axis lines by adding units to w and h
++-        dc.SetClippingRegion(ptx * self._pointSize[0],
++-                             pty * self._pointSize[1],
++-                             rectWidth * self._pointSize[0] + 2,
++-                             rectHeight * self._pointSize[1] + 1)
+++        dc.SetClippingRegion(int(ptx * self._pointSize[0]),
+++                             int(pty * self._pointSize[1]),
+++                             int(rectWidth * self._pointSize[0] + 2),
+++                             int(rectHeight * self._pointSize[1] + 1))
++         # Draw the lines and markers
++ #        start = _time.perf_counter()
++         graphics.draw(dc)
++@@ -2280,7 +2280,7 @@ def _drawLegend(self, dc, graphics, rhsW, topH, legendBoxWH,
++             pnt = ((trhc[0] + legendLHS + legendSymExt[0]
++                     + 5 * self._pointSize[0]),
++                    trhc[1] + s + lineHeight / 2. - legendTextExt[1] / 2)
++-            dc.DrawText(o.getLegend(), pnt[0], pnt[1])
+++            dc.DrawText(o.getLegend(), int(pnt[0]), int(pnt[1]))
++         dc.SetFont(self._getFont(self._fontSizeAxis))  # reset
++ 
++     def _titleLablesWH(self, dc, graphics):
++@@ -2329,7 +2329,7 @@ def _drawRubberBand(self, corner1, corner2):
++         dc.SetPen(wx.Pen(wx.BLACK))
++         dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_TRANSPARENT))
++         dc.SetLogicalFunction(wx.INVERT)
++-        dc.DrawRectangle(ptx, pty, rectWidth, rectHeight)
+++        dc.DrawRectangle(int(ptx), int(pty), int(rectWidth), int(rectHeight))
++         dc.SetLogicalFunction(wx.COPY)
++ 
++     def _getFont(self, size):
++@@ -2423,7 +2423,7 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.gridPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         x, y, width, height = self._point2ClientCoord(p1, p2)
++@@ -2432,13 +2432,13 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++             if self.enableGrid[0]:
++                 for x, _ in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0], pt[1] - height)
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - height))
++ 
++         if self._ySpec != 'none':
++             if self.enableGrid[1]:
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0] + width, pt[1])
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0] + width), int(pt[1]))
++ 
++     @TempStyle('pen')
++     def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2471,7 +2471,7 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.tickPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         # lengthen lines for printing
++@@ -2484,13 +2484,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] - xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - xTickLength)))
++                 dc.DrawLineList(lines)
++             if ticks.top:
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] + xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] + xTickLength)))
++                 dc.DrawLineList(lines)
++ 
++         if self.ySpec != 'none':
++@@ -2498,13 +2498,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] + yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] + yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++             if ticks.right:
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] - yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] - yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++ 
++     @TempStyle('pen')
++@@ -2531,25 +2531,25 @@ def _drawCenterLines(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.centerLinePen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._centerLinesEnabled in ('Horizontal', True):
++             y1 = scale[1] * p1[1] + shift[1]
++             y2 = scale[1] * p2[1] + shift[1]
++             y = (y1 - y2) / 2.0 + y2
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        y,
++-                        scale[0] * p2[0] + shift[0],
++-                        y)
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(y),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(y))
++         if self._centerLinesEnabled in ('Vertical', True):
++             x1 = scale[0] * p1[0] + shift[0]
++             x2 = scale[0] * p2[0] + shift[0]
++             x = (x1 - x2) / 2.0 + x2
++-            dc.DrawLine(x,
++-                        scale[1] * p1[1] + shift[1],
++-                        x,
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(x),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(x),
+++                        int(scale[1] * p2[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawDiagonals(self, dc, p1, p2, scale, shift):
++@@ -2575,19 +2575,19 @@ def _drawDiagonals(self, dc, p1, p2, scale, shift):
++         """
++         pen = self.diagonalPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._diagonalsEnabled in ('Bottomleft-Topright', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]))
++         if self._diagonalsEnabled in ('Bottomright-Topleft', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxes(self, dc, p1, p2, scale, shift):
++@@ -2614,7 +2614,7 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.axesPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         axes = self.enableAxes
++@@ -2623,24 +2623,24 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p1[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p1[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.top:
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p2[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p2[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++         if self.ySpec != 'none':
++             if axes.left:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p1[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p1[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.right:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p2[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p2[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2686,8 +2686,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] + 2 * self._pointSize[1] - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] + 2 * self._pointSize[1] - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2698,8 +2698,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w, h = dc.GetTextExtent(label)
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] - 2 * self._pointSize[1] - h - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] - 2 * self._pointSize[1] - h - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2712,8 +2712,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] - w - 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] - w - 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2725,8 +2725,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] + 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] + 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2785,7 +2785,7 @@ def _drawPlotTitle(self, dc, graphics, lhsW, rhsW, titleWH):
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - titleWH[0] / 2.,
++             self.plotbox_origin[1] - self.plotbox_size[1]
++         )
++-        dc.DrawText(graphics.title, titlePos[0], titlePos[1])
+++        dc.DrawText(graphics.title, int(titlePos[0]), int(titlePos[1]))
++ 
++     def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++                         xLabelWH, yLabelWH):
++@@ -2806,7 +2806,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - xLabelWH[0] / 2.,
++             self.plotbox_origin[1] - xLabelWH[1] - yTickLength
++         )
++-        dc.DrawText(graphics.xLabel, xLabelPos[0], xLabelPos[1])
+++        dc.DrawText(graphics.xLabel, int(xLabelPos[0]), int(xLabelPos[1]))
++         yLabelPos = (
++             self.plotbox_origin[0] - 3 * self._pointSize[0] + xTickLength,
++             self.plotbox_origin[1] - bottomH
++@@ -2814,7 +2814,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++         )
++         if graphics.yLabel:  # bug fix for Linux
++             dc.DrawRotatedText(
++-                graphics.yLabel, yLabelPos[0], yLabelPos[1], 90)
+++                graphics.yLabel, int(yLabelPos[0]), int(yLabelPos[1]), 90)
++ 
++     @TempStyle('pen')
++     def _drawPlotAreaLabels(self, dc, graphics, lhsW, rhsW, titleWH,
++@@ -2942,7 +2942,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++ 
++-            self.sb_hor.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_hor.SetScrollbar(pos, pagesize, int(sbfullrange), pagesize)
++             self._sb_xunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++@@ -2964,7 +2964,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++             pos = (sbfullrange - 1 - pos - pagesize)
++-            self.sb_vert.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_vert.SetScrollbar(int(pos), pagesize, int(sbfullrange), pagesize)
++             self._sb_yunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++diff --git a/wx/lib/plot/polyobjects.py b/wx/lib/plot/polyobjects.py
++index 26a54f8f7..725b0164e 100644
++--- a/wx/lib/plot/polyobjects.py
+++++ b/wx/lib/plot/polyobjects.py
++@@ -417,7 +417,7 @@ def draw(self, dc, printerScale, coord=None):
++ 
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_BUTT)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -518,7 +518,7 @@ def draw(self, dc, printerScale, coord=None):
++         style = self.attributes['style']
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_ROUND)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -590,7 +590,7 @@ def draw(self, dc, printerScale, coord=None):
++         if fillcolour and not isinstance(fillcolour, wx.Colour):
++             fillcolour = wx.Colour(fillcolour)
++ 
++-        dc.SetPen(wx.Pen(colour, width))
+++        dc.SetPen(wx.Pen(colour, int(width)))
++         if fillcolour:
++             dc.SetBrush(wx.Brush(fillcolour, fillstyle))
++         else:
++@@ -618,6 +618,7 @@ def _circle(self, dc, coords, size=1):
++         dc.DrawEllipseList(rect.astype(np.int32))
++ 
++     def _dot(self, dc, coords, size=1):
+++        coords = [(int(c[0]), int(c[1])) for c in coords]
++         dc.DrawPointList(coords)
++ 
++     def _square(self, dc, coords, size=1):
++@@ -699,7 +700,7 @@ def set_pen_and_brush(self, dc, printerScale):
++ 
++         if not isinstance(pencolour, wx.Colour):
++             pencolour = wx.Colour(pencolour)
++-        pen = wx.Pen(pencolour, penwidth, penstyle)
+++        pen = wx.Pen(pencolour, int(penwidth), penstyle)
++         pen.SetCap(wx.CAP_BUTT)
++ 
++         if not isinstance(fillcolour, wx.Colour):
++@@ -790,6 +791,7 @@ def draw(self, dc, printerScale, coord=None):
++                 raise TypeError(err_str.format(type(barwidth)))
++ 
++             rects = [self.calc_rect(x, y, w) for x, y, w in pts]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3])) for r in rects]
++             dc.DrawRectangleList(rects)
++         else:
++             dc.DrawLines(coord)  # draw legend line
++@@ -858,6 +860,8 @@ def draw(self, dc, printerScale, coord=None):
++             rects = [self.calc_rect(y, low, high)
++                      for y, (low, high)
++                      in zip(self.hist, self.bins)]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3]))
+++                     for r in rects]
++ 
++             dc.DrawRectangleList(rects)
++         else:
++@@ -1114,10 +1118,10 @@ def _draw_iqr_box(self, dc, printerScale):
++                                       self.currentShift)
++ 
++         # rectangles are drawn (left, top, width, height) so adjust
++-        iqr_box = [iqr_box[0][0],                   # X (left)
++-                   iqr_box[0][1],                   # Y (top)
++-                   iqr_box[1][0] - iqr_box[0][0],   # Width
++-                   iqr_box[1][1] - iqr_box[0][1]]   # Height
+++        iqr_box = [int(iqr_box[0][0]),                   # X (left)
+++                   int(iqr_box[0][1]),                   # Y (top)
+++                   int(iqr_box[1][0] - iqr_box[0][0]),   # Width
+++                   int(iqr_box[1][1] - iqr_box[0][1])]   # Height
++ 
++         box_pen = wx.Pen(wx.BLACK, 3, wx.PENSTYLE_SOLID)
++         box_brush = wx.Brush(wx.GREEN, wx.BRUSHSTYLE_SOLID)
++@@ -1503,7 +1507,7 @@ def OnPrintPage(self, page):
++         self.graph._setSize(plotAreaW, plotAreaH)
++ 
++         # Set offset and scale
++-        dc.SetDeviceOrigin(pixLeft, pixTop)
+++        dc.SetDeviceOrigin(int(pixLeft), int(pixTop))
++ 
++         # Thicken up pens and increase marker size for printing
++         ratioW = float(plotAreaW) / clientDcSize[0]
++diff --git a/wx/lib/popupctl.py b/wx/lib/popupctl.py
++index 883be5ae5..236501f6d 100644
++--- a/wx/lib/popupctl.py
+++++ b/wx/lib/popupctl.py
++@@ -124,7 +124,7 @@ def Display(self):
++         selfSize = self.GetSize()
++         tcSize = self.ctrl.GetSize()
++ 
++-        pos.x -= (selfSize.width - tcSize.width) / 2
+++        pos.x -= (selfSize.width - tcSize.width) // 2
++         if pos.x + selfSize.width > dSize.width:
++             pos.x = dSize.width - selfSize.width
++         if pos.x < 0:
++diff --git a/wx/lib/scrolledpanel.py b/wx/lib/scrolledpanel.py
++index e4c482af9..1f783ea97 100644
++--- a/wx/lib/scrolledpanel.py
+++++ b/wx/lib/scrolledpanel.py
++@@ -222,4 +222,4 @@ def ScrollChildIntoView(self, child):
++         # if we need to adjust
++         if new_vs_x != -1 or new_vs_y != -1:
++             #print("%s: (%s, %s)" % (self.GetName(), new_vs_x, new_vs_y))
++-            self.Scroll(new_vs_x, new_vs_y)
+++            self.Scroll(int(new_vs_x), int(new_vs_y))
++diff --git a/wx/lib/throbber.py b/wx/lib/throbber.py
++index 9954d6b27..ee8c51209 100644
++--- a/wx/lib/throbber.py
+++++ b/wx/lib/throbber.py
++@@ -200,11 +200,11 @@ def Draw(self, dc):
++         """
++         dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True)
++         if self.overlay and self.showOverlay:
++-            dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True)
+++            dc.DrawBitmap(self.overlay, int(self.overlayX), int(self.overlayY), True)
++         if self.label and self.showLabel:
++-            dc.DrawText(self.label, self.labelX, self.labelY)
+++            dc.DrawText(self.label, int(self.labelX), int(self.labelY))
++             dc.SetTextForeground(wx.WHITE)
++-            dc.DrawText(self.label, self.labelX-1, self.labelY-1)
+++            dc.DrawText(self.label, int(self.labelX-1), int(self.labelY-1))
++ 
++ 
++     def OnPaint(self, event):
++diff --git a/wx/lib/ticker.py b/wx/lib/ticker.py
++index 04abf0d44..4e684b4cd 100644
++--- a/wx/lib/ticker.py
+++++ b/wx/lib/ticker.py
++@@ -86,7 +86,7 @@ def Stop(self):
++     def Start(self):
++         """Starts the text moving"""
++         if not self.timer.IsRunning():
++-            self.timer.Start(1000 / self._fps)
+++            self.timer.Start(1000 // self._fps)
++ 
++ 
++     def IsTicking(self):
++@@ -208,7 +208,7 @@ def DrawText(self, dc):
++             offx = self._offset - self._extent[0]
++         else:
++             offx = self.GetSize()[0] - self._offset
++-        offy = (self.GetSize()[1] - self._extent[1]) / 2 #centered vertically
+++        offy = (self.GetSize()[1] - self._extent[1]) // 2 #centered vertically
++         dc.DrawText(self._text, offx, offy)
++ 
++ 
+
diff --git a/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
new file mode 100644
index 000000000000..88c3ca189647
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
@@ -0,0 +1,57 @@
+From 1d5fd72dff63d62dd19b77e489d4115245d4d453 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 28 2021 02:58:12 +0000
+Subject: Fix more Python 3.10 issues with AGW FlatNotebook (#2035790)
+
+
+---
+
+diff --git a/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+new file mode 100644
+index 0000000..e8b74ac
+--- /dev/null
++++ b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+@@ -0,0 +1,43 @@
++From aa3dca0e40bd0701e82ce40297a982b5b84844dc Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Mon, 27 Dec 2021 19:48:55 -0500
++Subject: [PATCH] Fix additional Python 3.10 issues with AGW FlatNotebook
++
++---
++ wx/lib/agw/flatnotebook.py | 14 +++++++-------
++ 1 file changed, 7 insertions(+), 7 deletions(-)
++
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index d33f71d51..61bc4efb3 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -925,14 +925,14 @@ def DrawButton(dc, rect, focus, upperTabs):
++ 
++     if focus:
++         if upperTabs:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*8)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*8)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*8))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*8))
++         else:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*5)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*5)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*5))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*5))
++     else:
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 2)))
+++        rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 2)))
++ 
++     # Define the top region
++     top = wx.Rect(rect.GetTopLeft(), rightPt)
++@@ -2766,7 +2766,7 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         if pageTextColour is not None:
++             dc.SetTextForeground(pageTextColour)
++ 
++-        dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset, imageYCoord)
+++        dc.DrawText(pc.GetPageText(tabIdx), int(posx + textOffset), imageYCoord)
++ 
++         # draw 'x' on tab (if enabled)
++         if pc.HasAGWFlag(FNB_X_ON_TAB) and tabIdx == pc.GetSelection():
diff --git a/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
new file mode 100644
index 000000000000..6f21ecb7a718
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
@@ -0,0 +1,52 @@
+Backport https://github.com/wxWidgets/Phoenix/pull/1849
+Regarding segfault as in https://github.com/OSGeo/grass/issues/1123
+
+From 5cace47aaece3cc4f2e6ea97d7fd5bb8ed316ac9 Mon Sep 17 00:00:00 2001
+From: Robin Dunn <robin@alldunn.com>
+Date: Wed, 18 Nov 2020 10:52:53 -0800
+Subject: [PATCH] Restore GIL acquisition in wxPseudoDC::FindObjects*
+
+---
+ src/pseudodc.cpp | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/pseudodc.cpp b/src/pseudodc.cpp
+index 5890ed7e2..ed4bcd06a 100644
+--- a/src/pseudodc.cpp
++++ b/src/pseudodc.cpp
+@@ -483,7 +483,7 @@ bool wxPseudoDC::GetIdGreyedOut(int id)
+ // ----------------------------------------------------------------------------
+ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -501,7 +501,6 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+         }
+         pt = pt->GetNext();
+     }
+-    //wxPyEndBlockThreads(blocked);
+     return pyList;
+ }
+ 
+@@ -511,7 +510,7 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+                                   wxCoord radius, const wxColor& bg)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -611,8 +610,7 @@ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+         maskdc.SelectObject(wxNullBitmap);
+         memdc.SelectObject(wxNullBitmap);
+     }
+-    //wxPyEndBlockThreads(blocked);
+-    return pyList;
++     return pyList;
+ }
+ 
+ // ----------------------------------------------------------------------------
diff --git a/srcpkgs/wxPython4/template b/srcpkgs/wxPython4/template
index 554174105a36..afea1b55bf90 100644
--- a/srcpkgs/wxPython4/template
+++ b/srcpkgs/wxPython4/template
@@ -1,7 +1,7 @@
 # Template file for 'wxPython4'
 pkgname=wxPython4
 version=4.0.7
-revision=4
+revision=5
 wrksrc="wxPython-${version}"
 build_style=python3-module
 make_build_args="--skip-build"
@@ -10,6 +10,7 @@ hostmakedepends="pkg-config python3-setuptools python3-pathlib2"
 makedepends="python3-devel wxWidgets-gtk3-devel SDL2-devel webkit2gtk-devel
  gst-plugins-base1-devel"
 depends="python3 python3-six python3-numpy python3-Pillow"
+checkdepends="python3-six python3-numpy python3-Pillow"
 short_desc="WxWidgets GUI toolkit library (Python3 Bindings)"
 maintainer="Jasper Chan <jasperchan515@gmail.com>"
 license="custom:wxWindows"

From 5f78dc2119e58d0de6df1461b9577f30da304c23 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 21:56:03 +0100
Subject: [PATCH 09/17] grass: update to 7.8.7RC1; rebuild against libgdal and
 proj

Version 7.8.7RC1 includes a workaround for a wxPython issue
https://github.com/OSGeo/grass/issues/1971#issuecomment-993622613
---
 common/shlibs                              |   7 ++
 srcpkgs/grass/patches/musl-build-fix.patch |  13 +++
 srcpkgs/grass/template                     | 128 +++++++++++++++++----
 3 files changed, 127 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/common/shlibs b/common/shlibs
index 5a76dc9ee9e0..dd56978f4269 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4117,3 +4117,10 @@ libkmlengine.so.1 libkml-1.3.0_1
 libkmlregionator.so.1 libkml-1.3.0_1
 libkmlxsd.so.1 libkml-1.3.0_1
 libkmlconvenience.so.1 libkml-1.3.0_1
+libgrass_dbmibase.7.8.so grass-7.8.7RC1_1
+libgrass_dbmiclient.7.8.so grass-7.8.7RC1_1
+libgrass_gis.7.8.so grass-7.8.7RC1_1
+libgrass_gproj.7.8.so grass-7.8.7RC1_1
+libgrass_imagery.7.8.so grass-7.8.7RC1_1
+libgrass_raster.7.8.so grass-7.8.7RC1_1
+libgrass_vector.7.8.so grass-7.8.7RC1_1
diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..364ee30be4d9
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,13 @@
+error: unknown type name 'int64_t' patch for musl
+
+diff --git a/include/gis.h b/include/gis.h
+--- a/include/gis.h
++++ b/include/gis.h
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ 
+ 
+ /* Grass and local include files */
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..167faa401385 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,116 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.7RC1
+revision=1
+_binversion=${version//./}
+_binversion=${_binversion:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=/usr/lib
+ --bindir=/usr/bin
+ --libdir=/usr/lib
+ --libexec=/usr/libexec
+ --enable-largefile
+ --with-blas
+ --with-blas-includes=/usr/include
+ --with-bzip2
+ --with-bzlib
+ --with-cairo
+ --with-cxx
+ --with-freetype
+ --with-freetype-includes=/usr/include/freetype2
+ --with-gdal
+ --with-geos
+ --with-glw
+ --with-lapack
+ --with-lapack-includes=/usr/include
+ --with-mysql
+ --with-mysql-includes=/usr/include/mysql
+ --with-netcdf=/usr/bin/nc-config
+ --with-nls
+ --with-openmp
+ --with-postgres
+ --with-postgres-includes=/usr/include/postgresql
+ --with-postgres-libs=/usr/lib/psql14/lib/postgresql
+ --with-proj
+ --with-proj-share=/usr/share
+ --with-pthread
+ --with-python=/usr/bin/python3-config
+ --with-readline
+ --with-regex
+ --with-sqlite
+ --with-wxwidgets"
+hostmakedepends="flex
+ gettext
+ libgdal-tools
+ pkg-config
+ python3-numpy
+ python3-six
+ tar"
+makedepends="bison
+ blas-devel
+ bzip2-devel
+ cairo-devel
+ fftw-devel
+ freetype-devel
+ geos-devel
+ gettext-devel
+ glu-devel
+ lapack-devel
+ libgdal-devel
+ libgomp-devel
+ libmysqlclient-devel
+ libpng-devel
+ libzstd-devel
+ netcdf-devel
+ postgresql-libs-devel
+ proj-devel
+ python3-devel
+ python3-Pillow
+ python3-six
+ readline-devel
+ sqlite-devel
+ tiff-devel
+ zlib-devel"
+depends="libgdal python3-numpy wxPython4"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=fa1d6ccc1fde4cbea0be095256729421c41c1a12bf621fe124d0d2c8e826de6a
 nocross="tries to execute target binaries"
 
+shlib_provides="
+ libgrass_dbmibase.${version%.*}.so
+ libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so
+ libgrass_gproj.${version%.*}.so
+ libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so
+ libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass78 \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binversion}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binversion}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binversion}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binversion}.sh
+
+	vinstall grass.pc 644 usr/share/pkgconfig
+	vinstall gui/icons/grass.desktop 644 usr/share/applications
+
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

From 1fdc391e7153a77a7d83b99ea6b4ad78eb0db0a1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 10/17] merkaartor: rebuild against libgdal-3.4.1 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From ceaed669580e49e6fab850d3a50d267fd4bebf2e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 11/17] OpenOrienteering-Mapper: rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From 6b172ae221ee6a9e887f5a472e1984a8b3c8c122 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 12/17] osg: rebuild against libgdal-3.4.1, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From 1da4a2054cf6ae369e02f4613c27be83b6c6deb6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 13/17] sumo: update to 1.9.2; rebuild against libgdal-3.4.1
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 common/shlibs         |  2 ++
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index dd56978f4269..f0436909d066 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4124,3 +4124,5 @@ libgrass_gproj.7.8.so grass-7.8.7RC1_1
 libgrass_imagery.7.8.so grass-7.8.7RC1_1
 libgrass_raster.7.8.so grass-7.8.7RC1_1
 libgrass_vector.7.8.so grass-7.8.7RC1_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index e760fdd45aee..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=4
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From a64d8472b0bfc2c0a3fd4e06e9e8efe32064b912 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 14/17] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From a6fd73cb8b2b600076e495808ed8c39bb85d56f3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 15/17] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 1e3e295bcb5cda5be7d175e7b5269854f03411db Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 16/17] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From f8264b07202842e65e216f289ac857e783592c42 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Feb 2022 22:46:45 +0100
Subject: [PATCH 17/17] New package: libspatialite-5.0.1

---
 common/shlibs                                 |  2 +
 .../patches/disable_check_drop_rename.patch   | 28 +++++++++++++
 .../patches/disable_check_sql_stmt.patch      | 29 +++++++++++++
 srcpkgs/libspatialite/template                | 42 +++++++++++++++++++
 4 files changed, 101 insertions(+)
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index f0436909d066..5f7e7bac88d3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4117,6 +4117,8 @@ libkmlengine.so.1 libkml-1.3.0_1
 libkmlregionator.so.1 libkml-1.3.0_1
 libkmlxsd.so.1 libkml-1.3.0_1
 libkmlconvenience.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.1_1
+mod_spatialite.so.7 libspatialite-5.0.1_1
 libgrass_dbmibase.7.8.so grass-7.8.7RC1_1
 libgrass_dbmiclient.7.8.so grass-7.8.7RC1_1
 libgrass_gis.7.8.so grass-7.8.7RC1_1
diff --git a/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch b/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
new file mode 100644
index 000000000000..30b67f5b8f61
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
@@ -0,0 +1,28 @@
+Disable check_drop_rename test. It fails with:
+RenameTable "table_1" error: RenameTable exception - error in trigger ISO_metadata_reference_row_id_value_insert: no such column: rowid.
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index fec25dd..50b16ae 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -74,7 +74,6 @@ check_PROGRAMS = check_endian \
+ 		check_sequence \
+ 		check_stored_proc \
+ 		check_wms \
+-		check_drop_rename \
+ 		routing_test \
+ 		geojson_test \
+ 		check_zipshp
+diff --git a/test/Makefile.in b/test/Makefile.in
+index 8a0b154..52a1066 100644
+--- a/test/Makefile.in
++++ b/test/Makefile.in
+@@ -124,7 +124,7 @@ check_PROGRAMS = check_endian$(EXEEXT) check_version$(EXEEXT) \
+ 	check_network2d$(EXEEXT) check_network3d$(EXEEXT) \
+ 	check_network_log$(EXEEXT) check_virtualknn$(EXEEXT) \
+ 	check_sequence$(EXEEXT) check_stored_proc$(EXEEXT) \
+-	check_wms$(EXEEXT) check_drop_rename$(EXEEXT) \
++	check_wms$(EXEEXT) \
+ 	routing_test$(EXEEXT) geojson_test$(EXEEXT) \
+ 	check_zipshp$(EXEEXT) $(am__EXEEXT_1)
+ @ENABLE_GEOPACKAGE_TRUE@am__append_1 = \
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch b/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
new file mode 100644
index 000000000000..1dc3b5705955
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
@@ -0,0 +1,29 @@
+Disable check_sql_stmt tests
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..31c10a5577e7
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,42 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.1
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config librttopo geos-devel libxml2"
+makedepends="freexl-devel
+ geos-devel
+ librttopo-devel
+ libxml2-devel
+ minizip-devel
+ proj-devel
+ sqlite-devel
+ zlib-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (32 preceding siblings ...)
  2022-02-15 21:57 ` [PR PATCH] [Updated] " ar-jan
@ 2022-02-15 22:02 ` ar-jan
  2022-02-15 22:13 ` ar-jan
                   ` (23 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-15 22:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 208907 bytes --]

From cbbcc5ddb0466c3d823494210358e6b0383a5155 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/17] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 0c60260b4642..b0fcfd04926e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From fea1624fcb311b75a8d42aa87c93cfcd194ea973 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Feb 2022 14:44:54 +0100
Subject: [PATCH 02/17] New package: librttopo-1.1.0

The RT Topology Library exposes an API to create and manage standard
(ISO 13249 aka SQL/MM) topologies using user-provided data stores.

It is needed to build libspatialite (as of v5.0.1) with tests passing.
---
 common/shlibs              |  1 +
 srcpkgs/librttopo-devel    |  1 +
 srcpkgs/librttopo/template | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 120000 srcpkgs/librttopo-devel
 create mode 100644 srcpkgs/librttopo/template

diff --git a/common/shlibs b/common/shlibs
index b0fcfd04926e..734c16281f0e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4110,3 +4110,4 @@ libawt_xawt.so openjdk17-jre-17.0.1+12_1
 libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
+librttopo.so.1 librttopo-1.1.0_1
diff --git a/srcpkgs/librttopo-devel b/srcpkgs/librttopo-devel
new file mode 120000
index 000000000000..acf3607f5fec
--- /dev/null
+++ b/srcpkgs/librttopo-devel
@@ -0,0 +1 @@
+librttopo
\ No newline at end of file
diff --git a/srcpkgs/librttopo/template b/srcpkgs/librttopo/template
new file mode 100644
index 000000000000..b7f6b2a700d6
--- /dev/null
+++ b/srcpkgs/librttopo/template
@@ -0,0 +1,29 @@
+# Template file for 'librttopo'
+pkgname=librttopo
+version=1.1.0
+revision=1
+wrksrc="${pkgname}"
+build_style=gnu-configure
+hostmakedepends="base-devel autoconf-archive"
+makedepends="base-devel autoconf-archive geos-devel"
+short_desc="RT Topology Library exposes an API for managing standard topologies"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://git.osgeo.org/gitea/rttopo/librttopo"
+distfiles="https://git.osgeo.org/gitea/rttopo/librttopo/archive/librttopo-${version}.tar.gz"
+checksum="2e2fcabb48193a712a6c76ac9a9be2a53f82e32f91a2bc834d9f1b4fa9cd879f"
+
+pre_configure() {
+	autoreconf -if
+}
+
+librttopo-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+		vmove usr/lib/pkgconfig
+	}
+}

From 29c8dc4da7c4bdc23ff707391d79f392fa327ca8 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/17] New package: libkml-1.3.0

---
 common/shlibs                          |  6 ++++++
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 ++++++++++++++++
 srcpkgs/libkml/template                | 27 ++++++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/common/shlibs b/common/shlibs
index 734c16281f0e..7cf876600089 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4111,3 +4111,9 @@ libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
 librttopo.so.1 librttopo-1.1.0_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libkmlconvenience.so.1 libkml-1.3.0_1
diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..b67eece4d8ba
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,27 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="boost-devel
+ expat-devel
+ minizip-devel
+ uriparser-devel
+ zlib-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From e0accd00521017f87336de9e3e57eff79130fcdd Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 04/17] libgdal: update to 3.4.1 and rebuild against proj-7.2.1

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 105 ++++++++++++++++--
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 95 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 7cf876600089..5a76dc9ee9e0 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2510,7 +2510,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..5fca579954fa 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,100 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.1
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libspatialite-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ libkml-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=e360387bc25ec24940f46afbeada48002d72c74aaf9eccf2a40e8d74e711a2e4
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +116,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 01a69cdb4de3def99d1468f68a02b07fd8701fe7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 05/17] postgis: update to 3.1.5; rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..f52cd6657988 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.1.5
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 10179ed5c9891b2b85d2e7a191ad6b4d5e6ea467 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 06/17] postgis-postgresql13: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..a0f5c89ef4da 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
-revision=2
+version=3.1.5
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 51f60c812362b55b1b8123ae1f421b5c8665dbff Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 07/17] postgis-postgresql14: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..ad8d0c5c4253 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.1.5
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From e5cf342e5e343b35ca44fdf496d6ad9601693e10 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 9 Aug 2021 19:53:17 +0200
Subject: [PATCH 08/17] wxPython4: backport patches, and fix tests

Backported patches:
- wxPseudoDC GIL
- Python 3.10 AGW FlatNotebook patch
- Python 3.10 ScrolledWindow argument types
- Python 3.10 Integer division
- wx.WindowID and wx.Region arguments
---
 .../patches/0002-Python-3.10-issues.patch     | 3317 +++++++++++++++++
 .../0003-Python-3.10-AGW-FlatNotebook.patch   |   57 +
 .../patches/restore-gil-pseudodc.patch        |   52 +
 srcpkgs/wxPython4/template                    |    3 +-
 4 files changed, 3428 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
 create mode 100644 srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
 create mode 100644 srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch

diff --git a/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
new file mode 100644
index 000000000000..6c87ff967d01
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
@@ -0,0 +1,3317 @@
+From f55a17c2d3b336c82fb44f7816ec63219847f4cc Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 22 2021 20:23:54 +0000
+Subject: Fix a bunch of Python 3.10 issues
+
+
+---
+
+diff --git a/0d449626d6d298ad96ebd1d514d0e42833bce470.patch b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+new file mode 100644
+index 0000000..d2ccddc
+--- /dev/null
++++ b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+@@ -0,0 +1,22 @@
++From 0d449626d6d298ad96ebd1d514d0e42833bce470 Mon Sep 17 00:00:00 2001
++From: Carolina Feher da Silva <carolfsu@gmail.com>
++Date: Tue, 16 Nov 2021 01:24:31 +0000
++Subject: [PATCH] Fixed integer division in Python 3
++
++---
++ wx/lib/stattext.py | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/wx/lib/stattext.py b/wx/lib/stattext.py
++index 2cfb6e65a..e606e5a89 100644
++--- a/wx/lib/stattext.py
+++++ b/wx/lib/stattext.py
++@@ -302,7 +302,7 @@ def OnPaint(self, event):
++             if style & wx.ALIGN_RIGHT:
++                 x = width - w
++             if style & wx.ALIGN_CENTER:
++-                x = (width - w)/2
+++                x = (width - w)//2
++             dc.DrawText(line, x, y)
++             y += h
++ 
+diff --git a/3eb9eb32dc3285435039f6c420c398665372a1ad.patch b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+new file mode 100644
+index 0000000..08e58a0
+--- /dev/null
++++ b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+@@ -0,0 +1,84 @@
++From 3eb9eb32dc3285435039f6c420c398665372a1ad Mon Sep 17 00:00:00 2001
++From: Glen Whitney <glen@studioinfinity.org>
++Date: Tue, 31 Aug 2021 11:06:27 -0700
++Subject: [PATCH] fix: Correct types of arguments to
++ ScrolledWindow.SetScrollbars
++
++---
++ demo/Mask.py                   |  2 +-
++ demo/OGL.py                    |  2 +-
++ wx/lib/agw/ultimatelistctrl.py | 14 +++++++-------
++ 3 files changed, 9 insertions(+), 9 deletions(-)
++
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 5f0c2cdde..109b8f30b 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -56,7 +56,7 @@ def __init__(self, parent):
++         mask = wx.Mask(self.bmp_withcolourmask, wx.WHITE)
++         self.bmp_withcolourmask.SetMask(mask)
++ 
++-        self.SetScrollbars(20, 20, 700/20, 460/20)
+++        self.SetScrollbars(20, 20, 700//20, 460//20)
++ 
++         self.Bind(wx.EVT_PAINT, self.OnPaint)
++ 
++diff --git a/demo/OGL.py b/demo/OGL.py
++index 72ca543dd..d475e5011 100644
++--- a/demo/OGL.py
+++++ b/demo/OGL.py
++@@ -272,7 +272,7 @@ def __init__(self, parent, log, frame):
++ 
++         maxWidth  = 1000
++         maxHeight = 1000
++-        self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
+++        self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
++ 
++         self.log = log
++         self.frame = frame
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index c60867684..14fc41f86 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -9654,8 +9654,8 @@ def RecalculatePositions(self, noRefresh=False):
++                 self._linesPerPage = clientHeight//lineHeight
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + lineHeight - 1)/lineHeight,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + lineHeight - 1)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9676,8 +9676,8 @@ def RecalculatePositions(self, noRefresh=False):
++                     decrement = SCROLL_UNIT_X
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + SCROLL_UNIT_Y - 1)/SCROLL_UNIT_Y,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + SCROLL_UNIT_Y - 1)//SCROLL_UNIT_Y,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9728,8 +9728,8 @@ def RecalculatePositions(self, noRefresh=False):
++                         line._gi.ExtendWidth(widthMax)
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (x + SCROLL_UNIT_X)/SCROLL_UNIT_X,
++-                                   (y + lineHeight)/lineHeight,
+++                                   (x + SCROLL_UNIT_X)//SCROLL_UNIT_X,
+++                                   (y + lineHeight)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9797,7 +9797,7 @@ def RecalculatePositions(self, noRefresh=False):
++                             break  # Everything fits, no second try required.
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (entireWidth + SCROLL_UNIT_X)/SCROLL_UNIT_X,
+++                                   (entireWidth + SCROLL_UNIT_X)//SCROLL_UNIT_X,
++                                    0,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    0,
+diff --git a/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+new file mode 100644
+index 0000000..f0b9f5d
+--- /dev/null
++++ b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+@@ -0,0 +1,143 @@
++From 9096426603272672d9a676e8bcdcadf0a1cfa1a2 Mon Sep 17 00:00:00 2001
++From: Robin Dunn <robin@alldunn.com>
++Date: Wed, 26 Feb 2020 11:10:27 -0800
++Subject: [PATCH] Add __index__ to wx.WindowID, and __bool__ to wx.Region
++
++---
++ etg/region.py              |  5 +++--
++ etg/windowid.py            | 32 +++++++++++++++++---------------
++ unittests/test_windowid.py | 23 +++++++++++++++++++++--
++ 3 files changed, 41 insertions(+), 19 deletions(-)
++
++diff --git a/etg/region.py b/etg/region.py
++index 0982c1fe5..d5bc45759 100644
++--- a/etg/region.py
+++++ b/etg/region.py
++@@ -88,11 +88,12 @@ def next(self):
++     c.mustHaveApp()
++     c.find('operator++').ignore()
++ 
++-    # SIP maps operator bool() to __int__, but Classic used __nonzero__. Does
++-    # it make any difference either way?
++     c.find('operator bool').ignore()
++     c.addCppMethod('int', '__nonzero__', '()', 'return (int)self->operator bool();',
++                    'Returns true while there are still rectangles available in the iteration.')
+++    c.addCppMethod('int', '__bool__', '()', 'return (int)self->operator bool();',
+++                   'Returns true while there are still rectangles available in the iteration.')
+++
++ 
++     c.addCppMethod('void', 'Next', '()', 'self->operator++();',
++                    'Move the iterator to the next rectangle in the region.')
++diff --git a/etg/windowid.py b/etg/windowid.py
++index 27b041b3d..da2ed395e 100644
++--- a/etg/windowid.py
+++++ b/etg/windowid.py
++@@ -53,12 +53,12 @@ def run():
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Create reference from an ID',
++                     items=[ ParamDef(type='int', name='id') ]),
++-                
+++
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Copy an ID reference',
++                     items=[ ParamDef(type='const wxWindowIDRef&', name='idref') ]),
++                 ]),
++-            
+++
++             MethodDef(name='~wxWindowIDRef', className='wxWindowIDRef', isDtor=True),
++ 
++             MethodDef(type='int', name='GetValue',
++@@ -73,11 +73,13 @@ def run():
++             """)
++ 
++     klass.addCppMethod('int', '__int__', '()',
++-        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or etc.",
++-        body="""\
++-            return self->GetValue();
++-            """)
++-    
+++        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or other places an integer type is needed.",
+++        body="return self->GetValue();")
+++    klass.addCppMethod('int', '__index__', '()',
+++        doc="See :meth:`__int__`",
+++        body="return self->GetValue();")
+++
+++
++     klass.addCppMethod('bool', '__eq__', '(wxWindowID id)', "return self->GetValue() == id;")
++     klass.addCppMethod('bool', '__ne__', '(wxWindowID id)', "return self->GetValue() != id;")
++     klass.addCppMethod('bool', '__lt__', '(wxWindowID id)', "return self->GetValue() < id;")
++@@ -92,17 +94,17 @@ def run():
++     # and finish it up by adding it to the module
++     module.addItem(klass)
++ 
++-    # Now, let's add a new Python function to the global scope that reserves an 
++-    # ID (or range) and returns a ref object for it. 
++-    module.addPyFunction('NewIdRef', '(count=1)', 
+++    # Now, let's add a new Python function to the global scope that reserves an
+++    # ID (or range) and returns a ref object for it.
+++    module.addPyFunction('NewIdRef', '(count=1)',
++         doc="""\
++-            Reserves a new Window ID (or range of WindowIDs) and returns a 
++-            :class:`wx.WindowIDRef` object (or list of them) that will help 
+++            Reserves a new Window ID (or range of WindowIDs) and returns a
+++            :class:`wx.WindowIDRef` object (or list of them) that will help
++             manage the reservation of that ID.
++ 
++-            This function is intended to be a drop-in replacement of the old 
++-            and deprecated :func:`wx.NewId` function, with the added benefit 
++-            that the ID should never conflict with an in-use ID or other IDs 
+++            This function is intended to be a drop-in replacement of the old
+++            and deprecated :func:`wx.NewId` function, with the added benefit
+++            that the ID should never conflict with an in-use ID or other IDs
++             generated by this function.
++             """,
++         body="""\
++diff --git a/unittests/test_windowid.py b/unittests/test_windowid.py
++index 4593e5a69..fc36c9eb8 100644
++--- a/unittests/test_windowid.py
+++++ b/unittests/test_windowid.py
++@@ -31,9 +31,9 @@ def test_newIdRef02(self):
++     def test_newIdRef03(self):
++         """Check that Auto ID Management is enabled (--enable-autoidman)"""
++         # This test is expected to fail if autoID mangagement is turned on
++-        # because a reference to the ID is not being saved, so it will be 
+++        # because a reference to the ID is not being saved, so it will be
++         # unreserved when the first widget is destroyed.
++-        
+++
++         id = wx.Window.NewControlId()
++         b = wx.Button(self.frame, id, 'button')
++         b.Destroy()
++@@ -75,6 +75,7 @@ def test_WindowIDRef01(self):
++         val = ref1 <= ref2
++         assert type(val) == bool
++ 
+++
++     def test_WindowIDRef02(self):
++         d = {wx.NewIdRef(): 'one',
++              wx.NewIdRef(): 'two'}
++@@ -82,6 +83,24 @@ def test_WindowIDRef02(self):
++         for k in keys:
++             val = d[k]
++ 
+++
+++    def test_WindowIDRef03(self):
+++        # Ensure wx.WindowIDRef can be converted to int without warning when
+++        # making a call to warrped method. In Py3.8+ this means there needs to
+++        # be an __index__ method.
+++
+++        # Turn warnings into exceptions so this test will fail if there is
+++        # a warning
+++        import warnings
+++        warnings.simplefilter('error')
+++
+++        wid = wx.NewIdRef()
+++        assert isinstance(wid, wx.WindowIDRef)
+++
+++        b = wx.Button(self.frame, wid, 'button')
+++        assert b.GetId() == wid.GetId()
+++
+++
++ #---------------------------------------------------------------------------
++ 
++ 
+ 
+diff --git a/python3.10-fixes.patch b/python3.10-fixes.patch
+new file mode 100644
+index 0000000..29e8c61
+--- /dev/null
++++ b/python3.10-fixes.patch
+@@ -0,0 +1,3034 @@
++From 173d0796810bb65de9bdfdc6941d24a04628f6c2 Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Wed, 1 Dec 2021 14:19:00 -0500
++Subject: [PATCH] Fix a bunch of Python 3.10 issues with pure-Python classes
++ and demos
++
++In Python 3.10, a change[1] was implemented where extension functions
++that take integer arguments will no longer silently accept non-integer
++arguments (e.g., floats) that can only be converted to integers with a
++loss of precision.  This PR fixes most of these issues in the pure-Python
++classes and demos by explicitly converting the parameters to int before
++passing them to wxWidgets.  There is loss of precision, but this was
++happening before (automatically) anyway as most wxWidgets DeviceContext
++functions operate using integers.
++
++Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
++too small on GTK3.
++
++This is an example of the relevant exception:
++Traceback (most recent call last):
++  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
++    r.width = w
++TypeError: 'float' object cannot be interpreted as an integer
++
++Fixes #2038.
++
++[1] https://bugs.python.org/issue37999
++---
++ demo/GridLabelRenderer.py               |   4 +-
++ demo/Mask.py                            |   4 +-
++ demo/Overlay.py                         |   1 -
++ demo/PenAndBrushStyles.py               |   2 +-
++ demo/PopupWindow.py                     |   2 +-
++ demo/PrintFramework.py                  |   2 +-
++ demo/PropertyGrid.py                    |   2 +-
++ demo/Sizers.py                          |   2 +-
++ demo/UIActionSimulator.py               |   2 +-
++ demo/agw/AUI.py                         |  32 +++----
++ demo/agw/MacLargeDemo.py                |   4 +-
++ demo/agw/PeakMeter.py                   |   6 +-
++ demo/agw/PersistentControls.py          |   2 +-
++ demo/agw/RibbonBar.py                   |   2 +-
++ demo/agw/SpeedMeter.py                  |   2 +-
++ demo/agw/SuperToolTip.py                |   3 +-
++ demo/agw/ThumbDemoConfig.py             |   1 +
++ demo/agw/UltimateReportDemo.py          |   8 +-
++ demo/agw/Windows7Explorer_Contents.py   |  16 ++--
++ demo/agw/ZoomBar.py                     |   2 +-
++ wx/lib/agw/advancedsplash.py            |   2 +-
++ wx/lib/agw/aui/aui_utilities.py         |   4 +-
++ wx/lib/agw/aui/auibook.py               |   4 +-
++ wx/lib/agw/balloontip.py                |   4 +-
++ wx/lib/agw/flatmenu.py                  |  62 ++++++-------
++ wx/lib/agw/flatnotebook.py              |  10 +--
++ wx/lib/agw/floatspin.py                 |   2 +-
++ wx/lib/agw/gradientbutton.py            |   8 +-
++ wx/lib/agw/hypertreelist.py             |   2 +-
++ wx/lib/agw/knobctrl.py                  |  12 +--
++ wx/lib/agw/labelbook.py                 |  32 +++----
++ wx/lib/agw/peakmeter.py                 |   2 +-
++ wx/lib/agw/pygauge.py                   |   4 +-
++ wx/lib/agw/ribbon/art_aui.py            |  22 ++---
++ wx/lib/agw/ribbon/art_internal.py       |  12 +--
++ wx/lib/agw/ribbon/art_msw.py            |  88 +++++++++----------
++ wx/lib/agw/ribbon/bar.py                |   4 +-
++ wx/lib/agw/ribbon/buttonbar.py          |   6 +-
++ wx/lib/agw/ribbon/gallery.py            |   8 +-
++ wx/lib/agw/ribbon/panel.py              |  16 ++--
++ wx/lib/agw/ribbon/toolbar.py            |   2 +-
++ wx/lib/agw/scrolledthumbnail.py         |  24 +++---
++ wx/lib/agw/shapedbutton.py              |  10 +--
++ wx/lib/agw/speedmeter.py                |  72 +++++++++-------
++ wx/lib/agw/supertooltip.py              |  20 ++---
++ wx/lib/agw/toasterbox.py                |   4 +-
++ wx/lib/agw/ultimatelistctrl.py          |  20 ++---
++ wx/lib/agw/xlsgrid.py                   |   4 +-
++ wx/lib/agw/zoombar.py                   |  10 +--
++ wx/lib/analogclock/analogclock.py       |   2 +-
++ wx/lib/analogclock/helpers.py           |  22 ++---
++ wx/lib/analogclock/setup.py             |   6 +-
++ wx/lib/buttons.py                       |  10 +--
++ wx/lib/colourchooser/pycolourchooser.py |   4 +-
++ wx/lib/colourchooser/pypalette.py       |   2 +-
++ wx/lib/floatcanvas/FCObjects.py         |   8 +-
++ wx/lib/gizmos/ledctrl.py                |   8 +-
++ wx/lib/imagebrowser.py                  |   4 +-
++ wx/lib/ogl/basic.py                     |  10 +--
++ wx/lib/ogl/bmpshape.py                  |   2 +-
++ wx/lib/ogl/composit.py                  |   4 +-
++ wx/lib/ogl/divided.py                   |   2 +-
++ wx/lib/ogl/lines.py                     |   2 +-
++ wx/lib/ogl/oglmisc.py                   |   4 +-
++ wx/lib/plot/examples/demo.py            |   4 +-
++ wx/lib/plot/plotcanvas.py               | 110 ++++++++++++------------
++ wx/lib/plot/polyobjects.py              |  22 +++--
++ wx/lib/popupctl.py                      |   2 +-
++ wx/lib/scrolledpanel.py                 |   2 +-
++ wx/lib/throbber.py                      |   6 +-
++ wx/lib/ticker.py                        |   4 +-
++ 71 files changed, 411 insertions(+), 398 deletions(-)
++
++diff --git a/demo/GridLabelRenderer.py b/demo/GridLabelRenderer.py
++index 794dd64e8..1440ef41b 100644
++--- a/demo/GridLabelRenderer.py
+++++ b/demo/GridLabelRenderer.py
++@@ -46,8 +46,8 @@ def __init__(self):
++         self._bmp = images.Smiles.GetBitmap()
++ 
++     def Draw(self, grid, dc, rect, rc):
++-        x = rect.left + (rect.width - self._bmp.GetWidth()) / 2
++-        y = rect.top + (rect.height - self._bmp.GetHeight()) / 2
+++        x = rect.left + (rect.width - self._bmp.GetWidth()) // 2
+++        y = rect.top + (rect.height - self._bmp.GetHeight()) // 2
++         dc.DrawBitmap(self._bmp, x, y, True)
++ 
++ 
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 109b8f30b..e924f95b9 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -90,9 +90,9 @@ def OnPaint (self, e):
++ 
++         for text, code in logicList:
++             x,y = 120+150*(i%4), 20+100*(i/4)
++-            dc.DrawText(text, x, y-20)
+++            dc.DrawText(text, x, int(y-20))
++             mdc.SelectObject(self.bmp_withcolourmask)
++-            dc.Blit(x,y, cx,cy, mdc, 0,0, code, True)
+++            dc.Blit(x,int(y), cx,cy, mdc, 0,0, code, True)
++             i = i + 1
++ 
++ 
++diff --git a/demo/Overlay.py b/demo/Overlay.py
++index 65164cd84..fa65be003 100644
++--- a/demo/Overlay.py
+++++ b/demo/Overlay.py
++@@ -56,7 +56,6 @@ def __init__(self, parent, log):
++         self.penstylesCombo.SetToolTip('Pen Style')
++ 
++         self.overlayPenWidth = wx.SpinCtrl(self, -1, value='',
++-                                           size=(75, -1),
++                                            style=wx.SP_ARROW_KEYS,
++                                            min=1, max=24, initial=1)
++         self.overlayPenWidth.SetToolTip('Pen Width')
++diff --git a/demo/PenAndBrushStyles.py b/demo/PenAndBrushStyles.py
++index 24040b1fc..1183f684a 100644
++--- a/demo/PenAndBrushStyles.py
+++++ b/demo/PenAndBrushStyles.py
++@@ -100,7 +100,7 @@ def OnPaint(self, event):
++ 
++         dc.SetPen(pen)
++         y = labelHeight + (height - labelHeight)/2
++-        dc.DrawLine(5, y, width-5, y)
+++        dc.DrawLine(5, int(y), width-5, int(y))
++ 
++ 
++ class BrushPanel(BasePanel):
++diff --git a/demo/PopupWindow.py b/demo/PopupWindow.py
++index d8e175576..b54b9870d 100644
++--- a/demo/PopupWindow.py
+++++ b/demo/PopupWindow.py
++@@ -89,7 +89,7 @@ def __init__(self, parent, style, log):
++                           "(or its first child) loses focus in \n"
++                           "any other way.")
++         btn = wx.Button(panel, -1, "Press Me")
++-        spin = wx.SpinCtrl(panel, -1, "Hello", size=(100,-1))
+++        spin = wx.SpinCtrl(panel, -1, "Hello")
++         btn.Bind(wx.EVT_BUTTON, self.OnButton)
++ 
++         sizer = wx.BoxSizer(wx.VERTICAL)
++diff --git a/demo/PrintFramework.py b/demo/PrintFramework.py
++index e7a29a077..f0873ae94 100644
++--- a/demo/PrintFramework.py
+++++ b/demo/PrintFramework.py
++@@ -81,7 +81,7 @@ def OnPrintPage(self, page):
++ 
++         #-------------------------------------------
++         self.canvas.DoDrawing(dc, True)
++-        dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
+++        dc.DrawText("Page: %d" % page, marginX//2, maxY-marginY)
++ 
++         return True
++ 
++diff --git a/demo/PropertyGrid.py b/demo/PropertyGrid.py
++index c56e08b60..fbef29e31 100644
++--- a/demo/PropertyGrid.py
+++++ b/demo/PropertyGrid.py
++@@ -150,7 +150,7 @@ def _ConvertValue(self, value):
++         """ Utility convert arbitrary value to a real wx.Size.
++         """
++         import collections
++-        if isinstance(value, collections.Sequence) or hasattr(value, '__getitem__'):
+++        if isinstance(value, collections.abc.Sequence) or hasattr(value, '__getitem__'):
++             value = wx.Size(*value)
++         return value
++ 
++diff --git a/demo/Sizers.py b/demo/Sizers.py
++index 6ababede9..a025050f1 100644
++--- a/demo/Sizers.py
+++++ b/demo/Sizers.py
++@@ -45,7 +45,7 @@ def OnPaint(self, evt):
++         dc = wx.PaintDC(self)
++         w,h = dc.GetTextExtent(self.text)
++         dc.Clear()
++-        dc.DrawText(self.text, (sz.width-w)/2, (sz.height-h)/2)
+++        dc.DrawText(self.text, (sz.width-w)//2, (sz.height-h)//2)
++ 
++     def OnSize(self, evt):
++         self.Refresh()
++diff --git a/demo/UIActionSimulator.py b/demo/UIActionSimulator.py
++index cbba14f5c..0a6fd0234 100644
++--- a/demo/UIActionSimulator.py
+++++ b/demo/UIActionSimulator.py
++@@ -88,7 +88,7 @@ def _playbackKey(self, evtType, key, modifiers):
++ 
++     def _setNextKeyEvent(self):
++         evtType, key, modifiers, milli = self._playbackEvents.pop(0)
++-        milli = max(milli/2, 1) # play back faster than it was recorded
+++        milli = max(milli//2, 1) # play back faster than it was recorded
++         print(evtType, key, modifiers, milli)
++         wx.CallLater(milli, self._playbackKey, evtType, key, modifiers)
++ 
++diff --git a/demo/agw/AUI.py b/demo/agw/AUI.py
++index 7c2196865..b38313c86 100644
++--- a/demo/agw/AUI.py
+++++ b/demo/agw/AUI.py
++@@ -393,7 +393,7 @@ def OnPaint(self, event):
++         dc.SetPen(wx.LIGHT_GREY_PEN)
++         dc.DrawLine(0, 0, size.x, size.y)
++         dc.DrawLine(0, size.y, size.x, 0)
++-        dc.DrawText(s, (size.x-w)/2, (size.y-height*5)/2)
+++        dc.DrawText(s, (size.x-w)//2, (size.y-height*5)//2)
++ 
++         if self._mgr:
++ 
++@@ -401,19 +401,19 @@ def OnPaint(self, event):
++ 
++             s = "Layer: %d"%pi.dock_layer
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*1))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*1))
++ 
++             s = "Dock: %d Row: %d"%(pi.dock_direction, pi.dock_row)
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*2))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*2))
++ 
++             s = "Position: %d"%pi.dock_pos
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*3))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*3))
++ 
++             s = "Proportion: %d"%pi.dock_proportion
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*4))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*4))
++ 
++ 
++     def OnEraseBackground(self, event):
++@@ -435,7 +435,7 @@ def __init__(self, parent, frame):
++ 
++         s1 = wx.BoxSizer(wx.HORIZONTAL)
++         self._border_size = wx.SpinCtrl(self, ID_PaneBorderSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE),
++-                                        wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100,
+++                                        wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100,
++                                         frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE))
++         s1.Add((1, 1), 1, wx.EXPAND)
++         s1.Add(wx.StaticText(self, -1, "Pane Border Size:"))
++@@ -445,7 +445,7 @@ def __init__(self, parent, frame):
++ 
++         s2 = wx.BoxSizer(wx.HORIZONTAL)
++         self._sash_size = wx.SpinCtrl(self, ID_SashSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE), wx.DefaultPosition,
++-                                      wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
+++                                      wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
++         s2.Add((1, 1), 1, wx.EXPAND)
++         s2.Add(wx.StaticText(self, -1, "Sash Size:"))
++         s2.Add(self._sash_size)
++@@ -454,7 +454,7 @@ def __init__(self, parent, frame):
++ 
++         s3 = wx.BoxSizer(wx.HORIZONTAL)
++         self._caption_size = wx.SpinCtrl(self, ID_CaptionSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE),
++-                                         wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
+++                                         wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
++         s3.Add((1, 1), 1, wx.EXPAND)
++         s3.Add(wx.StaticText(self, -1, "Caption Size:"))
++         s3.Add(self._caption_size)
++@@ -807,9 +807,9 @@ def LightColour(self, colour, percent):
++ 
++         # We take the percent way of the colour from colour -> white
++         i = percent
++-        r = colour.Red() + ((i*rd*100)/high)/100
++-        g = colour.Green() + ((i*gd*100)/high)/100
++-        b = colour.Blue() + ((i*bd*100)/high)/100
+++        r = colour.Red() + ((i*rd*100)//high)//100
+++        g = colour.Green() + ((i*gd*100)//high)//100
+++        b = colour.Blue() + ((i*bd*100)//high)//100
++ 
++         return wx.Colour(r, g, b)
++ 
++@@ -826,10 +826,10 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++         x, y, width, height = clientRect
++         x, width = self._pos, interval
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2)
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2)
++         topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-        rc1 = wx.Rect(x, y, width, height/2)
+++        rc1 = wx.Rect(int(x), y, int(width), height//2)
++         path1 = self.GetPath(gc, rc1, 8)
++         br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++         gc.SetBrush(br1)
++@@ -845,14 +845,14 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++ 
++         bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-        rc3 = wx.Rect(x, y+height/2, width, height/2)
+++        rc3 = wx.Rect(int(x), y+height//2, int(width), height//2)
++         path3 = self.GetPath(gc, rc3, 8)
++         br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++         gc.SetBrush(br3)
++         gc.FillPath(path3) #draw main
++ 
++         path4 = gc.CreatePath()
++-        path4.AddRectangle(x, y+height/2, width, 8)
+++        path4.AddRectangle(x, y+height//2, width, 8)
++         path4.CloseSubpath()
++         gc.SetBrush(br3)
++         gc.FillPath(path4)
++@@ -2613,7 +2613,7 @@ def CreateNotebook(self):
++         flex.Add(wx.TextCtrl(panel, -1, "", wx.DefaultPosition, wx.Size(100, -1)),
++                  1, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add(wx.StaticText(panel, -1, "wxSpinCtrl:"), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++-        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.Size(100, -1),
+++        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.DefaultSize,
++                              wx.SP_ARROW_KEYS, 5, 50, 5), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add((5, 5))
++         flex.Add((5, 5))
++diff --git a/demo/agw/MacLargeDemo.py b/demo/agw/MacLargeDemo.py
++index 4d967a546..a5b8a0e25 100644
++--- a/demo/agw/MacLargeDemo.py
+++++ b/demo/agw/MacLargeDemo.py
++@@ -223,12 +223,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = int((w * percent)/100)
++ 
++         if w < 1:
++             return
++diff --git a/demo/agw/PeakMeter.py b/demo/agw/PeakMeter.py
++index a7c9a6f51..e9dab7116 100644
++--- a/demo/agw/PeakMeter.py
+++++ b/demo/agw/PeakMeter.py
++@@ -149,10 +149,10 @@ def OnFalloff(self, event):
++ 
++     def OnStart(self, event):
++ 
++-        self.timer.Start(1000/2)        # 2 fps
+++        self.timer.Start(1000//2)        # 2 fps
++ 
++-        self.vertPeak.Start(1000/18)        # 18 fps
++-        self.horzPeak.Start(1000/20)        # 20 fps
+++        self.vertPeak.Start(1000//18)        # 18 fps
+++        self.horzPeak.Start(1000//20)        # 20 fps
++ 
++ 
++     def OnStop(self, event):
++diff --git a/demo/agw/PersistentControls.py b/demo/agw/PersistentControls.py
++index f19cc4a91..cf97dd9f0 100644
++--- a/demo/agw/PersistentControls.py
+++++ b/demo/agw/PersistentControls.py
++@@ -234,7 +234,7 @@ def BuildPanes(self):
++         sizer_1.Add(label_1, 0, wx.ALL, 5)
++         sizer_1.Add(combo, 0, wx.LEFT|wx.RIGHT, 5)
++         sizer_1.Add((20, 20), 1)
++-        box2.Add(sizer_1, 1, wx.EXPAND|wx.ALIGN_CENTER, 0)
+++        box2.Add(sizer_1, 1, wx.EXPAND, 0)
++         box2.Add((0, 0), 1, 1)
++ 
++         otherPanel.SetSizer(box2)
++diff --git a/demo/agw/RibbonBar.py b/demo/agw/RibbonBar.py
++index 7103e9d81..d28a2c66a 100644
++--- a/demo/agw/RibbonBar.py
+++++ b/demo/agw/RibbonBar.py
++@@ -799,7 +799,7 @@ def AddColourToGallery(self, gallery, colour, dc, value=None):
++                                        (c.Blue() + 192) % 256)
++ 
++             dc.SetTextForeground(foreground)
++-            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) / 2, (iHeight - size.GetHeight()) / 2)
+++            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) // 2, (iHeight - size.GetHeight()) // 2)
++             dc.SelectObjectAsSource(wx.NullBitmap)
++ 
++             item = gallery.Append(bitmap, wx.ID_ANY)
++diff --git a/demo/agw/SpeedMeter.py b/demo/agw/SpeedMeter.py
++index 9f0fdebb2..575e84a80 100644
++--- a/demo/agw/SpeedMeter.py
+++++ b/demo/agw/SpeedMeter.py
++@@ -418,7 +418,7 @@ def __init__(self, parent, log):
++         bsizer3 = wx.BoxSizer(wx.VERTICAL)
++ 
++         hsizer3 = wx.BoxSizer(wx.HORIZONTAL)
++-        sc = wx.SpinCtrl(panel3, -1, size=(60,20))
+++        sc = wx.SpinCtrl(panel3, -1)
++         sc.SetRange(1, 250)
++         sc.SetValue(50)
++ 
++diff --git a/demo/agw/SuperToolTip.py b/demo/agw/SuperToolTip.py
++index 5e65f06b1..88728e54e 100644
++--- a/demo/agw/SuperToolTip.py
+++++ b/demo/agw/SuperToolTip.py
++@@ -43,7 +43,7 @@ def __init__(self, parent):
++         self.topColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.WHITE)
++         system = wx.SystemSettings.GetColour(wx.SYS_COLOUR_ACTIVECAPTION)
++         r, g, b, a = system
++-        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)/2, (255-g)/2, (255-b)/2))
+++        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)//2, (255-g)//2, (255-b)//2))
++         self.bottomColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=system)
++         self.headerCheck = wx.CheckBox(self.mainPanel, -1, "Show Header")
++         self.headerText = wx.TextCtrl(self.mainPanel, -1, "Merge And Center")
++@@ -233,7 +233,6 @@ def DoLayout(self):
++         frameSizer.Add(self.mainPanel, 1, wx.EXPAND, 0)
++         self.SetSizer(frameSizer)
++         frameSizer.Layout()
++-        frameSizer.Fit(self)
++         self.Layout()
++ 
++         wx.CallAfter(mainSizer.Layout)
++diff --git a/demo/agw/UltimateReportDemo.py b/demo/agw/UltimateReportDemo.py
++index 40f49cb8f..ad455847b 100644
++--- a/demo/agw/UltimateReportDemo.py
+++++ b/demo/agw/UltimateReportDemo.py
++@@ -216,7 +216,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         mdc.SetFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
++         text = "%d Mb"%self.progressValue
++         textWidth, dummy = mdc.GetTextExtent(text)
++-        mdc.DrawText(text, rect.width/2 - textWidth/2, rect.height/2 - dummy/2)
+++        mdc.DrawText(text, rect.width//2 - textWidth//2, rect.height//2 - dummy//2)
++         dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
++         dc.Blit(rect.x+3, rect.y, rect.width-6, rect.height, mdc, 0, 0)
++         dc.DestroyClippingRegion()
++@@ -279,12 +279,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = (w * percent)//100
++ 
++         if middle == 0: # not started
++             bitmap = self.REMAINING_BITMAP.GetSubBitmap((1, 0, w, PIPE_HEIGHT))
++@@ -335,7 +335,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         colours = [wx.RED, wx.WHITE, wx.GREEN, wx.Colour("SKY BLUE")]
++         w, h = dc.GetTextExtent("Hg")
++         x = rect.x + 1
++-        y = rect.y + rect.height/2 - h/2
+++        y = rect.y + rect.height//2 - h//2
++ 
++         for ch in self.text:
++             dc.SetTextForeground(random.choice(colours))
++diff --git a/demo/agw/Windows7Explorer_Contents.py b/demo/agw/Windows7Explorer_Contents.py
++index f754d7879..b23df0e1a 100644
++--- a/demo/agw/Windows7Explorer_Contents.py
+++++ b/demo/agw/Windows7Explorer_Contents.py
++@@ -127,13 +127,13 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         """Draw a custom progress bar using double buffering to prevent flicker"""
++ 
++         bmpWidth, bmpHeight = self.icon.GetWidth(), self.icon.GetHeight()
++-        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)/2)
+++        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)//2)
++ 
++         dc.SetFont(self.normalFont)
++ 
++         textWidth, textHeight = dc.GetTextExtent(self.text)
++         dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
++-        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.description:
++             return
++@@ -144,10 +144,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Type: " + self.description)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++@@ -207,10 +207,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Date modified: " + date)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.size:
++             return
++@@ -218,10 +218,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         dummy1, dummy2= dc.GetTextExtent("Size: ")
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++diff --git a/demo/agw/ZoomBar.py b/demo/agw/ZoomBar.py
++index 376ce349b..14b0278e7 100644
++--- a/demo/agw/ZoomBar.py
+++++ b/demo/agw/ZoomBar.py
++@@ -55,7 +55,7 @@ def __init__(self, parent, log):
++         reflections = glob.glob(bitmapDir + "/*96Flip40.png")
++ 
++         separatorImage = bitmapDir + "/separator.gif"
++-        separatorReflection = bitmapDir + "/separatorFlip.png"
+++        separatorReflection = bitmapDir + "/separatorflip.png"
++         count = 0
++ 
++         for std, ref in zip(standard, reflections):
++diff --git a/wx/lib/agw/advancedsplash.py b/wx/lib/agw/advancedsplash.py
++index 1f8c32df5..d351ea06e 100644
++--- a/wx/lib/agw/advancedsplash.py
+++++ b/wx/lib/agw/advancedsplash.py
++@@ -438,7 +438,7 @@ def SetTextFont(self, font=None):
++ 
++         if font is None:
++             self._textfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._textsize = 10.0
+++            self._textsize = 10
++             self._textfont.SetPointSize(self._textsize)
++         else:
++             self._textfont = font
++diff --git a/wx/lib/agw/aui/auibook.py b/wx/lib/agw/aui/auibook.py
++index ba7cf4721..f5ad2a568 100644
++--- a/wx/lib/agw/aui/auibook.py
+++++ b/wx/lib/agw/aui/auibook.py
++@@ -3452,8 +3452,8 @@ def CalculateNewSplitSize(self):
++         # should happen around the middle
++         if tab_ctrl_count < 2:
++             new_split_size = self.GetClientSize()
++-            new_split_size.x /= 2
++-            new_split_size.y /= 2
+++            new_split_size.x //= 2
+++            new_split_size.y //= 2
++ 
++         else:
++ 
++diff --git a/wx/lib/agw/balloontip.py b/wx/lib/agw/balloontip.py
++index b4155d74a..57baca729 100644
++--- a/wx/lib/agw/balloontip.py
+++++ b/wx/lib/agw/balloontip.py
++@@ -615,7 +615,7 @@ def SetStartDelay(self, delay=1):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Creation Should Be Greater Than 1 ms")
++ 
++-        self._startdelaytime = float(delay)
+++        self._startdelaytime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -640,7 +640,7 @@ def SetEndDelay(self, delay=1e6):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Destruction Should Be Greater Than 1 ms")
++ 
++-        self._enddelaytime = float(delay)
+++        self._enddelaytime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/flatmenu.py b/wx/lib/agw/flatmenu.py
++index 5ba28e584..85f295b86 100644
++--- a/wx/lib/agw/flatmenu.py
+++++ b/wx/lib/agw/flatmenu.py
++@@ -736,8 +736,8 @@ def DrawSeparator(self, dc, xCoord, yCoord, textX, sepWidth):
++         """
++ 
++         dcsaver = DCSaver(dc)
++-        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth/2, 1)
++-        sepRect2 = wx.Rect(xCoord + textX + sepWidth/2, yCoord + 1, sepWidth/2-1, 1)
+++        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth//2, 1)
+++        sepRect2 = wx.Rect(xCoord + textX + sepWidth//2, yCoord + 1, sepWidth//2-1, 1)
++ 
++         artMgr = ArtManager.Get()
++         backColour = artMgr.GetMenuFaceColour()
++@@ -817,11 +817,11 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             imgWidth  = bmp.GetWidth()
++ 
++             if imageMarginX == 0:
++-                xx = rect.x + (leftMarginWidth - imgWidth)/2
+++                xx = rect.x + (leftMarginWidth - imgWidth)//2
++             else:
++-                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)/2 + rect.height
+++                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)//2 + rect.height
++ 
++-            yy = rect.y + (rect.height - imgHeight)/2
+++            yy = rect.y + (rect.height - imgHeight)//2
++             dc.DrawBitmap(bmp, xx, yy, True)
++ 
++         if item.GetKind() == wx.ITEM_CHECK:
++@@ -837,7 +837,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         if item.GetKind() == wx.ITEM_RADIO:
++ 
++@@ -852,7 +852,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         # Draw text - without accelerators
++         text = item.GetLabel()
++@@ -890,7 +890,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 w3, dummy = dc.GetTextExtent(text3)
++ 
++                 posx = xCoord + textX + borderXSize
++-                posy = (itemHeight - h)/2 + yCoord
+++                posy = (itemHeight - h)//2 + yCoord
++ 
++                 # Draw first part
++                 dc.DrawText(text1, posx, posy)
++@@ -912,7 +912,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             else:
++ 
++                 w, h = dc.GetTextExtent(text)
++-                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)/2 + yCoord)
+++                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)//2 + yCoord)
++ 
++ 
++         # Now draw accelerator
++@@ -920,7 +920,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++         if item.GetAccelString():
++ 
++             accelWidth, accelHeight = dc.GetTextExtent(item.GetAccelString())
++-            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)/2 + yCoord)
+++            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)//2 + yCoord)
++ 
++         # Check if this item has sub-menu - if it does, draw
++         # right arrow on the right margin
++@@ -932,7 +932,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++ 
++             xx = xCoord + rightMarginX + borderXSize
++             rr = wx.Rect(xx, rect.y + 1, rect.height-2, rect.height-2)
++-            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)/2, True)
+++            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)//2, True)
++ 
++ 
++     def DrawMenuBarButton(self, dc, rect, state):
++@@ -1142,7 +1142,7 @@ def DrawMenuBar(self, menubar, dc):
++             # Get the menu item rect
++             textWidth, textHeight = dc.GetTextExtent(fixedText)
++             #rect = wx.Rect(posx+menubar._spacer/2, posy, textWidth, textHeight)
++-            rect = wx.Rect(posx+padding/2, posy, textWidth, textHeight)
+++            rect = wx.Rect(posx+padding//2, posy, textWidth, textHeight)
++ 
++             # Can we draw more??
++             # the +DROP_DOWN_ARROW_WIDTH  is the width of the drop down arrow
++@@ -1172,7 +1172,7 @@ def DrawMenuBar(self, menubar, dc):
++                 dc.SetTextForeground(textColour)
++ 
++             ww, hh = dc.GetTextExtent(labelOnly)
++-            textOffset = (rect.width - ww) / 2
+++            textOffset = (rect.width - ww) // 2
++ 
++             if not menubar._isLCD and item.GetTextBitmap().IsOk() and not selected:
++                 dc.DrawBitmap(item.GetTextBitmap(), rect.x, rect.y, True)
++@@ -1505,8 +1505,8 @@ def DrawButtonColour(self, dc, rect, state, colour):
++         baseColour = colour
++ 
++         # Define the middle points
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, rect.y + (rect.height // 2))
+++        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height // 2))
++ 
++         # Define the top region
++         top = wx.Rect((rect.GetLeft(), rect.GetTop()), rightPt)
++@@ -1572,11 +1572,11 @@ def DrawMenuBarBackground(self, dc, rect):
++ 
++         factor = artMgr.GetMenuBgFactor()
++ 
++-        leftPt1 = wx.Point(rect.x, rect.y + (rect.height / factor))
++-        leftPt2 = wx.Point(rect.x, rect.y + (rect.height / factor)*(factor-1))
+++        leftPt1 = wx.Point(rect.x, rect.y + (rect.height // factor))
+++        leftPt2 = wx.Point(rect.x, rect.y + (rect.height // factor)*(factor-1))
++ 
++-        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor))
++-        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor)*(factor-1))
+++        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor))
+++        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor)*(factor-1))
++ 
++         # Define the top region
++         topReg = [wx.Point() for ii in range(7)]
++@@ -2707,7 +2707,7 @@ def DrawToolbar(self, dc, rect):
++             elif tbItem.IsCustomControl():
++                 control = tbItem.GetCustomControl()
++                 ctrlSize = control.GetSize()
++-                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)/2)
+++                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)//2)
++                 if control.GetPosition() != ctrlPos:
++                     control.SetPosition(ctrlPos)
++ 
++@@ -2727,9 +2727,9 @@ def DrawToolbar(self, dc, rect):
++             # Draw the toolbar image
++             if bmp.IsOk():
++ 
++-                x = xx - self._toolbarSpacer/2
+++                x = xx - self._toolbarSpacer//2
++                 #y = rect.y + (rect.height - bmp.GetHeight())/2 - 1
++-                y = rect.y + self._toolbarMargin/2
+++                y = rect.y + self._toolbarMargin//2
++ 
++                 buttonRect = wx.Rect(x, y, highlight_width, highlight_height)
++ 
++@@ -2745,8 +2745,8 @@ def DrawToolbar(self, dc, rect):
++                     else:
++                         self._tbButtons[i]._state = ControlNormal
++ 
++-                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())/2
++-                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())/2
+++                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())//2
+++                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())//2
++ 
++                 if self._tbButtons[i]._state == ControlFocus and not self._tbButtons[i]._tbItem.IsSelected():
++ 
++@@ -2827,8 +2827,8 @@ def DrawMoreButton(self, dc, state):
++         dropArrowBmp = self.GetRenderer()._bitmaps["arrow_down"]
++ 
++         # Calc the image coordinates
++-        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())/2
+++        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())//2
++ 
++         dc.DrawBitmap(dropArrowBmp, xx, yy + self._spacer, True)
++         self._dropDownButtonState = state
++@@ -3269,8 +3269,8 @@ def DrawToolbarItem(self, dc, idx, state):
++ 
++         # draw the bitmap over the highlight
++         buttonRect = wx.Rect(*rect)
++-        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())/2
++-        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())/2
+++        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())//2
+++        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())//2
++ 
++         if state == ControlFocus:
++ 
++@@ -3784,7 +3784,7 @@ def PositionAUI(self, mgr, fixToolbar=True):
++         pn.Name("flat_menu_bar")
++         pn.Caption("Menu Bar")
++         pn.Top()
++-        pn.MinSize(wx.Size(xx/2, self._barHeight))
+++        pn.MinSize(wx.Size(xx//2, self._barHeight))
++         pn.LeftDockable(False)
++         pn.RightDockable(False)
++         pn.ToolbarPane()
++@@ -3997,8 +3997,8 @@ def Draw(self, dc):
++         """
++ 
++         rect = wx.Rect(self._pos, self._size)
++-        xx = rect.x + (rect.width - self._normalBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - self._normalBmp.GetHeight())/2
+++        xx = rect.x + (rect.width - self._normalBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - self._normalBmp.GetHeight())//2
++ 
++         self._parent.GetRenderer().DrawScrollButton(dc, rect, self._state)
++         dc.DrawBitmap(self._normalBmp, xx, yy, True)
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index f5e5200b2..561749b89 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -858,9 +858,9 @@ def PaintStraightGradientBox(dc, rect, startColour, endColour, vertical=True):
++ 
++     for i in range(high+1):
++ 
++-        r = startColour.Red() + ((i*rd*100)/high)/100
++-        g = startColour.Green() + ((i*gd*100)/high)/100
++-        b = startColour.Blue() + ((i*bd*100)/high)/100
+++        r = startColour.Red() + ((i*rd*100)//high)//100
+++        g = startColour.Green() + ((i*gd*100)//high)//100
+++        b = startColour.Blue() + ((i*bd*100)//high)//100
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++@@ -2631,9 +2631,9 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         imageYCoord = (pc.HasAGWFlag(FNB_BOTTOM) and [6] or [8])[0]
++ 
++         if hasImage:
++-            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints/2
+++            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints//2
++         else:
++-            textOffset = pc._pParent._nPadding + shapePoints/2
+++            textOffset = pc._pParent._nPadding + shapePoints//2
++ 
++         textOffset += 2
++ 
++diff --git a/wx/lib/agw/floatspin.py b/wx/lib/agw/floatspin.py
++index bdbaf85ec..4559eb5de 100644
++--- a/wx/lib/agw/floatspin.py
+++++ b/wx/lib/agw/floatspin.py
++@@ -336,7 +336,7 @@ class FloatSpin(wx.Control):
++     """
++ 
++     def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++-                 size=(95,-1), style=0, value=0.0, min_val=None, max_val=None,
+++                 size=wx.DefaultSize, style=0, value=0.0, min_val=None, max_val=None,
++                  increment=1.0, digits=-1, agwStyle=FS_LEFT,
++                  name="FloatSpin"):
++         """
++diff --git a/wx/lib/agw/gradientbutton.py b/wx/lib/agw/gradientbutton.py
++index c4633b296..58625c508 100644
++--- a/wx/lib/agw/gradientbutton.py
+++++ b/wx/lib/agw/gradientbutton.py
++@@ -412,14 +412,14 @@ def OnPaint(self, event):
++ 
++         x, y, width, height = clientRect
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2 + ((capture==self and [1] or [0])[0]))
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2 + ((capture==self and [1] or [0])[0]))
++         if capture != self:
++             if self._mouseAction == HOVER:
++                 topStart, topEnd = self.LightColour(self._topStartColour, 10), self.LightColour(self._topEndColour, 10)
++             else:
++                 topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-            rc1 = wx.Rect(x, y, width, height/2)
+++            rc1 = wx.Rect(x, y, width, height//2)
++             path1 = self.GetPath(gc, rc1, 8)
++             br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++             gc.SetBrush(br1)
++@@ -448,7 +448,7 @@ def OnPaint(self, event):
++             else:
++                 bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-            rc3 = wx.Rect(x, y+height/2, width, height/2)
+++            rc3 = wx.Rect(x, y+height//2, width, height//2)
++             path3 = self.GetPath(gc, rc3, 8)
++             br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++             gc.SetBrush(br3)
++@@ -463,7 +463,7 @@ def OnPaint(self, event):
++             shadowOffset = 0
++         else:
++ 
++-            rc2 = wx.Rect(x+1, gradientRect.height/2, gradientRect.width, gradientRect.height)
+++            rc2 = wx.Rect(x+1, gradientRect.height//2, gradientRect.width, gradientRect.height)
++             path2 = self.GetPath(gc, rc2, 8)
++             gc.SetPen(wx.Pen(self._pressedBottomColour))
++             gc.SetBrush(wx.Brush(self._pressedBottomColour))
++diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py
++index 12302f3b0..377ac0121 100644
++--- a/wx/lib/agw/hypertreelist.py
+++++ b/wx/lib/agw/hypertreelist.py
++@@ -3437,7 +3437,7 @@ def PaintLevel(self, item, dc, level, y, x_maincol):
++ 
++             if not self.HasAGWFlag(wx.TR_NO_LINES) and children:
++                 last_child = children[-1]
++-                Y1 = last_child.GetY() + last_child.GetHeight() / 2
+++                Y1 = last_child.GetY() + last_child.GetHeight() // 2
++                 dc.DrawLine(x, oldY, x, Y1)
++ 
++         return y, x_maincol
++diff --git a/wx/lib/agw/knobctrl.py b/wx/lib/agw/knobctrl.py
++index 742097b09..1e5045ff6 100644
++--- a/wx/lib/agw/knobctrl.py
+++++ b/wx/lib/agw/knobctrl.py
++@@ -325,7 +325,7 @@ def OnSize(self,event):
++         memory.Clear()
++ 
++         minradius = min(0.9*self.Width/2.0, 0.9*self.Height/2.0)
++-        memory.DrawCircle(self.Width//2, self.Height//2, minradius)
+++        memory.DrawCircle(self.Width//2, self.Height//2, int(minradius))
++         memory.SelectObject(wx.NullBitmap)
++         self._region = wx.Region(self._Buffer, self.GetBackgroundColour())
++         self._minradius = minradius
++@@ -645,8 +645,8 @@ def DrawTags(self, dc, size):
++             dxi = math.cos(angle)*((width - xshift + tagLen - 6)/2.0 - tagLen)
++             dyi = math.sin(angle)*((height - yshift + tagLen - 6)/2.0 - tagLen)
++ 
++-            dc.DrawLine(width//2 - sxi, height//2 - syi,
++-                        width//2 - dxi, height//2 - dyi)
+++            dc.DrawLine(int(width//2 - sxi), int(height//2 - syi),
+++                        int(width//2 - dxi), int(height//2 - dyi))
++ 
++ 
++     def DrawDiagonalGradient(self, dc, size):
++@@ -759,8 +759,8 @@ def DrawInsetCircle(self, dc, pencolour):
++         p1 = wx.Pen(self.OffsetColour(pencolour, -70), 2)
++         p2 = wx.Pen(self.OffsetColour(pencolour, 10), 1)
++ 
++-        pt1 = wx.Point(cx-r*math.sqrt(2)/2.0, cy+r*math.sqrt(2)/2.0)
++-        pt2 = wx.Point(cx+r*math.sqrt(2)/2.0, cy-r*math.sqrt(2)/2.0)
+++        pt1 = wx.Point(int(cx-r*math.sqrt(2)/2.0), int(cy+r*math.sqrt(2)/2.0))
+++        pt2 = wx.Point(int(cx+r*math.sqrt(2)/2.0), int(cy-r*math.sqrt(2)/2.0))
++ 
++         dc.SetPen(p2)
++         dc.DrawArc(pt1, pt2, (cx, cy))
++@@ -779,7 +779,7 @@ def DrawBoundingCircle(self, dc, size):
++         radius = 0.9*min(size.x, size.y)/2.0
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++         dc.SetPen(wx.Pen(self._boundingcolour))
++-        dc.DrawCircle(self.Width//2, self.Height//2, radius)
+++        dc.DrawCircle(self.Width//2, self.Height//2, int(radius))
++ 
++ 
++     def CircleCoords(self, radius, angle, centerX, centerY):
++diff --git a/wx/lib/agw/labelbook.py b/wx/lib/agw/labelbook.py
++index b716df3a2..f8c9cd54d 100644
++--- a/wx/lib/agw/labelbook.py
+++++ b/wx/lib/agw/labelbook.py
++@@ -1376,13 +1376,13 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    imgXcoord = self._nImgSize / 2
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize / 2] or [pos + imgTopPadding])[0]
+++                    imgXcoord = self._nImgSize // 2
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize // 2] or [pos + imgTopPadding])[0]
++ 
++                 else:
++ 
++-                    imgXcoord = pos + (rectWidth / 2) - (self._nImgSize / 2)
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize / 2] or [imgTopPadding])[0]
+++                    imgXcoord = pos + (rectWidth // 2) - (self._nImgSize // 2)
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize // 2] or [imgTopPadding])[0]
++ 
++                 self._ImageList.Draw(self._pagesInfoVec[i].GetImageIndex(), dc,
++                                      imgXcoord, imgYcoord,
++@@ -1408,15 +1408,15 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    textOffsetX = ((rectWidth - textWidth) / 2 )
+++                    textOffsetX = ((rectWidth - textWidth) // 2 )
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT  and [pos + self._nImgSize  + imgTopPadding + 3] or \
++-                                       [pos + ((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [pos + ((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 else:
++ 
++-                    textOffsetX = (rectWidth - textWidth) / 2  + pos + nTextPaddingLeft
+++                    textOffsetX = (rectWidth - textWidth) // 2  + pos + nTextPaddingLeft
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT and [self._nImgSize + imgTopPadding + 3] or \
++-                                       [((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
++                 dc.DrawText(fixedText, textOffsetX, textOffsetY)
++@@ -1591,8 +1591,8 @@ def OnPaint(self, event):
++             # Draw gradient in the background area
++             startColour = self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR]
++             endColour   = ArtManager.Get().LightColour(self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR], 50)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x / 2, size.y), startColour, endColour, False)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x / 2, 0, size.x / 2, size.y), endColour, startColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x // 2, size.y), startColour, endColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x // 2, 0, size.x // 2, size.y), endColour, startColour, False)
++ 
++         else:
++ 
++@@ -1638,7 +1638,7 @@ def OnPaint(self, event):
++ 
++             if self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++                 font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-                font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++                font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++                 if self.GetParent().GetFontBold():
++                     font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -1954,7 +1954,7 @@ def DrawWebHover(self, dc, caption, xCoord, yCoord, selected):
++ 
++         # Redraw the text with underlined font
++         underLinedFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        underLinedFont.SetPointSize(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        underLinedFont.SetPointSize(int(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++         if self.GetParent().GetFontBold():
++             underLinedFont.SetWeight(wx.FONTWEIGHT_BOLD)
++         elif self.HasAGWFlag(INB_BOLD_TAB_SELECTION) and selected:
++@@ -2050,7 +2050,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++         imgRect = wx.Rect(*rect)
++ 
++         font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++         if self.GetParent().GetFontBold():
++             font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -2069,7 +2069,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++         # Text bounding rectangle
++         textRect.x += nPadding
++-        textRect.y = rect.y + (rect.height - h)/2
+++        textRect.y = rect.y + (rect.height - h)//2
++         textRect.width = rect.width - 2 * nPadding
++ 
++         if bmp.IsOk() and not self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++@@ -2086,7 +2086,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++             imgRect.x += nPadding
++             imgRect.width = bmp.GetWidth()
++-            imgRect.y = rect.y + (rect.height - bmp.GetHeight())/2
+++            imgRect.y = rect.y + (rect.height - bmp.GetHeight())//2
++             imgRect.height = bmp.GetHeight()
++ 
++         # Draw bounding rectangle
++@@ -2496,7 +2496,7 @@ def ResizeTabArea(self):
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(1, 1))
++             font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-            font.SetPointSize(font.GetPointSize()*self._fontSizeMultiple)
+++            font.SetPointSize(int(font.GetPointSize()*self._fontSizeMultiple))
++             if self.GetFontBold() or agwStyle & INB_BOLD_TAB_SELECTION:
++                 font.SetWeight(wx.FONTWEIGHT_BOLD)
++             dc.SetFont(font)
++diff --git a/wx/lib/agw/peakmeter.py b/wx/lib/agw/peakmeter.py
++index 055dbef81..a5f88a9d5 100644
++--- a/wx/lib/agw/peakmeter.py
+++++ b/wx/lib/agw/peakmeter.py
++@@ -784,7 +784,7 @@ def DrawHorzBand(self, dc, rect):
++                 maxWidth = size.x*horzBands
++                 points = [wx.Point() for i in range(2)]
++                 points[0].y = rectPrev.GetTopRight().y - yDecal
++-                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth/self._maxValue
+++                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth//self._maxValue
++                 points[1].y = rectPrev.GetBottomLeft().y + yDecal
++                 points[1].x = points[0].x
++                 dc.SetPen(pen)
++diff --git a/wx/lib/agw/pygauge.py b/wx/lib/agw/pygauge.py
++index bab459a3a..b8654436a 100644
++--- a/wx/lib/agw/pygauge.py
+++++ b/wx/lib/agw/pygauge.py
++@@ -344,7 +344,7 @@ def OnPaint(self, event):
++                 c1,c2 = gradient
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.GradientFillLinear(r, c1, c2, wx.EAST)
++         else:
++             for i, colour in enumerate(self._barColourSorted):
++@@ -352,7 +352,7 @@ def OnPaint(self, event):
++                 dc.SetPen(wx.Pen(colour))
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.DrawRectangle(r)
++ 
++ 
++diff --git a/wx/lib/agw/ribbon/art_aui.py b/wx/lib/agw/ribbon/art_aui.py
++index a1d255843..31fedf487 100644
++--- a/wx/lib/agw/ribbon/art_aui.py
+++++ b/wx/lib/agw/ribbon/art_aui.py
++@@ -390,7 +390,7 @@ def DrawTab(self, dc, wnd, tab):
++             grad_rect = wx.Rect(*tab.rect)
++             grad_rect.height -= 4
++             grad_rect.width -= 1
++-            grad_rect.height /= 2
+++            grad_rect.height //= 2
++             grad_rect.y = grad_rect.y + tab.rect.height - grad_rect.height - 1
++             dc.SetBrush(self._tab_active_top_background_brush)
++             dc.DrawRectangle(tab.rect.x, tab.rect.y + 3, tab.rect.width - 1, grad_rect.y - tab.rect.y - 3)
++@@ -401,7 +401,7 @@ def DrawTab(self, dc, wnd, tab):
++             btm_rect = wx.Rect(*tab.rect)
++             btm_rect.height -= 4
++             btm_rect.width -= 1
++-            btm_rect.height /= 2
+++            btm_rect.height //= 2
++             btm_rect.y = btm_rect.y + tab.rect.height - btm_rect.height - 1
++             dc.SetBrush(self._tab_hover_background_brush)
++             dc.DrawRectangle(btm_rect.x, btm_rect.y, btm_rect.width, btm_rect.height)
++@@ -434,8 +434,8 @@ def DrawTab(self, dc, wnd, tab):
++             icon = tab.page.GetIcon()
++             if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++                 if icon.IsOk():
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
++-                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
+++                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -450,7 +450,7 @@ def DrawTab(self, dc, wnd, tab):
++                     offset += icon.GetWidth() + 2
++ 
++                 text_width, text_height = dc.GetTextExtent(label)
++-                x = (tab.rect.width - 2 - text_width - offset) / 2
+++                x = (tab.rect.width - 2 - text_width - offset) // 2
++                 if x > 8:
++                     x = 8
++                 elif x < 1:
++@@ -458,7 +458,7 @@ def DrawTab(self, dc, wnd, tab):
++ 
++                 width = tab.rect.width - x - 2
++                 x += tab.rect.x + offset
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if icon.IsOk():
++                     dc.DrawBitmap(icon, x - offset, tab.rect.y + (tab.rect.height - icon.GetHeight()) / 2, True)
++@@ -892,8 +892,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def DrawPartialPanelBackground(self, dc, wnd, rect):
++@@ -1024,7 +1024,7 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++             dc.DrawRectangle(reduced_rect.x, reduced_rect.y, reduced_rect.width, reduced_rect.height)
++             btn_bitmap = bitmaps[3]
++ 
++-        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width / 2 - 2, (rect.y + rect.height / 2) - 2, True)
+++        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width // 2 - 2, (rect.y + rect.height // 2) - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1277,7 +1277,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++             if is_split_hybrid:
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++-            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height / 2) - 2, True)
+++            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++diff --git a/wx/lib/agw/ribbon/art_internal.py b/wx/lib/agw/ribbon/art_internal.py
++index 4a8dc7ce0..78e8f3fe4 100644
++--- a/wx/lib/agw/ribbon/art_internal.py
+++++ b/wx/lib/agw/ribbon/art_internal.py
++@@ -32,9 +32,9 @@ def RibbonInterpolateColour(start_colour, end_colour, position, start_position,
++     r = end_colour.Red() - start_colour.Red()
++     g = end_colour.Green() - start_colour.Green()
++     b = end_colour.Blue() - start_colour.Blue()
++-    r = start_colour.Red()   + (((r * position * 100) / end_position) / 100)
++-    g = start_colour.Green() + (((g * position * 100) / end_position) / 100)
++-    b = start_colour.Blue()  + (((b * position * 100) / end_position) / 100)
+++    r = start_colour.Red()   + (((r * position * 100) // end_position) // 100)
+++    g = start_colour.Green() + (((g * position * 100) // end_position) // 100)
+++    b = start_colour.Blue()  + (((b * position * 100) // end_position) // 100)
++ 
++     return wx.Colour(r, g, b)
++ 
++@@ -61,9 +61,9 @@ def RibbonDrawParallelGradientLines(dc, nlines, line_origins, stepx, stepy, nums
++     bd = end_colour.Blue() - start_colour.Blue()
++ 
++     for step in range(numsteps):
++-        r = start_colour.Red() + (((step*rd*100)/numsteps)/100)
++-        g = start_colour.Green() + (((step*gd*100)/numsteps)/100)
++-        b = start_colour.Blue() + (((step*bd*100)/numsteps)/100)
+++        r = start_colour.Red() + (((step*rd*100)//numsteps)//100)
+++        g = start_colour.Green() + (((step*gd*100)//numsteps)//100)
+++        b = start_colour.Blue() + (((step*bd*100)//numsteps)//100)
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++diff --git a/wx/lib/agw/ribbon/art_msw.py b/wx/lib/agw/ribbon/art_msw.py
++index e7317d59b..00c3dfe2b 100644
++--- a/wx/lib/agw/ribbon/art_msw.py
+++++ b/wx/lib/agw/ribbon/art_msw.py
++@@ -982,7 +982,7 @@ def DrawTab(self, dc, wnd, tab):
++                 background.width -= 4
++                 background.height -= 3
++                 h = background.height
++-                background.height /= 2
+++                background.height //= 2
++                 dc.GradientFillLinear(background, self._tab_hover_background_top_colour,
++                                       self._tab_hover_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1024,9 +1024,9 @@ def DrawTab(self, dc, wnd, tab):
++             if icon.IsOk():
++                 x = tab.rect.x + 4
++                 if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
++ 
++-                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -1043,13 +1043,13 @@ def DrawTab(self, dc, wnd, tab):
++                     x += 3 + tab.page.GetIcon().GetWidth()
++                     width -= 3 + tab.page.GetIcon().GetWidth()
++ 
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if width <= text_width:
++                     dc.SetClippingRegion(x, tab.rect.y, width, tab.rect.height)
++                     dc.DrawText(label, x, y)
++                 else:
++-                    dc.DrawText(label, x + (width - text_width) / 2 + 1, y)
+++                    dc.DrawText(label, x + (width - text_width) // 2 + 1, y)
++ 
++ 
++     def DrawTabSeparator(self, dc, wnd, rect, visibility):
++@@ -1093,7 +1093,7 @@ def ReallyDrawTabSeparator(self, wnd, rect, visibility):
++         dc = wx.MemoryDC(self._cached_tab_separator)
++         self.DrawTabCtrlBackground(dc, wnd, rect)
++ 
++-        x = rect.x + rect.width / 2
+++        x = rect.x + rect.width // 2
++         h = float(rect.height - 1)
++ 
++         r1 = self._tab_ctrl_background_brush.GetColour().Red() * (1.0 - visibility) + 0.5
++@@ -1146,7 +1146,7 @@ def DrawPartialPageBackground1(self, dc, wnd, rect, page, offset, hovered=False)
++ 
++         # upper_rect, lower_rect, paint_rect are all in page co-ordinates
++         upper_rect = wx.Rect(*background)
++-        upper_rect.height /= 5
+++        upper_rect.height //= 5
++ 
++         lower_rect = wx.Rect(*background)
++         lower_rect.y += upper_rect.height
++@@ -1229,7 +1229,7 @@ def DrawPageBackground(self, dc, wnd, rect):
++         background.width -= 4
++         background.height -= 2
++ 
++-        background.height /= 5
+++        background.height //= 5
++         dc.GradientFillLinear(background, self._page_background_top_colour,
++                               self._page_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1493,10 +1493,10 @@ def DrawPanelBackground(self, dc, wnd, rect):
++ 
++         if clip_label:
++             clip = wx.DCClipper(dc, label_rect)
++-            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++         else:
++-            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) / 2,
++-                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) // 2,
+++                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++ 
++         if has_ext_button:
++             if wnd.IsExtButtonHovered():
++@@ -1577,7 +1577,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x, rect.y + rect.height - 15, rect.x + rect.width, rect.y + rect.height - 15)
++ 
++-            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width / 3, 15)
+++            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width // 3, 15)
++             down_btn = wx.Rect(up_btn.GetRight() + 1, up_btn.GetTop(), up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetLeft(), down_btn.GetBottom())
++             ext_btn = wx.Rect(down_btn.GetRight() + 1, up_btn.GetTop(), rect.width - up_btn.GetWidth() - down_btn.GetWidth() - 1, up_btn.GetHeight())
++@@ -1587,7 +1587,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x + rect.width - 15, rect.y, rect.x + rect.width - 15, rect.y + rect.height)
++ 
++-            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height / 3)
+++            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height // 3)
++             down_btn = wx.Rect(up_btn.GetLeft(), up_btn.GetBottom() + 1, up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetRight(), down_btn.GetTop())
++             ext_btn = wx.Rect(up_btn.GetLeft(), down_btn.GetBottom() + 1, up_btn.GetWidth(), rect.height - up_btn.GetHeight() - down_btn.GetHeight() - 1)
++@@ -1633,14 +1633,14 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++ 
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(btn_top_brush)
++-        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height / 2)
+++        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height // 2)
++ 
++         lower = wx.Rect(*rect)
++-        lower.height = (lower.height + 1) / 2
+++        lower.height = (lower.height + 1) // 2
++         lower.y += rect.height - lower.height
++         dc.GradientFillLinear(lower, btn_colour, btn_grad_colour, wx.SOUTH)
++ 
++-        dc.DrawBitmap(btn_bitmap, rect.x + rect.width / 2 - 2, lower.y - 2, True)
+++        dc.DrawBitmap(btn_bitmap, rect.x + rect.width // 2 - 2, lower.y - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1691,7 +1691,7 @@ def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++         upper.x += 1
++         upper.width -= 2
++         upper.y += 1
++-        upper.height /= 3
+++        upper.height //= 3
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(top_brush)
++         dc.DrawRectangle(upper.x, upper.y, upper.width, upper.height)
++@@ -1760,7 +1760,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++             client_rect.x += 1
++             client_rect.width -= 2
++             client_rect.y += 1
++-            client_rect.height = (rect.y + rect.height / 5) - client_rect.x
+++            client_rect.height = (rect.y + rect.height // 5) - client_rect.x
++             dc.GradientFillLinear(client_rect,
++                                   self._panel_active_background_top_colour,
++                                   self._panel_active_background_top_gradient_colour, wx.SOUTH)
++@@ -1785,7 +1785,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.DrawRectangle(preview.x + 1, preview.y + preview.height - 8, preview.width - 2, 7)
++ 
++-        mid_pos = rect.y + rect.height / 5 - preview.y
+++        mid_pos = rect.y + rect.height // 5 - preview.y
++ 
++         if mid_pos < 0 or mid_pos >= preview.height:
++             full_rect = wx.Rect(*preview)
++@@ -1816,8 +1816,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - 7 - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - 7 - bitmap.GetHeight()) // 2, True)
++ 
++         self.DrawPanelBorder(dc, preview, self._panel_border_pen, self._panel_border_gradient_pen)
++         self.DrawPanelBorder(dc, true_rect, self._panel_minimised_border_pen, self._panel_minimised_border_gradient_pen)
++@@ -1829,20 +1829,20 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             preview.x = true_rect.x + 4
++-            preview.y = true_rect.y + (true_rect.height - preview.height) / 2
+++            preview.y = true_rect.y + (true_rect.height - preview.height) // 2
++         else:
++-            preview.x = true_rect.x + (true_rect.width - preview.width) / 2
+++            preview.x = true_rect.x + (true_rect.width - preview.width) // 2
++             preview.y = true_rect.y + 4
++ 
++         dc.SetFont(self._panel_label_font)
++         label_width, label_height = dc.GetTextExtent(wnd.GetLabel())
++ 
++-        xpos = true_rect.x + (true_rect.width - label_width + 1) / 2
+++        xpos = true_rect.x + (true_rect.width - label_width + 1) // 2
++         ypos = preview.y + preview.height + 5
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos = preview.x + preview.width + 5
++-            ypos = true_rect.y + (true_rect.height - label_height) / 2
+++            ypos = true_rect.y + (true_rect.height - label_height) // 2
++ 
++         dc.SetTextForeground(self._panel_minimised_label_colour)
++         dc.DrawText(wnd.GetLabel(), xpos, ypos)
++@@ -1851,12 +1851,12 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos += label_width
++-            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height / 2)
+++            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height // 2)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3,  3)
++             arrow_points[2] = arrow_points[0] + wx.Point(-3, -3)
++         else:
++             ypos += label_height
++-            arrow_points[0] = wx.Point(true_rect.width / 2, ypos + 5)
+++            arrow_points[0] = wx.Point(true_rect.width // 2, ypos + 5)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3, -3)
++             arrow_points[2] = arrow_points[0] + wx.Point( 3, -3)
++ 
++@@ -1967,7 +1967,7 @@ def DrawButtonBarButton(self, dc, wnd, rect, kind, state, label, bitmap_large, b
++             bg_rect.height -= 2
++ 
++             bg_rect_top = wx.Rect(*bg_rect)
++-            bg_rect_top.height /= 3
+++            bg_rect_top.height //= 3
++             bg_rect.y += bg_rect_top.height
++             bg_rect.height -= bg_rect_top.height
++ 
++@@ -2043,7 +2043,7 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         if result == RIBBON_BUTTONBAR_BUTTON_LARGE:
++ 
++             padding = 2
++-            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) / 2,
+++            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) // 2,
++                           rect.y + padding, True)
++             ypos = rect.y + padding + bitmap_large.GetHeight() + padding
++             arrow_width = (kind == RIBBON_BUTTON_NORMAL and [0] or [8])[0]
++@@ -2052,10 +2052,10 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++ 
++             if label_w + 2 * padding <= rect.width:
++ 
++-                dc.DrawText(label, rect.x + (rect.width - label_w) / 2, ypos)
+++                dc.DrawText(label, rect.x + (rect.width - label_w) // 2, ypos)
++                 if arrow_width != 0:
++-                    self.DrawDropdownArrow(dc, rect.x + rect.width / 2,
++-                                           ypos + (label_h * 3) / 2,
+++                    self.DrawDropdownArrow(dc, rect.x + rect.width // 2,
+++                                           ypos + (label_h * 3) // 2,
++                                            self._button_bar_label_colour)
++             else:
++                 breaki = len(label)
++@@ -2067,17 +2067,17 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++                         label_w, label_h = dc.GetTextExtent(label_top)
++ 
++                         if label_w + 2 * padding <= rect.width:
++-                            dc.DrawText(label_top, rect.x + (rect.width - label_w) / 2, ypos)
+++                            dc.DrawText(label_top, rect.x + (rect.width - label_w) // 2, ypos)
++                             ypos += label_h
++                             label_bottom = label[breaki:]
++                             label_w, label_h = dc.GetTextExtent(label_bottom)
++                             label_w += arrow_width
++-                            iX = rect.x + (rect.width - label_w) / 2
+++                            iX = rect.x + (rect.width - label_w) // 2
++                             dc.DrawText(label_bottom, iX, ypos)
++ 
++                             if arrow_width != 0:
++                                 self.DrawDropdownArrow(dc, iX + 2 +label_w - arrow_width,
++-                                                       ypos + label_h / 2 + 1,
+++                                                       ypos + label_h // 2 + 1,
++                                                        self._button_bar_label_colour)
++ 
++                             break
++@@ -2085,14 +2085,14 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         elif result == RIBBON_BUTTONBAR_BUTTON_MEDIUM:
++ 
++             x_cursor = rect.x + 2
++-            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())/2, True)
+++            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())//2, True)
++             x_cursor += bitmap_small.GetWidth() + 2
++             label_w, label_h = dc.GetTextExtent(label)
++-            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) / 2)
+++            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) // 2)
++             x_cursor += label_w + 3
++ 
++             if kind != RIBBON_BUTTON_NORMAL:
++-                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2,
+++                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height // 2,
++                                        self._button_bar_label_colour)
++ 
++         else:
++@@ -2184,7 +2184,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++ 
++         # Background
++         bg_rect_top = wx.Rect(*bg_rect)
++-        bg_rect_top.height = (bg_rect_top.height * 2) / 5
+++        bg_rect_top.height = (bg_rect_top.height * 2) // 5
++         bg_rect_btm = wx.Rect(*bg_rect)
++         bg_rect_btm.y += bg_rect_top.height
++         bg_rect_btm.height -= bg_rect_top.height
++@@ -2244,10 +2244,10 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++             dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
++-                          bg_rect.y + (bg_rect.height / 2) - 2, True)
+++                          bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2,
++-                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2,
+++                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def GetBarTabWidth(self, dc, wnd, label, bitmap, ideal=None, small_begin_need_separator=None,
++@@ -2474,7 +2474,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.y = size.GetHeight() - 15
++             scroll_up.height = 15
++             scroll_up.x = 0
++-            scroll_up.width = (size.GetWidth() + 2) / 3
+++            scroll_up.width = (size.GetWidth() + 2) // 3
++             scroll_down.y = scroll_up.y
++             scroll_down.height = scroll_up.height
++             scroll_down.x = scroll_up.x + scroll_up.width
++@@ -2491,7 +2491,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.x = size.GetWidth() - 15
++             scroll_up.width = 15
++             scroll_up.y = 0
++-            scroll_up.height = (size.GetHeight() + 2) / 3
+++            scroll_up.height = (size.GetHeight() + 2) // 3
++             scroll_down.x = scroll_up.x
++             scroll_down.width = scroll_up.width
++             scroll_down.y = scroll_up.y + scroll_up.height
++diff --git a/wx/lib/agw/ribbon/bar.py b/wx/lib/agw/ribbon/bar.py
++index ae8b6a19c..b0d28776d 100644
++--- a/wx/lib/agw/ribbon/bar.py
+++++ b/wx/lib/agw/ribbon/bar.py
++@@ -743,7 +743,7 @@ def RecalculateTabSizes(self):
++                     delta = info.ideal_width - info.small_must_have_separator_width
++                     info.rect.x = x
++                     info.rect.y = y
++-                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)/total_delta
+++                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)//total_delta
++                     info.rect.height = self._tab_height
++ 
++                     x += info.rect.width + tabsep
++@@ -797,7 +797,7 @@ def RecalculateTabSizes(self):
++                         delta = smallest_tab_width - info.minimum_width
++                         info.rect.x = x
++                         info.rect.y = y
++-                        info.rect.width = info.minimum_width + delta*(width - total_small_width)/total_delta
+++                        info.rect.width = info.minimum_width + delta*(width - total_small_width)//total_delta
++                         info.rect.height = self._tab_height
++ 
++                         x += info.rect.width + tabsep
++diff --git a/wx/lib/agw/ribbon/buttonbar.py b/wx/lib/agw/ribbon/buttonbar.py
++index 25ee49a82..4690f483d 100644
++--- a/wx/lib/agw/ribbon/buttonbar.py
+++++ b/wx/lib/agw/ribbon/buttonbar.py
++@@ -354,7 +354,7 @@ def InsertButton(self, pos, button_id, label, bitmap, bitmap_small=wx.NullBitmap
++                 self._bitmap_size_large = bitmap.GetSize()
++                 if not bitmap_small.IsOk():
++                     w, h = self._bitmap_size_large
++-                    self._bitmap_size_small = wx.Size(0.5*w, 0.5*h)
+++                    self._bitmap_size_small = wx.Size(w//2, h//2)
++ 
++             if bitmap_small.IsOk():
++ 
++@@ -867,8 +867,8 @@ def OnSize(self, event):
++ 
++             layout_size = self._layouts[layout_i].overall_size
++             if layout_size.x <= new_size.x and layout_size.y <= new_size.y:
++-                self._layout_offset.x = (new_size.x - layout_size.x)/2
++-                self._layout_offset.y = (new_size.y - layout_size.y)/2
+++                self._layout_offset.x = (new_size.x - layout_size.x)//2
+++                self._layout_offset.y = (new_size.y - layout_size.y)//2
++                 self._current_layout = layout_i
++                 break
++ 
++diff --git a/wx/lib/agw/ribbon/gallery.py b/wx/lib/agw/ribbon/gallery.py
++index b830fab7d..b86528865 100644
++--- a/wx/lib/agw/ribbon/gallery.py
+++++ b/wx/lib/agw/ribbon/gallery.py
++@@ -805,8 +805,8 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         if client.GetWidth() < 0 or client.GetHeight() < 0:
++             return relative_to
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++@@ -849,8 +849,8 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         elif direction == wx.BOTH:
++             client.IncBy(self._bitmap_padded_size)
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++diff --git a/wx/lib/agw/ribbon/panel.py b/wx/lib/agw/ribbon/panel.py
++index 79fd9bc58..901c765b6 100644
++--- a/wx/lib/agw/ribbon/panel.py
+++++ b/wx/lib/agw/ribbon/panel.py
++@@ -584,12 +584,12 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         minimum = wx.Size(*self.GetMinSize())
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 4) / 5
+++            current.x = (current.x * 4) // 5
++             if current.x < minimum.x:
++                 current.x = minimum.x
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 4) / 5
+++            current.y = (current.y * 4) // 5
++             if current.y < minimum.y:
++                 current.y = minimum.y
++ 
++@@ -668,10 +668,10 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         current = wx.Size(*relative_to)
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 5 + 3) / 4
+++            current.x = (current.x * 5 + 3) // 4
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 5 + 3) / 4
+++            current.y = (current.y * 5 + 3) // 4
++ 
++         return current
++ 
++@@ -1076,25 +1076,25 @@ def GetExpandedPosition(self, panel, expanded_size, direction):
++         pos = wx.Point()
++ 
++         if direction == wx.NORTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetY() - expanded_size.GetHeight()
++             primary_x = True
++             secondary_y = 1
++ 
++         elif direction == wx.EAST:
++             pos.x = panel.GetRight()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = -1
++ 
++         elif direction == wx.SOUTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetBottom()
++             primary_x = True
++             secondary_y = -1
++ 
++         else:
++             pos.x = panel.GetX() - expanded_size.GetWidth()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = 1
++ 
++         expanded = wx.Rect(pos, expanded_size)
++diff --git a/wx/lib/agw/ribbon/toolbar.py b/wx/lib/agw/ribbon/toolbar.py
++index 1771c6506..8c6f8b522 100644
++--- a/wx/lib/agw/ribbon/toolbar.py
+++++ b/wx/lib/agw/ribbon/toolbar.py
++@@ -1159,7 +1159,7 @@ def OnSize(self, event):
++ 
++         # Set group y positions
++         for group in self._groups:
++-            group.position.y = rowypos[group.position.y]
+++            group.position.y = int(rowypos[group.position.y])
++ 
++ 
++     def GetBestSizeForParentSize(self, parentSize):
++diff --git a/wx/lib/agw/shapedbutton.py b/wx/lib/agw/shapedbutton.py
++index f015d4e39..49523366a 100644
++--- a/wx/lib/agw/shapedbutton.py
+++++ b/wx/lib/agw/shapedbutton.py
++@@ -569,9 +569,9 @@ def DrawMainButton(self, dc, width, height):
++                 rect2 = w*main//secondary
++ 
++             if self._isup:
++-                img = self._mainbuttonup.Scale(rect2, rect3)
+++                img = self._mainbuttonup.Scale(int(rect2), int(rect3))
++             else:
++-                img = self._mainbuttondown.Scale(rect2, rect3)
+++                img = self._mainbuttondown.Scale(int(rect2), int(rect3))
++ 
++         bmp = img.ConvertToBitmap()
++ 
++@@ -599,7 +599,7 @@ def DrawMainButton(self, dc, width, height):
++                     ypos = 0
++ 
++         # Draw Finally The Bitmap
++-        dc.DrawBitmap(bmp, xpos, ypos, True)
+++        dc.DrawBitmap(bmp, int(xpos), int(ypos), True)
++ 
++         # Store Bitmap Position And Size To Draw An Elliptical Focus Indicator
++         self._xpos = xpos
++@@ -646,7 +646,7 @@ def DrawLabel(self, dc, width, height, dw=0, dh=0):
++             xp = xc - (tw//2)* cos(angle) - (th//2)*sin(angle)
++             yp = yc + (tw//2)*sin(angle) - (th//2)*cos(angle)
++ 
++-            dc.DrawRotatedText(label, xp + dw, yp + dh , angle*180/pi)
+++            dc.DrawRotatedText(label, int(xp + dw), int(yp + dh), angle*180/pi)
++ 
++ 
++     def DrawFocusIndicator(self, dc, width, height):
++@@ -676,7 +676,7 @@ def DrawFocusIndicator(self, dc, width, height):
++         else:
++             # This Is An Ellipse
++             if hasattr(self, "_xpos"):
++-                dc.DrawEllipse(self._xpos + 2, self._ypos + 2, self._imgx - 4, self._imgy - 4)
+++                dc.DrawEllipse(int(self._xpos + 2), int(self._ypos + 2), self._imgx - 4, self._imgy - 4)
++ 
++         dc.SetLogicalFunction(wx.COPY)
++ 
++diff --git a/wx/lib/agw/speedmeter.py b/wx/lib/agw/speedmeter.py
++index f196b51f2..606901d27 100644
++--- a/wx/lib/agw/speedmeter.py
+++++ b/wx/lib/agw/speedmeter.py
++@@ -580,8 +580,8 @@ def Draw(self, dc):
++         dc.SetBackground(wx.Brush(speedbackground))
++         dc.Clear()
++ 
++-        centerX = self.faceBitmap.GetWidth()/2
++-        centerY = self.faceBitmap.GetHeight()/2
+++        centerX = self.faceBitmap.GetWidth()//2
+++        centerY = self.faceBitmap.GetHeight()//2
++ 
++         self.CenterX = centerX
++         self.CenterY = centerY
++@@ -681,7 +681,7 @@ def Draw(self, dc):
++             # Draw The Filler (Both In "Advance" And "Reverse" Directions)
++ 
++             dc.SetBrush(wx.Brush(fillercolour))
++-            dc.DrawArc(xs2, ys2, xe2, ye2, centerX, centerY)
+++            dc.DrawArc(xs2, ys2, xe2, ye2, int(centerX), int(centerY))
++ 
++             if self._agwStyle & SM_DRAW_SECTORS == 0:
++                 dc.SetBrush(wx.Brush(speedbackground))
++@@ -952,7 +952,7 @@ def Draw(self, dc):
++                     y = y - height/2.0 - height*sin(angis)/2.0
++                     fancytext.RenderToDC(fancystr, dc, x, y)
++                 else:
++-                    dc.DrawText(strings, x, y)
+++                    dc.DrawText(strings, int(x), int(y))
++ 
++             # This Is The Small Rectangle --> Tick Mark
++             rectangle = colourangles[ii] + pi/2.0
++@@ -969,6 +969,7 @@ def Draw(self, dc):
++             y4 = y3 + 3*self.scale*sinrect
++ 
++             points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++            points = [(int(p[0]), int(p[1])) for p in points]
++ 
++             dc.DrawPolygon(points)
++ 
++@@ -1003,6 +1004,7 @@ def Draw(self, dc):
++                         y4 = y3 + self.scale*sinrect
++ 
++                         points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++                        points = [(int(p[0]), int(p[1])) for p in points]
++ 
++                         dc.DrawPolygon(points)
++ 
++@@ -1017,7 +1019,7 @@ def Draw(self, dc):
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++ 
++         if self._drawarc:
++-            dc.SetPen(wx.Pen(self.GetArcColour(), 2.0))
+++            dc.SetPen(wx.Pen(self.GetArcColour(), 2))
++             # If It's Not A Complete Circle, Draw The Connecting Lines And The Arc
++             if abs(abs(startangle - endangle) - 2*pi) > 1.0/180.0:
++                 dc.DrawArc(xstart, ystart, xend, yend, centerX, centerY)
++@@ -1046,7 +1048,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++             dc.SetTextForeground(middlecolour)
++-            dc.DrawText(middletext, newx, newy)
+++            dc.DrawText(middletext, int(newx), int(newy))
++ 
++         # Here We Draw The Icon In The Middle, Near The Start Of The Arrow (If Present)
++         # This Is Like The "Fuel" Icon In The Cars
++@@ -1054,8 +1056,8 @@ def Draw(self, dc):
++ 
++             middleicon = self.GetMiddleIcon()
++             middlewidth, middleheight = self.GetMiddleIconDimens()
++-            middleicon.SetWidth(middlewidth*self.scale)
++-            middleicon.SetHeight(middleheight*self.scale)
+++            middleicon.SetWidth(int(middlewidth*self.scale))
+++            middleicon.SetHeight(int(middleheight*self.scale))
++             middleangle = (startangle + endangle)/2.0
++ 
++             mw = middleicon.GetWidth()
++@@ -1064,7 +1066,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++ 
++-            dc.DrawIcon(middleicon, newx, newy)
+++            dc.DrawIcon(middleicon, int(newx), int(newy))
++ 
++             # Restore Icon Dimension, If Not Something Strange Happens
++             middleicon.SetWidth(middlewidth)
++@@ -1109,53 +1111,61 @@ def Draw(self, dc):
++                 if handstyle == "Arrow":
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++-                    dc.SetPen(wx.Pen(shadowcolour, 5*log(self.scale+1)))
+++                    dc.SetPen(wx.Pen(shadowcolour, int(5*log(self.scale+1))))
++                     dc.SetBrush(wx.Brush(shadowcolour))
++                     shadowdistance = 2.0*self.scale
++-                    dc.DrawLine(newx + shadowdistance, newy + shadowdistance,
++-                                xarr + shadowdistance, yarr + shadowdistance)
++-
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance)])
+++                    dc.DrawLine(int(newx + shadowdistance), int(newy + shadowdistance),
+++                                int(xarr + shadowdistance), int(yarr + shadowdistance))
+++
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++                 else:
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++                     dc.SetBrush(wx.Brush(shadowcolour))
++-                    dc.SetPen(wx.Pen(shadowcolour, 1.0))
+++                    dc.SetPen(wx.Pen(shadowcolour, 1))
++                     shadowdistance = 1.5*self.scale
++ 
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance),
++-                                    (x4+shadowdistance, y4+shadowdistance)])
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance),
+++                              (x4+shadowdistance, y4+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++ 
++             if handstyle == "Arrow":
++ 
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++-                dc.SetPen(wx.Pen(handcolour, 5*log(self.scale+1)))
+++                dc.SetPen(wx.Pen(handcolour, int(5*log(self.scale+1))))
++                 # Draw The "Hand", An Arrow
++-                dc.DrawLine(newx, newy, xarr, yarr)
+++                dc.DrawLine(int(newx), int(newy), int(xarr), int(yarr))
++ 
++                 # Draw The Arrow Pointer
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3)])
+++                points = [(x1, y1), (x2, y2), (x3, y3)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++             else:
++ 
++                 # Draw The Hand Pointer
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3), (x4, y4)])
+++                points = [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++ 
++     def SetIntervals(self, intervals=None):
++@@ -1527,7 +1537,7 @@ def SetMiddleTextFont(self, font=None):
++ 
++         if font is None:
++             self._middletextfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._middletextsize = 10.0
+++            self._middletextsize = 10
++             self._middletextfont.SetPointSize(self._middletextsize)
++         else:
++             self._middletextfont = font
++@@ -1599,7 +1609,7 @@ def CircleCoords(self, radius, angle, centerX, centerY):
++         x = radius*cos(angle) + centerX
++         y = radius*sin(angle) + centerY
++ 
++-        return x, y
+++        return int(x), int(y)
++ 
++ 
++     def GetIntersection(self, current, intervals):
++diff --git a/wx/lib/agw/supertooltip.py b/wx/lib/agw/supertooltip.py
++index a92ce10d1..cd0f0c9f7 100644
++--- a/wx/lib/agw/supertooltip.py
+++++ b/wx/lib/agw/supertooltip.py
++@@ -295,8 +295,8 @@ def OnPaint(self, event):
++ 
++         # Get the user options for header, bitmaps etc...
++         drawHeader, drawFooter = classParent.GetDrawHeaderLine(), classParent.GetDrawFooterLine()
++-        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height/2)
++-        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height/2, frameRect.width, frameRect.height/2+1)
+++        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height//2)
+++        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height//2, frameRect.width, frameRect.height//2+1)
++         # Fill the triple-gradient
++         dc.GradientFillLinear(topRect, topColour, middleColour, wx.SOUTH)
++         dc.GradientFillLinear(bottomRect, middleColour, bottomColour, wx.SOUTH)
++@@ -324,9 +324,9 @@ def OnPaint(self, event):
++         normalText = classParent.GetTextColour()
++         if header:
++             dc.SetTextForeground(normalText)
++-            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)/2)
+++            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)//2)
++         if headerBmp and headerBmp.IsOk():
++-            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)/2, True)
+++            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)//2, True)
++ 
++         if header or (headerBmp and headerBmp.IsOk()):
++             yPos += height
++@@ -376,7 +376,7 @@ def OnPaint(self, event):
++                 messageHeight += textHeight
++ 
++                 xText = (bmpWidth + 2 * self._spacing) if bmpWidth > 0 else self._spacing
++-                yText += textHeight/2+self._spacing
+++                yText += textHeight//2+self._spacing
++                 maxWidth = max(xText + textWidth + self._spacing, maxWidth)
++                 dc.DrawText(line, xText, yText)
++                 if isLink:
++@@ -412,8 +412,8 @@ def OnPaint(self, event):
++             if drawFooter:
++                 # Draw the separator line before the footer
++                 dc.SetPen(wx.GREY_PEN)
++-                dc.DrawLine(self._spacing, yPos-self._spacing/2+toAdd,
++-                            width-self._spacing, yPos-self._spacing/2+toAdd)
+++                dc.DrawLine(self._spacing, yPos-self._spacing//2+toAdd,
+++                            width-self._spacing, yPos-self._spacing//2+toAdd)
++         # Draw the footer and footer bitmap (if any)
++         dc.SetTextForeground(normalText)
++         height = max(textHeight, bmpHeight)
++@@ -424,7 +424,7 @@ def OnPaint(self, event):
++             maxWidth = max(bmpXPos + bmpWidth + (self._spacing*2) + textWidth, maxWidth)
++         if footerBmp and footerBmp.IsOk():
++             toAdd = (height - bmpHeight + self._spacing) / 2
++-            dc.DrawBitmap(footerBmp, bmpXPos, yPos + toAdd, True)
+++            dc.DrawBitmap(footerBmp, bmpXPos, int(yPos + toAdd), True)
++             maxWidth = max(footerBmp.GetSize().GetWidth() + bmpXPos, maxWidth)
++ 
++         maxHeight = yPos + height + toAdd
++@@ -815,7 +815,7 @@ def SetStartDelay(self, delay=1):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._startDelayTime = float(delay)
+++        self._startDelayTime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -831,7 +831,7 @@ def SetEndDelay(self, delay=1e6):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._endDelayTime = float(delay)
+++        self._endDelayTime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/toasterbox.py b/wx/lib/agw/toasterbox.py
++index b73429dd2..8efb5869b 100644
++--- a/wx/lib/agw/toasterbox.py
+++++ b/wx/lib/agw/toasterbox.py
++@@ -1316,11 +1316,11 @@ def _getTextCoords(self, dc):
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++             fh += h + textPadding
++-        y = (th - fh) / 2; coords = []
+++        y = (th - fh) // 2; coords = []
++ 
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++-            x = (tw - w) / 2
+++            x = (tw - w) // 2
++             coords.append((x, y))
++             y += h + textPadding
++ 
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index 14fc41f86..caa5e5cf4 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -914,7 +914,7 @@ def Draw(self, index, dc, x, y, flags, solidBackground=True):
++             raise Exception("Wrong index in image list")
++ 
++         bmp = self._images[index]
++-        dc.DrawBitmap(bmp, x, y, (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
+++        dc.DrawBitmap(bmp, x, int(y), (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
++ 
++         return True
++ 
++@@ -4022,7 +4022,7 @@ def SetPosition(self, x, y, spacing):
++ 
++             if item.HasImage():
++ 
++-                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)/2
+++                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)//2
++                 self._gi._rectIcon.y = self._gi._rectAll.y + 4
++ 
++             if item.HasText():
++@@ -4030,7 +4030,7 @@ def SetPosition(self, x, y, spacing):
++                 if self._gi._rectLabel.width > spacing:
++                     self._gi._rectLabel.x = self._gi._rectAll.x + 2
++                 else:
++-                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing/2) - (self._gi._rectLabel.width/2)
+++                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing//2) - (self._gi._rectLabel.width//2)
++ 
++                 self._gi._rectLabel.y = self._gi._rectAll.y + self._gi._rectAll.height + 2 - self._gi._rectLabel.height
++                 self._gi._rectHighlight.x = self._gi._rectLabel.x - 2
++@@ -4546,7 +4546,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 checked = item.IsChecked()
++-                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)/2, item.GetKind(), checked, enabled)
+++                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)//2, item.GetKind(), checked, enabled)
++                 xOld += ix
++                 width -= ix
++ 
++@@ -4557,7 +4557,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 for img in images:
++ 
++                     ix, iy = self._owner.GetImageSize([img])
++-                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)/2, enabled)
+++                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)//2, enabled)
++ 
++                     xOld += ix
++                     width -= ix
++@@ -5230,7 +5230,7 @@ def OnPaint(self, event):
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 # We draw it on the left, always
++-                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)/2, kind, checked, enabled)
+++                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)//2, kind, checked, enabled)
++                 wcheck += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++                 cw -= ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++ 
++@@ -6819,7 +6819,7 @@ def HitTestLine(self, line, x, y):
++                     # We got a checkbox-type item
++                     ix, iy = self.GetCheckboxImageSize()
++                     LH = self.GetLineHeight(line)
++-                    rect = wx.Rect(xOld, lineY + LH/2 - iy/2, ix, iy)
+++                    rect = wx.Rect(xOld, lineY + LH//2 - iy//2, ix, iy)
++                     if rect.Contains((x, y)):
++                         newItem = self.GetParent().GetItem(line, col)
++                         return newItem, ULC_HITTEST_ONITEMCHECK
++@@ -7937,13 +7937,13 @@ def MoveToItem(self, item):
++                     while start_y > view_y:
++                         start_y -= SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, start_y/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, start_y//SCROLL_UNIT_Y)
++ 
++                 if start_y + height > view_y + client_h:
++                     while start_y + height < view_y + client_h:
++                         start_y += SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)//SCROLL_UNIT_Y)
++ 
++         else: # !report
++ 
++@@ -7960,7 +7960,7 @@ def MoveToItem(self, item):
++             if rect.y + rect.height - 5 > view_y + client_h:
++                 sy = (rect.y + rect.height - client_h + hLine)/hLine
++ 
++-            self.Scroll(sx, sy)
+++            self.Scroll(int(sx), int(sy))
++ 
++ 
++ # ----------------------------------------------------------------------------
++diff --git a/wx/lib/agw/xlsgrid.py b/wx/lib/agw/xlsgrid.py
++index b505aebb4..17267fabc 100644
++--- a/wx/lib/agw/xlsgrid.py
+++++ b/wx/lib/agw/xlsgrid.py
++@@ -965,7 +965,7 @@ def Draw(self, dc, rect):
++             xp = xc - (text_width/2)*xshift - (text_height/2)*yshift
++             yp = yc + (text_width/2)*yshift - (text_height/2)*xshift
++ 
++-            dc.DrawRotatedText(value, xp, yp, self.rotation)
+++            dc.DrawRotatedText(value, int(xp), int(yp), self.rotation)
++ 
++         else:
++ 
++@@ -1125,7 +1125,7 @@ def Draw(self, dc, rect):
++             if font.escapement == 1:
++                 ypos = ypos - maxH + height
++ 
++-            dc.DrawText(chunk, start, ypos)
+++            dc.DrawText(chunk, start, int(ypos))
++             start += width
++ 
++ 
++diff --git a/wx/lib/agw/zoombar.py b/wx/lib/agw/zoombar.py
++index 1e6ec5da3..8c2afd058 100644
++--- a/wx/lib/agw/zoombar.py
+++++ b/wx/lib/agw/zoombar.py
++@@ -463,7 +463,7 @@ def SetSize(self, width, height):
++     def GetPosition(self):
++         """ Returns the button position. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -601,7 +601,7 @@ def __init__(self, bitmap=None):
++     def GetPosition(self):
++         """ Returns the position of :class:`wx.ImageBar`, as a :class:`wx.Point`. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -660,7 +660,7 @@ def SetBarColour(self, colour, xSize=None, ySize=None):
++         if xSize is not None:
++             self._size = wx.Size(xSize, ySize)
++ 
++-        bitmap.Rescale(self._size.width, self._size.height/2)
+++        bitmap.Rescale(self._size.width, self._size.height//2)
++ 
++         r1, g1, b1 = self._startColour.Red(), self._startColour.Green(), self._startColour.Blue()
++         r2, g2, b2 = colour.Red(), colour.Green(), colour.Blue()
++@@ -1065,7 +1065,7 @@ def ResetSize(self):
++             ySize += yextent
++ 
++         if self._showReflections:
++-            ySize += self._buttonSize/2
+++            ySize += self._buttonSize//2
++         if self._centerZoom:
++             ySize += self._buttonSize
++ 
++@@ -1240,7 +1240,7 @@ def DrawLabels(self, dc):
++             textWidth, textHeight = dc.GetTextExtent(label)
++             buttonPos = button.GetPosition()
++             buttonSize = button.GetSize()
++-            xpos = buttonPos.x + (buttonSize.width - textWidth)/2
+++            xpos = buttonPos.x + (buttonSize.width - textWidth)//2
++             ypos = buttonPos.y - textHeight - 2
++ 
++             dc.DrawRectangle(xpos-2, ypos-1, textWidth+4, textHeight+2)
++diff --git a/wx/lib/analogclock/analogclock.py b/wx/lib/analogclock/analogclock.py
++index 7c4b18979..1ee1d6742 100644
++--- a/wx/lib/analogclock/analogclock.py
+++++ b/wx/lib/analogclock/analogclock.py
++@@ -173,7 +173,7 @@ def _recalcCoords(self, size):
++         scale = min([float(size.width) / self.basesize.width,
++                      float(size.height) / self.basesize.height])
++ 
++-        centre = wx.Point(size.width / 2., size.height / 2.)
+++        centre = wx.Point(size.width // 2, size.height // 2)
++ 
++         self.Box.RecalcCoords(size, centre, scale)
++         self.Hands.RecalcCoords(size, centre, scale)
++diff --git a/wx/lib/analogclock/helpers.py b/wx/lib/analogclock/helpers.py
++index 88d198bee..9674de912 100644
++--- a/wx/lib/analogclock/helpers.py
+++++ b/wx/lib/analogclock/helpers.py
++@@ -37,7 +37,7 @@ def __init__(self, idx=0, pos=None, size=None, offset=0, clocksize=None,
++ 
++ 
++     def _pol2rect(self, m, t):
++-        return m * math.cos(math.radians(t)), m * math.sin(math.radians(t))
+++        return int(m * math.cos(math.radians(t))), int(m * math.sin(math.radians(t)))
++ 
++ 
++     def _rect2pol(self, x, y):
++@@ -174,7 +174,7 @@ def __init__(self, **kwargs):
++ 
++     def Draw(self, dc):
++         self.dyer.Select(dc)
++-        dc.DrawCircle(self.pos.x, self.pos.y, self.radius)
+++        dc.DrawCircle(self.pos.x, self.pos.y, int(self.radius))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -205,7 +205,7 @@ def Draw(self, dc, end, offset=0):
++             m, t = self._rect2pol(x, y)
++             polygon[i] = self._pol2rect(m, t - angle)
++ 
++-        dc.DrawPolygon(polygon, centre.x + offset, centre.y + offset)
+++        dc.DrawPolygon(polygon, int(centre.x + offset), int(centre.y + offset))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -226,7 +226,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawRectangle(x + offset, y + offset, width, height)
+++        dc.DrawRectangle(int(x + offset), int(y + offset), int(width), int(height))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -242,7 +242,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x
++         y = self.pos.y
++ 
++-        dc.DrawCircle(x + offset, y + offset, radius)
+++        dc.DrawCircle(int(x + offset), int(y + offset), int(radius))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -273,7 +273,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -290,7 +290,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -309,7 +309,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawText(self.text, x + offset, y + offset)
+++        dc.DrawText(self.text, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -321,7 +321,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawRotatedText(self.text, x + offset, y + offset, angle)
+++        dc.DrawRotatedText(self.text, int(x + offset), int(y + offset), int(angle))
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -656,7 +656,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++ 
++         # Try to find a 'good' max size for text-based ticks.
++         if a_tick.text is not None:
++-            self.font.SetPointSize(size)
+++            self.font.SetPointSize(int(size))
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(*clocksize.Get()))
++             dc.SetFont(self.font)
++@@ -686,7 +686,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++             x = centre.x + radius * math.sin(angle)
++             y = centre.y + radius * math.cos(angle)
++ 
++-            tick.SetPosition(wx.Point(x, y))
+++            tick.SetPosition(wx.Point(int(x), int(y)))
++ 
++ 
++     def GetSize(self):
++diff --git a/wx/lib/analogclock/setup.py b/wx/lib/analogclock/setup.py
++index a83c8639d..a7dffb901 100644
++--- a/wx/lib/analogclock/setup.py
+++++ b/wx/lib/analogclock/setup.py
++@@ -179,7 +179,7 @@ def __init__(self, parent, title, group="Hands"):
++         p.SetCustomColours(self.customcolours)
++         sizer.Add(p, pos=(0, 1), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.bw = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.bw = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(0, 2), span=(1, 2), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -193,7 +193,7 @@ def __init__(self, parent, title, group="Hands"):
++         p = self.ls = wx.StaticText(self, label="Size:")
++         sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.sz = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.sz = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -212,7 +212,7 @@ def __init__(self, parent, title, group="Ticks"):
++         p = wx.StaticText(self, label="Offset:")
++         sizer.Add(p, pos=(3, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.of = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.of = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(3, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++diff --git a/wx/lib/buttons.py b/wx/lib/buttons.py
++index 46d1b8747..f01a54d41 100644
++--- a/wx/lib/buttons.py
+++++ b/wx/lib/buttons.py
++@@ -453,7 +453,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         tw, th = dc.GetTextExtent(label)
++         if not self.up:
++             dx = dy = self.labelDelta
++-        dc.DrawText(label, (width-tw)/2+dx, (height-th)/2+dy)
+++        dc.DrawText(label, (width-tw)//2+dx, (height-th)//2+dy)
++ 
++ 
++     def DrawFocusIndicator(self, dc, w, h):
++@@ -844,7 +844,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++         hasMask = bmp.GetMask() != None
++-        dc.DrawBitmap(bmp, (width-bw)/2+dx, (height-bh)/2+dy, hasMask)
+++        dc.DrawBitmap(bmp, (width-bw)//2+dx, (height-bh)//2+dy, hasMask)
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -926,12 +926,12 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++ 
++-        pos_x = (width-bw-tw)/2+dx      # adjust for bitmap and text to centre
+++        pos_x = (width-bw-tw)//2+dx      # adjust for bitmap and text to centre
++         if bmp is not None:
++-            dc.DrawBitmap(bmp, pos_x, (height-bh)/2+dy, hasMask) # draw bitmap if available
+++            dc.DrawBitmap(bmp, pos_x, (height-bh)//2+dy, hasMask) # draw bitmap if available
++             pos_x = pos_x + 2   # extra spacing from bitmap
++ 
++-        dc.DrawText(label, pos_x + dx+bw, (height-th)/2+dy)      # draw the text
+++        dc.DrawText(label, pos_x + dx+bw, (height-th)//2+dy)      # draw the text
++ 
++ 
++ #----------------------------------------------------------------------
++diff --git a/wx/lib/colourchooser/pycolourchooser.py b/wx/lib/colourchooser/pycolourchooser.py
++index 61dbc02d2..124376483 100644
++--- a/wx/lib/colourchooser/pycolourchooser.py
+++++ b/wx/lib/colourchooser/pycolourchooser.py
++@@ -188,7 +188,7 @@ def __init__(self, parent, id):
++         self.colour_slider.Bind(wx.EVT_MOTION, self.onSliderMotion)
++         self.slider = wx.Slider(
++                         self, self.idSCROLL, 86, 0, self.colour_slider.HEIGHT - 1,
++-                        style=wx.SL_VERTICAL, size=(15, self.colour_slider.HEIGHT)
+++                        style=wx.SL_VERTICAL, size=(-1, self.colour_slider.HEIGHT)
++                         )
++ 
++         self.Bind(wx.EVT_COMMAND_SCROLL, self.onScroll, self.slider)
++@@ -338,7 +338,7 @@ def setSliderToV(self, v):
++         min = self.slider.GetMin()
++         max = self.slider.GetMax()
++         val = (1 - v) * max
++-        self.slider.SetValue(val)
+++        self.slider.SetValue(int(val))
++ 
++     def getVFromSlider(self):
++         """Get the current value of "V" from the v slider."""
++diff --git a/wx/lib/colourchooser/pypalette.py b/wx/lib/colourchooser/pypalette.py
++index ff1fb840c..71b9fc2df 100644
++--- a/wx/lib/colourchooser/pypalette.py
+++++ b/wx/lib/colourchooser/pypalette.py
++@@ -165,7 +165,7 @@ def DrawBuffer(self):
++             colour = wx.Colour(0, 0, 0)
++             self.buffer.SetPen(wx.Pen(colour, 1, wx.PENSTYLE_SOLID))
++             self.buffer.SetBrush(wx.Brush(colour, wx.BRUSHSTYLE_TRANSPARENT))
++-            self.buffer.DrawCircle(self.point[0], self.point[1], 3)
+++            self.buffer.DrawCircle(int(self.point[0]), int(self.point[1]), 3)
++ 
++     def HighlightPoint(self, x, y):
++         """Highlights an area of the palette with a little circle around
++diff --git a/wx/lib/floatcanvas/FCObjects.py b/wx/lib/floatcanvas/FCObjects.py
++index 58becd38c..cdf8cc53e 100644
++--- a/wx/lib/floatcanvas/FCObjects.py
+++++ b/wx/lib/floatcanvas/FCObjects.py
++@@ -296,7 +296,7 @@ def SetPen(self, LineColor, LineStyle, LineWidth):
++         else:
++             self.Pen = self.PenList.setdefault(
++                 (LineColor, LineStyle, LineWidth),
++-                wx.Pen(LineColor, LineWidth, self.LineStyleList[LineStyle]))
+++                wx.Pen(LineColor, int(LineWidth), self.LineStyleList[LineStyle]))
++ 
++     def SetHitBrush(self, HitColor):
++         """
++@@ -1202,14 +1202,14 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++             x = xc - Size/2.0
++             y = yc - Size/2.0
++             dc.SetBrush(self.Brush)
++-            dc.DrawRectangle(x, y, Size, Size)
+++            dc.DrawRectangle(int(x), int(y), Size, Size)
++         if HTdc and self.HitAble:
++             HTdc.SetPen(self.HitPen)
++             if self.Size <= 1:
++                 HTdc.DrawPoint(xc, xc)
++             else:
++                 HTdc.SetBrush(self.HitBrush)
++-                HTdc.DrawRectangle(x, y, Size, Size)
+++                HTdc.DrawRectangle(int(x), int(y), Size, Size)
++ 
++ class RectEllipse(XYObjectMixin, LineAndFillMixin, DrawObject):
++     """A RectEllipse draw object."""
++@@ -2161,7 +2161,7 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++         W = H * (self.bmpWidth / self.bmpHeight)
++         if (self.ScaledBitmap is None) or (H != self.ScaledHeight) :
++             self.ScaledHeight = H
++-            Img = self.Image.Scale(W, H)
+++            Img = self.Image.Scale(int(W), int(H))
++             self.ScaledBitmap = wx.Bitmap(Img)
++ 
++         XY = self.ShiftFun(XY[0], XY[1], W, H)
++diff --git a/wx/lib/gizmos/ledctrl.py b/wx/lib/gizmos/ledctrl.py
++index f185d5105..7f4d3fcf9 100644
++--- a/wx/lib/gizmos/ledctrl.py
+++++ b/wx/lib/gizmos/ledctrl.py
++@@ -293,7 +293,7 @@ def _drawDigit(self, dc, digit, column):
++ 
++         if digit & c.COLON:
++             dc.SetBrush(wx.Brush(lineColor))
++-            centerX = XPos + (self.m_lineLength + self.m_digitMargin) / 2
++-            radius = self.m_lineWidth / 2
++-            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) / 2, radius)
++-            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 / 4, radius)
+++            centerX = XPos + (self.m_lineLength + self.m_digitMargin) // 2
+++            radius = self.m_lineWidth // 2
+++            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) // 2, radius)
+++            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 // 4, radius)
++diff --git a/wx/lib/imagebrowser.py b/wx/lib/imagebrowser.py
++index 795e90dca..8e14727e7 100644
++--- a/wx/lib/imagebrowser.py
+++++ b/wx/lib/imagebrowser.py
++@@ -347,8 +347,8 @@ def DrawImage(self, dc):
++         owidth = int(scale*iwidth)
++         oheight = int(scale*iheight)
++ 
++-        diffx = (wwidth - owidth)/2   # center calc
++-        diffy = (wheight - oheight)/2   # center calc
+++        diffx = (wwidth - owidth)//2   # center calc
+++        diffy = (wheight - oheight)//2   # center calc
++ 
++         if not bmp:
++             if owidth!=iwidth or oheight!=iheight:
++diff --git a/wx/lib/ogl/basic.py b/wx/lib/ogl/basic.py
++index b08859ab9..0107f21fc 100644
++--- a/wx/lib/ogl/basic.py
+++++ b/wx/lib/ogl/basic.py
++@@ -1051,7 +1051,7 @@ def OnEraseContents(self, dc):
++         dc.SetPen(self.GetBackgroundPen())
++         dc.SetBrush(self.GetBackgroundBrush())
++ 
++-        dc.DrawRectangle(topLeftX - penWidth, topLeftY - penWidth, maxX + penWidth * 2 + 4, maxY + penWidth * 2 + 4)
+++        dc.DrawRectangle(int(topLeftX - penWidth), int(topLeftY - penWidth), int(maxX + penWidth * 2 + 4), int(maxY + penWidth * 2 + 4))
++ 
++     def EraseLinks(self, dc, attachment = -1, recurse = False):
++         """
++@@ -2769,9 +2769,9 @@ def OnDraw(self, dc):
++             dc.SetBrush(self._brush)
++ 
++         if self._cornerRadius:
++-            dc.DrawRoundedRectangle(x1, y1, self._width, self._height, self._cornerRadius)
+++            dc.DrawRoundedRectangle(int(x1), int(y1), self._width, self._height, self._cornerRadius)
++         else:
++-            dc.DrawRectangle(x1, y1, self._width, self._height)
+++            dc.DrawRectangle(int(x1), int(y1), self._width, self._height)
++ 
++     def GetBoundingBoxMin(self):
++         """Get the bounding box minimum."""
++@@ -2882,7 +2882,7 @@ def Create(self, the_points = None):
++             # Duplicate the list of points
++             self._points = []
++             for point in the_points:
++-                new_point = wx.Point(point[0], point[1])
+++                new_point = wx.Point(int(point[0]), int(point[1]))
++                 self._points.append(new_point)
++             self.CalculateBoundingBox()
++             self._originalWidth = self._boundWidth
++@@ -3444,7 +3444,7 @@ def OnDraw(self, dc):
++                 dc.SetPen(self._pen)
++         if self._brush:
++             dc.SetBrush(self._brush)
++-        dc.DrawEllipse(self._xpos - self.GetWidth() / 2.0, self._ypos - self.GetHeight() / 2.0, self.GetWidth(), self.GetHeight())
+++        dc.DrawEllipse(int(self._xpos - self.GetWidth() / 2.0), int(self._ypos - self.GetHeight() / 2.0), self.GetWidth(), self.GetHeight())
++ 
++     def SetSize(self, x, y, recursive = True):
++         """
++diff --git a/wx/lib/ogl/bmpshape.py b/wx/lib/ogl/bmpshape.py
++index ee2859527..e53ddb136 100644
++--- a/wx/lib/ogl/bmpshape.py
+++++ b/wx/lib/ogl/bmpshape.py
++@@ -32,7 +32,7 @@ def OnDraw(self, dc):
++ 
++         x = self._xpos - self._bitmap.GetWidth() / 2.0
++         y = self._ypos - self._bitmap.GetHeight() / 2.0
++-        dc.DrawBitmap(self._bitmap, x, y, True)
+++        dc.DrawBitmap(self._bitmap, int(x), int(y), True)
++ 
++     def SetSize(self, w, h, recursive = True):
++         """
++diff --git a/wx/lib/ogl/composit.py b/wx/lib/ogl/composit.py
++index c3b623952..eecaafb3f 100644
++--- a/wx/lib/ogl/composit.py
+++++ b/wx/lib/ogl/composit.py
++@@ -1131,11 +1131,11 @@ def OnDraw(self, dc):
++ 
++         if self._leftSide:
++             dc.SetPen(self._leftSidePen)
++-            dc.DrawLine(x1, y2, x1, y1)
+++            dc.DrawLine(int(x1), int(y2), int(x1), int(y1))
++ 
++         if self._topSide:
++             dc.SetPen(self._topSidePen)
++-            dc.DrawLine(x1, y1, x2, y1)
+++            dc.DrawLine(int(x1), int(y1), int(x2), int(y1))
++ 
++         # For testing purposes, draw a rectangle so we know
++         # how big the division is.
++diff --git a/wx/lib/ogl/divided.py b/wx/lib/ogl/divided.py
++index 0bfb1919f..0809be58c 100644
++--- a/wx/lib/ogl/divided.py
+++++ b/wx/lib/ogl/divided.py
++@@ -231,7 +231,7 @@ def OnDrawContents(self, dc):
++                 regionPen = region.GetActualPen()
++                 if regionPen:
++                     dc.SetPen(regionPen)
++-                    dc.DrawLine(leftX, y, rightX, y)
+++                    dc.DrawLine(int(leftX), int(y), int(rightX), int(y))
++ 
++             currentY = actualY
++ 
++diff --git a/wx/lib/ogl/lines.py b/wx/lib/ogl/lines.py
++index 948b85d82..50c07e046 100644
++--- a/wx/lib/ogl/lines.py
+++++ b/wx/lib/ogl/lines.py
++@@ -1200,7 +1200,7 @@ def OnDraw(self, dc):
++ 
++         points = []
++         for point in self._lineControlPoints:
++-            points.append(wx.Point(point[0], point[1]))
+++            points.append(wx.Point(int(point[0]), int(point[1])))
++ 
++         if self._isSpline:
++             dc.DrawSpline(points)
++diff --git a/wx/lib/ogl/oglmisc.py b/wx/lib/ogl/oglmisc.py
++index 8588a72b7..a8be3fc53 100644
++--- a/wx/lib/ogl/oglmisc.py
+++++ b/wx/lib/ogl/oglmisc.py
++@@ -300,10 +300,10 @@ def DrawFormattedText(dc, text_list, xpos, ypos, width, height, formatMode):
++         yoffset = ypos - height / 2.0
++ 
++     # +1 to allow for rounding errors
++-    dc.SetClippingRegion(xpos - width / 2.0, ypos - height / 2.0, width + 1, height + 1)
+++    dc.SetClippingRegion(int(xpos - width / 2.0), int(ypos - height / 2.0), int(width + 1), int(height + 1))
++ 
++     for line in text_list:
++-        dc.DrawText(line.GetText(), xoffset + line.GetX(), yoffset + line.GetY())
+++        dc.DrawText(line.GetText(), int(xoffset + line.GetX()), int(yoffset + line.GetY()))
++ 
++     dc.DestroyClippingRegion()
++ 
++diff --git a/wx/lib/plot/examples/demo.py b/wx/lib/plot/examples/demo.py
++index 98fbaad3a..02bec1d9f 100644
++--- a/wx/lib/plot/examples/demo.py
+++++ b/wx/lib/plot/examples/demo.py
++@@ -984,7 +984,7 @@ def DrawPointLabel(self, dc, mDataDict):
++ 
++         sx, sy = mDataDict["scaledXY"]  # scaled x,y of closest point
++         # 10by10 square centered on point
++-        dc.DrawRectangle(sx - 5, sy - 5, 10, 10)
+++        dc.DrawRectangle(int(sx - 5), int(sy - 5), 10, 10)
++         px, py = mDataDict["pointXY"]
++         cNum = mDataDict["curveNum"]
++         pntIn = mDataDict["pIndex"]
++@@ -992,7 +992,7 @@ def DrawPointLabel(self, dc, mDataDict):
++         # make a string to display
++         s = "Crv# %i, '%s', Pt. (%.2f,%.2f), PtInd %i" % (
++             cNum, legend, px, py, pntIn)
++-        dc.DrawText(s, sx, sy + 1)
+++        dc.DrawText(s, int(sx), int(sy + 1))
++ 
++ 
++ def run_demo():
++diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py
++index dd3f77d52..abee47efb 100644
++--- a/wx/lib/plot/plotcanvas.py
+++++ b/wx/lib/plot/plotcanvas.py
++@@ -174,24 +174,24 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++ 
++         # Default Pens
++         self._gridPen = wx.Pen(wx.Colour(180, 180, 180, 255),
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_DOT)
++ 
++         self._centerLinePen = wx.Pen(wx.RED,
++-                                     self._pointSize[0],
+++                                     int(self._pointSize[0]),
++                                      wx.PENSTYLE_SHORT_DASH)
++ 
++         self._axesPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++ 
++         self._tickPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++         self._tickLength = tuple(-x * 2 for x in self._pointSize)
++ 
++         self._diagonalPen = wx.Pen(wx.BLUE,
++-                                   self._pointSize[0],
+++                                   int(self._pointSize[0]),
++                                    wx.PENSTYLE_DOT_DASH)
++ 
++     def SetCursor(self, cursor):
++@@ -1925,10 +1925,10 @@ def _Draw(self, graphics, xAxis=None, yAxis=None, dc=None):
++         # set clipping area so drawing does not occur outside axis box
++         ptx, pty, rectWidth, rectHeight = self._point2ClientCoord(p1, p2)
++         # allow graph to overlap axis lines by adding units to w and h
++-        dc.SetClippingRegion(ptx * self._pointSize[0],
++-                             pty * self._pointSize[1],
++-                             rectWidth * self._pointSize[0] + 2,
++-                             rectHeight * self._pointSize[1] + 1)
+++        dc.SetClippingRegion(int(ptx * self._pointSize[0]),
+++                             int(pty * self._pointSize[1]),
+++                             int(rectWidth * self._pointSize[0] + 2),
+++                             int(rectHeight * self._pointSize[1] + 1))
++         # Draw the lines and markers
++ #        start = _time.perf_counter()
++         graphics.draw(dc)
++@@ -2280,7 +2280,7 @@ def _drawLegend(self, dc, graphics, rhsW, topH, legendBoxWH,
++             pnt = ((trhc[0] + legendLHS + legendSymExt[0]
++                     + 5 * self._pointSize[0]),
++                    trhc[1] + s + lineHeight / 2. - legendTextExt[1] / 2)
++-            dc.DrawText(o.getLegend(), pnt[0], pnt[1])
+++            dc.DrawText(o.getLegend(), int(pnt[0]), int(pnt[1]))
++         dc.SetFont(self._getFont(self._fontSizeAxis))  # reset
++ 
++     def _titleLablesWH(self, dc, graphics):
++@@ -2329,7 +2329,7 @@ def _drawRubberBand(self, corner1, corner2):
++         dc.SetPen(wx.Pen(wx.BLACK))
++         dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_TRANSPARENT))
++         dc.SetLogicalFunction(wx.INVERT)
++-        dc.DrawRectangle(ptx, pty, rectWidth, rectHeight)
+++        dc.DrawRectangle(int(ptx), int(pty), int(rectWidth), int(rectHeight))
++         dc.SetLogicalFunction(wx.COPY)
++ 
++     def _getFont(self, size):
++@@ -2423,7 +2423,7 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.gridPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         x, y, width, height = self._point2ClientCoord(p1, p2)
++@@ -2432,13 +2432,13 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++             if self.enableGrid[0]:
++                 for x, _ in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0], pt[1] - height)
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - height))
++ 
++         if self._ySpec != 'none':
++             if self.enableGrid[1]:
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0] + width, pt[1])
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0] + width), int(pt[1]))
++ 
++     @TempStyle('pen')
++     def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2471,7 +2471,7 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.tickPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         # lengthen lines for printing
++@@ -2484,13 +2484,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] - xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - xTickLength)))
++                 dc.DrawLineList(lines)
++             if ticks.top:
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] + xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] + xTickLength)))
++                 dc.DrawLineList(lines)
++ 
++         if self.ySpec != 'none':
++@@ -2498,13 +2498,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] + yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] + yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++             if ticks.right:
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] - yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] - yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++ 
++     @TempStyle('pen')
++@@ -2531,25 +2531,25 @@ def _drawCenterLines(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.centerLinePen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._centerLinesEnabled in ('Horizontal', True):
++             y1 = scale[1] * p1[1] + shift[1]
++             y2 = scale[1] * p2[1] + shift[1]
++             y = (y1 - y2) / 2.0 + y2
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        y,
++-                        scale[0] * p2[0] + shift[0],
++-                        y)
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(y),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(y))
++         if self._centerLinesEnabled in ('Vertical', True):
++             x1 = scale[0] * p1[0] + shift[0]
++             x2 = scale[0] * p2[0] + shift[0]
++             x = (x1 - x2) / 2.0 + x2
++-            dc.DrawLine(x,
++-                        scale[1] * p1[1] + shift[1],
++-                        x,
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(x),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(x),
+++                        int(scale[1] * p2[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawDiagonals(self, dc, p1, p2, scale, shift):
++@@ -2575,19 +2575,19 @@ def _drawDiagonals(self, dc, p1, p2, scale, shift):
++         """
++         pen = self.diagonalPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._diagonalsEnabled in ('Bottomleft-Topright', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]))
++         if self._diagonalsEnabled in ('Bottomright-Topleft', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxes(self, dc, p1, p2, scale, shift):
++@@ -2614,7 +2614,7 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.axesPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         axes = self.enableAxes
++@@ -2623,24 +2623,24 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p1[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p1[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.top:
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p2[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p2[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++         if self.ySpec != 'none':
++             if axes.left:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p1[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p1[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.right:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p2[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p2[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2686,8 +2686,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] + 2 * self._pointSize[1] - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] + 2 * self._pointSize[1] - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2698,8 +2698,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w, h = dc.GetTextExtent(label)
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] - 2 * self._pointSize[1] - h - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] - 2 * self._pointSize[1] - h - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2712,8 +2712,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] - w - 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] - w - 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2725,8 +2725,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] + 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] + 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2785,7 +2785,7 @@ def _drawPlotTitle(self, dc, graphics, lhsW, rhsW, titleWH):
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - titleWH[0] / 2.,
++             self.plotbox_origin[1] - self.plotbox_size[1]
++         )
++-        dc.DrawText(graphics.title, titlePos[0], titlePos[1])
+++        dc.DrawText(graphics.title, int(titlePos[0]), int(titlePos[1]))
++ 
++     def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++                         xLabelWH, yLabelWH):
++@@ -2806,7 +2806,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - xLabelWH[0] / 2.,
++             self.plotbox_origin[1] - xLabelWH[1] - yTickLength
++         )
++-        dc.DrawText(graphics.xLabel, xLabelPos[0], xLabelPos[1])
+++        dc.DrawText(graphics.xLabel, int(xLabelPos[0]), int(xLabelPos[1]))
++         yLabelPos = (
++             self.plotbox_origin[0] - 3 * self._pointSize[0] + xTickLength,
++             self.plotbox_origin[1] - bottomH
++@@ -2814,7 +2814,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++         )
++         if graphics.yLabel:  # bug fix for Linux
++             dc.DrawRotatedText(
++-                graphics.yLabel, yLabelPos[0], yLabelPos[1], 90)
+++                graphics.yLabel, int(yLabelPos[0]), int(yLabelPos[1]), 90)
++ 
++     @TempStyle('pen')
++     def _drawPlotAreaLabels(self, dc, graphics, lhsW, rhsW, titleWH,
++@@ -2942,7 +2942,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++ 
++-            self.sb_hor.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_hor.SetScrollbar(pos, pagesize, int(sbfullrange), pagesize)
++             self._sb_xunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++@@ -2964,7 +2964,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++             pos = (sbfullrange - 1 - pos - pagesize)
++-            self.sb_vert.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_vert.SetScrollbar(int(pos), pagesize, int(sbfullrange), pagesize)
++             self._sb_yunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++diff --git a/wx/lib/plot/polyobjects.py b/wx/lib/plot/polyobjects.py
++index 26a54f8f7..725b0164e 100644
++--- a/wx/lib/plot/polyobjects.py
+++++ b/wx/lib/plot/polyobjects.py
++@@ -417,7 +417,7 @@ def draw(self, dc, printerScale, coord=None):
++ 
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_BUTT)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -518,7 +518,7 @@ def draw(self, dc, printerScale, coord=None):
++         style = self.attributes['style']
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_ROUND)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -590,7 +590,7 @@ def draw(self, dc, printerScale, coord=None):
++         if fillcolour and not isinstance(fillcolour, wx.Colour):
++             fillcolour = wx.Colour(fillcolour)
++ 
++-        dc.SetPen(wx.Pen(colour, width))
+++        dc.SetPen(wx.Pen(colour, int(width)))
++         if fillcolour:
++             dc.SetBrush(wx.Brush(fillcolour, fillstyle))
++         else:
++@@ -618,6 +618,7 @@ def _circle(self, dc, coords, size=1):
++         dc.DrawEllipseList(rect.astype(np.int32))
++ 
++     def _dot(self, dc, coords, size=1):
+++        coords = [(int(c[0]), int(c[1])) for c in coords]
++         dc.DrawPointList(coords)
++ 
++     def _square(self, dc, coords, size=1):
++@@ -699,7 +700,7 @@ def set_pen_and_brush(self, dc, printerScale):
++ 
++         if not isinstance(pencolour, wx.Colour):
++             pencolour = wx.Colour(pencolour)
++-        pen = wx.Pen(pencolour, penwidth, penstyle)
+++        pen = wx.Pen(pencolour, int(penwidth), penstyle)
++         pen.SetCap(wx.CAP_BUTT)
++ 
++         if not isinstance(fillcolour, wx.Colour):
++@@ -790,6 +791,7 @@ def draw(self, dc, printerScale, coord=None):
++                 raise TypeError(err_str.format(type(barwidth)))
++ 
++             rects = [self.calc_rect(x, y, w) for x, y, w in pts]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3])) for r in rects]
++             dc.DrawRectangleList(rects)
++         else:
++             dc.DrawLines(coord)  # draw legend line
++@@ -858,6 +860,8 @@ def draw(self, dc, printerScale, coord=None):
++             rects = [self.calc_rect(y, low, high)
++                      for y, (low, high)
++                      in zip(self.hist, self.bins)]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3]))
+++                     for r in rects]
++ 
++             dc.DrawRectangleList(rects)
++         else:
++@@ -1114,10 +1118,10 @@ def _draw_iqr_box(self, dc, printerScale):
++                                       self.currentShift)
++ 
++         # rectangles are drawn (left, top, width, height) so adjust
++-        iqr_box = [iqr_box[0][0],                   # X (left)
++-                   iqr_box[0][1],                   # Y (top)
++-                   iqr_box[1][0] - iqr_box[0][0],   # Width
++-                   iqr_box[1][1] - iqr_box[0][1]]   # Height
+++        iqr_box = [int(iqr_box[0][0]),                   # X (left)
+++                   int(iqr_box[0][1]),                   # Y (top)
+++                   int(iqr_box[1][0] - iqr_box[0][0]),   # Width
+++                   int(iqr_box[1][1] - iqr_box[0][1])]   # Height
++ 
++         box_pen = wx.Pen(wx.BLACK, 3, wx.PENSTYLE_SOLID)
++         box_brush = wx.Brush(wx.GREEN, wx.BRUSHSTYLE_SOLID)
++@@ -1503,7 +1507,7 @@ def OnPrintPage(self, page):
++         self.graph._setSize(plotAreaW, plotAreaH)
++ 
++         # Set offset and scale
++-        dc.SetDeviceOrigin(pixLeft, pixTop)
+++        dc.SetDeviceOrigin(int(pixLeft), int(pixTop))
++ 
++         # Thicken up pens and increase marker size for printing
++         ratioW = float(plotAreaW) / clientDcSize[0]
++diff --git a/wx/lib/popupctl.py b/wx/lib/popupctl.py
++index 883be5ae5..236501f6d 100644
++--- a/wx/lib/popupctl.py
+++++ b/wx/lib/popupctl.py
++@@ -124,7 +124,7 @@ def Display(self):
++         selfSize = self.GetSize()
++         tcSize = self.ctrl.GetSize()
++ 
++-        pos.x -= (selfSize.width - tcSize.width) / 2
+++        pos.x -= (selfSize.width - tcSize.width) // 2
++         if pos.x + selfSize.width > dSize.width:
++             pos.x = dSize.width - selfSize.width
++         if pos.x < 0:
++diff --git a/wx/lib/scrolledpanel.py b/wx/lib/scrolledpanel.py
++index e4c482af9..1f783ea97 100644
++--- a/wx/lib/scrolledpanel.py
+++++ b/wx/lib/scrolledpanel.py
++@@ -222,4 +222,4 @@ def ScrollChildIntoView(self, child):
++         # if we need to adjust
++         if new_vs_x != -1 or new_vs_y != -1:
++             #print("%s: (%s, %s)" % (self.GetName(), new_vs_x, new_vs_y))
++-            self.Scroll(new_vs_x, new_vs_y)
+++            self.Scroll(int(new_vs_x), int(new_vs_y))
++diff --git a/wx/lib/throbber.py b/wx/lib/throbber.py
++index 9954d6b27..ee8c51209 100644
++--- a/wx/lib/throbber.py
+++++ b/wx/lib/throbber.py
++@@ -200,11 +200,11 @@ def Draw(self, dc):
++         """
++         dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True)
++         if self.overlay and self.showOverlay:
++-            dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True)
+++            dc.DrawBitmap(self.overlay, int(self.overlayX), int(self.overlayY), True)
++         if self.label and self.showLabel:
++-            dc.DrawText(self.label, self.labelX, self.labelY)
+++            dc.DrawText(self.label, int(self.labelX), int(self.labelY))
++             dc.SetTextForeground(wx.WHITE)
++-            dc.DrawText(self.label, self.labelX-1, self.labelY-1)
+++            dc.DrawText(self.label, int(self.labelX-1), int(self.labelY-1))
++ 
++ 
++     def OnPaint(self, event):
++diff --git a/wx/lib/ticker.py b/wx/lib/ticker.py
++index 04abf0d44..4e684b4cd 100644
++--- a/wx/lib/ticker.py
+++++ b/wx/lib/ticker.py
++@@ -86,7 +86,7 @@ def Stop(self):
++     def Start(self):
++         """Starts the text moving"""
++         if not self.timer.IsRunning():
++-            self.timer.Start(1000 / self._fps)
+++            self.timer.Start(1000 // self._fps)
++ 
++ 
++     def IsTicking(self):
++@@ -208,7 +208,7 @@ def DrawText(self, dc):
++             offx = self._offset - self._extent[0]
++         else:
++             offx = self.GetSize()[0] - self._offset
++-        offy = (self.GetSize()[1] - self._extent[1]) / 2 #centered vertically
+++        offy = (self.GetSize()[1] - self._extent[1]) // 2 #centered vertically
++         dc.DrawText(self._text, offx, offy)
++ 
++ 
+
diff --git a/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
new file mode 100644
index 000000000000..88c3ca189647
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
@@ -0,0 +1,57 @@
+From 1d5fd72dff63d62dd19b77e489d4115245d4d453 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 28 2021 02:58:12 +0000
+Subject: Fix more Python 3.10 issues with AGW FlatNotebook (#2035790)
+
+
+---
+
+diff --git a/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+new file mode 100644
+index 0000000..e8b74ac
+--- /dev/null
++++ b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+@@ -0,0 +1,43 @@
++From aa3dca0e40bd0701e82ce40297a982b5b84844dc Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Mon, 27 Dec 2021 19:48:55 -0500
++Subject: [PATCH] Fix additional Python 3.10 issues with AGW FlatNotebook
++
++---
++ wx/lib/agw/flatnotebook.py | 14 +++++++-------
++ 1 file changed, 7 insertions(+), 7 deletions(-)
++
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index d33f71d51..61bc4efb3 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -925,14 +925,14 @@ def DrawButton(dc, rect, focus, upperTabs):
++ 
++     if focus:
++         if upperTabs:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*8)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*8)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*8))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*8))
++         else:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*5)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*5)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*5))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*5))
++     else:
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 2)))
+++        rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 2)))
++ 
++     # Define the top region
++     top = wx.Rect(rect.GetTopLeft(), rightPt)
++@@ -2766,7 +2766,7 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         if pageTextColour is not None:
++             dc.SetTextForeground(pageTextColour)
++ 
++-        dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset, imageYCoord)
+++        dc.DrawText(pc.GetPageText(tabIdx), int(posx + textOffset), imageYCoord)
++ 
++         # draw 'x' on tab (if enabled)
++         if pc.HasAGWFlag(FNB_X_ON_TAB) and tabIdx == pc.GetSelection():
diff --git a/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
new file mode 100644
index 000000000000..6f21ecb7a718
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
@@ -0,0 +1,52 @@
+Backport https://github.com/wxWidgets/Phoenix/pull/1849
+Regarding segfault as in https://github.com/OSGeo/grass/issues/1123
+
+From 5cace47aaece3cc4f2e6ea97d7fd5bb8ed316ac9 Mon Sep 17 00:00:00 2001
+From: Robin Dunn <robin@alldunn.com>
+Date: Wed, 18 Nov 2020 10:52:53 -0800
+Subject: [PATCH] Restore GIL acquisition in wxPseudoDC::FindObjects*
+
+---
+ src/pseudodc.cpp | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/pseudodc.cpp b/src/pseudodc.cpp
+index 5890ed7e2..ed4bcd06a 100644
+--- a/src/pseudodc.cpp
++++ b/src/pseudodc.cpp
+@@ -483,7 +483,7 @@ bool wxPseudoDC::GetIdGreyedOut(int id)
+ // ----------------------------------------------------------------------------
+ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -501,7 +501,6 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+         }
+         pt = pt->GetNext();
+     }
+-    //wxPyEndBlockThreads(blocked);
+     return pyList;
+ }
+ 
+@@ -511,7 +510,7 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+                                   wxCoord radius, const wxColor& bg)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -611,8 +610,7 @@ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+         maskdc.SelectObject(wxNullBitmap);
+         memdc.SelectObject(wxNullBitmap);
+     }
+-    //wxPyEndBlockThreads(blocked);
+-    return pyList;
++     return pyList;
+ }
+ 
+ // ----------------------------------------------------------------------------
diff --git a/srcpkgs/wxPython4/template b/srcpkgs/wxPython4/template
index 554174105a36..afea1b55bf90 100644
--- a/srcpkgs/wxPython4/template
+++ b/srcpkgs/wxPython4/template
@@ -1,7 +1,7 @@
 # Template file for 'wxPython4'
 pkgname=wxPython4
 version=4.0.7
-revision=4
+revision=5
 wrksrc="wxPython-${version}"
 build_style=python3-module
 make_build_args="--skip-build"
@@ -10,6 +10,7 @@ hostmakedepends="pkg-config python3-setuptools python3-pathlib2"
 makedepends="python3-devel wxWidgets-gtk3-devel SDL2-devel webkit2gtk-devel
  gst-plugins-base1-devel"
 depends="python3 python3-six python3-numpy python3-Pillow"
+checkdepends="python3-six python3-numpy python3-Pillow"
 short_desc="WxWidgets GUI toolkit library (Python3 Bindings)"
 maintainer="Jasper Chan <jasperchan515@gmail.com>"
 license="custom:wxWindows"

From 8fbcad8b52c17b741324f6e4287f97100a13aef6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 21:56:03 +0100
Subject: [PATCH 09/17] grass: update to 7.8.7RC1; rebuild against libgdal and
 proj

Version 7.8.7RC1 includes a workaround for a wxPython issue
https://github.com/OSGeo/grass/issues/1971#issuecomment-993622613
---
 common/shlibs                              |   7 ++
 srcpkgs/grass/patches/musl-build-fix.patch |  13 +++
 srcpkgs/grass/template                     | 128 +++++++++++++++++----
 3 files changed, 127 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/common/shlibs b/common/shlibs
index 5a76dc9ee9e0..dd56978f4269 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4117,3 +4117,10 @@ libkmlengine.so.1 libkml-1.3.0_1
 libkmlregionator.so.1 libkml-1.3.0_1
 libkmlxsd.so.1 libkml-1.3.0_1
 libkmlconvenience.so.1 libkml-1.3.0_1
+libgrass_dbmibase.7.8.so grass-7.8.7RC1_1
+libgrass_dbmiclient.7.8.so grass-7.8.7RC1_1
+libgrass_gis.7.8.so grass-7.8.7RC1_1
+libgrass_gproj.7.8.so grass-7.8.7RC1_1
+libgrass_imagery.7.8.so grass-7.8.7RC1_1
+libgrass_raster.7.8.so grass-7.8.7RC1_1
+libgrass_vector.7.8.so grass-7.8.7RC1_1
diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..364ee30be4d9
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,13 @@
+error: unknown type name 'int64_t' patch for musl
+
+diff --git a/include/gis.h b/include/gis.h
+--- a/include/gis.h
++++ b/include/gis.h
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ 
+ 
+ /* Grass and local include files */
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..167faa401385 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,116 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.7RC1
+revision=1
+_binversion=${version//./}
+_binversion=${_binversion:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=/usr/lib
+ --bindir=/usr/bin
+ --libdir=/usr/lib
+ --libexec=/usr/libexec
+ --enable-largefile
+ --with-blas
+ --with-blas-includes=/usr/include
+ --with-bzip2
+ --with-bzlib
+ --with-cairo
+ --with-cxx
+ --with-freetype
+ --with-freetype-includes=/usr/include/freetype2
+ --with-gdal
+ --with-geos
+ --with-glw
+ --with-lapack
+ --with-lapack-includes=/usr/include
+ --with-mysql
+ --with-mysql-includes=/usr/include/mysql
+ --with-netcdf=/usr/bin/nc-config
+ --with-nls
+ --with-openmp
+ --with-postgres
+ --with-postgres-includes=/usr/include/postgresql
+ --with-postgres-libs=/usr/lib/psql14/lib/postgresql
+ --with-proj
+ --with-proj-share=/usr/share
+ --with-pthread
+ --with-python=/usr/bin/python3-config
+ --with-readline
+ --with-regex
+ --with-sqlite
+ --with-wxwidgets"
+hostmakedepends="flex
+ gettext
+ libgdal-tools
+ pkg-config
+ python3-numpy
+ python3-six
+ tar"
+makedepends="bison
+ blas-devel
+ bzip2-devel
+ cairo-devel
+ fftw-devel
+ freetype-devel
+ geos-devel
+ gettext-devel
+ glu-devel
+ lapack-devel
+ libgdal-devel
+ libgomp-devel
+ libmysqlclient-devel
+ libpng-devel
+ libzstd-devel
+ netcdf-devel
+ postgresql-libs-devel
+ proj-devel
+ python3-devel
+ python3-Pillow
+ python3-six
+ readline-devel
+ sqlite-devel
+ tiff-devel
+ zlib-devel"
+depends="libgdal python3-numpy wxPython4"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=fa1d6ccc1fde4cbea0be095256729421c41c1a12bf621fe124d0d2c8e826de6a
 nocross="tries to execute target binaries"
 
+shlib_provides="
+ libgrass_dbmibase.${version%.*}.so
+ libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so
+ libgrass_gproj.${version%.*}.so
+ libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so
+ libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass78 \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binversion}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binversion}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binversion}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binversion}.sh
+
+	vinstall grass.pc 644 usr/share/pkgconfig
+	vinstall gui/icons/grass.desktop 644 usr/share/applications
+
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

From 19d38268586d36730e60be9fa0c472dedf14617f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 10/17] merkaartor: rebuild against libgdal-3.4.1 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From f97d5512a9c378c04e72428e19666fee2cb3b4e8 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 11/17] OpenOrienteering-Mapper: rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From 29f7a1209682cc8e298e4a5a081fc3f0c596f302 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 12/17] osg: rebuild against libgdal-3.4.1, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From 0232bb3a9a1ba123cb5ecd38d3fb003a324780f0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 13/17] sumo: update to 1.9.2; rebuild against libgdal-3.4.1
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 common/shlibs         |  2 ++
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index dd56978f4269..f0436909d066 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4124,3 +4124,5 @@ libgrass_gproj.7.8.so grass-7.8.7RC1_1
 libgrass_imagery.7.8.so grass-7.8.7RC1_1
 libgrass_raster.7.8.so grass-7.8.7RC1_1
 libgrass_vector.7.8.so grass-7.8.7RC1_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index e760fdd45aee..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=4
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From 9291c6f1effd3481e5018da4bc3fa03aacef5a52 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 14/17] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 81a10a7dfc03e78a87b4b4f6e22bfa01e1b8332c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 15/17] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 184998ce603819768c88e11d7dd997729f86d66d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 16/17] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From 2e33d9b9db1a7bcb3f448b3049300cd5289c305a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Feb 2022 22:46:45 +0100
Subject: [PATCH 17/17] New package: libspatialite-5.0.1

---
 common/shlibs                                 |  2 +
 .../patches/disable_check_drop_rename.patch   | 28 +++++++++++++
 .../patches/disable_check_sql_stmt.patch      | 29 +++++++++++++
 srcpkgs/libspatialite/template                | 42 +++++++++++++++++++
 4 files changed, 101 insertions(+)
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index f0436909d066..5f7e7bac88d3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4117,6 +4117,8 @@ libkmlengine.so.1 libkml-1.3.0_1
 libkmlregionator.so.1 libkml-1.3.0_1
 libkmlxsd.so.1 libkml-1.3.0_1
 libkmlconvenience.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.1_1
+mod_spatialite.so.7 libspatialite-5.0.1_1
 libgrass_dbmibase.7.8.so grass-7.8.7RC1_1
 libgrass_dbmiclient.7.8.so grass-7.8.7RC1_1
 libgrass_gis.7.8.so grass-7.8.7RC1_1
diff --git a/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch b/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
new file mode 100644
index 000000000000..30b67f5b8f61
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
@@ -0,0 +1,28 @@
+Disable check_drop_rename test. It fails with:
+RenameTable "table_1" error: RenameTable exception - error in trigger ISO_metadata_reference_row_id_value_insert: no such column: rowid.
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index fec25dd..50b16ae 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -74,7 +74,6 @@ check_PROGRAMS = check_endian \
+ 		check_sequence \
+ 		check_stored_proc \
+ 		check_wms \
+-		check_drop_rename \
+ 		routing_test \
+ 		geojson_test \
+ 		check_zipshp
+diff --git a/test/Makefile.in b/test/Makefile.in
+index 8a0b154..52a1066 100644
+--- a/test/Makefile.in
++++ b/test/Makefile.in
+@@ -124,7 +124,7 @@ check_PROGRAMS = check_endian$(EXEEXT) check_version$(EXEEXT) \
+ 	check_network2d$(EXEEXT) check_network3d$(EXEEXT) \
+ 	check_network_log$(EXEEXT) check_virtualknn$(EXEEXT) \
+ 	check_sequence$(EXEEXT) check_stored_proc$(EXEEXT) \
+-	check_wms$(EXEEXT) check_drop_rename$(EXEEXT) \
++	check_wms$(EXEEXT) \
+ 	routing_test$(EXEEXT) geojson_test$(EXEEXT) \
+ 	check_zipshp$(EXEEXT) $(am__EXEEXT_1)
+ @ENABLE_GEOPACKAGE_TRUE@am__append_1 = \
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch b/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
new file mode 100644
index 000000000000..1dc3b5705955
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
@@ -0,0 +1,29 @@
+Disable check_sql_stmt tests
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..31c10a5577e7
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,42 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.1
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config librttopo geos-devel libxml2"
+makedepends="freexl-devel
+ geos-devel
+ librttopo-devel
+ libxml2-devel
+ minizip-devel
+ proj-devel
+ sqlite-devel
+ zlib-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (33 preceding siblings ...)
  2022-02-15 22:02 ` ar-jan
@ 2022-02-15 22:13 ` ar-jan
  2022-02-15 22:21 ` ar-jan
                   ` (22 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-15 22:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 208106 bytes --]

From 89816b6d8e6ebc3175615d464ca65b6af905cac2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/17] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 0c60260b4642..b0fcfd04926e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From c595ec74f356e0f35d53e59ae1b3b6bae215f6e3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Feb 2022 14:44:54 +0100
Subject: [PATCH 02/17] New package: librttopo-1.1.0

The RT Topology Library exposes an API to create and manage standard
(ISO 13249 aka SQL/MM) topologies using user-provided data stores.

It is needed to build libspatialite (as of v5.0.1) with tests passing.
---
 common/shlibs              |  1 +
 srcpkgs/librttopo-devel    |  1 +
 srcpkgs/librttopo/template | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 120000 srcpkgs/librttopo-devel
 create mode 100644 srcpkgs/librttopo/template

diff --git a/common/shlibs b/common/shlibs
index b0fcfd04926e..734c16281f0e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4110,3 +4110,4 @@ libawt_xawt.so openjdk17-jre-17.0.1+12_1
 libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
+librttopo.so.1 librttopo-1.1.0_1
diff --git a/srcpkgs/librttopo-devel b/srcpkgs/librttopo-devel
new file mode 120000
index 000000000000..acf3607f5fec
--- /dev/null
+++ b/srcpkgs/librttopo-devel
@@ -0,0 +1 @@
+librttopo
\ No newline at end of file
diff --git a/srcpkgs/librttopo/template b/srcpkgs/librttopo/template
new file mode 100644
index 000000000000..b7f6b2a700d6
--- /dev/null
+++ b/srcpkgs/librttopo/template
@@ -0,0 +1,29 @@
+# Template file for 'librttopo'
+pkgname=librttopo
+version=1.1.0
+revision=1
+wrksrc="${pkgname}"
+build_style=gnu-configure
+hostmakedepends="base-devel autoconf-archive"
+makedepends="base-devel autoconf-archive geos-devel"
+short_desc="RT Topology Library exposes an API for managing standard topologies"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://git.osgeo.org/gitea/rttopo/librttopo"
+distfiles="https://git.osgeo.org/gitea/rttopo/librttopo/archive/librttopo-${version}.tar.gz"
+checksum="2e2fcabb48193a712a6c76ac9a9be2a53f82e32f91a2bc834d9f1b4fa9cd879f"
+
+pre_configure() {
+	autoreconf -if
+}
+
+librttopo-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+		vmove usr/lib/pkgconfig
+	}
+}

From 35f72c780a10ad49ea0906e5422e8f35b557a7a1 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/17] New package: libkml-1.3.0

---
 common/shlibs                          |  6 ++++++
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 ++++++++++++++++
 srcpkgs/libkml/template                | 27 ++++++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/common/shlibs b/common/shlibs
index 734c16281f0e..7cf876600089 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4111,3 +4111,9 @@ libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
 librttopo.so.1 librttopo-1.1.0_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libkmlconvenience.so.1 libkml-1.3.0_1
diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..b67eece4d8ba
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,27 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="boost-devel
+ expat-devel
+ minizip-devel
+ uriparser-devel
+ zlib-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From d0e2d23606fd6bca8f2abfa1857ed3c42573c889 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Feb 2022 22:46:45 +0100
Subject: [PATCH 04/17] New package: libspatialite-5.0.1

---
 common/shlibs                                 | 11 +++++
 .../patches/disable_check_drop_rename.patch   | 28 +++++++++++++
 .../patches/disable_check_sql_stmt.patch      | 29 +++++++++++++
 srcpkgs/libspatialite/template                | 42 +++++++++++++++++++
 4 files changed, 110 insertions(+)
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index 7cf876600089..98a0405d6abb 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4117,3 +4117,14 @@ libkmlengine.so.1 libkml-1.3.0_1
 libkmlregionator.so.1 libkml-1.3.0_1
 libkmlxsd.so.1 libkml-1.3.0_1
 libkmlconvenience.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.1_1
+mod_spatialite.so.7 libspatialite-5.0.1_1
+libgrass_dbmibase.7.8.so grass-7.8.7RC1_1
+libgrass_dbmiclient.7.8.so grass-7.8.7RC1_1
+libgrass_gis.7.8.so grass-7.8.7RC1_1
+libgrass_gproj.7.8.so grass-7.8.7RC1_1
+libgrass_imagery.7.8.so grass-7.8.7RC1_1
+libgrass_raster.7.8.so grass-7.8.7RC1_1
+libgrass_vector.7.8.so grass-7.8.7RC1_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch b/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
new file mode 100644
index 000000000000..30b67f5b8f61
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
@@ -0,0 +1,28 @@
+Disable check_drop_rename test. It fails with:
+RenameTable "table_1" error: RenameTable exception - error in trigger ISO_metadata_reference_row_id_value_insert: no such column: rowid.
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index fec25dd..50b16ae 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -74,7 +74,6 @@ check_PROGRAMS = check_endian \
+ 		check_sequence \
+ 		check_stored_proc \
+ 		check_wms \
+-		check_drop_rename \
+ 		routing_test \
+ 		geojson_test \
+ 		check_zipshp
+diff --git a/test/Makefile.in b/test/Makefile.in
+index 8a0b154..52a1066 100644
+--- a/test/Makefile.in
++++ b/test/Makefile.in
+@@ -124,7 +124,7 @@ check_PROGRAMS = check_endian$(EXEEXT) check_version$(EXEEXT) \
+ 	check_network2d$(EXEEXT) check_network3d$(EXEEXT) \
+ 	check_network_log$(EXEEXT) check_virtualknn$(EXEEXT) \
+ 	check_sequence$(EXEEXT) check_stored_proc$(EXEEXT) \
+-	check_wms$(EXEEXT) check_drop_rename$(EXEEXT) \
++	check_wms$(EXEEXT) \
+ 	routing_test$(EXEEXT) geojson_test$(EXEEXT) \
+ 	check_zipshp$(EXEEXT) $(am__EXEEXT_1)
+ @ENABLE_GEOPACKAGE_TRUE@am__append_1 = \
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch b/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
new file mode 100644
index 000000000000..1dc3b5705955
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
@@ -0,0 +1,29 @@
+Disable check_sql_stmt tests
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..31c10a5577e7
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,42 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.1
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config librttopo geos-devel libxml2"
+makedepends="freexl-devel
+ geos-devel
+ librttopo-devel
+ libxml2-devel
+ minizip-devel
+ proj-devel
+ sqlite-devel
+ zlib-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From 3c6db13674bbc20a7b99376b8a426a6c3d75ba84 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 05/17] libgdal: update to 3.4.1 and rebuild against proj-7.2.1

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 105 ++++++++++++++++--
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 95 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 98a0405d6abb..5f7e7bac88d3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2510,7 +2510,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..5fca579954fa 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,100 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.1
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libspatialite-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ libkml-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=e360387bc25ec24940f46afbeada48002d72c74aaf9eccf2a40e8d74e711a2e4
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +116,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 14e12e68ba61792e15b4f021ea5e97722482f961 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 06/17] postgis: update to 3.1.5; rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..f52cd6657988 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.1.5
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 9c9737a1f0092525905ebc2223a9b96d1b3173ff Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 07/17] postgis-postgresql13: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..a0f5c89ef4da 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
-revision=2
+version=3.1.5
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From c46e6c6efbb4e5435841d40ed57fb2fa7b7b622b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 08/17] postgis-postgresql14: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..ad8d0c5c4253 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.1.5
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From ed5251e0c3cb58c9f6d14c74715651131a41c724 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 9 Aug 2021 19:53:17 +0200
Subject: [PATCH 09/17] wxPython4: backport patches, and fix tests

Backported patches:
- wxPseudoDC GIL
- Python 3.10 AGW FlatNotebook patch
- Python 3.10 ScrolledWindow argument types
- Python 3.10 Integer division
- wx.WindowID and wx.Region arguments
---
 .../patches/0002-Python-3.10-issues.patch     | 3317 +++++++++++++++++
 .../0003-Python-3.10-AGW-FlatNotebook.patch   |   57 +
 .../patches/restore-gil-pseudodc.patch        |   52 +
 srcpkgs/wxPython4/template                    |    3 +-
 4 files changed, 3428 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
 create mode 100644 srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
 create mode 100644 srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch

diff --git a/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
new file mode 100644
index 000000000000..6c87ff967d01
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
@@ -0,0 +1,3317 @@
+From f55a17c2d3b336c82fb44f7816ec63219847f4cc Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 22 2021 20:23:54 +0000
+Subject: Fix a bunch of Python 3.10 issues
+
+
+---
+
+diff --git a/0d449626d6d298ad96ebd1d514d0e42833bce470.patch b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+new file mode 100644
+index 0000000..d2ccddc
+--- /dev/null
++++ b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+@@ -0,0 +1,22 @@
++From 0d449626d6d298ad96ebd1d514d0e42833bce470 Mon Sep 17 00:00:00 2001
++From: Carolina Feher da Silva <carolfsu@gmail.com>
++Date: Tue, 16 Nov 2021 01:24:31 +0000
++Subject: [PATCH] Fixed integer division in Python 3
++
++---
++ wx/lib/stattext.py | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/wx/lib/stattext.py b/wx/lib/stattext.py
++index 2cfb6e65a..e606e5a89 100644
++--- a/wx/lib/stattext.py
+++++ b/wx/lib/stattext.py
++@@ -302,7 +302,7 @@ def OnPaint(self, event):
++             if style & wx.ALIGN_RIGHT:
++                 x = width - w
++             if style & wx.ALIGN_CENTER:
++-                x = (width - w)/2
+++                x = (width - w)//2
++             dc.DrawText(line, x, y)
++             y += h
++ 
+diff --git a/3eb9eb32dc3285435039f6c420c398665372a1ad.patch b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+new file mode 100644
+index 0000000..08e58a0
+--- /dev/null
++++ b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+@@ -0,0 +1,84 @@
++From 3eb9eb32dc3285435039f6c420c398665372a1ad Mon Sep 17 00:00:00 2001
++From: Glen Whitney <glen@studioinfinity.org>
++Date: Tue, 31 Aug 2021 11:06:27 -0700
++Subject: [PATCH] fix: Correct types of arguments to
++ ScrolledWindow.SetScrollbars
++
++---
++ demo/Mask.py                   |  2 +-
++ demo/OGL.py                    |  2 +-
++ wx/lib/agw/ultimatelistctrl.py | 14 +++++++-------
++ 3 files changed, 9 insertions(+), 9 deletions(-)
++
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 5f0c2cdde..109b8f30b 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -56,7 +56,7 @@ def __init__(self, parent):
++         mask = wx.Mask(self.bmp_withcolourmask, wx.WHITE)
++         self.bmp_withcolourmask.SetMask(mask)
++ 
++-        self.SetScrollbars(20, 20, 700/20, 460/20)
+++        self.SetScrollbars(20, 20, 700//20, 460//20)
++ 
++         self.Bind(wx.EVT_PAINT, self.OnPaint)
++ 
++diff --git a/demo/OGL.py b/demo/OGL.py
++index 72ca543dd..d475e5011 100644
++--- a/demo/OGL.py
+++++ b/demo/OGL.py
++@@ -272,7 +272,7 @@ def __init__(self, parent, log, frame):
++ 
++         maxWidth  = 1000
++         maxHeight = 1000
++-        self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
+++        self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
++ 
++         self.log = log
++         self.frame = frame
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index c60867684..14fc41f86 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -9654,8 +9654,8 @@ def RecalculatePositions(self, noRefresh=False):
++                 self._linesPerPage = clientHeight//lineHeight
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + lineHeight - 1)/lineHeight,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + lineHeight - 1)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9676,8 +9676,8 @@ def RecalculatePositions(self, noRefresh=False):
++                     decrement = SCROLL_UNIT_X
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + SCROLL_UNIT_Y - 1)/SCROLL_UNIT_Y,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + SCROLL_UNIT_Y - 1)//SCROLL_UNIT_Y,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9728,8 +9728,8 @@ def RecalculatePositions(self, noRefresh=False):
++                         line._gi.ExtendWidth(widthMax)
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (x + SCROLL_UNIT_X)/SCROLL_UNIT_X,
++-                                   (y + lineHeight)/lineHeight,
+++                                   (x + SCROLL_UNIT_X)//SCROLL_UNIT_X,
+++                                   (y + lineHeight)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9797,7 +9797,7 @@ def RecalculatePositions(self, noRefresh=False):
++                             break  # Everything fits, no second try required.
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (entireWidth + SCROLL_UNIT_X)/SCROLL_UNIT_X,
+++                                   (entireWidth + SCROLL_UNIT_X)//SCROLL_UNIT_X,
++                                    0,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    0,
+diff --git a/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+new file mode 100644
+index 0000000..f0b9f5d
+--- /dev/null
++++ b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+@@ -0,0 +1,143 @@
++From 9096426603272672d9a676e8bcdcadf0a1cfa1a2 Mon Sep 17 00:00:00 2001
++From: Robin Dunn <robin@alldunn.com>
++Date: Wed, 26 Feb 2020 11:10:27 -0800
++Subject: [PATCH] Add __index__ to wx.WindowID, and __bool__ to wx.Region
++
++---
++ etg/region.py              |  5 +++--
++ etg/windowid.py            | 32 +++++++++++++++++---------------
++ unittests/test_windowid.py | 23 +++++++++++++++++++++--
++ 3 files changed, 41 insertions(+), 19 deletions(-)
++
++diff --git a/etg/region.py b/etg/region.py
++index 0982c1fe5..d5bc45759 100644
++--- a/etg/region.py
+++++ b/etg/region.py
++@@ -88,11 +88,12 @@ def next(self):
++     c.mustHaveApp()
++     c.find('operator++').ignore()
++ 
++-    # SIP maps operator bool() to __int__, but Classic used __nonzero__. Does
++-    # it make any difference either way?
++     c.find('operator bool').ignore()
++     c.addCppMethod('int', '__nonzero__', '()', 'return (int)self->operator bool();',
++                    'Returns true while there are still rectangles available in the iteration.')
+++    c.addCppMethod('int', '__bool__', '()', 'return (int)self->operator bool();',
+++                   'Returns true while there are still rectangles available in the iteration.')
+++
++ 
++     c.addCppMethod('void', 'Next', '()', 'self->operator++();',
++                    'Move the iterator to the next rectangle in the region.')
++diff --git a/etg/windowid.py b/etg/windowid.py
++index 27b041b3d..da2ed395e 100644
++--- a/etg/windowid.py
+++++ b/etg/windowid.py
++@@ -53,12 +53,12 @@ def run():
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Create reference from an ID',
++                     items=[ ParamDef(type='int', name='id') ]),
++-                
+++
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Copy an ID reference',
++                     items=[ ParamDef(type='const wxWindowIDRef&', name='idref') ]),
++                 ]),
++-            
+++
++             MethodDef(name='~wxWindowIDRef', className='wxWindowIDRef', isDtor=True),
++ 
++             MethodDef(type='int', name='GetValue',
++@@ -73,11 +73,13 @@ def run():
++             """)
++ 
++     klass.addCppMethod('int', '__int__', '()',
++-        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or etc.",
++-        body="""\
++-            return self->GetValue();
++-            """)
++-    
+++        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or other places an integer type is needed.",
+++        body="return self->GetValue();")
+++    klass.addCppMethod('int', '__index__', '()',
+++        doc="See :meth:`__int__`",
+++        body="return self->GetValue();")
+++
+++
++     klass.addCppMethod('bool', '__eq__', '(wxWindowID id)', "return self->GetValue() == id;")
++     klass.addCppMethod('bool', '__ne__', '(wxWindowID id)', "return self->GetValue() != id;")
++     klass.addCppMethod('bool', '__lt__', '(wxWindowID id)', "return self->GetValue() < id;")
++@@ -92,17 +94,17 @@ def run():
++     # and finish it up by adding it to the module
++     module.addItem(klass)
++ 
++-    # Now, let's add a new Python function to the global scope that reserves an 
++-    # ID (or range) and returns a ref object for it. 
++-    module.addPyFunction('NewIdRef', '(count=1)', 
+++    # Now, let's add a new Python function to the global scope that reserves an
+++    # ID (or range) and returns a ref object for it.
+++    module.addPyFunction('NewIdRef', '(count=1)',
++         doc="""\
++-            Reserves a new Window ID (or range of WindowIDs) and returns a 
++-            :class:`wx.WindowIDRef` object (or list of them) that will help 
+++            Reserves a new Window ID (or range of WindowIDs) and returns a
+++            :class:`wx.WindowIDRef` object (or list of them) that will help
++             manage the reservation of that ID.
++ 
++-            This function is intended to be a drop-in replacement of the old 
++-            and deprecated :func:`wx.NewId` function, with the added benefit 
++-            that the ID should never conflict with an in-use ID or other IDs 
+++            This function is intended to be a drop-in replacement of the old
+++            and deprecated :func:`wx.NewId` function, with the added benefit
+++            that the ID should never conflict with an in-use ID or other IDs
++             generated by this function.
++             """,
++         body="""\
++diff --git a/unittests/test_windowid.py b/unittests/test_windowid.py
++index 4593e5a69..fc36c9eb8 100644
++--- a/unittests/test_windowid.py
+++++ b/unittests/test_windowid.py
++@@ -31,9 +31,9 @@ def test_newIdRef02(self):
++     def test_newIdRef03(self):
++         """Check that Auto ID Management is enabled (--enable-autoidman)"""
++         # This test is expected to fail if autoID mangagement is turned on
++-        # because a reference to the ID is not being saved, so it will be 
+++        # because a reference to the ID is not being saved, so it will be
++         # unreserved when the first widget is destroyed.
++-        
+++
++         id = wx.Window.NewControlId()
++         b = wx.Button(self.frame, id, 'button')
++         b.Destroy()
++@@ -75,6 +75,7 @@ def test_WindowIDRef01(self):
++         val = ref1 <= ref2
++         assert type(val) == bool
++ 
+++
++     def test_WindowIDRef02(self):
++         d = {wx.NewIdRef(): 'one',
++              wx.NewIdRef(): 'two'}
++@@ -82,6 +83,24 @@ def test_WindowIDRef02(self):
++         for k in keys:
++             val = d[k]
++ 
+++
+++    def test_WindowIDRef03(self):
+++        # Ensure wx.WindowIDRef can be converted to int without warning when
+++        # making a call to warrped method. In Py3.8+ this means there needs to
+++        # be an __index__ method.
+++
+++        # Turn warnings into exceptions so this test will fail if there is
+++        # a warning
+++        import warnings
+++        warnings.simplefilter('error')
+++
+++        wid = wx.NewIdRef()
+++        assert isinstance(wid, wx.WindowIDRef)
+++
+++        b = wx.Button(self.frame, wid, 'button')
+++        assert b.GetId() == wid.GetId()
+++
+++
++ #---------------------------------------------------------------------------
++ 
++ 
+ 
+diff --git a/python3.10-fixes.patch b/python3.10-fixes.patch
+new file mode 100644
+index 0000000..29e8c61
+--- /dev/null
++++ b/python3.10-fixes.patch
+@@ -0,0 +1,3034 @@
++From 173d0796810bb65de9bdfdc6941d24a04628f6c2 Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Wed, 1 Dec 2021 14:19:00 -0500
++Subject: [PATCH] Fix a bunch of Python 3.10 issues with pure-Python classes
++ and demos
++
++In Python 3.10, a change[1] was implemented where extension functions
++that take integer arguments will no longer silently accept non-integer
++arguments (e.g., floats) that can only be converted to integers with a
++loss of precision.  This PR fixes most of these issues in the pure-Python
++classes and demos by explicitly converting the parameters to int before
++passing them to wxWidgets.  There is loss of precision, but this was
++happening before (automatically) anyway as most wxWidgets DeviceContext
++functions operate using integers.
++
++Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
++too small on GTK3.
++
++This is an example of the relevant exception:
++Traceback (most recent call last):
++  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
++    r.width = w
++TypeError: 'float' object cannot be interpreted as an integer
++
++Fixes #2038.
++
++[1] https://bugs.python.org/issue37999
++---
++ demo/GridLabelRenderer.py               |   4 +-
++ demo/Mask.py                            |   4 +-
++ demo/Overlay.py                         |   1 -
++ demo/PenAndBrushStyles.py               |   2 +-
++ demo/PopupWindow.py                     |   2 +-
++ demo/PrintFramework.py                  |   2 +-
++ demo/PropertyGrid.py                    |   2 +-
++ demo/Sizers.py                          |   2 +-
++ demo/UIActionSimulator.py               |   2 +-
++ demo/agw/AUI.py                         |  32 +++----
++ demo/agw/MacLargeDemo.py                |   4 +-
++ demo/agw/PeakMeter.py                   |   6 +-
++ demo/agw/PersistentControls.py          |   2 +-
++ demo/agw/RibbonBar.py                   |   2 +-
++ demo/agw/SpeedMeter.py                  |   2 +-
++ demo/agw/SuperToolTip.py                |   3 +-
++ demo/agw/ThumbDemoConfig.py             |   1 +
++ demo/agw/UltimateReportDemo.py          |   8 +-
++ demo/agw/Windows7Explorer_Contents.py   |  16 ++--
++ demo/agw/ZoomBar.py                     |   2 +-
++ wx/lib/agw/advancedsplash.py            |   2 +-
++ wx/lib/agw/aui/aui_utilities.py         |   4 +-
++ wx/lib/agw/aui/auibook.py               |   4 +-
++ wx/lib/agw/balloontip.py                |   4 +-
++ wx/lib/agw/flatmenu.py                  |  62 ++++++-------
++ wx/lib/agw/flatnotebook.py              |  10 +--
++ wx/lib/agw/floatspin.py                 |   2 +-
++ wx/lib/agw/gradientbutton.py            |   8 +-
++ wx/lib/agw/hypertreelist.py             |   2 +-
++ wx/lib/agw/knobctrl.py                  |  12 +--
++ wx/lib/agw/labelbook.py                 |  32 +++----
++ wx/lib/agw/peakmeter.py                 |   2 +-
++ wx/lib/agw/pygauge.py                   |   4 +-
++ wx/lib/agw/ribbon/art_aui.py            |  22 ++---
++ wx/lib/agw/ribbon/art_internal.py       |  12 +--
++ wx/lib/agw/ribbon/art_msw.py            |  88 +++++++++----------
++ wx/lib/agw/ribbon/bar.py                |   4 +-
++ wx/lib/agw/ribbon/buttonbar.py          |   6 +-
++ wx/lib/agw/ribbon/gallery.py            |   8 +-
++ wx/lib/agw/ribbon/panel.py              |  16 ++--
++ wx/lib/agw/ribbon/toolbar.py            |   2 +-
++ wx/lib/agw/scrolledthumbnail.py         |  24 +++---
++ wx/lib/agw/shapedbutton.py              |  10 +--
++ wx/lib/agw/speedmeter.py                |  72 +++++++++-------
++ wx/lib/agw/supertooltip.py              |  20 ++---
++ wx/lib/agw/toasterbox.py                |   4 +-
++ wx/lib/agw/ultimatelistctrl.py          |  20 ++---
++ wx/lib/agw/xlsgrid.py                   |   4 +-
++ wx/lib/agw/zoombar.py                   |  10 +--
++ wx/lib/analogclock/analogclock.py       |   2 +-
++ wx/lib/analogclock/helpers.py           |  22 ++---
++ wx/lib/analogclock/setup.py             |   6 +-
++ wx/lib/buttons.py                       |  10 +--
++ wx/lib/colourchooser/pycolourchooser.py |   4 +-
++ wx/lib/colourchooser/pypalette.py       |   2 +-
++ wx/lib/floatcanvas/FCObjects.py         |   8 +-
++ wx/lib/gizmos/ledctrl.py                |   8 +-
++ wx/lib/imagebrowser.py                  |   4 +-
++ wx/lib/ogl/basic.py                     |  10 +--
++ wx/lib/ogl/bmpshape.py                  |   2 +-
++ wx/lib/ogl/composit.py                  |   4 +-
++ wx/lib/ogl/divided.py                   |   2 +-
++ wx/lib/ogl/lines.py                     |   2 +-
++ wx/lib/ogl/oglmisc.py                   |   4 +-
++ wx/lib/plot/examples/demo.py            |   4 +-
++ wx/lib/plot/plotcanvas.py               | 110 ++++++++++++------------
++ wx/lib/plot/polyobjects.py              |  22 +++--
++ wx/lib/popupctl.py                      |   2 +-
++ wx/lib/scrolledpanel.py                 |   2 +-
++ wx/lib/throbber.py                      |   6 +-
++ wx/lib/ticker.py                        |   4 +-
++ 71 files changed, 411 insertions(+), 398 deletions(-)
++
++diff --git a/demo/GridLabelRenderer.py b/demo/GridLabelRenderer.py
++index 794dd64e8..1440ef41b 100644
++--- a/demo/GridLabelRenderer.py
+++++ b/demo/GridLabelRenderer.py
++@@ -46,8 +46,8 @@ def __init__(self):
++         self._bmp = images.Smiles.GetBitmap()
++ 
++     def Draw(self, grid, dc, rect, rc):
++-        x = rect.left + (rect.width - self._bmp.GetWidth()) / 2
++-        y = rect.top + (rect.height - self._bmp.GetHeight()) / 2
+++        x = rect.left + (rect.width - self._bmp.GetWidth()) // 2
+++        y = rect.top + (rect.height - self._bmp.GetHeight()) // 2
++         dc.DrawBitmap(self._bmp, x, y, True)
++ 
++ 
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 109b8f30b..e924f95b9 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -90,9 +90,9 @@ def OnPaint (self, e):
++ 
++         for text, code in logicList:
++             x,y = 120+150*(i%4), 20+100*(i/4)
++-            dc.DrawText(text, x, y-20)
+++            dc.DrawText(text, x, int(y-20))
++             mdc.SelectObject(self.bmp_withcolourmask)
++-            dc.Blit(x,y, cx,cy, mdc, 0,0, code, True)
+++            dc.Blit(x,int(y), cx,cy, mdc, 0,0, code, True)
++             i = i + 1
++ 
++ 
++diff --git a/demo/Overlay.py b/demo/Overlay.py
++index 65164cd84..fa65be003 100644
++--- a/demo/Overlay.py
+++++ b/demo/Overlay.py
++@@ -56,7 +56,6 @@ def __init__(self, parent, log):
++         self.penstylesCombo.SetToolTip('Pen Style')
++ 
++         self.overlayPenWidth = wx.SpinCtrl(self, -1, value='',
++-                                           size=(75, -1),
++                                            style=wx.SP_ARROW_KEYS,
++                                            min=1, max=24, initial=1)
++         self.overlayPenWidth.SetToolTip('Pen Width')
++diff --git a/demo/PenAndBrushStyles.py b/demo/PenAndBrushStyles.py
++index 24040b1fc..1183f684a 100644
++--- a/demo/PenAndBrushStyles.py
+++++ b/demo/PenAndBrushStyles.py
++@@ -100,7 +100,7 @@ def OnPaint(self, event):
++ 
++         dc.SetPen(pen)
++         y = labelHeight + (height - labelHeight)/2
++-        dc.DrawLine(5, y, width-5, y)
+++        dc.DrawLine(5, int(y), width-5, int(y))
++ 
++ 
++ class BrushPanel(BasePanel):
++diff --git a/demo/PopupWindow.py b/demo/PopupWindow.py
++index d8e175576..b54b9870d 100644
++--- a/demo/PopupWindow.py
+++++ b/demo/PopupWindow.py
++@@ -89,7 +89,7 @@ def __init__(self, parent, style, log):
++                           "(or its first child) loses focus in \n"
++                           "any other way.")
++         btn = wx.Button(panel, -1, "Press Me")
++-        spin = wx.SpinCtrl(panel, -1, "Hello", size=(100,-1))
+++        spin = wx.SpinCtrl(panel, -1, "Hello")
++         btn.Bind(wx.EVT_BUTTON, self.OnButton)
++ 
++         sizer = wx.BoxSizer(wx.VERTICAL)
++diff --git a/demo/PrintFramework.py b/demo/PrintFramework.py
++index e7a29a077..f0873ae94 100644
++--- a/demo/PrintFramework.py
+++++ b/demo/PrintFramework.py
++@@ -81,7 +81,7 @@ def OnPrintPage(self, page):
++ 
++         #-------------------------------------------
++         self.canvas.DoDrawing(dc, True)
++-        dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
+++        dc.DrawText("Page: %d" % page, marginX//2, maxY-marginY)
++ 
++         return True
++ 
++diff --git a/demo/PropertyGrid.py b/demo/PropertyGrid.py
++index c56e08b60..fbef29e31 100644
++--- a/demo/PropertyGrid.py
+++++ b/demo/PropertyGrid.py
++@@ -150,7 +150,7 @@ def _ConvertValue(self, value):
++         """ Utility convert arbitrary value to a real wx.Size.
++         """
++         import collections
++-        if isinstance(value, collections.Sequence) or hasattr(value, '__getitem__'):
+++        if isinstance(value, collections.abc.Sequence) or hasattr(value, '__getitem__'):
++             value = wx.Size(*value)
++         return value
++ 
++diff --git a/demo/Sizers.py b/demo/Sizers.py
++index 6ababede9..a025050f1 100644
++--- a/demo/Sizers.py
+++++ b/demo/Sizers.py
++@@ -45,7 +45,7 @@ def OnPaint(self, evt):
++         dc = wx.PaintDC(self)
++         w,h = dc.GetTextExtent(self.text)
++         dc.Clear()
++-        dc.DrawText(self.text, (sz.width-w)/2, (sz.height-h)/2)
+++        dc.DrawText(self.text, (sz.width-w)//2, (sz.height-h)//2)
++ 
++     def OnSize(self, evt):
++         self.Refresh()
++diff --git a/demo/UIActionSimulator.py b/demo/UIActionSimulator.py
++index cbba14f5c..0a6fd0234 100644
++--- a/demo/UIActionSimulator.py
+++++ b/demo/UIActionSimulator.py
++@@ -88,7 +88,7 @@ def _playbackKey(self, evtType, key, modifiers):
++ 
++     def _setNextKeyEvent(self):
++         evtType, key, modifiers, milli = self._playbackEvents.pop(0)
++-        milli = max(milli/2, 1) # play back faster than it was recorded
+++        milli = max(milli//2, 1) # play back faster than it was recorded
++         print(evtType, key, modifiers, milli)
++         wx.CallLater(milli, self._playbackKey, evtType, key, modifiers)
++ 
++diff --git a/demo/agw/AUI.py b/demo/agw/AUI.py
++index 7c2196865..b38313c86 100644
++--- a/demo/agw/AUI.py
+++++ b/demo/agw/AUI.py
++@@ -393,7 +393,7 @@ def OnPaint(self, event):
++         dc.SetPen(wx.LIGHT_GREY_PEN)
++         dc.DrawLine(0, 0, size.x, size.y)
++         dc.DrawLine(0, size.y, size.x, 0)
++-        dc.DrawText(s, (size.x-w)/2, (size.y-height*5)/2)
+++        dc.DrawText(s, (size.x-w)//2, (size.y-height*5)//2)
++ 
++         if self._mgr:
++ 
++@@ -401,19 +401,19 @@ def OnPaint(self, event):
++ 
++             s = "Layer: %d"%pi.dock_layer
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*1))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*1))
++ 
++             s = "Dock: %d Row: %d"%(pi.dock_direction, pi.dock_row)
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*2))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*2))
++ 
++             s = "Position: %d"%pi.dock_pos
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*3))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*3))
++ 
++             s = "Proportion: %d"%pi.dock_proportion
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*4))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*4))
++ 
++ 
++     def OnEraseBackground(self, event):
++@@ -435,7 +435,7 @@ def __init__(self, parent, frame):
++ 
++         s1 = wx.BoxSizer(wx.HORIZONTAL)
++         self._border_size = wx.SpinCtrl(self, ID_PaneBorderSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE),
++-                                        wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100,
+++                                        wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100,
++                                         frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE))
++         s1.Add((1, 1), 1, wx.EXPAND)
++         s1.Add(wx.StaticText(self, -1, "Pane Border Size:"))
++@@ -445,7 +445,7 @@ def __init__(self, parent, frame):
++ 
++         s2 = wx.BoxSizer(wx.HORIZONTAL)
++         self._sash_size = wx.SpinCtrl(self, ID_SashSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE), wx.DefaultPosition,
++-                                      wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
+++                                      wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
++         s2.Add((1, 1), 1, wx.EXPAND)
++         s2.Add(wx.StaticText(self, -1, "Sash Size:"))
++         s2.Add(self._sash_size)
++@@ -454,7 +454,7 @@ def __init__(self, parent, frame):
++ 
++         s3 = wx.BoxSizer(wx.HORIZONTAL)
++         self._caption_size = wx.SpinCtrl(self, ID_CaptionSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE),
++-                                         wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
+++                                         wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
++         s3.Add((1, 1), 1, wx.EXPAND)
++         s3.Add(wx.StaticText(self, -1, "Caption Size:"))
++         s3.Add(self._caption_size)
++@@ -807,9 +807,9 @@ def LightColour(self, colour, percent):
++ 
++         # We take the percent way of the colour from colour -> white
++         i = percent
++-        r = colour.Red() + ((i*rd*100)/high)/100
++-        g = colour.Green() + ((i*gd*100)/high)/100
++-        b = colour.Blue() + ((i*bd*100)/high)/100
+++        r = colour.Red() + ((i*rd*100)//high)//100
+++        g = colour.Green() + ((i*gd*100)//high)//100
+++        b = colour.Blue() + ((i*bd*100)//high)//100
++ 
++         return wx.Colour(r, g, b)
++ 
++@@ -826,10 +826,10 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++         x, y, width, height = clientRect
++         x, width = self._pos, interval
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2)
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2)
++         topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-        rc1 = wx.Rect(x, y, width, height/2)
+++        rc1 = wx.Rect(int(x), y, int(width), height//2)
++         path1 = self.GetPath(gc, rc1, 8)
++         br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++         gc.SetBrush(br1)
++@@ -845,14 +845,14 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++ 
++         bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-        rc3 = wx.Rect(x, y+height/2, width, height/2)
+++        rc3 = wx.Rect(int(x), y+height//2, int(width), height//2)
++         path3 = self.GetPath(gc, rc3, 8)
++         br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++         gc.SetBrush(br3)
++         gc.FillPath(path3) #draw main
++ 
++         path4 = gc.CreatePath()
++-        path4.AddRectangle(x, y+height/2, width, 8)
+++        path4.AddRectangle(x, y+height//2, width, 8)
++         path4.CloseSubpath()
++         gc.SetBrush(br3)
++         gc.FillPath(path4)
++@@ -2613,7 +2613,7 @@ def CreateNotebook(self):
++         flex.Add(wx.TextCtrl(panel, -1, "", wx.DefaultPosition, wx.Size(100, -1)),
++                  1, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add(wx.StaticText(panel, -1, "wxSpinCtrl:"), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++-        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.Size(100, -1),
+++        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.DefaultSize,
++                              wx.SP_ARROW_KEYS, 5, 50, 5), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add((5, 5))
++         flex.Add((5, 5))
++diff --git a/demo/agw/MacLargeDemo.py b/demo/agw/MacLargeDemo.py
++index 4d967a546..a5b8a0e25 100644
++--- a/demo/agw/MacLargeDemo.py
+++++ b/demo/agw/MacLargeDemo.py
++@@ -223,12 +223,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = int((w * percent)/100)
++ 
++         if w < 1:
++             return
++diff --git a/demo/agw/PeakMeter.py b/demo/agw/PeakMeter.py
++index a7c9a6f51..e9dab7116 100644
++--- a/demo/agw/PeakMeter.py
+++++ b/demo/agw/PeakMeter.py
++@@ -149,10 +149,10 @@ def OnFalloff(self, event):
++ 
++     def OnStart(self, event):
++ 
++-        self.timer.Start(1000/2)        # 2 fps
+++        self.timer.Start(1000//2)        # 2 fps
++ 
++-        self.vertPeak.Start(1000/18)        # 18 fps
++-        self.horzPeak.Start(1000/20)        # 20 fps
+++        self.vertPeak.Start(1000//18)        # 18 fps
+++        self.horzPeak.Start(1000//20)        # 20 fps
++ 
++ 
++     def OnStop(self, event):
++diff --git a/demo/agw/PersistentControls.py b/demo/agw/PersistentControls.py
++index f19cc4a91..cf97dd9f0 100644
++--- a/demo/agw/PersistentControls.py
+++++ b/demo/agw/PersistentControls.py
++@@ -234,7 +234,7 @@ def BuildPanes(self):
++         sizer_1.Add(label_1, 0, wx.ALL, 5)
++         sizer_1.Add(combo, 0, wx.LEFT|wx.RIGHT, 5)
++         sizer_1.Add((20, 20), 1)
++-        box2.Add(sizer_1, 1, wx.EXPAND|wx.ALIGN_CENTER, 0)
+++        box2.Add(sizer_1, 1, wx.EXPAND, 0)
++         box2.Add((0, 0), 1, 1)
++ 
++         otherPanel.SetSizer(box2)
++diff --git a/demo/agw/RibbonBar.py b/demo/agw/RibbonBar.py
++index 7103e9d81..d28a2c66a 100644
++--- a/demo/agw/RibbonBar.py
+++++ b/demo/agw/RibbonBar.py
++@@ -799,7 +799,7 @@ def AddColourToGallery(self, gallery, colour, dc, value=None):
++                                        (c.Blue() + 192) % 256)
++ 
++             dc.SetTextForeground(foreground)
++-            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) / 2, (iHeight - size.GetHeight()) / 2)
+++            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) // 2, (iHeight - size.GetHeight()) // 2)
++             dc.SelectObjectAsSource(wx.NullBitmap)
++ 
++             item = gallery.Append(bitmap, wx.ID_ANY)
++diff --git a/demo/agw/SpeedMeter.py b/demo/agw/SpeedMeter.py
++index 9f0fdebb2..575e84a80 100644
++--- a/demo/agw/SpeedMeter.py
+++++ b/demo/agw/SpeedMeter.py
++@@ -418,7 +418,7 @@ def __init__(self, parent, log):
++         bsizer3 = wx.BoxSizer(wx.VERTICAL)
++ 
++         hsizer3 = wx.BoxSizer(wx.HORIZONTAL)
++-        sc = wx.SpinCtrl(panel3, -1, size=(60,20))
+++        sc = wx.SpinCtrl(panel3, -1)
++         sc.SetRange(1, 250)
++         sc.SetValue(50)
++ 
++diff --git a/demo/agw/SuperToolTip.py b/demo/agw/SuperToolTip.py
++index 5e65f06b1..88728e54e 100644
++--- a/demo/agw/SuperToolTip.py
+++++ b/demo/agw/SuperToolTip.py
++@@ -43,7 +43,7 @@ def __init__(self, parent):
++         self.topColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.WHITE)
++         system = wx.SystemSettings.GetColour(wx.SYS_COLOUR_ACTIVECAPTION)
++         r, g, b, a = system
++-        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)/2, (255-g)/2, (255-b)/2))
+++        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)//2, (255-g)//2, (255-b)//2))
++         self.bottomColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=system)
++         self.headerCheck = wx.CheckBox(self.mainPanel, -1, "Show Header")
++         self.headerText = wx.TextCtrl(self.mainPanel, -1, "Merge And Center")
++@@ -233,7 +233,6 @@ def DoLayout(self):
++         frameSizer.Add(self.mainPanel, 1, wx.EXPAND, 0)
++         self.SetSizer(frameSizer)
++         frameSizer.Layout()
++-        frameSizer.Fit(self)
++         self.Layout()
++ 
++         wx.CallAfter(mainSizer.Layout)
++diff --git a/demo/agw/UltimateReportDemo.py b/demo/agw/UltimateReportDemo.py
++index 40f49cb8f..ad455847b 100644
++--- a/demo/agw/UltimateReportDemo.py
+++++ b/demo/agw/UltimateReportDemo.py
++@@ -216,7 +216,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         mdc.SetFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
++         text = "%d Mb"%self.progressValue
++         textWidth, dummy = mdc.GetTextExtent(text)
++-        mdc.DrawText(text, rect.width/2 - textWidth/2, rect.height/2 - dummy/2)
+++        mdc.DrawText(text, rect.width//2 - textWidth//2, rect.height//2 - dummy//2)
++         dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
++         dc.Blit(rect.x+3, rect.y, rect.width-6, rect.height, mdc, 0, 0)
++         dc.DestroyClippingRegion()
++@@ -279,12 +279,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = (w * percent)//100
++ 
++         if middle == 0: # not started
++             bitmap = self.REMAINING_BITMAP.GetSubBitmap((1, 0, w, PIPE_HEIGHT))
++@@ -335,7 +335,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         colours = [wx.RED, wx.WHITE, wx.GREEN, wx.Colour("SKY BLUE")]
++         w, h = dc.GetTextExtent("Hg")
++         x = rect.x + 1
++-        y = rect.y + rect.height/2 - h/2
+++        y = rect.y + rect.height//2 - h//2
++ 
++         for ch in self.text:
++             dc.SetTextForeground(random.choice(colours))
++diff --git a/demo/agw/Windows7Explorer_Contents.py b/demo/agw/Windows7Explorer_Contents.py
++index f754d7879..b23df0e1a 100644
++--- a/demo/agw/Windows7Explorer_Contents.py
+++++ b/demo/agw/Windows7Explorer_Contents.py
++@@ -127,13 +127,13 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         """Draw a custom progress bar using double buffering to prevent flicker"""
++ 
++         bmpWidth, bmpHeight = self.icon.GetWidth(), self.icon.GetHeight()
++-        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)/2)
+++        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)//2)
++ 
++         dc.SetFont(self.normalFont)
++ 
++         textWidth, textHeight = dc.GetTextExtent(self.text)
++         dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
++-        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.description:
++             return
++@@ -144,10 +144,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Type: " + self.description)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++@@ -207,10 +207,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Date modified: " + date)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.size:
++             return
++@@ -218,10 +218,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         dummy1, dummy2= dc.GetTextExtent("Size: ")
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++diff --git a/demo/agw/ZoomBar.py b/demo/agw/ZoomBar.py
++index 376ce349b..14b0278e7 100644
++--- a/demo/agw/ZoomBar.py
+++++ b/demo/agw/ZoomBar.py
++@@ -55,7 +55,7 @@ def __init__(self, parent, log):
++         reflections = glob.glob(bitmapDir + "/*96Flip40.png")
++ 
++         separatorImage = bitmapDir + "/separator.gif"
++-        separatorReflection = bitmapDir + "/separatorFlip.png"
+++        separatorReflection = bitmapDir + "/separatorflip.png"
++         count = 0
++ 
++         for std, ref in zip(standard, reflections):
++diff --git a/wx/lib/agw/advancedsplash.py b/wx/lib/agw/advancedsplash.py
++index 1f8c32df5..d351ea06e 100644
++--- a/wx/lib/agw/advancedsplash.py
+++++ b/wx/lib/agw/advancedsplash.py
++@@ -438,7 +438,7 @@ def SetTextFont(self, font=None):
++ 
++         if font is None:
++             self._textfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._textsize = 10.0
+++            self._textsize = 10
++             self._textfont.SetPointSize(self._textsize)
++         else:
++             self._textfont = font
++diff --git a/wx/lib/agw/aui/auibook.py b/wx/lib/agw/aui/auibook.py
++index ba7cf4721..f5ad2a568 100644
++--- a/wx/lib/agw/aui/auibook.py
+++++ b/wx/lib/agw/aui/auibook.py
++@@ -3452,8 +3452,8 @@ def CalculateNewSplitSize(self):
++         # should happen around the middle
++         if tab_ctrl_count < 2:
++             new_split_size = self.GetClientSize()
++-            new_split_size.x /= 2
++-            new_split_size.y /= 2
+++            new_split_size.x //= 2
+++            new_split_size.y //= 2
++ 
++         else:
++ 
++diff --git a/wx/lib/agw/balloontip.py b/wx/lib/agw/balloontip.py
++index b4155d74a..57baca729 100644
++--- a/wx/lib/agw/balloontip.py
+++++ b/wx/lib/agw/balloontip.py
++@@ -615,7 +615,7 @@ def SetStartDelay(self, delay=1):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Creation Should Be Greater Than 1 ms")
++ 
++-        self._startdelaytime = float(delay)
+++        self._startdelaytime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -640,7 +640,7 @@ def SetEndDelay(self, delay=1e6):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Destruction Should Be Greater Than 1 ms")
++ 
++-        self._enddelaytime = float(delay)
+++        self._enddelaytime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/flatmenu.py b/wx/lib/agw/flatmenu.py
++index 5ba28e584..85f295b86 100644
++--- a/wx/lib/agw/flatmenu.py
+++++ b/wx/lib/agw/flatmenu.py
++@@ -736,8 +736,8 @@ def DrawSeparator(self, dc, xCoord, yCoord, textX, sepWidth):
++         """
++ 
++         dcsaver = DCSaver(dc)
++-        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth/2, 1)
++-        sepRect2 = wx.Rect(xCoord + textX + sepWidth/2, yCoord + 1, sepWidth/2-1, 1)
+++        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth//2, 1)
+++        sepRect2 = wx.Rect(xCoord + textX + sepWidth//2, yCoord + 1, sepWidth//2-1, 1)
++ 
++         artMgr = ArtManager.Get()
++         backColour = artMgr.GetMenuFaceColour()
++@@ -817,11 +817,11 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             imgWidth  = bmp.GetWidth()
++ 
++             if imageMarginX == 0:
++-                xx = rect.x + (leftMarginWidth - imgWidth)/2
+++                xx = rect.x + (leftMarginWidth - imgWidth)//2
++             else:
++-                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)/2 + rect.height
+++                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)//2 + rect.height
++ 
++-            yy = rect.y + (rect.height - imgHeight)/2
+++            yy = rect.y + (rect.height - imgHeight)//2
++             dc.DrawBitmap(bmp, xx, yy, True)
++ 
++         if item.GetKind() == wx.ITEM_CHECK:
++@@ -837,7 +837,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         if item.GetKind() == wx.ITEM_RADIO:
++ 
++@@ -852,7 +852,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         # Draw text - without accelerators
++         text = item.GetLabel()
++@@ -890,7 +890,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 w3, dummy = dc.GetTextExtent(text3)
++ 
++                 posx = xCoord + textX + borderXSize
++-                posy = (itemHeight - h)/2 + yCoord
+++                posy = (itemHeight - h)//2 + yCoord
++ 
++                 # Draw first part
++                 dc.DrawText(text1, posx, posy)
++@@ -912,7 +912,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             else:
++ 
++                 w, h = dc.GetTextExtent(text)
++-                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)/2 + yCoord)
+++                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)//2 + yCoord)
++ 
++ 
++         # Now draw accelerator
++@@ -920,7 +920,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++         if item.GetAccelString():
++ 
++             accelWidth, accelHeight = dc.GetTextExtent(item.GetAccelString())
++-            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)/2 + yCoord)
+++            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)//2 + yCoord)
++ 
++         # Check if this item has sub-menu - if it does, draw
++         # right arrow on the right margin
++@@ -932,7 +932,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++ 
++             xx = xCoord + rightMarginX + borderXSize
++             rr = wx.Rect(xx, rect.y + 1, rect.height-2, rect.height-2)
++-            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)/2, True)
+++            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)//2, True)
++ 
++ 
++     def DrawMenuBarButton(self, dc, rect, state):
++@@ -1142,7 +1142,7 @@ def DrawMenuBar(self, menubar, dc):
++             # Get the menu item rect
++             textWidth, textHeight = dc.GetTextExtent(fixedText)
++             #rect = wx.Rect(posx+menubar._spacer/2, posy, textWidth, textHeight)
++-            rect = wx.Rect(posx+padding/2, posy, textWidth, textHeight)
+++            rect = wx.Rect(posx+padding//2, posy, textWidth, textHeight)
++ 
++             # Can we draw more??
++             # the +DROP_DOWN_ARROW_WIDTH  is the width of the drop down arrow
++@@ -1172,7 +1172,7 @@ def DrawMenuBar(self, menubar, dc):
++                 dc.SetTextForeground(textColour)
++ 
++             ww, hh = dc.GetTextExtent(labelOnly)
++-            textOffset = (rect.width - ww) / 2
+++            textOffset = (rect.width - ww) // 2
++ 
++             if not menubar._isLCD and item.GetTextBitmap().IsOk() and not selected:
++                 dc.DrawBitmap(item.GetTextBitmap(), rect.x, rect.y, True)
++@@ -1505,8 +1505,8 @@ def DrawButtonColour(self, dc, rect, state, colour):
++         baseColour = colour
++ 
++         # Define the middle points
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, rect.y + (rect.height // 2))
+++        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height // 2))
++ 
++         # Define the top region
++         top = wx.Rect((rect.GetLeft(), rect.GetTop()), rightPt)
++@@ -1572,11 +1572,11 @@ def DrawMenuBarBackground(self, dc, rect):
++ 
++         factor = artMgr.GetMenuBgFactor()
++ 
++-        leftPt1 = wx.Point(rect.x, rect.y + (rect.height / factor))
++-        leftPt2 = wx.Point(rect.x, rect.y + (rect.height / factor)*(factor-1))
+++        leftPt1 = wx.Point(rect.x, rect.y + (rect.height // factor))
+++        leftPt2 = wx.Point(rect.x, rect.y + (rect.height // factor)*(factor-1))
++ 
++-        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor))
++-        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor)*(factor-1))
+++        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor))
+++        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor)*(factor-1))
++ 
++         # Define the top region
++         topReg = [wx.Point() for ii in range(7)]
++@@ -2707,7 +2707,7 @@ def DrawToolbar(self, dc, rect):
++             elif tbItem.IsCustomControl():
++                 control = tbItem.GetCustomControl()
++                 ctrlSize = control.GetSize()
++-                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)/2)
+++                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)//2)
++                 if control.GetPosition() != ctrlPos:
++                     control.SetPosition(ctrlPos)
++ 
++@@ -2727,9 +2727,9 @@ def DrawToolbar(self, dc, rect):
++             # Draw the toolbar image
++             if bmp.IsOk():
++ 
++-                x = xx - self._toolbarSpacer/2
+++                x = xx - self._toolbarSpacer//2
++                 #y = rect.y + (rect.height - bmp.GetHeight())/2 - 1
++-                y = rect.y + self._toolbarMargin/2
+++                y = rect.y + self._toolbarMargin//2
++ 
++                 buttonRect = wx.Rect(x, y, highlight_width, highlight_height)
++ 
++@@ -2745,8 +2745,8 @@ def DrawToolbar(self, dc, rect):
++                     else:
++                         self._tbButtons[i]._state = ControlNormal
++ 
++-                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())/2
++-                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())/2
+++                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())//2
+++                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())//2
++ 
++                 if self._tbButtons[i]._state == ControlFocus and not self._tbButtons[i]._tbItem.IsSelected():
++ 
++@@ -2827,8 +2827,8 @@ def DrawMoreButton(self, dc, state):
++         dropArrowBmp = self.GetRenderer()._bitmaps["arrow_down"]
++ 
++         # Calc the image coordinates
++-        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())/2
+++        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())//2
++ 
++         dc.DrawBitmap(dropArrowBmp, xx, yy + self._spacer, True)
++         self._dropDownButtonState = state
++@@ -3269,8 +3269,8 @@ def DrawToolbarItem(self, dc, idx, state):
++ 
++         # draw the bitmap over the highlight
++         buttonRect = wx.Rect(*rect)
++-        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())/2
++-        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())/2
+++        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())//2
+++        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())//2
++ 
++         if state == ControlFocus:
++ 
++@@ -3784,7 +3784,7 @@ def PositionAUI(self, mgr, fixToolbar=True):
++         pn.Name("flat_menu_bar")
++         pn.Caption("Menu Bar")
++         pn.Top()
++-        pn.MinSize(wx.Size(xx/2, self._barHeight))
+++        pn.MinSize(wx.Size(xx//2, self._barHeight))
++         pn.LeftDockable(False)
++         pn.RightDockable(False)
++         pn.ToolbarPane()
++@@ -3997,8 +3997,8 @@ def Draw(self, dc):
++         """
++ 
++         rect = wx.Rect(self._pos, self._size)
++-        xx = rect.x + (rect.width - self._normalBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - self._normalBmp.GetHeight())/2
+++        xx = rect.x + (rect.width - self._normalBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - self._normalBmp.GetHeight())//2
++ 
++         self._parent.GetRenderer().DrawScrollButton(dc, rect, self._state)
++         dc.DrawBitmap(self._normalBmp, xx, yy, True)
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index f5e5200b2..561749b89 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -858,9 +858,9 @@ def PaintStraightGradientBox(dc, rect, startColour, endColour, vertical=True):
++ 
++     for i in range(high+1):
++ 
++-        r = startColour.Red() + ((i*rd*100)/high)/100
++-        g = startColour.Green() + ((i*gd*100)/high)/100
++-        b = startColour.Blue() + ((i*bd*100)/high)/100
+++        r = startColour.Red() + ((i*rd*100)//high)//100
+++        g = startColour.Green() + ((i*gd*100)//high)//100
+++        b = startColour.Blue() + ((i*bd*100)//high)//100
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++@@ -2631,9 +2631,9 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         imageYCoord = (pc.HasAGWFlag(FNB_BOTTOM) and [6] or [8])[0]
++ 
++         if hasImage:
++-            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints/2
+++            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints//2
++         else:
++-            textOffset = pc._pParent._nPadding + shapePoints/2
+++            textOffset = pc._pParent._nPadding + shapePoints//2
++ 
++         textOffset += 2
++ 
++diff --git a/wx/lib/agw/floatspin.py b/wx/lib/agw/floatspin.py
++index bdbaf85ec..4559eb5de 100644
++--- a/wx/lib/agw/floatspin.py
+++++ b/wx/lib/agw/floatspin.py
++@@ -336,7 +336,7 @@ class FloatSpin(wx.Control):
++     """
++ 
++     def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++-                 size=(95,-1), style=0, value=0.0, min_val=None, max_val=None,
+++                 size=wx.DefaultSize, style=0, value=0.0, min_val=None, max_val=None,
++                  increment=1.0, digits=-1, agwStyle=FS_LEFT,
++                  name="FloatSpin"):
++         """
++diff --git a/wx/lib/agw/gradientbutton.py b/wx/lib/agw/gradientbutton.py
++index c4633b296..58625c508 100644
++--- a/wx/lib/agw/gradientbutton.py
+++++ b/wx/lib/agw/gradientbutton.py
++@@ -412,14 +412,14 @@ def OnPaint(self, event):
++ 
++         x, y, width, height = clientRect
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2 + ((capture==self and [1] or [0])[0]))
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2 + ((capture==self and [1] or [0])[0]))
++         if capture != self:
++             if self._mouseAction == HOVER:
++                 topStart, topEnd = self.LightColour(self._topStartColour, 10), self.LightColour(self._topEndColour, 10)
++             else:
++                 topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-            rc1 = wx.Rect(x, y, width, height/2)
+++            rc1 = wx.Rect(x, y, width, height//2)
++             path1 = self.GetPath(gc, rc1, 8)
++             br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++             gc.SetBrush(br1)
++@@ -448,7 +448,7 @@ def OnPaint(self, event):
++             else:
++                 bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-            rc3 = wx.Rect(x, y+height/2, width, height/2)
+++            rc3 = wx.Rect(x, y+height//2, width, height//2)
++             path3 = self.GetPath(gc, rc3, 8)
++             br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++             gc.SetBrush(br3)
++@@ -463,7 +463,7 @@ def OnPaint(self, event):
++             shadowOffset = 0
++         else:
++ 
++-            rc2 = wx.Rect(x+1, gradientRect.height/2, gradientRect.width, gradientRect.height)
+++            rc2 = wx.Rect(x+1, gradientRect.height//2, gradientRect.width, gradientRect.height)
++             path2 = self.GetPath(gc, rc2, 8)
++             gc.SetPen(wx.Pen(self._pressedBottomColour))
++             gc.SetBrush(wx.Brush(self._pressedBottomColour))
++diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py
++index 12302f3b0..377ac0121 100644
++--- a/wx/lib/agw/hypertreelist.py
+++++ b/wx/lib/agw/hypertreelist.py
++@@ -3437,7 +3437,7 @@ def PaintLevel(self, item, dc, level, y, x_maincol):
++ 
++             if not self.HasAGWFlag(wx.TR_NO_LINES) and children:
++                 last_child = children[-1]
++-                Y1 = last_child.GetY() + last_child.GetHeight() / 2
+++                Y1 = last_child.GetY() + last_child.GetHeight() // 2
++                 dc.DrawLine(x, oldY, x, Y1)
++ 
++         return y, x_maincol
++diff --git a/wx/lib/agw/knobctrl.py b/wx/lib/agw/knobctrl.py
++index 742097b09..1e5045ff6 100644
++--- a/wx/lib/agw/knobctrl.py
+++++ b/wx/lib/agw/knobctrl.py
++@@ -325,7 +325,7 @@ def OnSize(self,event):
++         memory.Clear()
++ 
++         minradius = min(0.9*self.Width/2.0, 0.9*self.Height/2.0)
++-        memory.DrawCircle(self.Width//2, self.Height//2, minradius)
+++        memory.DrawCircle(self.Width//2, self.Height//2, int(minradius))
++         memory.SelectObject(wx.NullBitmap)
++         self._region = wx.Region(self._Buffer, self.GetBackgroundColour())
++         self._minradius = minradius
++@@ -645,8 +645,8 @@ def DrawTags(self, dc, size):
++             dxi = math.cos(angle)*((width - xshift + tagLen - 6)/2.0 - tagLen)
++             dyi = math.sin(angle)*((height - yshift + tagLen - 6)/2.0 - tagLen)
++ 
++-            dc.DrawLine(width//2 - sxi, height//2 - syi,
++-                        width//2 - dxi, height//2 - dyi)
+++            dc.DrawLine(int(width//2 - sxi), int(height//2 - syi),
+++                        int(width//2 - dxi), int(height//2 - dyi))
++ 
++ 
++     def DrawDiagonalGradient(self, dc, size):
++@@ -759,8 +759,8 @@ def DrawInsetCircle(self, dc, pencolour):
++         p1 = wx.Pen(self.OffsetColour(pencolour, -70), 2)
++         p2 = wx.Pen(self.OffsetColour(pencolour, 10), 1)
++ 
++-        pt1 = wx.Point(cx-r*math.sqrt(2)/2.0, cy+r*math.sqrt(2)/2.0)
++-        pt2 = wx.Point(cx+r*math.sqrt(2)/2.0, cy-r*math.sqrt(2)/2.0)
+++        pt1 = wx.Point(int(cx-r*math.sqrt(2)/2.0), int(cy+r*math.sqrt(2)/2.0))
+++        pt2 = wx.Point(int(cx+r*math.sqrt(2)/2.0), int(cy-r*math.sqrt(2)/2.0))
++ 
++         dc.SetPen(p2)
++         dc.DrawArc(pt1, pt2, (cx, cy))
++@@ -779,7 +779,7 @@ def DrawBoundingCircle(self, dc, size):
++         radius = 0.9*min(size.x, size.y)/2.0
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++         dc.SetPen(wx.Pen(self._boundingcolour))
++-        dc.DrawCircle(self.Width//2, self.Height//2, radius)
+++        dc.DrawCircle(self.Width//2, self.Height//2, int(radius))
++ 
++ 
++     def CircleCoords(self, radius, angle, centerX, centerY):
++diff --git a/wx/lib/agw/labelbook.py b/wx/lib/agw/labelbook.py
++index b716df3a2..f8c9cd54d 100644
++--- a/wx/lib/agw/labelbook.py
+++++ b/wx/lib/agw/labelbook.py
++@@ -1376,13 +1376,13 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    imgXcoord = self._nImgSize / 2
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize / 2] or [pos + imgTopPadding])[0]
+++                    imgXcoord = self._nImgSize // 2
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize // 2] or [pos + imgTopPadding])[0]
++ 
++                 else:
++ 
++-                    imgXcoord = pos + (rectWidth / 2) - (self._nImgSize / 2)
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize / 2] or [imgTopPadding])[0]
+++                    imgXcoord = pos + (rectWidth // 2) - (self._nImgSize // 2)
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize // 2] or [imgTopPadding])[0]
++ 
++                 self._ImageList.Draw(self._pagesInfoVec[i].GetImageIndex(), dc,
++                                      imgXcoord, imgYcoord,
++@@ -1408,15 +1408,15 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    textOffsetX = ((rectWidth - textWidth) / 2 )
+++                    textOffsetX = ((rectWidth - textWidth) // 2 )
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT  and [pos + self._nImgSize  + imgTopPadding + 3] or \
++-                                       [pos + ((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [pos + ((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 else:
++ 
++-                    textOffsetX = (rectWidth - textWidth) / 2  + pos + nTextPaddingLeft
+++                    textOffsetX = (rectWidth - textWidth) // 2  + pos + nTextPaddingLeft
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT and [self._nImgSize + imgTopPadding + 3] or \
++-                                       [((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
++                 dc.DrawText(fixedText, textOffsetX, textOffsetY)
++@@ -1591,8 +1591,8 @@ def OnPaint(self, event):
++             # Draw gradient in the background area
++             startColour = self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR]
++             endColour   = ArtManager.Get().LightColour(self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR], 50)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x / 2, size.y), startColour, endColour, False)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x / 2, 0, size.x / 2, size.y), endColour, startColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x // 2, size.y), startColour, endColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x // 2, 0, size.x // 2, size.y), endColour, startColour, False)
++ 
++         else:
++ 
++@@ -1638,7 +1638,7 @@ def OnPaint(self, event):
++ 
++             if self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++                 font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-                font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++                font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++                 if self.GetParent().GetFontBold():
++                     font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -1954,7 +1954,7 @@ def DrawWebHover(self, dc, caption, xCoord, yCoord, selected):
++ 
++         # Redraw the text with underlined font
++         underLinedFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        underLinedFont.SetPointSize(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        underLinedFont.SetPointSize(int(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++         if self.GetParent().GetFontBold():
++             underLinedFont.SetWeight(wx.FONTWEIGHT_BOLD)
++         elif self.HasAGWFlag(INB_BOLD_TAB_SELECTION) and selected:
++@@ -2050,7 +2050,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++         imgRect = wx.Rect(*rect)
++ 
++         font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++         if self.GetParent().GetFontBold():
++             font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -2069,7 +2069,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++         # Text bounding rectangle
++         textRect.x += nPadding
++-        textRect.y = rect.y + (rect.height - h)/2
+++        textRect.y = rect.y + (rect.height - h)//2
++         textRect.width = rect.width - 2 * nPadding
++ 
++         if bmp.IsOk() and not self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++@@ -2086,7 +2086,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++             imgRect.x += nPadding
++             imgRect.width = bmp.GetWidth()
++-            imgRect.y = rect.y + (rect.height - bmp.GetHeight())/2
+++            imgRect.y = rect.y + (rect.height - bmp.GetHeight())//2
++             imgRect.height = bmp.GetHeight()
++ 
++         # Draw bounding rectangle
++@@ -2496,7 +2496,7 @@ def ResizeTabArea(self):
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(1, 1))
++             font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-            font.SetPointSize(font.GetPointSize()*self._fontSizeMultiple)
+++            font.SetPointSize(int(font.GetPointSize()*self._fontSizeMultiple))
++             if self.GetFontBold() or agwStyle & INB_BOLD_TAB_SELECTION:
++                 font.SetWeight(wx.FONTWEIGHT_BOLD)
++             dc.SetFont(font)
++diff --git a/wx/lib/agw/peakmeter.py b/wx/lib/agw/peakmeter.py
++index 055dbef81..a5f88a9d5 100644
++--- a/wx/lib/agw/peakmeter.py
+++++ b/wx/lib/agw/peakmeter.py
++@@ -784,7 +784,7 @@ def DrawHorzBand(self, dc, rect):
++                 maxWidth = size.x*horzBands
++                 points = [wx.Point() for i in range(2)]
++                 points[0].y = rectPrev.GetTopRight().y - yDecal
++-                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth/self._maxValue
+++                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth//self._maxValue
++                 points[1].y = rectPrev.GetBottomLeft().y + yDecal
++                 points[1].x = points[0].x
++                 dc.SetPen(pen)
++diff --git a/wx/lib/agw/pygauge.py b/wx/lib/agw/pygauge.py
++index bab459a3a..b8654436a 100644
++--- a/wx/lib/agw/pygauge.py
+++++ b/wx/lib/agw/pygauge.py
++@@ -344,7 +344,7 @@ def OnPaint(self, event):
++                 c1,c2 = gradient
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.GradientFillLinear(r, c1, c2, wx.EAST)
++         else:
++             for i, colour in enumerate(self._barColourSorted):
++@@ -352,7 +352,7 @@ def OnPaint(self, event):
++                 dc.SetPen(wx.Pen(colour))
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.DrawRectangle(r)
++ 
++ 
++diff --git a/wx/lib/agw/ribbon/art_aui.py b/wx/lib/agw/ribbon/art_aui.py
++index a1d255843..31fedf487 100644
++--- a/wx/lib/agw/ribbon/art_aui.py
+++++ b/wx/lib/agw/ribbon/art_aui.py
++@@ -390,7 +390,7 @@ def DrawTab(self, dc, wnd, tab):
++             grad_rect = wx.Rect(*tab.rect)
++             grad_rect.height -= 4
++             grad_rect.width -= 1
++-            grad_rect.height /= 2
+++            grad_rect.height //= 2
++             grad_rect.y = grad_rect.y + tab.rect.height - grad_rect.height - 1
++             dc.SetBrush(self._tab_active_top_background_brush)
++             dc.DrawRectangle(tab.rect.x, tab.rect.y + 3, tab.rect.width - 1, grad_rect.y - tab.rect.y - 3)
++@@ -401,7 +401,7 @@ def DrawTab(self, dc, wnd, tab):
++             btm_rect = wx.Rect(*tab.rect)
++             btm_rect.height -= 4
++             btm_rect.width -= 1
++-            btm_rect.height /= 2
+++            btm_rect.height //= 2
++             btm_rect.y = btm_rect.y + tab.rect.height - btm_rect.height - 1
++             dc.SetBrush(self._tab_hover_background_brush)
++             dc.DrawRectangle(btm_rect.x, btm_rect.y, btm_rect.width, btm_rect.height)
++@@ -434,8 +434,8 @@ def DrawTab(self, dc, wnd, tab):
++             icon = tab.page.GetIcon()
++             if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++                 if icon.IsOk():
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
++-                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
+++                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -450,7 +450,7 @@ def DrawTab(self, dc, wnd, tab):
++                     offset += icon.GetWidth() + 2
++ 
++                 text_width, text_height = dc.GetTextExtent(label)
++-                x = (tab.rect.width - 2 - text_width - offset) / 2
+++                x = (tab.rect.width - 2 - text_width - offset) // 2
++                 if x > 8:
++                     x = 8
++                 elif x < 1:
++@@ -458,7 +458,7 @@ def DrawTab(self, dc, wnd, tab):
++ 
++                 width = tab.rect.width - x - 2
++                 x += tab.rect.x + offset
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if icon.IsOk():
++                     dc.DrawBitmap(icon, x - offset, tab.rect.y + (tab.rect.height - icon.GetHeight()) / 2, True)
++@@ -892,8 +892,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def DrawPartialPanelBackground(self, dc, wnd, rect):
++@@ -1024,7 +1024,7 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++             dc.DrawRectangle(reduced_rect.x, reduced_rect.y, reduced_rect.width, reduced_rect.height)
++             btn_bitmap = bitmaps[3]
++ 
++-        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width / 2 - 2, (rect.y + rect.height / 2) - 2, True)
+++        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width // 2 - 2, (rect.y + rect.height // 2) - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1277,7 +1277,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++             if is_split_hybrid:
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++-            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height / 2) - 2, True)
+++            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++diff --git a/wx/lib/agw/ribbon/art_internal.py b/wx/lib/agw/ribbon/art_internal.py
++index 4a8dc7ce0..78e8f3fe4 100644
++--- a/wx/lib/agw/ribbon/art_internal.py
+++++ b/wx/lib/agw/ribbon/art_internal.py
++@@ -32,9 +32,9 @@ def RibbonInterpolateColour(start_colour, end_colour, position, start_position,
++     r = end_colour.Red() - start_colour.Red()
++     g = end_colour.Green() - start_colour.Green()
++     b = end_colour.Blue() - start_colour.Blue()
++-    r = start_colour.Red()   + (((r * position * 100) / end_position) / 100)
++-    g = start_colour.Green() + (((g * position * 100) / end_position) / 100)
++-    b = start_colour.Blue()  + (((b * position * 100) / end_position) / 100)
+++    r = start_colour.Red()   + (((r * position * 100) // end_position) // 100)
+++    g = start_colour.Green() + (((g * position * 100) // end_position) // 100)
+++    b = start_colour.Blue()  + (((b * position * 100) // end_position) // 100)
++ 
++     return wx.Colour(r, g, b)
++ 
++@@ -61,9 +61,9 @@ def RibbonDrawParallelGradientLines(dc, nlines, line_origins, stepx, stepy, nums
++     bd = end_colour.Blue() - start_colour.Blue()
++ 
++     for step in range(numsteps):
++-        r = start_colour.Red() + (((step*rd*100)/numsteps)/100)
++-        g = start_colour.Green() + (((step*gd*100)/numsteps)/100)
++-        b = start_colour.Blue() + (((step*bd*100)/numsteps)/100)
+++        r = start_colour.Red() + (((step*rd*100)//numsteps)//100)
+++        g = start_colour.Green() + (((step*gd*100)//numsteps)//100)
+++        b = start_colour.Blue() + (((step*bd*100)//numsteps)//100)
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++diff --git a/wx/lib/agw/ribbon/art_msw.py b/wx/lib/agw/ribbon/art_msw.py
++index e7317d59b..00c3dfe2b 100644
++--- a/wx/lib/agw/ribbon/art_msw.py
+++++ b/wx/lib/agw/ribbon/art_msw.py
++@@ -982,7 +982,7 @@ def DrawTab(self, dc, wnd, tab):
++                 background.width -= 4
++                 background.height -= 3
++                 h = background.height
++-                background.height /= 2
+++                background.height //= 2
++                 dc.GradientFillLinear(background, self._tab_hover_background_top_colour,
++                                       self._tab_hover_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1024,9 +1024,9 @@ def DrawTab(self, dc, wnd, tab):
++             if icon.IsOk():
++                 x = tab.rect.x + 4
++                 if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
++ 
++-                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -1043,13 +1043,13 @@ def DrawTab(self, dc, wnd, tab):
++                     x += 3 + tab.page.GetIcon().GetWidth()
++                     width -= 3 + tab.page.GetIcon().GetWidth()
++ 
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if width <= text_width:
++                     dc.SetClippingRegion(x, tab.rect.y, width, tab.rect.height)
++                     dc.DrawText(label, x, y)
++                 else:
++-                    dc.DrawText(label, x + (width - text_width) / 2 + 1, y)
+++                    dc.DrawText(label, x + (width - text_width) // 2 + 1, y)
++ 
++ 
++     def DrawTabSeparator(self, dc, wnd, rect, visibility):
++@@ -1093,7 +1093,7 @@ def ReallyDrawTabSeparator(self, wnd, rect, visibility):
++         dc = wx.MemoryDC(self._cached_tab_separator)
++         self.DrawTabCtrlBackground(dc, wnd, rect)
++ 
++-        x = rect.x + rect.width / 2
+++        x = rect.x + rect.width // 2
++         h = float(rect.height - 1)
++ 
++         r1 = self._tab_ctrl_background_brush.GetColour().Red() * (1.0 - visibility) + 0.5
++@@ -1146,7 +1146,7 @@ def DrawPartialPageBackground1(self, dc, wnd, rect, page, offset, hovered=False)
++ 
++         # upper_rect, lower_rect, paint_rect are all in page co-ordinates
++         upper_rect = wx.Rect(*background)
++-        upper_rect.height /= 5
+++        upper_rect.height //= 5
++ 
++         lower_rect = wx.Rect(*background)
++         lower_rect.y += upper_rect.height
++@@ -1229,7 +1229,7 @@ def DrawPageBackground(self, dc, wnd, rect):
++         background.width -= 4
++         background.height -= 2
++ 
++-        background.height /= 5
+++        background.height //= 5
++         dc.GradientFillLinear(background, self._page_background_top_colour,
++                               self._page_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1493,10 +1493,10 @@ def DrawPanelBackground(self, dc, wnd, rect):
++ 
++         if clip_label:
++             clip = wx.DCClipper(dc, label_rect)
++-            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++         else:
++-            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) / 2,
++-                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) // 2,
+++                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++ 
++         if has_ext_button:
++             if wnd.IsExtButtonHovered():
++@@ -1577,7 +1577,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x, rect.y + rect.height - 15, rect.x + rect.width, rect.y + rect.height - 15)
++ 
++-            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width / 3, 15)
+++            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width // 3, 15)
++             down_btn = wx.Rect(up_btn.GetRight() + 1, up_btn.GetTop(), up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetLeft(), down_btn.GetBottom())
++             ext_btn = wx.Rect(down_btn.GetRight() + 1, up_btn.GetTop(), rect.width - up_btn.GetWidth() - down_btn.GetWidth() - 1, up_btn.GetHeight())
++@@ -1587,7 +1587,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x + rect.width - 15, rect.y, rect.x + rect.width - 15, rect.y + rect.height)
++ 
++-            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height / 3)
+++            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height // 3)
++             down_btn = wx.Rect(up_btn.GetLeft(), up_btn.GetBottom() + 1, up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetRight(), down_btn.GetTop())
++             ext_btn = wx.Rect(up_btn.GetLeft(), down_btn.GetBottom() + 1, up_btn.GetWidth(), rect.height - up_btn.GetHeight() - down_btn.GetHeight() - 1)
++@@ -1633,14 +1633,14 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++ 
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(btn_top_brush)
++-        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height / 2)
+++        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height // 2)
++ 
++         lower = wx.Rect(*rect)
++-        lower.height = (lower.height + 1) / 2
+++        lower.height = (lower.height + 1) // 2
++         lower.y += rect.height - lower.height
++         dc.GradientFillLinear(lower, btn_colour, btn_grad_colour, wx.SOUTH)
++ 
++-        dc.DrawBitmap(btn_bitmap, rect.x + rect.width / 2 - 2, lower.y - 2, True)
+++        dc.DrawBitmap(btn_bitmap, rect.x + rect.width // 2 - 2, lower.y - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1691,7 +1691,7 @@ def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++         upper.x += 1
++         upper.width -= 2
++         upper.y += 1
++-        upper.height /= 3
+++        upper.height //= 3
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(top_brush)
++         dc.DrawRectangle(upper.x, upper.y, upper.width, upper.height)
++@@ -1760,7 +1760,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++             client_rect.x += 1
++             client_rect.width -= 2
++             client_rect.y += 1
++-            client_rect.height = (rect.y + rect.height / 5) - client_rect.x
+++            client_rect.height = (rect.y + rect.height // 5) - client_rect.x
++             dc.GradientFillLinear(client_rect,
++                                   self._panel_active_background_top_colour,
++                                   self._panel_active_background_top_gradient_colour, wx.SOUTH)
++@@ -1785,7 +1785,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.DrawRectangle(preview.x + 1, preview.y + preview.height - 8, preview.width - 2, 7)
++ 
++-        mid_pos = rect.y + rect.height / 5 - preview.y
+++        mid_pos = rect.y + rect.height // 5 - preview.y
++ 
++         if mid_pos < 0 or mid_pos >= preview.height:
++             full_rect = wx.Rect(*preview)
++@@ -1816,8 +1816,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - 7 - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - 7 - bitmap.GetHeight()) // 2, True)
++ 
++         self.DrawPanelBorder(dc, preview, self._panel_border_pen, self._panel_border_gradient_pen)
++         self.DrawPanelBorder(dc, true_rect, self._panel_minimised_border_pen, self._panel_minimised_border_gradient_pen)
++@@ -1829,20 +1829,20 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             preview.x = true_rect.x + 4
++-            preview.y = true_rect.y + (true_rect.height - preview.height) / 2
+++            preview.y = true_rect.y + (true_rect.height - preview.height) // 2
++         else:
++-            preview.x = true_rect.x + (true_rect.width - preview.width) / 2
+++            preview.x = true_rect.x + (true_rect.width - preview.width) // 2
++             preview.y = true_rect.y + 4
++ 
++         dc.SetFont(self._panel_label_font)
++         label_width, label_height = dc.GetTextExtent(wnd.GetLabel())
++ 
++-        xpos = true_rect.x + (true_rect.width - label_width + 1) / 2
+++        xpos = true_rect.x + (true_rect.width - label_width + 1) // 2
++         ypos = preview.y + preview.height + 5
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos = preview.x + preview.width + 5
++-            ypos = true_rect.y + (true_rect.height - label_height) / 2
+++            ypos = true_rect.y + (true_rect.height - label_height) // 2
++ 
++         dc.SetTextForeground(self._panel_minimised_label_colour)
++         dc.DrawText(wnd.GetLabel(), xpos, ypos)
++@@ -1851,12 +1851,12 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos += label_width
++-            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height / 2)
+++            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height // 2)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3,  3)
++             arrow_points[2] = arrow_points[0] + wx.Point(-3, -3)
++         else:
++             ypos += label_height
++-            arrow_points[0] = wx.Point(true_rect.width / 2, ypos + 5)
+++            arrow_points[0] = wx.Point(true_rect.width // 2, ypos + 5)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3, -3)
++             arrow_points[2] = arrow_points[0] + wx.Point( 3, -3)
++ 
++@@ -1967,7 +1967,7 @@ def DrawButtonBarButton(self, dc, wnd, rect, kind, state, label, bitmap_large, b
++             bg_rect.height -= 2
++ 
++             bg_rect_top = wx.Rect(*bg_rect)
++-            bg_rect_top.height /= 3
+++            bg_rect_top.height //= 3
++             bg_rect.y += bg_rect_top.height
++             bg_rect.height -= bg_rect_top.height
++ 
++@@ -2043,7 +2043,7 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         if result == RIBBON_BUTTONBAR_BUTTON_LARGE:
++ 
++             padding = 2
++-            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) / 2,
+++            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) // 2,
++                           rect.y + padding, True)
++             ypos = rect.y + padding + bitmap_large.GetHeight() + padding
++             arrow_width = (kind == RIBBON_BUTTON_NORMAL and [0] or [8])[0]
++@@ -2052,10 +2052,10 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++ 
++             if label_w + 2 * padding <= rect.width:
++ 
++-                dc.DrawText(label, rect.x + (rect.width - label_w) / 2, ypos)
+++                dc.DrawText(label, rect.x + (rect.width - label_w) // 2, ypos)
++                 if arrow_width != 0:
++-                    self.DrawDropdownArrow(dc, rect.x + rect.width / 2,
++-                                           ypos + (label_h * 3) / 2,
+++                    self.DrawDropdownArrow(dc, rect.x + rect.width // 2,
+++                                           ypos + (label_h * 3) // 2,
++                                            self._button_bar_label_colour)
++             else:
++                 breaki = len(label)
++@@ -2067,17 +2067,17 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++                         label_w, label_h = dc.GetTextExtent(label_top)
++ 
++                         if label_w + 2 * padding <= rect.width:
++-                            dc.DrawText(label_top, rect.x + (rect.width - label_w) / 2, ypos)
+++                            dc.DrawText(label_top, rect.x + (rect.width - label_w) // 2, ypos)
++                             ypos += label_h
++                             label_bottom = label[breaki:]
++                             label_w, label_h = dc.GetTextExtent(label_bottom)
++                             label_w += arrow_width
++-                            iX = rect.x + (rect.width - label_w) / 2
+++                            iX = rect.x + (rect.width - label_w) // 2
++                             dc.DrawText(label_bottom, iX, ypos)
++ 
++                             if arrow_width != 0:
++                                 self.DrawDropdownArrow(dc, iX + 2 +label_w - arrow_width,
++-                                                       ypos + label_h / 2 + 1,
+++                                                       ypos + label_h // 2 + 1,
++                                                        self._button_bar_label_colour)
++ 
++                             break
++@@ -2085,14 +2085,14 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         elif result == RIBBON_BUTTONBAR_BUTTON_MEDIUM:
++ 
++             x_cursor = rect.x + 2
++-            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())/2, True)
+++            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())//2, True)
++             x_cursor += bitmap_small.GetWidth() + 2
++             label_w, label_h = dc.GetTextExtent(label)
++-            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) / 2)
+++            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) // 2)
++             x_cursor += label_w + 3
++ 
++             if kind != RIBBON_BUTTON_NORMAL:
++-                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2,
+++                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height // 2,
++                                        self._button_bar_label_colour)
++ 
++         else:
++@@ -2184,7 +2184,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++ 
++         # Background
++         bg_rect_top = wx.Rect(*bg_rect)
++-        bg_rect_top.height = (bg_rect_top.height * 2) / 5
+++        bg_rect_top.height = (bg_rect_top.height * 2) // 5
++         bg_rect_btm = wx.Rect(*bg_rect)
++         bg_rect_btm.y += bg_rect_top.height
++         bg_rect_btm.height -= bg_rect_top.height
++@@ -2244,10 +2244,10 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++             dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
++-                          bg_rect.y + (bg_rect.height / 2) - 2, True)
+++                          bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2,
++-                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2,
+++                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def GetBarTabWidth(self, dc, wnd, label, bitmap, ideal=None, small_begin_need_separator=None,
++@@ -2474,7 +2474,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.y = size.GetHeight() - 15
++             scroll_up.height = 15
++             scroll_up.x = 0
++-            scroll_up.width = (size.GetWidth() + 2) / 3
+++            scroll_up.width = (size.GetWidth() + 2) // 3
++             scroll_down.y = scroll_up.y
++             scroll_down.height = scroll_up.height
++             scroll_down.x = scroll_up.x + scroll_up.width
++@@ -2491,7 +2491,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.x = size.GetWidth() - 15
++             scroll_up.width = 15
++             scroll_up.y = 0
++-            scroll_up.height = (size.GetHeight() + 2) / 3
+++            scroll_up.height = (size.GetHeight() + 2) // 3
++             scroll_down.x = scroll_up.x
++             scroll_down.width = scroll_up.width
++             scroll_down.y = scroll_up.y + scroll_up.height
++diff --git a/wx/lib/agw/ribbon/bar.py b/wx/lib/agw/ribbon/bar.py
++index ae8b6a19c..b0d28776d 100644
++--- a/wx/lib/agw/ribbon/bar.py
+++++ b/wx/lib/agw/ribbon/bar.py
++@@ -743,7 +743,7 @@ def RecalculateTabSizes(self):
++                     delta = info.ideal_width - info.small_must_have_separator_width
++                     info.rect.x = x
++                     info.rect.y = y
++-                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)/total_delta
+++                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)//total_delta
++                     info.rect.height = self._tab_height
++ 
++                     x += info.rect.width + tabsep
++@@ -797,7 +797,7 @@ def RecalculateTabSizes(self):
++                         delta = smallest_tab_width - info.minimum_width
++                         info.rect.x = x
++                         info.rect.y = y
++-                        info.rect.width = info.minimum_width + delta*(width - total_small_width)/total_delta
+++                        info.rect.width = info.minimum_width + delta*(width - total_small_width)//total_delta
++                         info.rect.height = self._tab_height
++ 
++                         x += info.rect.width + tabsep
++diff --git a/wx/lib/agw/ribbon/buttonbar.py b/wx/lib/agw/ribbon/buttonbar.py
++index 25ee49a82..4690f483d 100644
++--- a/wx/lib/agw/ribbon/buttonbar.py
+++++ b/wx/lib/agw/ribbon/buttonbar.py
++@@ -354,7 +354,7 @@ def InsertButton(self, pos, button_id, label, bitmap, bitmap_small=wx.NullBitmap
++                 self._bitmap_size_large = bitmap.GetSize()
++                 if not bitmap_small.IsOk():
++                     w, h = self._bitmap_size_large
++-                    self._bitmap_size_small = wx.Size(0.5*w, 0.5*h)
+++                    self._bitmap_size_small = wx.Size(w//2, h//2)
++ 
++             if bitmap_small.IsOk():
++ 
++@@ -867,8 +867,8 @@ def OnSize(self, event):
++ 
++             layout_size = self._layouts[layout_i].overall_size
++             if layout_size.x <= new_size.x and layout_size.y <= new_size.y:
++-                self._layout_offset.x = (new_size.x - layout_size.x)/2
++-                self._layout_offset.y = (new_size.y - layout_size.y)/2
+++                self._layout_offset.x = (new_size.x - layout_size.x)//2
+++                self._layout_offset.y = (new_size.y - layout_size.y)//2
++                 self._current_layout = layout_i
++                 break
++ 
++diff --git a/wx/lib/agw/ribbon/gallery.py b/wx/lib/agw/ribbon/gallery.py
++index b830fab7d..b86528865 100644
++--- a/wx/lib/agw/ribbon/gallery.py
+++++ b/wx/lib/agw/ribbon/gallery.py
++@@ -805,8 +805,8 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         if client.GetWidth() < 0 or client.GetHeight() < 0:
++             return relative_to
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++@@ -849,8 +849,8 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         elif direction == wx.BOTH:
++             client.IncBy(self._bitmap_padded_size)
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++diff --git a/wx/lib/agw/ribbon/panel.py b/wx/lib/agw/ribbon/panel.py
++index 79fd9bc58..901c765b6 100644
++--- a/wx/lib/agw/ribbon/panel.py
+++++ b/wx/lib/agw/ribbon/panel.py
++@@ -584,12 +584,12 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         minimum = wx.Size(*self.GetMinSize())
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 4) / 5
+++            current.x = (current.x * 4) // 5
++             if current.x < minimum.x:
++                 current.x = minimum.x
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 4) / 5
+++            current.y = (current.y * 4) // 5
++             if current.y < minimum.y:
++                 current.y = minimum.y
++ 
++@@ -668,10 +668,10 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         current = wx.Size(*relative_to)
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 5 + 3) / 4
+++            current.x = (current.x * 5 + 3) // 4
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 5 + 3) / 4
+++            current.y = (current.y * 5 + 3) // 4
++ 
++         return current
++ 
++@@ -1076,25 +1076,25 @@ def GetExpandedPosition(self, panel, expanded_size, direction):
++         pos = wx.Point()
++ 
++         if direction == wx.NORTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetY() - expanded_size.GetHeight()
++             primary_x = True
++             secondary_y = 1
++ 
++         elif direction == wx.EAST:
++             pos.x = panel.GetRight()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = -1
++ 
++         elif direction == wx.SOUTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetBottom()
++             primary_x = True
++             secondary_y = -1
++ 
++         else:
++             pos.x = panel.GetX() - expanded_size.GetWidth()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = 1
++ 
++         expanded = wx.Rect(pos, expanded_size)
++diff --git a/wx/lib/agw/ribbon/toolbar.py b/wx/lib/agw/ribbon/toolbar.py
++index 1771c6506..8c6f8b522 100644
++--- a/wx/lib/agw/ribbon/toolbar.py
+++++ b/wx/lib/agw/ribbon/toolbar.py
++@@ -1159,7 +1159,7 @@ def OnSize(self, event):
++ 
++         # Set group y positions
++         for group in self._groups:
++-            group.position.y = rowypos[group.position.y]
+++            group.position.y = int(rowypos[group.position.y])
++ 
++ 
++     def GetBestSizeForParentSize(self, parentSize):
++diff --git a/wx/lib/agw/shapedbutton.py b/wx/lib/agw/shapedbutton.py
++index f015d4e39..49523366a 100644
++--- a/wx/lib/agw/shapedbutton.py
+++++ b/wx/lib/agw/shapedbutton.py
++@@ -569,9 +569,9 @@ def DrawMainButton(self, dc, width, height):
++                 rect2 = w*main//secondary
++ 
++             if self._isup:
++-                img = self._mainbuttonup.Scale(rect2, rect3)
+++                img = self._mainbuttonup.Scale(int(rect2), int(rect3))
++             else:
++-                img = self._mainbuttondown.Scale(rect2, rect3)
+++                img = self._mainbuttondown.Scale(int(rect2), int(rect3))
++ 
++         bmp = img.ConvertToBitmap()
++ 
++@@ -599,7 +599,7 @@ def DrawMainButton(self, dc, width, height):
++                     ypos = 0
++ 
++         # Draw Finally The Bitmap
++-        dc.DrawBitmap(bmp, xpos, ypos, True)
+++        dc.DrawBitmap(bmp, int(xpos), int(ypos), True)
++ 
++         # Store Bitmap Position And Size To Draw An Elliptical Focus Indicator
++         self._xpos = xpos
++@@ -646,7 +646,7 @@ def DrawLabel(self, dc, width, height, dw=0, dh=0):
++             xp = xc - (tw//2)* cos(angle) - (th//2)*sin(angle)
++             yp = yc + (tw//2)*sin(angle) - (th//2)*cos(angle)
++ 
++-            dc.DrawRotatedText(label, xp + dw, yp + dh , angle*180/pi)
+++            dc.DrawRotatedText(label, int(xp + dw), int(yp + dh), angle*180/pi)
++ 
++ 
++     def DrawFocusIndicator(self, dc, width, height):
++@@ -676,7 +676,7 @@ def DrawFocusIndicator(self, dc, width, height):
++         else:
++             # This Is An Ellipse
++             if hasattr(self, "_xpos"):
++-                dc.DrawEllipse(self._xpos + 2, self._ypos + 2, self._imgx - 4, self._imgy - 4)
+++                dc.DrawEllipse(int(self._xpos + 2), int(self._ypos + 2), self._imgx - 4, self._imgy - 4)
++ 
++         dc.SetLogicalFunction(wx.COPY)
++ 
++diff --git a/wx/lib/agw/speedmeter.py b/wx/lib/agw/speedmeter.py
++index f196b51f2..606901d27 100644
++--- a/wx/lib/agw/speedmeter.py
+++++ b/wx/lib/agw/speedmeter.py
++@@ -580,8 +580,8 @@ def Draw(self, dc):
++         dc.SetBackground(wx.Brush(speedbackground))
++         dc.Clear()
++ 
++-        centerX = self.faceBitmap.GetWidth()/2
++-        centerY = self.faceBitmap.GetHeight()/2
+++        centerX = self.faceBitmap.GetWidth()//2
+++        centerY = self.faceBitmap.GetHeight()//2
++ 
++         self.CenterX = centerX
++         self.CenterY = centerY
++@@ -681,7 +681,7 @@ def Draw(self, dc):
++             # Draw The Filler (Both In "Advance" And "Reverse" Directions)
++ 
++             dc.SetBrush(wx.Brush(fillercolour))
++-            dc.DrawArc(xs2, ys2, xe2, ye2, centerX, centerY)
+++            dc.DrawArc(xs2, ys2, xe2, ye2, int(centerX), int(centerY))
++ 
++             if self._agwStyle & SM_DRAW_SECTORS == 0:
++                 dc.SetBrush(wx.Brush(speedbackground))
++@@ -952,7 +952,7 @@ def Draw(self, dc):
++                     y = y - height/2.0 - height*sin(angis)/2.0
++                     fancytext.RenderToDC(fancystr, dc, x, y)
++                 else:
++-                    dc.DrawText(strings, x, y)
+++                    dc.DrawText(strings, int(x), int(y))
++ 
++             # This Is The Small Rectangle --> Tick Mark
++             rectangle = colourangles[ii] + pi/2.0
++@@ -969,6 +969,7 @@ def Draw(self, dc):
++             y4 = y3 + 3*self.scale*sinrect
++ 
++             points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++            points = [(int(p[0]), int(p[1])) for p in points]
++ 
++             dc.DrawPolygon(points)
++ 
++@@ -1003,6 +1004,7 @@ def Draw(self, dc):
++                         y4 = y3 + self.scale*sinrect
++ 
++                         points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++                        points = [(int(p[0]), int(p[1])) for p in points]
++ 
++                         dc.DrawPolygon(points)
++ 
++@@ -1017,7 +1019,7 @@ def Draw(self, dc):
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++ 
++         if self._drawarc:
++-            dc.SetPen(wx.Pen(self.GetArcColour(), 2.0))
+++            dc.SetPen(wx.Pen(self.GetArcColour(), 2))
++             # If It's Not A Complete Circle, Draw The Connecting Lines And The Arc
++             if abs(abs(startangle - endangle) - 2*pi) > 1.0/180.0:
++                 dc.DrawArc(xstart, ystart, xend, yend, centerX, centerY)
++@@ -1046,7 +1048,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++             dc.SetTextForeground(middlecolour)
++-            dc.DrawText(middletext, newx, newy)
+++            dc.DrawText(middletext, int(newx), int(newy))
++ 
++         # Here We Draw The Icon In The Middle, Near The Start Of The Arrow (If Present)
++         # This Is Like The "Fuel" Icon In The Cars
++@@ -1054,8 +1056,8 @@ def Draw(self, dc):
++ 
++             middleicon = self.GetMiddleIcon()
++             middlewidth, middleheight = self.GetMiddleIconDimens()
++-            middleicon.SetWidth(middlewidth*self.scale)
++-            middleicon.SetHeight(middleheight*self.scale)
+++            middleicon.SetWidth(int(middlewidth*self.scale))
+++            middleicon.SetHeight(int(middleheight*self.scale))
++             middleangle = (startangle + endangle)/2.0
++ 
++             mw = middleicon.GetWidth()
++@@ -1064,7 +1066,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++ 
++-            dc.DrawIcon(middleicon, newx, newy)
+++            dc.DrawIcon(middleicon, int(newx), int(newy))
++ 
++             # Restore Icon Dimension, If Not Something Strange Happens
++             middleicon.SetWidth(middlewidth)
++@@ -1109,53 +1111,61 @@ def Draw(self, dc):
++                 if handstyle == "Arrow":
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++-                    dc.SetPen(wx.Pen(shadowcolour, 5*log(self.scale+1)))
+++                    dc.SetPen(wx.Pen(shadowcolour, int(5*log(self.scale+1))))
++                     dc.SetBrush(wx.Brush(shadowcolour))
++                     shadowdistance = 2.0*self.scale
++-                    dc.DrawLine(newx + shadowdistance, newy + shadowdistance,
++-                                xarr + shadowdistance, yarr + shadowdistance)
++-
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance)])
+++                    dc.DrawLine(int(newx + shadowdistance), int(newy + shadowdistance),
+++                                int(xarr + shadowdistance), int(yarr + shadowdistance))
+++
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++                 else:
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++                     dc.SetBrush(wx.Brush(shadowcolour))
++-                    dc.SetPen(wx.Pen(shadowcolour, 1.0))
+++                    dc.SetPen(wx.Pen(shadowcolour, 1))
++                     shadowdistance = 1.5*self.scale
++ 
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance),
++-                                    (x4+shadowdistance, y4+shadowdistance)])
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance),
+++                              (x4+shadowdistance, y4+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++ 
++             if handstyle == "Arrow":
++ 
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++-                dc.SetPen(wx.Pen(handcolour, 5*log(self.scale+1)))
+++                dc.SetPen(wx.Pen(handcolour, int(5*log(self.scale+1))))
++                 # Draw The "Hand", An Arrow
++-                dc.DrawLine(newx, newy, xarr, yarr)
+++                dc.DrawLine(int(newx), int(newy), int(xarr), int(yarr))
++ 
++                 # Draw The Arrow Pointer
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3)])
+++                points = [(x1, y1), (x2, y2), (x3, y3)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++             else:
++ 
++                 # Draw The Hand Pointer
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3), (x4, y4)])
+++                points = [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++ 
++     def SetIntervals(self, intervals=None):
++@@ -1527,7 +1537,7 @@ def SetMiddleTextFont(self, font=None):
++ 
++         if font is None:
++             self._middletextfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._middletextsize = 10.0
+++            self._middletextsize = 10
++             self._middletextfont.SetPointSize(self._middletextsize)
++         else:
++             self._middletextfont = font
++@@ -1599,7 +1609,7 @@ def CircleCoords(self, radius, angle, centerX, centerY):
++         x = radius*cos(angle) + centerX
++         y = radius*sin(angle) + centerY
++ 
++-        return x, y
+++        return int(x), int(y)
++ 
++ 
++     def GetIntersection(self, current, intervals):
++diff --git a/wx/lib/agw/supertooltip.py b/wx/lib/agw/supertooltip.py
++index a92ce10d1..cd0f0c9f7 100644
++--- a/wx/lib/agw/supertooltip.py
+++++ b/wx/lib/agw/supertooltip.py
++@@ -295,8 +295,8 @@ def OnPaint(self, event):
++ 
++         # Get the user options for header, bitmaps etc...
++         drawHeader, drawFooter = classParent.GetDrawHeaderLine(), classParent.GetDrawFooterLine()
++-        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height/2)
++-        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height/2, frameRect.width, frameRect.height/2+1)
+++        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height//2)
+++        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height//2, frameRect.width, frameRect.height//2+1)
++         # Fill the triple-gradient
++         dc.GradientFillLinear(topRect, topColour, middleColour, wx.SOUTH)
++         dc.GradientFillLinear(bottomRect, middleColour, bottomColour, wx.SOUTH)
++@@ -324,9 +324,9 @@ def OnPaint(self, event):
++         normalText = classParent.GetTextColour()
++         if header:
++             dc.SetTextForeground(normalText)
++-            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)/2)
+++            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)//2)
++         if headerBmp and headerBmp.IsOk():
++-            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)/2, True)
+++            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)//2, True)
++ 
++         if header or (headerBmp and headerBmp.IsOk()):
++             yPos += height
++@@ -376,7 +376,7 @@ def OnPaint(self, event):
++                 messageHeight += textHeight
++ 
++                 xText = (bmpWidth + 2 * self._spacing) if bmpWidth > 0 else self._spacing
++-                yText += textHeight/2+self._spacing
+++                yText += textHeight//2+self._spacing
++                 maxWidth = max(xText + textWidth + self._spacing, maxWidth)
++                 dc.DrawText(line, xText, yText)
++                 if isLink:
++@@ -412,8 +412,8 @@ def OnPaint(self, event):
++             if drawFooter:
++                 # Draw the separator line before the footer
++                 dc.SetPen(wx.GREY_PEN)
++-                dc.DrawLine(self._spacing, yPos-self._spacing/2+toAdd,
++-                            width-self._spacing, yPos-self._spacing/2+toAdd)
+++                dc.DrawLine(self._spacing, yPos-self._spacing//2+toAdd,
+++                            width-self._spacing, yPos-self._spacing//2+toAdd)
++         # Draw the footer and footer bitmap (if any)
++         dc.SetTextForeground(normalText)
++         height = max(textHeight, bmpHeight)
++@@ -424,7 +424,7 @@ def OnPaint(self, event):
++             maxWidth = max(bmpXPos + bmpWidth + (self._spacing*2) + textWidth, maxWidth)
++         if footerBmp and footerBmp.IsOk():
++             toAdd = (height - bmpHeight + self._spacing) / 2
++-            dc.DrawBitmap(footerBmp, bmpXPos, yPos + toAdd, True)
+++            dc.DrawBitmap(footerBmp, bmpXPos, int(yPos + toAdd), True)
++             maxWidth = max(footerBmp.GetSize().GetWidth() + bmpXPos, maxWidth)
++ 
++         maxHeight = yPos + height + toAdd
++@@ -815,7 +815,7 @@ def SetStartDelay(self, delay=1):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._startDelayTime = float(delay)
+++        self._startDelayTime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -831,7 +831,7 @@ def SetEndDelay(self, delay=1e6):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._endDelayTime = float(delay)
+++        self._endDelayTime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/toasterbox.py b/wx/lib/agw/toasterbox.py
++index b73429dd2..8efb5869b 100644
++--- a/wx/lib/agw/toasterbox.py
+++++ b/wx/lib/agw/toasterbox.py
++@@ -1316,11 +1316,11 @@ def _getTextCoords(self, dc):
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++             fh += h + textPadding
++-        y = (th - fh) / 2; coords = []
+++        y = (th - fh) // 2; coords = []
++ 
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++-            x = (tw - w) / 2
+++            x = (tw - w) // 2
++             coords.append((x, y))
++             y += h + textPadding
++ 
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index 14fc41f86..caa5e5cf4 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -914,7 +914,7 @@ def Draw(self, index, dc, x, y, flags, solidBackground=True):
++             raise Exception("Wrong index in image list")
++ 
++         bmp = self._images[index]
++-        dc.DrawBitmap(bmp, x, y, (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
+++        dc.DrawBitmap(bmp, x, int(y), (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
++ 
++         return True
++ 
++@@ -4022,7 +4022,7 @@ def SetPosition(self, x, y, spacing):
++ 
++             if item.HasImage():
++ 
++-                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)/2
+++                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)//2
++                 self._gi._rectIcon.y = self._gi._rectAll.y + 4
++ 
++             if item.HasText():
++@@ -4030,7 +4030,7 @@ def SetPosition(self, x, y, spacing):
++                 if self._gi._rectLabel.width > spacing:
++                     self._gi._rectLabel.x = self._gi._rectAll.x + 2
++                 else:
++-                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing/2) - (self._gi._rectLabel.width/2)
+++                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing//2) - (self._gi._rectLabel.width//2)
++ 
++                 self._gi._rectLabel.y = self._gi._rectAll.y + self._gi._rectAll.height + 2 - self._gi._rectLabel.height
++                 self._gi._rectHighlight.x = self._gi._rectLabel.x - 2
++@@ -4546,7 +4546,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 checked = item.IsChecked()
++-                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)/2, item.GetKind(), checked, enabled)
+++                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)//2, item.GetKind(), checked, enabled)
++                 xOld += ix
++                 width -= ix
++ 
++@@ -4557,7 +4557,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 for img in images:
++ 
++                     ix, iy = self._owner.GetImageSize([img])
++-                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)/2, enabled)
+++                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)//2, enabled)
++ 
++                     xOld += ix
++                     width -= ix
++@@ -5230,7 +5230,7 @@ def OnPaint(self, event):
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 # We draw it on the left, always
++-                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)/2, kind, checked, enabled)
+++                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)//2, kind, checked, enabled)
++                 wcheck += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++                 cw -= ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++ 
++@@ -6819,7 +6819,7 @@ def HitTestLine(self, line, x, y):
++                     # We got a checkbox-type item
++                     ix, iy = self.GetCheckboxImageSize()
++                     LH = self.GetLineHeight(line)
++-                    rect = wx.Rect(xOld, lineY + LH/2 - iy/2, ix, iy)
+++                    rect = wx.Rect(xOld, lineY + LH//2 - iy//2, ix, iy)
++                     if rect.Contains((x, y)):
++                         newItem = self.GetParent().GetItem(line, col)
++                         return newItem, ULC_HITTEST_ONITEMCHECK
++@@ -7937,13 +7937,13 @@ def MoveToItem(self, item):
++                     while start_y > view_y:
++                         start_y -= SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, start_y/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, start_y//SCROLL_UNIT_Y)
++ 
++                 if start_y + height > view_y + client_h:
++                     while start_y + height < view_y + client_h:
++                         start_y += SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)//SCROLL_UNIT_Y)
++ 
++         else: # !report
++ 
++@@ -7960,7 +7960,7 @@ def MoveToItem(self, item):
++             if rect.y + rect.height - 5 > view_y + client_h:
++                 sy = (rect.y + rect.height - client_h + hLine)/hLine
++ 
++-            self.Scroll(sx, sy)
+++            self.Scroll(int(sx), int(sy))
++ 
++ 
++ # ----------------------------------------------------------------------------
++diff --git a/wx/lib/agw/xlsgrid.py b/wx/lib/agw/xlsgrid.py
++index b505aebb4..17267fabc 100644
++--- a/wx/lib/agw/xlsgrid.py
+++++ b/wx/lib/agw/xlsgrid.py
++@@ -965,7 +965,7 @@ def Draw(self, dc, rect):
++             xp = xc - (text_width/2)*xshift - (text_height/2)*yshift
++             yp = yc + (text_width/2)*yshift - (text_height/2)*xshift
++ 
++-            dc.DrawRotatedText(value, xp, yp, self.rotation)
+++            dc.DrawRotatedText(value, int(xp), int(yp), self.rotation)
++ 
++         else:
++ 
++@@ -1125,7 +1125,7 @@ def Draw(self, dc, rect):
++             if font.escapement == 1:
++                 ypos = ypos - maxH + height
++ 
++-            dc.DrawText(chunk, start, ypos)
+++            dc.DrawText(chunk, start, int(ypos))
++             start += width
++ 
++ 
++diff --git a/wx/lib/agw/zoombar.py b/wx/lib/agw/zoombar.py
++index 1e6ec5da3..8c2afd058 100644
++--- a/wx/lib/agw/zoombar.py
+++++ b/wx/lib/agw/zoombar.py
++@@ -463,7 +463,7 @@ def SetSize(self, width, height):
++     def GetPosition(self):
++         """ Returns the button position. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -601,7 +601,7 @@ def __init__(self, bitmap=None):
++     def GetPosition(self):
++         """ Returns the position of :class:`wx.ImageBar`, as a :class:`wx.Point`. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -660,7 +660,7 @@ def SetBarColour(self, colour, xSize=None, ySize=None):
++         if xSize is not None:
++             self._size = wx.Size(xSize, ySize)
++ 
++-        bitmap.Rescale(self._size.width, self._size.height/2)
+++        bitmap.Rescale(self._size.width, self._size.height//2)
++ 
++         r1, g1, b1 = self._startColour.Red(), self._startColour.Green(), self._startColour.Blue()
++         r2, g2, b2 = colour.Red(), colour.Green(), colour.Blue()
++@@ -1065,7 +1065,7 @@ def ResetSize(self):
++             ySize += yextent
++ 
++         if self._showReflections:
++-            ySize += self._buttonSize/2
+++            ySize += self._buttonSize//2
++         if self._centerZoom:
++             ySize += self._buttonSize
++ 
++@@ -1240,7 +1240,7 @@ def DrawLabels(self, dc):
++             textWidth, textHeight = dc.GetTextExtent(label)
++             buttonPos = button.GetPosition()
++             buttonSize = button.GetSize()
++-            xpos = buttonPos.x + (buttonSize.width - textWidth)/2
+++            xpos = buttonPos.x + (buttonSize.width - textWidth)//2
++             ypos = buttonPos.y - textHeight - 2
++ 
++             dc.DrawRectangle(xpos-2, ypos-1, textWidth+4, textHeight+2)
++diff --git a/wx/lib/analogclock/analogclock.py b/wx/lib/analogclock/analogclock.py
++index 7c4b18979..1ee1d6742 100644
++--- a/wx/lib/analogclock/analogclock.py
+++++ b/wx/lib/analogclock/analogclock.py
++@@ -173,7 +173,7 @@ def _recalcCoords(self, size):
++         scale = min([float(size.width) / self.basesize.width,
++                      float(size.height) / self.basesize.height])
++ 
++-        centre = wx.Point(size.width / 2., size.height / 2.)
+++        centre = wx.Point(size.width // 2, size.height // 2)
++ 
++         self.Box.RecalcCoords(size, centre, scale)
++         self.Hands.RecalcCoords(size, centre, scale)
++diff --git a/wx/lib/analogclock/helpers.py b/wx/lib/analogclock/helpers.py
++index 88d198bee..9674de912 100644
++--- a/wx/lib/analogclock/helpers.py
+++++ b/wx/lib/analogclock/helpers.py
++@@ -37,7 +37,7 @@ def __init__(self, idx=0, pos=None, size=None, offset=0, clocksize=None,
++ 
++ 
++     def _pol2rect(self, m, t):
++-        return m * math.cos(math.radians(t)), m * math.sin(math.radians(t))
+++        return int(m * math.cos(math.radians(t))), int(m * math.sin(math.radians(t)))
++ 
++ 
++     def _rect2pol(self, x, y):
++@@ -174,7 +174,7 @@ def __init__(self, **kwargs):
++ 
++     def Draw(self, dc):
++         self.dyer.Select(dc)
++-        dc.DrawCircle(self.pos.x, self.pos.y, self.radius)
+++        dc.DrawCircle(self.pos.x, self.pos.y, int(self.radius))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -205,7 +205,7 @@ def Draw(self, dc, end, offset=0):
++             m, t = self._rect2pol(x, y)
++             polygon[i] = self._pol2rect(m, t - angle)
++ 
++-        dc.DrawPolygon(polygon, centre.x + offset, centre.y + offset)
+++        dc.DrawPolygon(polygon, int(centre.x + offset), int(centre.y + offset))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -226,7 +226,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawRectangle(x + offset, y + offset, width, height)
+++        dc.DrawRectangle(int(x + offset), int(y + offset), int(width), int(height))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -242,7 +242,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x
++         y = self.pos.y
++ 
++-        dc.DrawCircle(x + offset, y + offset, radius)
+++        dc.DrawCircle(int(x + offset), int(y + offset), int(radius))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -273,7 +273,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -290,7 +290,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -309,7 +309,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawText(self.text, x + offset, y + offset)
+++        dc.DrawText(self.text, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -321,7 +321,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawRotatedText(self.text, x + offset, y + offset, angle)
+++        dc.DrawRotatedText(self.text, int(x + offset), int(y + offset), int(angle))
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -656,7 +656,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++ 
++         # Try to find a 'good' max size for text-based ticks.
++         if a_tick.text is not None:
++-            self.font.SetPointSize(size)
+++            self.font.SetPointSize(int(size))
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(*clocksize.Get()))
++             dc.SetFont(self.font)
++@@ -686,7 +686,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++             x = centre.x + radius * math.sin(angle)
++             y = centre.y + radius * math.cos(angle)
++ 
++-            tick.SetPosition(wx.Point(x, y))
+++            tick.SetPosition(wx.Point(int(x), int(y)))
++ 
++ 
++     def GetSize(self):
++diff --git a/wx/lib/analogclock/setup.py b/wx/lib/analogclock/setup.py
++index a83c8639d..a7dffb901 100644
++--- a/wx/lib/analogclock/setup.py
+++++ b/wx/lib/analogclock/setup.py
++@@ -179,7 +179,7 @@ def __init__(self, parent, title, group="Hands"):
++         p.SetCustomColours(self.customcolours)
++         sizer.Add(p, pos=(0, 1), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.bw = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.bw = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(0, 2), span=(1, 2), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -193,7 +193,7 @@ def __init__(self, parent, title, group="Hands"):
++         p = self.ls = wx.StaticText(self, label="Size:")
++         sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.sz = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.sz = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -212,7 +212,7 @@ def __init__(self, parent, title, group="Ticks"):
++         p = wx.StaticText(self, label="Offset:")
++         sizer.Add(p, pos=(3, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.of = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.of = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(3, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++diff --git a/wx/lib/buttons.py b/wx/lib/buttons.py
++index 46d1b8747..f01a54d41 100644
++--- a/wx/lib/buttons.py
+++++ b/wx/lib/buttons.py
++@@ -453,7 +453,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         tw, th = dc.GetTextExtent(label)
++         if not self.up:
++             dx = dy = self.labelDelta
++-        dc.DrawText(label, (width-tw)/2+dx, (height-th)/2+dy)
+++        dc.DrawText(label, (width-tw)//2+dx, (height-th)//2+dy)
++ 
++ 
++     def DrawFocusIndicator(self, dc, w, h):
++@@ -844,7 +844,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++         hasMask = bmp.GetMask() != None
++-        dc.DrawBitmap(bmp, (width-bw)/2+dx, (height-bh)/2+dy, hasMask)
+++        dc.DrawBitmap(bmp, (width-bw)//2+dx, (height-bh)//2+dy, hasMask)
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -926,12 +926,12 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++ 
++-        pos_x = (width-bw-tw)/2+dx      # adjust for bitmap and text to centre
+++        pos_x = (width-bw-tw)//2+dx      # adjust for bitmap and text to centre
++         if bmp is not None:
++-            dc.DrawBitmap(bmp, pos_x, (height-bh)/2+dy, hasMask) # draw bitmap if available
+++            dc.DrawBitmap(bmp, pos_x, (height-bh)//2+dy, hasMask) # draw bitmap if available
++             pos_x = pos_x + 2   # extra spacing from bitmap
++ 
++-        dc.DrawText(label, pos_x + dx+bw, (height-th)/2+dy)      # draw the text
+++        dc.DrawText(label, pos_x + dx+bw, (height-th)//2+dy)      # draw the text
++ 
++ 
++ #----------------------------------------------------------------------
++diff --git a/wx/lib/colourchooser/pycolourchooser.py b/wx/lib/colourchooser/pycolourchooser.py
++index 61dbc02d2..124376483 100644
++--- a/wx/lib/colourchooser/pycolourchooser.py
+++++ b/wx/lib/colourchooser/pycolourchooser.py
++@@ -188,7 +188,7 @@ def __init__(self, parent, id):
++         self.colour_slider.Bind(wx.EVT_MOTION, self.onSliderMotion)
++         self.slider = wx.Slider(
++                         self, self.idSCROLL, 86, 0, self.colour_slider.HEIGHT - 1,
++-                        style=wx.SL_VERTICAL, size=(15, self.colour_slider.HEIGHT)
+++                        style=wx.SL_VERTICAL, size=(-1, self.colour_slider.HEIGHT)
++                         )
++ 
++         self.Bind(wx.EVT_COMMAND_SCROLL, self.onScroll, self.slider)
++@@ -338,7 +338,7 @@ def setSliderToV(self, v):
++         min = self.slider.GetMin()
++         max = self.slider.GetMax()
++         val = (1 - v) * max
++-        self.slider.SetValue(val)
+++        self.slider.SetValue(int(val))
++ 
++     def getVFromSlider(self):
++         """Get the current value of "V" from the v slider."""
++diff --git a/wx/lib/colourchooser/pypalette.py b/wx/lib/colourchooser/pypalette.py
++index ff1fb840c..71b9fc2df 100644
++--- a/wx/lib/colourchooser/pypalette.py
+++++ b/wx/lib/colourchooser/pypalette.py
++@@ -165,7 +165,7 @@ def DrawBuffer(self):
++             colour = wx.Colour(0, 0, 0)
++             self.buffer.SetPen(wx.Pen(colour, 1, wx.PENSTYLE_SOLID))
++             self.buffer.SetBrush(wx.Brush(colour, wx.BRUSHSTYLE_TRANSPARENT))
++-            self.buffer.DrawCircle(self.point[0], self.point[1], 3)
+++            self.buffer.DrawCircle(int(self.point[0]), int(self.point[1]), 3)
++ 
++     def HighlightPoint(self, x, y):
++         """Highlights an area of the palette with a little circle around
++diff --git a/wx/lib/floatcanvas/FCObjects.py b/wx/lib/floatcanvas/FCObjects.py
++index 58becd38c..cdf8cc53e 100644
++--- a/wx/lib/floatcanvas/FCObjects.py
+++++ b/wx/lib/floatcanvas/FCObjects.py
++@@ -296,7 +296,7 @@ def SetPen(self, LineColor, LineStyle, LineWidth):
++         else:
++             self.Pen = self.PenList.setdefault(
++                 (LineColor, LineStyle, LineWidth),
++-                wx.Pen(LineColor, LineWidth, self.LineStyleList[LineStyle]))
+++                wx.Pen(LineColor, int(LineWidth), self.LineStyleList[LineStyle]))
++ 
++     def SetHitBrush(self, HitColor):
++         """
++@@ -1202,14 +1202,14 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++             x = xc - Size/2.0
++             y = yc - Size/2.0
++             dc.SetBrush(self.Brush)
++-            dc.DrawRectangle(x, y, Size, Size)
+++            dc.DrawRectangle(int(x), int(y), Size, Size)
++         if HTdc and self.HitAble:
++             HTdc.SetPen(self.HitPen)
++             if self.Size <= 1:
++                 HTdc.DrawPoint(xc, xc)
++             else:
++                 HTdc.SetBrush(self.HitBrush)
++-                HTdc.DrawRectangle(x, y, Size, Size)
+++                HTdc.DrawRectangle(int(x), int(y), Size, Size)
++ 
++ class RectEllipse(XYObjectMixin, LineAndFillMixin, DrawObject):
++     """A RectEllipse draw object."""
++@@ -2161,7 +2161,7 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++         W = H * (self.bmpWidth / self.bmpHeight)
++         if (self.ScaledBitmap is None) or (H != self.ScaledHeight) :
++             self.ScaledHeight = H
++-            Img = self.Image.Scale(W, H)
+++            Img = self.Image.Scale(int(W), int(H))
++             self.ScaledBitmap = wx.Bitmap(Img)
++ 
++         XY = self.ShiftFun(XY[0], XY[1], W, H)
++diff --git a/wx/lib/gizmos/ledctrl.py b/wx/lib/gizmos/ledctrl.py
++index f185d5105..7f4d3fcf9 100644
++--- a/wx/lib/gizmos/ledctrl.py
+++++ b/wx/lib/gizmos/ledctrl.py
++@@ -293,7 +293,7 @@ def _drawDigit(self, dc, digit, column):
++ 
++         if digit & c.COLON:
++             dc.SetBrush(wx.Brush(lineColor))
++-            centerX = XPos + (self.m_lineLength + self.m_digitMargin) / 2
++-            radius = self.m_lineWidth / 2
++-            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) / 2, radius)
++-            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 / 4, radius)
+++            centerX = XPos + (self.m_lineLength + self.m_digitMargin) // 2
+++            radius = self.m_lineWidth // 2
+++            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) // 2, radius)
+++            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 // 4, radius)
++diff --git a/wx/lib/imagebrowser.py b/wx/lib/imagebrowser.py
++index 795e90dca..8e14727e7 100644
++--- a/wx/lib/imagebrowser.py
+++++ b/wx/lib/imagebrowser.py
++@@ -347,8 +347,8 @@ def DrawImage(self, dc):
++         owidth = int(scale*iwidth)
++         oheight = int(scale*iheight)
++ 
++-        diffx = (wwidth - owidth)/2   # center calc
++-        diffy = (wheight - oheight)/2   # center calc
+++        diffx = (wwidth - owidth)//2   # center calc
+++        diffy = (wheight - oheight)//2   # center calc
++ 
++         if not bmp:
++             if owidth!=iwidth or oheight!=iheight:
++diff --git a/wx/lib/ogl/basic.py b/wx/lib/ogl/basic.py
++index b08859ab9..0107f21fc 100644
++--- a/wx/lib/ogl/basic.py
+++++ b/wx/lib/ogl/basic.py
++@@ -1051,7 +1051,7 @@ def OnEraseContents(self, dc):
++         dc.SetPen(self.GetBackgroundPen())
++         dc.SetBrush(self.GetBackgroundBrush())
++ 
++-        dc.DrawRectangle(topLeftX - penWidth, topLeftY - penWidth, maxX + penWidth * 2 + 4, maxY + penWidth * 2 + 4)
+++        dc.DrawRectangle(int(topLeftX - penWidth), int(topLeftY - penWidth), int(maxX + penWidth * 2 + 4), int(maxY + penWidth * 2 + 4))
++ 
++     def EraseLinks(self, dc, attachment = -1, recurse = False):
++         """
++@@ -2769,9 +2769,9 @@ def OnDraw(self, dc):
++             dc.SetBrush(self._brush)
++ 
++         if self._cornerRadius:
++-            dc.DrawRoundedRectangle(x1, y1, self._width, self._height, self._cornerRadius)
+++            dc.DrawRoundedRectangle(int(x1), int(y1), self._width, self._height, self._cornerRadius)
++         else:
++-            dc.DrawRectangle(x1, y1, self._width, self._height)
+++            dc.DrawRectangle(int(x1), int(y1), self._width, self._height)
++ 
++     def GetBoundingBoxMin(self):
++         """Get the bounding box minimum."""
++@@ -2882,7 +2882,7 @@ def Create(self, the_points = None):
++             # Duplicate the list of points
++             self._points = []
++             for point in the_points:
++-                new_point = wx.Point(point[0], point[1])
+++                new_point = wx.Point(int(point[0]), int(point[1]))
++                 self._points.append(new_point)
++             self.CalculateBoundingBox()
++             self._originalWidth = self._boundWidth
++@@ -3444,7 +3444,7 @@ def OnDraw(self, dc):
++                 dc.SetPen(self._pen)
++         if self._brush:
++             dc.SetBrush(self._brush)
++-        dc.DrawEllipse(self._xpos - self.GetWidth() / 2.0, self._ypos - self.GetHeight() / 2.0, self.GetWidth(), self.GetHeight())
+++        dc.DrawEllipse(int(self._xpos - self.GetWidth() / 2.0), int(self._ypos - self.GetHeight() / 2.0), self.GetWidth(), self.GetHeight())
++ 
++     def SetSize(self, x, y, recursive = True):
++         """
++diff --git a/wx/lib/ogl/bmpshape.py b/wx/lib/ogl/bmpshape.py
++index ee2859527..e53ddb136 100644
++--- a/wx/lib/ogl/bmpshape.py
+++++ b/wx/lib/ogl/bmpshape.py
++@@ -32,7 +32,7 @@ def OnDraw(self, dc):
++ 
++         x = self._xpos - self._bitmap.GetWidth() / 2.0
++         y = self._ypos - self._bitmap.GetHeight() / 2.0
++-        dc.DrawBitmap(self._bitmap, x, y, True)
+++        dc.DrawBitmap(self._bitmap, int(x), int(y), True)
++ 
++     def SetSize(self, w, h, recursive = True):
++         """
++diff --git a/wx/lib/ogl/composit.py b/wx/lib/ogl/composit.py
++index c3b623952..eecaafb3f 100644
++--- a/wx/lib/ogl/composit.py
+++++ b/wx/lib/ogl/composit.py
++@@ -1131,11 +1131,11 @@ def OnDraw(self, dc):
++ 
++         if self._leftSide:
++             dc.SetPen(self._leftSidePen)
++-            dc.DrawLine(x1, y2, x1, y1)
+++            dc.DrawLine(int(x1), int(y2), int(x1), int(y1))
++ 
++         if self._topSide:
++             dc.SetPen(self._topSidePen)
++-            dc.DrawLine(x1, y1, x2, y1)
+++            dc.DrawLine(int(x1), int(y1), int(x2), int(y1))
++ 
++         # For testing purposes, draw a rectangle so we know
++         # how big the division is.
++diff --git a/wx/lib/ogl/divided.py b/wx/lib/ogl/divided.py
++index 0bfb1919f..0809be58c 100644
++--- a/wx/lib/ogl/divided.py
+++++ b/wx/lib/ogl/divided.py
++@@ -231,7 +231,7 @@ def OnDrawContents(self, dc):
++                 regionPen = region.GetActualPen()
++                 if regionPen:
++                     dc.SetPen(regionPen)
++-                    dc.DrawLine(leftX, y, rightX, y)
+++                    dc.DrawLine(int(leftX), int(y), int(rightX), int(y))
++ 
++             currentY = actualY
++ 
++diff --git a/wx/lib/ogl/lines.py b/wx/lib/ogl/lines.py
++index 948b85d82..50c07e046 100644
++--- a/wx/lib/ogl/lines.py
+++++ b/wx/lib/ogl/lines.py
++@@ -1200,7 +1200,7 @@ def OnDraw(self, dc):
++ 
++         points = []
++         for point in self._lineControlPoints:
++-            points.append(wx.Point(point[0], point[1]))
+++            points.append(wx.Point(int(point[0]), int(point[1])))
++ 
++         if self._isSpline:
++             dc.DrawSpline(points)
++diff --git a/wx/lib/ogl/oglmisc.py b/wx/lib/ogl/oglmisc.py
++index 8588a72b7..a8be3fc53 100644
++--- a/wx/lib/ogl/oglmisc.py
+++++ b/wx/lib/ogl/oglmisc.py
++@@ -300,10 +300,10 @@ def DrawFormattedText(dc, text_list, xpos, ypos, width, height, formatMode):
++         yoffset = ypos - height / 2.0
++ 
++     # +1 to allow for rounding errors
++-    dc.SetClippingRegion(xpos - width / 2.0, ypos - height / 2.0, width + 1, height + 1)
+++    dc.SetClippingRegion(int(xpos - width / 2.0), int(ypos - height / 2.0), int(width + 1), int(height + 1))
++ 
++     for line in text_list:
++-        dc.DrawText(line.GetText(), xoffset + line.GetX(), yoffset + line.GetY())
+++        dc.DrawText(line.GetText(), int(xoffset + line.GetX()), int(yoffset + line.GetY()))
++ 
++     dc.DestroyClippingRegion()
++ 
++diff --git a/wx/lib/plot/examples/demo.py b/wx/lib/plot/examples/demo.py
++index 98fbaad3a..02bec1d9f 100644
++--- a/wx/lib/plot/examples/demo.py
+++++ b/wx/lib/plot/examples/demo.py
++@@ -984,7 +984,7 @@ def DrawPointLabel(self, dc, mDataDict):
++ 
++         sx, sy = mDataDict["scaledXY"]  # scaled x,y of closest point
++         # 10by10 square centered on point
++-        dc.DrawRectangle(sx - 5, sy - 5, 10, 10)
+++        dc.DrawRectangle(int(sx - 5), int(sy - 5), 10, 10)
++         px, py = mDataDict["pointXY"]
++         cNum = mDataDict["curveNum"]
++         pntIn = mDataDict["pIndex"]
++@@ -992,7 +992,7 @@ def DrawPointLabel(self, dc, mDataDict):
++         # make a string to display
++         s = "Crv# %i, '%s', Pt. (%.2f,%.2f), PtInd %i" % (
++             cNum, legend, px, py, pntIn)
++-        dc.DrawText(s, sx, sy + 1)
+++        dc.DrawText(s, int(sx), int(sy + 1))
++ 
++ 
++ def run_demo():
++diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py
++index dd3f77d52..abee47efb 100644
++--- a/wx/lib/plot/plotcanvas.py
+++++ b/wx/lib/plot/plotcanvas.py
++@@ -174,24 +174,24 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++ 
++         # Default Pens
++         self._gridPen = wx.Pen(wx.Colour(180, 180, 180, 255),
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_DOT)
++ 
++         self._centerLinePen = wx.Pen(wx.RED,
++-                                     self._pointSize[0],
+++                                     int(self._pointSize[0]),
++                                      wx.PENSTYLE_SHORT_DASH)
++ 
++         self._axesPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++ 
++         self._tickPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++         self._tickLength = tuple(-x * 2 for x in self._pointSize)
++ 
++         self._diagonalPen = wx.Pen(wx.BLUE,
++-                                   self._pointSize[0],
+++                                   int(self._pointSize[0]),
++                                    wx.PENSTYLE_DOT_DASH)
++ 
++     def SetCursor(self, cursor):
++@@ -1925,10 +1925,10 @@ def _Draw(self, graphics, xAxis=None, yAxis=None, dc=None):
++         # set clipping area so drawing does not occur outside axis box
++         ptx, pty, rectWidth, rectHeight = self._point2ClientCoord(p1, p2)
++         # allow graph to overlap axis lines by adding units to w and h
++-        dc.SetClippingRegion(ptx * self._pointSize[0],
++-                             pty * self._pointSize[1],
++-                             rectWidth * self._pointSize[0] + 2,
++-                             rectHeight * self._pointSize[1] + 1)
+++        dc.SetClippingRegion(int(ptx * self._pointSize[0]),
+++                             int(pty * self._pointSize[1]),
+++                             int(rectWidth * self._pointSize[0] + 2),
+++                             int(rectHeight * self._pointSize[1] + 1))
++         # Draw the lines and markers
++ #        start = _time.perf_counter()
++         graphics.draw(dc)
++@@ -2280,7 +2280,7 @@ def _drawLegend(self, dc, graphics, rhsW, topH, legendBoxWH,
++             pnt = ((trhc[0] + legendLHS + legendSymExt[0]
++                     + 5 * self._pointSize[0]),
++                    trhc[1] + s + lineHeight / 2. - legendTextExt[1] / 2)
++-            dc.DrawText(o.getLegend(), pnt[0], pnt[1])
+++            dc.DrawText(o.getLegend(), int(pnt[0]), int(pnt[1]))
++         dc.SetFont(self._getFont(self._fontSizeAxis))  # reset
++ 
++     def _titleLablesWH(self, dc, graphics):
++@@ -2329,7 +2329,7 @@ def _drawRubberBand(self, corner1, corner2):
++         dc.SetPen(wx.Pen(wx.BLACK))
++         dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_TRANSPARENT))
++         dc.SetLogicalFunction(wx.INVERT)
++-        dc.DrawRectangle(ptx, pty, rectWidth, rectHeight)
+++        dc.DrawRectangle(int(ptx), int(pty), int(rectWidth), int(rectHeight))
++         dc.SetLogicalFunction(wx.COPY)
++ 
++     def _getFont(self, size):
++@@ -2423,7 +2423,7 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.gridPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         x, y, width, height = self._point2ClientCoord(p1, p2)
++@@ -2432,13 +2432,13 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++             if self.enableGrid[0]:
++                 for x, _ in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0], pt[1] - height)
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - height))
++ 
++         if self._ySpec != 'none':
++             if self.enableGrid[1]:
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0] + width, pt[1])
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0] + width), int(pt[1]))
++ 
++     @TempStyle('pen')
++     def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2471,7 +2471,7 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.tickPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         # lengthen lines for printing
++@@ -2484,13 +2484,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] - xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - xTickLength)))
++                 dc.DrawLineList(lines)
++             if ticks.top:
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] + xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] + xTickLength)))
++                 dc.DrawLineList(lines)
++ 
++         if self.ySpec != 'none':
++@@ -2498,13 +2498,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] + yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] + yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++             if ticks.right:
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] - yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] - yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++ 
++     @TempStyle('pen')
++@@ -2531,25 +2531,25 @@ def _drawCenterLines(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.centerLinePen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._centerLinesEnabled in ('Horizontal', True):
++             y1 = scale[1] * p1[1] + shift[1]
++             y2 = scale[1] * p2[1] + shift[1]
++             y = (y1 - y2) / 2.0 + y2
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        y,
++-                        scale[0] * p2[0] + shift[0],
++-                        y)
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(y),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(y))
++         if self._centerLinesEnabled in ('Vertical', True):
++             x1 = scale[0] * p1[0] + shift[0]
++             x2 = scale[0] * p2[0] + shift[0]
++             x = (x1 - x2) / 2.0 + x2
++-            dc.DrawLine(x,
++-                        scale[1] * p1[1] + shift[1],
++-                        x,
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(x),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(x),
+++                        int(scale[1] * p2[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawDiagonals(self, dc, p1, p2, scale, shift):
++@@ -2575,19 +2575,19 @@ def _drawDiagonals(self, dc, p1, p2, scale, shift):
++         """
++         pen = self.diagonalPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._diagonalsEnabled in ('Bottomleft-Topright', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]))
++         if self._diagonalsEnabled in ('Bottomright-Topleft', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxes(self, dc, p1, p2, scale, shift):
++@@ -2614,7 +2614,7 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.axesPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         axes = self.enableAxes
++@@ -2623,24 +2623,24 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p1[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p1[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.top:
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p2[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p2[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++         if self.ySpec != 'none':
++             if axes.left:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p1[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p1[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.right:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p2[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p2[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2686,8 +2686,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] + 2 * self._pointSize[1] - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] + 2 * self._pointSize[1] - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2698,8 +2698,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w, h = dc.GetTextExtent(label)
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] - 2 * self._pointSize[1] - h - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] - 2 * self._pointSize[1] - h - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2712,8 +2712,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] - w - 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] - w - 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2725,8 +2725,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] + 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] + 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2785,7 +2785,7 @@ def _drawPlotTitle(self, dc, graphics, lhsW, rhsW, titleWH):
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - titleWH[0] / 2.,
++             self.plotbox_origin[1] - self.plotbox_size[1]
++         )
++-        dc.DrawText(graphics.title, titlePos[0], titlePos[1])
+++        dc.DrawText(graphics.title, int(titlePos[0]), int(titlePos[1]))
++ 
++     def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++                         xLabelWH, yLabelWH):
++@@ -2806,7 +2806,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - xLabelWH[0] / 2.,
++             self.plotbox_origin[1] - xLabelWH[1] - yTickLength
++         )
++-        dc.DrawText(graphics.xLabel, xLabelPos[0], xLabelPos[1])
+++        dc.DrawText(graphics.xLabel, int(xLabelPos[0]), int(xLabelPos[1]))
++         yLabelPos = (
++             self.plotbox_origin[0] - 3 * self._pointSize[0] + xTickLength,
++             self.plotbox_origin[1] - bottomH
++@@ -2814,7 +2814,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++         )
++         if graphics.yLabel:  # bug fix for Linux
++             dc.DrawRotatedText(
++-                graphics.yLabel, yLabelPos[0], yLabelPos[1], 90)
+++                graphics.yLabel, int(yLabelPos[0]), int(yLabelPos[1]), 90)
++ 
++     @TempStyle('pen')
++     def _drawPlotAreaLabels(self, dc, graphics, lhsW, rhsW, titleWH,
++@@ -2942,7 +2942,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++ 
++-            self.sb_hor.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_hor.SetScrollbar(pos, pagesize, int(sbfullrange), pagesize)
++             self._sb_xunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++@@ -2964,7 +2964,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++             pos = (sbfullrange - 1 - pos - pagesize)
++-            self.sb_vert.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_vert.SetScrollbar(int(pos), pagesize, int(sbfullrange), pagesize)
++             self._sb_yunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++diff --git a/wx/lib/plot/polyobjects.py b/wx/lib/plot/polyobjects.py
++index 26a54f8f7..725b0164e 100644
++--- a/wx/lib/plot/polyobjects.py
+++++ b/wx/lib/plot/polyobjects.py
++@@ -417,7 +417,7 @@ def draw(self, dc, printerScale, coord=None):
++ 
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_BUTT)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -518,7 +518,7 @@ def draw(self, dc, printerScale, coord=None):
++         style = self.attributes['style']
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_ROUND)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -590,7 +590,7 @@ def draw(self, dc, printerScale, coord=None):
++         if fillcolour and not isinstance(fillcolour, wx.Colour):
++             fillcolour = wx.Colour(fillcolour)
++ 
++-        dc.SetPen(wx.Pen(colour, width))
+++        dc.SetPen(wx.Pen(colour, int(width)))
++         if fillcolour:
++             dc.SetBrush(wx.Brush(fillcolour, fillstyle))
++         else:
++@@ -618,6 +618,7 @@ def _circle(self, dc, coords, size=1):
++         dc.DrawEllipseList(rect.astype(np.int32))
++ 
++     def _dot(self, dc, coords, size=1):
+++        coords = [(int(c[0]), int(c[1])) for c in coords]
++         dc.DrawPointList(coords)
++ 
++     def _square(self, dc, coords, size=1):
++@@ -699,7 +700,7 @@ def set_pen_and_brush(self, dc, printerScale):
++ 
++         if not isinstance(pencolour, wx.Colour):
++             pencolour = wx.Colour(pencolour)
++-        pen = wx.Pen(pencolour, penwidth, penstyle)
+++        pen = wx.Pen(pencolour, int(penwidth), penstyle)
++         pen.SetCap(wx.CAP_BUTT)
++ 
++         if not isinstance(fillcolour, wx.Colour):
++@@ -790,6 +791,7 @@ def draw(self, dc, printerScale, coord=None):
++                 raise TypeError(err_str.format(type(barwidth)))
++ 
++             rects = [self.calc_rect(x, y, w) for x, y, w in pts]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3])) for r in rects]
++             dc.DrawRectangleList(rects)
++         else:
++             dc.DrawLines(coord)  # draw legend line
++@@ -858,6 +860,8 @@ def draw(self, dc, printerScale, coord=None):
++             rects = [self.calc_rect(y, low, high)
++                      for y, (low, high)
++                      in zip(self.hist, self.bins)]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3]))
+++                     for r in rects]
++ 
++             dc.DrawRectangleList(rects)
++         else:
++@@ -1114,10 +1118,10 @@ def _draw_iqr_box(self, dc, printerScale):
++                                       self.currentShift)
++ 
++         # rectangles are drawn (left, top, width, height) so adjust
++-        iqr_box = [iqr_box[0][0],                   # X (left)
++-                   iqr_box[0][1],                   # Y (top)
++-                   iqr_box[1][0] - iqr_box[0][0],   # Width
++-                   iqr_box[1][1] - iqr_box[0][1]]   # Height
+++        iqr_box = [int(iqr_box[0][0]),                   # X (left)
+++                   int(iqr_box[0][1]),                   # Y (top)
+++                   int(iqr_box[1][0] - iqr_box[0][0]),   # Width
+++                   int(iqr_box[1][1] - iqr_box[0][1])]   # Height
++ 
++         box_pen = wx.Pen(wx.BLACK, 3, wx.PENSTYLE_SOLID)
++         box_brush = wx.Brush(wx.GREEN, wx.BRUSHSTYLE_SOLID)
++@@ -1503,7 +1507,7 @@ def OnPrintPage(self, page):
++         self.graph._setSize(plotAreaW, plotAreaH)
++ 
++         # Set offset and scale
++-        dc.SetDeviceOrigin(pixLeft, pixTop)
+++        dc.SetDeviceOrigin(int(pixLeft), int(pixTop))
++ 
++         # Thicken up pens and increase marker size for printing
++         ratioW = float(plotAreaW) / clientDcSize[0]
++diff --git a/wx/lib/popupctl.py b/wx/lib/popupctl.py
++index 883be5ae5..236501f6d 100644
++--- a/wx/lib/popupctl.py
+++++ b/wx/lib/popupctl.py
++@@ -124,7 +124,7 @@ def Display(self):
++         selfSize = self.GetSize()
++         tcSize = self.ctrl.GetSize()
++ 
++-        pos.x -= (selfSize.width - tcSize.width) / 2
+++        pos.x -= (selfSize.width - tcSize.width) // 2
++         if pos.x + selfSize.width > dSize.width:
++             pos.x = dSize.width - selfSize.width
++         if pos.x < 0:
++diff --git a/wx/lib/scrolledpanel.py b/wx/lib/scrolledpanel.py
++index e4c482af9..1f783ea97 100644
++--- a/wx/lib/scrolledpanel.py
+++++ b/wx/lib/scrolledpanel.py
++@@ -222,4 +222,4 @@ def ScrollChildIntoView(self, child):
++         # if we need to adjust
++         if new_vs_x != -1 or new_vs_y != -1:
++             #print("%s: (%s, %s)" % (self.GetName(), new_vs_x, new_vs_y))
++-            self.Scroll(new_vs_x, new_vs_y)
+++            self.Scroll(int(new_vs_x), int(new_vs_y))
++diff --git a/wx/lib/throbber.py b/wx/lib/throbber.py
++index 9954d6b27..ee8c51209 100644
++--- a/wx/lib/throbber.py
+++++ b/wx/lib/throbber.py
++@@ -200,11 +200,11 @@ def Draw(self, dc):
++         """
++         dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True)
++         if self.overlay and self.showOverlay:
++-            dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True)
+++            dc.DrawBitmap(self.overlay, int(self.overlayX), int(self.overlayY), True)
++         if self.label and self.showLabel:
++-            dc.DrawText(self.label, self.labelX, self.labelY)
+++            dc.DrawText(self.label, int(self.labelX), int(self.labelY))
++             dc.SetTextForeground(wx.WHITE)
++-            dc.DrawText(self.label, self.labelX-1, self.labelY-1)
+++            dc.DrawText(self.label, int(self.labelX-1), int(self.labelY-1))
++ 
++ 
++     def OnPaint(self, event):
++diff --git a/wx/lib/ticker.py b/wx/lib/ticker.py
++index 04abf0d44..4e684b4cd 100644
++--- a/wx/lib/ticker.py
+++++ b/wx/lib/ticker.py
++@@ -86,7 +86,7 @@ def Stop(self):
++     def Start(self):
++         """Starts the text moving"""
++         if not self.timer.IsRunning():
++-            self.timer.Start(1000 / self._fps)
+++            self.timer.Start(1000 // self._fps)
++ 
++ 
++     def IsTicking(self):
++@@ -208,7 +208,7 @@ def DrawText(self, dc):
++             offx = self._offset - self._extent[0]
++         else:
++             offx = self.GetSize()[0] - self._offset
++-        offy = (self.GetSize()[1] - self._extent[1]) / 2 #centered vertically
+++        offy = (self.GetSize()[1] - self._extent[1]) // 2 #centered vertically
++         dc.DrawText(self._text, offx, offy)
++ 
++ 
+
diff --git a/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
new file mode 100644
index 000000000000..88c3ca189647
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
@@ -0,0 +1,57 @@
+From 1d5fd72dff63d62dd19b77e489d4115245d4d453 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 28 2021 02:58:12 +0000
+Subject: Fix more Python 3.10 issues with AGW FlatNotebook (#2035790)
+
+
+---
+
+diff --git a/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+new file mode 100644
+index 0000000..e8b74ac
+--- /dev/null
++++ b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+@@ -0,0 +1,43 @@
++From aa3dca0e40bd0701e82ce40297a982b5b84844dc Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Mon, 27 Dec 2021 19:48:55 -0500
++Subject: [PATCH] Fix additional Python 3.10 issues with AGW FlatNotebook
++
++---
++ wx/lib/agw/flatnotebook.py | 14 +++++++-------
++ 1 file changed, 7 insertions(+), 7 deletions(-)
++
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index d33f71d51..61bc4efb3 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -925,14 +925,14 @@ def DrawButton(dc, rect, focus, upperTabs):
++ 
++     if focus:
++         if upperTabs:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*8)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*8)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*8))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*8))
++         else:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*5)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*5)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*5))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*5))
++     else:
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 2)))
+++        rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 2)))
++ 
++     # Define the top region
++     top = wx.Rect(rect.GetTopLeft(), rightPt)
++@@ -2766,7 +2766,7 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         if pageTextColour is not None:
++             dc.SetTextForeground(pageTextColour)
++ 
++-        dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset, imageYCoord)
+++        dc.DrawText(pc.GetPageText(tabIdx), int(posx + textOffset), imageYCoord)
++ 
++         # draw 'x' on tab (if enabled)
++         if pc.HasAGWFlag(FNB_X_ON_TAB) and tabIdx == pc.GetSelection():
diff --git a/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
new file mode 100644
index 000000000000..6f21ecb7a718
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
@@ -0,0 +1,52 @@
+Backport https://github.com/wxWidgets/Phoenix/pull/1849
+Regarding segfault as in https://github.com/OSGeo/grass/issues/1123
+
+From 5cace47aaece3cc4f2e6ea97d7fd5bb8ed316ac9 Mon Sep 17 00:00:00 2001
+From: Robin Dunn <robin@alldunn.com>
+Date: Wed, 18 Nov 2020 10:52:53 -0800
+Subject: [PATCH] Restore GIL acquisition in wxPseudoDC::FindObjects*
+
+---
+ src/pseudodc.cpp | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/pseudodc.cpp b/src/pseudodc.cpp
+index 5890ed7e2..ed4bcd06a 100644
+--- a/src/pseudodc.cpp
++++ b/src/pseudodc.cpp
+@@ -483,7 +483,7 @@ bool wxPseudoDC::GetIdGreyedOut(int id)
+ // ----------------------------------------------------------------------------
+ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -501,7 +501,6 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+         }
+         pt = pt->GetNext();
+     }
+-    //wxPyEndBlockThreads(blocked);
+     return pyList;
+ }
+ 
+@@ -511,7 +510,7 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+                                   wxCoord radius, const wxColor& bg)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -611,8 +610,7 @@ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+         maskdc.SelectObject(wxNullBitmap);
+         memdc.SelectObject(wxNullBitmap);
+     }
+-    //wxPyEndBlockThreads(blocked);
+-    return pyList;
++     return pyList;
+ }
+ 
+ // ----------------------------------------------------------------------------
diff --git a/srcpkgs/wxPython4/template b/srcpkgs/wxPython4/template
index 554174105a36..afea1b55bf90 100644
--- a/srcpkgs/wxPython4/template
+++ b/srcpkgs/wxPython4/template
@@ -1,7 +1,7 @@
 # Template file for 'wxPython4'
 pkgname=wxPython4
 version=4.0.7
-revision=4
+revision=5
 wrksrc="wxPython-${version}"
 build_style=python3-module
 make_build_args="--skip-build"
@@ -10,6 +10,7 @@ hostmakedepends="pkg-config python3-setuptools python3-pathlib2"
 makedepends="python3-devel wxWidgets-gtk3-devel SDL2-devel webkit2gtk-devel
  gst-plugins-base1-devel"
 depends="python3 python3-six python3-numpy python3-Pillow"
+checkdepends="python3-six python3-numpy python3-Pillow"
 short_desc="WxWidgets GUI toolkit library (Python3 Bindings)"
 maintainer="Jasper Chan <jasperchan515@gmail.com>"
 license="custom:wxWindows"

From 0587490cae760f23feec81c045ccc5cd5d4dfef8 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 21:56:03 +0100
Subject: [PATCH 10/17] grass: update to 7.8.7RC1; rebuild against libgdal and
 proj

Version 7.8.7RC1 includes a workaround for a wxPython issue
https://github.com/OSGeo/grass/issues/1971#issuecomment-993622613
---
 srcpkgs/grass/patches/musl-build-fix.patch |  13 +++
 srcpkgs/grass/template                     | 128 +++++++++++++++++----
 2 files changed, 120 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..364ee30be4d9
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,13 @@
+error: unknown type name 'int64_t' patch for musl
+
+diff --git a/include/gis.h b/include/gis.h
+--- a/include/gis.h
++++ b/include/gis.h
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ 
+ 
+ /* Grass and local include files */
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..167faa401385 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,116 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.7RC1
+revision=1
+_binversion=${version//./}
+_binversion=${_binversion:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=/usr/lib
+ --bindir=/usr/bin
+ --libdir=/usr/lib
+ --libexec=/usr/libexec
+ --enable-largefile
+ --with-blas
+ --with-blas-includes=/usr/include
+ --with-bzip2
+ --with-bzlib
+ --with-cairo
+ --with-cxx
+ --with-freetype
+ --with-freetype-includes=/usr/include/freetype2
+ --with-gdal
+ --with-geos
+ --with-glw
+ --with-lapack
+ --with-lapack-includes=/usr/include
+ --with-mysql
+ --with-mysql-includes=/usr/include/mysql
+ --with-netcdf=/usr/bin/nc-config
+ --with-nls
+ --with-openmp
+ --with-postgres
+ --with-postgres-includes=/usr/include/postgresql
+ --with-postgres-libs=/usr/lib/psql14/lib/postgresql
+ --with-proj
+ --with-proj-share=/usr/share
+ --with-pthread
+ --with-python=/usr/bin/python3-config
+ --with-readline
+ --with-regex
+ --with-sqlite
+ --with-wxwidgets"
+hostmakedepends="flex
+ gettext
+ libgdal-tools
+ pkg-config
+ python3-numpy
+ python3-six
+ tar"
+makedepends="bison
+ blas-devel
+ bzip2-devel
+ cairo-devel
+ fftw-devel
+ freetype-devel
+ geos-devel
+ gettext-devel
+ glu-devel
+ lapack-devel
+ libgdal-devel
+ libgomp-devel
+ libmysqlclient-devel
+ libpng-devel
+ libzstd-devel
+ netcdf-devel
+ postgresql-libs-devel
+ proj-devel
+ python3-devel
+ python3-Pillow
+ python3-six
+ readline-devel
+ sqlite-devel
+ tiff-devel
+ zlib-devel"
+depends="libgdal python3-numpy wxPython4"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=fa1d6ccc1fde4cbea0be095256729421c41c1a12bf621fe124d0d2c8e826de6a
 nocross="tries to execute target binaries"
 
+shlib_provides="
+ libgrass_dbmibase.${version%.*}.so
+ libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so
+ libgrass_gproj.${version%.*}.so
+ libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so
+ libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass78 \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binversion}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binversion}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binversion}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binversion}.sh
+
+	vinstall grass.pc 644 usr/share/pkgconfig
+	vinstall gui/icons/grass.desktop 644 usr/share/applications
+
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

From d1c1fbd6f8a69f72521b258c83b90dd119548e85 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 11/17] merkaartor: rebuild against libgdal-3.4.1 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 2b9fbba709f9939c027e32061988c0a9ed3f648d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 12/17] OpenOrienteering-Mapper: rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From ba65b0dd83cd965098791ceba5f191a72959638f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 13/17] osg: rebuild against libgdal-3.4.1, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From c7a38b5f77301270c658c21512207cb7b3e03707 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 14/17] sumo: update to 1.9.2; rebuild against libgdal-3.4.1
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index e760fdd45aee..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=4
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From 9036192f680f33fbfe29c9f34989645d1571fc69 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 15/17] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 0f13b3243907019685d7c575fbf62b9873aeb1b1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 16/17] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From bc84e047f4816251cf393bec6944218ff9bd99d0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 17/17] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (34 preceding siblings ...)
  2022-02-15 22:13 ` ar-jan
@ 2022-02-15 22:21 ` ar-jan
  2022-02-15 22:50 ` ar-jan
                   ` (21 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-15 22:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 208438 bytes --]

From 89816b6d8e6ebc3175615d464ca65b6af905cac2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/17] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 0c60260b4642..b0fcfd04926e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From c595ec74f356e0f35d53e59ae1b3b6bae215f6e3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Feb 2022 14:44:54 +0100
Subject: [PATCH 02/17] New package: librttopo-1.1.0

The RT Topology Library exposes an API to create and manage standard
(ISO 13249 aka SQL/MM) topologies using user-provided data stores.

It is needed to build libspatialite (as of v5.0.1) with tests passing.
---
 common/shlibs              |  1 +
 srcpkgs/librttopo-devel    |  1 +
 srcpkgs/librttopo/template | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 120000 srcpkgs/librttopo-devel
 create mode 100644 srcpkgs/librttopo/template

diff --git a/common/shlibs b/common/shlibs
index b0fcfd04926e..734c16281f0e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4110,3 +4110,4 @@ libawt_xawt.so openjdk17-jre-17.0.1+12_1
 libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
+librttopo.so.1 librttopo-1.1.0_1
diff --git a/srcpkgs/librttopo-devel b/srcpkgs/librttopo-devel
new file mode 120000
index 000000000000..acf3607f5fec
--- /dev/null
+++ b/srcpkgs/librttopo-devel
@@ -0,0 +1 @@
+librttopo
\ No newline at end of file
diff --git a/srcpkgs/librttopo/template b/srcpkgs/librttopo/template
new file mode 100644
index 000000000000..b7f6b2a700d6
--- /dev/null
+++ b/srcpkgs/librttopo/template
@@ -0,0 +1,29 @@
+# Template file for 'librttopo'
+pkgname=librttopo
+version=1.1.0
+revision=1
+wrksrc="${pkgname}"
+build_style=gnu-configure
+hostmakedepends="base-devel autoconf-archive"
+makedepends="base-devel autoconf-archive geos-devel"
+short_desc="RT Topology Library exposes an API for managing standard topologies"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://git.osgeo.org/gitea/rttopo/librttopo"
+distfiles="https://git.osgeo.org/gitea/rttopo/librttopo/archive/librttopo-${version}.tar.gz"
+checksum="2e2fcabb48193a712a6c76ac9a9be2a53f82e32f91a2bc834d9f1b4fa9cd879f"
+
+pre_configure() {
+	autoreconf -if
+}
+
+librttopo-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+		vmove usr/lib/pkgconfig
+	}
+}

From 35f72c780a10ad49ea0906e5422e8f35b557a7a1 Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/17] New package: libkml-1.3.0

---
 common/shlibs                          |  6 ++++++
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 ++++++++++++++++
 srcpkgs/libkml/template                | 27 ++++++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/common/shlibs b/common/shlibs
index 734c16281f0e..7cf876600089 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4111,3 +4111,9 @@ libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
 librttopo.so.1 librttopo-1.1.0_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libkmlconvenience.so.1 libkml-1.3.0_1
diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..b67eece4d8ba
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,27 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="boost-devel
+ expat-devel
+ minizip-devel
+ uriparser-devel
+ zlib-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From a29dc0b612b46257c60f4b07bcd29aa1db06a4ea Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Feb 2022 22:46:45 +0100
Subject: [PATCH 04/17] New package: libspatialite-5.0.1

---
 common/shlibs                                 | 11 +++++
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_drop_rename.patch   | 28 +++++++++++++
 .../patches/disable_check_sql_stmt.patch      | 29 +++++++++++++
 srcpkgs/libspatialite/template                | 42 +++++++++++++++++++
 5 files changed, 111 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index 7cf876600089..98a0405d6abb 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4117,3 +4117,14 @@ libkmlengine.so.1 libkml-1.3.0_1
 libkmlregionator.so.1 libkml-1.3.0_1
 libkmlxsd.so.1 libkml-1.3.0_1
 libkmlconvenience.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.1_1
+mod_spatialite.so.7 libspatialite-5.0.1_1
+libgrass_dbmibase.7.8.so grass-7.8.7RC1_1
+libgrass_dbmiclient.7.8.so grass-7.8.7RC1_1
+libgrass_gis.7.8.so grass-7.8.7RC1_1
+libgrass_gproj.7.8.so grass-7.8.7RC1_1
+libgrass_imagery.7.8.so grass-7.8.7RC1_1
+libgrass_raster.7.8.so grass-7.8.7RC1_1
+libgrass_vector.7.8.so grass-7.8.7RC1_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch b/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
new file mode 100644
index 000000000000..30b67f5b8f61
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
@@ -0,0 +1,28 @@
+Disable check_drop_rename test. It fails with:
+RenameTable "table_1" error: RenameTable exception - error in trigger ISO_metadata_reference_row_id_value_insert: no such column: rowid.
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index fec25dd..50b16ae 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -74,7 +74,6 @@ check_PROGRAMS = check_endian \
+ 		check_sequence \
+ 		check_stored_proc \
+ 		check_wms \
+-		check_drop_rename \
+ 		routing_test \
+ 		geojson_test \
+ 		check_zipshp
+diff --git a/test/Makefile.in b/test/Makefile.in
+index 8a0b154..52a1066 100644
+--- a/test/Makefile.in
++++ b/test/Makefile.in
+@@ -124,7 +124,7 @@ check_PROGRAMS = check_endian$(EXEEXT) check_version$(EXEEXT) \
+ 	check_network2d$(EXEEXT) check_network3d$(EXEEXT) \
+ 	check_network_log$(EXEEXT) check_virtualknn$(EXEEXT) \
+ 	check_sequence$(EXEEXT) check_stored_proc$(EXEEXT) \
+-	check_wms$(EXEEXT) check_drop_rename$(EXEEXT) \
++	check_wms$(EXEEXT) \
+ 	routing_test$(EXEEXT) geojson_test$(EXEEXT) \
+ 	check_zipshp$(EXEEXT) $(am__EXEEXT_1)
+ @ENABLE_GEOPACKAGE_TRUE@am__append_1 = \
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch b/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
new file mode 100644
index 000000000000..1dc3b5705955
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
@@ -0,0 +1,29 @@
+Disable check_sql_stmt tests
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..31c10a5577e7
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,42 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.1
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config librttopo geos-devel libxml2"
+makedepends="freexl-devel
+ geos-devel
+ librttopo-devel
+ libxml2-devel
+ minizip-devel
+ proj-devel
+ sqlite-devel
+ zlib-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From dce36a573cc993a5c676eff0461e1c41d1976158 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 05/17] libgdal: update to 3.4.1 and rebuild against proj-7.2.1

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 105 ++++++++++++++++--
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 95 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 98a0405d6abb..5f7e7bac88d3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2510,7 +2510,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..5fca579954fa 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,100 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.1
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libspatialite-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ libkml-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=e360387bc25ec24940f46afbeada48002d72c74aaf9eccf2a40e8d74e711a2e4
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +116,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 344a35c53c44976a98012181cd5693498ae946be Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 06/17] postgis: update to 3.1.5; rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..f52cd6657988 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.1.5
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 22c26580858e041fc6d09726ef254d278b176cad Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 07/17] postgis-postgresql13: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..a0f5c89ef4da 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
-revision=2
+version=3.1.5
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 688a85220609f57b0f3ec2847804e738ee86f66a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 08/17] postgis-postgresql14: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..ad8d0c5c4253 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.1.5
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From b38ecca63aa982f7316ed93f2329501771c04ddf Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 9 Aug 2021 19:53:17 +0200
Subject: [PATCH 09/17] wxPython4: backport patches, and fix tests

Backported patches:
- wxPseudoDC GIL
- Python 3.10 AGW FlatNotebook patch
- Python 3.10 ScrolledWindow argument types
- Python 3.10 Integer division
- wx.WindowID and wx.Region arguments
---
 .../patches/0002-Python-3.10-issues.patch     | 3317 +++++++++++++++++
 .../0003-Python-3.10-AGW-FlatNotebook.patch   |   57 +
 .../patches/restore-gil-pseudodc.patch        |   52 +
 srcpkgs/wxPython4/template                    |    3 +-
 4 files changed, 3428 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
 create mode 100644 srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
 create mode 100644 srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch

diff --git a/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
new file mode 100644
index 000000000000..6c87ff967d01
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
@@ -0,0 +1,3317 @@
+From f55a17c2d3b336c82fb44f7816ec63219847f4cc Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 22 2021 20:23:54 +0000
+Subject: Fix a bunch of Python 3.10 issues
+
+
+---
+
+diff --git a/0d449626d6d298ad96ebd1d514d0e42833bce470.patch b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+new file mode 100644
+index 0000000..d2ccddc
+--- /dev/null
++++ b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+@@ -0,0 +1,22 @@
++From 0d449626d6d298ad96ebd1d514d0e42833bce470 Mon Sep 17 00:00:00 2001
++From: Carolina Feher da Silva <carolfsu@gmail.com>
++Date: Tue, 16 Nov 2021 01:24:31 +0000
++Subject: [PATCH] Fixed integer division in Python 3
++
++---
++ wx/lib/stattext.py | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/wx/lib/stattext.py b/wx/lib/stattext.py
++index 2cfb6e65a..e606e5a89 100644
++--- a/wx/lib/stattext.py
+++++ b/wx/lib/stattext.py
++@@ -302,7 +302,7 @@ def OnPaint(self, event):
++             if style & wx.ALIGN_RIGHT:
++                 x = width - w
++             if style & wx.ALIGN_CENTER:
++-                x = (width - w)/2
+++                x = (width - w)//2
++             dc.DrawText(line, x, y)
++             y += h
++ 
+diff --git a/3eb9eb32dc3285435039f6c420c398665372a1ad.patch b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+new file mode 100644
+index 0000000..08e58a0
+--- /dev/null
++++ b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+@@ -0,0 +1,84 @@
++From 3eb9eb32dc3285435039f6c420c398665372a1ad Mon Sep 17 00:00:00 2001
++From: Glen Whitney <glen@studioinfinity.org>
++Date: Tue, 31 Aug 2021 11:06:27 -0700
++Subject: [PATCH] fix: Correct types of arguments to
++ ScrolledWindow.SetScrollbars
++
++---
++ demo/Mask.py                   |  2 +-
++ demo/OGL.py                    |  2 +-
++ wx/lib/agw/ultimatelistctrl.py | 14 +++++++-------
++ 3 files changed, 9 insertions(+), 9 deletions(-)
++
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 5f0c2cdde..109b8f30b 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -56,7 +56,7 @@ def __init__(self, parent):
++         mask = wx.Mask(self.bmp_withcolourmask, wx.WHITE)
++         self.bmp_withcolourmask.SetMask(mask)
++ 
++-        self.SetScrollbars(20, 20, 700/20, 460/20)
+++        self.SetScrollbars(20, 20, 700//20, 460//20)
++ 
++         self.Bind(wx.EVT_PAINT, self.OnPaint)
++ 
++diff --git a/demo/OGL.py b/demo/OGL.py
++index 72ca543dd..d475e5011 100644
++--- a/demo/OGL.py
+++++ b/demo/OGL.py
++@@ -272,7 +272,7 @@ def __init__(self, parent, log, frame):
++ 
++         maxWidth  = 1000
++         maxHeight = 1000
++-        self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
+++        self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
++ 
++         self.log = log
++         self.frame = frame
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index c60867684..14fc41f86 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -9654,8 +9654,8 @@ def RecalculatePositions(self, noRefresh=False):
++                 self._linesPerPage = clientHeight//lineHeight
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + lineHeight - 1)/lineHeight,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + lineHeight - 1)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9676,8 +9676,8 @@ def RecalculatePositions(self, noRefresh=False):
++                     decrement = SCROLL_UNIT_X
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + SCROLL_UNIT_Y - 1)/SCROLL_UNIT_Y,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + SCROLL_UNIT_Y - 1)//SCROLL_UNIT_Y,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9728,8 +9728,8 @@ def RecalculatePositions(self, noRefresh=False):
++                         line._gi.ExtendWidth(widthMax)
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (x + SCROLL_UNIT_X)/SCROLL_UNIT_X,
++-                                   (y + lineHeight)/lineHeight,
+++                                   (x + SCROLL_UNIT_X)//SCROLL_UNIT_X,
+++                                   (y + lineHeight)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9797,7 +9797,7 @@ def RecalculatePositions(self, noRefresh=False):
++                             break  # Everything fits, no second try required.
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (entireWidth + SCROLL_UNIT_X)/SCROLL_UNIT_X,
+++                                   (entireWidth + SCROLL_UNIT_X)//SCROLL_UNIT_X,
++                                    0,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    0,
+diff --git a/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+new file mode 100644
+index 0000000..f0b9f5d
+--- /dev/null
++++ b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+@@ -0,0 +1,143 @@
++From 9096426603272672d9a676e8bcdcadf0a1cfa1a2 Mon Sep 17 00:00:00 2001
++From: Robin Dunn <robin@alldunn.com>
++Date: Wed, 26 Feb 2020 11:10:27 -0800
++Subject: [PATCH] Add __index__ to wx.WindowID, and __bool__ to wx.Region
++
++---
++ etg/region.py              |  5 +++--
++ etg/windowid.py            | 32 +++++++++++++++++---------------
++ unittests/test_windowid.py | 23 +++++++++++++++++++++--
++ 3 files changed, 41 insertions(+), 19 deletions(-)
++
++diff --git a/etg/region.py b/etg/region.py
++index 0982c1fe5..d5bc45759 100644
++--- a/etg/region.py
+++++ b/etg/region.py
++@@ -88,11 +88,12 @@ def next(self):
++     c.mustHaveApp()
++     c.find('operator++').ignore()
++ 
++-    # SIP maps operator bool() to __int__, but Classic used __nonzero__. Does
++-    # it make any difference either way?
++     c.find('operator bool').ignore()
++     c.addCppMethod('int', '__nonzero__', '()', 'return (int)self->operator bool();',
++                    'Returns true while there are still rectangles available in the iteration.')
+++    c.addCppMethod('int', '__bool__', '()', 'return (int)self->operator bool();',
+++                   'Returns true while there are still rectangles available in the iteration.')
+++
++ 
++     c.addCppMethod('void', 'Next', '()', 'self->operator++();',
++                    'Move the iterator to the next rectangle in the region.')
++diff --git a/etg/windowid.py b/etg/windowid.py
++index 27b041b3d..da2ed395e 100644
++--- a/etg/windowid.py
+++++ b/etg/windowid.py
++@@ -53,12 +53,12 @@ def run():
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Create reference from an ID',
++                     items=[ ParamDef(type='int', name='id') ]),
++-                
+++
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Copy an ID reference',
++                     items=[ ParamDef(type='const wxWindowIDRef&', name='idref') ]),
++                 ]),
++-            
+++
++             MethodDef(name='~wxWindowIDRef', className='wxWindowIDRef', isDtor=True),
++ 
++             MethodDef(type='int', name='GetValue',
++@@ -73,11 +73,13 @@ def run():
++             """)
++ 
++     klass.addCppMethod('int', '__int__', '()',
++-        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or etc.",
++-        body="""\
++-            return self->GetValue();
++-            """)
++-    
+++        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or other places an integer type is needed.",
+++        body="return self->GetValue();")
+++    klass.addCppMethod('int', '__index__', '()',
+++        doc="See :meth:`__int__`",
+++        body="return self->GetValue();")
+++
+++
++     klass.addCppMethod('bool', '__eq__', '(wxWindowID id)', "return self->GetValue() == id;")
++     klass.addCppMethod('bool', '__ne__', '(wxWindowID id)', "return self->GetValue() != id;")
++     klass.addCppMethod('bool', '__lt__', '(wxWindowID id)', "return self->GetValue() < id;")
++@@ -92,17 +94,17 @@ def run():
++     # and finish it up by adding it to the module
++     module.addItem(klass)
++ 
++-    # Now, let's add a new Python function to the global scope that reserves an 
++-    # ID (or range) and returns a ref object for it. 
++-    module.addPyFunction('NewIdRef', '(count=1)', 
+++    # Now, let's add a new Python function to the global scope that reserves an
+++    # ID (or range) and returns a ref object for it.
+++    module.addPyFunction('NewIdRef', '(count=1)',
++         doc="""\
++-            Reserves a new Window ID (or range of WindowIDs) and returns a 
++-            :class:`wx.WindowIDRef` object (or list of them) that will help 
+++            Reserves a new Window ID (or range of WindowIDs) and returns a
+++            :class:`wx.WindowIDRef` object (or list of them) that will help
++             manage the reservation of that ID.
++ 
++-            This function is intended to be a drop-in replacement of the old 
++-            and deprecated :func:`wx.NewId` function, with the added benefit 
++-            that the ID should never conflict with an in-use ID or other IDs 
+++            This function is intended to be a drop-in replacement of the old
+++            and deprecated :func:`wx.NewId` function, with the added benefit
+++            that the ID should never conflict with an in-use ID or other IDs
++             generated by this function.
++             """,
++         body="""\
++diff --git a/unittests/test_windowid.py b/unittests/test_windowid.py
++index 4593e5a69..fc36c9eb8 100644
++--- a/unittests/test_windowid.py
+++++ b/unittests/test_windowid.py
++@@ -31,9 +31,9 @@ def test_newIdRef02(self):
++     def test_newIdRef03(self):
++         """Check that Auto ID Management is enabled (--enable-autoidman)"""
++         # This test is expected to fail if autoID mangagement is turned on
++-        # because a reference to the ID is not being saved, so it will be 
+++        # because a reference to the ID is not being saved, so it will be
++         # unreserved when the first widget is destroyed.
++-        
+++
++         id = wx.Window.NewControlId()
++         b = wx.Button(self.frame, id, 'button')
++         b.Destroy()
++@@ -75,6 +75,7 @@ def test_WindowIDRef01(self):
++         val = ref1 <= ref2
++         assert type(val) == bool
++ 
+++
++     def test_WindowIDRef02(self):
++         d = {wx.NewIdRef(): 'one',
++              wx.NewIdRef(): 'two'}
++@@ -82,6 +83,24 @@ def test_WindowIDRef02(self):
++         for k in keys:
++             val = d[k]
++ 
+++
+++    def test_WindowIDRef03(self):
+++        # Ensure wx.WindowIDRef can be converted to int without warning when
+++        # making a call to warrped method. In Py3.8+ this means there needs to
+++        # be an __index__ method.
+++
+++        # Turn warnings into exceptions so this test will fail if there is
+++        # a warning
+++        import warnings
+++        warnings.simplefilter('error')
+++
+++        wid = wx.NewIdRef()
+++        assert isinstance(wid, wx.WindowIDRef)
+++
+++        b = wx.Button(self.frame, wid, 'button')
+++        assert b.GetId() == wid.GetId()
+++
+++
++ #---------------------------------------------------------------------------
++ 
++ 
+ 
+diff --git a/python3.10-fixes.patch b/python3.10-fixes.patch
+new file mode 100644
+index 0000000..29e8c61
+--- /dev/null
++++ b/python3.10-fixes.patch
+@@ -0,0 +1,3034 @@
++From 173d0796810bb65de9bdfdc6941d24a04628f6c2 Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Wed, 1 Dec 2021 14:19:00 -0500
++Subject: [PATCH] Fix a bunch of Python 3.10 issues with pure-Python classes
++ and demos
++
++In Python 3.10, a change[1] was implemented where extension functions
++that take integer arguments will no longer silently accept non-integer
++arguments (e.g., floats) that can only be converted to integers with a
++loss of precision.  This PR fixes most of these issues in the pure-Python
++classes and demos by explicitly converting the parameters to int before
++passing them to wxWidgets.  There is loss of precision, but this was
++happening before (automatically) anyway as most wxWidgets DeviceContext
++functions operate using integers.
++
++Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
++too small on GTK3.
++
++This is an example of the relevant exception:
++Traceback (most recent call last):
++  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
++    r.width = w
++TypeError: 'float' object cannot be interpreted as an integer
++
++Fixes #2038.
++
++[1] https://bugs.python.org/issue37999
++---
++ demo/GridLabelRenderer.py               |   4 +-
++ demo/Mask.py                            |   4 +-
++ demo/Overlay.py                         |   1 -
++ demo/PenAndBrushStyles.py               |   2 +-
++ demo/PopupWindow.py                     |   2 +-
++ demo/PrintFramework.py                  |   2 +-
++ demo/PropertyGrid.py                    |   2 +-
++ demo/Sizers.py                          |   2 +-
++ demo/UIActionSimulator.py               |   2 +-
++ demo/agw/AUI.py                         |  32 +++----
++ demo/agw/MacLargeDemo.py                |   4 +-
++ demo/agw/PeakMeter.py                   |   6 +-
++ demo/agw/PersistentControls.py          |   2 +-
++ demo/agw/RibbonBar.py                   |   2 +-
++ demo/agw/SpeedMeter.py                  |   2 +-
++ demo/agw/SuperToolTip.py                |   3 +-
++ demo/agw/ThumbDemoConfig.py             |   1 +
++ demo/agw/UltimateReportDemo.py          |   8 +-
++ demo/agw/Windows7Explorer_Contents.py   |  16 ++--
++ demo/agw/ZoomBar.py                     |   2 +-
++ wx/lib/agw/advancedsplash.py            |   2 +-
++ wx/lib/agw/aui/aui_utilities.py         |   4 +-
++ wx/lib/agw/aui/auibook.py               |   4 +-
++ wx/lib/agw/balloontip.py                |   4 +-
++ wx/lib/agw/flatmenu.py                  |  62 ++++++-------
++ wx/lib/agw/flatnotebook.py              |  10 +--
++ wx/lib/agw/floatspin.py                 |   2 +-
++ wx/lib/agw/gradientbutton.py            |   8 +-
++ wx/lib/agw/hypertreelist.py             |   2 +-
++ wx/lib/agw/knobctrl.py                  |  12 +--
++ wx/lib/agw/labelbook.py                 |  32 +++----
++ wx/lib/agw/peakmeter.py                 |   2 +-
++ wx/lib/agw/pygauge.py                   |   4 +-
++ wx/lib/agw/ribbon/art_aui.py            |  22 ++---
++ wx/lib/agw/ribbon/art_internal.py       |  12 +--
++ wx/lib/agw/ribbon/art_msw.py            |  88 +++++++++----------
++ wx/lib/agw/ribbon/bar.py                |   4 +-
++ wx/lib/agw/ribbon/buttonbar.py          |   6 +-
++ wx/lib/agw/ribbon/gallery.py            |   8 +-
++ wx/lib/agw/ribbon/panel.py              |  16 ++--
++ wx/lib/agw/ribbon/toolbar.py            |   2 +-
++ wx/lib/agw/scrolledthumbnail.py         |  24 +++---
++ wx/lib/agw/shapedbutton.py              |  10 +--
++ wx/lib/agw/speedmeter.py                |  72 +++++++++-------
++ wx/lib/agw/supertooltip.py              |  20 ++---
++ wx/lib/agw/toasterbox.py                |   4 +-
++ wx/lib/agw/ultimatelistctrl.py          |  20 ++---
++ wx/lib/agw/xlsgrid.py                   |   4 +-
++ wx/lib/agw/zoombar.py                   |  10 +--
++ wx/lib/analogclock/analogclock.py       |   2 +-
++ wx/lib/analogclock/helpers.py           |  22 ++---
++ wx/lib/analogclock/setup.py             |   6 +-
++ wx/lib/buttons.py                       |  10 +--
++ wx/lib/colourchooser/pycolourchooser.py |   4 +-
++ wx/lib/colourchooser/pypalette.py       |   2 +-
++ wx/lib/floatcanvas/FCObjects.py         |   8 +-
++ wx/lib/gizmos/ledctrl.py                |   8 +-
++ wx/lib/imagebrowser.py                  |   4 +-
++ wx/lib/ogl/basic.py                     |  10 +--
++ wx/lib/ogl/bmpshape.py                  |   2 +-
++ wx/lib/ogl/composit.py                  |   4 +-
++ wx/lib/ogl/divided.py                   |   2 +-
++ wx/lib/ogl/lines.py                     |   2 +-
++ wx/lib/ogl/oglmisc.py                   |   4 +-
++ wx/lib/plot/examples/demo.py            |   4 +-
++ wx/lib/plot/plotcanvas.py               | 110 ++++++++++++------------
++ wx/lib/plot/polyobjects.py              |  22 +++--
++ wx/lib/popupctl.py                      |   2 +-
++ wx/lib/scrolledpanel.py                 |   2 +-
++ wx/lib/throbber.py                      |   6 +-
++ wx/lib/ticker.py                        |   4 +-
++ 71 files changed, 411 insertions(+), 398 deletions(-)
++
++diff --git a/demo/GridLabelRenderer.py b/demo/GridLabelRenderer.py
++index 794dd64e8..1440ef41b 100644
++--- a/demo/GridLabelRenderer.py
+++++ b/demo/GridLabelRenderer.py
++@@ -46,8 +46,8 @@ def __init__(self):
++         self._bmp = images.Smiles.GetBitmap()
++ 
++     def Draw(self, grid, dc, rect, rc):
++-        x = rect.left + (rect.width - self._bmp.GetWidth()) / 2
++-        y = rect.top + (rect.height - self._bmp.GetHeight()) / 2
+++        x = rect.left + (rect.width - self._bmp.GetWidth()) // 2
+++        y = rect.top + (rect.height - self._bmp.GetHeight()) // 2
++         dc.DrawBitmap(self._bmp, x, y, True)
++ 
++ 
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 109b8f30b..e924f95b9 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -90,9 +90,9 @@ def OnPaint (self, e):
++ 
++         for text, code in logicList:
++             x,y = 120+150*(i%4), 20+100*(i/4)
++-            dc.DrawText(text, x, y-20)
+++            dc.DrawText(text, x, int(y-20))
++             mdc.SelectObject(self.bmp_withcolourmask)
++-            dc.Blit(x,y, cx,cy, mdc, 0,0, code, True)
+++            dc.Blit(x,int(y), cx,cy, mdc, 0,0, code, True)
++             i = i + 1
++ 
++ 
++diff --git a/demo/Overlay.py b/demo/Overlay.py
++index 65164cd84..fa65be003 100644
++--- a/demo/Overlay.py
+++++ b/demo/Overlay.py
++@@ -56,7 +56,6 @@ def __init__(self, parent, log):
++         self.penstylesCombo.SetToolTip('Pen Style')
++ 
++         self.overlayPenWidth = wx.SpinCtrl(self, -1, value='',
++-                                           size=(75, -1),
++                                            style=wx.SP_ARROW_KEYS,
++                                            min=1, max=24, initial=1)
++         self.overlayPenWidth.SetToolTip('Pen Width')
++diff --git a/demo/PenAndBrushStyles.py b/demo/PenAndBrushStyles.py
++index 24040b1fc..1183f684a 100644
++--- a/demo/PenAndBrushStyles.py
+++++ b/demo/PenAndBrushStyles.py
++@@ -100,7 +100,7 @@ def OnPaint(self, event):
++ 
++         dc.SetPen(pen)
++         y = labelHeight + (height - labelHeight)/2
++-        dc.DrawLine(5, y, width-5, y)
+++        dc.DrawLine(5, int(y), width-5, int(y))
++ 
++ 
++ class BrushPanel(BasePanel):
++diff --git a/demo/PopupWindow.py b/demo/PopupWindow.py
++index d8e175576..b54b9870d 100644
++--- a/demo/PopupWindow.py
+++++ b/demo/PopupWindow.py
++@@ -89,7 +89,7 @@ def __init__(self, parent, style, log):
++                           "(or its first child) loses focus in \n"
++                           "any other way.")
++         btn = wx.Button(panel, -1, "Press Me")
++-        spin = wx.SpinCtrl(panel, -1, "Hello", size=(100,-1))
+++        spin = wx.SpinCtrl(panel, -1, "Hello")
++         btn.Bind(wx.EVT_BUTTON, self.OnButton)
++ 
++         sizer = wx.BoxSizer(wx.VERTICAL)
++diff --git a/demo/PrintFramework.py b/demo/PrintFramework.py
++index e7a29a077..f0873ae94 100644
++--- a/demo/PrintFramework.py
+++++ b/demo/PrintFramework.py
++@@ -81,7 +81,7 @@ def OnPrintPage(self, page):
++ 
++         #-------------------------------------------
++         self.canvas.DoDrawing(dc, True)
++-        dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
+++        dc.DrawText("Page: %d" % page, marginX//2, maxY-marginY)
++ 
++         return True
++ 
++diff --git a/demo/PropertyGrid.py b/demo/PropertyGrid.py
++index c56e08b60..fbef29e31 100644
++--- a/demo/PropertyGrid.py
+++++ b/demo/PropertyGrid.py
++@@ -150,7 +150,7 @@ def _ConvertValue(self, value):
++         """ Utility convert arbitrary value to a real wx.Size.
++         """
++         import collections
++-        if isinstance(value, collections.Sequence) or hasattr(value, '__getitem__'):
+++        if isinstance(value, collections.abc.Sequence) or hasattr(value, '__getitem__'):
++             value = wx.Size(*value)
++         return value
++ 
++diff --git a/demo/Sizers.py b/demo/Sizers.py
++index 6ababede9..a025050f1 100644
++--- a/demo/Sizers.py
+++++ b/demo/Sizers.py
++@@ -45,7 +45,7 @@ def OnPaint(self, evt):
++         dc = wx.PaintDC(self)
++         w,h = dc.GetTextExtent(self.text)
++         dc.Clear()
++-        dc.DrawText(self.text, (sz.width-w)/2, (sz.height-h)/2)
+++        dc.DrawText(self.text, (sz.width-w)//2, (sz.height-h)//2)
++ 
++     def OnSize(self, evt):
++         self.Refresh()
++diff --git a/demo/UIActionSimulator.py b/demo/UIActionSimulator.py
++index cbba14f5c..0a6fd0234 100644
++--- a/demo/UIActionSimulator.py
+++++ b/demo/UIActionSimulator.py
++@@ -88,7 +88,7 @@ def _playbackKey(self, evtType, key, modifiers):
++ 
++     def _setNextKeyEvent(self):
++         evtType, key, modifiers, milli = self._playbackEvents.pop(0)
++-        milli = max(milli/2, 1) # play back faster than it was recorded
+++        milli = max(milli//2, 1) # play back faster than it was recorded
++         print(evtType, key, modifiers, milli)
++         wx.CallLater(milli, self._playbackKey, evtType, key, modifiers)
++ 
++diff --git a/demo/agw/AUI.py b/demo/agw/AUI.py
++index 7c2196865..b38313c86 100644
++--- a/demo/agw/AUI.py
+++++ b/demo/agw/AUI.py
++@@ -393,7 +393,7 @@ def OnPaint(self, event):
++         dc.SetPen(wx.LIGHT_GREY_PEN)
++         dc.DrawLine(0, 0, size.x, size.y)
++         dc.DrawLine(0, size.y, size.x, 0)
++-        dc.DrawText(s, (size.x-w)/2, (size.y-height*5)/2)
+++        dc.DrawText(s, (size.x-w)//2, (size.y-height*5)//2)
++ 
++         if self._mgr:
++ 
++@@ -401,19 +401,19 @@ def OnPaint(self, event):
++ 
++             s = "Layer: %d"%pi.dock_layer
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*1))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*1))
++ 
++             s = "Dock: %d Row: %d"%(pi.dock_direction, pi.dock_row)
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*2))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*2))
++ 
++             s = "Position: %d"%pi.dock_pos
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*3))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*3))
++ 
++             s = "Proportion: %d"%pi.dock_proportion
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*4))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*4))
++ 
++ 
++     def OnEraseBackground(self, event):
++@@ -435,7 +435,7 @@ def __init__(self, parent, frame):
++ 
++         s1 = wx.BoxSizer(wx.HORIZONTAL)
++         self._border_size = wx.SpinCtrl(self, ID_PaneBorderSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE),
++-                                        wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100,
+++                                        wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100,
++                                         frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE))
++         s1.Add((1, 1), 1, wx.EXPAND)
++         s1.Add(wx.StaticText(self, -1, "Pane Border Size:"))
++@@ -445,7 +445,7 @@ def __init__(self, parent, frame):
++ 
++         s2 = wx.BoxSizer(wx.HORIZONTAL)
++         self._sash_size = wx.SpinCtrl(self, ID_SashSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE), wx.DefaultPosition,
++-                                      wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
+++                                      wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
++         s2.Add((1, 1), 1, wx.EXPAND)
++         s2.Add(wx.StaticText(self, -1, "Sash Size:"))
++         s2.Add(self._sash_size)
++@@ -454,7 +454,7 @@ def __init__(self, parent, frame):
++ 
++         s3 = wx.BoxSizer(wx.HORIZONTAL)
++         self._caption_size = wx.SpinCtrl(self, ID_CaptionSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE),
++-                                         wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
+++                                         wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
++         s3.Add((1, 1), 1, wx.EXPAND)
++         s3.Add(wx.StaticText(self, -1, "Caption Size:"))
++         s3.Add(self._caption_size)
++@@ -807,9 +807,9 @@ def LightColour(self, colour, percent):
++ 
++         # We take the percent way of the colour from colour -> white
++         i = percent
++-        r = colour.Red() + ((i*rd*100)/high)/100
++-        g = colour.Green() + ((i*gd*100)/high)/100
++-        b = colour.Blue() + ((i*bd*100)/high)/100
+++        r = colour.Red() + ((i*rd*100)//high)//100
+++        g = colour.Green() + ((i*gd*100)//high)//100
+++        b = colour.Blue() + ((i*bd*100)//high)//100
++ 
++         return wx.Colour(r, g, b)
++ 
++@@ -826,10 +826,10 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++         x, y, width, height = clientRect
++         x, width = self._pos, interval
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2)
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2)
++         topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-        rc1 = wx.Rect(x, y, width, height/2)
+++        rc1 = wx.Rect(int(x), y, int(width), height//2)
++         path1 = self.GetPath(gc, rc1, 8)
++         br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++         gc.SetBrush(br1)
++@@ -845,14 +845,14 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++ 
++         bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-        rc3 = wx.Rect(x, y+height/2, width, height/2)
+++        rc3 = wx.Rect(int(x), y+height//2, int(width), height//2)
++         path3 = self.GetPath(gc, rc3, 8)
++         br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++         gc.SetBrush(br3)
++         gc.FillPath(path3) #draw main
++ 
++         path4 = gc.CreatePath()
++-        path4.AddRectangle(x, y+height/2, width, 8)
+++        path4.AddRectangle(x, y+height//2, width, 8)
++         path4.CloseSubpath()
++         gc.SetBrush(br3)
++         gc.FillPath(path4)
++@@ -2613,7 +2613,7 @@ def CreateNotebook(self):
++         flex.Add(wx.TextCtrl(panel, -1, "", wx.DefaultPosition, wx.Size(100, -1)),
++                  1, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add(wx.StaticText(panel, -1, "wxSpinCtrl:"), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++-        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.Size(100, -1),
+++        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.DefaultSize,
++                              wx.SP_ARROW_KEYS, 5, 50, 5), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add((5, 5))
++         flex.Add((5, 5))
++diff --git a/demo/agw/MacLargeDemo.py b/demo/agw/MacLargeDemo.py
++index 4d967a546..a5b8a0e25 100644
++--- a/demo/agw/MacLargeDemo.py
+++++ b/demo/agw/MacLargeDemo.py
++@@ -223,12 +223,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = int((w * percent)/100)
++ 
++         if w < 1:
++             return
++diff --git a/demo/agw/PeakMeter.py b/demo/agw/PeakMeter.py
++index a7c9a6f51..e9dab7116 100644
++--- a/demo/agw/PeakMeter.py
+++++ b/demo/agw/PeakMeter.py
++@@ -149,10 +149,10 @@ def OnFalloff(self, event):
++ 
++     def OnStart(self, event):
++ 
++-        self.timer.Start(1000/2)        # 2 fps
+++        self.timer.Start(1000//2)        # 2 fps
++ 
++-        self.vertPeak.Start(1000/18)        # 18 fps
++-        self.horzPeak.Start(1000/20)        # 20 fps
+++        self.vertPeak.Start(1000//18)        # 18 fps
+++        self.horzPeak.Start(1000//20)        # 20 fps
++ 
++ 
++     def OnStop(self, event):
++diff --git a/demo/agw/PersistentControls.py b/demo/agw/PersistentControls.py
++index f19cc4a91..cf97dd9f0 100644
++--- a/demo/agw/PersistentControls.py
+++++ b/demo/agw/PersistentControls.py
++@@ -234,7 +234,7 @@ def BuildPanes(self):
++         sizer_1.Add(label_1, 0, wx.ALL, 5)
++         sizer_1.Add(combo, 0, wx.LEFT|wx.RIGHT, 5)
++         sizer_1.Add((20, 20), 1)
++-        box2.Add(sizer_1, 1, wx.EXPAND|wx.ALIGN_CENTER, 0)
+++        box2.Add(sizer_1, 1, wx.EXPAND, 0)
++         box2.Add((0, 0), 1, 1)
++ 
++         otherPanel.SetSizer(box2)
++diff --git a/demo/agw/RibbonBar.py b/demo/agw/RibbonBar.py
++index 7103e9d81..d28a2c66a 100644
++--- a/demo/agw/RibbonBar.py
+++++ b/demo/agw/RibbonBar.py
++@@ -799,7 +799,7 @@ def AddColourToGallery(self, gallery, colour, dc, value=None):
++                                        (c.Blue() + 192) % 256)
++ 
++             dc.SetTextForeground(foreground)
++-            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) / 2, (iHeight - size.GetHeight()) / 2)
+++            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) // 2, (iHeight - size.GetHeight()) // 2)
++             dc.SelectObjectAsSource(wx.NullBitmap)
++ 
++             item = gallery.Append(bitmap, wx.ID_ANY)
++diff --git a/demo/agw/SpeedMeter.py b/demo/agw/SpeedMeter.py
++index 9f0fdebb2..575e84a80 100644
++--- a/demo/agw/SpeedMeter.py
+++++ b/demo/agw/SpeedMeter.py
++@@ -418,7 +418,7 @@ def __init__(self, parent, log):
++         bsizer3 = wx.BoxSizer(wx.VERTICAL)
++ 
++         hsizer3 = wx.BoxSizer(wx.HORIZONTAL)
++-        sc = wx.SpinCtrl(panel3, -1, size=(60,20))
+++        sc = wx.SpinCtrl(panel3, -1)
++         sc.SetRange(1, 250)
++         sc.SetValue(50)
++ 
++diff --git a/demo/agw/SuperToolTip.py b/demo/agw/SuperToolTip.py
++index 5e65f06b1..88728e54e 100644
++--- a/demo/agw/SuperToolTip.py
+++++ b/demo/agw/SuperToolTip.py
++@@ -43,7 +43,7 @@ def __init__(self, parent):
++         self.topColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.WHITE)
++         system = wx.SystemSettings.GetColour(wx.SYS_COLOUR_ACTIVECAPTION)
++         r, g, b, a = system
++-        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)/2, (255-g)/2, (255-b)/2))
+++        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)//2, (255-g)//2, (255-b)//2))
++         self.bottomColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=system)
++         self.headerCheck = wx.CheckBox(self.mainPanel, -1, "Show Header")
++         self.headerText = wx.TextCtrl(self.mainPanel, -1, "Merge And Center")
++@@ -233,7 +233,6 @@ def DoLayout(self):
++         frameSizer.Add(self.mainPanel, 1, wx.EXPAND, 0)
++         self.SetSizer(frameSizer)
++         frameSizer.Layout()
++-        frameSizer.Fit(self)
++         self.Layout()
++ 
++         wx.CallAfter(mainSizer.Layout)
++diff --git a/demo/agw/UltimateReportDemo.py b/demo/agw/UltimateReportDemo.py
++index 40f49cb8f..ad455847b 100644
++--- a/demo/agw/UltimateReportDemo.py
+++++ b/demo/agw/UltimateReportDemo.py
++@@ -216,7 +216,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         mdc.SetFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
++         text = "%d Mb"%self.progressValue
++         textWidth, dummy = mdc.GetTextExtent(text)
++-        mdc.DrawText(text, rect.width/2 - textWidth/2, rect.height/2 - dummy/2)
+++        mdc.DrawText(text, rect.width//2 - textWidth//2, rect.height//2 - dummy//2)
++         dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
++         dc.Blit(rect.x+3, rect.y, rect.width-6, rect.height, mdc, 0, 0)
++         dc.DestroyClippingRegion()
++@@ -279,12 +279,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = (w * percent)//100
++ 
++         if middle == 0: # not started
++             bitmap = self.REMAINING_BITMAP.GetSubBitmap((1, 0, w, PIPE_HEIGHT))
++@@ -335,7 +335,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         colours = [wx.RED, wx.WHITE, wx.GREEN, wx.Colour("SKY BLUE")]
++         w, h = dc.GetTextExtent("Hg")
++         x = rect.x + 1
++-        y = rect.y + rect.height/2 - h/2
+++        y = rect.y + rect.height//2 - h//2
++ 
++         for ch in self.text:
++             dc.SetTextForeground(random.choice(colours))
++diff --git a/demo/agw/Windows7Explorer_Contents.py b/demo/agw/Windows7Explorer_Contents.py
++index f754d7879..b23df0e1a 100644
++--- a/demo/agw/Windows7Explorer_Contents.py
+++++ b/demo/agw/Windows7Explorer_Contents.py
++@@ -127,13 +127,13 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         """Draw a custom progress bar using double buffering to prevent flicker"""
++ 
++         bmpWidth, bmpHeight = self.icon.GetWidth(), self.icon.GetHeight()
++-        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)/2)
+++        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)//2)
++ 
++         dc.SetFont(self.normalFont)
++ 
++         textWidth, textHeight = dc.GetTextExtent(self.text)
++         dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
++-        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.description:
++             return
++@@ -144,10 +144,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Type: " + self.description)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++@@ -207,10 +207,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Date modified: " + date)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.size:
++             return
++@@ -218,10 +218,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         dummy1, dummy2= dc.GetTextExtent("Size: ")
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++diff --git a/demo/agw/ZoomBar.py b/demo/agw/ZoomBar.py
++index 376ce349b..14b0278e7 100644
++--- a/demo/agw/ZoomBar.py
+++++ b/demo/agw/ZoomBar.py
++@@ -55,7 +55,7 @@ def __init__(self, parent, log):
++         reflections = glob.glob(bitmapDir + "/*96Flip40.png")
++ 
++         separatorImage = bitmapDir + "/separator.gif"
++-        separatorReflection = bitmapDir + "/separatorFlip.png"
+++        separatorReflection = bitmapDir + "/separatorflip.png"
++         count = 0
++ 
++         for std, ref in zip(standard, reflections):
++diff --git a/wx/lib/agw/advancedsplash.py b/wx/lib/agw/advancedsplash.py
++index 1f8c32df5..d351ea06e 100644
++--- a/wx/lib/agw/advancedsplash.py
+++++ b/wx/lib/agw/advancedsplash.py
++@@ -438,7 +438,7 @@ def SetTextFont(self, font=None):
++ 
++         if font is None:
++             self._textfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._textsize = 10.0
+++            self._textsize = 10
++             self._textfont.SetPointSize(self._textsize)
++         else:
++             self._textfont = font
++diff --git a/wx/lib/agw/aui/auibook.py b/wx/lib/agw/aui/auibook.py
++index ba7cf4721..f5ad2a568 100644
++--- a/wx/lib/agw/aui/auibook.py
+++++ b/wx/lib/agw/aui/auibook.py
++@@ -3452,8 +3452,8 @@ def CalculateNewSplitSize(self):
++         # should happen around the middle
++         if tab_ctrl_count < 2:
++             new_split_size = self.GetClientSize()
++-            new_split_size.x /= 2
++-            new_split_size.y /= 2
+++            new_split_size.x //= 2
+++            new_split_size.y //= 2
++ 
++         else:
++ 
++diff --git a/wx/lib/agw/balloontip.py b/wx/lib/agw/balloontip.py
++index b4155d74a..57baca729 100644
++--- a/wx/lib/agw/balloontip.py
+++++ b/wx/lib/agw/balloontip.py
++@@ -615,7 +615,7 @@ def SetStartDelay(self, delay=1):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Creation Should Be Greater Than 1 ms")
++ 
++-        self._startdelaytime = float(delay)
+++        self._startdelaytime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -640,7 +640,7 @@ def SetEndDelay(self, delay=1e6):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Destruction Should Be Greater Than 1 ms")
++ 
++-        self._enddelaytime = float(delay)
+++        self._enddelaytime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/flatmenu.py b/wx/lib/agw/flatmenu.py
++index 5ba28e584..85f295b86 100644
++--- a/wx/lib/agw/flatmenu.py
+++++ b/wx/lib/agw/flatmenu.py
++@@ -736,8 +736,8 @@ def DrawSeparator(self, dc, xCoord, yCoord, textX, sepWidth):
++         """
++ 
++         dcsaver = DCSaver(dc)
++-        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth/2, 1)
++-        sepRect2 = wx.Rect(xCoord + textX + sepWidth/2, yCoord + 1, sepWidth/2-1, 1)
+++        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth//2, 1)
+++        sepRect2 = wx.Rect(xCoord + textX + sepWidth//2, yCoord + 1, sepWidth//2-1, 1)
++ 
++         artMgr = ArtManager.Get()
++         backColour = artMgr.GetMenuFaceColour()
++@@ -817,11 +817,11 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             imgWidth  = bmp.GetWidth()
++ 
++             if imageMarginX == 0:
++-                xx = rect.x + (leftMarginWidth - imgWidth)/2
+++                xx = rect.x + (leftMarginWidth - imgWidth)//2
++             else:
++-                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)/2 + rect.height
+++                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)//2 + rect.height
++ 
++-            yy = rect.y + (rect.height - imgHeight)/2
+++            yy = rect.y + (rect.height - imgHeight)//2
++             dc.DrawBitmap(bmp, xx, yy, True)
++ 
++         if item.GetKind() == wx.ITEM_CHECK:
++@@ -837,7 +837,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         if item.GetKind() == wx.ITEM_RADIO:
++ 
++@@ -852,7 +852,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         # Draw text - without accelerators
++         text = item.GetLabel()
++@@ -890,7 +890,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 w3, dummy = dc.GetTextExtent(text3)
++ 
++                 posx = xCoord + textX + borderXSize
++-                posy = (itemHeight - h)/2 + yCoord
+++                posy = (itemHeight - h)//2 + yCoord
++ 
++                 # Draw first part
++                 dc.DrawText(text1, posx, posy)
++@@ -912,7 +912,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             else:
++ 
++                 w, h = dc.GetTextExtent(text)
++-                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)/2 + yCoord)
+++                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)//2 + yCoord)
++ 
++ 
++         # Now draw accelerator
++@@ -920,7 +920,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++         if item.GetAccelString():
++ 
++             accelWidth, accelHeight = dc.GetTextExtent(item.GetAccelString())
++-            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)/2 + yCoord)
+++            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)//2 + yCoord)
++ 
++         # Check if this item has sub-menu - if it does, draw
++         # right arrow on the right margin
++@@ -932,7 +932,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++ 
++             xx = xCoord + rightMarginX + borderXSize
++             rr = wx.Rect(xx, rect.y + 1, rect.height-2, rect.height-2)
++-            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)/2, True)
+++            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)//2, True)
++ 
++ 
++     def DrawMenuBarButton(self, dc, rect, state):
++@@ -1142,7 +1142,7 @@ def DrawMenuBar(self, menubar, dc):
++             # Get the menu item rect
++             textWidth, textHeight = dc.GetTextExtent(fixedText)
++             #rect = wx.Rect(posx+menubar._spacer/2, posy, textWidth, textHeight)
++-            rect = wx.Rect(posx+padding/2, posy, textWidth, textHeight)
+++            rect = wx.Rect(posx+padding//2, posy, textWidth, textHeight)
++ 
++             # Can we draw more??
++             # the +DROP_DOWN_ARROW_WIDTH  is the width of the drop down arrow
++@@ -1172,7 +1172,7 @@ def DrawMenuBar(self, menubar, dc):
++                 dc.SetTextForeground(textColour)
++ 
++             ww, hh = dc.GetTextExtent(labelOnly)
++-            textOffset = (rect.width - ww) / 2
+++            textOffset = (rect.width - ww) // 2
++ 
++             if not menubar._isLCD and item.GetTextBitmap().IsOk() and not selected:
++                 dc.DrawBitmap(item.GetTextBitmap(), rect.x, rect.y, True)
++@@ -1505,8 +1505,8 @@ def DrawButtonColour(self, dc, rect, state, colour):
++         baseColour = colour
++ 
++         # Define the middle points
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, rect.y + (rect.height // 2))
+++        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height // 2))
++ 
++         # Define the top region
++         top = wx.Rect((rect.GetLeft(), rect.GetTop()), rightPt)
++@@ -1572,11 +1572,11 @@ def DrawMenuBarBackground(self, dc, rect):
++ 
++         factor = artMgr.GetMenuBgFactor()
++ 
++-        leftPt1 = wx.Point(rect.x, rect.y + (rect.height / factor))
++-        leftPt2 = wx.Point(rect.x, rect.y + (rect.height / factor)*(factor-1))
+++        leftPt1 = wx.Point(rect.x, rect.y + (rect.height // factor))
+++        leftPt2 = wx.Point(rect.x, rect.y + (rect.height // factor)*(factor-1))
++ 
++-        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor))
++-        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor)*(factor-1))
+++        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor))
+++        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor)*(factor-1))
++ 
++         # Define the top region
++         topReg = [wx.Point() for ii in range(7)]
++@@ -2707,7 +2707,7 @@ def DrawToolbar(self, dc, rect):
++             elif tbItem.IsCustomControl():
++                 control = tbItem.GetCustomControl()
++                 ctrlSize = control.GetSize()
++-                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)/2)
+++                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)//2)
++                 if control.GetPosition() != ctrlPos:
++                     control.SetPosition(ctrlPos)
++ 
++@@ -2727,9 +2727,9 @@ def DrawToolbar(self, dc, rect):
++             # Draw the toolbar image
++             if bmp.IsOk():
++ 
++-                x = xx - self._toolbarSpacer/2
+++                x = xx - self._toolbarSpacer//2
++                 #y = rect.y + (rect.height - bmp.GetHeight())/2 - 1
++-                y = rect.y + self._toolbarMargin/2
+++                y = rect.y + self._toolbarMargin//2
++ 
++                 buttonRect = wx.Rect(x, y, highlight_width, highlight_height)
++ 
++@@ -2745,8 +2745,8 @@ def DrawToolbar(self, dc, rect):
++                     else:
++                         self._tbButtons[i]._state = ControlNormal
++ 
++-                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())/2
++-                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())/2
+++                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())//2
+++                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())//2
++ 
++                 if self._tbButtons[i]._state == ControlFocus and not self._tbButtons[i]._tbItem.IsSelected():
++ 
++@@ -2827,8 +2827,8 @@ def DrawMoreButton(self, dc, state):
++         dropArrowBmp = self.GetRenderer()._bitmaps["arrow_down"]
++ 
++         # Calc the image coordinates
++-        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())/2
+++        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())//2
++ 
++         dc.DrawBitmap(dropArrowBmp, xx, yy + self._spacer, True)
++         self._dropDownButtonState = state
++@@ -3269,8 +3269,8 @@ def DrawToolbarItem(self, dc, idx, state):
++ 
++         # draw the bitmap over the highlight
++         buttonRect = wx.Rect(*rect)
++-        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())/2
++-        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())/2
+++        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())//2
+++        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())//2
++ 
++         if state == ControlFocus:
++ 
++@@ -3784,7 +3784,7 @@ def PositionAUI(self, mgr, fixToolbar=True):
++         pn.Name("flat_menu_bar")
++         pn.Caption("Menu Bar")
++         pn.Top()
++-        pn.MinSize(wx.Size(xx/2, self._barHeight))
+++        pn.MinSize(wx.Size(xx//2, self._barHeight))
++         pn.LeftDockable(False)
++         pn.RightDockable(False)
++         pn.ToolbarPane()
++@@ -3997,8 +3997,8 @@ def Draw(self, dc):
++         """
++ 
++         rect = wx.Rect(self._pos, self._size)
++-        xx = rect.x + (rect.width - self._normalBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - self._normalBmp.GetHeight())/2
+++        xx = rect.x + (rect.width - self._normalBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - self._normalBmp.GetHeight())//2
++ 
++         self._parent.GetRenderer().DrawScrollButton(dc, rect, self._state)
++         dc.DrawBitmap(self._normalBmp, xx, yy, True)
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index f5e5200b2..561749b89 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -858,9 +858,9 @@ def PaintStraightGradientBox(dc, rect, startColour, endColour, vertical=True):
++ 
++     for i in range(high+1):
++ 
++-        r = startColour.Red() + ((i*rd*100)/high)/100
++-        g = startColour.Green() + ((i*gd*100)/high)/100
++-        b = startColour.Blue() + ((i*bd*100)/high)/100
+++        r = startColour.Red() + ((i*rd*100)//high)//100
+++        g = startColour.Green() + ((i*gd*100)//high)//100
+++        b = startColour.Blue() + ((i*bd*100)//high)//100
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++@@ -2631,9 +2631,9 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         imageYCoord = (pc.HasAGWFlag(FNB_BOTTOM) and [6] or [8])[0]
++ 
++         if hasImage:
++-            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints/2
+++            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints//2
++         else:
++-            textOffset = pc._pParent._nPadding + shapePoints/2
+++            textOffset = pc._pParent._nPadding + shapePoints//2
++ 
++         textOffset += 2
++ 
++diff --git a/wx/lib/agw/floatspin.py b/wx/lib/agw/floatspin.py
++index bdbaf85ec..4559eb5de 100644
++--- a/wx/lib/agw/floatspin.py
+++++ b/wx/lib/agw/floatspin.py
++@@ -336,7 +336,7 @@ class FloatSpin(wx.Control):
++     """
++ 
++     def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++-                 size=(95,-1), style=0, value=0.0, min_val=None, max_val=None,
+++                 size=wx.DefaultSize, style=0, value=0.0, min_val=None, max_val=None,
++                  increment=1.0, digits=-1, agwStyle=FS_LEFT,
++                  name="FloatSpin"):
++         """
++diff --git a/wx/lib/agw/gradientbutton.py b/wx/lib/agw/gradientbutton.py
++index c4633b296..58625c508 100644
++--- a/wx/lib/agw/gradientbutton.py
+++++ b/wx/lib/agw/gradientbutton.py
++@@ -412,14 +412,14 @@ def OnPaint(self, event):
++ 
++         x, y, width, height = clientRect
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2 + ((capture==self and [1] or [0])[0]))
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2 + ((capture==self and [1] or [0])[0]))
++         if capture != self:
++             if self._mouseAction == HOVER:
++                 topStart, topEnd = self.LightColour(self._topStartColour, 10), self.LightColour(self._topEndColour, 10)
++             else:
++                 topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-            rc1 = wx.Rect(x, y, width, height/2)
+++            rc1 = wx.Rect(x, y, width, height//2)
++             path1 = self.GetPath(gc, rc1, 8)
++             br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++             gc.SetBrush(br1)
++@@ -448,7 +448,7 @@ def OnPaint(self, event):
++             else:
++                 bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-            rc3 = wx.Rect(x, y+height/2, width, height/2)
+++            rc3 = wx.Rect(x, y+height//2, width, height//2)
++             path3 = self.GetPath(gc, rc3, 8)
++             br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++             gc.SetBrush(br3)
++@@ -463,7 +463,7 @@ def OnPaint(self, event):
++             shadowOffset = 0
++         else:
++ 
++-            rc2 = wx.Rect(x+1, gradientRect.height/2, gradientRect.width, gradientRect.height)
+++            rc2 = wx.Rect(x+1, gradientRect.height//2, gradientRect.width, gradientRect.height)
++             path2 = self.GetPath(gc, rc2, 8)
++             gc.SetPen(wx.Pen(self._pressedBottomColour))
++             gc.SetBrush(wx.Brush(self._pressedBottomColour))
++diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py
++index 12302f3b0..377ac0121 100644
++--- a/wx/lib/agw/hypertreelist.py
+++++ b/wx/lib/agw/hypertreelist.py
++@@ -3437,7 +3437,7 @@ def PaintLevel(self, item, dc, level, y, x_maincol):
++ 
++             if not self.HasAGWFlag(wx.TR_NO_LINES) and children:
++                 last_child = children[-1]
++-                Y1 = last_child.GetY() + last_child.GetHeight() / 2
+++                Y1 = last_child.GetY() + last_child.GetHeight() // 2
++                 dc.DrawLine(x, oldY, x, Y1)
++ 
++         return y, x_maincol
++diff --git a/wx/lib/agw/knobctrl.py b/wx/lib/agw/knobctrl.py
++index 742097b09..1e5045ff6 100644
++--- a/wx/lib/agw/knobctrl.py
+++++ b/wx/lib/agw/knobctrl.py
++@@ -325,7 +325,7 @@ def OnSize(self,event):
++         memory.Clear()
++ 
++         minradius = min(0.9*self.Width/2.0, 0.9*self.Height/2.0)
++-        memory.DrawCircle(self.Width//2, self.Height//2, minradius)
+++        memory.DrawCircle(self.Width//2, self.Height//2, int(minradius))
++         memory.SelectObject(wx.NullBitmap)
++         self._region = wx.Region(self._Buffer, self.GetBackgroundColour())
++         self._minradius = minradius
++@@ -645,8 +645,8 @@ def DrawTags(self, dc, size):
++             dxi = math.cos(angle)*((width - xshift + tagLen - 6)/2.0 - tagLen)
++             dyi = math.sin(angle)*((height - yshift + tagLen - 6)/2.0 - tagLen)
++ 
++-            dc.DrawLine(width//2 - sxi, height//2 - syi,
++-                        width//2 - dxi, height//2 - dyi)
+++            dc.DrawLine(int(width//2 - sxi), int(height//2 - syi),
+++                        int(width//2 - dxi), int(height//2 - dyi))
++ 
++ 
++     def DrawDiagonalGradient(self, dc, size):
++@@ -759,8 +759,8 @@ def DrawInsetCircle(self, dc, pencolour):
++         p1 = wx.Pen(self.OffsetColour(pencolour, -70), 2)
++         p2 = wx.Pen(self.OffsetColour(pencolour, 10), 1)
++ 
++-        pt1 = wx.Point(cx-r*math.sqrt(2)/2.0, cy+r*math.sqrt(2)/2.0)
++-        pt2 = wx.Point(cx+r*math.sqrt(2)/2.0, cy-r*math.sqrt(2)/2.0)
+++        pt1 = wx.Point(int(cx-r*math.sqrt(2)/2.0), int(cy+r*math.sqrt(2)/2.0))
+++        pt2 = wx.Point(int(cx+r*math.sqrt(2)/2.0), int(cy-r*math.sqrt(2)/2.0))
++ 
++         dc.SetPen(p2)
++         dc.DrawArc(pt1, pt2, (cx, cy))
++@@ -779,7 +779,7 @@ def DrawBoundingCircle(self, dc, size):
++         radius = 0.9*min(size.x, size.y)/2.0
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++         dc.SetPen(wx.Pen(self._boundingcolour))
++-        dc.DrawCircle(self.Width//2, self.Height//2, radius)
+++        dc.DrawCircle(self.Width//2, self.Height//2, int(radius))
++ 
++ 
++     def CircleCoords(self, radius, angle, centerX, centerY):
++diff --git a/wx/lib/agw/labelbook.py b/wx/lib/agw/labelbook.py
++index b716df3a2..f8c9cd54d 100644
++--- a/wx/lib/agw/labelbook.py
+++++ b/wx/lib/agw/labelbook.py
++@@ -1376,13 +1376,13 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    imgXcoord = self._nImgSize / 2
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize / 2] or [pos + imgTopPadding])[0]
+++                    imgXcoord = self._nImgSize // 2
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize // 2] or [pos + imgTopPadding])[0]
++ 
++                 else:
++ 
++-                    imgXcoord = pos + (rectWidth / 2) - (self._nImgSize / 2)
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize / 2] or [imgTopPadding])[0]
+++                    imgXcoord = pos + (rectWidth // 2) - (self._nImgSize // 2)
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize // 2] or [imgTopPadding])[0]
++ 
++                 self._ImageList.Draw(self._pagesInfoVec[i].GetImageIndex(), dc,
++                                      imgXcoord, imgYcoord,
++@@ -1408,15 +1408,15 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    textOffsetX = ((rectWidth - textWidth) / 2 )
+++                    textOffsetX = ((rectWidth - textWidth) // 2 )
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT  and [pos + self._nImgSize  + imgTopPadding + 3] or \
++-                                       [pos + ((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [pos + ((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 else:
++ 
++-                    textOffsetX = (rectWidth - textWidth) / 2  + pos + nTextPaddingLeft
+++                    textOffsetX = (rectWidth - textWidth) // 2  + pos + nTextPaddingLeft
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT and [self._nImgSize + imgTopPadding + 3] or \
++-                                       [((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
++                 dc.DrawText(fixedText, textOffsetX, textOffsetY)
++@@ -1591,8 +1591,8 @@ def OnPaint(self, event):
++             # Draw gradient in the background area
++             startColour = self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR]
++             endColour   = ArtManager.Get().LightColour(self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR], 50)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x / 2, size.y), startColour, endColour, False)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x / 2, 0, size.x / 2, size.y), endColour, startColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x // 2, size.y), startColour, endColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x // 2, 0, size.x // 2, size.y), endColour, startColour, False)
++ 
++         else:
++ 
++@@ -1638,7 +1638,7 @@ def OnPaint(self, event):
++ 
++             if self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++                 font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-                font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++                font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++                 if self.GetParent().GetFontBold():
++                     font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -1954,7 +1954,7 @@ def DrawWebHover(self, dc, caption, xCoord, yCoord, selected):
++ 
++         # Redraw the text with underlined font
++         underLinedFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        underLinedFont.SetPointSize(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        underLinedFont.SetPointSize(int(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++         if self.GetParent().GetFontBold():
++             underLinedFont.SetWeight(wx.FONTWEIGHT_BOLD)
++         elif self.HasAGWFlag(INB_BOLD_TAB_SELECTION) and selected:
++@@ -2050,7 +2050,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++         imgRect = wx.Rect(*rect)
++ 
++         font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++         if self.GetParent().GetFontBold():
++             font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -2069,7 +2069,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++         # Text bounding rectangle
++         textRect.x += nPadding
++-        textRect.y = rect.y + (rect.height - h)/2
+++        textRect.y = rect.y + (rect.height - h)//2
++         textRect.width = rect.width - 2 * nPadding
++ 
++         if bmp.IsOk() and not self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++@@ -2086,7 +2086,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++             imgRect.x += nPadding
++             imgRect.width = bmp.GetWidth()
++-            imgRect.y = rect.y + (rect.height - bmp.GetHeight())/2
+++            imgRect.y = rect.y + (rect.height - bmp.GetHeight())//2
++             imgRect.height = bmp.GetHeight()
++ 
++         # Draw bounding rectangle
++@@ -2496,7 +2496,7 @@ def ResizeTabArea(self):
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(1, 1))
++             font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-            font.SetPointSize(font.GetPointSize()*self._fontSizeMultiple)
+++            font.SetPointSize(int(font.GetPointSize()*self._fontSizeMultiple))
++             if self.GetFontBold() or agwStyle & INB_BOLD_TAB_SELECTION:
++                 font.SetWeight(wx.FONTWEIGHT_BOLD)
++             dc.SetFont(font)
++diff --git a/wx/lib/agw/peakmeter.py b/wx/lib/agw/peakmeter.py
++index 055dbef81..a5f88a9d5 100644
++--- a/wx/lib/agw/peakmeter.py
+++++ b/wx/lib/agw/peakmeter.py
++@@ -784,7 +784,7 @@ def DrawHorzBand(self, dc, rect):
++                 maxWidth = size.x*horzBands
++                 points = [wx.Point() for i in range(2)]
++                 points[0].y = rectPrev.GetTopRight().y - yDecal
++-                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth/self._maxValue
+++                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth//self._maxValue
++                 points[1].y = rectPrev.GetBottomLeft().y + yDecal
++                 points[1].x = points[0].x
++                 dc.SetPen(pen)
++diff --git a/wx/lib/agw/pygauge.py b/wx/lib/agw/pygauge.py
++index bab459a3a..b8654436a 100644
++--- a/wx/lib/agw/pygauge.py
+++++ b/wx/lib/agw/pygauge.py
++@@ -344,7 +344,7 @@ def OnPaint(self, event):
++                 c1,c2 = gradient
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.GradientFillLinear(r, c1, c2, wx.EAST)
++         else:
++             for i, colour in enumerate(self._barColourSorted):
++@@ -352,7 +352,7 @@ def OnPaint(self, event):
++                 dc.SetPen(wx.Pen(colour))
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.DrawRectangle(r)
++ 
++ 
++diff --git a/wx/lib/agw/ribbon/art_aui.py b/wx/lib/agw/ribbon/art_aui.py
++index a1d255843..31fedf487 100644
++--- a/wx/lib/agw/ribbon/art_aui.py
+++++ b/wx/lib/agw/ribbon/art_aui.py
++@@ -390,7 +390,7 @@ def DrawTab(self, dc, wnd, tab):
++             grad_rect = wx.Rect(*tab.rect)
++             grad_rect.height -= 4
++             grad_rect.width -= 1
++-            grad_rect.height /= 2
+++            grad_rect.height //= 2
++             grad_rect.y = grad_rect.y + tab.rect.height - grad_rect.height - 1
++             dc.SetBrush(self._tab_active_top_background_brush)
++             dc.DrawRectangle(tab.rect.x, tab.rect.y + 3, tab.rect.width - 1, grad_rect.y - tab.rect.y - 3)
++@@ -401,7 +401,7 @@ def DrawTab(self, dc, wnd, tab):
++             btm_rect = wx.Rect(*tab.rect)
++             btm_rect.height -= 4
++             btm_rect.width -= 1
++-            btm_rect.height /= 2
+++            btm_rect.height //= 2
++             btm_rect.y = btm_rect.y + tab.rect.height - btm_rect.height - 1
++             dc.SetBrush(self._tab_hover_background_brush)
++             dc.DrawRectangle(btm_rect.x, btm_rect.y, btm_rect.width, btm_rect.height)
++@@ -434,8 +434,8 @@ def DrawTab(self, dc, wnd, tab):
++             icon = tab.page.GetIcon()
++             if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++                 if icon.IsOk():
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
++-                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
+++                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -450,7 +450,7 @@ def DrawTab(self, dc, wnd, tab):
++                     offset += icon.GetWidth() + 2
++ 
++                 text_width, text_height = dc.GetTextExtent(label)
++-                x = (tab.rect.width - 2 - text_width - offset) / 2
+++                x = (tab.rect.width - 2 - text_width - offset) // 2
++                 if x > 8:
++                     x = 8
++                 elif x < 1:
++@@ -458,7 +458,7 @@ def DrawTab(self, dc, wnd, tab):
++ 
++                 width = tab.rect.width - x - 2
++                 x += tab.rect.x + offset
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if icon.IsOk():
++                     dc.DrawBitmap(icon, x - offset, tab.rect.y + (tab.rect.height - icon.GetHeight()) / 2, True)
++@@ -892,8 +892,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def DrawPartialPanelBackground(self, dc, wnd, rect):
++@@ -1024,7 +1024,7 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++             dc.DrawRectangle(reduced_rect.x, reduced_rect.y, reduced_rect.width, reduced_rect.height)
++             btn_bitmap = bitmaps[3]
++ 
++-        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width / 2 - 2, (rect.y + rect.height / 2) - 2, True)
+++        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width // 2 - 2, (rect.y + rect.height // 2) - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1277,7 +1277,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++             if is_split_hybrid:
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++-            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height / 2) - 2, True)
+++            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++diff --git a/wx/lib/agw/ribbon/art_internal.py b/wx/lib/agw/ribbon/art_internal.py
++index 4a8dc7ce0..78e8f3fe4 100644
++--- a/wx/lib/agw/ribbon/art_internal.py
+++++ b/wx/lib/agw/ribbon/art_internal.py
++@@ -32,9 +32,9 @@ def RibbonInterpolateColour(start_colour, end_colour, position, start_position,
++     r = end_colour.Red() - start_colour.Red()
++     g = end_colour.Green() - start_colour.Green()
++     b = end_colour.Blue() - start_colour.Blue()
++-    r = start_colour.Red()   + (((r * position * 100) / end_position) / 100)
++-    g = start_colour.Green() + (((g * position * 100) / end_position) / 100)
++-    b = start_colour.Blue()  + (((b * position * 100) / end_position) / 100)
+++    r = start_colour.Red()   + (((r * position * 100) // end_position) // 100)
+++    g = start_colour.Green() + (((g * position * 100) // end_position) // 100)
+++    b = start_colour.Blue()  + (((b * position * 100) // end_position) // 100)
++ 
++     return wx.Colour(r, g, b)
++ 
++@@ -61,9 +61,9 @@ def RibbonDrawParallelGradientLines(dc, nlines, line_origins, stepx, stepy, nums
++     bd = end_colour.Blue() - start_colour.Blue()
++ 
++     for step in range(numsteps):
++-        r = start_colour.Red() + (((step*rd*100)/numsteps)/100)
++-        g = start_colour.Green() + (((step*gd*100)/numsteps)/100)
++-        b = start_colour.Blue() + (((step*bd*100)/numsteps)/100)
+++        r = start_colour.Red() + (((step*rd*100)//numsteps)//100)
+++        g = start_colour.Green() + (((step*gd*100)//numsteps)//100)
+++        b = start_colour.Blue() + (((step*bd*100)//numsteps)//100)
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++diff --git a/wx/lib/agw/ribbon/art_msw.py b/wx/lib/agw/ribbon/art_msw.py
++index e7317d59b..00c3dfe2b 100644
++--- a/wx/lib/agw/ribbon/art_msw.py
+++++ b/wx/lib/agw/ribbon/art_msw.py
++@@ -982,7 +982,7 @@ def DrawTab(self, dc, wnd, tab):
++                 background.width -= 4
++                 background.height -= 3
++                 h = background.height
++-                background.height /= 2
+++                background.height //= 2
++                 dc.GradientFillLinear(background, self._tab_hover_background_top_colour,
++                                       self._tab_hover_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1024,9 +1024,9 @@ def DrawTab(self, dc, wnd, tab):
++             if icon.IsOk():
++                 x = tab.rect.x + 4
++                 if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
++ 
++-                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -1043,13 +1043,13 @@ def DrawTab(self, dc, wnd, tab):
++                     x += 3 + tab.page.GetIcon().GetWidth()
++                     width -= 3 + tab.page.GetIcon().GetWidth()
++ 
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if width <= text_width:
++                     dc.SetClippingRegion(x, tab.rect.y, width, tab.rect.height)
++                     dc.DrawText(label, x, y)
++                 else:
++-                    dc.DrawText(label, x + (width - text_width) / 2 + 1, y)
+++                    dc.DrawText(label, x + (width - text_width) // 2 + 1, y)
++ 
++ 
++     def DrawTabSeparator(self, dc, wnd, rect, visibility):
++@@ -1093,7 +1093,7 @@ def ReallyDrawTabSeparator(self, wnd, rect, visibility):
++         dc = wx.MemoryDC(self._cached_tab_separator)
++         self.DrawTabCtrlBackground(dc, wnd, rect)
++ 
++-        x = rect.x + rect.width / 2
+++        x = rect.x + rect.width // 2
++         h = float(rect.height - 1)
++ 
++         r1 = self._tab_ctrl_background_brush.GetColour().Red() * (1.0 - visibility) + 0.5
++@@ -1146,7 +1146,7 @@ def DrawPartialPageBackground1(self, dc, wnd, rect, page, offset, hovered=False)
++ 
++         # upper_rect, lower_rect, paint_rect are all in page co-ordinates
++         upper_rect = wx.Rect(*background)
++-        upper_rect.height /= 5
+++        upper_rect.height //= 5
++ 
++         lower_rect = wx.Rect(*background)
++         lower_rect.y += upper_rect.height
++@@ -1229,7 +1229,7 @@ def DrawPageBackground(self, dc, wnd, rect):
++         background.width -= 4
++         background.height -= 2
++ 
++-        background.height /= 5
+++        background.height //= 5
++         dc.GradientFillLinear(background, self._page_background_top_colour,
++                               self._page_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1493,10 +1493,10 @@ def DrawPanelBackground(self, dc, wnd, rect):
++ 
++         if clip_label:
++             clip = wx.DCClipper(dc, label_rect)
++-            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++         else:
++-            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) / 2,
++-                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) // 2,
+++                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++ 
++         if has_ext_button:
++             if wnd.IsExtButtonHovered():
++@@ -1577,7 +1577,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x, rect.y + rect.height - 15, rect.x + rect.width, rect.y + rect.height - 15)
++ 
++-            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width / 3, 15)
+++            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width // 3, 15)
++             down_btn = wx.Rect(up_btn.GetRight() + 1, up_btn.GetTop(), up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetLeft(), down_btn.GetBottom())
++             ext_btn = wx.Rect(down_btn.GetRight() + 1, up_btn.GetTop(), rect.width - up_btn.GetWidth() - down_btn.GetWidth() - 1, up_btn.GetHeight())
++@@ -1587,7 +1587,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x + rect.width - 15, rect.y, rect.x + rect.width - 15, rect.y + rect.height)
++ 
++-            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height / 3)
+++            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height // 3)
++             down_btn = wx.Rect(up_btn.GetLeft(), up_btn.GetBottom() + 1, up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetRight(), down_btn.GetTop())
++             ext_btn = wx.Rect(up_btn.GetLeft(), down_btn.GetBottom() + 1, up_btn.GetWidth(), rect.height - up_btn.GetHeight() - down_btn.GetHeight() - 1)
++@@ -1633,14 +1633,14 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++ 
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(btn_top_brush)
++-        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height / 2)
+++        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height // 2)
++ 
++         lower = wx.Rect(*rect)
++-        lower.height = (lower.height + 1) / 2
+++        lower.height = (lower.height + 1) // 2
++         lower.y += rect.height - lower.height
++         dc.GradientFillLinear(lower, btn_colour, btn_grad_colour, wx.SOUTH)
++ 
++-        dc.DrawBitmap(btn_bitmap, rect.x + rect.width / 2 - 2, lower.y - 2, True)
+++        dc.DrawBitmap(btn_bitmap, rect.x + rect.width // 2 - 2, lower.y - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1691,7 +1691,7 @@ def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++         upper.x += 1
++         upper.width -= 2
++         upper.y += 1
++-        upper.height /= 3
+++        upper.height //= 3
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(top_brush)
++         dc.DrawRectangle(upper.x, upper.y, upper.width, upper.height)
++@@ -1760,7 +1760,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++             client_rect.x += 1
++             client_rect.width -= 2
++             client_rect.y += 1
++-            client_rect.height = (rect.y + rect.height / 5) - client_rect.x
+++            client_rect.height = (rect.y + rect.height // 5) - client_rect.x
++             dc.GradientFillLinear(client_rect,
++                                   self._panel_active_background_top_colour,
++                                   self._panel_active_background_top_gradient_colour, wx.SOUTH)
++@@ -1785,7 +1785,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.DrawRectangle(preview.x + 1, preview.y + preview.height - 8, preview.width - 2, 7)
++ 
++-        mid_pos = rect.y + rect.height / 5 - preview.y
+++        mid_pos = rect.y + rect.height // 5 - preview.y
++ 
++         if mid_pos < 0 or mid_pos >= preview.height:
++             full_rect = wx.Rect(*preview)
++@@ -1816,8 +1816,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - 7 - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - 7 - bitmap.GetHeight()) // 2, True)
++ 
++         self.DrawPanelBorder(dc, preview, self._panel_border_pen, self._panel_border_gradient_pen)
++         self.DrawPanelBorder(dc, true_rect, self._panel_minimised_border_pen, self._panel_minimised_border_gradient_pen)
++@@ -1829,20 +1829,20 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             preview.x = true_rect.x + 4
++-            preview.y = true_rect.y + (true_rect.height - preview.height) / 2
+++            preview.y = true_rect.y + (true_rect.height - preview.height) // 2
++         else:
++-            preview.x = true_rect.x + (true_rect.width - preview.width) / 2
+++            preview.x = true_rect.x + (true_rect.width - preview.width) // 2
++             preview.y = true_rect.y + 4
++ 
++         dc.SetFont(self._panel_label_font)
++         label_width, label_height = dc.GetTextExtent(wnd.GetLabel())
++ 
++-        xpos = true_rect.x + (true_rect.width - label_width + 1) / 2
+++        xpos = true_rect.x + (true_rect.width - label_width + 1) // 2
++         ypos = preview.y + preview.height + 5
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos = preview.x + preview.width + 5
++-            ypos = true_rect.y + (true_rect.height - label_height) / 2
+++            ypos = true_rect.y + (true_rect.height - label_height) // 2
++ 
++         dc.SetTextForeground(self._panel_minimised_label_colour)
++         dc.DrawText(wnd.GetLabel(), xpos, ypos)
++@@ -1851,12 +1851,12 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos += label_width
++-            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height / 2)
+++            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height // 2)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3,  3)
++             arrow_points[2] = arrow_points[0] + wx.Point(-3, -3)
++         else:
++             ypos += label_height
++-            arrow_points[0] = wx.Point(true_rect.width / 2, ypos + 5)
+++            arrow_points[0] = wx.Point(true_rect.width // 2, ypos + 5)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3, -3)
++             arrow_points[2] = arrow_points[0] + wx.Point( 3, -3)
++ 
++@@ -1967,7 +1967,7 @@ def DrawButtonBarButton(self, dc, wnd, rect, kind, state, label, bitmap_large, b
++             bg_rect.height -= 2
++ 
++             bg_rect_top = wx.Rect(*bg_rect)
++-            bg_rect_top.height /= 3
+++            bg_rect_top.height //= 3
++             bg_rect.y += bg_rect_top.height
++             bg_rect.height -= bg_rect_top.height
++ 
++@@ -2043,7 +2043,7 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         if result == RIBBON_BUTTONBAR_BUTTON_LARGE:
++ 
++             padding = 2
++-            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) / 2,
+++            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) // 2,
++                           rect.y + padding, True)
++             ypos = rect.y + padding + bitmap_large.GetHeight() + padding
++             arrow_width = (kind == RIBBON_BUTTON_NORMAL and [0] or [8])[0]
++@@ -2052,10 +2052,10 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++ 
++             if label_w + 2 * padding <= rect.width:
++ 
++-                dc.DrawText(label, rect.x + (rect.width - label_w) / 2, ypos)
+++                dc.DrawText(label, rect.x + (rect.width - label_w) // 2, ypos)
++                 if arrow_width != 0:
++-                    self.DrawDropdownArrow(dc, rect.x + rect.width / 2,
++-                                           ypos + (label_h * 3) / 2,
+++                    self.DrawDropdownArrow(dc, rect.x + rect.width // 2,
+++                                           ypos + (label_h * 3) // 2,
++                                            self._button_bar_label_colour)
++             else:
++                 breaki = len(label)
++@@ -2067,17 +2067,17 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++                         label_w, label_h = dc.GetTextExtent(label_top)
++ 
++                         if label_w + 2 * padding <= rect.width:
++-                            dc.DrawText(label_top, rect.x + (rect.width - label_w) / 2, ypos)
+++                            dc.DrawText(label_top, rect.x + (rect.width - label_w) // 2, ypos)
++                             ypos += label_h
++                             label_bottom = label[breaki:]
++                             label_w, label_h = dc.GetTextExtent(label_bottom)
++                             label_w += arrow_width
++-                            iX = rect.x + (rect.width - label_w) / 2
+++                            iX = rect.x + (rect.width - label_w) // 2
++                             dc.DrawText(label_bottom, iX, ypos)
++ 
++                             if arrow_width != 0:
++                                 self.DrawDropdownArrow(dc, iX + 2 +label_w - arrow_width,
++-                                                       ypos + label_h / 2 + 1,
+++                                                       ypos + label_h // 2 + 1,
++                                                        self._button_bar_label_colour)
++ 
++                             break
++@@ -2085,14 +2085,14 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         elif result == RIBBON_BUTTONBAR_BUTTON_MEDIUM:
++ 
++             x_cursor = rect.x + 2
++-            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())/2, True)
+++            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())//2, True)
++             x_cursor += bitmap_small.GetWidth() + 2
++             label_w, label_h = dc.GetTextExtent(label)
++-            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) / 2)
+++            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) // 2)
++             x_cursor += label_w + 3
++ 
++             if kind != RIBBON_BUTTON_NORMAL:
++-                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2,
+++                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height // 2,
++                                        self._button_bar_label_colour)
++ 
++         else:
++@@ -2184,7 +2184,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++ 
++         # Background
++         bg_rect_top = wx.Rect(*bg_rect)
++-        bg_rect_top.height = (bg_rect_top.height * 2) / 5
+++        bg_rect_top.height = (bg_rect_top.height * 2) // 5
++         bg_rect_btm = wx.Rect(*bg_rect)
++         bg_rect_btm.y += bg_rect_top.height
++         bg_rect_btm.height -= bg_rect_top.height
++@@ -2244,10 +2244,10 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++             dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
++-                          bg_rect.y + (bg_rect.height / 2) - 2, True)
+++                          bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2,
++-                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2,
+++                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def GetBarTabWidth(self, dc, wnd, label, bitmap, ideal=None, small_begin_need_separator=None,
++@@ -2474,7 +2474,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.y = size.GetHeight() - 15
++             scroll_up.height = 15
++             scroll_up.x = 0
++-            scroll_up.width = (size.GetWidth() + 2) / 3
+++            scroll_up.width = (size.GetWidth() + 2) // 3
++             scroll_down.y = scroll_up.y
++             scroll_down.height = scroll_up.height
++             scroll_down.x = scroll_up.x + scroll_up.width
++@@ -2491,7 +2491,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.x = size.GetWidth() - 15
++             scroll_up.width = 15
++             scroll_up.y = 0
++-            scroll_up.height = (size.GetHeight() + 2) / 3
+++            scroll_up.height = (size.GetHeight() + 2) // 3
++             scroll_down.x = scroll_up.x
++             scroll_down.width = scroll_up.width
++             scroll_down.y = scroll_up.y + scroll_up.height
++diff --git a/wx/lib/agw/ribbon/bar.py b/wx/lib/agw/ribbon/bar.py
++index ae8b6a19c..b0d28776d 100644
++--- a/wx/lib/agw/ribbon/bar.py
+++++ b/wx/lib/agw/ribbon/bar.py
++@@ -743,7 +743,7 @@ def RecalculateTabSizes(self):
++                     delta = info.ideal_width - info.small_must_have_separator_width
++                     info.rect.x = x
++                     info.rect.y = y
++-                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)/total_delta
+++                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)//total_delta
++                     info.rect.height = self._tab_height
++ 
++                     x += info.rect.width + tabsep
++@@ -797,7 +797,7 @@ def RecalculateTabSizes(self):
++                         delta = smallest_tab_width - info.minimum_width
++                         info.rect.x = x
++                         info.rect.y = y
++-                        info.rect.width = info.minimum_width + delta*(width - total_small_width)/total_delta
+++                        info.rect.width = info.minimum_width + delta*(width - total_small_width)//total_delta
++                         info.rect.height = self._tab_height
++ 
++                         x += info.rect.width + tabsep
++diff --git a/wx/lib/agw/ribbon/buttonbar.py b/wx/lib/agw/ribbon/buttonbar.py
++index 25ee49a82..4690f483d 100644
++--- a/wx/lib/agw/ribbon/buttonbar.py
+++++ b/wx/lib/agw/ribbon/buttonbar.py
++@@ -354,7 +354,7 @@ def InsertButton(self, pos, button_id, label, bitmap, bitmap_small=wx.NullBitmap
++                 self._bitmap_size_large = bitmap.GetSize()
++                 if not bitmap_small.IsOk():
++                     w, h = self._bitmap_size_large
++-                    self._bitmap_size_small = wx.Size(0.5*w, 0.5*h)
+++                    self._bitmap_size_small = wx.Size(w//2, h//2)
++ 
++             if bitmap_small.IsOk():
++ 
++@@ -867,8 +867,8 @@ def OnSize(self, event):
++ 
++             layout_size = self._layouts[layout_i].overall_size
++             if layout_size.x <= new_size.x and layout_size.y <= new_size.y:
++-                self._layout_offset.x = (new_size.x - layout_size.x)/2
++-                self._layout_offset.y = (new_size.y - layout_size.y)/2
+++                self._layout_offset.x = (new_size.x - layout_size.x)//2
+++                self._layout_offset.y = (new_size.y - layout_size.y)//2
++                 self._current_layout = layout_i
++                 break
++ 
++diff --git a/wx/lib/agw/ribbon/gallery.py b/wx/lib/agw/ribbon/gallery.py
++index b830fab7d..b86528865 100644
++--- a/wx/lib/agw/ribbon/gallery.py
+++++ b/wx/lib/agw/ribbon/gallery.py
++@@ -805,8 +805,8 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         if client.GetWidth() < 0 or client.GetHeight() < 0:
++             return relative_to
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++@@ -849,8 +849,8 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         elif direction == wx.BOTH:
++             client.IncBy(self._bitmap_padded_size)
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++diff --git a/wx/lib/agw/ribbon/panel.py b/wx/lib/agw/ribbon/panel.py
++index 79fd9bc58..901c765b6 100644
++--- a/wx/lib/agw/ribbon/panel.py
+++++ b/wx/lib/agw/ribbon/panel.py
++@@ -584,12 +584,12 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         minimum = wx.Size(*self.GetMinSize())
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 4) / 5
+++            current.x = (current.x * 4) // 5
++             if current.x < minimum.x:
++                 current.x = minimum.x
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 4) / 5
+++            current.y = (current.y * 4) // 5
++             if current.y < minimum.y:
++                 current.y = minimum.y
++ 
++@@ -668,10 +668,10 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         current = wx.Size(*relative_to)
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 5 + 3) / 4
+++            current.x = (current.x * 5 + 3) // 4
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 5 + 3) / 4
+++            current.y = (current.y * 5 + 3) // 4
++ 
++         return current
++ 
++@@ -1076,25 +1076,25 @@ def GetExpandedPosition(self, panel, expanded_size, direction):
++         pos = wx.Point()
++ 
++         if direction == wx.NORTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetY() - expanded_size.GetHeight()
++             primary_x = True
++             secondary_y = 1
++ 
++         elif direction == wx.EAST:
++             pos.x = panel.GetRight()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = -1
++ 
++         elif direction == wx.SOUTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetBottom()
++             primary_x = True
++             secondary_y = -1
++ 
++         else:
++             pos.x = panel.GetX() - expanded_size.GetWidth()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = 1
++ 
++         expanded = wx.Rect(pos, expanded_size)
++diff --git a/wx/lib/agw/ribbon/toolbar.py b/wx/lib/agw/ribbon/toolbar.py
++index 1771c6506..8c6f8b522 100644
++--- a/wx/lib/agw/ribbon/toolbar.py
+++++ b/wx/lib/agw/ribbon/toolbar.py
++@@ -1159,7 +1159,7 @@ def OnSize(self, event):
++ 
++         # Set group y positions
++         for group in self._groups:
++-            group.position.y = rowypos[group.position.y]
+++            group.position.y = int(rowypos[group.position.y])
++ 
++ 
++     def GetBestSizeForParentSize(self, parentSize):
++diff --git a/wx/lib/agw/shapedbutton.py b/wx/lib/agw/shapedbutton.py
++index f015d4e39..49523366a 100644
++--- a/wx/lib/agw/shapedbutton.py
+++++ b/wx/lib/agw/shapedbutton.py
++@@ -569,9 +569,9 @@ def DrawMainButton(self, dc, width, height):
++                 rect2 = w*main//secondary
++ 
++             if self._isup:
++-                img = self._mainbuttonup.Scale(rect2, rect3)
+++                img = self._mainbuttonup.Scale(int(rect2), int(rect3))
++             else:
++-                img = self._mainbuttondown.Scale(rect2, rect3)
+++                img = self._mainbuttondown.Scale(int(rect2), int(rect3))
++ 
++         bmp = img.ConvertToBitmap()
++ 
++@@ -599,7 +599,7 @@ def DrawMainButton(self, dc, width, height):
++                     ypos = 0
++ 
++         # Draw Finally The Bitmap
++-        dc.DrawBitmap(bmp, xpos, ypos, True)
+++        dc.DrawBitmap(bmp, int(xpos), int(ypos), True)
++ 
++         # Store Bitmap Position And Size To Draw An Elliptical Focus Indicator
++         self._xpos = xpos
++@@ -646,7 +646,7 @@ def DrawLabel(self, dc, width, height, dw=0, dh=0):
++             xp = xc - (tw//2)* cos(angle) - (th//2)*sin(angle)
++             yp = yc + (tw//2)*sin(angle) - (th//2)*cos(angle)
++ 
++-            dc.DrawRotatedText(label, xp + dw, yp + dh , angle*180/pi)
+++            dc.DrawRotatedText(label, int(xp + dw), int(yp + dh), angle*180/pi)
++ 
++ 
++     def DrawFocusIndicator(self, dc, width, height):
++@@ -676,7 +676,7 @@ def DrawFocusIndicator(self, dc, width, height):
++         else:
++             # This Is An Ellipse
++             if hasattr(self, "_xpos"):
++-                dc.DrawEllipse(self._xpos + 2, self._ypos + 2, self._imgx - 4, self._imgy - 4)
+++                dc.DrawEllipse(int(self._xpos + 2), int(self._ypos + 2), self._imgx - 4, self._imgy - 4)
++ 
++         dc.SetLogicalFunction(wx.COPY)
++ 
++diff --git a/wx/lib/agw/speedmeter.py b/wx/lib/agw/speedmeter.py
++index f196b51f2..606901d27 100644
++--- a/wx/lib/agw/speedmeter.py
+++++ b/wx/lib/agw/speedmeter.py
++@@ -580,8 +580,8 @@ def Draw(self, dc):
++         dc.SetBackground(wx.Brush(speedbackground))
++         dc.Clear()
++ 
++-        centerX = self.faceBitmap.GetWidth()/2
++-        centerY = self.faceBitmap.GetHeight()/2
+++        centerX = self.faceBitmap.GetWidth()//2
+++        centerY = self.faceBitmap.GetHeight()//2
++ 
++         self.CenterX = centerX
++         self.CenterY = centerY
++@@ -681,7 +681,7 @@ def Draw(self, dc):
++             # Draw The Filler (Both In "Advance" And "Reverse" Directions)
++ 
++             dc.SetBrush(wx.Brush(fillercolour))
++-            dc.DrawArc(xs2, ys2, xe2, ye2, centerX, centerY)
+++            dc.DrawArc(xs2, ys2, xe2, ye2, int(centerX), int(centerY))
++ 
++             if self._agwStyle & SM_DRAW_SECTORS == 0:
++                 dc.SetBrush(wx.Brush(speedbackground))
++@@ -952,7 +952,7 @@ def Draw(self, dc):
++                     y = y - height/2.0 - height*sin(angis)/2.0
++                     fancytext.RenderToDC(fancystr, dc, x, y)
++                 else:
++-                    dc.DrawText(strings, x, y)
+++                    dc.DrawText(strings, int(x), int(y))
++ 
++             # This Is The Small Rectangle --> Tick Mark
++             rectangle = colourangles[ii] + pi/2.0
++@@ -969,6 +969,7 @@ def Draw(self, dc):
++             y4 = y3 + 3*self.scale*sinrect
++ 
++             points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++            points = [(int(p[0]), int(p[1])) for p in points]
++ 
++             dc.DrawPolygon(points)
++ 
++@@ -1003,6 +1004,7 @@ def Draw(self, dc):
++                         y4 = y3 + self.scale*sinrect
++ 
++                         points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++                        points = [(int(p[0]), int(p[1])) for p in points]
++ 
++                         dc.DrawPolygon(points)
++ 
++@@ -1017,7 +1019,7 @@ def Draw(self, dc):
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++ 
++         if self._drawarc:
++-            dc.SetPen(wx.Pen(self.GetArcColour(), 2.0))
+++            dc.SetPen(wx.Pen(self.GetArcColour(), 2))
++             # If It's Not A Complete Circle, Draw The Connecting Lines And The Arc
++             if abs(abs(startangle - endangle) - 2*pi) > 1.0/180.0:
++                 dc.DrawArc(xstart, ystart, xend, yend, centerX, centerY)
++@@ -1046,7 +1048,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++             dc.SetTextForeground(middlecolour)
++-            dc.DrawText(middletext, newx, newy)
+++            dc.DrawText(middletext, int(newx), int(newy))
++ 
++         # Here We Draw The Icon In The Middle, Near The Start Of The Arrow (If Present)
++         # This Is Like The "Fuel" Icon In The Cars
++@@ -1054,8 +1056,8 @@ def Draw(self, dc):
++ 
++             middleicon = self.GetMiddleIcon()
++             middlewidth, middleheight = self.GetMiddleIconDimens()
++-            middleicon.SetWidth(middlewidth*self.scale)
++-            middleicon.SetHeight(middleheight*self.scale)
+++            middleicon.SetWidth(int(middlewidth*self.scale))
+++            middleicon.SetHeight(int(middleheight*self.scale))
++             middleangle = (startangle + endangle)/2.0
++ 
++             mw = middleicon.GetWidth()
++@@ -1064,7 +1066,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++ 
++-            dc.DrawIcon(middleicon, newx, newy)
+++            dc.DrawIcon(middleicon, int(newx), int(newy))
++ 
++             # Restore Icon Dimension, If Not Something Strange Happens
++             middleicon.SetWidth(middlewidth)
++@@ -1109,53 +1111,61 @@ def Draw(self, dc):
++                 if handstyle == "Arrow":
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++-                    dc.SetPen(wx.Pen(shadowcolour, 5*log(self.scale+1)))
+++                    dc.SetPen(wx.Pen(shadowcolour, int(5*log(self.scale+1))))
++                     dc.SetBrush(wx.Brush(shadowcolour))
++                     shadowdistance = 2.0*self.scale
++-                    dc.DrawLine(newx + shadowdistance, newy + shadowdistance,
++-                                xarr + shadowdistance, yarr + shadowdistance)
++-
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance)])
+++                    dc.DrawLine(int(newx + shadowdistance), int(newy + shadowdistance),
+++                                int(xarr + shadowdistance), int(yarr + shadowdistance))
+++
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++                 else:
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++                     dc.SetBrush(wx.Brush(shadowcolour))
++-                    dc.SetPen(wx.Pen(shadowcolour, 1.0))
+++                    dc.SetPen(wx.Pen(shadowcolour, 1))
++                     shadowdistance = 1.5*self.scale
++ 
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance),
++-                                    (x4+shadowdistance, y4+shadowdistance)])
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance),
+++                              (x4+shadowdistance, y4+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++ 
++             if handstyle == "Arrow":
++ 
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++-                dc.SetPen(wx.Pen(handcolour, 5*log(self.scale+1)))
+++                dc.SetPen(wx.Pen(handcolour, int(5*log(self.scale+1))))
++                 # Draw The "Hand", An Arrow
++-                dc.DrawLine(newx, newy, xarr, yarr)
+++                dc.DrawLine(int(newx), int(newy), int(xarr), int(yarr))
++ 
++                 # Draw The Arrow Pointer
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3)])
+++                points = [(x1, y1), (x2, y2), (x3, y3)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++             else:
++ 
++                 # Draw The Hand Pointer
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3), (x4, y4)])
+++                points = [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++ 
++     def SetIntervals(self, intervals=None):
++@@ -1527,7 +1537,7 @@ def SetMiddleTextFont(self, font=None):
++ 
++         if font is None:
++             self._middletextfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._middletextsize = 10.0
+++            self._middletextsize = 10
++             self._middletextfont.SetPointSize(self._middletextsize)
++         else:
++             self._middletextfont = font
++@@ -1599,7 +1609,7 @@ def CircleCoords(self, radius, angle, centerX, centerY):
++         x = radius*cos(angle) + centerX
++         y = radius*sin(angle) + centerY
++ 
++-        return x, y
+++        return int(x), int(y)
++ 
++ 
++     def GetIntersection(self, current, intervals):
++diff --git a/wx/lib/agw/supertooltip.py b/wx/lib/agw/supertooltip.py
++index a92ce10d1..cd0f0c9f7 100644
++--- a/wx/lib/agw/supertooltip.py
+++++ b/wx/lib/agw/supertooltip.py
++@@ -295,8 +295,8 @@ def OnPaint(self, event):
++ 
++         # Get the user options for header, bitmaps etc...
++         drawHeader, drawFooter = classParent.GetDrawHeaderLine(), classParent.GetDrawFooterLine()
++-        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height/2)
++-        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height/2, frameRect.width, frameRect.height/2+1)
+++        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height//2)
+++        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height//2, frameRect.width, frameRect.height//2+1)
++         # Fill the triple-gradient
++         dc.GradientFillLinear(topRect, topColour, middleColour, wx.SOUTH)
++         dc.GradientFillLinear(bottomRect, middleColour, bottomColour, wx.SOUTH)
++@@ -324,9 +324,9 @@ def OnPaint(self, event):
++         normalText = classParent.GetTextColour()
++         if header:
++             dc.SetTextForeground(normalText)
++-            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)/2)
+++            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)//2)
++         if headerBmp and headerBmp.IsOk():
++-            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)/2, True)
+++            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)//2, True)
++ 
++         if header or (headerBmp and headerBmp.IsOk()):
++             yPos += height
++@@ -376,7 +376,7 @@ def OnPaint(self, event):
++                 messageHeight += textHeight
++ 
++                 xText = (bmpWidth + 2 * self._spacing) if bmpWidth > 0 else self._spacing
++-                yText += textHeight/2+self._spacing
+++                yText += textHeight//2+self._spacing
++                 maxWidth = max(xText + textWidth + self._spacing, maxWidth)
++                 dc.DrawText(line, xText, yText)
++                 if isLink:
++@@ -412,8 +412,8 @@ def OnPaint(self, event):
++             if drawFooter:
++                 # Draw the separator line before the footer
++                 dc.SetPen(wx.GREY_PEN)
++-                dc.DrawLine(self._spacing, yPos-self._spacing/2+toAdd,
++-                            width-self._spacing, yPos-self._spacing/2+toAdd)
+++                dc.DrawLine(self._spacing, yPos-self._spacing//2+toAdd,
+++                            width-self._spacing, yPos-self._spacing//2+toAdd)
++         # Draw the footer and footer bitmap (if any)
++         dc.SetTextForeground(normalText)
++         height = max(textHeight, bmpHeight)
++@@ -424,7 +424,7 @@ def OnPaint(self, event):
++             maxWidth = max(bmpXPos + bmpWidth + (self._spacing*2) + textWidth, maxWidth)
++         if footerBmp and footerBmp.IsOk():
++             toAdd = (height - bmpHeight + self._spacing) / 2
++-            dc.DrawBitmap(footerBmp, bmpXPos, yPos + toAdd, True)
+++            dc.DrawBitmap(footerBmp, bmpXPos, int(yPos + toAdd), True)
++             maxWidth = max(footerBmp.GetSize().GetWidth() + bmpXPos, maxWidth)
++ 
++         maxHeight = yPos + height + toAdd
++@@ -815,7 +815,7 @@ def SetStartDelay(self, delay=1):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._startDelayTime = float(delay)
+++        self._startDelayTime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -831,7 +831,7 @@ def SetEndDelay(self, delay=1e6):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._endDelayTime = float(delay)
+++        self._endDelayTime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/toasterbox.py b/wx/lib/agw/toasterbox.py
++index b73429dd2..8efb5869b 100644
++--- a/wx/lib/agw/toasterbox.py
+++++ b/wx/lib/agw/toasterbox.py
++@@ -1316,11 +1316,11 @@ def _getTextCoords(self, dc):
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++             fh += h + textPadding
++-        y = (th - fh) / 2; coords = []
+++        y = (th - fh) // 2; coords = []
++ 
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++-            x = (tw - w) / 2
+++            x = (tw - w) // 2
++             coords.append((x, y))
++             y += h + textPadding
++ 
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index 14fc41f86..caa5e5cf4 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -914,7 +914,7 @@ def Draw(self, index, dc, x, y, flags, solidBackground=True):
++             raise Exception("Wrong index in image list")
++ 
++         bmp = self._images[index]
++-        dc.DrawBitmap(bmp, x, y, (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
+++        dc.DrawBitmap(bmp, x, int(y), (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
++ 
++         return True
++ 
++@@ -4022,7 +4022,7 @@ def SetPosition(self, x, y, spacing):
++ 
++             if item.HasImage():
++ 
++-                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)/2
+++                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)//2
++                 self._gi._rectIcon.y = self._gi._rectAll.y + 4
++ 
++             if item.HasText():
++@@ -4030,7 +4030,7 @@ def SetPosition(self, x, y, spacing):
++                 if self._gi._rectLabel.width > spacing:
++                     self._gi._rectLabel.x = self._gi._rectAll.x + 2
++                 else:
++-                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing/2) - (self._gi._rectLabel.width/2)
+++                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing//2) - (self._gi._rectLabel.width//2)
++ 
++                 self._gi._rectLabel.y = self._gi._rectAll.y + self._gi._rectAll.height + 2 - self._gi._rectLabel.height
++                 self._gi._rectHighlight.x = self._gi._rectLabel.x - 2
++@@ -4546,7 +4546,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 checked = item.IsChecked()
++-                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)/2, item.GetKind(), checked, enabled)
+++                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)//2, item.GetKind(), checked, enabled)
++                 xOld += ix
++                 width -= ix
++ 
++@@ -4557,7 +4557,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 for img in images:
++ 
++                     ix, iy = self._owner.GetImageSize([img])
++-                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)/2, enabled)
+++                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)//2, enabled)
++ 
++                     xOld += ix
++                     width -= ix
++@@ -5230,7 +5230,7 @@ def OnPaint(self, event):
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 # We draw it on the left, always
++-                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)/2, kind, checked, enabled)
+++                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)//2, kind, checked, enabled)
++                 wcheck += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++                 cw -= ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++ 
++@@ -6819,7 +6819,7 @@ def HitTestLine(self, line, x, y):
++                     # We got a checkbox-type item
++                     ix, iy = self.GetCheckboxImageSize()
++                     LH = self.GetLineHeight(line)
++-                    rect = wx.Rect(xOld, lineY + LH/2 - iy/2, ix, iy)
+++                    rect = wx.Rect(xOld, lineY + LH//2 - iy//2, ix, iy)
++                     if rect.Contains((x, y)):
++                         newItem = self.GetParent().GetItem(line, col)
++                         return newItem, ULC_HITTEST_ONITEMCHECK
++@@ -7937,13 +7937,13 @@ def MoveToItem(self, item):
++                     while start_y > view_y:
++                         start_y -= SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, start_y/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, start_y//SCROLL_UNIT_Y)
++ 
++                 if start_y + height > view_y + client_h:
++                     while start_y + height < view_y + client_h:
++                         start_y += SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)//SCROLL_UNIT_Y)
++ 
++         else: # !report
++ 
++@@ -7960,7 +7960,7 @@ def MoveToItem(self, item):
++             if rect.y + rect.height - 5 > view_y + client_h:
++                 sy = (rect.y + rect.height - client_h + hLine)/hLine
++ 
++-            self.Scroll(sx, sy)
+++            self.Scroll(int(sx), int(sy))
++ 
++ 
++ # ----------------------------------------------------------------------------
++diff --git a/wx/lib/agw/xlsgrid.py b/wx/lib/agw/xlsgrid.py
++index b505aebb4..17267fabc 100644
++--- a/wx/lib/agw/xlsgrid.py
+++++ b/wx/lib/agw/xlsgrid.py
++@@ -965,7 +965,7 @@ def Draw(self, dc, rect):
++             xp = xc - (text_width/2)*xshift - (text_height/2)*yshift
++             yp = yc + (text_width/2)*yshift - (text_height/2)*xshift
++ 
++-            dc.DrawRotatedText(value, xp, yp, self.rotation)
+++            dc.DrawRotatedText(value, int(xp), int(yp), self.rotation)
++ 
++         else:
++ 
++@@ -1125,7 +1125,7 @@ def Draw(self, dc, rect):
++             if font.escapement == 1:
++                 ypos = ypos - maxH + height
++ 
++-            dc.DrawText(chunk, start, ypos)
+++            dc.DrawText(chunk, start, int(ypos))
++             start += width
++ 
++ 
++diff --git a/wx/lib/agw/zoombar.py b/wx/lib/agw/zoombar.py
++index 1e6ec5da3..8c2afd058 100644
++--- a/wx/lib/agw/zoombar.py
+++++ b/wx/lib/agw/zoombar.py
++@@ -463,7 +463,7 @@ def SetSize(self, width, height):
++     def GetPosition(self):
++         """ Returns the button position. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -601,7 +601,7 @@ def __init__(self, bitmap=None):
++     def GetPosition(self):
++         """ Returns the position of :class:`wx.ImageBar`, as a :class:`wx.Point`. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -660,7 +660,7 @@ def SetBarColour(self, colour, xSize=None, ySize=None):
++         if xSize is not None:
++             self._size = wx.Size(xSize, ySize)
++ 
++-        bitmap.Rescale(self._size.width, self._size.height/2)
+++        bitmap.Rescale(self._size.width, self._size.height//2)
++ 
++         r1, g1, b1 = self._startColour.Red(), self._startColour.Green(), self._startColour.Blue()
++         r2, g2, b2 = colour.Red(), colour.Green(), colour.Blue()
++@@ -1065,7 +1065,7 @@ def ResetSize(self):
++             ySize += yextent
++ 
++         if self._showReflections:
++-            ySize += self._buttonSize/2
+++            ySize += self._buttonSize//2
++         if self._centerZoom:
++             ySize += self._buttonSize
++ 
++@@ -1240,7 +1240,7 @@ def DrawLabels(self, dc):
++             textWidth, textHeight = dc.GetTextExtent(label)
++             buttonPos = button.GetPosition()
++             buttonSize = button.GetSize()
++-            xpos = buttonPos.x + (buttonSize.width - textWidth)/2
+++            xpos = buttonPos.x + (buttonSize.width - textWidth)//2
++             ypos = buttonPos.y - textHeight - 2
++ 
++             dc.DrawRectangle(xpos-2, ypos-1, textWidth+4, textHeight+2)
++diff --git a/wx/lib/analogclock/analogclock.py b/wx/lib/analogclock/analogclock.py
++index 7c4b18979..1ee1d6742 100644
++--- a/wx/lib/analogclock/analogclock.py
+++++ b/wx/lib/analogclock/analogclock.py
++@@ -173,7 +173,7 @@ def _recalcCoords(self, size):
++         scale = min([float(size.width) / self.basesize.width,
++                      float(size.height) / self.basesize.height])
++ 
++-        centre = wx.Point(size.width / 2., size.height / 2.)
+++        centre = wx.Point(size.width // 2, size.height // 2)
++ 
++         self.Box.RecalcCoords(size, centre, scale)
++         self.Hands.RecalcCoords(size, centre, scale)
++diff --git a/wx/lib/analogclock/helpers.py b/wx/lib/analogclock/helpers.py
++index 88d198bee..9674de912 100644
++--- a/wx/lib/analogclock/helpers.py
+++++ b/wx/lib/analogclock/helpers.py
++@@ -37,7 +37,7 @@ def __init__(self, idx=0, pos=None, size=None, offset=0, clocksize=None,
++ 
++ 
++     def _pol2rect(self, m, t):
++-        return m * math.cos(math.radians(t)), m * math.sin(math.radians(t))
+++        return int(m * math.cos(math.radians(t))), int(m * math.sin(math.radians(t)))
++ 
++ 
++     def _rect2pol(self, x, y):
++@@ -174,7 +174,7 @@ def __init__(self, **kwargs):
++ 
++     def Draw(self, dc):
++         self.dyer.Select(dc)
++-        dc.DrawCircle(self.pos.x, self.pos.y, self.radius)
+++        dc.DrawCircle(self.pos.x, self.pos.y, int(self.radius))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -205,7 +205,7 @@ def Draw(self, dc, end, offset=0):
++             m, t = self._rect2pol(x, y)
++             polygon[i] = self._pol2rect(m, t - angle)
++ 
++-        dc.DrawPolygon(polygon, centre.x + offset, centre.y + offset)
+++        dc.DrawPolygon(polygon, int(centre.x + offset), int(centre.y + offset))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -226,7 +226,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawRectangle(x + offset, y + offset, width, height)
+++        dc.DrawRectangle(int(x + offset), int(y + offset), int(width), int(height))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -242,7 +242,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x
++         y = self.pos.y
++ 
++-        dc.DrawCircle(x + offset, y + offset, radius)
+++        dc.DrawCircle(int(x + offset), int(y + offset), int(radius))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -273,7 +273,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -290,7 +290,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -309,7 +309,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawText(self.text, x + offset, y + offset)
+++        dc.DrawText(self.text, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -321,7 +321,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawRotatedText(self.text, x + offset, y + offset, angle)
+++        dc.DrawRotatedText(self.text, int(x + offset), int(y + offset), int(angle))
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -656,7 +656,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++ 
++         # Try to find a 'good' max size for text-based ticks.
++         if a_tick.text is not None:
++-            self.font.SetPointSize(size)
+++            self.font.SetPointSize(int(size))
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(*clocksize.Get()))
++             dc.SetFont(self.font)
++@@ -686,7 +686,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++             x = centre.x + radius * math.sin(angle)
++             y = centre.y + radius * math.cos(angle)
++ 
++-            tick.SetPosition(wx.Point(x, y))
+++            tick.SetPosition(wx.Point(int(x), int(y)))
++ 
++ 
++     def GetSize(self):
++diff --git a/wx/lib/analogclock/setup.py b/wx/lib/analogclock/setup.py
++index a83c8639d..a7dffb901 100644
++--- a/wx/lib/analogclock/setup.py
+++++ b/wx/lib/analogclock/setup.py
++@@ -179,7 +179,7 @@ def __init__(self, parent, title, group="Hands"):
++         p.SetCustomColours(self.customcolours)
++         sizer.Add(p, pos=(0, 1), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.bw = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.bw = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(0, 2), span=(1, 2), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -193,7 +193,7 @@ def __init__(self, parent, title, group="Hands"):
++         p = self.ls = wx.StaticText(self, label="Size:")
++         sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.sz = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.sz = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -212,7 +212,7 @@ def __init__(self, parent, title, group="Ticks"):
++         p = wx.StaticText(self, label="Offset:")
++         sizer.Add(p, pos=(3, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.of = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.of = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(3, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++diff --git a/wx/lib/buttons.py b/wx/lib/buttons.py
++index 46d1b8747..f01a54d41 100644
++--- a/wx/lib/buttons.py
+++++ b/wx/lib/buttons.py
++@@ -453,7 +453,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         tw, th = dc.GetTextExtent(label)
++         if not self.up:
++             dx = dy = self.labelDelta
++-        dc.DrawText(label, (width-tw)/2+dx, (height-th)/2+dy)
+++        dc.DrawText(label, (width-tw)//2+dx, (height-th)//2+dy)
++ 
++ 
++     def DrawFocusIndicator(self, dc, w, h):
++@@ -844,7 +844,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++         hasMask = bmp.GetMask() != None
++-        dc.DrawBitmap(bmp, (width-bw)/2+dx, (height-bh)/2+dy, hasMask)
+++        dc.DrawBitmap(bmp, (width-bw)//2+dx, (height-bh)//2+dy, hasMask)
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -926,12 +926,12 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++ 
++-        pos_x = (width-bw-tw)/2+dx      # adjust for bitmap and text to centre
+++        pos_x = (width-bw-tw)//2+dx      # adjust for bitmap and text to centre
++         if bmp is not None:
++-            dc.DrawBitmap(bmp, pos_x, (height-bh)/2+dy, hasMask) # draw bitmap if available
+++            dc.DrawBitmap(bmp, pos_x, (height-bh)//2+dy, hasMask) # draw bitmap if available
++             pos_x = pos_x + 2   # extra spacing from bitmap
++ 
++-        dc.DrawText(label, pos_x + dx+bw, (height-th)/2+dy)      # draw the text
+++        dc.DrawText(label, pos_x + dx+bw, (height-th)//2+dy)      # draw the text
++ 
++ 
++ #----------------------------------------------------------------------
++diff --git a/wx/lib/colourchooser/pycolourchooser.py b/wx/lib/colourchooser/pycolourchooser.py
++index 61dbc02d2..124376483 100644
++--- a/wx/lib/colourchooser/pycolourchooser.py
+++++ b/wx/lib/colourchooser/pycolourchooser.py
++@@ -188,7 +188,7 @@ def __init__(self, parent, id):
++         self.colour_slider.Bind(wx.EVT_MOTION, self.onSliderMotion)
++         self.slider = wx.Slider(
++                         self, self.idSCROLL, 86, 0, self.colour_slider.HEIGHT - 1,
++-                        style=wx.SL_VERTICAL, size=(15, self.colour_slider.HEIGHT)
+++                        style=wx.SL_VERTICAL, size=(-1, self.colour_slider.HEIGHT)
++                         )
++ 
++         self.Bind(wx.EVT_COMMAND_SCROLL, self.onScroll, self.slider)
++@@ -338,7 +338,7 @@ def setSliderToV(self, v):
++         min = self.slider.GetMin()
++         max = self.slider.GetMax()
++         val = (1 - v) * max
++-        self.slider.SetValue(val)
+++        self.slider.SetValue(int(val))
++ 
++     def getVFromSlider(self):
++         """Get the current value of "V" from the v slider."""
++diff --git a/wx/lib/colourchooser/pypalette.py b/wx/lib/colourchooser/pypalette.py
++index ff1fb840c..71b9fc2df 100644
++--- a/wx/lib/colourchooser/pypalette.py
+++++ b/wx/lib/colourchooser/pypalette.py
++@@ -165,7 +165,7 @@ def DrawBuffer(self):
++             colour = wx.Colour(0, 0, 0)
++             self.buffer.SetPen(wx.Pen(colour, 1, wx.PENSTYLE_SOLID))
++             self.buffer.SetBrush(wx.Brush(colour, wx.BRUSHSTYLE_TRANSPARENT))
++-            self.buffer.DrawCircle(self.point[0], self.point[1], 3)
+++            self.buffer.DrawCircle(int(self.point[0]), int(self.point[1]), 3)
++ 
++     def HighlightPoint(self, x, y):
++         """Highlights an area of the palette with a little circle around
++diff --git a/wx/lib/floatcanvas/FCObjects.py b/wx/lib/floatcanvas/FCObjects.py
++index 58becd38c..cdf8cc53e 100644
++--- a/wx/lib/floatcanvas/FCObjects.py
+++++ b/wx/lib/floatcanvas/FCObjects.py
++@@ -296,7 +296,7 @@ def SetPen(self, LineColor, LineStyle, LineWidth):
++         else:
++             self.Pen = self.PenList.setdefault(
++                 (LineColor, LineStyle, LineWidth),
++-                wx.Pen(LineColor, LineWidth, self.LineStyleList[LineStyle]))
+++                wx.Pen(LineColor, int(LineWidth), self.LineStyleList[LineStyle]))
++ 
++     def SetHitBrush(self, HitColor):
++         """
++@@ -1202,14 +1202,14 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++             x = xc - Size/2.0
++             y = yc - Size/2.0
++             dc.SetBrush(self.Brush)
++-            dc.DrawRectangle(x, y, Size, Size)
+++            dc.DrawRectangle(int(x), int(y), Size, Size)
++         if HTdc and self.HitAble:
++             HTdc.SetPen(self.HitPen)
++             if self.Size <= 1:
++                 HTdc.DrawPoint(xc, xc)
++             else:
++                 HTdc.SetBrush(self.HitBrush)
++-                HTdc.DrawRectangle(x, y, Size, Size)
+++                HTdc.DrawRectangle(int(x), int(y), Size, Size)
++ 
++ class RectEllipse(XYObjectMixin, LineAndFillMixin, DrawObject):
++     """A RectEllipse draw object."""
++@@ -2161,7 +2161,7 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++         W = H * (self.bmpWidth / self.bmpHeight)
++         if (self.ScaledBitmap is None) or (H != self.ScaledHeight) :
++             self.ScaledHeight = H
++-            Img = self.Image.Scale(W, H)
+++            Img = self.Image.Scale(int(W), int(H))
++             self.ScaledBitmap = wx.Bitmap(Img)
++ 
++         XY = self.ShiftFun(XY[0], XY[1], W, H)
++diff --git a/wx/lib/gizmos/ledctrl.py b/wx/lib/gizmos/ledctrl.py
++index f185d5105..7f4d3fcf9 100644
++--- a/wx/lib/gizmos/ledctrl.py
+++++ b/wx/lib/gizmos/ledctrl.py
++@@ -293,7 +293,7 @@ def _drawDigit(self, dc, digit, column):
++ 
++         if digit & c.COLON:
++             dc.SetBrush(wx.Brush(lineColor))
++-            centerX = XPos + (self.m_lineLength + self.m_digitMargin) / 2
++-            radius = self.m_lineWidth / 2
++-            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) / 2, radius)
++-            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 / 4, radius)
+++            centerX = XPos + (self.m_lineLength + self.m_digitMargin) // 2
+++            radius = self.m_lineWidth // 2
+++            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) // 2, radius)
+++            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 // 4, radius)
++diff --git a/wx/lib/imagebrowser.py b/wx/lib/imagebrowser.py
++index 795e90dca..8e14727e7 100644
++--- a/wx/lib/imagebrowser.py
+++++ b/wx/lib/imagebrowser.py
++@@ -347,8 +347,8 @@ def DrawImage(self, dc):
++         owidth = int(scale*iwidth)
++         oheight = int(scale*iheight)
++ 
++-        diffx = (wwidth - owidth)/2   # center calc
++-        diffy = (wheight - oheight)/2   # center calc
+++        diffx = (wwidth - owidth)//2   # center calc
+++        diffy = (wheight - oheight)//2   # center calc
++ 
++         if not bmp:
++             if owidth!=iwidth or oheight!=iheight:
++diff --git a/wx/lib/ogl/basic.py b/wx/lib/ogl/basic.py
++index b08859ab9..0107f21fc 100644
++--- a/wx/lib/ogl/basic.py
+++++ b/wx/lib/ogl/basic.py
++@@ -1051,7 +1051,7 @@ def OnEraseContents(self, dc):
++         dc.SetPen(self.GetBackgroundPen())
++         dc.SetBrush(self.GetBackgroundBrush())
++ 
++-        dc.DrawRectangle(topLeftX - penWidth, topLeftY - penWidth, maxX + penWidth * 2 + 4, maxY + penWidth * 2 + 4)
+++        dc.DrawRectangle(int(topLeftX - penWidth), int(topLeftY - penWidth), int(maxX + penWidth * 2 + 4), int(maxY + penWidth * 2 + 4))
++ 
++     def EraseLinks(self, dc, attachment = -1, recurse = False):
++         """
++@@ -2769,9 +2769,9 @@ def OnDraw(self, dc):
++             dc.SetBrush(self._brush)
++ 
++         if self._cornerRadius:
++-            dc.DrawRoundedRectangle(x1, y1, self._width, self._height, self._cornerRadius)
+++            dc.DrawRoundedRectangle(int(x1), int(y1), self._width, self._height, self._cornerRadius)
++         else:
++-            dc.DrawRectangle(x1, y1, self._width, self._height)
+++            dc.DrawRectangle(int(x1), int(y1), self._width, self._height)
++ 
++     def GetBoundingBoxMin(self):
++         """Get the bounding box minimum."""
++@@ -2882,7 +2882,7 @@ def Create(self, the_points = None):
++             # Duplicate the list of points
++             self._points = []
++             for point in the_points:
++-                new_point = wx.Point(point[0], point[1])
+++                new_point = wx.Point(int(point[0]), int(point[1]))
++                 self._points.append(new_point)
++             self.CalculateBoundingBox()
++             self._originalWidth = self._boundWidth
++@@ -3444,7 +3444,7 @@ def OnDraw(self, dc):
++                 dc.SetPen(self._pen)
++         if self._brush:
++             dc.SetBrush(self._brush)
++-        dc.DrawEllipse(self._xpos - self.GetWidth() / 2.0, self._ypos - self.GetHeight() / 2.0, self.GetWidth(), self.GetHeight())
+++        dc.DrawEllipse(int(self._xpos - self.GetWidth() / 2.0), int(self._ypos - self.GetHeight() / 2.0), self.GetWidth(), self.GetHeight())
++ 
++     def SetSize(self, x, y, recursive = True):
++         """
++diff --git a/wx/lib/ogl/bmpshape.py b/wx/lib/ogl/bmpshape.py
++index ee2859527..e53ddb136 100644
++--- a/wx/lib/ogl/bmpshape.py
+++++ b/wx/lib/ogl/bmpshape.py
++@@ -32,7 +32,7 @@ def OnDraw(self, dc):
++ 
++         x = self._xpos - self._bitmap.GetWidth() / 2.0
++         y = self._ypos - self._bitmap.GetHeight() / 2.0
++-        dc.DrawBitmap(self._bitmap, x, y, True)
+++        dc.DrawBitmap(self._bitmap, int(x), int(y), True)
++ 
++     def SetSize(self, w, h, recursive = True):
++         """
++diff --git a/wx/lib/ogl/composit.py b/wx/lib/ogl/composit.py
++index c3b623952..eecaafb3f 100644
++--- a/wx/lib/ogl/composit.py
+++++ b/wx/lib/ogl/composit.py
++@@ -1131,11 +1131,11 @@ def OnDraw(self, dc):
++ 
++         if self._leftSide:
++             dc.SetPen(self._leftSidePen)
++-            dc.DrawLine(x1, y2, x1, y1)
+++            dc.DrawLine(int(x1), int(y2), int(x1), int(y1))
++ 
++         if self._topSide:
++             dc.SetPen(self._topSidePen)
++-            dc.DrawLine(x1, y1, x2, y1)
+++            dc.DrawLine(int(x1), int(y1), int(x2), int(y1))
++ 
++         # For testing purposes, draw a rectangle so we know
++         # how big the division is.
++diff --git a/wx/lib/ogl/divided.py b/wx/lib/ogl/divided.py
++index 0bfb1919f..0809be58c 100644
++--- a/wx/lib/ogl/divided.py
+++++ b/wx/lib/ogl/divided.py
++@@ -231,7 +231,7 @@ def OnDrawContents(self, dc):
++                 regionPen = region.GetActualPen()
++                 if regionPen:
++                     dc.SetPen(regionPen)
++-                    dc.DrawLine(leftX, y, rightX, y)
+++                    dc.DrawLine(int(leftX), int(y), int(rightX), int(y))
++ 
++             currentY = actualY
++ 
++diff --git a/wx/lib/ogl/lines.py b/wx/lib/ogl/lines.py
++index 948b85d82..50c07e046 100644
++--- a/wx/lib/ogl/lines.py
+++++ b/wx/lib/ogl/lines.py
++@@ -1200,7 +1200,7 @@ def OnDraw(self, dc):
++ 
++         points = []
++         for point in self._lineControlPoints:
++-            points.append(wx.Point(point[0], point[1]))
+++            points.append(wx.Point(int(point[0]), int(point[1])))
++ 
++         if self._isSpline:
++             dc.DrawSpline(points)
++diff --git a/wx/lib/ogl/oglmisc.py b/wx/lib/ogl/oglmisc.py
++index 8588a72b7..a8be3fc53 100644
++--- a/wx/lib/ogl/oglmisc.py
+++++ b/wx/lib/ogl/oglmisc.py
++@@ -300,10 +300,10 @@ def DrawFormattedText(dc, text_list, xpos, ypos, width, height, formatMode):
++         yoffset = ypos - height / 2.0
++ 
++     # +1 to allow for rounding errors
++-    dc.SetClippingRegion(xpos - width / 2.0, ypos - height / 2.0, width + 1, height + 1)
+++    dc.SetClippingRegion(int(xpos - width / 2.0), int(ypos - height / 2.0), int(width + 1), int(height + 1))
++ 
++     for line in text_list:
++-        dc.DrawText(line.GetText(), xoffset + line.GetX(), yoffset + line.GetY())
+++        dc.DrawText(line.GetText(), int(xoffset + line.GetX()), int(yoffset + line.GetY()))
++ 
++     dc.DestroyClippingRegion()
++ 
++diff --git a/wx/lib/plot/examples/demo.py b/wx/lib/plot/examples/demo.py
++index 98fbaad3a..02bec1d9f 100644
++--- a/wx/lib/plot/examples/demo.py
+++++ b/wx/lib/plot/examples/demo.py
++@@ -984,7 +984,7 @@ def DrawPointLabel(self, dc, mDataDict):
++ 
++         sx, sy = mDataDict["scaledXY"]  # scaled x,y of closest point
++         # 10by10 square centered on point
++-        dc.DrawRectangle(sx - 5, sy - 5, 10, 10)
+++        dc.DrawRectangle(int(sx - 5), int(sy - 5), 10, 10)
++         px, py = mDataDict["pointXY"]
++         cNum = mDataDict["curveNum"]
++         pntIn = mDataDict["pIndex"]
++@@ -992,7 +992,7 @@ def DrawPointLabel(self, dc, mDataDict):
++         # make a string to display
++         s = "Crv# %i, '%s', Pt. (%.2f,%.2f), PtInd %i" % (
++             cNum, legend, px, py, pntIn)
++-        dc.DrawText(s, sx, sy + 1)
+++        dc.DrawText(s, int(sx), int(sy + 1))
++ 
++ 
++ def run_demo():
++diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py
++index dd3f77d52..abee47efb 100644
++--- a/wx/lib/plot/plotcanvas.py
+++++ b/wx/lib/plot/plotcanvas.py
++@@ -174,24 +174,24 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++ 
++         # Default Pens
++         self._gridPen = wx.Pen(wx.Colour(180, 180, 180, 255),
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_DOT)
++ 
++         self._centerLinePen = wx.Pen(wx.RED,
++-                                     self._pointSize[0],
+++                                     int(self._pointSize[0]),
++                                      wx.PENSTYLE_SHORT_DASH)
++ 
++         self._axesPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++ 
++         self._tickPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++         self._tickLength = tuple(-x * 2 for x in self._pointSize)
++ 
++         self._diagonalPen = wx.Pen(wx.BLUE,
++-                                   self._pointSize[0],
+++                                   int(self._pointSize[0]),
++                                    wx.PENSTYLE_DOT_DASH)
++ 
++     def SetCursor(self, cursor):
++@@ -1925,10 +1925,10 @@ def _Draw(self, graphics, xAxis=None, yAxis=None, dc=None):
++         # set clipping area so drawing does not occur outside axis box
++         ptx, pty, rectWidth, rectHeight = self._point2ClientCoord(p1, p2)
++         # allow graph to overlap axis lines by adding units to w and h
++-        dc.SetClippingRegion(ptx * self._pointSize[0],
++-                             pty * self._pointSize[1],
++-                             rectWidth * self._pointSize[0] + 2,
++-                             rectHeight * self._pointSize[1] + 1)
+++        dc.SetClippingRegion(int(ptx * self._pointSize[0]),
+++                             int(pty * self._pointSize[1]),
+++                             int(rectWidth * self._pointSize[0] + 2),
+++                             int(rectHeight * self._pointSize[1] + 1))
++         # Draw the lines and markers
++ #        start = _time.perf_counter()
++         graphics.draw(dc)
++@@ -2280,7 +2280,7 @@ def _drawLegend(self, dc, graphics, rhsW, topH, legendBoxWH,
++             pnt = ((trhc[0] + legendLHS + legendSymExt[0]
++                     + 5 * self._pointSize[0]),
++                    trhc[1] + s + lineHeight / 2. - legendTextExt[1] / 2)
++-            dc.DrawText(o.getLegend(), pnt[0], pnt[1])
+++            dc.DrawText(o.getLegend(), int(pnt[0]), int(pnt[1]))
++         dc.SetFont(self._getFont(self._fontSizeAxis))  # reset
++ 
++     def _titleLablesWH(self, dc, graphics):
++@@ -2329,7 +2329,7 @@ def _drawRubberBand(self, corner1, corner2):
++         dc.SetPen(wx.Pen(wx.BLACK))
++         dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_TRANSPARENT))
++         dc.SetLogicalFunction(wx.INVERT)
++-        dc.DrawRectangle(ptx, pty, rectWidth, rectHeight)
+++        dc.DrawRectangle(int(ptx), int(pty), int(rectWidth), int(rectHeight))
++         dc.SetLogicalFunction(wx.COPY)
++ 
++     def _getFont(self, size):
++@@ -2423,7 +2423,7 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.gridPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         x, y, width, height = self._point2ClientCoord(p1, p2)
++@@ -2432,13 +2432,13 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++             if self.enableGrid[0]:
++                 for x, _ in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0], pt[1] - height)
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - height))
++ 
++         if self._ySpec != 'none':
++             if self.enableGrid[1]:
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0] + width, pt[1])
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0] + width), int(pt[1]))
++ 
++     @TempStyle('pen')
++     def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2471,7 +2471,7 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.tickPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         # lengthen lines for printing
++@@ -2484,13 +2484,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] - xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - xTickLength)))
++                 dc.DrawLineList(lines)
++             if ticks.top:
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] + xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] + xTickLength)))
++                 dc.DrawLineList(lines)
++ 
++         if self.ySpec != 'none':
++@@ -2498,13 +2498,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] + yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] + yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++             if ticks.right:
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] - yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] - yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++ 
++     @TempStyle('pen')
++@@ -2531,25 +2531,25 @@ def _drawCenterLines(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.centerLinePen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._centerLinesEnabled in ('Horizontal', True):
++             y1 = scale[1] * p1[1] + shift[1]
++             y2 = scale[1] * p2[1] + shift[1]
++             y = (y1 - y2) / 2.0 + y2
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        y,
++-                        scale[0] * p2[0] + shift[0],
++-                        y)
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(y),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(y))
++         if self._centerLinesEnabled in ('Vertical', True):
++             x1 = scale[0] * p1[0] + shift[0]
++             x2 = scale[0] * p2[0] + shift[0]
++             x = (x1 - x2) / 2.0 + x2
++-            dc.DrawLine(x,
++-                        scale[1] * p1[1] + shift[1],
++-                        x,
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(x),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(x),
+++                        int(scale[1] * p2[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawDiagonals(self, dc, p1, p2, scale, shift):
++@@ -2575,19 +2575,19 @@ def _drawDiagonals(self, dc, p1, p2, scale, shift):
++         """
++         pen = self.diagonalPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._diagonalsEnabled in ('Bottomleft-Topright', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]))
++         if self._diagonalsEnabled in ('Bottomright-Topleft', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxes(self, dc, p1, p2, scale, shift):
++@@ -2614,7 +2614,7 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.axesPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         axes = self.enableAxes
++@@ -2623,24 +2623,24 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p1[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p1[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.top:
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p2[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p2[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++         if self.ySpec != 'none':
++             if axes.left:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p1[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p1[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.right:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p2[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p2[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2686,8 +2686,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] + 2 * self._pointSize[1] - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] + 2 * self._pointSize[1] - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2698,8 +2698,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w, h = dc.GetTextExtent(label)
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] - 2 * self._pointSize[1] - h - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] - 2 * self._pointSize[1] - h - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2712,8 +2712,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] - w - 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] - w - 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2725,8 +2725,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] + 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] + 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2785,7 +2785,7 @@ def _drawPlotTitle(self, dc, graphics, lhsW, rhsW, titleWH):
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - titleWH[0] / 2.,
++             self.plotbox_origin[1] - self.plotbox_size[1]
++         )
++-        dc.DrawText(graphics.title, titlePos[0], titlePos[1])
+++        dc.DrawText(graphics.title, int(titlePos[0]), int(titlePos[1]))
++ 
++     def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++                         xLabelWH, yLabelWH):
++@@ -2806,7 +2806,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - xLabelWH[0] / 2.,
++             self.plotbox_origin[1] - xLabelWH[1] - yTickLength
++         )
++-        dc.DrawText(graphics.xLabel, xLabelPos[0], xLabelPos[1])
+++        dc.DrawText(graphics.xLabel, int(xLabelPos[0]), int(xLabelPos[1]))
++         yLabelPos = (
++             self.plotbox_origin[0] - 3 * self._pointSize[0] + xTickLength,
++             self.plotbox_origin[1] - bottomH
++@@ -2814,7 +2814,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++         )
++         if graphics.yLabel:  # bug fix for Linux
++             dc.DrawRotatedText(
++-                graphics.yLabel, yLabelPos[0], yLabelPos[1], 90)
+++                graphics.yLabel, int(yLabelPos[0]), int(yLabelPos[1]), 90)
++ 
++     @TempStyle('pen')
++     def _drawPlotAreaLabels(self, dc, graphics, lhsW, rhsW, titleWH,
++@@ -2942,7 +2942,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++ 
++-            self.sb_hor.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_hor.SetScrollbar(pos, pagesize, int(sbfullrange), pagesize)
++             self._sb_xunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++@@ -2964,7 +2964,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++             pos = (sbfullrange - 1 - pos - pagesize)
++-            self.sb_vert.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_vert.SetScrollbar(int(pos), pagesize, int(sbfullrange), pagesize)
++             self._sb_yunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++diff --git a/wx/lib/plot/polyobjects.py b/wx/lib/plot/polyobjects.py
++index 26a54f8f7..725b0164e 100644
++--- a/wx/lib/plot/polyobjects.py
+++++ b/wx/lib/plot/polyobjects.py
++@@ -417,7 +417,7 @@ def draw(self, dc, printerScale, coord=None):
++ 
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_BUTT)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -518,7 +518,7 @@ def draw(self, dc, printerScale, coord=None):
++         style = self.attributes['style']
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_ROUND)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -590,7 +590,7 @@ def draw(self, dc, printerScale, coord=None):
++         if fillcolour and not isinstance(fillcolour, wx.Colour):
++             fillcolour = wx.Colour(fillcolour)
++ 
++-        dc.SetPen(wx.Pen(colour, width))
+++        dc.SetPen(wx.Pen(colour, int(width)))
++         if fillcolour:
++             dc.SetBrush(wx.Brush(fillcolour, fillstyle))
++         else:
++@@ -618,6 +618,7 @@ def _circle(self, dc, coords, size=1):
++         dc.DrawEllipseList(rect.astype(np.int32))
++ 
++     def _dot(self, dc, coords, size=1):
+++        coords = [(int(c[0]), int(c[1])) for c in coords]
++         dc.DrawPointList(coords)
++ 
++     def _square(self, dc, coords, size=1):
++@@ -699,7 +700,7 @@ def set_pen_and_brush(self, dc, printerScale):
++ 
++         if not isinstance(pencolour, wx.Colour):
++             pencolour = wx.Colour(pencolour)
++-        pen = wx.Pen(pencolour, penwidth, penstyle)
+++        pen = wx.Pen(pencolour, int(penwidth), penstyle)
++         pen.SetCap(wx.CAP_BUTT)
++ 
++         if not isinstance(fillcolour, wx.Colour):
++@@ -790,6 +791,7 @@ def draw(self, dc, printerScale, coord=None):
++                 raise TypeError(err_str.format(type(barwidth)))
++ 
++             rects = [self.calc_rect(x, y, w) for x, y, w in pts]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3])) for r in rects]
++             dc.DrawRectangleList(rects)
++         else:
++             dc.DrawLines(coord)  # draw legend line
++@@ -858,6 +860,8 @@ def draw(self, dc, printerScale, coord=None):
++             rects = [self.calc_rect(y, low, high)
++                      for y, (low, high)
++                      in zip(self.hist, self.bins)]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3]))
+++                     for r in rects]
++ 
++             dc.DrawRectangleList(rects)
++         else:
++@@ -1114,10 +1118,10 @@ def _draw_iqr_box(self, dc, printerScale):
++                                       self.currentShift)
++ 
++         # rectangles are drawn (left, top, width, height) so adjust
++-        iqr_box = [iqr_box[0][0],                   # X (left)
++-                   iqr_box[0][1],                   # Y (top)
++-                   iqr_box[1][0] - iqr_box[0][0],   # Width
++-                   iqr_box[1][1] - iqr_box[0][1]]   # Height
+++        iqr_box = [int(iqr_box[0][0]),                   # X (left)
+++                   int(iqr_box[0][1]),                   # Y (top)
+++                   int(iqr_box[1][0] - iqr_box[0][0]),   # Width
+++                   int(iqr_box[1][1] - iqr_box[0][1])]   # Height
++ 
++         box_pen = wx.Pen(wx.BLACK, 3, wx.PENSTYLE_SOLID)
++         box_brush = wx.Brush(wx.GREEN, wx.BRUSHSTYLE_SOLID)
++@@ -1503,7 +1507,7 @@ def OnPrintPage(self, page):
++         self.graph._setSize(plotAreaW, plotAreaH)
++ 
++         # Set offset and scale
++-        dc.SetDeviceOrigin(pixLeft, pixTop)
+++        dc.SetDeviceOrigin(int(pixLeft), int(pixTop))
++ 
++         # Thicken up pens and increase marker size for printing
++         ratioW = float(plotAreaW) / clientDcSize[0]
++diff --git a/wx/lib/popupctl.py b/wx/lib/popupctl.py
++index 883be5ae5..236501f6d 100644
++--- a/wx/lib/popupctl.py
+++++ b/wx/lib/popupctl.py
++@@ -124,7 +124,7 @@ def Display(self):
++         selfSize = self.GetSize()
++         tcSize = self.ctrl.GetSize()
++ 
++-        pos.x -= (selfSize.width - tcSize.width) / 2
+++        pos.x -= (selfSize.width - tcSize.width) // 2
++         if pos.x + selfSize.width > dSize.width:
++             pos.x = dSize.width - selfSize.width
++         if pos.x < 0:
++diff --git a/wx/lib/scrolledpanel.py b/wx/lib/scrolledpanel.py
++index e4c482af9..1f783ea97 100644
++--- a/wx/lib/scrolledpanel.py
+++++ b/wx/lib/scrolledpanel.py
++@@ -222,4 +222,4 @@ def ScrollChildIntoView(self, child):
++         # if we need to adjust
++         if new_vs_x != -1 or new_vs_y != -1:
++             #print("%s: (%s, %s)" % (self.GetName(), new_vs_x, new_vs_y))
++-            self.Scroll(new_vs_x, new_vs_y)
+++            self.Scroll(int(new_vs_x), int(new_vs_y))
++diff --git a/wx/lib/throbber.py b/wx/lib/throbber.py
++index 9954d6b27..ee8c51209 100644
++--- a/wx/lib/throbber.py
+++++ b/wx/lib/throbber.py
++@@ -200,11 +200,11 @@ def Draw(self, dc):
++         """
++         dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True)
++         if self.overlay and self.showOverlay:
++-            dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True)
+++            dc.DrawBitmap(self.overlay, int(self.overlayX), int(self.overlayY), True)
++         if self.label and self.showLabel:
++-            dc.DrawText(self.label, self.labelX, self.labelY)
+++            dc.DrawText(self.label, int(self.labelX), int(self.labelY))
++             dc.SetTextForeground(wx.WHITE)
++-            dc.DrawText(self.label, self.labelX-1, self.labelY-1)
+++            dc.DrawText(self.label, int(self.labelX-1), int(self.labelY-1))
++ 
++ 
++     def OnPaint(self, event):
++diff --git a/wx/lib/ticker.py b/wx/lib/ticker.py
++index 04abf0d44..4e684b4cd 100644
++--- a/wx/lib/ticker.py
+++++ b/wx/lib/ticker.py
++@@ -86,7 +86,7 @@ def Stop(self):
++     def Start(self):
++         """Starts the text moving"""
++         if not self.timer.IsRunning():
++-            self.timer.Start(1000 / self._fps)
+++            self.timer.Start(1000 // self._fps)
++ 
++ 
++     def IsTicking(self):
++@@ -208,7 +208,7 @@ def DrawText(self, dc):
++             offx = self._offset - self._extent[0]
++         else:
++             offx = self.GetSize()[0] - self._offset
++-        offy = (self.GetSize()[1] - self._extent[1]) / 2 #centered vertically
+++        offy = (self.GetSize()[1] - self._extent[1]) // 2 #centered vertically
++         dc.DrawText(self._text, offx, offy)
++ 
++ 
+
diff --git a/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
new file mode 100644
index 000000000000..88c3ca189647
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
@@ -0,0 +1,57 @@
+From 1d5fd72dff63d62dd19b77e489d4115245d4d453 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 28 2021 02:58:12 +0000
+Subject: Fix more Python 3.10 issues with AGW FlatNotebook (#2035790)
+
+
+---
+
+diff --git a/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+new file mode 100644
+index 0000000..e8b74ac
+--- /dev/null
++++ b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+@@ -0,0 +1,43 @@
++From aa3dca0e40bd0701e82ce40297a982b5b84844dc Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Mon, 27 Dec 2021 19:48:55 -0500
++Subject: [PATCH] Fix additional Python 3.10 issues with AGW FlatNotebook
++
++---
++ wx/lib/agw/flatnotebook.py | 14 +++++++-------
++ 1 file changed, 7 insertions(+), 7 deletions(-)
++
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index d33f71d51..61bc4efb3 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -925,14 +925,14 @@ def DrawButton(dc, rect, focus, upperTabs):
++ 
++     if focus:
++         if upperTabs:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*8)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*8)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*8))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*8))
++         else:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*5)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*5)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*5))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*5))
++     else:
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 2)))
+++        rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 2)))
++ 
++     # Define the top region
++     top = wx.Rect(rect.GetTopLeft(), rightPt)
++@@ -2766,7 +2766,7 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         if pageTextColour is not None:
++             dc.SetTextForeground(pageTextColour)
++ 
++-        dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset, imageYCoord)
+++        dc.DrawText(pc.GetPageText(tabIdx), int(posx + textOffset), imageYCoord)
++ 
++         # draw 'x' on tab (if enabled)
++         if pc.HasAGWFlag(FNB_X_ON_TAB) and tabIdx == pc.GetSelection():
diff --git a/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
new file mode 100644
index 000000000000..6f21ecb7a718
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
@@ -0,0 +1,52 @@
+Backport https://github.com/wxWidgets/Phoenix/pull/1849
+Regarding segfault as in https://github.com/OSGeo/grass/issues/1123
+
+From 5cace47aaece3cc4f2e6ea97d7fd5bb8ed316ac9 Mon Sep 17 00:00:00 2001
+From: Robin Dunn <robin@alldunn.com>
+Date: Wed, 18 Nov 2020 10:52:53 -0800
+Subject: [PATCH] Restore GIL acquisition in wxPseudoDC::FindObjects*
+
+---
+ src/pseudodc.cpp | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/pseudodc.cpp b/src/pseudodc.cpp
+index 5890ed7e2..ed4bcd06a 100644
+--- a/src/pseudodc.cpp
++++ b/src/pseudodc.cpp
+@@ -483,7 +483,7 @@ bool wxPseudoDC::GetIdGreyedOut(int id)
+ // ----------------------------------------------------------------------------
+ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -501,7 +501,6 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+         }
+         pt = pt->GetNext();
+     }
+-    //wxPyEndBlockThreads(blocked);
+     return pyList;
+ }
+ 
+@@ -511,7 +510,7 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+                                   wxCoord radius, const wxColor& bg)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -611,8 +610,7 @@ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+         maskdc.SelectObject(wxNullBitmap);
+         memdc.SelectObject(wxNullBitmap);
+     }
+-    //wxPyEndBlockThreads(blocked);
+-    return pyList;
++     return pyList;
+ }
+ 
+ // ----------------------------------------------------------------------------
diff --git a/srcpkgs/wxPython4/template b/srcpkgs/wxPython4/template
index 554174105a36..afea1b55bf90 100644
--- a/srcpkgs/wxPython4/template
+++ b/srcpkgs/wxPython4/template
@@ -1,7 +1,7 @@
 # Template file for 'wxPython4'
 pkgname=wxPython4
 version=4.0.7
-revision=4
+revision=5
 wrksrc="wxPython-${version}"
 build_style=python3-module
 make_build_args="--skip-build"
@@ -10,6 +10,7 @@ hostmakedepends="pkg-config python3-setuptools python3-pathlib2"
 makedepends="python3-devel wxWidgets-gtk3-devel SDL2-devel webkit2gtk-devel
  gst-plugins-base1-devel"
 depends="python3 python3-six python3-numpy python3-Pillow"
+checkdepends="python3-six python3-numpy python3-Pillow"
 short_desc="WxWidgets GUI toolkit library (Python3 Bindings)"
 maintainer="Jasper Chan <jasperchan515@gmail.com>"
 license="custom:wxWindows"

From 55e2b970f711673740b8bab11a110b7c1bdb8219 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 21:56:03 +0100
Subject: [PATCH 10/17] grass: update to 7.8.7RC1; rebuild against libgdal and
 proj

Version 7.8.7RC1 includes a workaround for a wxPython issue
https://github.com/OSGeo/grass/issues/1971#issuecomment-993622613
---
 srcpkgs/grass/patches/musl-build-fix.patch |  13 +++
 srcpkgs/grass/template                     | 128 +++++++++++++++++----
 2 files changed, 120 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..364ee30be4d9
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,13 @@
+error: unknown type name 'int64_t' patch for musl
+
+diff --git a/include/gis.h b/include/gis.h
+--- a/include/gis.h
++++ b/include/gis.h
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ 
+ 
+ /* Grass and local include files */
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..167faa401385 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,116 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.7RC1
+revision=1
+_binversion=${version//./}
+_binversion=${_binversion:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=/usr/lib
+ --bindir=/usr/bin
+ --libdir=/usr/lib
+ --libexec=/usr/libexec
+ --enable-largefile
+ --with-blas
+ --with-blas-includes=/usr/include
+ --with-bzip2
+ --with-bzlib
+ --with-cairo
+ --with-cxx
+ --with-freetype
+ --with-freetype-includes=/usr/include/freetype2
+ --with-gdal
+ --with-geos
+ --with-glw
+ --with-lapack
+ --with-lapack-includes=/usr/include
+ --with-mysql
+ --with-mysql-includes=/usr/include/mysql
+ --with-netcdf=/usr/bin/nc-config
+ --with-nls
+ --with-openmp
+ --with-postgres
+ --with-postgres-includes=/usr/include/postgresql
+ --with-postgres-libs=/usr/lib/psql14/lib/postgresql
+ --with-proj
+ --with-proj-share=/usr/share
+ --with-pthread
+ --with-python=/usr/bin/python3-config
+ --with-readline
+ --with-regex
+ --with-sqlite
+ --with-wxwidgets"
+hostmakedepends="flex
+ gettext
+ libgdal-tools
+ pkg-config
+ python3-numpy
+ python3-six
+ tar"
+makedepends="bison
+ blas-devel
+ bzip2-devel
+ cairo-devel
+ fftw-devel
+ freetype-devel
+ geos-devel
+ gettext-devel
+ glu-devel
+ lapack-devel
+ libgdal-devel
+ libgomp-devel
+ libmysqlclient-devel
+ libpng-devel
+ libzstd-devel
+ netcdf-devel
+ postgresql-libs-devel
+ proj-devel
+ python3-devel
+ python3-Pillow
+ python3-six
+ readline-devel
+ sqlite-devel
+ tiff-devel
+ zlib-devel"
+depends="libgdal python3-numpy wxPython4"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=fa1d6ccc1fde4cbea0be095256729421c41c1a12bf621fe124d0d2c8e826de6a
 nocross="tries to execute target binaries"
 
+shlib_provides="
+ libgrass_dbmibase.${version%.*}.so
+ libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so
+ libgrass_gproj.${version%.*}.so
+ libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so
+ libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass78 \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binversion}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binversion}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binversion}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binversion}.sh
+
+	vinstall grass.pc 644 usr/share/pkgconfig
+	vinstall gui/icons/grass.desktop 644 usr/share/applications
+
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

From 518855347b8c349bd785d3a09f2187ddbcb62e15 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 11/17] merkaartor: rebuild against libgdal-3.4.1 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 40aae662b0b50210d60e95f651c51bb28ca94565 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 12/17] OpenOrienteering-Mapper: rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From 9886fc9762cc095696b710f46131f82a8c1b2bc0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 13/17] osg: rebuild against libgdal-3.4.1, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From e53136398fbb249babdf955e74060ac09ac6c06f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 14/17] sumo: update to 1.9.2; rebuild against libgdal-3.4.1
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index e760fdd45aee..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=4
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From ca56dfa68167280a92dbd7ade98be04afb2987fe Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 15/17] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 54e00891ab41fa63c0173ee3c28722528bce2368 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 16/17] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 64aa285dbfd20f6eabccc3bf573d440d97f85f00 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 17/17] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (35 preceding siblings ...)
  2022-02-15 22:21 ` ar-jan
@ 2022-02-15 22:50 ` ar-jan
  2022-02-16 19:58 ` ar-jan
                   ` (20 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-15 22:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 208510 bytes --]

From 89816b6d8e6ebc3175615d464ca65b6af905cac2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/17] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 0c60260b4642..b0fcfd04926e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From c580e1d185ecf9ac200de502297820c76bbad4bf Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Feb 2022 14:44:54 +0100
Subject: [PATCH 02/17] New package: librttopo-1.1.0

The RT Topology Library exposes an API to create and manage standard
(ISO 13249 aka SQL/MM) topologies using user-provided data stores.

It is needed to build libspatialite (as of v5.0.1) with tests passing.
---
 common/shlibs              |  1 +
 srcpkgs/librttopo-devel    |  1 +
 srcpkgs/librttopo/template | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 120000 srcpkgs/librttopo-devel
 create mode 100644 srcpkgs/librttopo/template

diff --git a/common/shlibs b/common/shlibs
index b0fcfd04926e..734c16281f0e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4110,3 +4110,4 @@ libawt_xawt.so openjdk17-jre-17.0.1+12_1
 libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
+librttopo.so.1 librttopo-1.1.0_1
diff --git a/srcpkgs/librttopo-devel b/srcpkgs/librttopo-devel
new file mode 120000
index 000000000000..acf3607f5fec
--- /dev/null
+++ b/srcpkgs/librttopo-devel
@@ -0,0 +1 @@
+librttopo
\ No newline at end of file
diff --git a/srcpkgs/librttopo/template b/srcpkgs/librttopo/template
new file mode 100644
index 000000000000..cfc87041e083
--- /dev/null
+++ b/srcpkgs/librttopo/template
@@ -0,0 +1,33 @@
+# Template file for 'librttopo'
+pkgname=librttopo
+version=1.1.0
+revision=1
+wrksrc="${pkgname}"
+build_style=gnu-configure
+hostmakedepends="base-devel autoconf-archive"
+makedepends="base-devel autoconf-archive geos-devel"
+short_desc="RT Topology Library exposes an API for managing standard topologies"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://git.osgeo.org/gitea/rttopo/librttopo"
+distfiles="https://git.osgeo.org/gitea/rttopo/librttopo/archive/librttopo-${version}.tar.gz"
+checksum="2e2fcabb48193a712a6c76ac9a9be2a53f82e32f91a2bc834d9f1b4fa9cd879f"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" geos-devel"
+fi
+
+pre_configure() {
+	autoreconf -if
+}
+
+librttopo-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+		vmove usr/lib/pkgconfig
+	}
+}

From 8524d2af9b245c989de678661cafddb4d94e662c Mon Sep 17 00:00:00 2001
From: Nyx70 <n.y.x@bluewin.ch>
Date: Thu, 26 Nov 2020 18:47:25 +0100
Subject: [PATCH 03/17] New package: libkml-1.3.0

---
 common/shlibs                          |  6 ++++++
 srcpkgs/libkml-devel                   |  1 +
 srcpkgs/libkml/patches/NOUNCRYPT.patch | 17 ++++++++++++++++
 srcpkgs/libkml/template                | 27 ++++++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 120000 srcpkgs/libkml-devel
 create mode 100644 srcpkgs/libkml/patches/NOUNCRYPT.patch
 create mode 100644 srcpkgs/libkml/template

diff --git a/common/shlibs b/common/shlibs
index 734c16281f0e..7cf876600089 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4111,3 +4111,9 @@ libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
 librttopo.so.1 librttopo-1.1.0_1
+libkmlbase.so.1 libkml-1.3.0_1
+libkmldom.so.1 libkml-1.3.0_1
+libkmlengine.so.1 libkml-1.3.0_1
+libkmlregionator.so.1 libkml-1.3.0_1
+libkmlxsd.so.1 libkml-1.3.0_1
+libkmlconvenience.so.1 libkml-1.3.0_1
diff --git a/srcpkgs/libkml-devel b/srcpkgs/libkml-devel
new file mode 120000
index 000000000000..cf12be102f42
--- /dev/null
+++ b/srcpkgs/libkml-devel
@@ -0,0 +1 @@
+libkml
\ No newline at end of file
diff --git a/srcpkgs/libkml/patches/NOUNCRYPT.patch b/srcpkgs/libkml/patches/NOUNCRYPT.patch
new file mode 100644
index 000000000000..5b7e016c0e02
--- /dev/null
+++ b/srcpkgs/libkml/patches/NOUNCRYPT.patch
@@ -0,0 +1,17 @@
+minizip/crypt.h was removed from the packet minizip-1.2.11_2. 
+
+with "#define NOUNCRYPT" libkml can be built without "crypt.h"
+https://github.com/void-linux/void-packages/commit/952ac913cf
+https://github.com/madler/zlib/pull/229
+
+--- a/src/kml/base/contrib/minizip/unzip.c	2015-12-21 18:23:05.000000000 +0100
++++ b/src/kml/base/contrib/minizip/unzip.c	2020-11-26 15:45:55.033835816 +0100
+@@ -42,7 +42,7 @@
+ #include <zlib.h> //RR
+ #include "unzip.h"
+ #include "iomem_simple.h"
+-#undef NOUNCRYPT
++#define NOUNCRYPT
+ 
+ #ifdef STDC
+ #  include <stddef.h>
diff --git a/srcpkgs/libkml/template b/srcpkgs/libkml/template
new file mode 100644
index 000000000000..b67eece4d8ba
--- /dev/null
+++ b/srcpkgs/libkml/template
@@ -0,0 +1,27 @@
+# Template file for 'libkml'
+pkgname=libkml
+version=1.3.0
+revision=1
+build_style=cmake
+makedepends="boost-devel
+ expat-devel
+ minizip-devel
+ uriparser-devel
+ zlib-devel"
+short_desc="Library to manipulate KML OGC files"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/libkml/libkml"
+distfiles="https://github.com/libkml/libkml/archive/${version}.tar.gz"
+checksum=8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963
+
+libkml-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}

From 4ec050d4e17a733e50e858e5938e73ec5c941fe7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Feb 2022 22:46:45 +0100
Subject: [PATCH 04/17] New package: libspatialite-5.0.1

---
 common/shlibs                                 | 11 +++++
 srcpkgs/libspatialite-devel                   |  1 +
 .../patches/disable_check_drop_rename.patch   | 28 +++++++++++++
 .../patches/disable_check_sql_stmt.patch      | 29 +++++++++++++
 srcpkgs/libspatialite/template                | 42 +++++++++++++++++++
 5 files changed, 111 insertions(+)
 create mode 120000 srcpkgs/libspatialite-devel
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
 create mode 100644 srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
 create mode 100644 srcpkgs/libspatialite/template

diff --git a/common/shlibs b/common/shlibs
index 7cf876600089..98a0405d6abb 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4117,3 +4117,14 @@ libkmlengine.so.1 libkml-1.3.0_1
 libkmlregionator.so.1 libkml-1.3.0_1
 libkmlxsd.so.1 libkml-1.3.0_1
 libkmlconvenience.so.1 libkml-1.3.0_1
+libspatialite.so.7 libspatialite-5.0.1_1
+mod_spatialite.so.7 libspatialite-5.0.1_1
+libgrass_dbmibase.7.8.so grass-7.8.7RC1_1
+libgrass_dbmiclient.7.8.so grass-7.8.7RC1_1
+libgrass_gis.7.8.so grass-7.8.7RC1_1
+libgrass_gproj.7.8.so grass-7.8.7RC1_1
+libgrass_imagery.7.8.so grass-7.8.7RC1_1
+libgrass_raster.7.8.so grass-7.8.7RC1_1
+libgrass_vector.7.8.so grass-7.8.7RC1_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/libspatialite-devel b/srcpkgs/libspatialite-devel
new file mode 120000
index 000000000000..588ba2ad7c00
--- /dev/null
+++ b/srcpkgs/libspatialite-devel
@@ -0,0 +1 @@
+libspatialite
\ No newline at end of file
diff --git a/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch b/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
new file mode 100644
index 000000000000..30b67f5b8f61
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_drop_rename.patch
@@ -0,0 +1,28 @@
+Disable check_drop_rename test. It fails with:
+RenameTable "table_1" error: RenameTable exception - error in trigger ISO_metadata_reference_row_id_value_insert: no such column: rowid.
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index fec25dd..50b16ae 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -74,7 +74,6 @@ check_PROGRAMS = check_endian \
+ 		check_sequence \
+ 		check_stored_proc \
+ 		check_wms \
+-		check_drop_rename \
+ 		routing_test \
+ 		geojson_test \
+ 		check_zipshp
+diff --git a/test/Makefile.in b/test/Makefile.in
+index 8a0b154..52a1066 100644
+--- a/test/Makefile.in
++++ b/test/Makefile.in
+@@ -124,7 +124,7 @@ check_PROGRAMS = check_endian$(EXEEXT) check_version$(EXEEXT) \
+ 	check_network2d$(EXEEXT) check_network3d$(EXEEXT) \
+ 	check_network_log$(EXEEXT) check_virtualknn$(EXEEXT) \
+ 	check_sequence$(EXEEXT) check_stored_proc$(EXEEXT) \
+-	check_wms$(EXEEXT) check_drop_rename$(EXEEXT) \
++	check_wms$(EXEEXT) \
+ 	routing_test$(EXEEXT) geojson_test$(EXEEXT) \
+ 	check_zipshp$(EXEEXT) $(am__EXEEXT_1)
+ @ENABLE_GEOPACKAGE_TRUE@am__append_1 = \
diff --git a/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch b/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
new file mode 100644
index 000000000000..1dc3b5705955
--- /dev/null
+++ b/srcpkgs/libspatialite/patches/disable_check_sql_stmt.patch
@@ -0,0 +1,29 @@
+Disable check_sql_stmt tests
+
+https://www.gaia-gis.it/fossil/libspatialite/tktview/3e46349bf2bfc58b3e3051d1ff7cab73eed19a88?plaintext
+
+--- a/test/Makefile.am	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.am	2020-12-22 14:45:10.206085515 +0100
+@@ -31,10 +31,6 @@
+ 		check_gaia_utf8 \
+ 		check_extension \
+ 		check_recover_geom \
+-		check_sql_stmt \
+-		check_sql_stmt_tiny \
+-		check_sql_stmt_legacy \
+-		check_sql_stmt_extension \
+ 		check_multithread \
+ 		check_virtualtable1 \
+ 		check_virtualtable2 \
+--- a/test/Makefile.in	2020-08-23 18:46:23.000000000 +0200
++++ b/test/Makefile.in	2020-12-22 14:41:06.416335737 +0100
+@@ -102,9 +102,6 @@
+ 	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
+ 	check_gaia_util$(EXEEXT) check_gaia_utf8$(EXEEXT) \
+ 	check_extension$(EXEEXT) check_recover_geom$(EXEEXT) \
+-	check_sql_stmt$(EXEEXT) check_sql_stmt_tiny$(EXEEXT) \
+-	check_sql_stmt_legacy$(EXEEXT) \
+-	check_sql_stmt_extension$(EXEEXT) check_multithread$(EXEEXT) \
+ 	check_virtualtable1$(EXEEXT) check_virtualtable2$(EXEEXT) \
+ 	check_virtualtable3$(EXEEXT) check_virtualtable4$(EXEEXT) \
+ 	check_virtualtable5$(EXEEXT) check_virtualtable6$(EXEEXT) \
diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
new file mode 100644
index 000000000000..31c10a5577e7
--- /dev/null
+++ b/srcpkgs/libspatialite/template
@@ -0,0 +1,42 @@
+# Template file for 'libspatialite'
+pkgname=libspatialite
+version=5.0.1
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config librttopo geos-devel libxml2"
+makedepends="freexl-devel
+ geos-devel
+ librttopo-devel
+ libxml2-devel
+ minizip-devel
+ proj-devel
+ sqlite-devel
+ zlib-devel"
+depends="sqlite"
+short_desc="Geospatial extension for SQLite"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="MPL-1.0"
+homepage="https://www.gaia-gis.it/fossil/libspatialite/index"
+distfiles="http://www.gaia-gis.it/gaia-sins/${pkgname}-${version}.tar.gz"
+checksum=eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98
+
+CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" libtool geos-devel"
+fi
+
+post_install() {
+	vlicense COPYING
+}
+
+libspatialite-devel_package() {
+	depends="$pkgname>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.a"
+	}
+}

From efad8465493d7de7ecf31b50d433e9ec154f27a0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 05/17] libgdal: update to 3.4.1 and rebuild against proj-7.2.1

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 105 ++++++++++++++++--
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 95 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 98a0405d6abb..5f7e7bac88d3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2510,7 +2510,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..5fca579954fa 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,100 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.1
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=yes
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libspatialite-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ libkml-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=e360387bc25ec24940f46afbeada48002d72c74aaf9eccf2a40e8d74e711a2e4
+subpackages="python3-gdal libgdal-devel libgdal-tools"
+
+build_options="kml postgresql"
+build_options_default="kml"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
 
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +116,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From df98816659dad17a8c8b5f202dc2af209e2862ca Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 06/17] postgis: update to 3.1.5; rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..f52cd6657988 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.1.5
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From dab993570104cd25530390c1c8dd60eed3f699e4 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 07/17] postgis-postgresql13: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..a0f5c89ef4da 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
-revision=2
+version=3.1.5
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 4f9d33819f509dd3c4b7ff9a260d53981105ff21 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 08/17] postgis-postgresql14: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..ad8d0c5c4253 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.1.5
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 5530866bb2a93470f61e01c12ac296957bf15753 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 9 Aug 2021 19:53:17 +0200
Subject: [PATCH 09/17] wxPython4: backport patches, and fix tests

Backported patches:
- wxPseudoDC GIL
- Python 3.10 AGW FlatNotebook patch
- Python 3.10 ScrolledWindow argument types
- Python 3.10 Integer division
- wx.WindowID and wx.Region arguments
---
 .../patches/0002-Python-3.10-issues.patch     | 3317 +++++++++++++++++
 .../0003-Python-3.10-AGW-FlatNotebook.patch   |   57 +
 .../patches/restore-gil-pseudodc.patch        |   52 +
 srcpkgs/wxPython4/template                    |    3 +-
 4 files changed, 3428 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
 create mode 100644 srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
 create mode 100644 srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch

diff --git a/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
new file mode 100644
index 000000000000..6c87ff967d01
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0002-Python-3.10-issues.patch
@@ -0,0 +1,3317 @@
+From f55a17c2d3b336c82fb44f7816ec63219847f4cc Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 22 2021 20:23:54 +0000
+Subject: Fix a bunch of Python 3.10 issues
+
+
+---
+
+diff --git a/0d449626d6d298ad96ebd1d514d0e42833bce470.patch b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+new file mode 100644
+index 0000000..d2ccddc
+--- /dev/null
++++ b/0d449626d6d298ad96ebd1d514d0e42833bce470.patch
+@@ -0,0 +1,22 @@
++From 0d449626d6d298ad96ebd1d514d0e42833bce470 Mon Sep 17 00:00:00 2001
++From: Carolina Feher da Silva <carolfsu@gmail.com>
++Date: Tue, 16 Nov 2021 01:24:31 +0000
++Subject: [PATCH] Fixed integer division in Python 3
++
++---
++ wx/lib/stattext.py | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/wx/lib/stattext.py b/wx/lib/stattext.py
++index 2cfb6e65a..e606e5a89 100644
++--- a/wx/lib/stattext.py
+++++ b/wx/lib/stattext.py
++@@ -302,7 +302,7 @@ def OnPaint(self, event):
++             if style & wx.ALIGN_RIGHT:
++                 x = width - w
++             if style & wx.ALIGN_CENTER:
++-                x = (width - w)/2
+++                x = (width - w)//2
++             dc.DrawText(line, x, y)
++             y += h
++ 
+diff --git a/3eb9eb32dc3285435039f6c420c398665372a1ad.patch b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+new file mode 100644
+index 0000000..08e58a0
+--- /dev/null
++++ b/3eb9eb32dc3285435039f6c420c398665372a1ad.patch
+@@ -0,0 +1,84 @@
++From 3eb9eb32dc3285435039f6c420c398665372a1ad Mon Sep 17 00:00:00 2001
++From: Glen Whitney <glen@studioinfinity.org>
++Date: Tue, 31 Aug 2021 11:06:27 -0700
++Subject: [PATCH] fix: Correct types of arguments to
++ ScrolledWindow.SetScrollbars
++
++---
++ demo/Mask.py                   |  2 +-
++ demo/OGL.py                    |  2 +-
++ wx/lib/agw/ultimatelistctrl.py | 14 +++++++-------
++ 3 files changed, 9 insertions(+), 9 deletions(-)
++
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 5f0c2cdde..109b8f30b 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -56,7 +56,7 @@ def __init__(self, parent):
++         mask = wx.Mask(self.bmp_withcolourmask, wx.WHITE)
++         self.bmp_withcolourmask.SetMask(mask)
++ 
++-        self.SetScrollbars(20, 20, 700/20, 460/20)
+++        self.SetScrollbars(20, 20, 700//20, 460//20)
++ 
++         self.Bind(wx.EVT_PAINT, self.OnPaint)
++ 
++diff --git a/demo/OGL.py b/demo/OGL.py
++index 72ca543dd..d475e5011 100644
++--- a/demo/OGL.py
+++++ b/demo/OGL.py
++@@ -272,7 +272,7 @@ def __init__(self, parent, log, frame):
++ 
++         maxWidth  = 1000
++         maxHeight = 1000
++-        self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
+++        self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
++ 
++         self.log = log
++         self.frame = frame
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index c60867684..14fc41f86 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -9654,8 +9654,8 @@ def RecalculatePositions(self, noRefresh=False):
++                 self._linesPerPage = clientHeight//lineHeight
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + lineHeight - 1)/lineHeight,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + lineHeight - 1)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9676,8 +9676,8 @@ def RecalculatePositions(self, noRefresh=False):
++                     decrement = SCROLL_UNIT_X
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
++-                                   (self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
++-                                   (entireHeight + SCROLL_UNIT_Y - 1)/SCROLL_UNIT_Y,
+++                                   (self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
+++                                   (entireHeight + SCROLL_UNIT_Y - 1)//SCROLL_UNIT_Y,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9728,8 +9728,8 @@ def RecalculatePositions(self, noRefresh=False):
++                         line._gi.ExtendWidth(widthMax)
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (x + SCROLL_UNIT_X)/SCROLL_UNIT_X,
++-                                   (y + lineHeight)/lineHeight,
+++                                   (x + SCROLL_UNIT_X)//SCROLL_UNIT_X,
+++                                   (y + lineHeight)//lineHeight,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    self.GetScrollPos(wx.VERTICAL),
++                                    True)
++@@ -9797,7 +9797,7 @@ def RecalculatePositions(self, noRefresh=False):
++                             break  # Everything fits, no second try required.
++ 
++                 self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
++-                                   (entireWidth + SCROLL_UNIT_X)/SCROLL_UNIT_X,
+++                                   (entireWidth + SCROLL_UNIT_X)//SCROLL_UNIT_X,
++                                    0,
++                                    self.GetScrollPos(wx.HORIZONTAL),
++                                    0,
+diff --git a/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+new file mode 100644
+index 0000000..f0b9f5d
+--- /dev/null
++++ b/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch
+@@ -0,0 +1,143 @@
++From 9096426603272672d9a676e8bcdcadf0a1cfa1a2 Mon Sep 17 00:00:00 2001
++From: Robin Dunn <robin@alldunn.com>
++Date: Wed, 26 Feb 2020 11:10:27 -0800
++Subject: [PATCH] Add __index__ to wx.WindowID, and __bool__ to wx.Region
++
++---
++ etg/region.py              |  5 +++--
++ etg/windowid.py            | 32 +++++++++++++++++---------------
++ unittests/test_windowid.py | 23 +++++++++++++++++++++--
++ 3 files changed, 41 insertions(+), 19 deletions(-)
++
++diff --git a/etg/region.py b/etg/region.py
++index 0982c1fe5..d5bc45759 100644
++--- a/etg/region.py
+++++ b/etg/region.py
++@@ -88,11 +88,12 @@ def next(self):
++     c.mustHaveApp()
++     c.find('operator++').ignore()
++ 
++-    # SIP maps operator bool() to __int__, but Classic used __nonzero__. Does
++-    # it make any difference either way?
++     c.find('operator bool').ignore()
++     c.addCppMethod('int', '__nonzero__', '()', 'return (int)self->operator bool();',
++                    'Returns true while there are still rectangles available in the iteration.')
+++    c.addCppMethod('int', '__bool__', '()', 'return (int)self->operator bool();',
+++                   'Returns true while there are still rectangles available in the iteration.')
+++
++ 
++     c.addCppMethod('void', 'Next', '()', 'self->operator++();',
++                    'Move the iterator to the next rectangle in the region.')
++diff --git a/etg/windowid.py b/etg/windowid.py
++index 27b041b3d..da2ed395e 100644
++--- a/etg/windowid.py
+++++ b/etg/windowid.py
++@@ -53,12 +53,12 @@ def run():
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Create reference from an ID',
++                     items=[ ParamDef(type='int', name='id') ]),
++-                
+++
++                 MethodDef(name='wxWindowIDRef', className='wxWindowIDRef', isCtor=True,
++                     briefDoc='Copy an ID reference',
++                     items=[ ParamDef(type='const wxWindowIDRef&', name='idref') ]),
++                 ]),
++-            
+++
++             MethodDef(name='~wxWindowIDRef', className='wxWindowIDRef', isDtor=True),
++ 
++             MethodDef(type='int', name='GetValue',
++@@ -73,11 +73,13 @@ def run():
++             """)
++ 
++     klass.addCppMethod('int', '__int__', '()',
++-        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or etc.",
++-        body="""\
++-            return self->GetValue();
++-            """)
++-    
+++        doc="Alias for GetValue allowing the IDRef to be passed as the WindowID parameter when creating widgets or other places an integer type is needed.",
+++        body="return self->GetValue();")
+++    klass.addCppMethod('int', '__index__', '()',
+++        doc="See :meth:`__int__`",
+++        body="return self->GetValue();")
+++
+++
++     klass.addCppMethod('bool', '__eq__', '(wxWindowID id)', "return self->GetValue() == id;")
++     klass.addCppMethod('bool', '__ne__', '(wxWindowID id)', "return self->GetValue() != id;")
++     klass.addCppMethod('bool', '__lt__', '(wxWindowID id)', "return self->GetValue() < id;")
++@@ -92,17 +94,17 @@ def run():
++     # and finish it up by adding it to the module
++     module.addItem(klass)
++ 
++-    # Now, let's add a new Python function to the global scope that reserves an 
++-    # ID (or range) and returns a ref object for it. 
++-    module.addPyFunction('NewIdRef', '(count=1)', 
+++    # Now, let's add a new Python function to the global scope that reserves an
+++    # ID (or range) and returns a ref object for it.
+++    module.addPyFunction('NewIdRef', '(count=1)',
++         doc="""\
++-            Reserves a new Window ID (or range of WindowIDs) and returns a 
++-            :class:`wx.WindowIDRef` object (or list of them) that will help 
+++            Reserves a new Window ID (or range of WindowIDs) and returns a
+++            :class:`wx.WindowIDRef` object (or list of them) that will help
++             manage the reservation of that ID.
++ 
++-            This function is intended to be a drop-in replacement of the old 
++-            and deprecated :func:`wx.NewId` function, with the added benefit 
++-            that the ID should never conflict with an in-use ID or other IDs 
+++            This function is intended to be a drop-in replacement of the old
+++            and deprecated :func:`wx.NewId` function, with the added benefit
+++            that the ID should never conflict with an in-use ID or other IDs
++             generated by this function.
++             """,
++         body="""\
++diff --git a/unittests/test_windowid.py b/unittests/test_windowid.py
++index 4593e5a69..fc36c9eb8 100644
++--- a/unittests/test_windowid.py
+++++ b/unittests/test_windowid.py
++@@ -31,9 +31,9 @@ def test_newIdRef02(self):
++     def test_newIdRef03(self):
++         """Check that Auto ID Management is enabled (--enable-autoidman)"""
++         # This test is expected to fail if autoID mangagement is turned on
++-        # because a reference to the ID is not being saved, so it will be 
+++        # because a reference to the ID is not being saved, so it will be
++         # unreserved when the first widget is destroyed.
++-        
+++
++         id = wx.Window.NewControlId()
++         b = wx.Button(self.frame, id, 'button')
++         b.Destroy()
++@@ -75,6 +75,7 @@ def test_WindowIDRef01(self):
++         val = ref1 <= ref2
++         assert type(val) == bool
++ 
+++
++     def test_WindowIDRef02(self):
++         d = {wx.NewIdRef(): 'one',
++              wx.NewIdRef(): 'two'}
++@@ -82,6 +83,24 @@ def test_WindowIDRef02(self):
++         for k in keys:
++             val = d[k]
++ 
+++
+++    def test_WindowIDRef03(self):
+++        # Ensure wx.WindowIDRef can be converted to int without warning when
+++        # making a call to warrped method. In Py3.8+ this means there needs to
+++        # be an __index__ method.
+++
+++        # Turn warnings into exceptions so this test will fail if there is
+++        # a warning
+++        import warnings
+++        warnings.simplefilter('error')
+++
+++        wid = wx.NewIdRef()
+++        assert isinstance(wid, wx.WindowIDRef)
+++
+++        b = wx.Button(self.frame, wid, 'button')
+++        assert b.GetId() == wid.GetId()
+++
+++
++ #---------------------------------------------------------------------------
++ 
++ 
+ 
+diff --git a/python3.10-fixes.patch b/python3.10-fixes.patch
+new file mode 100644
+index 0000000..29e8c61
+--- /dev/null
++++ b/python3.10-fixes.patch
+@@ -0,0 +1,3034 @@
++From 173d0796810bb65de9bdfdc6941d24a04628f6c2 Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Wed, 1 Dec 2021 14:19:00 -0500
++Subject: [PATCH] Fix a bunch of Python 3.10 issues with pure-Python classes
++ and demos
++
++In Python 3.10, a change[1] was implemented where extension functions
++that take integer arguments will no longer silently accept non-integer
++arguments (e.g., floats) that can only be converted to integers with a
++loss of precision.  This PR fixes most of these issues in the pure-Python
++classes and demos by explicitly converting the parameters to int before
++passing them to wxWidgets.  There is loss of precision, but this was
++happening before (automatically) anyway as most wxWidgets DeviceContext
++functions operate using integers.
++
++Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
++too small on GTK3.
++
++This is an example of the relevant exception:
++Traceback (most recent call last):
++  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
++    r.width = w
++TypeError: 'float' object cannot be interpreted as an integer
++
++Fixes #2038.
++
++[1] https://bugs.python.org/issue37999
++---
++ demo/GridLabelRenderer.py               |   4 +-
++ demo/Mask.py                            |   4 +-
++ demo/Overlay.py                         |   1 -
++ demo/PenAndBrushStyles.py               |   2 +-
++ demo/PopupWindow.py                     |   2 +-
++ demo/PrintFramework.py                  |   2 +-
++ demo/PropertyGrid.py                    |   2 +-
++ demo/Sizers.py                          |   2 +-
++ demo/UIActionSimulator.py               |   2 +-
++ demo/agw/AUI.py                         |  32 +++----
++ demo/agw/MacLargeDemo.py                |   4 +-
++ demo/agw/PeakMeter.py                   |   6 +-
++ demo/agw/PersistentControls.py          |   2 +-
++ demo/agw/RibbonBar.py                   |   2 +-
++ demo/agw/SpeedMeter.py                  |   2 +-
++ demo/agw/SuperToolTip.py                |   3 +-
++ demo/agw/ThumbDemoConfig.py             |   1 +
++ demo/agw/UltimateReportDemo.py          |   8 +-
++ demo/agw/Windows7Explorer_Contents.py   |  16 ++--
++ demo/agw/ZoomBar.py                     |   2 +-
++ wx/lib/agw/advancedsplash.py            |   2 +-
++ wx/lib/agw/aui/aui_utilities.py         |   4 +-
++ wx/lib/agw/aui/auibook.py               |   4 +-
++ wx/lib/agw/balloontip.py                |   4 +-
++ wx/lib/agw/flatmenu.py                  |  62 ++++++-------
++ wx/lib/agw/flatnotebook.py              |  10 +--
++ wx/lib/agw/floatspin.py                 |   2 +-
++ wx/lib/agw/gradientbutton.py            |   8 +-
++ wx/lib/agw/hypertreelist.py             |   2 +-
++ wx/lib/agw/knobctrl.py                  |  12 +--
++ wx/lib/agw/labelbook.py                 |  32 +++----
++ wx/lib/agw/peakmeter.py                 |   2 +-
++ wx/lib/agw/pygauge.py                   |   4 +-
++ wx/lib/agw/ribbon/art_aui.py            |  22 ++---
++ wx/lib/agw/ribbon/art_internal.py       |  12 +--
++ wx/lib/agw/ribbon/art_msw.py            |  88 +++++++++----------
++ wx/lib/agw/ribbon/bar.py                |   4 +-
++ wx/lib/agw/ribbon/buttonbar.py          |   6 +-
++ wx/lib/agw/ribbon/gallery.py            |   8 +-
++ wx/lib/agw/ribbon/panel.py              |  16 ++--
++ wx/lib/agw/ribbon/toolbar.py            |   2 +-
++ wx/lib/agw/scrolledthumbnail.py         |  24 +++---
++ wx/lib/agw/shapedbutton.py              |  10 +--
++ wx/lib/agw/speedmeter.py                |  72 +++++++++-------
++ wx/lib/agw/supertooltip.py              |  20 ++---
++ wx/lib/agw/toasterbox.py                |   4 +-
++ wx/lib/agw/ultimatelistctrl.py          |  20 ++---
++ wx/lib/agw/xlsgrid.py                   |   4 +-
++ wx/lib/agw/zoombar.py                   |  10 +--
++ wx/lib/analogclock/analogclock.py       |   2 +-
++ wx/lib/analogclock/helpers.py           |  22 ++---
++ wx/lib/analogclock/setup.py             |   6 +-
++ wx/lib/buttons.py                       |  10 +--
++ wx/lib/colourchooser/pycolourchooser.py |   4 +-
++ wx/lib/colourchooser/pypalette.py       |   2 +-
++ wx/lib/floatcanvas/FCObjects.py         |   8 +-
++ wx/lib/gizmos/ledctrl.py                |   8 +-
++ wx/lib/imagebrowser.py                  |   4 +-
++ wx/lib/ogl/basic.py                     |  10 +--
++ wx/lib/ogl/bmpshape.py                  |   2 +-
++ wx/lib/ogl/composit.py                  |   4 +-
++ wx/lib/ogl/divided.py                   |   2 +-
++ wx/lib/ogl/lines.py                     |   2 +-
++ wx/lib/ogl/oglmisc.py                   |   4 +-
++ wx/lib/plot/examples/demo.py            |   4 +-
++ wx/lib/plot/plotcanvas.py               | 110 ++++++++++++------------
++ wx/lib/plot/polyobjects.py              |  22 +++--
++ wx/lib/popupctl.py                      |   2 +-
++ wx/lib/scrolledpanel.py                 |   2 +-
++ wx/lib/throbber.py                      |   6 +-
++ wx/lib/ticker.py                        |   4 +-
++ 71 files changed, 411 insertions(+), 398 deletions(-)
++
++diff --git a/demo/GridLabelRenderer.py b/demo/GridLabelRenderer.py
++index 794dd64e8..1440ef41b 100644
++--- a/demo/GridLabelRenderer.py
+++++ b/demo/GridLabelRenderer.py
++@@ -46,8 +46,8 @@ def __init__(self):
++         self._bmp = images.Smiles.GetBitmap()
++ 
++     def Draw(self, grid, dc, rect, rc):
++-        x = rect.left + (rect.width - self._bmp.GetWidth()) / 2
++-        y = rect.top + (rect.height - self._bmp.GetHeight()) / 2
+++        x = rect.left + (rect.width - self._bmp.GetWidth()) // 2
+++        y = rect.top + (rect.height - self._bmp.GetHeight()) // 2
++         dc.DrawBitmap(self._bmp, x, y, True)
++ 
++ 
++diff --git a/demo/Mask.py b/demo/Mask.py
++index 109b8f30b..e924f95b9 100644
++--- a/demo/Mask.py
+++++ b/demo/Mask.py
++@@ -90,9 +90,9 @@ def OnPaint (self, e):
++ 
++         for text, code in logicList:
++             x,y = 120+150*(i%4), 20+100*(i/4)
++-            dc.DrawText(text, x, y-20)
+++            dc.DrawText(text, x, int(y-20))
++             mdc.SelectObject(self.bmp_withcolourmask)
++-            dc.Blit(x,y, cx,cy, mdc, 0,0, code, True)
+++            dc.Blit(x,int(y), cx,cy, mdc, 0,0, code, True)
++             i = i + 1
++ 
++ 
++diff --git a/demo/Overlay.py b/demo/Overlay.py
++index 65164cd84..fa65be003 100644
++--- a/demo/Overlay.py
+++++ b/demo/Overlay.py
++@@ -56,7 +56,6 @@ def __init__(self, parent, log):
++         self.penstylesCombo.SetToolTip('Pen Style')
++ 
++         self.overlayPenWidth = wx.SpinCtrl(self, -1, value='',
++-                                           size=(75, -1),
++                                            style=wx.SP_ARROW_KEYS,
++                                            min=1, max=24, initial=1)
++         self.overlayPenWidth.SetToolTip('Pen Width')
++diff --git a/demo/PenAndBrushStyles.py b/demo/PenAndBrushStyles.py
++index 24040b1fc..1183f684a 100644
++--- a/demo/PenAndBrushStyles.py
+++++ b/demo/PenAndBrushStyles.py
++@@ -100,7 +100,7 @@ def OnPaint(self, event):
++ 
++         dc.SetPen(pen)
++         y = labelHeight + (height - labelHeight)/2
++-        dc.DrawLine(5, y, width-5, y)
+++        dc.DrawLine(5, int(y), width-5, int(y))
++ 
++ 
++ class BrushPanel(BasePanel):
++diff --git a/demo/PopupWindow.py b/demo/PopupWindow.py
++index d8e175576..b54b9870d 100644
++--- a/demo/PopupWindow.py
+++++ b/demo/PopupWindow.py
++@@ -89,7 +89,7 @@ def __init__(self, parent, style, log):
++                           "(or its first child) loses focus in \n"
++                           "any other way.")
++         btn = wx.Button(panel, -1, "Press Me")
++-        spin = wx.SpinCtrl(panel, -1, "Hello", size=(100,-1))
+++        spin = wx.SpinCtrl(panel, -1, "Hello")
++         btn.Bind(wx.EVT_BUTTON, self.OnButton)
++ 
++         sizer = wx.BoxSizer(wx.VERTICAL)
++diff --git a/demo/PrintFramework.py b/demo/PrintFramework.py
++index e7a29a077..f0873ae94 100644
++--- a/demo/PrintFramework.py
+++++ b/demo/PrintFramework.py
++@@ -81,7 +81,7 @@ def OnPrintPage(self, page):
++ 
++         #-------------------------------------------
++         self.canvas.DoDrawing(dc, True)
++-        dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
+++        dc.DrawText("Page: %d" % page, marginX//2, maxY-marginY)
++ 
++         return True
++ 
++diff --git a/demo/PropertyGrid.py b/demo/PropertyGrid.py
++index c56e08b60..fbef29e31 100644
++--- a/demo/PropertyGrid.py
+++++ b/demo/PropertyGrid.py
++@@ -150,7 +150,7 @@ def _ConvertValue(self, value):
++         """ Utility convert arbitrary value to a real wx.Size.
++         """
++         import collections
++-        if isinstance(value, collections.Sequence) or hasattr(value, '__getitem__'):
+++        if isinstance(value, collections.abc.Sequence) or hasattr(value, '__getitem__'):
++             value = wx.Size(*value)
++         return value
++ 
++diff --git a/demo/Sizers.py b/demo/Sizers.py
++index 6ababede9..a025050f1 100644
++--- a/demo/Sizers.py
+++++ b/demo/Sizers.py
++@@ -45,7 +45,7 @@ def OnPaint(self, evt):
++         dc = wx.PaintDC(self)
++         w,h = dc.GetTextExtent(self.text)
++         dc.Clear()
++-        dc.DrawText(self.text, (sz.width-w)/2, (sz.height-h)/2)
+++        dc.DrawText(self.text, (sz.width-w)//2, (sz.height-h)//2)
++ 
++     def OnSize(self, evt):
++         self.Refresh()
++diff --git a/demo/UIActionSimulator.py b/demo/UIActionSimulator.py
++index cbba14f5c..0a6fd0234 100644
++--- a/demo/UIActionSimulator.py
+++++ b/demo/UIActionSimulator.py
++@@ -88,7 +88,7 @@ def _playbackKey(self, evtType, key, modifiers):
++ 
++     def _setNextKeyEvent(self):
++         evtType, key, modifiers, milli = self._playbackEvents.pop(0)
++-        milli = max(milli/2, 1) # play back faster than it was recorded
+++        milli = max(milli//2, 1) # play back faster than it was recorded
++         print(evtType, key, modifiers, milli)
++         wx.CallLater(milli, self._playbackKey, evtType, key, modifiers)
++ 
++diff --git a/demo/agw/AUI.py b/demo/agw/AUI.py
++index 7c2196865..b38313c86 100644
++--- a/demo/agw/AUI.py
+++++ b/demo/agw/AUI.py
++@@ -393,7 +393,7 @@ def OnPaint(self, event):
++         dc.SetPen(wx.LIGHT_GREY_PEN)
++         dc.DrawLine(0, 0, size.x, size.y)
++         dc.DrawLine(0, size.y, size.x, 0)
++-        dc.DrawText(s, (size.x-w)/2, (size.y-height*5)/2)
+++        dc.DrawText(s, (size.x-w)//2, (size.y-height*5)//2)
++ 
++         if self._mgr:
++ 
++@@ -401,19 +401,19 @@ def OnPaint(self, event):
++ 
++             s = "Layer: %d"%pi.dock_layer
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*1))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*1))
++ 
++             s = "Dock: %d Row: %d"%(pi.dock_direction, pi.dock_row)
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*2))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*2))
++ 
++             s = "Position: %d"%pi.dock_pos
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*3))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*3))
++ 
++             s = "Proportion: %d"%pi.dock_proportion
++             w, h = dc.GetTextExtent(s)
++-            dc.DrawText(s, (size.x-w)/2, ((size.y-(height*5))/2)+(height*4))
+++            dc.DrawText(s, (size.x-w)//2, ((size.y-(height*5))//2)+(height*4))
++ 
++ 
++     def OnEraseBackground(self, event):
++@@ -435,7 +435,7 @@ def __init__(self, parent, frame):
++ 
++         s1 = wx.BoxSizer(wx.HORIZONTAL)
++         self._border_size = wx.SpinCtrl(self, ID_PaneBorderSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE),
++-                                        wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100,
+++                                        wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100,
++                                         frame.GetDockArt().GetMetric(aui.AUI_DOCKART_PANE_BORDER_SIZE))
++         s1.Add((1, 1), 1, wx.EXPAND)
++         s1.Add(wx.StaticText(self, -1, "Pane Border Size:"))
++@@ -445,7 +445,7 @@ def __init__(self, parent, frame):
++ 
++         s2 = wx.BoxSizer(wx.HORIZONTAL)
++         self._sash_size = wx.SpinCtrl(self, ID_SashSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE), wx.DefaultPosition,
++-                                      wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
+++                                      wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_SASH_SIZE))
++         s2.Add((1, 1), 1, wx.EXPAND)
++         s2.Add(wx.StaticText(self, -1, "Sash Size:"))
++         s2.Add(self._sash_size)
++@@ -454,7 +454,7 @@ def __init__(self, parent, frame):
++ 
++         s3 = wx.BoxSizer(wx.HORIZONTAL)
++         self._caption_size = wx.SpinCtrl(self, ID_CaptionSize, "%d"%frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE),
++-                                         wx.DefaultPosition, wx.Size(50, 20), wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
+++                                         wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, frame.GetDockArt().GetMetric(aui.AUI_DOCKART_CAPTION_SIZE))
++         s3.Add((1, 1), 1, wx.EXPAND)
++         s3.Add(wx.StaticText(self, -1, "Caption Size:"))
++         s3.Add(self._caption_size)
++@@ -807,9 +807,9 @@ def LightColour(self, colour, percent):
++ 
++         # We take the percent way of the colour from colour -> white
++         i = percent
++-        r = colour.Red() + ((i*rd*100)/high)/100
++-        g = colour.Green() + ((i*gd*100)/high)/100
++-        b = colour.Blue() + ((i*bd*100)/high)/100
+++        r = colour.Red() + ((i*rd*100)//high)//100
+++        g = colour.Green() + ((i*gd*100)//high)//100
+++        b = colour.Blue() + ((i*bd*100)//high)//100
++ 
++         return wx.Colour(r, g, b)
++ 
++@@ -826,10 +826,10 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++         x, y, width, height = clientRect
++         x, width = self._pos, interval
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2)
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2)
++         topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-        rc1 = wx.Rect(x, y, width, height/2)
+++        rc1 = wx.Rect(int(x), y, int(width), height//2)
++         path1 = self.GetPath(gc, rc1, 8)
++         br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++         gc.SetBrush(br1)
++@@ -845,14 +845,14 @@ def DrawProgress(self, dc, xsize, ysize, increment):
++ 
++         bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-        rc3 = wx.Rect(x, y+height/2, width, height/2)
+++        rc3 = wx.Rect(int(x), y+height//2, int(width), height//2)
++         path3 = self.GetPath(gc, rc3, 8)
++         br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++         gc.SetBrush(br3)
++         gc.FillPath(path3) #draw main
++ 
++         path4 = gc.CreatePath()
++-        path4.AddRectangle(x, y+height/2, width, 8)
+++        path4.AddRectangle(x, y+height//2, width, 8)
++         path4.CloseSubpath()
++         gc.SetBrush(br3)
++         gc.FillPath(path4)
++@@ -2613,7 +2613,7 @@ def CreateNotebook(self):
++         flex.Add(wx.TextCtrl(panel, -1, "", wx.DefaultPosition, wx.Size(100, -1)),
++                  1, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add(wx.StaticText(panel, -1, "wxSpinCtrl:"), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++-        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.Size(100, -1),
+++        flex.Add(wx.SpinCtrl(panel, -1, "5", wx.DefaultPosition, wx.DefaultSize,
++                              wx.SP_ARROW_KEYS, 5, 50, 5), 0, wx.ALL|wx.ALIGN_CENTRE, 5)
++         flex.Add((5, 5))
++         flex.Add((5, 5))
++diff --git a/demo/agw/MacLargeDemo.py b/demo/agw/MacLargeDemo.py
++index 4d967a546..a5b8a0e25 100644
++--- a/demo/agw/MacLargeDemo.py
+++++ b/demo/agw/MacLargeDemo.py
++@@ -223,12 +223,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = int((w * percent)/100)
++ 
++         if w < 1:
++             return
++diff --git a/demo/agw/PeakMeter.py b/demo/agw/PeakMeter.py
++index a7c9a6f51..e9dab7116 100644
++--- a/demo/agw/PeakMeter.py
+++++ b/demo/agw/PeakMeter.py
++@@ -149,10 +149,10 @@ def OnFalloff(self, event):
++ 
++     def OnStart(self, event):
++ 
++-        self.timer.Start(1000/2)        # 2 fps
+++        self.timer.Start(1000//2)        # 2 fps
++ 
++-        self.vertPeak.Start(1000/18)        # 18 fps
++-        self.horzPeak.Start(1000/20)        # 20 fps
+++        self.vertPeak.Start(1000//18)        # 18 fps
+++        self.horzPeak.Start(1000//20)        # 20 fps
++ 
++ 
++     def OnStop(self, event):
++diff --git a/demo/agw/PersistentControls.py b/demo/agw/PersistentControls.py
++index f19cc4a91..cf97dd9f0 100644
++--- a/demo/agw/PersistentControls.py
+++++ b/demo/agw/PersistentControls.py
++@@ -234,7 +234,7 @@ def BuildPanes(self):
++         sizer_1.Add(label_1, 0, wx.ALL, 5)
++         sizer_1.Add(combo, 0, wx.LEFT|wx.RIGHT, 5)
++         sizer_1.Add((20, 20), 1)
++-        box2.Add(sizer_1, 1, wx.EXPAND|wx.ALIGN_CENTER, 0)
+++        box2.Add(sizer_1, 1, wx.EXPAND, 0)
++         box2.Add((0, 0), 1, 1)
++ 
++         otherPanel.SetSizer(box2)
++diff --git a/demo/agw/RibbonBar.py b/demo/agw/RibbonBar.py
++index 7103e9d81..d28a2c66a 100644
++--- a/demo/agw/RibbonBar.py
+++++ b/demo/agw/RibbonBar.py
++@@ -799,7 +799,7 @@ def AddColourToGallery(self, gallery, colour, dc, value=None):
++                                        (c.Blue() + 192) % 256)
++ 
++             dc.SetTextForeground(foreground)
++-            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) / 2, (iHeight - size.GetHeight()) / 2)
+++            dc.DrawText(colour, (iWidth - size.GetWidth() + 1) // 2, (iHeight - size.GetHeight()) // 2)
++             dc.SelectObjectAsSource(wx.NullBitmap)
++ 
++             item = gallery.Append(bitmap, wx.ID_ANY)
++diff --git a/demo/agw/SpeedMeter.py b/demo/agw/SpeedMeter.py
++index 9f0fdebb2..575e84a80 100644
++--- a/demo/agw/SpeedMeter.py
+++++ b/demo/agw/SpeedMeter.py
++@@ -418,7 +418,7 @@ def __init__(self, parent, log):
++         bsizer3 = wx.BoxSizer(wx.VERTICAL)
++ 
++         hsizer3 = wx.BoxSizer(wx.HORIZONTAL)
++-        sc = wx.SpinCtrl(panel3, -1, size=(60,20))
+++        sc = wx.SpinCtrl(panel3, -1)
++         sc.SetRange(1, 250)
++         sc.SetValue(50)
++ 
++diff --git a/demo/agw/SuperToolTip.py b/demo/agw/SuperToolTip.py
++index 5e65f06b1..88728e54e 100644
++--- a/demo/agw/SuperToolTip.py
+++++ b/demo/agw/SuperToolTip.py
++@@ -43,7 +43,7 @@ def __init__(self, parent):
++         self.topColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.WHITE)
++         system = wx.SystemSettings.GetColour(wx.SYS_COLOUR_ACTIVECAPTION)
++         r, g, b, a = system
++-        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)/2, (255-g)/2, (255-b)/2))
+++        self.middleColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=wx.Colour((255-r)//2, (255-g)//2, (255-b)//2))
++         self.bottomColourPicker = wx.ColourPickerCtrl(self.mainPanel, colour=system)
++         self.headerCheck = wx.CheckBox(self.mainPanel, -1, "Show Header")
++         self.headerText = wx.TextCtrl(self.mainPanel, -1, "Merge And Center")
++@@ -233,7 +233,6 @@ def DoLayout(self):
++         frameSizer.Add(self.mainPanel, 1, wx.EXPAND, 0)
++         self.SetSizer(frameSizer)
++         frameSizer.Layout()
++-        frameSizer.Fit(self)
++         self.Layout()
++ 
++         wx.CallAfter(mainSizer.Layout)
++diff --git a/demo/agw/UltimateReportDemo.py b/demo/agw/UltimateReportDemo.py
++index 40f49cb8f..ad455847b 100644
++--- a/demo/agw/UltimateReportDemo.py
+++++ b/demo/agw/UltimateReportDemo.py
++@@ -216,7 +216,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         mdc.SetFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
++         text = "%d Mb"%self.progressValue
++         textWidth, dummy = mdc.GetTextExtent(text)
++-        mdc.DrawText(text, rect.width/2 - textWidth/2, rect.height/2 - dummy/2)
+++        mdc.DrawText(text, rect.width//2 - textWidth//2, rect.height//2 - dummy//2)
++         dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
++         dc.Blit(rect.x+3, rect.y, rect.width-6, rect.height, mdc, 0, 0)
++         dc.DestroyClippingRegion()
++@@ -279,12 +279,12 @@ def DrawProgressBar(self, dc, x, y, w, h, percent):
++             mdc.SelectObject(wx.NullBitmap)
++ 
++         # Center the progress bar vertically in the box supplied
++-        y = y + (h - PIPE_HEIGHT)/2
+++        y = y + (h - PIPE_HEIGHT)//2
++ 
++         if percent == 0:
++             middle = 0
++         else:
++-            middle = (w * percent)/100
+++            middle = (w * percent)//100
++ 
++         if middle == 0: # not started
++             bitmap = self.REMAINING_BITMAP.GetSubBitmap((1, 0, w, PIPE_HEIGHT))
++@@ -335,7 +335,7 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         colours = [wx.RED, wx.WHITE, wx.GREEN, wx.Colour("SKY BLUE")]
++         w, h = dc.GetTextExtent("Hg")
++         x = rect.x + 1
++-        y = rect.y + rect.height/2 - h/2
+++        y = rect.y + rect.height//2 - h//2
++ 
++         for ch in self.text:
++             dc.SetTextForeground(random.choice(colours))
++diff --git a/demo/agw/Windows7Explorer_Contents.py b/demo/agw/Windows7Explorer_Contents.py
++index f754d7879..b23df0e1a 100644
++--- a/demo/agw/Windows7Explorer_Contents.py
+++++ b/demo/agw/Windows7Explorer_Contents.py
++@@ -127,13 +127,13 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         """Draw a custom progress bar using double buffering to prevent flicker"""
++ 
++         bmpWidth, bmpHeight = self.icon.GetWidth(), self.icon.GetHeight()
++-        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)/2)
+++        dc.DrawIcon(self.icon, rect.x+5, rect.y+(rect.height-bmpHeight)//2)
++ 
++         dc.SetFont(self.normalFont)
++ 
++         textWidth, textHeight = dc.GetTextExtent(self.text)
++         dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
++-        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(self.text, rect.x+bmpWidth+10, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.description:
++             return
++@@ -144,10 +144,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Type: " + self.description)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Type: ", rect.x+bmpWidth+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.description, rect.x+bmpWidth+dummy1+10, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++@@ -207,10 +207,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         textWidth, textHeight = dc.GetTextExtent("Date modified: " + date)
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText("Date modified: ", rect.x+5, rect.y+(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)/4)
+++        dc.DrawText(date, rect.x+dummy1+5, rect.y+(rect.height - textHeight)//4)
++ 
++         if not self.size:
++             return
++@@ -218,10 +218,10 @@ def DrawSubItem(self, dc, rect, line, highlighted, enabled):
++         dummy1, dummy2= dc.GetTextExtent("Size: ")
++ 
++         dc.SetTextForeground(self.greyColour)
++-        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText("Size: ", rect.x+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++         dc.SetTextForeground(wx.BLACK)
++-        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)/4)
+++        dc.DrawText(self.size, rect.x+dummy1+5, rect.y+3*(rect.height - textHeight)//4)
++ 
++ 
++     def GetLineHeight(self):
++diff --git a/demo/agw/ZoomBar.py b/demo/agw/ZoomBar.py
++index 376ce349b..14b0278e7 100644
++--- a/demo/agw/ZoomBar.py
+++++ b/demo/agw/ZoomBar.py
++@@ -55,7 +55,7 @@ def __init__(self, parent, log):
++         reflections = glob.glob(bitmapDir + "/*96Flip40.png")
++ 
++         separatorImage = bitmapDir + "/separator.gif"
++-        separatorReflection = bitmapDir + "/separatorFlip.png"
+++        separatorReflection = bitmapDir + "/separatorflip.png"
++         count = 0
++ 
++         for std, ref in zip(standard, reflections):
++diff --git a/wx/lib/agw/advancedsplash.py b/wx/lib/agw/advancedsplash.py
++index 1f8c32df5..d351ea06e 100644
++--- a/wx/lib/agw/advancedsplash.py
+++++ b/wx/lib/agw/advancedsplash.py
++@@ -438,7 +438,7 @@ def SetTextFont(self, font=None):
++ 
++         if font is None:
++             self._textfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._textsize = 10.0
+++            self._textsize = 10
++             self._textfont.SetPointSize(self._textsize)
++         else:
++             self._textfont = font
++diff --git a/wx/lib/agw/aui/auibook.py b/wx/lib/agw/aui/auibook.py
++index ba7cf4721..f5ad2a568 100644
++--- a/wx/lib/agw/aui/auibook.py
+++++ b/wx/lib/agw/aui/auibook.py
++@@ -3452,8 +3452,8 @@ def CalculateNewSplitSize(self):
++         # should happen around the middle
++         if tab_ctrl_count < 2:
++             new_split_size = self.GetClientSize()
++-            new_split_size.x /= 2
++-            new_split_size.y /= 2
+++            new_split_size.x //= 2
+++            new_split_size.y //= 2
++ 
++         else:
++ 
++diff --git a/wx/lib/agw/balloontip.py b/wx/lib/agw/balloontip.py
++index b4155d74a..57baca729 100644
++--- a/wx/lib/agw/balloontip.py
+++++ b/wx/lib/agw/balloontip.py
++@@ -615,7 +615,7 @@ def SetStartDelay(self, delay=1):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Creation Should Be Greater Than 1 ms")
++ 
++-        self._startdelaytime = float(delay)
+++        self._startdelaytime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -640,7 +640,7 @@ def SetEndDelay(self, delay=1e6):
++         if delay < 1:
++             raise Exception("\nERROR: Delay Time For BalloonTip Destruction Should Be Greater Than 1 ms")
++ 
++-        self._enddelaytime = float(delay)
+++        self._enddelaytime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/flatmenu.py b/wx/lib/agw/flatmenu.py
++index 5ba28e584..85f295b86 100644
++--- a/wx/lib/agw/flatmenu.py
+++++ b/wx/lib/agw/flatmenu.py
++@@ -736,8 +736,8 @@ def DrawSeparator(self, dc, xCoord, yCoord, textX, sepWidth):
++         """
++ 
++         dcsaver = DCSaver(dc)
++-        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth/2, 1)
++-        sepRect2 = wx.Rect(xCoord + textX + sepWidth/2, yCoord + 1, sepWidth/2-1, 1)
+++        sepRect1 = wx.Rect(xCoord + textX, yCoord + 1, sepWidth//2, 1)
+++        sepRect2 = wx.Rect(xCoord + textX + sepWidth//2, yCoord + 1, sepWidth//2-1, 1)
++ 
++         artMgr = ArtManager.Get()
++         backColour = artMgr.GetMenuFaceColour()
++@@ -817,11 +817,11 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             imgWidth  = bmp.GetWidth()
++ 
++             if imageMarginX == 0:
++-                xx = rect.x + (leftMarginWidth - imgWidth)/2
+++                xx = rect.x + (leftMarginWidth - imgWidth)//2
++             else:
++-                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)/2 + rect.height
+++                xx = rect.x + ((leftMarginWidth - rect.height) - imgWidth)//2 + rect.height
++ 
++-            yy = rect.y + (rect.height - imgHeight)/2
+++            yy = rect.y + (rect.height - imgHeight)//2
++             dc.DrawBitmap(bmp, xx, yy, True)
++ 
++         if item.GetKind() == wx.ITEM_CHECK:
++@@ -837,7 +837,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._checkMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         if item.GetKind() == wx.ITEM_RADIO:
++ 
++@@ -852,7 +852,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 if not selected and self.highlightCheckAndRadio:
++                     self.DrawButton(dc, rr, ControlFocus)
++ 
++-                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)/2, rr.y + (rr.height - 16)/2, True)
+++                dc.DrawBitmap(item._radioMarkBmp, rr.x + (rr.width - 16)//2, rr.y + (rr.height - 16)//2, True)
++ 
++         # Draw text - without accelerators
++         text = item.GetLabel()
++@@ -890,7 +890,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++                 w3, dummy = dc.GetTextExtent(text3)
++ 
++                 posx = xCoord + textX + borderXSize
++-                posy = (itemHeight - h)/2 + yCoord
+++                posy = (itemHeight - h)//2 + yCoord
++ 
++                 # Draw first part
++                 dc.DrawText(text1, posx, posy)
++@@ -912,7 +912,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++             else:
++ 
++                 w, h = dc.GetTextExtent(text)
++-                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)/2 + yCoord)
+++                dc.DrawText(text, xCoord + textX + borderXSize, (itemHeight - h)//2 + yCoord)
++ 
++ 
++         # Now draw accelerator
++@@ -920,7 +920,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++         if item.GetAccelString():
++ 
++             accelWidth, accelHeight = dc.GetTextExtent(item.GetAccelString())
++-            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)/2 + yCoord)
+++            dc.DrawText(item.GetAccelString(), xCoord + rightMarginX - accelWidth, (itemHeight - accelHeight)//2 + yCoord)
++ 
++         # Check if this item has sub-menu - if it does, draw
++         # right arrow on the right margin
++@@ -932,7 +932,7 @@ def DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, te
++ 
++             xx = xCoord + rightMarginX + borderXSize
++             rr = wx.Rect(xx, rect.y + 1, rect.height-2, rect.height-2)
++-            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)/2, True)
+++            dc.DrawBitmap(rightArrowBmp, rr.x + 4, rr.y +(rr.height-16)//2, True)
++ 
++ 
++     def DrawMenuBarButton(self, dc, rect, state):
++@@ -1142,7 +1142,7 @@ def DrawMenuBar(self, menubar, dc):
++             # Get the menu item rect
++             textWidth, textHeight = dc.GetTextExtent(fixedText)
++             #rect = wx.Rect(posx+menubar._spacer/2, posy, textWidth, textHeight)
++-            rect = wx.Rect(posx+padding/2, posy, textWidth, textHeight)
+++            rect = wx.Rect(posx+padding//2, posy, textWidth, textHeight)
++ 
++             # Can we draw more??
++             # the +DROP_DOWN_ARROW_WIDTH  is the width of the drop down arrow
++@@ -1172,7 +1172,7 @@ def DrawMenuBar(self, menubar, dc):
++                 dc.SetTextForeground(textColour)
++ 
++             ww, hh = dc.GetTextExtent(labelOnly)
++-            textOffset = (rect.width - ww) / 2
+++            textOffset = (rect.width - ww) // 2
++ 
++             if not menubar._isLCD and item.GetTextBitmap().IsOk() and not selected:
++                 dc.DrawBitmap(item.GetTextBitmap(), rect.x, rect.y, True)
++@@ -1505,8 +1505,8 @@ def DrawButtonColour(self, dc, rect, state, colour):
++         baseColour = colour
++ 
++         # Define the middle points
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, rect.y + (rect.height // 2))
+++        rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height // 2))
++ 
++         # Define the top region
++         top = wx.Rect((rect.GetLeft(), rect.GetTop()), rightPt)
++@@ -1572,11 +1572,11 @@ def DrawMenuBarBackground(self, dc, rect):
++ 
++         factor = artMgr.GetMenuBgFactor()
++ 
++-        leftPt1 = wx.Point(rect.x, rect.y + (rect.height / factor))
++-        leftPt2 = wx.Point(rect.x, rect.y + (rect.height / factor)*(factor-1))
+++        leftPt1 = wx.Point(rect.x, rect.y + (rect.height // factor))
+++        leftPt2 = wx.Point(rect.x, rect.y + (rect.height // factor)*(factor-1))
++ 
++-        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor))
++-        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height / factor)*(factor-1))
+++        rightPt1 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor))
+++        rightPt2 = wx.Point(rect.x + rect.width, rect.y + (rect.height // factor)*(factor-1))
++ 
++         # Define the top region
++         topReg = [wx.Point() for ii in range(7)]
++@@ -2707,7 +2707,7 @@ def DrawToolbar(self, dc, rect):
++             elif tbItem.IsCustomControl():
++                 control = tbItem.GetCustomControl()
++                 ctrlSize = control.GetSize()
++-                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)/2)
+++                ctrlPos = wx.Point(xx, rect.y + (rect.height - ctrlSize.y)//2)
++                 if control.GetPosition() != ctrlPos:
++                     control.SetPosition(ctrlPos)
++ 
++@@ -2727,9 +2727,9 @@ def DrawToolbar(self, dc, rect):
++             # Draw the toolbar image
++             if bmp.IsOk():
++ 
++-                x = xx - self._toolbarSpacer/2
+++                x = xx - self._toolbarSpacer//2
++                 #y = rect.y + (rect.height - bmp.GetHeight())/2 - 1
++-                y = rect.y + self._toolbarMargin/2
+++                y = rect.y + self._toolbarMargin//2
++ 
++                 buttonRect = wx.Rect(x, y, highlight_width, highlight_height)
++ 
++@@ -2745,8 +2745,8 @@ def DrawToolbar(self, dc, rect):
++                     else:
++                         self._tbButtons[i]._state = ControlNormal
++ 
++-                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())/2
++-                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())/2
+++                imgx = buttonRect.x + (buttonRect.width - bmp.GetWidth())//2
+++                imgy = buttonRect.y + (buttonRect.height - bmp.GetHeight())//2
++ 
++                 if self._tbButtons[i]._state == ControlFocus and not self._tbButtons[i]._tbItem.IsSelected():
++ 
++@@ -2827,8 +2827,8 @@ def DrawMoreButton(self, dc, state):
++         dropArrowBmp = self.GetRenderer()._bitmaps["arrow_down"]
++ 
++         # Calc the image coordinates
++-        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())/2
+++        xx = rect.x + (DROP_DOWN_ARROW_WIDTH - dropArrowBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - dropArrowBmp.GetHeight())//2
++ 
++         dc.DrawBitmap(dropArrowBmp, xx, yy + self._spacer, True)
++         self._dropDownButtonState = state
++@@ -3269,8 +3269,8 @@ def DrawToolbarItem(self, dc, idx, state):
++ 
++         # draw the bitmap over the highlight
++         buttonRect = wx.Rect(*rect)
++-        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())/2
++-        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())/2
+++        x = rect.x + (buttonRect.width - self._tbButtons[idx]._tbItem.GetBitmap().GetWidth())//2
+++        y = rect.y + (buttonRect.height - self._tbButtons[idx]._tbItem.GetBitmap().GetHeight())//2
++ 
++         if state == ControlFocus:
++ 
++@@ -3784,7 +3784,7 @@ def PositionAUI(self, mgr, fixToolbar=True):
++         pn.Name("flat_menu_bar")
++         pn.Caption("Menu Bar")
++         pn.Top()
++-        pn.MinSize(wx.Size(xx/2, self._barHeight))
+++        pn.MinSize(wx.Size(xx//2, self._barHeight))
++         pn.LeftDockable(False)
++         pn.RightDockable(False)
++         pn.ToolbarPane()
++@@ -3997,8 +3997,8 @@ def Draw(self, dc):
++         """
++ 
++         rect = wx.Rect(self._pos, self._size)
++-        xx = rect.x + (rect.width - self._normalBmp.GetWidth())/2
++-        yy = rect.y + (rect.height - self._normalBmp.GetHeight())/2
+++        xx = rect.x + (rect.width - self._normalBmp.GetWidth())//2
+++        yy = rect.y + (rect.height - self._normalBmp.GetHeight())//2
++ 
++         self._parent.GetRenderer().DrawScrollButton(dc, rect, self._state)
++         dc.DrawBitmap(self._normalBmp, xx, yy, True)
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index f5e5200b2..561749b89 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -858,9 +858,9 @@ def PaintStraightGradientBox(dc, rect, startColour, endColour, vertical=True):
++ 
++     for i in range(high+1):
++ 
++-        r = startColour.Red() + ((i*rd*100)/high)/100
++-        g = startColour.Green() + ((i*gd*100)/high)/100
++-        b = startColour.Blue() + ((i*bd*100)/high)/100
+++        r = startColour.Red() + ((i*rd*100)//high)//100
+++        g = startColour.Green() + ((i*gd*100)//high)//100
+++        b = startColour.Blue() + ((i*bd*100)//high)//100
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++@@ -2631,9 +2631,9 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         imageYCoord = (pc.HasAGWFlag(FNB_BOTTOM) and [6] or [8])[0]
++ 
++         if hasImage:
++-            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints/2
+++            textOffset = 2*pc._pParent._nPadding + 16 + shapePoints//2
++         else:
++-            textOffset = pc._pParent._nPadding + shapePoints/2
+++            textOffset = pc._pParent._nPadding + shapePoints//2
++ 
++         textOffset += 2
++ 
++diff --git a/wx/lib/agw/floatspin.py b/wx/lib/agw/floatspin.py
++index bdbaf85ec..4559eb5de 100644
++--- a/wx/lib/agw/floatspin.py
+++++ b/wx/lib/agw/floatspin.py
++@@ -336,7 +336,7 @@ class FloatSpin(wx.Control):
++     """
++ 
++     def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++-                 size=(95,-1), style=0, value=0.0, min_val=None, max_val=None,
+++                 size=wx.DefaultSize, style=0, value=0.0, min_val=None, max_val=None,
++                  increment=1.0, digits=-1, agwStyle=FS_LEFT,
++                  name="FloatSpin"):
++         """
++diff --git a/wx/lib/agw/gradientbutton.py b/wx/lib/agw/gradientbutton.py
++index c4633b296..58625c508 100644
++--- a/wx/lib/agw/gradientbutton.py
+++++ b/wx/lib/agw/gradientbutton.py
++@@ -412,14 +412,14 @@ def OnPaint(self, event):
++ 
++         x, y, width, height = clientRect
++ 
++-        gradientRect.SetHeight(gradientRect.GetHeight()/2 + ((capture==self and [1] or [0])[0]))
+++        gradientRect.SetHeight(gradientRect.GetHeight()//2 + ((capture==self and [1] or [0])[0]))
++         if capture != self:
++             if self._mouseAction == HOVER:
++                 topStart, topEnd = self.LightColour(self._topStartColour, 10), self.LightColour(self._topEndColour, 10)
++             else:
++                 topStart, topEnd = self._topStartColour, self._topEndColour
++ 
++-            rc1 = wx.Rect(x, y, width, height/2)
+++            rc1 = wx.Rect(x, y, width, height//2)
++             path1 = self.GetPath(gc, rc1, 8)
++             br1 = gc.CreateLinearGradientBrush(x, y, x, y+height/2, topStart, topEnd)
++             gc.SetBrush(br1)
++@@ -448,7 +448,7 @@ def OnPaint(self, event):
++             else:
++                 bottomStart, bottomEnd = self._bottomStartColour, self._bottomEndColour
++ 
++-            rc3 = wx.Rect(x, y+height/2, width, height/2)
+++            rc3 = wx.Rect(x, y+height//2, width, height//2)
++             path3 = self.GetPath(gc, rc3, 8)
++             br3 = gc.CreateLinearGradientBrush(x, y+height/2, x, y+height, bottomStart, bottomEnd)
++             gc.SetBrush(br3)
++@@ -463,7 +463,7 @@ def OnPaint(self, event):
++             shadowOffset = 0
++         else:
++ 
++-            rc2 = wx.Rect(x+1, gradientRect.height/2, gradientRect.width, gradientRect.height)
+++            rc2 = wx.Rect(x+1, gradientRect.height//2, gradientRect.width, gradientRect.height)
++             path2 = self.GetPath(gc, rc2, 8)
++             gc.SetPen(wx.Pen(self._pressedBottomColour))
++             gc.SetBrush(wx.Brush(self._pressedBottomColour))
++diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py
++index 12302f3b0..377ac0121 100644
++--- a/wx/lib/agw/hypertreelist.py
+++++ b/wx/lib/agw/hypertreelist.py
++@@ -3437,7 +3437,7 @@ def PaintLevel(self, item, dc, level, y, x_maincol):
++ 
++             if not self.HasAGWFlag(wx.TR_NO_LINES) and children:
++                 last_child = children[-1]
++-                Y1 = last_child.GetY() + last_child.GetHeight() / 2
+++                Y1 = last_child.GetY() + last_child.GetHeight() // 2
++                 dc.DrawLine(x, oldY, x, Y1)
++ 
++         return y, x_maincol
++diff --git a/wx/lib/agw/knobctrl.py b/wx/lib/agw/knobctrl.py
++index 742097b09..1e5045ff6 100644
++--- a/wx/lib/agw/knobctrl.py
+++++ b/wx/lib/agw/knobctrl.py
++@@ -325,7 +325,7 @@ def OnSize(self,event):
++         memory.Clear()
++ 
++         minradius = min(0.9*self.Width/2.0, 0.9*self.Height/2.0)
++-        memory.DrawCircle(self.Width//2, self.Height//2, minradius)
+++        memory.DrawCircle(self.Width//2, self.Height//2, int(minradius))
++         memory.SelectObject(wx.NullBitmap)
++         self._region = wx.Region(self._Buffer, self.GetBackgroundColour())
++         self._minradius = minradius
++@@ -645,8 +645,8 @@ def DrawTags(self, dc, size):
++             dxi = math.cos(angle)*((width - xshift + tagLen - 6)/2.0 - tagLen)
++             dyi = math.sin(angle)*((height - yshift + tagLen - 6)/2.0 - tagLen)
++ 
++-            dc.DrawLine(width//2 - sxi, height//2 - syi,
++-                        width//2 - dxi, height//2 - dyi)
+++            dc.DrawLine(int(width//2 - sxi), int(height//2 - syi),
+++                        int(width//2 - dxi), int(height//2 - dyi))
++ 
++ 
++     def DrawDiagonalGradient(self, dc, size):
++@@ -759,8 +759,8 @@ def DrawInsetCircle(self, dc, pencolour):
++         p1 = wx.Pen(self.OffsetColour(pencolour, -70), 2)
++         p2 = wx.Pen(self.OffsetColour(pencolour, 10), 1)
++ 
++-        pt1 = wx.Point(cx-r*math.sqrt(2)/2.0, cy+r*math.sqrt(2)/2.0)
++-        pt2 = wx.Point(cx+r*math.sqrt(2)/2.0, cy-r*math.sqrt(2)/2.0)
+++        pt1 = wx.Point(int(cx-r*math.sqrt(2)/2.0), int(cy+r*math.sqrt(2)/2.0))
+++        pt2 = wx.Point(int(cx+r*math.sqrt(2)/2.0), int(cy-r*math.sqrt(2)/2.0))
++ 
++         dc.SetPen(p2)
++         dc.DrawArc(pt1, pt2, (cx, cy))
++@@ -779,7 +779,7 @@ def DrawBoundingCircle(self, dc, size):
++         radius = 0.9*min(size.x, size.y)/2.0
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++         dc.SetPen(wx.Pen(self._boundingcolour))
++-        dc.DrawCircle(self.Width//2, self.Height//2, radius)
+++        dc.DrawCircle(self.Width//2, self.Height//2, int(radius))
++ 
++ 
++     def CircleCoords(self, radius, angle, centerX, centerY):
++diff --git a/wx/lib/agw/labelbook.py b/wx/lib/agw/labelbook.py
++index b716df3a2..f8c9cd54d 100644
++--- a/wx/lib/agw/labelbook.py
+++++ b/wx/lib/agw/labelbook.py
++@@ -1376,13 +1376,13 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    imgXcoord = self._nImgSize / 2
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize / 2] or [pos + imgTopPadding])[0]
+++                    imgXcoord = self._nImgSize // 2
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [pos + self._nImgSize // 2] or [pos + imgTopPadding])[0]
++ 
++                 else:
++ 
++-                    imgXcoord = pos + (rectWidth / 2) - (self._nImgSize / 2)
++-                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize / 2] or [imgTopPadding])[0]
+++                    imgXcoord = pos + (rectWidth // 2) - (self._nImgSize // 2)
+++                    imgYcoord = (style & INB_SHOW_ONLY_IMAGES and [self._nImgSize // 2] or [imgTopPadding])[0]
++ 
++                 self._ImageList.Draw(self._pagesInfoVec[i].GetImageIndex(), dc,
++                                      imgXcoord, imgYcoord,
++@@ -1408,15 +1408,15 @@ def OnPaint(self, event):
++ 
++                 if bUseYcoord:
++ 
++-                    textOffsetX = ((rectWidth - textWidth) / 2 )
+++                    textOffsetX = ((rectWidth - textWidth) // 2 )
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT  and [pos + self._nImgSize  + imgTopPadding + 3] or \
++-                                       [pos + ((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [pos + ((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 else:
++ 
++-                    textOffsetX = (rectWidth - textWidth) / 2  + pos + nTextPaddingLeft
+++                    textOffsetX = (rectWidth - textWidth) // 2  + pos + nTextPaddingLeft
++                     textOffsetY = (not style & INB_SHOW_ONLY_TEXT and [self._nImgSize + imgTopPadding + 3] or \
++-                                       [((self._nImgSize * 2 - textHeight) / 2 )])[0]
+++                                       [((self._nImgSize * 2 - textHeight) // 2 )])[0]
++ 
++                 dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))
++                 dc.DrawText(fixedText, textOffsetX, textOffsetY)
++@@ -1591,8 +1591,8 @@ def OnPaint(self, event):
++             # Draw gradient in the background area
++             startColour = self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR]
++             endColour   = ArtManager.Get().LightColour(self._coloursMap[INB_TAB_AREA_BACKGROUND_COLOUR], 50)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x / 2, size.y), startColour, endColour, False)
++-            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x / 2, 0, size.x / 2, size.y), endColour, startColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(0, 0, size.x // 2, size.y), startColour, endColour, False)
+++            ArtManager.Get().PaintStraightGradientBox(dc, wx.Rect(size.x // 2, 0, size.x // 2, size.y), endColour, startColour, False)
++ 
++         else:
++ 
++@@ -1638,7 +1638,7 @@ def OnPaint(self, event):
++ 
++             if self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++                 font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-                font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++                font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++                 if self.GetParent().GetFontBold():
++                     font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -1954,7 +1954,7 @@ def DrawWebHover(self, dc, caption, xCoord, yCoord, selected):
++ 
++         # Redraw the text with underlined font
++         underLinedFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        underLinedFont.SetPointSize(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        underLinedFont.SetPointSize(int(underLinedFont.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++         if self.GetParent().GetFontBold():
++             underLinedFont.SetWeight(wx.FONTWEIGHT_BOLD)
++         elif self.HasAGWFlag(INB_BOLD_TAB_SELECTION) and selected:
++@@ -2050,7 +2050,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++         imgRect = wx.Rect(*rect)
++ 
++         font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-        font.SetPointSize(font.GetPointSize() * self.GetParent().GetFontSizeMultiple())
+++        font.SetPointSize(int(font.GetPointSize() * self.GetParent().GetFontSizeMultiple()))
++ 
++         if self.GetParent().GetFontBold():
++             font.SetWeight(wx.FONTWEIGHT_BOLD)
++@@ -2069,7 +2069,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++         # Text bounding rectangle
++         textRect.x += nPadding
++-        textRect.y = rect.y + (rect.height - h)/2
+++        textRect.y = rect.y + (rect.height - h)//2
++         textRect.width = rect.width - 2 * nPadding
++ 
++         if bmp.IsOk() and not self.HasAGWFlag(INB_SHOW_ONLY_TEXT):
++@@ -2086,7 +2086,7 @@ def DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selec
++ 
++             imgRect.x += nPadding
++             imgRect.width = bmp.GetWidth()
++-            imgRect.y = rect.y + (rect.height - bmp.GetHeight())/2
+++            imgRect.y = rect.y + (rect.height - bmp.GetHeight())//2
++             imgRect.height = bmp.GetHeight()
++ 
++         # Draw bounding rectangle
++@@ -2496,7 +2496,7 @@ def ResizeTabArea(self):
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(1, 1))
++             font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
++-            font.SetPointSize(font.GetPointSize()*self._fontSizeMultiple)
+++            font.SetPointSize(int(font.GetPointSize()*self._fontSizeMultiple))
++             if self.GetFontBold() or agwStyle & INB_BOLD_TAB_SELECTION:
++                 font.SetWeight(wx.FONTWEIGHT_BOLD)
++             dc.SetFont(font)
++diff --git a/wx/lib/agw/peakmeter.py b/wx/lib/agw/peakmeter.py
++index 055dbef81..a5f88a9d5 100644
++--- a/wx/lib/agw/peakmeter.py
+++++ b/wx/lib/agw/peakmeter.py
++@@ -784,7 +784,7 @@ def DrawHorzBand(self, dc, rect):
++                 maxWidth = size.x*horzBands
++                 points = [wx.Point() for i in range(2)]
++                 points[0].y = rectPrev.GetTopRight().y - yDecal
++-                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth/self._maxValue
+++                points[0].x = rectPrev.GetBottomLeft().x + self._meterData[vert]._falloff*maxWidth//self._maxValue
++                 points[1].y = rectPrev.GetBottomLeft().y + yDecal
++                 points[1].x = points[0].x
++                 dc.SetPen(pen)
++diff --git a/wx/lib/agw/pygauge.py b/wx/lib/agw/pygauge.py
++index bab459a3a..b8654436a 100644
++--- a/wx/lib/agw/pygauge.py
+++++ b/wx/lib/agw/pygauge.py
++@@ -344,7 +344,7 @@ def OnPaint(self, event):
++                 c1,c2 = gradient
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.GradientFillLinear(r, c1, c2, wx.EAST)
++         else:
++             for i, colour in enumerate(self._barColourSorted):
++@@ -352,7 +352,7 @@ def OnPaint(self, event):
++                 dc.SetPen(wx.Pen(colour))
++                 w = rect.width * (float(self._valueSorted[i]) / self._range)
++                 r = copy.copy(rect)
++-                r.width = w
+++                r.width = int(w)
++                 dc.DrawRectangle(r)
++ 
++ 
++diff --git a/wx/lib/agw/ribbon/art_aui.py b/wx/lib/agw/ribbon/art_aui.py
++index a1d255843..31fedf487 100644
++--- a/wx/lib/agw/ribbon/art_aui.py
+++++ b/wx/lib/agw/ribbon/art_aui.py
++@@ -390,7 +390,7 @@ def DrawTab(self, dc, wnd, tab):
++             grad_rect = wx.Rect(*tab.rect)
++             grad_rect.height -= 4
++             grad_rect.width -= 1
++-            grad_rect.height /= 2
+++            grad_rect.height //= 2
++             grad_rect.y = grad_rect.y + tab.rect.height - grad_rect.height - 1
++             dc.SetBrush(self._tab_active_top_background_brush)
++             dc.DrawRectangle(tab.rect.x, tab.rect.y + 3, tab.rect.width - 1, grad_rect.y - tab.rect.y - 3)
++@@ -401,7 +401,7 @@ def DrawTab(self, dc, wnd, tab):
++             btm_rect = wx.Rect(*tab.rect)
++             btm_rect.height -= 4
++             btm_rect.width -= 1
++-            btm_rect.height /= 2
+++            btm_rect.height //= 2
++             btm_rect.y = btm_rect.y + tab.rect.height - btm_rect.height - 1
++             dc.SetBrush(self._tab_hover_background_brush)
++             dc.DrawRectangle(btm_rect.x, btm_rect.y, btm_rect.width, btm_rect.height)
++@@ -434,8 +434,8 @@ def DrawTab(self, dc, wnd, tab):
++             icon = tab.page.GetIcon()
++             if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++                 if icon.IsOk():
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
++-                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
+++                    dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -450,7 +450,7 @@ def DrawTab(self, dc, wnd, tab):
++                     offset += icon.GetWidth() + 2
++ 
++                 text_width, text_height = dc.GetTextExtent(label)
++-                x = (tab.rect.width - 2 - text_width - offset) / 2
+++                x = (tab.rect.width - 2 - text_width - offset) // 2
++                 if x > 8:
++                     x = 8
++                 elif x < 1:
++@@ -458,7 +458,7 @@ def DrawTab(self, dc, wnd, tab):
++ 
++                 width = tab.rect.width - x - 2
++                 x += tab.rect.x + offset
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if icon.IsOk():
++                     dc.DrawBitmap(icon, x - offset, tab.rect.y + (tab.rect.height - icon.GetHeight()) / 2, True)
++@@ -892,8 +892,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def DrawPartialPanelBackground(self, dc, wnd, rect):
++@@ -1024,7 +1024,7 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++             dc.DrawRectangle(reduced_rect.x, reduced_rect.y, reduced_rect.width, reduced_rect.height)
++             btn_bitmap = bitmaps[3]
++ 
++-        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width / 2 - 2, (rect.y + rect.height / 2) - 2, True)
+++        dc.DrawBitmap(btn_bitmap, reduced_rect.x + reduced_rect.width // 2 - 2, (rect.y + rect.height // 2) - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1277,7 +1277,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++             if is_split_hybrid:
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++-            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height / 2) - 2, True)
+++            dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2, bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2, bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++diff --git a/wx/lib/agw/ribbon/art_internal.py b/wx/lib/agw/ribbon/art_internal.py
++index 4a8dc7ce0..78e8f3fe4 100644
++--- a/wx/lib/agw/ribbon/art_internal.py
+++++ b/wx/lib/agw/ribbon/art_internal.py
++@@ -32,9 +32,9 @@ def RibbonInterpolateColour(start_colour, end_colour, position, start_position,
++     r = end_colour.Red() - start_colour.Red()
++     g = end_colour.Green() - start_colour.Green()
++     b = end_colour.Blue() - start_colour.Blue()
++-    r = start_colour.Red()   + (((r * position * 100) / end_position) / 100)
++-    g = start_colour.Green() + (((g * position * 100) / end_position) / 100)
++-    b = start_colour.Blue()  + (((b * position * 100) / end_position) / 100)
+++    r = start_colour.Red()   + (((r * position * 100) // end_position) // 100)
+++    g = start_colour.Green() + (((g * position * 100) // end_position) // 100)
+++    b = start_colour.Blue()  + (((b * position * 100) // end_position) // 100)
++ 
++     return wx.Colour(r, g, b)
++ 
++@@ -61,9 +61,9 @@ def RibbonDrawParallelGradientLines(dc, nlines, line_origins, stepx, stepy, nums
++     bd = end_colour.Blue() - start_colour.Blue()
++ 
++     for step in range(numsteps):
++-        r = start_colour.Red() + (((step*rd*100)/numsteps)/100)
++-        g = start_colour.Green() + (((step*gd*100)/numsteps)/100)
++-        b = start_colour.Blue() + (((step*bd*100)/numsteps)/100)
+++        r = start_colour.Red() + (((step*rd*100)//numsteps)//100)
+++        g = start_colour.Green() + (((step*gd*100)//numsteps)//100)
+++        b = start_colour.Blue() + (((step*bd*100)//numsteps)//100)
++ 
++         p = wx.Pen(wx.Colour(r, g, b))
++         dc.SetPen(p)
++diff --git a/wx/lib/agw/ribbon/art_msw.py b/wx/lib/agw/ribbon/art_msw.py
++index e7317d59b..00c3dfe2b 100644
++--- a/wx/lib/agw/ribbon/art_msw.py
+++++ b/wx/lib/agw/ribbon/art_msw.py
++@@ -982,7 +982,7 @@ def DrawTab(self, dc, wnd, tab):
++                 background.width -= 4
++                 background.height -= 3
++                 h = background.height
++-                background.height /= 2
+++                background.height //= 2
++                 dc.GradientFillLinear(background, self._tab_hover_background_top_colour,
++                                       self._tab_hover_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1024,9 +1024,9 @@ def DrawTab(self, dc, wnd, tab):
++             if icon.IsOk():
++                 x = tab.rect.x + 4
++                 if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS == 0:
++-                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2
+++                    x = tab.rect.x + (tab.rect.width - icon.GetWidth()) // 2
++ 
++-                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) / 2, True)
+++                dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 - icon.GetHeight()) // 2, True)
++ 
++         if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:
++             label = tab.page.GetLabel()
++@@ -1043,13 +1043,13 @@ def DrawTab(self, dc, wnd, tab):
++                     x += 3 + tab.page.GetIcon().GetWidth()
++                     width -= 3 + tab.page.GetIcon().GetWidth()
++ 
++-                y = tab.rect.y + (tab.rect.height - text_height) / 2
+++                y = tab.rect.y + (tab.rect.height - text_height) // 2
++ 
++                 if width <= text_width:
++                     dc.SetClippingRegion(x, tab.rect.y, width, tab.rect.height)
++                     dc.DrawText(label, x, y)
++                 else:
++-                    dc.DrawText(label, x + (width - text_width) / 2 + 1, y)
+++                    dc.DrawText(label, x + (width - text_width) // 2 + 1, y)
++ 
++ 
++     def DrawTabSeparator(self, dc, wnd, rect, visibility):
++@@ -1093,7 +1093,7 @@ def ReallyDrawTabSeparator(self, wnd, rect, visibility):
++         dc = wx.MemoryDC(self._cached_tab_separator)
++         self.DrawTabCtrlBackground(dc, wnd, rect)
++ 
++-        x = rect.x + rect.width / 2
+++        x = rect.x + rect.width // 2
++         h = float(rect.height - 1)
++ 
++         r1 = self._tab_ctrl_background_brush.GetColour().Red() * (1.0 - visibility) + 0.5
++@@ -1146,7 +1146,7 @@ def DrawPartialPageBackground1(self, dc, wnd, rect, page, offset, hovered=False)
++ 
++         # upper_rect, lower_rect, paint_rect are all in page co-ordinates
++         upper_rect = wx.Rect(*background)
++-        upper_rect.height /= 5
+++        upper_rect.height //= 5
++ 
++         lower_rect = wx.Rect(*background)
++         lower_rect.y += upper_rect.height
++@@ -1229,7 +1229,7 @@ def DrawPageBackground(self, dc, wnd, rect):
++         background.width -= 4
++         background.height -= 2
++ 
++-        background.height /= 5
+++        background.height //= 5
++         dc.GradientFillLinear(background, self._page_background_top_colour,
++                               self._page_background_top_gradient_colour, wx.SOUTH)
++ 
++@@ -1493,10 +1493,10 @@ def DrawPanelBackground(self, dc, wnd, rect):
++ 
++         if clip_label:
++             clip = wx.DCClipper(dc, label_rect)
++-            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x, label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++         else:
++-            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) / 2,
++-                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) / 2)
+++            dc.DrawText(label, label_rect.x + (label_rect.GetWidth() - label_size.GetWidth()) // 2,
+++                        label_rect.y + (label_rect.GetHeight() - label_size.GetHeight()) // 2)
++ 
++         if has_ext_button:
++             if wnd.IsExtButtonHovered():
++@@ -1577,7 +1577,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x, rect.y + rect.height - 15, rect.x + rect.width, rect.y + rect.height - 15)
++ 
++-            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width / 3, 15)
+++            up_btn = wx.Rect(rect.x, rect.y + rect.height - 15, rect.width // 3, 15)
++             down_btn = wx.Rect(up_btn.GetRight() + 1, up_btn.GetTop(), up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetLeft(), down_btn.GetBottom())
++             ext_btn = wx.Rect(down_btn.GetRight() + 1, up_btn.GetTop(), rect.width - up_btn.GetWidth() - down_btn.GetWidth() - 1, up_btn.GetHeight())
++@@ -1587,7 +1587,7 @@ def DrawGalleryBackgroundCommon(self, dc, wnd, rect):
++             # Divider between items and buttons
++             dc.DrawLine(rect.x + rect.width - 15, rect.y, rect.x + rect.width - 15, rect.y + rect.height)
++ 
++-            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height / 3)
+++            up_btn = wx.Rect(rect.x + rect.width - 15, rect.y, 15, rect.height // 3)
++             down_btn = wx.Rect(up_btn.GetLeft(), up_btn.GetBottom() + 1, up_btn.GetWidth(), up_btn.GetHeight())
++             dc.DrawLine(down_btn.GetLeft(), down_btn.GetTop(), down_btn.GetRight(), down_btn.GetTop())
++             ext_btn = wx.Rect(up_btn.GetLeft(), down_btn.GetBottom() + 1, up_btn.GetWidth(), rect.height - up_btn.GetHeight() - down_btn.GetHeight() - 1)
++@@ -1633,14 +1633,14 @@ def DrawGalleryButton(self, dc, rect, state, bitmaps):
++ 
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(btn_top_brush)
++-        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height / 2)
+++        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height // 2)
++ 
++         lower = wx.Rect(*rect)
++-        lower.height = (lower.height + 1) / 2
+++        lower.height = (lower.height + 1) // 2
++         lower.y += rect.height - lower.height
++         dc.GradientFillLinear(lower, btn_colour, btn_grad_colour, wx.SOUTH)
++ 
++-        dc.DrawBitmap(btn_bitmap, rect.x + rect.width / 2 - 2, lower.y - 2, True)
+++        dc.DrawBitmap(btn_bitmap, rect.x + rect.width // 2 - 2, lower.y - 2, True)
++ 
++ 
++     def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++@@ -1691,7 +1691,7 @@ def DrawGalleryItemBackground(self, dc, wnd, rect, item):
++         upper.x += 1
++         upper.width -= 2
++         upper.y += 1
++-        upper.height /= 3
+++        upper.height //= 3
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.SetBrush(top_brush)
++         dc.DrawRectangle(upper.x, upper.y, upper.width, upper.height)
++@@ -1760,7 +1760,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++             client_rect.x += 1
++             client_rect.width -= 2
++             client_rect.y += 1
++-            client_rect.height = (rect.y + rect.height / 5) - client_rect.x
+++            client_rect.height = (rect.y + rect.height // 5) - client_rect.x
++             dc.GradientFillLinear(client_rect,
++                                   self._panel_active_background_top_colour,
++                                   self._panel_active_background_top_gradient_colour, wx.SOUTH)
++@@ -1785,7 +1785,7 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++         dc.SetPen(wx.TRANSPARENT_PEN)
++         dc.DrawRectangle(preview.x + 1, preview.y + preview.height - 8, preview.width - 2, 7)
++ 
++-        mid_pos = rect.y + rect.height / 5 - preview.y
+++        mid_pos = rect.y + rect.height // 5 - preview.y
++ 
++         if mid_pos < 0 or mid_pos >= preview.height:
++             full_rect = wx.Rect(*preview)
++@@ -1816,8 +1816,8 @@ def DrawMinimisedPanel(self, dc, wnd, rect, bitmap):
++                                   self._page_hover_background_gradient_colour, wx.SOUTH)
++ 
++         if bitmap.IsOk():
++-            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
++-                          preview.y + (preview.height - 7 - bitmap.GetHeight()) / 2, True)
+++            dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) // 2,
+++                          preview.y + (preview.height - 7 - bitmap.GetHeight()) // 2, True)
++ 
++         self.DrawPanelBorder(dc, preview, self._panel_border_pen, self._panel_border_gradient_pen)
++         self.DrawPanelBorder(dc, true_rect, self._panel_minimised_border_pen, self._panel_minimised_border_gradient_pen)
++@@ -1829,20 +1829,20 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             preview.x = true_rect.x + 4
++-            preview.y = true_rect.y + (true_rect.height - preview.height) / 2
+++            preview.y = true_rect.y + (true_rect.height - preview.height) // 2
++         else:
++-            preview.x = true_rect.x + (true_rect.width - preview.width) / 2
+++            preview.x = true_rect.x + (true_rect.width - preview.width) // 2
++             preview.y = true_rect.y + 4
++ 
++         dc.SetFont(self._panel_label_font)
++         label_width, label_height = dc.GetTextExtent(wnd.GetLabel())
++ 
++-        xpos = true_rect.x + (true_rect.width - label_width + 1) / 2
+++        xpos = true_rect.x + (true_rect.width - label_width + 1) // 2
++         ypos = preview.y + preview.height + 5
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos = preview.x + preview.width + 5
++-            ypos = true_rect.y + (true_rect.height - label_height) / 2
+++            ypos = true_rect.y + (true_rect.height - label_height) // 2
++ 
++         dc.SetTextForeground(self._panel_minimised_label_colour)
++         dc.DrawText(wnd.GetLabel(), xpos, ypos)
++@@ -1851,12 +1851,12 @@ def DrawMinimisedPanelCommon(self, dc, wnd, true_rect):
++ 
++         if self._flags & RIBBON_BAR_FLOW_VERTICAL:
++             xpos += label_width
++-            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height / 2)
+++            arrow_points[0] = wx.Point(xpos + 5, ypos + label_height // 2)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3,  3)
++             arrow_points[2] = arrow_points[0] + wx.Point(-3, -3)
++         else:
++             ypos += label_height
++-            arrow_points[0] = wx.Point(true_rect.width / 2, ypos + 5)
+++            arrow_points[0] = wx.Point(true_rect.width // 2, ypos + 5)
++             arrow_points[1] = arrow_points[0] + wx.Point(-3, -3)
++             arrow_points[2] = arrow_points[0] + wx.Point( 3, -3)
++ 
++@@ -1967,7 +1967,7 @@ def DrawButtonBarButton(self, dc, wnd, rect, kind, state, label, bitmap_large, b
++             bg_rect.height -= 2
++ 
++             bg_rect_top = wx.Rect(*bg_rect)
++-            bg_rect_top.height /= 3
+++            bg_rect_top.height //= 3
++             bg_rect.y += bg_rect_top.height
++             bg_rect.height -= bg_rect_top.height
++ 
++@@ -2043,7 +2043,7 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         if result == RIBBON_BUTTONBAR_BUTTON_LARGE:
++ 
++             padding = 2
++-            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) / 2,
+++            dc.DrawBitmap(bitmap_large, rect.x + (rect.width - bitmap_large.GetWidth()) // 2,
++                           rect.y + padding, True)
++             ypos = rect.y + padding + bitmap_large.GetHeight() + padding
++             arrow_width = (kind == RIBBON_BUTTON_NORMAL and [0] or [8])[0]
++@@ -2052,10 +2052,10 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++ 
++             if label_w + 2 * padding <= rect.width:
++ 
++-                dc.DrawText(label, rect.x + (rect.width - label_w) / 2, ypos)
+++                dc.DrawText(label, rect.x + (rect.width - label_w) // 2, ypos)
++                 if arrow_width != 0:
++-                    self.DrawDropdownArrow(dc, rect.x + rect.width / 2,
++-                                           ypos + (label_h * 3) / 2,
+++                    self.DrawDropdownArrow(dc, rect.x + rect.width // 2,
+++                                           ypos + (label_h * 3) // 2,
++                                            self._button_bar_label_colour)
++             else:
++                 breaki = len(label)
++@@ -2067,17 +2067,17 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++                         label_w, label_h = dc.GetTextExtent(label_top)
++ 
++                         if label_w + 2 * padding <= rect.width:
++-                            dc.DrawText(label_top, rect.x + (rect.width - label_w) / 2, ypos)
+++                            dc.DrawText(label_top, rect.x + (rect.width - label_w) // 2, ypos)
++                             ypos += label_h
++                             label_bottom = label[breaki:]
++                             label_w, label_h = dc.GetTextExtent(label_bottom)
++                             label_w += arrow_width
++-                            iX = rect.x + (rect.width - label_w) / 2
+++                            iX = rect.x + (rect.width - label_w) // 2
++                             dc.DrawText(label_bottom, iX, ypos)
++ 
++                             if arrow_width != 0:
++                                 self.DrawDropdownArrow(dc, iX + 2 +label_w - arrow_width,
++-                                                       ypos + label_h / 2 + 1,
+++                                                       ypos + label_h // 2 + 1,
++                                                        self._button_bar_label_colour)
++ 
++                             break
++@@ -2085,14 +2085,14 @@ def DrawButtonBarButtonForeground(self, dc, rect, kind, state, label, bitmap_lar
++         elif result == RIBBON_BUTTONBAR_BUTTON_MEDIUM:
++ 
++             x_cursor = rect.x + 2
++-            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())/2, True)
+++            dc.DrawBitmap(bitmap_small, x_cursor, rect.y + (rect.height - bitmap_small.GetHeight())//2, True)
++             x_cursor += bitmap_small.GetWidth() + 2
++             label_w, label_h = dc.GetTextExtent(label)
++-            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) / 2)
+++            dc.DrawText(label, x_cursor, rect.y + (rect.height - label_h) // 2)
++             x_cursor += label_w + 3
++ 
++             if kind != RIBBON_BUTTON_NORMAL:
++-                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2,
+++                self.DrawDropdownArrow(dc, x_cursor, rect.y + rect.height // 2,
++                                        self._button_bar_label_colour)
++ 
++         else:
++@@ -2184,7 +2184,7 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++ 
++         # Background
++         bg_rect_top = wx.Rect(*bg_rect)
++-        bg_rect_top.height = (bg_rect_top.height * 2) / 5
+++        bg_rect_top.height = (bg_rect_top.height * 2) // 5
++         bg_rect_btm = wx.Rect(*bg_rect)
++         bg_rect_btm.y += bg_rect_top.height
++         bg_rect_btm.height -= bg_rect_top.height
++@@ -2244,10 +2244,10 @@ def DrawTool(self, dc, wnd, rect, bitmap, kind, state):
++                 dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height)
++ 
++             dc.DrawBitmap(self._toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
++-                          bg_rect.y + (bg_rect.height / 2) - 2, True)
+++                          bg_rect.y + (bg_rect.height // 2) - 2, True)
++ 
++-        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2,
++-                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, True)
+++        dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) // 2,
+++                      bg_rect.y + (bg_rect.height - bitmap.GetHeight()) // 2, True)
++ 
++ 
++     def GetBarTabWidth(self, dc, wnd, label, bitmap, ideal=None, small_begin_need_separator=None,
++@@ -2474,7 +2474,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.y = size.GetHeight() - 15
++             scroll_up.height = 15
++             scroll_up.x = 0
++-            scroll_up.width = (size.GetWidth() + 2) / 3
+++            scroll_up.width = (size.GetWidth() + 2) // 3
++             scroll_down.y = scroll_up.y
++             scroll_down.height = scroll_up.height
++             scroll_down.x = scroll_up.x + scroll_up.width
++@@ -2491,7 +2491,7 @@ def GetGalleryClientSize(self, dc, wnd, size, client_offset=None, scroll_up_butt
++             scroll_up.x = size.GetWidth() - 15
++             scroll_up.width = 15
++             scroll_up.y = 0
++-            scroll_up.height = (size.GetHeight() + 2) / 3
+++            scroll_up.height = (size.GetHeight() + 2) // 3
++             scroll_down.x = scroll_up.x
++             scroll_down.width = scroll_up.width
++             scroll_down.y = scroll_up.y + scroll_up.height
++diff --git a/wx/lib/agw/ribbon/bar.py b/wx/lib/agw/ribbon/bar.py
++index ae8b6a19c..b0d28776d 100644
++--- a/wx/lib/agw/ribbon/bar.py
+++++ b/wx/lib/agw/ribbon/bar.py
++@@ -743,7 +743,7 @@ def RecalculateTabSizes(self):
++                     delta = info.ideal_width - info.small_must_have_separator_width
++                     info.rect.x = x
++                     info.rect.y = y
++-                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)/total_delta
+++                    info.rect.width = info.small_must_have_separator_width + delta*(width - total_small_width)//total_delta
++                     info.rect.height = self._tab_height
++ 
++                     x += info.rect.width + tabsep
++@@ -797,7 +797,7 @@ def RecalculateTabSizes(self):
++                         delta = smallest_tab_width - info.minimum_width
++                         info.rect.x = x
++                         info.rect.y = y
++-                        info.rect.width = info.minimum_width + delta*(width - total_small_width)/total_delta
+++                        info.rect.width = info.minimum_width + delta*(width - total_small_width)//total_delta
++                         info.rect.height = self._tab_height
++ 
++                         x += info.rect.width + tabsep
++diff --git a/wx/lib/agw/ribbon/buttonbar.py b/wx/lib/agw/ribbon/buttonbar.py
++index 25ee49a82..4690f483d 100644
++--- a/wx/lib/agw/ribbon/buttonbar.py
+++++ b/wx/lib/agw/ribbon/buttonbar.py
++@@ -354,7 +354,7 @@ def InsertButton(self, pos, button_id, label, bitmap, bitmap_small=wx.NullBitmap
++                 self._bitmap_size_large = bitmap.GetSize()
++                 if not bitmap_small.IsOk():
++                     w, h = self._bitmap_size_large
++-                    self._bitmap_size_small = wx.Size(0.5*w, 0.5*h)
+++                    self._bitmap_size_small = wx.Size(w//2, h//2)
++ 
++             if bitmap_small.IsOk():
++ 
++@@ -867,8 +867,8 @@ def OnSize(self, event):
++ 
++             layout_size = self._layouts[layout_i].overall_size
++             if layout_size.x <= new_size.x and layout_size.y <= new_size.y:
++-                self._layout_offset.x = (new_size.x - layout_size.x)/2
++-                self._layout_offset.y = (new_size.y - layout_size.y)/2
+++                self._layout_offset.x = (new_size.x - layout_size.x)//2
+++                self._layout_offset.y = (new_size.y - layout_size.y)//2
++                 self._current_layout = layout_i
++                 break
++ 
++diff --git a/wx/lib/agw/ribbon/gallery.py b/wx/lib/agw/ribbon/gallery.py
++index b830fab7d..b86528865 100644
++--- a/wx/lib/agw/ribbon/gallery.py
+++++ b/wx/lib/agw/ribbon/gallery.py
++@@ -805,8 +805,8 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         if client.GetWidth() < 0 or client.GetHeight() < 0:
++             return relative_to
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++@@ -849,8 +849,8 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         elif direction == wx.BOTH:
++             client.IncBy(self._bitmap_padded_size)
++ 
++-        client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
++-        client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
+++        client.x = (client.x // self._bitmap_padded_size.x) * self._bitmap_padded_size.x
+++        client.y = (client.y // self._bitmap_padded_size.y) * self._bitmap_padded_size.y
++ 
++         size = self._art.GetGallerySize(dc, self, wx.Size(*client))
++         minimum = self.GetMinSize()
++diff --git a/wx/lib/agw/ribbon/panel.py b/wx/lib/agw/ribbon/panel.py
++index 79fd9bc58..901c765b6 100644
++--- a/wx/lib/agw/ribbon/panel.py
+++++ b/wx/lib/agw/ribbon/panel.py
++@@ -584,12 +584,12 @@ def DoGetNextSmallerSize(self, direction, relative_to):
++         minimum = wx.Size(*self.GetMinSize())
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 4) / 5
+++            current.x = (current.x * 4) // 5
++             if current.x < minimum.x:
++                 current.x = minimum.x
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 4) / 5
+++            current.y = (current.y * 4) // 5
++             if current.y < minimum.y:
++                 current.y = minimum.y
++ 
++@@ -668,10 +668,10 @@ def DoGetNextLargerSize(self, direction, relative_to):
++         current = wx.Size(*relative_to)
++ 
++         if direction & wx.HORIZONTAL:
++-            current.x = (current.x * 5 + 3) / 4
+++            current.x = (current.x * 5 + 3) // 4
++ 
++         if direction & wx.VERTICAL:
++-            current.y = (current.y * 5 + 3) / 4
+++            current.y = (current.y * 5 + 3) // 4
++ 
++         return current
++ 
++@@ -1076,25 +1076,25 @@ def GetExpandedPosition(self, panel, expanded_size, direction):
++         pos = wx.Point()
++ 
++         if direction == wx.NORTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetY() - expanded_size.GetHeight()
++             primary_x = True
++             secondary_y = 1
++ 
++         elif direction == wx.EAST:
++             pos.x = panel.GetRight()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = -1
++ 
++         elif direction == wx.SOUTH:
++-            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) / 2
+++            pos.x = panel.GetX() + (panel.GetWidth() - expanded_size.GetWidth()) // 2
++             pos.y = panel.GetBottom()
++             primary_x = True
++             secondary_y = -1
++ 
++         else:
++             pos.x = panel.GetX() - expanded_size.GetWidth()
++-            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) / 2
+++            pos.y = panel.GetY() + (panel.GetHeight() - expanded_size.GetHeight()) // 2
++             secondary_x = 1
++ 
++         expanded = wx.Rect(pos, expanded_size)
++diff --git a/wx/lib/agw/ribbon/toolbar.py b/wx/lib/agw/ribbon/toolbar.py
++index 1771c6506..8c6f8b522 100644
++--- a/wx/lib/agw/ribbon/toolbar.py
+++++ b/wx/lib/agw/ribbon/toolbar.py
++@@ -1159,7 +1159,7 @@ def OnSize(self, event):
++ 
++         # Set group y positions
++         for group in self._groups:
++-            group.position.y = rowypos[group.position.y]
+++            group.position.y = int(rowypos[group.position.y])
++ 
++ 
++     def GetBestSizeForParentSize(self, parentSize):
++diff --git a/wx/lib/agw/shapedbutton.py b/wx/lib/agw/shapedbutton.py
++index f015d4e39..49523366a 100644
++--- a/wx/lib/agw/shapedbutton.py
+++++ b/wx/lib/agw/shapedbutton.py
++@@ -569,9 +569,9 @@ def DrawMainButton(self, dc, width, height):
++                 rect2 = w*main//secondary
++ 
++             if self._isup:
++-                img = self._mainbuttonup.Scale(rect2, rect3)
+++                img = self._mainbuttonup.Scale(int(rect2), int(rect3))
++             else:
++-                img = self._mainbuttondown.Scale(rect2, rect3)
+++                img = self._mainbuttondown.Scale(int(rect2), int(rect3))
++ 
++         bmp = img.ConvertToBitmap()
++ 
++@@ -599,7 +599,7 @@ def DrawMainButton(self, dc, width, height):
++                     ypos = 0
++ 
++         # Draw Finally The Bitmap
++-        dc.DrawBitmap(bmp, xpos, ypos, True)
+++        dc.DrawBitmap(bmp, int(xpos), int(ypos), True)
++ 
++         # Store Bitmap Position And Size To Draw An Elliptical Focus Indicator
++         self._xpos = xpos
++@@ -646,7 +646,7 @@ def DrawLabel(self, dc, width, height, dw=0, dh=0):
++             xp = xc - (tw//2)* cos(angle) - (th//2)*sin(angle)
++             yp = yc + (tw//2)*sin(angle) - (th//2)*cos(angle)
++ 
++-            dc.DrawRotatedText(label, xp + dw, yp + dh , angle*180/pi)
+++            dc.DrawRotatedText(label, int(xp + dw), int(yp + dh), angle*180/pi)
++ 
++ 
++     def DrawFocusIndicator(self, dc, width, height):
++@@ -676,7 +676,7 @@ def DrawFocusIndicator(self, dc, width, height):
++         else:
++             # This Is An Ellipse
++             if hasattr(self, "_xpos"):
++-                dc.DrawEllipse(self._xpos + 2, self._ypos + 2, self._imgx - 4, self._imgy - 4)
+++                dc.DrawEllipse(int(self._xpos + 2), int(self._ypos + 2), self._imgx - 4, self._imgy - 4)
++ 
++         dc.SetLogicalFunction(wx.COPY)
++ 
++diff --git a/wx/lib/agw/speedmeter.py b/wx/lib/agw/speedmeter.py
++index f196b51f2..606901d27 100644
++--- a/wx/lib/agw/speedmeter.py
+++++ b/wx/lib/agw/speedmeter.py
++@@ -580,8 +580,8 @@ def Draw(self, dc):
++         dc.SetBackground(wx.Brush(speedbackground))
++         dc.Clear()
++ 
++-        centerX = self.faceBitmap.GetWidth()/2
++-        centerY = self.faceBitmap.GetHeight()/2
+++        centerX = self.faceBitmap.GetWidth()//2
+++        centerY = self.faceBitmap.GetHeight()//2
++ 
++         self.CenterX = centerX
++         self.CenterY = centerY
++@@ -681,7 +681,7 @@ def Draw(self, dc):
++             # Draw The Filler (Both In "Advance" And "Reverse" Directions)
++ 
++             dc.SetBrush(wx.Brush(fillercolour))
++-            dc.DrawArc(xs2, ys2, xe2, ye2, centerX, centerY)
+++            dc.DrawArc(xs2, ys2, xe2, ye2, int(centerX), int(centerY))
++ 
++             if self._agwStyle & SM_DRAW_SECTORS == 0:
++                 dc.SetBrush(wx.Brush(speedbackground))
++@@ -952,7 +952,7 @@ def Draw(self, dc):
++                     y = y - height/2.0 - height*sin(angis)/2.0
++                     fancytext.RenderToDC(fancystr, dc, x, y)
++                 else:
++-                    dc.DrawText(strings, x, y)
+++                    dc.DrawText(strings, int(x), int(y))
++ 
++             # This Is The Small Rectangle --> Tick Mark
++             rectangle = colourangles[ii] + pi/2.0
++@@ -969,6 +969,7 @@ def Draw(self, dc):
++             y4 = y3 + 3*self.scale*sinrect
++ 
++             points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++            points = [(int(p[0]), int(p[1])) for p in points]
++ 
++             dc.DrawPolygon(points)
++ 
++@@ -1003,6 +1004,7 @@ def Draw(self, dc):
++                         y4 = y3 + self.scale*sinrect
++ 
++                         points = [(x1, y1), (x2, y2), (x4, y4), (x3, y3)]
+++                        points = [(int(p[0]), int(p[1])) for p in points]
++ 
++                         dc.DrawPolygon(points)
++ 
++@@ -1017,7 +1019,7 @@ def Draw(self, dc):
++         dc.SetBrush(wx.TRANSPARENT_BRUSH)
++ 
++         if self._drawarc:
++-            dc.SetPen(wx.Pen(self.GetArcColour(), 2.0))
+++            dc.SetPen(wx.Pen(self.GetArcColour(), 2))
++             # If It's Not A Complete Circle, Draw The Connecting Lines And The Arc
++             if abs(abs(startangle - endangle) - 2*pi) > 1.0/180.0:
++                 dc.DrawArc(xstart, ystart, xend, yend, centerX, centerY)
++@@ -1046,7 +1048,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++             dc.SetTextForeground(middlecolour)
++-            dc.DrawText(middletext, newx, newy)
+++            dc.DrawText(middletext, int(newx), int(newy))
++ 
++         # Here We Draw The Icon In The Middle, Near The Start Of The Arrow (If Present)
++         # This Is Like The "Fuel" Icon In The Cars
++@@ -1054,8 +1056,8 @@ def Draw(self, dc):
++ 
++             middleicon = self.GetMiddleIcon()
++             middlewidth, middleheight = self.GetMiddleIconDimens()
++-            middleicon.SetWidth(middlewidth*self.scale)
++-            middleicon.SetHeight(middleheight*self.scale)
+++            middleicon.SetWidth(int(middlewidth*self.scale))
+++            middleicon.SetHeight(int(middleheight*self.scale))
++             middleangle = (startangle + endangle)/2.0
++ 
++             mw = middleicon.GetWidth()
++@@ -1064,7 +1066,7 @@ def Draw(self, dc):
++             newx = centerX + 1.5*mw*cos(middleangle) - mw/2.0
++             newy = centerY - 1.5*mh*sin(middleangle) - mh/2.0
++ 
++-            dc.DrawIcon(middleicon, newx, newy)
+++            dc.DrawIcon(middleicon, int(newx), int(newy))
++ 
++             # Restore Icon Dimension, If Not Something Strange Happens
++             middleicon.SetWidth(middlewidth)
++@@ -1109,53 +1111,61 @@ def Draw(self, dc):
++                 if handstyle == "Arrow":
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++-                    dc.SetPen(wx.Pen(shadowcolour, 5*log(self.scale+1)))
+++                    dc.SetPen(wx.Pen(shadowcolour, int(5*log(self.scale+1))))
++                     dc.SetBrush(wx.Brush(shadowcolour))
++                     shadowdistance = 2.0*self.scale
++-                    dc.DrawLine(newx + shadowdistance, newy + shadowdistance,
++-                                xarr + shadowdistance, yarr + shadowdistance)
++-
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance)])
+++                    dc.DrawLine(int(newx + shadowdistance), int(newy + shadowdistance),
+++                                int(xarr + shadowdistance), int(yarr + shadowdistance))
+++
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++                 else:
++                     # Draw The Shadow
++                     shadowcolour = self.GetShadowColour()
++                     dc.SetBrush(wx.Brush(shadowcolour))
++-                    dc.SetPen(wx.Pen(shadowcolour, 1.0))
+++                    dc.SetPen(wx.Pen(shadowcolour, 1))
++                     shadowdistance = 1.5*self.scale
++ 
++-                    dc.DrawPolygon([(x1+shadowdistance, y1+shadowdistance),
++-                                    (x2+shadowdistance, y2+shadowdistance),
++-                                    (x3+shadowdistance, y3+shadowdistance),
++-                                    (x4+shadowdistance, y4+shadowdistance)])
+++                    points = [(x1+shadowdistance, y1+shadowdistance),
+++                              (x2+shadowdistance, y2+shadowdistance),
+++                              (x3+shadowdistance, y3+shadowdistance),
+++                              (x4+shadowdistance, y4+shadowdistance)]
+++                    points = [(int(p[0]), int(p[1])) for p in points]
+++                    dc.DrawPolygon(points)
++ 
++             if handstyle == "Arrow":
++ 
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++-                dc.SetPen(wx.Pen(handcolour, 5*log(self.scale+1)))
+++                dc.SetPen(wx.Pen(handcolour, int(5*log(self.scale+1))))
++                 # Draw The "Hand", An Arrow
++-                dc.DrawLine(newx, newy, xarr, yarr)
+++                dc.DrawLine(int(newx), int(newy), int(xarr), int(yarr))
++ 
++                 # Draw The Arrow Pointer
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3)])
+++                points = [(x1, y1), (x2, y2), (x3, y3)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++             else:
++ 
++                 # Draw The Hand Pointer
++-                dc.SetPen(wx.Pen(handcolour, 1.5))
+++                dc.SetPen(wx.Pen(handcolour, 1))
++                 dc.SetBrush(wx.Brush(handcolour))
++-                dc.DrawPolygon([(x1, y1), (x2, y2), (x3, y3), (x4, y4)])
+++                points = [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
+++                points = [(int(p[0]), int(p[1])) for p in points]
+++                dc.DrawPolygon(points)
++ 
++                 # Draw The Small Circle In The Center --> The Hand "Holder"
++                 dc.SetBrush(wx.Brush(speedbackground))
++-                dc.DrawCircle(centerX, centerY, 4*self.scale)
+++                dc.DrawCircle(centerX, centerY, int(4*self.scale))
++ 
++ 
++     def SetIntervals(self, intervals=None):
++@@ -1527,7 +1537,7 @@ def SetMiddleTextFont(self, font=None):
++ 
++         if font is None:
++             self._middletextfont = wx.Font(1, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False)
++-            self._middletextsize = 10.0
+++            self._middletextsize = 10
++             self._middletextfont.SetPointSize(self._middletextsize)
++         else:
++             self._middletextfont = font
++@@ -1599,7 +1609,7 @@ def CircleCoords(self, radius, angle, centerX, centerY):
++         x = radius*cos(angle) + centerX
++         y = radius*sin(angle) + centerY
++ 
++-        return x, y
+++        return int(x), int(y)
++ 
++ 
++     def GetIntersection(self, current, intervals):
++diff --git a/wx/lib/agw/supertooltip.py b/wx/lib/agw/supertooltip.py
++index a92ce10d1..cd0f0c9f7 100644
++--- a/wx/lib/agw/supertooltip.py
+++++ b/wx/lib/agw/supertooltip.py
++@@ -295,8 +295,8 @@ def OnPaint(self, event):
++ 
++         # Get the user options for header, bitmaps etc...
++         drawHeader, drawFooter = classParent.GetDrawHeaderLine(), classParent.GetDrawFooterLine()
++-        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height/2)
++-        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height/2, frameRect.width, frameRect.height/2+1)
+++        topRect = wx.Rect(frameRect.x, frameRect.y, frameRect.width, frameRect.height//2)
+++        bottomRect = wx.Rect(frameRect.x, frameRect.y+frameRect.height//2, frameRect.width, frameRect.height//2+1)
++         # Fill the triple-gradient
++         dc.GradientFillLinear(topRect, topColour, middleColour, wx.SOUTH)
++         dc.GradientFillLinear(bottomRect, middleColour, bottomColour, wx.SOUTH)
++@@ -324,9 +324,9 @@ def OnPaint(self, event):
++         normalText = classParent.GetTextColour()
++         if header:
++             dc.SetTextForeground(normalText)
++-            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)/2)
+++            dc.DrawText(header, bmpXPos+bmpWidth+self._spacing, (height-textHeight+self._spacing)//2)
++         if headerBmp and headerBmp.IsOk():
++-            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)/2, True)
+++            dc.DrawBitmap(headerBmp, bmpXPos, (height-bmpHeight+self._spacing)//2, True)
++ 
++         if header or (headerBmp and headerBmp.IsOk()):
++             yPos += height
++@@ -376,7 +376,7 @@ def OnPaint(self, event):
++                 messageHeight += textHeight
++ 
++                 xText = (bmpWidth + 2 * self._spacing) if bmpWidth > 0 else self._spacing
++-                yText += textHeight/2+self._spacing
+++                yText += textHeight//2+self._spacing
++                 maxWidth = max(xText + textWidth + self._spacing, maxWidth)
++                 dc.DrawText(line, xText, yText)
++                 if isLink:
++@@ -412,8 +412,8 @@ def OnPaint(self, event):
++             if drawFooter:
++                 # Draw the separator line before the footer
++                 dc.SetPen(wx.GREY_PEN)
++-                dc.DrawLine(self._spacing, yPos-self._spacing/2+toAdd,
++-                            width-self._spacing, yPos-self._spacing/2+toAdd)
+++                dc.DrawLine(self._spacing, yPos-self._spacing//2+toAdd,
+++                            width-self._spacing, yPos-self._spacing//2+toAdd)
++         # Draw the footer and footer bitmap (if any)
++         dc.SetTextForeground(normalText)
++         height = max(textHeight, bmpHeight)
++@@ -424,7 +424,7 @@ def OnPaint(self, event):
++             maxWidth = max(bmpXPos + bmpWidth + (self._spacing*2) + textWidth, maxWidth)
++         if footerBmp and footerBmp.IsOk():
++             toAdd = (height - bmpHeight + self._spacing) / 2
++-            dc.DrawBitmap(footerBmp, bmpXPos, yPos + toAdd, True)
+++            dc.DrawBitmap(footerBmp, bmpXPos, int(yPos + toAdd), True)
++             maxWidth = max(footerBmp.GetSize().GetWidth() + bmpXPos, maxWidth)
++ 
++         maxHeight = yPos + height + toAdd
++@@ -815,7 +815,7 @@ def SetStartDelay(self, delay=1):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._startDelayTime = float(delay)
+++        self._startDelayTime = int(delay)
++ 
++ 
++     def GetStartDelay(self):
++@@ -831,7 +831,7 @@ def SetEndDelay(self, delay=1e6):
++         :param `delay`: the delay in seconds.
++         """
++ 
++-        self._endDelayTime = float(delay)
+++        self._endDelayTime = int(delay)
++ 
++ 
++     def GetEndDelay(self):
++diff --git a/wx/lib/agw/toasterbox.py b/wx/lib/agw/toasterbox.py
++index b73429dd2..8efb5869b 100644
++--- a/wx/lib/agw/toasterbox.py
+++++ b/wx/lib/agw/toasterbox.py
++@@ -1316,11 +1316,11 @@ def _getTextCoords(self, dc):
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++             fh += h + textPadding
++-        y = (th - fh) / 2; coords = []
+++        y = (th - fh) // 2; coords = []
++ 
++         for line in lines:
++             w, h = dc.GetTextExtent(line)
++-            x = (tw - w) / 2
+++            x = (tw - w) // 2
++             coords.append((x, y))
++             y += h + textPadding
++ 
++diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
++index 14fc41f86..caa5e5cf4 100644
++--- a/wx/lib/agw/ultimatelistctrl.py
+++++ b/wx/lib/agw/ultimatelistctrl.py
++@@ -914,7 +914,7 @@ def Draw(self, index, dc, x, y, flags, solidBackground=True):
++             raise Exception("Wrong index in image list")
++ 
++         bmp = self._images[index]
++-        dc.DrawBitmap(bmp, x, y, (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
+++        dc.DrawBitmap(bmp, x, int(y), (flags & wx.IMAGELIST_DRAW_TRANSPARENT) > 0)
++ 
++         return True
++ 
++@@ -4022,7 +4022,7 @@ def SetPosition(self, x, y, spacing):
++ 
++             if item.HasImage():
++ 
++-                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)/2
+++                self._gi._rectIcon.x = self._gi._rectAll.x + 4 + (self._gi._rectAll.width - self._gi._rectIcon.width)//2
++                 self._gi._rectIcon.y = self._gi._rectAll.y + 4
++ 
++             if item.HasText():
++@@ -4030,7 +4030,7 @@ def SetPosition(self, x, y, spacing):
++                 if self._gi._rectLabel.width > spacing:
++                     self._gi._rectLabel.x = self._gi._rectAll.x + 2
++                 else:
++-                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing/2) - (self._gi._rectLabel.width/2)
+++                    self._gi._rectLabel.x = self._gi._rectAll.x + 2 + (spacing//2) - (self._gi._rectLabel.width//2)
++ 
++                 self._gi._rectLabel.y = self._gi._rectAll.y + self._gi._rectAll.height + 2 - self._gi._rectLabel.height
++                 self._gi._rectHighlight.x = self._gi._rectLabel.x - 2
++@@ -4546,7 +4546,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 checked = item.IsChecked()
++-                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)/2, item.GetKind(), checked, enabled)
+++                self._owner.DrawCheckbox(dc, xOld, y + (height-iy+1)//2, item.GetKind(), checked, enabled)
++                 xOld += ix
++                 width -= ix
++ 
++@@ -4557,7 +4557,7 @@ def DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled
++                 for img in images:
++ 
++                     ix, iy = self._owner.GetImageSize([img])
++-                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)/2, enabled)
+++                    self._owner.DrawImage(img, dc, xOld, y + (height-iy)//2, enabled)
++ 
++                     xOld += ix
++                     width -= ix
++@@ -5230,7 +5230,7 @@ def OnPaint(self, event):
++                 # We got a checkbox-type item
++                 ix, iy = self._owner.GetCheckboxImageSize()
++                 # We draw it on the left, always
++-                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)/2, kind, checked, enabled)
+++                self._owner.DrawCheckbox(dc, x + HEADER_OFFSET_X, HEADER_OFFSET_Y + (h - 4 - iy)//2, kind, checked, enabled)
++                 wcheck += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++                 cw -= ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE
++ 
++@@ -6819,7 +6819,7 @@ def HitTestLine(self, line, x, y):
++                     # We got a checkbox-type item
++                     ix, iy = self.GetCheckboxImageSize()
++                     LH = self.GetLineHeight(line)
++-                    rect = wx.Rect(xOld, lineY + LH/2 - iy/2, ix, iy)
+++                    rect = wx.Rect(xOld, lineY + LH//2 - iy//2, ix, iy)
++                     if rect.Contains((x, y)):
++                         newItem = self.GetParent().GetItem(line, col)
++                         return newItem, ULC_HITTEST_ONITEMCHECK
++@@ -7937,13 +7937,13 @@ def MoveToItem(self, item):
++                     while start_y > view_y:
++                         start_y -= SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, start_y/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, start_y//SCROLL_UNIT_Y)
++ 
++                 if start_y + height > view_y + client_h:
++                     while start_y + height < view_y + client_h:
++                         start_y += SCROLL_UNIT_Y
++ 
++-                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)/SCROLL_UNIT_Y)
+++                    self.Scroll(-1, (start_y+height-client_h+SCROLL_UNIT_Y)//SCROLL_UNIT_Y)
++ 
++         else: # !report
++ 
++@@ -7960,7 +7960,7 @@ def MoveToItem(self, item):
++             if rect.y + rect.height - 5 > view_y + client_h:
++                 sy = (rect.y + rect.height - client_h + hLine)/hLine
++ 
++-            self.Scroll(sx, sy)
+++            self.Scroll(int(sx), int(sy))
++ 
++ 
++ # ----------------------------------------------------------------------------
++diff --git a/wx/lib/agw/xlsgrid.py b/wx/lib/agw/xlsgrid.py
++index b505aebb4..17267fabc 100644
++--- a/wx/lib/agw/xlsgrid.py
+++++ b/wx/lib/agw/xlsgrid.py
++@@ -965,7 +965,7 @@ def Draw(self, dc, rect):
++             xp = xc - (text_width/2)*xshift - (text_height/2)*yshift
++             yp = yc + (text_width/2)*yshift - (text_height/2)*xshift
++ 
++-            dc.DrawRotatedText(value, xp, yp, self.rotation)
+++            dc.DrawRotatedText(value, int(xp), int(yp), self.rotation)
++ 
++         else:
++ 
++@@ -1125,7 +1125,7 @@ def Draw(self, dc, rect):
++             if font.escapement == 1:
++                 ypos = ypos - maxH + height
++ 
++-            dc.DrawText(chunk, start, ypos)
+++            dc.DrawText(chunk, start, int(ypos))
++             start += width
++ 
++ 
++diff --git a/wx/lib/agw/zoombar.py b/wx/lib/agw/zoombar.py
++index 1e6ec5da3..8c2afd058 100644
++--- a/wx/lib/agw/zoombar.py
+++++ b/wx/lib/agw/zoombar.py
++@@ -463,7 +463,7 @@ def SetSize(self, width, height):
++     def GetPosition(self):
++         """ Returns the button position. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -601,7 +601,7 @@ def __init__(self, bitmap=None):
++     def GetPosition(self):
++         """ Returns the position of :class:`wx.ImageBar`, as a :class:`wx.Point`. """
++ 
++-        return wx.Point(self._left, self._top)
+++        return wx.Point(int(self._left), int(self._top))
++ 
++ 
++     def GetSize(self):
++@@ -660,7 +660,7 @@ def SetBarColour(self, colour, xSize=None, ySize=None):
++         if xSize is not None:
++             self._size = wx.Size(xSize, ySize)
++ 
++-        bitmap.Rescale(self._size.width, self._size.height/2)
+++        bitmap.Rescale(self._size.width, self._size.height//2)
++ 
++         r1, g1, b1 = self._startColour.Red(), self._startColour.Green(), self._startColour.Blue()
++         r2, g2, b2 = colour.Red(), colour.Green(), colour.Blue()
++@@ -1065,7 +1065,7 @@ def ResetSize(self):
++             ySize += yextent
++ 
++         if self._showReflections:
++-            ySize += self._buttonSize/2
+++            ySize += self._buttonSize//2
++         if self._centerZoom:
++             ySize += self._buttonSize
++ 
++@@ -1240,7 +1240,7 @@ def DrawLabels(self, dc):
++             textWidth, textHeight = dc.GetTextExtent(label)
++             buttonPos = button.GetPosition()
++             buttonSize = button.GetSize()
++-            xpos = buttonPos.x + (buttonSize.width - textWidth)/2
+++            xpos = buttonPos.x + (buttonSize.width - textWidth)//2
++             ypos = buttonPos.y - textHeight - 2
++ 
++             dc.DrawRectangle(xpos-2, ypos-1, textWidth+4, textHeight+2)
++diff --git a/wx/lib/analogclock/analogclock.py b/wx/lib/analogclock/analogclock.py
++index 7c4b18979..1ee1d6742 100644
++--- a/wx/lib/analogclock/analogclock.py
+++++ b/wx/lib/analogclock/analogclock.py
++@@ -173,7 +173,7 @@ def _recalcCoords(self, size):
++         scale = min([float(size.width) / self.basesize.width,
++                      float(size.height) / self.basesize.height])
++ 
++-        centre = wx.Point(size.width / 2., size.height / 2.)
+++        centre = wx.Point(size.width // 2, size.height // 2)
++ 
++         self.Box.RecalcCoords(size, centre, scale)
++         self.Hands.RecalcCoords(size, centre, scale)
++diff --git a/wx/lib/analogclock/helpers.py b/wx/lib/analogclock/helpers.py
++index 88d198bee..9674de912 100644
++--- a/wx/lib/analogclock/helpers.py
+++++ b/wx/lib/analogclock/helpers.py
++@@ -37,7 +37,7 @@ def __init__(self, idx=0, pos=None, size=None, offset=0, clocksize=None,
++ 
++ 
++     def _pol2rect(self, m, t):
++-        return m * math.cos(math.radians(t)), m * math.sin(math.radians(t))
+++        return int(m * math.cos(math.radians(t))), int(m * math.sin(math.radians(t)))
++ 
++ 
++     def _rect2pol(self, x, y):
++@@ -174,7 +174,7 @@ def __init__(self, **kwargs):
++ 
++     def Draw(self, dc):
++         self.dyer.Select(dc)
++-        dc.DrawCircle(self.pos.x, self.pos.y, self.radius)
+++        dc.DrawCircle(self.pos.x, self.pos.y, int(self.radius))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -205,7 +205,7 @@ def Draw(self, dc, end, offset=0):
++             m, t = self._rect2pol(x, y)
++             polygon[i] = self._pol2rect(m, t - angle)
++ 
++-        dc.DrawPolygon(polygon, centre.x + offset, centre.y + offset)
+++        dc.DrawPolygon(polygon, int(centre.x + offset), int(centre.y + offset))
++ 
++ 
++     def RecalcCoords(self, clocksize, centre, scale):
++@@ -226,7 +226,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawRectangle(x + offset, y + offset, width, height)
+++        dc.DrawRectangle(int(x + offset), int(y + offset), int(width), int(height))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -242,7 +242,7 @@ def Draw(self, dc, offset=0):
++         x = self.pos.x
++         y = self.pos.y
++ 
++-        dc.DrawCircle(x + offset, y + offset, radius)
+++        dc.DrawCircle(int(x + offset), int(y + offset), int(radius))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -273,7 +273,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -290,7 +290,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawPolygon(polygon, x + offset, y + offset)
+++        dc.DrawPolygon(polygon, int(x + offset), int(y + offset))
++ 
++ #----------------------------------------------------------------------
++ 
++@@ -309,7 +309,7 @@ def DrawStraight(self, dc, offset=0):
++         x = self.pos.x - width / 2.
++         y = self.pos.y - height / 2.
++ 
++-        dc.DrawText(self.text, x + offset, y + offset)
+++        dc.DrawText(self.text, int(x + offset), int(y + offset))
++ 
++ 
++     def DrawRotated(self, dc, offset=0):
++@@ -321,7 +321,7 @@ def DrawRotated(self, dc, offset=0):
++         x = self.pos.x - math.cos(r) * width / 2. - math.sin(r) * height / 2.
++         y = self.pos.y - math.cos(r) * height / 2. + math.sin(r) * width / 2.
++ 
++-        dc.DrawRotatedText(self.text, x + offset, y + offset, angle)
+++        dc.DrawRotatedText(self.text, int(x + offset), int(y + offset), int(angle))
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -656,7 +656,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++ 
++         # Try to find a 'good' max size for text-based ticks.
++         if a_tick.text is not None:
++-            self.font.SetPointSize(size)
+++            self.font.SetPointSize(int(size))
++             dc = wx.MemoryDC()
++             dc.SelectObject(wx.Bitmap(*clocksize.Get()))
++             dc.SetFont(self.font)
++@@ -686,7 +686,7 @@ def RecalcCoords(self, clocksize, centre, scale):
++             x = centre.x + radius * math.sin(angle)
++             y = centre.y + radius * math.cos(angle)
++ 
++-            tick.SetPosition(wx.Point(x, y))
+++            tick.SetPosition(wx.Point(int(x), int(y)))
++ 
++ 
++     def GetSize(self):
++diff --git a/wx/lib/analogclock/setup.py b/wx/lib/analogclock/setup.py
++index a83c8639d..a7dffb901 100644
++--- a/wx/lib/analogclock/setup.py
+++++ b/wx/lib/analogclock/setup.py
++@@ -179,7 +179,7 @@ def __init__(self, parent, title, group="Hands"):
++         p.SetCustomColours(self.customcolours)
++         sizer.Add(p, pos=(0, 1), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.bw = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.bw = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(0, 2), span=(1, 2), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -193,7 +193,7 @@ def __init__(self, parent, title, group="Hands"):
++         p = self.ls = wx.StaticText(self, label="Size:")
++         sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.sz = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.sz = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++@@ -212,7 +212,7 @@ def __init__(self, parent, title, group="Ticks"):
++         p = wx.StaticText(self, label="Offset:")
++         sizer.Add(p, pos=(3, 0), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++-        p = self.of = wx.SpinCtrl(self, size=(75, 21),
+++        p = self.of = wx.SpinCtrl(self,
++                                   min=0, max=100, value="75")
++         sizer.Add(p, pos=(3, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)
++ 
++diff --git a/wx/lib/buttons.py b/wx/lib/buttons.py
++index 46d1b8747..f01a54d41 100644
++--- a/wx/lib/buttons.py
+++++ b/wx/lib/buttons.py
++@@ -453,7 +453,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         tw, th = dc.GetTextExtent(label)
++         if not self.up:
++             dx = dy = self.labelDelta
++-        dc.DrawText(label, (width-tw)/2+dx, (height-th)/2+dy)
+++        dc.DrawText(label, (width-tw)//2+dx, (height-th)//2+dy)
++ 
++ 
++     def DrawFocusIndicator(self, dc, w, h):
++@@ -844,7 +844,7 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++         hasMask = bmp.GetMask() != None
++-        dc.DrawBitmap(bmp, (width-bw)/2+dx, (height-bh)/2+dy, hasMask)
+++        dc.DrawBitmap(bmp, (width-bw)//2+dx, (height-bh)//2+dy, hasMask)
++ 
++ 
++ #----------------------------------------------------------------------
++@@ -926,12 +926,12 @@ def DrawLabel(self, dc, width, height, dx=0, dy=0):
++         if not self.up:
++             dx = dy = self.labelDelta
++ 
++-        pos_x = (width-bw-tw)/2+dx      # adjust for bitmap and text to centre
+++        pos_x = (width-bw-tw)//2+dx      # adjust for bitmap and text to centre
++         if bmp is not None:
++-            dc.DrawBitmap(bmp, pos_x, (height-bh)/2+dy, hasMask) # draw bitmap if available
+++            dc.DrawBitmap(bmp, pos_x, (height-bh)//2+dy, hasMask) # draw bitmap if available
++             pos_x = pos_x + 2   # extra spacing from bitmap
++ 
++-        dc.DrawText(label, pos_x + dx+bw, (height-th)/2+dy)      # draw the text
+++        dc.DrawText(label, pos_x + dx+bw, (height-th)//2+dy)      # draw the text
++ 
++ 
++ #----------------------------------------------------------------------
++diff --git a/wx/lib/colourchooser/pycolourchooser.py b/wx/lib/colourchooser/pycolourchooser.py
++index 61dbc02d2..124376483 100644
++--- a/wx/lib/colourchooser/pycolourchooser.py
+++++ b/wx/lib/colourchooser/pycolourchooser.py
++@@ -188,7 +188,7 @@ def __init__(self, parent, id):
++         self.colour_slider.Bind(wx.EVT_MOTION, self.onSliderMotion)
++         self.slider = wx.Slider(
++                         self, self.idSCROLL, 86, 0, self.colour_slider.HEIGHT - 1,
++-                        style=wx.SL_VERTICAL, size=(15, self.colour_slider.HEIGHT)
+++                        style=wx.SL_VERTICAL, size=(-1, self.colour_slider.HEIGHT)
++                         )
++ 
++         self.Bind(wx.EVT_COMMAND_SCROLL, self.onScroll, self.slider)
++@@ -338,7 +338,7 @@ def setSliderToV(self, v):
++         min = self.slider.GetMin()
++         max = self.slider.GetMax()
++         val = (1 - v) * max
++-        self.slider.SetValue(val)
+++        self.slider.SetValue(int(val))
++ 
++     def getVFromSlider(self):
++         """Get the current value of "V" from the v slider."""
++diff --git a/wx/lib/colourchooser/pypalette.py b/wx/lib/colourchooser/pypalette.py
++index ff1fb840c..71b9fc2df 100644
++--- a/wx/lib/colourchooser/pypalette.py
+++++ b/wx/lib/colourchooser/pypalette.py
++@@ -165,7 +165,7 @@ def DrawBuffer(self):
++             colour = wx.Colour(0, 0, 0)
++             self.buffer.SetPen(wx.Pen(colour, 1, wx.PENSTYLE_SOLID))
++             self.buffer.SetBrush(wx.Brush(colour, wx.BRUSHSTYLE_TRANSPARENT))
++-            self.buffer.DrawCircle(self.point[0], self.point[1], 3)
+++            self.buffer.DrawCircle(int(self.point[0]), int(self.point[1]), 3)
++ 
++     def HighlightPoint(self, x, y):
++         """Highlights an area of the palette with a little circle around
++diff --git a/wx/lib/floatcanvas/FCObjects.py b/wx/lib/floatcanvas/FCObjects.py
++index 58becd38c..cdf8cc53e 100644
++--- a/wx/lib/floatcanvas/FCObjects.py
+++++ b/wx/lib/floatcanvas/FCObjects.py
++@@ -296,7 +296,7 @@ def SetPen(self, LineColor, LineStyle, LineWidth):
++         else:
++             self.Pen = self.PenList.setdefault(
++                 (LineColor, LineStyle, LineWidth),
++-                wx.Pen(LineColor, LineWidth, self.LineStyleList[LineStyle]))
+++                wx.Pen(LineColor, int(LineWidth), self.LineStyleList[LineStyle]))
++ 
++     def SetHitBrush(self, HitColor):
++         """
++@@ -1202,14 +1202,14 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++             x = xc - Size/2.0
++             y = yc - Size/2.0
++             dc.SetBrush(self.Brush)
++-            dc.DrawRectangle(x, y, Size, Size)
+++            dc.DrawRectangle(int(x), int(y), Size, Size)
++         if HTdc and self.HitAble:
++             HTdc.SetPen(self.HitPen)
++             if self.Size <= 1:
++                 HTdc.DrawPoint(xc, xc)
++             else:
++                 HTdc.SetBrush(self.HitBrush)
++-                HTdc.DrawRectangle(x, y, Size, Size)
+++                HTdc.DrawRectangle(int(x), int(y), Size, Size)
++ 
++ class RectEllipse(XYObjectMixin, LineAndFillMixin, DrawObject):
++     """A RectEllipse draw object."""
++@@ -2161,7 +2161,7 @@ def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None):
++         W = H * (self.bmpWidth / self.bmpHeight)
++         if (self.ScaledBitmap is None) or (H != self.ScaledHeight) :
++             self.ScaledHeight = H
++-            Img = self.Image.Scale(W, H)
+++            Img = self.Image.Scale(int(W), int(H))
++             self.ScaledBitmap = wx.Bitmap(Img)
++ 
++         XY = self.ShiftFun(XY[0], XY[1], W, H)
++diff --git a/wx/lib/gizmos/ledctrl.py b/wx/lib/gizmos/ledctrl.py
++index f185d5105..7f4d3fcf9 100644
++--- a/wx/lib/gizmos/ledctrl.py
+++++ b/wx/lib/gizmos/ledctrl.py
++@@ -293,7 +293,7 @@ def _drawDigit(self, dc, digit, column):
++ 
++         if digit & c.COLON:
++             dc.SetBrush(wx.Brush(lineColor))
++-            centerX = XPos + (self.m_lineLength + self.m_digitMargin) / 2
++-            radius = self.m_lineWidth / 2
++-            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) / 2, radius)
++-            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 / 4, radius)
+++            centerX = XPos + (self.m_lineLength + self.m_digitMargin) // 2
+++            radius = self.m_lineWidth // 2
+++            dc.DrawCircle(centerX, (self.m_lineLength + (self.m_lineMargin * 3)) // 2, radius)
+++            dc.DrawCircle(centerX, (self.m_lineLength * 2 + (self.m_lineMargin * 5)) * 3 // 4, radius)
++diff --git a/wx/lib/imagebrowser.py b/wx/lib/imagebrowser.py
++index 795e90dca..8e14727e7 100644
++--- a/wx/lib/imagebrowser.py
+++++ b/wx/lib/imagebrowser.py
++@@ -347,8 +347,8 @@ def DrawImage(self, dc):
++         owidth = int(scale*iwidth)
++         oheight = int(scale*iheight)
++ 
++-        diffx = (wwidth - owidth)/2   # center calc
++-        diffy = (wheight - oheight)/2   # center calc
+++        diffx = (wwidth - owidth)//2   # center calc
+++        diffy = (wheight - oheight)//2   # center calc
++ 
++         if not bmp:
++             if owidth!=iwidth or oheight!=iheight:
++diff --git a/wx/lib/ogl/basic.py b/wx/lib/ogl/basic.py
++index b08859ab9..0107f21fc 100644
++--- a/wx/lib/ogl/basic.py
+++++ b/wx/lib/ogl/basic.py
++@@ -1051,7 +1051,7 @@ def OnEraseContents(self, dc):
++         dc.SetPen(self.GetBackgroundPen())
++         dc.SetBrush(self.GetBackgroundBrush())
++ 
++-        dc.DrawRectangle(topLeftX - penWidth, topLeftY - penWidth, maxX + penWidth * 2 + 4, maxY + penWidth * 2 + 4)
+++        dc.DrawRectangle(int(topLeftX - penWidth), int(topLeftY - penWidth), int(maxX + penWidth * 2 + 4), int(maxY + penWidth * 2 + 4))
++ 
++     def EraseLinks(self, dc, attachment = -1, recurse = False):
++         """
++@@ -2769,9 +2769,9 @@ def OnDraw(self, dc):
++             dc.SetBrush(self._brush)
++ 
++         if self._cornerRadius:
++-            dc.DrawRoundedRectangle(x1, y1, self._width, self._height, self._cornerRadius)
+++            dc.DrawRoundedRectangle(int(x1), int(y1), self._width, self._height, self._cornerRadius)
++         else:
++-            dc.DrawRectangle(x1, y1, self._width, self._height)
+++            dc.DrawRectangle(int(x1), int(y1), self._width, self._height)
++ 
++     def GetBoundingBoxMin(self):
++         """Get the bounding box minimum."""
++@@ -2882,7 +2882,7 @@ def Create(self, the_points = None):
++             # Duplicate the list of points
++             self._points = []
++             for point in the_points:
++-                new_point = wx.Point(point[0], point[1])
+++                new_point = wx.Point(int(point[0]), int(point[1]))
++                 self._points.append(new_point)
++             self.CalculateBoundingBox()
++             self._originalWidth = self._boundWidth
++@@ -3444,7 +3444,7 @@ def OnDraw(self, dc):
++                 dc.SetPen(self._pen)
++         if self._brush:
++             dc.SetBrush(self._brush)
++-        dc.DrawEllipse(self._xpos - self.GetWidth() / 2.0, self._ypos - self.GetHeight() / 2.0, self.GetWidth(), self.GetHeight())
+++        dc.DrawEllipse(int(self._xpos - self.GetWidth() / 2.0), int(self._ypos - self.GetHeight() / 2.0), self.GetWidth(), self.GetHeight())
++ 
++     def SetSize(self, x, y, recursive = True):
++         """
++diff --git a/wx/lib/ogl/bmpshape.py b/wx/lib/ogl/bmpshape.py
++index ee2859527..e53ddb136 100644
++--- a/wx/lib/ogl/bmpshape.py
+++++ b/wx/lib/ogl/bmpshape.py
++@@ -32,7 +32,7 @@ def OnDraw(self, dc):
++ 
++         x = self._xpos - self._bitmap.GetWidth() / 2.0
++         y = self._ypos - self._bitmap.GetHeight() / 2.0
++-        dc.DrawBitmap(self._bitmap, x, y, True)
+++        dc.DrawBitmap(self._bitmap, int(x), int(y), True)
++ 
++     def SetSize(self, w, h, recursive = True):
++         """
++diff --git a/wx/lib/ogl/composit.py b/wx/lib/ogl/composit.py
++index c3b623952..eecaafb3f 100644
++--- a/wx/lib/ogl/composit.py
+++++ b/wx/lib/ogl/composit.py
++@@ -1131,11 +1131,11 @@ def OnDraw(self, dc):
++ 
++         if self._leftSide:
++             dc.SetPen(self._leftSidePen)
++-            dc.DrawLine(x1, y2, x1, y1)
+++            dc.DrawLine(int(x1), int(y2), int(x1), int(y1))
++ 
++         if self._topSide:
++             dc.SetPen(self._topSidePen)
++-            dc.DrawLine(x1, y1, x2, y1)
+++            dc.DrawLine(int(x1), int(y1), int(x2), int(y1))
++ 
++         # For testing purposes, draw a rectangle so we know
++         # how big the division is.
++diff --git a/wx/lib/ogl/divided.py b/wx/lib/ogl/divided.py
++index 0bfb1919f..0809be58c 100644
++--- a/wx/lib/ogl/divided.py
+++++ b/wx/lib/ogl/divided.py
++@@ -231,7 +231,7 @@ def OnDrawContents(self, dc):
++                 regionPen = region.GetActualPen()
++                 if regionPen:
++                     dc.SetPen(regionPen)
++-                    dc.DrawLine(leftX, y, rightX, y)
+++                    dc.DrawLine(int(leftX), int(y), int(rightX), int(y))
++ 
++             currentY = actualY
++ 
++diff --git a/wx/lib/ogl/lines.py b/wx/lib/ogl/lines.py
++index 948b85d82..50c07e046 100644
++--- a/wx/lib/ogl/lines.py
+++++ b/wx/lib/ogl/lines.py
++@@ -1200,7 +1200,7 @@ def OnDraw(self, dc):
++ 
++         points = []
++         for point in self._lineControlPoints:
++-            points.append(wx.Point(point[0], point[1]))
+++            points.append(wx.Point(int(point[0]), int(point[1])))
++ 
++         if self._isSpline:
++             dc.DrawSpline(points)
++diff --git a/wx/lib/ogl/oglmisc.py b/wx/lib/ogl/oglmisc.py
++index 8588a72b7..a8be3fc53 100644
++--- a/wx/lib/ogl/oglmisc.py
+++++ b/wx/lib/ogl/oglmisc.py
++@@ -300,10 +300,10 @@ def DrawFormattedText(dc, text_list, xpos, ypos, width, height, formatMode):
++         yoffset = ypos - height / 2.0
++ 
++     # +1 to allow for rounding errors
++-    dc.SetClippingRegion(xpos - width / 2.0, ypos - height / 2.0, width + 1, height + 1)
+++    dc.SetClippingRegion(int(xpos - width / 2.0), int(ypos - height / 2.0), int(width + 1), int(height + 1))
++ 
++     for line in text_list:
++-        dc.DrawText(line.GetText(), xoffset + line.GetX(), yoffset + line.GetY())
+++        dc.DrawText(line.GetText(), int(xoffset + line.GetX()), int(yoffset + line.GetY()))
++ 
++     dc.DestroyClippingRegion()
++ 
++diff --git a/wx/lib/plot/examples/demo.py b/wx/lib/plot/examples/demo.py
++index 98fbaad3a..02bec1d9f 100644
++--- a/wx/lib/plot/examples/demo.py
+++++ b/wx/lib/plot/examples/demo.py
++@@ -984,7 +984,7 @@ def DrawPointLabel(self, dc, mDataDict):
++ 
++         sx, sy = mDataDict["scaledXY"]  # scaled x,y of closest point
++         # 10by10 square centered on point
++-        dc.DrawRectangle(sx - 5, sy - 5, 10, 10)
+++        dc.DrawRectangle(int(sx - 5), int(sy - 5), 10, 10)
++         px, py = mDataDict["pointXY"]
++         cNum = mDataDict["curveNum"]
++         pntIn = mDataDict["pIndex"]
++@@ -992,7 +992,7 @@ def DrawPointLabel(self, dc, mDataDict):
++         # make a string to display
++         s = "Crv# %i, '%s', Pt. (%.2f,%.2f), PtInd %i" % (
++             cNum, legend, px, py, pntIn)
++-        dc.DrawText(s, sx, sy + 1)
+++        dc.DrawText(s, int(sx), int(sy + 1))
++ 
++ 
++ def run_demo():
++diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py
++index dd3f77d52..abee47efb 100644
++--- a/wx/lib/plot/plotcanvas.py
+++++ b/wx/lib/plot/plotcanvas.py
++@@ -174,24 +174,24 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
++ 
++         # Default Pens
++         self._gridPen = wx.Pen(wx.Colour(180, 180, 180, 255),
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_DOT)
++ 
++         self._centerLinePen = wx.Pen(wx.RED,
++-                                     self._pointSize[0],
+++                                     int(self._pointSize[0]),
++                                      wx.PENSTYLE_SHORT_DASH)
++ 
++         self._axesPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++ 
++         self._tickPen = wx.Pen(wx.BLACK,
++-                               self._pointSize[0],
+++                               int(self._pointSize[0]),
++                                wx.PENSTYLE_SOLID)
++         self._tickLength = tuple(-x * 2 for x in self._pointSize)
++ 
++         self._diagonalPen = wx.Pen(wx.BLUE,
++-                                   self._pointSize[0],
+++                                   int(self._pointSize[0]),
++                                    wx.PENSTYLE_DOT_DASH)
++ 
++     def SetCursor(self, cursor):
++@@ -1925,10 +1925,10 @@ def _Draw(self, graphics, xAxis=None, yAxis=None, dc=None):
++         # set clipping area so drawing does not occur outside axis box
++         ptx, pty, rectWidth, rectHeight = self._point2ClientCoord(p1, p2)
++         # allow graph to overlap axis lines by adding units to w and h
++-        dc.SetClippingRegion(ptx * self._pointSize[0],
++-                             pty * self._pointSize[1],
++-                             rectWidth * self._pointSize[0] + 2,
++-                             rectHeight * self._pointSize[1] + 1)
+++        dc.SetClippingRegion(int(ptx * self._pointSize[0]),
+++                             int(pty * self._pointSize[1]),
+++                             int(rectWidth * self._pointSize[0] + 2),
+++                             int(rectHeight * self._pointSize[1] + 1))
++         # Draw the lines and markers
++ #        start = _time.perf_counter()
++         graphics.draw(dc)
++@@ -2280,7 +2280,7 @@ def _drawLegend(self, dc, graphics, rhsW, topH, legendBoxWH,
++             pnt = ((trhc[0] + legendLHS + legendSymExt[0]
++                     + 5 * self._pointSize[0]),
++                    trhc[1] + s + lineHeight / 2. - legendTextExt[1] / 2)
++-            dc.DrawText(o.getLegend(), pnt[0], pnt[1])
+++            dc.DrawText(o.getLegend(), int(pnt[0]), int(pnt[1]))
++         dc.SetFont(self._getFont(self._fontSizeAxis))  # reset
++ 
++     def _titleLablesWH(self, dc, graphics):
++@@ -2329,7 +2329,7 @@ def _drawRubberBand(self, corner1, corner2):
++         dc.SetPen(wx.Pen(wx.BLACK))
++         dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_TRANSPARENT))
++         dc.SetLogicalFunction(wx.INVERT)
++-        dc.DrawRectangle(ptx, pty, rectWidth, rectHeight)
+++        dc.DrawRectangle(int(ptx), int(pty), int(rectWidth), int(rectHeight))
++         dc.SetLogicalFunction(wx.COPY)
++ 
++     def _getFont(self, size):
++@@ -2423,7 +2423,7 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.gridPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         x, y, width, height = self._point2ClientCoord(p1, p2)
++@@ -2432,13 +2432,13 @@ def _drawGrid(self, dc, p1, p2, scale, shift, xticks, yticks):
++             if self.enableGrid[0]:
++                 for x, _ in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0], pt[1] - height)
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - height))
++ 
++         if self._ySpec != 'none':
++             if self.enableGrid[1]:
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    dc.DrawLine(pt[0], pt[1], pt[0] + width, pt[1])
+++                    dc.DrawLine(int(pt[0]), int(pt[1]), int(pt[0] + width), int(pt[1]))
++ 
++     @TempStyle('pen')
++     def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2471,7 +2471,7 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++         # increases thickness for printing only
++         pen = self.tickPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         # lengthen lines for printing
++@@ -2484,13 +2484,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] - xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] - xTickLength)))
++                 dc.DrawLineList(lines)
++             if ticks.top:
++                 lines = []
++                 for x, label in xticks:
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0], pt[1] + xTickLength))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0]), int(pt[1] + xTickLength)))
++                 dc.DrawLineList(lines)
++ 
++         if self.ySpec != 'none':
++@@ -2498,13 +2498,13 @@ def _drawTicks(self, dc, p1, p2, scale, shift, xticks, yticks):
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] + yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] + yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++             if ticks.right:
++                 lines = []
++                 for y, label in yticks:
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++-                    lines.append((pt[0], pt[1], pt[0] - yTickLength, pt[1]))
+++                    lines.append((int(pt[0]), int(pt[1]), int(pt[0] - yTickLength), int(pt[1])))
++                 dc.DrawLineList(lines)
++ 
++     @TempStyle('pen')
++@@ -2531,25 +2531,25 @@ def _drawCenterLines(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.centerLinePen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._centerLinesEnabled in ('Horizontal', True):
++             y1 = scale[1] * p1[1] + shift[1]
++             y2 = scale[1] * p2[1] + shift[1]
++             y = (y1 - y2) / 2.0 + y2
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        y,
++-                        scale[0] * p2[0] + shift[0],
++-                        y)
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(y),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(y))
++         if self._centerLinesEnabled in ('Vertical', True):
++             x1 = scale[0] * p1[0] + shift[0]
++             x2 = scale[0] * p2[0] + shift[0]
++             x = (x1 - x2) / 2.0 + x2
++-            dc.DrawLine(x,
++-                        scale[1] * p1[1] + shift[1],
++-                        x,
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(x),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(x),
+++                        int(scale[1] * p2[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawDiagonals(self, dc, p1, p2, scale, shift):
++@@ -2575,19 +2575,19 @@ def _drawDiagonals(self, dc, p1, p2, scale, shift):
++         """
++         pen = self.diagonalPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         if self._diagonalsEnabled in ('Bottomleft-Topright', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]))
++         if self._diagonalsEnabled in ('Bottomright-Topleft', True):
++-            dc.DrawLine(scale[0] * p1[0] + shift[0],
++-                        scale[1] * p2[1] + shift[1],
++-                        scale[0] * p2[0] + shift[0],
++-                        scale[1] * p1[1] + shift[1])
+++            dc.DrawLine(int(scale[0] * p1[0] + shift[0]),
+++                        int(scale[1] * p2[1] + shift[1]),
+++                        int(scale[0] * p2[0] + shift[0]),
+++                        int(scale[1] * p1[1] + shift[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxes(self, dc, p1, p2, scale, shift):
++@@ -2614,7 +2614,7 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++         # increases thickness for printing only
++         pen = self.axesPen
++         penWidth = self.printerScale * pen.GetWidth()
++-        pen.SetWidth(penWidth)
+++        pen.SetWidth(int(penWidth))
++         dc.SetPen(pen)
++ 
++         axes = self.enableAxes
++@@ -2623,24 +2623,24 @@ def _drawAxes(self, dc, p1, p2, scale, shift):
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p1[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p1[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.top:
++                 lower, upper = p1[0], p2[0]
++                 a1 = scale_and_shift_point(lower, p2[1], scale, shift)
++                 a2 = scale_and_shift_point(upper, p2[1], scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++         if self.ySpec != 'none':
++             if axes.left:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p1[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p1[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++             if axes.right:
++                 lower, upper = p1[1], p2[1]
++                 a1 = scale_and_shift_point(p2[0], lower, scale, shift)
++                 a2 = scale_and_shift_point(p2[0], upper, scale, shift)
++-                dc.DrawLine(a1[0], a1[1], a2[0], a2[1])
+++                dc.DrawLine(int(a1[0]), int(a1[1]), int(a2[0]), int(a2[1]))
++ 
++     @TempStyle('pen')
++     def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++@@ -2686,8 +2686,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(x, p1[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] + 2 * self._pointSize[1] - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] + 2 * self._pointSize[1] - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2698,8 +2698,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w, h = dc.GetTextExtent(label)
++                     pt = scale_and_shift_point(x, p2[1], scale, shift)
++                     coords.append(
++-                        (pt[0] - w/2,
++-                         pt[1] - 2 * self._pointSize[1] - h - xTickLength)
+++                        (int(pt[0] - w/2),
+++                         int(pt[1] - 2 * self._pointSize[1] - h - xTickLength))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2712,8 +2712,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p1[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] - w - 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] - w - 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2725,8 +2725,8 @@ def _drawAxesValues(self, dc, p1, p2, scale, shift, xticks, yticks):
++                     w = dc.GetTextExtent(label)[0]
++                     pt = scale_and_shift_point(p2[0], y, scale, shift)
++                     coords.append(
++-                        (pt[0] + 3 * self._pointSize[0] + yTickLength,
++-                         pt[1] - 0.5 * h)
+++                        (int(pt[0] + 3 * self._pointSize[0] + yTickLength),
+++                         int(pt[1] - 0.5 * h))
++                     )
++                 dc.DrawTextList(labels, coords)
++ 
++@@ -2785,7 +2785,7 @@ def _drawPlotTitle(self, dc, graphics, lhsW, rhsW, titleWH):
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - titleWH[0] / 2.,
++             self.plotbox_origin[1] - self.plotbox_size[1]
++         )
++-        dc.DrawText(graphics.title, titlePos[0], titlePos[1])
+++        dc.DrawText(graphics.title, int(titlePos[0]), int(titlePos[1]))
++ 
++     def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++                         xLabelWH, yLabelWH):
++@@ -2806,7 +2806,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++             + (self.plotbox_size[0] - lhsW - rhsW) / 2. - xLabelWH[0] / 2.,
++             self.plotbox_origin[1] - xLabelWH[1] - yTickLength
++         )
++-        dc.DrawText(graphics.xLabel, xLabelPos[0], xLabelPos[1])
+++        dc.DrawText(graphics.xLabel, int(xLabelPos[0]), int(xLabelPos[1]))
++         yLabelPos = (
++             self.plotbox_origin[0] - 3 * self._pointSize[0] + xTickLength,
++             self.plotbox_origin[1] - bottomH
++@@ -2814,7 +2814,7 @@ def _drawAxesLabels(self, dc, graphics, lhsW, rhsW, bottomH, topH,
++         )
++         if graphics.yLabel:  # bug fix for Linux
++             dc.DrawRotatedText(
++-                graphics.yLabel, yLabelPos[0], yLabelPos[1], 90)
+++                graphics.yLabel, int(yLabelPos[0]), int(yLabelPos[1]), 90)
++ 
++     @TempStyle('pen')
++     def _drawPlotAreaLabels(self, dc, graphics, lhsW, rhsW, titleWH,
++@@ -2942,7 +2942,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++ 
++-            self.sb_hor.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_hor.SetScrollbar(pos, pagesize, int(sbfullrange), pagesize)
++             self._sb_xunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++@@ -2964,7 +2964,7 @@ def _adjustScrollbars(self):
++         if pos >= 0:
++             pagesize = int((r_current[1] - r_current[0]) / unit)
++             pos = (sbfullrange - 1 - pos - pagesize)
++-            self.sb_vert.SetScrollbar(pos, pagesize, sbfullrange, pagesize)
+++            self.sb_vert.SetScrollbar(int(pos), pagesize, int(sbfullrange), pagesize)
++             self._sb_yunit = unit
++             needScrollbars = needScrollbars or (pagesize != sbfullrange)
++         else:
++diff --git a/wx/lib/plot/polyobjects.py b/wx/lib/plot/polyobjects.py
++index 26a54f8f7..725b0164e 100644
++--- a/wx/lib/plot/polyobjects.py
+++++ b/wx/lib/plot/polyobjects.py
++@@ -417,7 +417,7 @@ def draw(self, dc, printerScale, coord=None):
++ 
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_BUTT)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -518,7 +518,7 @@ def draw(self, dc, printerScale, coord=None):
++         style = self.attributes['style']
++         if not isinstance(colour, wx.Colour):
++             colour = wx.Colour(colour)
++-        pen = wx.Pen(colour, width, style)
+++        pen = wx.Pen(colour, int(width), style)
++         pen.SetCap(wx.CAP_ROUND)
++         dc.SetPen(pen)
++         if coord is None:
++@@ -590,7 +590,7 @@ def draw(self, dc, printerScale, coord=None):
++         if fillcolour and not isinstance(fillcolour, wx.Colour):
++             fillcolour = wx.Colour(fillcolour)
++ 
++-        dc.SetPen(wx.Pen(colour, width))
+++        dc.SetPen(wx.Pen(colour, int(width)))
++         if fillcolour:
++             dc.SetBrush(wx.Brush(fillcolour, fillstyle))
++         else:
++@@ -618,6 +618,7 @@ def _circle(self, dc, coords, size=1):
++         dc.DrawEllipseList(rect.astype(np.int32))
++ 
++     def _dot(self, dc, coords, size=1):
+++        coords = [(int(c[0]), int(c[1])) for c in coords]
++         dc.DrawPointList(coords)
++ 
++     def _square(self, dc, coords, size=1):
++@@ -699,7 +700,7 @@ def set_pen_and_brush(self, dc, printerScale):
++ 
++         if not isinstance(pencolour, wx.Colour):
++             pencolour = wx.Colour(pencolour)
++-        pen = wx.Pen(pencolour, penwidth, penstyle)
+++        pen = wx.Pen(pencolour, int(penwidth), penstyle)
++         pen.SetCap(wx.CAP_BUTT)
++ 
++         if not isinstance(fillcolour, wx.Colour):
++@@ -790,6 +791,7 @@ def draw(self, dc, printerScale, coord=None):
++                 raise TypeError(err_str.format(type(barwidth)))
++ 
++             rects = [self.calc_rect(x, y, w) for x, y, w in pts]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3])) for r in rects]
++             dc.DrawRectangleList(rects)
++         else:
++             dc.DrawLines(coord)  # draw legend line
++@@ -858,6 +860,8 @@ def draw(self, dc, printerScale, coord=None):
++             rects = [self.calc_rect(y, low, high)
++                      for y, (low, high)
++                      in zip(self.hist, self.bins)]
+++            rects = [(int(r[0]), int(r[1]), int(r[2]), int(r[3]))
+++                     for r in rects]
++ 
++             dc.DrawRectangleList(rects)
++         else:
++@@ -1114,10 +1118,10 @@ def _draw_iqr_box(self, dc, printerScale):
++                                       self.currentShift)
++ 
++         # rectangles are drawn (left, top, width, height) so adjust
++-        iqr_box = [iqr_box[0][0],                   # X (left)
++-                   iqr_box[0][1],                   # Y (top)
++-                   iqr_box[1][0] - iqr_box[0][0],   # Width
++-                   iqr_box[1][1] - iqr_box[0][1]]   # Height
+++        iqr_box = [int(iqr_box[0][0]),                   # X (left)
+++                   int(iqr_box[0][1]),                   # Y (top)
+++                   int(iqr_box[1][0] - iqr_box[0][0]),   # Width
+++                   int(iqr_box[1][1] - iqr_box[0][1])]   # Height
++ 
++         box_pen = wx.Pen(wx.BLACK, 3, wx.PENSTYLE_SOLID)
++         box_brush = wx.Brush(wx.GREEN, wx.BRUSHSTYLE_SOLID)
++@@ -1503,7 +1507,7 @@ def OnPrintPage(self, page):
++         self.graph._setSize(plotAreaW, plotAreaH)
++ 
++         # Set offset and scale
++-        dc.SetDeviceOrigin(pixLeft, pixTop)
+++        dc.SetDeviceOrigin(int(pixLeft), int(pixTop))
++ 
++         # Thicken up pens and increase marker size for printing
++         ratioW = float(plotAreaW) / clientDcSize[0]
++diff --git a/wx/lib/popupctl.py b/wx/lib/popupctl.py
++index 883be5ae5..236501f6d 100644
++--- a/wx/lib/popupctl.py
+++++ b/wx/lib/popupctl.py
++@@ -124,7 +124,7 @@ def Display(self):
++         selfSize = self.GetSize()
++         tcSize = self.ctrl.GetSize()
++ 
++-        pos.x -= (selfSize.width - tcSize.width) / 2
+++        pos.x -= (selfSize.width - tcSize.width) // 2
++         if pos.x + selfSize.width > dSize.width:
++             pos.x = dSize.width - selfSize.width
++         if pos.x < 0:
++diff --git a/wx/lib/scrolledpanel.py b/wx/lib/scrolledpanel.py
++index e4c482af9..1f783ea97 100644
++--- a/wx/lib/scrolledpanel.py
+++++ b/wx/lib/scrolledpanel.py
++@@ -222,4 +222,4 @@ def ScrollChildIntoView(self, child):
++         # if we need to adjust
++         if new_vs_x != -1 or new_vs_y != -1:
++             #print("%s: (%s, %s)" % (self.GetName(), new_vs_x, new_vs_y))
++-            self.Scroll(new_vs_x, new_vs_y)
+++            self.Scroll(int(new_vs_x), int(new_vs_y))
++diff --git a/wx/lib/throbber.py b/wx/lib/throbber.py
++index 9954d6b27..ee8c51209 100644
++--- a/wx/lib/throbber.py
+++++ b/wx/lib/throbber.py
++@@ -200,11 +200,11 @@ def Draw(self, dc):
++         """
++         dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True)
++         if self.overlay and self.showOverlay:
++-            dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True)
+++            dc.DrawBitmap(self.overlay, int(self.overlayX), int(self.overlayY), True)
++         if self.label and self.showLabel:
++-            dc.DrawText(self.label, self.labelX, self.labelY)
+++            dc.DrawText(self.label, int(self.labelX), int(self.labelY))
++             dc.SetTextForeground(wx.WHITE)
++-            dc.DrawText(self.label, self.labelX-1, self.labelY-1)
+++            dc.DrawText(self.label, int(self.labelX-1), int(self.labelY-1))
++ 
++ 
++     def OnPaint(self, event):
++diff --git a/wx/lib/ticker.py b/wx/lib/ticker.py
++index 04abf0d44..4e684b4cd 100644
++--- a/wx/lib/ticker.py
+++++ b/wx/lib/ticker.py
++@@ -86,7 +86,7 @@ def Stop(self):
++     def Start(self):
++         """Starts the text moving"""
++         if not self.timer.IsRunning():
++-            self.timer.Start(1000 / self._fps)
+++            self.timer.Start(1000 // self._fps)
++ 
++ 
++     def IsTicking(self):
++@@ -208,7 +208,7 @@ def DrawText(self, dc):
++             offx = self._offset - self._extent[0]
++         else:
++             offx = self.GetSize()[0] - self._offset
++-        offy = (self.GetSize()[1] - self._extent[1]) / 2 #centered vertically
+++        offy = (self.GetSize()[1] - self._extent[1]) // 2 #centered vertically
++         dc.DrawText(self._text, offx, offy)
++ 
++ 
+
diff --git a/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
new file mode 100644
index 000000000000..88c3ca189647
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/0003-Python-3.10-AGW-FlatNotebook.patch
@@ -0,0 +1,57 @@
+From 1d5fd72dff63d62dd19b77e489d4115245d4d453 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Dec 28 2021 02:58:12 +0000
+Subject: Fix more Python 3.10 issues with AGW FlatNotebook (#2035790)
+
+
+---
+
+diff --git a/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+new file mode 100644
+index 0000000..e8b74ac
+--- /dev/null
++++ b/aa3dca0e40bd0701e82ce40297a982b5b84844dc.patch
+@@ -0,0 +1,43 @@
++From aa3dca0e40bd0701e82ce40297a982b5b84844dc Mon Sep 17 00:00:00 2001
++From: Scott Talbert <swt@techie.net>
++Date: Mon, 27 Dec 2021 19:48:55 -0500
++Subject: [PATCH] Fix additional Python 3.10 issues with AGW FlatNotebook
++
++---
++ wx/lib/agw/flatnotebook.py | 14 +++++++-------
++ 1 file changed, 7 insertions(+), 7 deletions(-)
++
++diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py
++index d33f71d51..61bc4efb3 100644
++--- a/wx/lib/agw/flatnotebook.py
+++++ b/wx/lib/agw/flatnotebook.py
++@@ -925,14 +925,14 @@ def DrawButton(dc, rect, focus, upperTabs):
++ 
++     if focus:
++         if upperTabs:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*8)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*8)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*8))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*8))
++         else:
++-            leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*5)
++-            rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*5)
+++            leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*5))
+++            rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*5))
++     else:
++-        leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
++-        rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 2))
+++        leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 2)))
+++        rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 2)))
++ 
++     # Define the top region
++     top = wx.Rect(rect.GetTopLeft(), rightPt)
++@@ -2766,7 +2766,7 @@ def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatu
++         if pageTextColour is not None:
++             dc.SetTextForeground(pageTextColour)
++ 
++-        dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset, imageYCoord)
+++        dc.DrawText(pc.GetPageText(tabIdx), int(posx + textOffset), imageYCoord)
++ 
++         # draw 'x' on tab (if enabled)
++         if pc.HasAGWFlag(FNB_X_ON_TAB) and tabIdx == pc.GetSelection():
diff --git a/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
new file mode 100644
index 000000000000..6f21ecb7a718
--- /dev/null
+++ b/srcpkgs/wxPython4/patches/restore-gil-pseudodc.patch
@@ -0,0 +1,52 @@
+Backport https://github.com/wxWidgets/Phoenix/pull/1849
+Regarding segfault as in https://github.com/OSGeo/grass/issues/1123
+
+From 5cace47aaece3cc4f2e6ea97d7fd5bb8ed316ac9 Mon Sep 17 00:00:00 2001
+From: Robin Dunn <robin@alldunn.com>
+Date: Wed, 18 Nov 2020 10:52:53 -0800
+Subject: [PATCH] Restore GIL acquisition in wxPseudoDC::FindObjects*
+
+---
+ src/pseudodc.cpp | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/pseudodc.cpp b/src/pseudodc.cpp
+index 5890ed7e2..ed4bcd06a 100644
+--- a/src/pseudodc.cpp
++++ b/src/pseudodc.cpp
+@@ -483,7 +483,7 @@ bool wxPseudoDC::GetIdGreyedOut(int id)
+ // ----------------------------------------------------------------------------
+ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -501,7 +501,6 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+         }
+         pt = pt->GetNext();
+     }
+-    //wxPyEndBlockThreads(blocked);
+     return pyList;
+ }
+ 
+@@ -511,7 +510,7 @@ PyObject *wxPseudoDC::FindObjectsByBBox(wxCoord x, wxCoord y)
+ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+                                   wxCoord radius, const wxColor& bg)
+ {
+-    //wxPyBlock_t blocked = wxPyBeginBlockThreads();
++    wxPyThreadBlocker blocker;
+     pdcObjectList::compatibility_iterator pt = m_objectlist.GetFirst();
+     pdcObject *obj;
+     PyObject* pyList = NULL;
+@@ -611,8 +610,7 @@ PyObject *wxPseudoDC::FindObjects(wxCoord x, wxCoord y,
+         maskdc.SelectObject(wxNullBitmap);
+         memdc.SelectObject(wxNullBitmap);
+     }
+-    //wxPyEndBlockThreads(blocked);
+-    return pyList;
++     return pyList;
+ }
+ 
+ // ----------------------------------------------------------------------------
diff --git a/srcpkgs/wxPython4/template b/srcpkgs/wxPython4/template
index 554174105a36..afea1b55bf90 100644
--- a/srcpkgs/wxPython4/template
+++ b/srcpkgs/wxPython4/template
@@ -1,7 +1,7 @@
 # Template file for 'wxPython4'
 pkgname=wxPython4
 version=4.0.7
-revision=4
+revision=5
 wrksrc="wxPython-${version}"
 build_style=python3-module
 make_build_args="--skip-build"
@@ -10,6 +10,7 @@ hostmakedepends="pkg-config python3-setuptools python3-pathlib2"
 makedepends="python3-devel wxWidgets-gtk3-devel SDL2-devel webkit2gtk-devel
  gst-plugins-base1-devel"
 depends="python3 python3-six python3-numpy python3-Pillow"
+checkdepends="python3-six python3-numpy python3-Pillow"
 short_desc="WxWidgets GUI toolkit library (Python3 Bindings)"
 maintainer="Jasper Chan <jasperchan515@gmail.com>"
 license="custom:wxWindows"

From 4a94813ec504731ca243ef33ecb463826476d6f5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 21:56:03 +0100
Subject: [PATCH 10/17] grass: update to 7.8.7RC1; rebuild against libgdal and
 proj

Version 7.8.7RC1 includes a workaround for a wxPython issue
https://github.com/OSGeo/grass/issues/1971#issuecomment-993622613
---
 srcpkgs/grass/patches/musl-build-fix.patch |  13 +++
 srcpkgs/grass/template                     | 128 +++++++++++++++++----
 2 files changed, 120 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/grass/patches/musl-build-fix.patch

diff --git a/srcpkgs/grass/patches/musl-build-fix.patch b/srcpkgs/grass/patches/musl-build-fix.patch
new file mode 100644
index 000000000000..364ee30be4d9
--- /dev/null
+++ b/srcpkgs/grass/patches/musl-build-fix.patch
@@ -0,0 +1,13 @@
+error: unknown type name 'int64_t' patch for musl
+
+diff --git a/include/gis.h b/include/gis.h
+--- a/include/gis.h
++++ b/include/gis.h
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ 
+ 
+ /* Grass and local include files */
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..167faa401385 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,116 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=4
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=7.8.7RC1
+revision=1
+_binversion=${version//./}
+_binversion=${_binversion:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
- --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
-short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+configure_args="--prefix=/usr/lib
+ --bindir=/usr/bin
+ --libdir=/usr/lib
+ --libexec=/usr/libexec
+ --enable-largefile
+ --with-blas
+ --with-blas-includes=/usr/include
+ --with-bzip2
+ --with-bzlib
+ --with-cairo
+ --with-cxx
+ --with-freetype
+ --with-freetype-includes=/usr/include/freetype2
+ --with-gdal
+ --with-geos
+ --with-glw
+ --with-lapack
+ --with-lapack-includes=/usr/include
+ --with-mysql
+ --with-mysql-includes=/usr/include/mysql
+ --with-netcdf=/usr/bin/nc-config
+ --with-nls
+ --with-openmp
+ --with-postgres
+ --with-postgres-includes=/usr/include/postgresql
+ --with-postgres-libs=/usr/lib/psql14/lib/postgresql
+ --with-proj
+ --with-proj-share=/usr/share
+ --with-pthread
+ --with-python=/usr/bin/python3-config
+ --with-readline
+ --with-regex
+ --with-sqlite
+ --with-wxwidgets"
+hostmakedepends="flex
+ gettext
+ libgdal-tools
+ pkg-config
+ python3-numpy
+ python3-six
+ tar"
+makedepends="bison
+ blas-devel
+ bzip2-devel
+ cairo-devel
+ fftw-devel
+ freetype-devel
+ geos-devel
+ gettext-devel
+ glu-devel
+ lapack-devel
+ libgdal-devel
+ libgomp-devel
+ libmysqlclient-devel
+ libpng-devel
+ libzstd-devel
+ netcdf-devel
+ postgresql-libs-devel
+ proj-devel
+ python3-devel
+ python3-Pillow
+ python3-six
+ readline-devel
+ sqlite-devel
+ tiff-devel
+ zlib-devel"
+depends="libgdal python3-numpy wxPython4"
+short_desc="Geographic Resources Analysis Support System"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+distfiles="https://github.com/OSGeo/grass/archive/${version}.tar.gz"
+checksum=fa1d6ccc1fde4cbea0be095256729421c41c1a12bf621fe124d0d2c8e826de6a
 nocross="tries to execute target binaries"
 
+shlib_provides="
+ libgrass_dbmibase.${version%.*}.so
+ libgrass_dbmiclient.${version%.*}.so
+ libgrass_gis.${version%.*}.so
+ libgrass_gproj.${version%.*}.so
+ libgrass_imagery.${version%.*}.so
+ libgrass_raster.${version%.*}.so
+ libgrass_vector.${version%.*}.so"
+
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# remove $DESTDIR in paths
+	vsed -i -e "s|${DESTDIR}||" \
+		${DESTDIR}/usr/bin/grass78 \
+		${DESTDIR}/usr/lib/grass78/etc/fontcap \
+		${DESTDIR}/usr/lib/grass78/demolocation/.grassrc78 \
+		${DESTDIR}/usr/lib/grass78/include/Make/Platform.make \
+		${DESTDIR}/usr/lib/grass78/include/Make/Grass.make
+
+	# ld.so.conf
+	mkdir -p ${DESTDIR}/etc/ld.so.conf.d
+	echo "/usr/lib/grass${_binversion}/lib" >${DESTDIR}/etc/ld.so.conf.d/grass${_binversion}.conf
+	# profiles
+	mkdir -p ${DESTDIR}/etc/profile.d
+	echo 'export PATH="/usr/lib/grass'${_binversion}'/bin:$PATH"' >${DESTDIR}/etc/profile.d/grass${_binversion}.sh
+
+	vinstall grass.pc 644 usr/share/pkgconfig
+	vinstall gui/icons/grass.desktop 644 usr/share/applications
+
+	local icon res
+	for icon in gui/icons/grass-[0-9]*x[0-9]*.png; do
+		res=$(echo $icon |sed -E -e 's|.*-([0-9]+x[0-9]+).png|\1|')
+		vinstall $icon 0644 /usr/share/icons/hicolor/$res/apps grass.png
+	done
 }

From 85fac97d25732ec118bc5e919a5072c012520a45 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 11/17] merkaartor: rebuild against libgdal-3.4.1 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 5b0cb514ada99009225902099fcb81dd8b75b0ab Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 12/17] OpenOrienteering-Mapper: rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From 388c8b932e02683743fca9b0b1c1c7d5544f67f0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 13/17] osg: rebuild against libgdal-3.4.1, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From 86271026724b2f0e53d3bf7d5bfde622f38aec2c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 17:35:47 +0200
Subject: [PATCH 14/17] sumo: update to 1.9.2; rebuild against libgdal-3.4.1
 and proj-7.2.1

- Build TraaS.jar using Maven (fixes tests)
- Add Eigen3 dependency
---
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index e760fdd45aee..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=4
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From 05744b77b4c81a0fa85fc5f09751168cb1a41eaf Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 15/17] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From b4e3cf72dad503f4a98984a889dc9c2dc50c9204 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 16/17] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From bf2619309f5c7ae5f794bf19c8d80e46d3231e7b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 17/17] XyGrib: rebuild against proj-7.2.1

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (36 preceding siblings ...)
  2022-02-15 22:50 ` ar-jan
@ 2022-02-16 19:58 ` ar-jan
  2022-02-16 20:02 ` ar-jan
                   ` (19 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-16 19:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2175 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

Update libgdal and proj and rebuild against them
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) --> Contains 3 related new packages, see below.

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
    **I use PostGIS regularly and this works for me.**
- [x] I generally don't use the affected packages but briefly tested this PR
    **I generally don't use the other packages which have to be rebuilt against proj and/or gdal, but I did test all of them briefly**.

#### Motivation

- These updates and additions are in preparation for adding QGIS.
- SpatiaLite is a lightweight, versatile spatial extension to SQLite. Libkml is needed to provide KML support to SpatiaLite, and librttopo is required to create genuine SpatiaLite-5 DB layout, as well as to pass SpatiaLite tests.

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 26235 bytes --]

From b8355468c0337bb45c5edb2712126e67e21aa17a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/12] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 0c60260b4642..b0fcfd04926e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From a1a7df1acd39dcb4cf66846864c1b5294ec8b2d0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 02/12] libgdal: update to 3.4.1 and rebuild against proj-7.2.1

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 101 +++++++++++++++---
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 91 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index b0fcfd04926e..56f1ff352750 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2510,7 +2510,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..89a76ceb6eaa 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,96 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.1
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=no
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=no
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=e360387bc25ec24940f46afbeada48002d72c74aaf9eccf2a40e8d74e711a2e4
+subpackages="python3-gdal libgdal-devel libgdal-tools"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
 
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
+
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +112,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 8b438b5628582bd03a2e239bbca159f1dc729a9b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 03/12] postgis: update to 3.1.5; rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..f52cd6657988 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.1.5
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 3dd9972d1ca5dfb5223b5bbf94ffc8b5212981fa Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 04/12] postgis-postgresql13: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..a0f5c89ef4da 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
-revision=2
+version=3.1.5
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 127ef53077b0e08388307d708207e7bd8854119a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 05/12] postgis-postgresql14: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..ad8d0c5c4253 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.1.5
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From a963ff60518c157d20458938eb0de8a4a30f669c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 06/12] merkaartor: rebuild against libgdal-3.4.1 and
 proj-7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 89157f653bd281f7fe9d502246dd71cbd304c99c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 07/12] OpenOrienteering-Mapper: rebuild against libgdal-3.4.1
 and proj-7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From 6169e00e680abb32f7023970658b66ff0292182a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 08/12] osg: rebuild against libgdal-3.4.1, fix license

---
 common/shlibs         |  2 ++
 srcpkgs/osg/template  |  4 ++--
 srcpkgs/sumo/template | 22 ++++++++++++++++------
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 56f1ff352750..7a16956d55c8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4110,3 +4110,5 @@ libawt_xawt.so openjdk17-jre-17.0.1+12_1
 libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
+libsumocpp.so sumo-1.9.2_1
+libtracicpp.so sumo-1.9.2_1
diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5
diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index e760fdd45aee..3c0eea9916aa 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,18 +1,28 @@
 # Template file for 'sumo'
 pkgname=sumo
-version=1.5.0
-revision=4
+version=1.9.2
+revision=1
 build_style=cmake
-python_version=3
-hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
-makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel libxerces-c-devel osg-devel proj-devel"
+hostmakedepends="libgdal-tools pkg-config swig python3-setuptools
+ apache-maven openjdk11 git"
+makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel
+ libxerces-c-devel osg-devel proj-devel eigen"
+checkdepends="gtest"
 short_desc="SUMO (Simulation of Urban MObility) and included applications"
 maintainer="Warrior Graph <marques@larces.uece.br>"
 license="EPL-2.0"
 homepage="https://sumo.dlr.de"
 distfiles="https://sumo.dlr.de/releases/${version}/sumo-src-${version}.tar.gz"
-checksum=dcf5339fdda0659fa44fcfd69fe3f4e03009aa9a59849624f2a3cfe72eda9f8e
+checksum=193a8ab14bb305d3967625d76cd291f5c55bb906817465f2a12c2e69f4b80813
+python_version=3
+
+pre_build() {
+	cd tools/contributed/traas
+	mvn package
+	mv target/traas*.jar ${wrksrc}/bin/TraaS.jar
+}
 
 post_install() {
 	rm -f ${DESTDIR}/usr/share/sumo/tools/libsumo/*.so
+	rm -f ${DESTDIR}/usr/share/sumo/tools/libtraci/_libtraci.so
 }

From 4243f001dc3c875219975aedd30452eb1327536e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 09/12] vtk: rebuild against proj-7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 6620248aaf0bfb85bbbe9ad5f1b446a0bb98889f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 10/12] osm2pgsql: rebuild against proj-7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 8e1066728220c181efd06a3c9b66aed717c4680b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 11/12] XyGrib: rebuild against proj-7.2.1; fix build

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From a41c9df9c111b2c5c9581ff445bc33b5d05cab53 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Wed, 16 Feb 2022 20:51:16 +0100
Subject: [PATCH 12/12] grass: rebuild against libgdal-3.4.1 and proj-7.2.1

---
 .../v.hull-bool-GDAL-compatibility.patch      | 84 +++++++++++++++++++
 srcpkgs/grass/template                        |  4 +-
 2 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch

diff --git a/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch b/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch
new file mode 100644
index 000000000000..c5e018aaaac2
--- /dev/null
+++ b/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch
@@ -0,0 +1,84 @@
+From b86314c7f3b8aea961d380dbb836087b3990d7af Mon Sep 17 00:00:00 2001
+From: nilason <n_larsson@yahoo.com>
+Date: Thu, 6 May 2021 22:27:48 +0200
+Subject: [PATCH] v.hull: use standard C boolean type
+
+Fixes #1563
+---
+ vector/v.hull/chull.c | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
+index 1ad97396fa..41b627c50f 100644
+--- a/vector/v.hull/chull.c
++++ b/vector/v.hull/chull.c
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
++#include <stdbool.h>
+ 
+ #include <grass/gis.h>
+ #include <grass/vector.h>
+@@ -29,10 +30,6 @@
+ 
+ #include "globals.h"
+ 
+-/*Define Boolean type */
+-typedef enum
+-{ BFALSE, BTRUE } bool;
+-
+ /* Define vertex indices. */
+ #define X   0
+ #define Y   1
+@@ -76,10 +73,10 @@ struct tFaceStructure
+ };
+ 
+ /* Define flags */
+-#define ONHULL   	BTRUE
+-#define REMOVED  	BTRUE
+-#define VISIBLE  	BTRUE
+-#define PROCESSED	BTRUE
++#define ONHULL   	true
++#define REMOVED  	true
++#define VISIBLE  	true
++#define PROCESSED	true
+ 
+ /* Global variable definitions */
+ tVertex vertices = NULL;
+@@ -436,7 +433,7 @@ bool AddOne(tVertex p)
+     tFace f;
+     tEdge e, temp;
+     long int vol;
+-    bool vis = BFALSE;
++    bool vis = false;
+ 
+ 
+     /* Mark faces visible from p. */
+@@ -446,7 +443,7 @@ bool AddOne(tVertex p)
+ 
+ 	if (vol < 0) {
+ 	    f->visible = VISIBLE;
+-	    vis = BTRUE;
++	    vis = true;
+ 	}
+ 	f = f->next;
+     } while (f != faces);
+@@ -454,7 +451,7 @@ bool AddOne(tVertex p)
+     /* If no faces are visible from p, then p is inside the hull. */
+     if (!vis) {
+ 	p->onhull = !ONHULL;
+-	return BFALSE;
++	return false;
+     }
+ 
+     /* Mark edges in interior of visible region for deletion.
+@@ -470,7 +467,7 @@ bool AddOne(tVertex p)
+ 	    e->newface = MakeConeFace(e, p);
+ 	e = temp;
+     } while (e != edges);
+-    return BTRUE;
++    return true;
+ }
+ 
+ /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..5863a61a300d 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,7 +1,7 @@
 # Template file for 'grass'
 pkgname=grass
 version=7.6.1
-revision=4
+revision=5
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
@@ -17,7 +17,7 @@ license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
 checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+python_version=2
 nocross="tries to execute target binaries"
 
 post_install() {

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (37 preceding siblings ...)
  2022-02-16 19:58 ` ar-jan
@ 2022-02-16 20:02 ` ar-jan
  2022-02-16 20:03 ` ar-jan
                   ` (18 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-16 20:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1039736240

Comment:
~The grass package held things back six months ago, otherwise everything looked good.~

~I've given it another try, but it doesn't look hopeful: Python 3.10 + wxPython < 4.1 just doesn't seem to work. I've used grass-7.8.7RC1, which contains a workaround for a [wxPython issue](https://github.com/OSGeo/grass/issues/1971) as well as fixes related to Python 3.10.~
~I've also backported patches from wxPython 4.1 to 4.0.7 (following Fedora [here](https://src.fedoraproject.org/rpms/python-wxpython4/c/f5471fb86aaae46a686b85c654fcbb98516355e6?branch=rawhide), [here](https://src.fedoraproject.org/rpms/python-wxpython4/c/f55a17c2d3b336c82fb44f7816ec63219847f4cc?branch=rawhide), and [here](https://src.fedoraproject.org/rpms/python-wxpython4/c/1d5fd72dff63d62dd19b77e489d4115245d4d453?branch=rawhide))~

~With these changes the grass gui still doesn't work, and it looks like it is simply [not feasible with wxPython 4.0](https://github.com/OSGeo/grass/issues/2019). I've included the grass and wxPython4 commits hoping someone can sanity-check this.~

~If there's no progress with grass, I propose to either:~

~1. Include 7.8.7RC1 as is: the --text mode is functional (I think, I rarely use grass), and since the curently packaged grass gui doesn't work either it's not a regression afaict.~
~2. Remove the grass package.~

~In both cases the wxPython4 update can be left out -- unless these Python 3.10-related patches are helpful in other places?~

Edit: I've simplified the PR by only rebuilding the current version of grass, and omitting libspatialite/libkml/libgttopo for a separate PR. Grass looks as functional as before.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: Update libgdal and proj and rebuild against them
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (38 preceding siblings ...)
  2022-02-16 20:02 ` ar-jan
@ 2022-02-16 20:03 ` ar-jan
  2022-02-17 11:45 ` proj + libgdal: update and rebuild dependants ar-jan
                   ` (17 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-16 20:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1039736240

Comment:
~The grass package held things back six months ago, otherwise everything looked good.~

~I've given it another try, but it doesn't look hopeful: Python 3.10 + wxPython < 4.1 just doesn't seem to work. I've used grass-7.8.7RC1, which contains a workaround for a [wxPython issue](https://github.com/OSGeo/grass/issues/1971) as well as fixes related to Python 3.10.~
~I've also backported patches from wxPython 4.1 to 4.0.7 (following Fedora [here](https://src.fedoraproject.org/rpms/python-wxpython4/c/f5471fb86aaae46a686b85c654fcbb98516355e6?branch=rawhide), [here](https://src.fedoraproject.org/rpms/python-wxpython4/c/f55a17c2d3b336c82fb44f7816ec63219847f4cc?branch=rawhide), and [here](https://src.fedoraproject.org/rpms/python-wxpython4/c/1d5fd72dff63d62dd19b77e489d4115245d4d453?branch=rawhide))~

~With these changes the grass gui still doesn't work, and it looks like it is simply [not feasible with wxPython 4.0](https://github.com/OSGeo/grass/issues/2019). I've included the grass and wxPython4 commits hoping someone can sanity-check this.~

~If there's no progress with grass, I propose to either:~

~1. Include 7.8.7RC1 as is: the --text mode is functional (I think, I rarely use grass), and since the curently packaged grass gui doesn't work either it's not a regression afaict.~
~2. Remove the grass package.~

~In both cases the wxPython4 update can be left out -- unless these Python 3.10-related patches are helpful in other places?~

Edit: I've simplified the PR by only rebuilding the current version of grass, and omitting libspatialite/libkml/librttopo for a separate PR. Grass looks as functional as before.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (39 preceding siblings ...)
  2022-02-16 20:03 ` ar-jan
@ 2022-02-17 11:45 ` ar-jan
  2022-02-17 11:45 ` ar-jan
                   ` (16 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-17 11:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1042864501

Comment:
Hi @sgn, earlier [you fixed](https://github.com/void-linux/void-packages/pull/31687#issuecomment-871569727) libgdal cross-compiling, with libgdal 3.2.3. Now ARM builds fail again, with the same gdal 3.2.3 as well as witih 3.3 and 3.4. It seems something has changed with the build process, any ideas?

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (40 preceding siblings ...)
  2022-02-17 11:45 ` proj + libgdal: update and rebuild dependants ar-jan
@ 2022-02-17 11:45 ` ar-jan
  2022-04-22 20:02 ` Chocimier
                   ` (15 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-02-17 11:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1042865202

Comment:
Hi @Chocimier, do you know why the CI build still sees postgis-postgresql12 as a dependant of libgdal? It tries to install postgis-postgresql12 even though it was removed. Compile and install works locally.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (41 preceding siblings ...)
  2022-02-17 11:45 ` ar-jan
@ 2022-04-22 20:02 ` Chocimier
  2022-04-24 17:45 ` [PR PATCH] [Updated] " ar-jan
                   ` (14 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Chocimier @ 2022-04-22 20:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1106818973

Comment:
Hi @ar-jan, `postgis-postgresql12` was removed as template but not removed from binary repositories, there is no automatic process to do that. Either ignore or ask on IRC for removal from binary repo.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (42 preceding siblings ...)
  2022-04-22 20:02 ` Chocimier
@ 2022-04-24 17:45 ` ar-jan
  2022-04-25 16:38 ` ar-jan
                   ` (13 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-04-24 17:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

proj + libgdal: update and rebuild dependants
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
    **I use PostGIS regularly and this works for me.**
- [x] I generally don't use the affected packages but briefly tested this PR
    **I generally don't use the other packages which have to be rebuilt against proj and/or gdal, but I did test all of them briefly**.

#### Motivation

- These updates are in preparation for adding QGIS.

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 25020 bytes --]

From 2007938bb02eecb6ae35d20ebcfe052dfbc9a26a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/13] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 11328b15a9cc..83541e334f09 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3071,7 +3071,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 31184f54d54be72d6d78a5b4ada0e0de4e37ff55 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 02/13] libgdal: update to 3.4.2 and rebuild against proj

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 101 +++++++++++++++---
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 91 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 83541e334f09..6ee9ddbe0981 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2512,7 +2512,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..bccf9ceb0e77 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,96 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.2
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=no
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=7edef6de47c67da806b74eb8d3a20550933392a295c707682ea21b72123e34ce
+subpackages="python3-gdal libgdal-devel libgdal-tools"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
 
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
+
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +112,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 51d7e483da549ca7ada1491445784ec399620a21 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 03/13] postgis: update to 3.1.5; rebuild against libgdal and
 proj

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..f52cd6657988 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.1.5
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From f6d5fd26ad901e53a4264cc63bf7f964868ee4d4 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 04/13] postgis-postgresql13: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..a0f5c89ef4da 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
-revision=2
+version=3.1.5
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From c8a2985f0e9e3278dc5dbc7062ec887620d4b401 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 05/13] postgis-postgresql14: update to 3.1.5; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..ad8d0c5c4253 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.1.5
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=fcb10d9b499fd79399bd8db90f0b313837d00223d30080dac403419e067e4c06
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 9d90edbdb839f285fc7211fc34d81dd2660b981b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 06/13] merkaartor: rebuild against libgdal and proj

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 0838c3292352a43b77777d606ce26af5562cbac7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 07/13] OpenOrienteering-Mapper: rebuild against libgdal and
 proj

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From e9370911d2b4a2059fc3349c8ffdc9dcb8e59d86 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 08/13] osg: rebuild against libgdal, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From a2cf08c03a4fe6a4309a3ae37d0a2f0910a17b4d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 09/13] vtk: rebuild against proj

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 74203da06a66522476cadde85cf88fce690ea459 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 10/13] osm2pgsql: rebuild against proj

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 1440fb8a7139346b594592d488d8f8b0fd59bc82 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 11/13] XyGrib: rebuild against proj; fix build

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From 2f11b3cdee4c12b5b1e52f20e5377f8fac27d8de Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Wed, 16 Feb 2022 20:51:16 +0100
Subject: [PATCH 12/13] grass: rebuild against libgdal and proj

---
 .../v.hull-bool-GDAL-compatibility.patch      | 84 +++++++++++++++++++
 srcpkgs/grass/template                        |  4 +-
 2 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch

diff --git a/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch b/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch
new file mode 100644
index 000000000000..c5e018aaaac2
--- /dev/null
+++ b/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch
@@ -0,0 +1,84 @@
+From b86314c7f3b8aea961d380dbb836087b3990d7af Mon Sep 17 00:00:00 2001
+From: nilason <n_larsson@yahoo.com>
+Date: Thu, 6 May 2021 22:27:48 +0200
+Subject: [PATCH] v.hull: use standard C boolean type
+
+Fixes #1563
+---
+ vector/v.hull/chull.c | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
+index 1ad97396fa..41b627c50f 100644
+--- a/vector/v.hull/chull.c
++++ b/vector/v.hull/chull.c
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
++#include <stdbool.h>
+ 
+ #include <grass/gis.h>
+ #include <grass/vector.h>
+@@ -29,10 +30,6 @@
+ 
+ #include "globals.h"
+ 
+-/*Define Boolean type */
+-typedef enum
+-{ BFALSE, BTRUE } bool;
+-
+ /* Define vertex indices. */
+ #define X   0
+ #define Y   1
+@@ -76,10 +73,10 @@ struct tFaceStructure
+ };
+ 
+ /* Define flags */
+-#define ONHULL   	BTRUE
+-#define REMOVED  	BTRUE
+-#define VISIBLE  	BTRUE
+-#define PROCESSED	BTRUE
++#define ONHULL   	true
++#define REMOVED  	true
++#define VISIBLE  	true
++#define PROCESSED	true
+ 
+ /* Global variable definitions */
+ tVertex vertices = NULL;
+@@ -436,7 +433,7 @@ bool AddOne(tVertex p)
+     tFace f;
+     tEdge e, temp;
+     long int vol;
+-    bool vis = BFALSE;
++    bool vis = false;
+ 
+ 
+     /* Mark faces visible from p. */
+@@ -446,7 +443,7 @@ bool AddOne(tVertex p)
+ 
+ 	if (vol < 0) {
+ 	    f->visible = VISIBLE;
+-	    vis = BTRUE;
++	    vis = true;
+ 	}
+ 	f = f->next;
+     } while (f != faces);
+@@ -454,7 +451,7 @@ bool AddOne(tVertex p)
+     /* If no faces are visible from p, then p is inside the hull. */
+     if (!vis) {
+ 	p->onhull = !ONHULL;
+-	return BFALSE;
++	return false;
+     }
+ 
+     /* Mark edges in interior of visible region for deletion.
+@@ -470,7 +467,7 @@ bool AddOne(tVertex p)
+ 	    e->newface = MakeConeFace(e, p);
+ 	e = temp;
+     } while (e != edges);
+-    return BTRUE;
++    return true;
+ }
+ 
+ /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..5863a61a300d 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,7 +1,7 @@
 # Template file for 'grass'
 pkgname=grass
 version=7.6.1
-revision=4
+revision=5
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
@@ -17,7 +17,7 @@ license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
 checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+python_version=2
 nocross="tries to execute target binaries"
 
 post_install() {

From 206ab59bd2364e93c675a858b1efbdd90a0644ef Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 24 Apr 2022 15:30:21 +0200
Subject: [PATCH 13/13] sumo: rebuild against libgdal and proj

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index f3cc1c4490ae..39c47a46b44c 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (43 preceding siblings ...)
  2022-04-24 17:45 ` [PR PATCH] [Updated] " ar-jan
@ 2022-04-25 16:38 ` ar-jan
  2022-07-25  2:14 ` github-actions
                   ` (12 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-04-25 16:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1108798127

Comment:
Anyone have any ideas of why the crossbuild fails? @sgn maybe? It was working before. It seems that the swig build is now attempted in the do_build step, while it should be occurring in the custom post_build step.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (44 preceding siblings ...)
  2022-04-25 16:38 ` ar-jan
@ 2022-07-25  2:14 ` github-actions
  2022-08-02 18:00 ` Chocimier
                   ` (11 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: github-actions @ 2022-07-25  2:14 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/31687#issuecomment-1193479538

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] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (45 preceding siblings ...)
  2022-07-25  2:14 ` github-actions
@ 2022-08-02 18:00 ` Chocimier
  2022-08-06  9:50 ` ar-jan
                   ` (10 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: Chocimier @ 2022-08-02 18:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1203046888

Comment:
I could take a look on cross compilation, but logs expired. Please rebase.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (46 preceding siblings ...)
  2022-08-02 18:00 ` Chocimier
@ 2022-08-06  9:50 ` ar-jan
  2022-10-25 16:25 ` [PR PATCH] [Updated] " ar-jan
                   ` (9 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-08-06  9:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1207185117

Comment:
I'm currently without a Void system available, will rebase later. @sgn was also going to look at it (via #36816).

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (47 preceding siblings ...)
  2022-08-06  9:50 ` ar-jan
@ 2022-10-25 16:25 ` ar-jan
  2022-10-25 16:55 ` ar-jan
                   ` (8 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-10-25 16:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

proj + libgdal: update and rebuild dependants
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
    **I use PostGIS regularly and this works for me.**
- [x] I generally don't use the affected packages but briefly tested this PR
    **I generally don't use the other packages which have to be rebuilt against proj and/or gdal, but I did test all of them briefly**.

#### Motivation

- These updates are in preparation for adding QGIS.

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 25020 bytes --]

From 2007938bb02eecb6ae35d20ebcfe052dfbc9a26a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/13] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 11328b15a9cc..83541e334f09 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3071,7 +3071,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 4bd4e1bf8fc5abf9b2527f319fec2e87bd13a32c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 02/13] libgdal: update to 3.4.3 and rebuild against proj

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 101 +++++++++++++++---
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 91 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index 83541e334f09..6ee9ddbe0981 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2512,7 +2512,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 870ab22b4cba..12f7800f2a28 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,96 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=11
+version=3.4.3
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=no
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=7244962628c82921b4a4903dbb721c7222b7d82ed5928fef55a52f87f68ad1fe
+subpackages="python3-gdal libgdal-devel libgdal-tools"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
 
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
+
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +112,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From d32813d5df6b39f394eec73fcc572caeae4ef65c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 19:16:34 +0200
Subject: [PATCH 03/13] postgis: update to 3.2.3; rebuild against libgdal and
 proj

---
 srcpkgs/postgis/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index c878de89cfcb..2eb568136d62 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis'
 pkgname=postgis
-version=3.1.4
+version=3.2.3
 revision=1
 build_style=gnu-configure
 configure_args="--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=1b4d8b5c756e5aba59efbc1833b22efe4d6562778eeca56fa497feb2eb13668c
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From b3a5831cb09001ea8c549f83905ed9853537635e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 04/13] postgis-postgresql13: update to 3.2.3; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 706c8fb96810..b70e36d9a1a1 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.1.4
-revision=2
+version=3.2.3
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=1b4d8b5c756e5aba59efbc1833b22efe4d6562778eeca56fa497feb2eb13668c
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From d7cf3f96e09c67c15ad392096d58e0ee41b3db93 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 05/13] postgis-postgresql14: update to 3.2.3; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 6ce4231b1726..81b4bcc2c9b6 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.1.4
+version=3.2.3
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796
+checksum=1b4d8b5c756e5aba59efbc1833b22efe4d6562778eeca56fa497feb2eb13668c
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 6031f554bbd3e716b06d4de11b92627243779b1e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 06/13] merkaartor: rebuild against libgdal and proj

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 3a6bf406aa843330a483951c64922eb162b529d9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 07/13] OpenOrienteering-Mapper: rebuild against libgdal and
 proj

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From c895bd73d61b4055d22f9b8cd56000efc5ad523d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 08/13] osg: rebuild against libgdal, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From b634accbdb2898598f513ffbf27fbfde67b8d7ef Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 09/13] vtk: rebuild against proj

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 3672f6ee682e198d5f8b9eabb14c2881ba915a2d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:24:43 +0200
Subject: [PATCH 10/13] osm2pgsql: rebuild against proj

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1c53c4505047..1d5f71b70140 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From e418d44a9462eebdec9ec175e2f135c9464d77d6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 11/13] XyGrib: rebuild against proj; fix build

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From 87ce82fd673df0c0b5d34f02ff9aea76511160a6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Wed, 16 Feb 2022 20:51:16 +0100
Subject: [PATCH 12/13] grass: rebuild against libgdal and proj

---
 .../v.hull-bool-GDAL-compatibility.patch      | 84 +++++++++++++++++++
 srcpkgs/grass/template                        |  4 +-
 2 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch

diff --git a/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch b/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch
new file mode 100644
index 000000000000..c5e018aaaac2
--- /dev/null
+++ b/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch
@@ -0,0 +1,84 @@
+From b86314c7f3b8aea961d380dbb836087b3990d7af Mon Sep 17 00:00:00 2001
+From: nilason <n_larsson@yahoo.com>
+Date: Thu, 6 May 2021 22:27:48 +0200
+Subject: [PATCH] v.hull: use standard C boolean type
+
+Fixes #1563
+---
+ vector/v.hull/chull.c | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
+index 1ad97396fa..41b627c50f 100644
+--- a/vector/v.hull/chull.c
++++ b/vector/v.hull/chull.c
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
++#include <stdbool.h>
+ 
+ #include <grass/gis.h>
+ #include <grass/vector.h>
+@@ -29,10 +30,6 @@
+ 
+ #include "globals.h"
+ 
+-/*Define Boolean type */
+-typedef enum
+-{ BFALSE, BTRUE } bool;
+-
+ /* Define vertex indices. */
+ #define X   0
+ #define Y   1
+@@ -76,10 +73,10 @@ struct tFaceStructure
+ };
+ 
+ /* Define flags */
+-#define ONHULL   	BTRUE
+-#define REMOVED  	BTRUE
+-#define VISIBLE  	BTRUE
+-#define PROCESSED	BTRUE
++#define ONHULL   	true
++#define REMOVED  	true
++#define VISIBLE  	true
++#define PROCESSED	true
+ 
+ /* Global variable definitions */
+ tVertex vertices = NULL;
+@@ -436,7 +433,7 @@ bool AddOne(tVertex p)
+     tFace f;
+     tEdge e, temp;
+     long int vol;
+-    bool vis = BFALSE;
++    bool vis = false;
+ 
+ 
+     /* Mark faces visible from p. */
+@@ -446,7 +443,7 @@ bool AddOne(tVertex p)
+ 
+ 	if (vol < 0) {
+ 	    f->visible = VISIBLE;
+-	    vis = BTRUE;
++	    vis = true;
+ 	}
+ 	f = f->next;
+     } while (f != faces);
+@@ -454,7 +451,7 @@ bool AddOne(tVertex p)
+     /* If no faces are visible from p, then p is inside the hull. */
+     if (!vis) {
+ 	p->onhull = !ONHULL;
+-	return BFALSE;
++	return false;
+     }
+ 
+     /* Mark edges in interior of visible region for deletion.
+@@ -470,7 +467,7 @@ bool AddOne(tVertex p)
+ 	    e->newface = MakeConeFace(e, p);
+ 	e = temp;
+     } while (e != edges);
+-    return BTRUE;
++    return true;
+ }
+ 
+ /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..5863a61a300d 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,7 +1,7 @@
 # Template file for 'grass'
 pkgname=grass
 version=7.6.1
-revision=4
+revision=5
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
@@ -17,7 +17,7 @@ license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
 checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+python_version=2
 nocross="tries to execute target binaries"
 
 post_install() {

From 5ffdcfae309f9c2770056112a95c2e84633d6aa2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 24 Apr 2022 15:30:21 +0200
Subject: [PATCH 13/13] sumo: rebuild against libgdal and proj

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index f3cc1c4490ae..39c47a46b44c 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (48 preceding siblings ...)
  2022-10-25 16:25 ` [PR PATCH] [Updated] " ar-jan
@ 2022-10-25 16:55 ` ar-jan
  2022-10-25 17:19 ` ar-jan
                   ` (7 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-10-25 16:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

proj + libgdal: update and rebuild dependants
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
    **I use PostGIS regularly and this works for me.**
- [x] I generally don't use the affected packages but briefly tested this PR
    **I generally don't use the other packages which have to be rebuilt against proj and/or gdal, but I did test all of them briefly**.

#### Motivation

- These updates are in preparation for adding QGIS.

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 23166 bytes --]

From 2c1e43f0044d67d32b3cc4bfdaf1b68d01d5d576 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/11] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 17263fadc71a..c0409295396c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3060,7 +3060,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 0c207cbe4e5108d3bbd8c1d1395ba8f2c076ada6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 02/11] libgdal: update to 3.4.3 and rebuild against proj

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/template                      | 101 +++++++++++++++---
 srcpkgs/python3-gdal                          |   1 +
 5 files changed, 91 insertions(+), 97 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index c0409295396c..38c0bb3d174b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2502,7 +2502,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index ce58be57dc87..12f7800f2a28 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,96 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=12
+version=3.4.3
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=no
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=7244962628c82921b4a4903dbb721c7222b7d82ed5928fef55a52f87f68ad1fe
+subpackages="python3-gdal libgdal-devel libgdal-tools"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
 
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
+
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +112,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From 635fbf6bbf15edbdf2e51b1ff36441c14db58d8c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 03/11] postgis-postgresql13: update to 3.2.3; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index f17ace2f9fb4..b70e36d9a1a1 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.2.1
+version=3.2.3
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
+checksum=1b4d8b5c756e5aba59efbc1833b22efe4d6562778eeca56fa497feb2eb13668c
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From dcd06051822f6bd20a715e170549c8eb8d914bce Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 04/11] postgis-postgresql14: update to 3.2.3; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index a7540659ab5a..8ec071981262 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.2.1
-revision=2
+version=3.2.3
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
+checksum=1b4d8b5c756e5aba59efbc1833b22efe4d6562778eeca56fa497feb2eb13668c
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 5ab6c4dec4b9da7f40b2b145c3371b8579ddd1d3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 05/11] merkaartor: rebuild against libgdal and proj

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 8d832163b7b3498662777ab8cbd0213bf55e0df6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 06/11] OpenOrienteering-Mapper: rebuild against libgdal and
 proj

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From 7c084b02327f264e9ba1170cdc2e309eec65d01d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 07/11] osg: rebuild against libgdal, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From f6d04385b63252c54408e6c5516c271fc2c9f3c6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 08/11] vtk: rebuild against proj

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 943c4f911b62de6c2f2c2af206dfff2ba8e97b85 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 09/11] XyGrib: rebuild against proj; fix build

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From 776527337f7fa1936c63bbee191c48cdaae0b0a8 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Wed, 16 Feb 2022 20:51:16 +0100
Subject: [PATCH 10/11] grass: rebuild against libgdal and proj

---
 .../v.hull-bool-GDAL-compatibility.patch      | 84 +++++++++++++++++++
 srcpkgs/grass/template                        |  4 +-
 2 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch

diff --git a/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch b/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch
new file mode 100644
index 000000000000..c5e018aaaac2
--- /dev/null
+++ b/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch
@@ -0,0 +1,84 @@
+From b86314c7f3b8aea961d380dbb836087b3990d7af Mon Sep 17 00:00:00 2001
+From: nilason <n_larsson@yahoo.com>
+Date: Thu, 6 May 2021 22:27:48 +0200
+Subject: [PATCH] v.hull: use standard C boolean type
+
+Fixes #1563
+---
+ vector/v.hull/chull.c | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
+index 1ad97396fa..41b627c50f 100644
+--- a/vector/v.hull/chull.c
++++ b/vector/v.hull/chull.c
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
++#include <stdbool.h>
+ 
+ #include <grass/gis.h>
+ #include <grass/vector.h>
+@@ -29,10 +30,6 @@
+ 
+ #include "globals.h"
+ 
+-/*Define Boolean type */
+-typedef enum
+-{ BFALSE, BTRUE } bool;
+-
+ /* Define vertex indices. */
+ #define X   0
+ #define Y   1
+@@ -76,10 +73,10 @@ struct tFaceStructure
+ };
+ 
+ /* Define flags */
+-#define ONHULL   	BTRUE
+-#define REMOVED  	BTRUE
+-#define VISIBLE  	BTRUE
+-#define PROCESSED	BTRUE
++#define ONHULL   	true
++#define REMOVED  	true
++#define VISIBLE  	true
++#define PROCESSED	true
+ 
+ /* Global variable definitions */
+ tVertex vertices = NULL;
+@@ -436,7 +433,7 @@ bool AddOne(tVertex p)
+     tFace f;
+     tEdge e, temp;
+     long int vol;
+-    bool vis = BFALSE;
++    bool vis = false;
+ 
+ 
+     /* Mark faces visible from p. */
+@@ -446,7 +443,7 @@ bool AddOne(tVertex p)
+ 
+ 	if (vol < 0) {
+ 	    f->visible = VISIBLE;
+-	    vis = BTRUE;
++	    vis = true;
+ 	}
+ 	f = f->next;
+     } while (f != faces);
+@@ -454,7 +451,7 @@ bool AddOne(tVertex p)
+     /* If no faces are visible from p, then p is inside the hull. */
+     if (!vis) {
+ 	p->onhull = !ONHULL;
+-	return BFALSE;
++	return false;
+     }
+ 
+     /* Mark edges in interior of visible region for deletion.
+@@ -470,7 +467,7 @@ bool AddOne(tVertex p)
+ 	    e->newface = MakeConeFace(e, p);
+ 	e = temp;
+     } while (e != edges);
+-    return BTRUE;
++    return true;
+ }
+ 
+ /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..5863a61a300d 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,7 +1,7 @@
 # Template file for 'grass'
 pkgname=grass
 version=7.6.1
-revision=4
+revision=5
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
@@ -17,7 +17,7 @@ license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
 checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+python_version=2
 nocross="tries to execute target binaries"
 
 post_install() {

From 33839ba1ed228e6de9aa31cb06ff2617e7435c30 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 24 Apr 2022 15:30:21 +0200
Subject: [PATCH 11/11] sumo: rebuild against libgdal and proj

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index f3cc1c4490ae..39c47a46b44c 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Updated] proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (49 preceding siblings ...)
  2022-10-25 16:55 ` ar-jan
@ 2022-10-25 17:19 ` ar-jan
  2022-10-25 20:29 ` ar-jan
                   ` (6 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-10-25 17:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages gdal-proj
https://github.com/void-linux/void-packages/pull/31687

proj + libgdal: update and rebuild dependants
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
    **I use PostGIS regularly and this works for me.**
- [x] I generally don't use the affected packages but briefly tested this PR
    **I generally don't use the other packages which have to be rebuilt against proj and/or gdal, but I did test all of them briefly**.

#### Motivation

- These updates are in preparation for adding QGIS.

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31687.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdal-proj-31687.patch --]
[-- Type: text/x-diff, Size: 23944 bytes --]

From 2c1e43f0044d67d32b3cc4bfdaf1b68d01d5d576 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 13 Feb 2022 23:18:43 +0100
Subject: [PATCH 01/11] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 17263fadc71a..c0409295396c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3060,7 +3060,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..e3fbd43903c7 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,19 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel
+ sqlite-devel
+ tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +24,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 2c3048c072b4d3c209e8fab7e53f15a3e6f4e1e9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:07:51 +0100
Subject: [PATCH 02/11] libgdal: update to 3.4.3 and rebuild against proj

---
 common/shlibs                                 |   2 +-
 ...e16e27c5fc4c491debe50bf2b7f3e94ed334.patch |  53 ---------
 ...c4893e6d14d488dfed25745d79f11bee45b9.patch |  31 ------
 srcpkgs/libgdal/patches/missing-include.patch |  12 ---
 srcpkgs/libgdal/template                      | 101 +++++++++++++++---
 srcpkgs/python3-gdal                          |   1 +
 6 files changed, 91 insertions(+), 109 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
 delete mode 100644 srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
 delete mode 100644 srcpkgs/libgdal/patches/missing-include.patch
 create mode 120000 srcpkgs/python3-gdal

diff --git a/common/shlibs b/common/shlibs
index c0409295396c..38c0bb3d174b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2502,7 +2502,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.26 libgdal-3.0.4_9
+libgdal.so.30 libgdal-3.4.1_1
 libosgViewer.so.131 osg-3.4.1_1
 libosgShadow.so.131 osg-3.4.1_1
 libosgParticle.so.131 osg-3.4.1_1
diff --git a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch b/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
deleted file mode 100644
index 968edeb32c77..000000000000
--- a/srcpkgs/libgdal/patches/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 5 Oct 2020 12:11:52 +0200
-Subject: [PATCH] JPEG2000: make it build with Jasper 2.0.21 (fixes #3012)
-
----
- gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp | 16 +++++++++-------
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp  |  2 +-
- 2 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp b/gdal/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-index 10a4f96f0ee..ebcac4010ce 100644
---- a/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-+++ b/frmts/jpeg2000/jpeg2000_vsil_io.cpp
-@@ -94,13 +94,24 @@
- * File stream object.
- \******************************************************************************/
-
-+#if defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
-+#else
- static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
- }
-
-+#if defined(JAS_INCLUDE_JP2_CODEC)
-+// Jasper 2.0.21
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
-+#elif defined(PRIjas_seqent)
-+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
-+#else
- static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
-+#endif
- {
-     jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
-     return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp));
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index a5a6b258ed9..bd1e7763186 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
-         for ( iBand = 0; iBand < nBands; iBand++ )
-         {
-             JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
--            if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
-+            if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
-                 poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
-             {
-                 CPLError(CE_Failure, CPLE_AppDefined,
diff --git a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch b/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
deleted file mode 100644
index 643eac882f6f..000000000000
--- a/srcpkgs/libgdal/patches/ab72c4893e6d14d488dfed25745d79f11bee45b9.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ab72c4893e6d14d488dfed25745d79f11bee45b9 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 10 Aug 2020 17:26:53 +0200
-Subject: [PATCH] JPEG2000: fix build with Jasper 2.0.17 (fixes #2844)
-
----
- gdal/frmts/jpeg2000/jpeg2000dataset.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdal/frmts/jpeg2000/jpeg2000dataset.cpp b/gdal/frmts/jpeg2000/jpeg2000dataset.cpp
-index 3e668ffe503..2d3f4e46876 100644
---- a/frmts/jpeg2000/jpeg2000dataset.cpp
-+++ b/frmts/jpeg2000/jpeg2000dataset.cpp
-@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage()
-     /* the JP2 boxes match the ones of the code stream */
-     if (nBands != 0)
-     {
--        if (nBands != jas_image_numcmpts( psImage ))
-+        if (nBands != static_cast<int>(jas_image_numcmpts( psImage )))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined,
-                      "The number of components indicated in the IHDR box (%d) mismatch "
-@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poOpenInfo )
- 
- {
-     int         iFormat;
--    char        *pszFormatName = nullptr;
-+    const char *pszFormatName = nullptr;
- 
-     if (!Identify(poOpenInfo))
-         return nullptr;
diff --git a/srcpkgs/libgdal/patches/missing-include.patch b/srcpkgs/libgdal/patches/missing-include.patch
deleted file mode 100644
index 71d194406838..000000000000
--- a/srcpkgs/libgdal/patches/missing-include.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: gdal-3.0.4/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
-===================================================================
---- gdal-3.0.4.orig/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
-+++ gdal-3.0.4/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
-@@ -36,6 +36,7 @@
- #include <cassert>
- #include <cstring>
- #include <iostream>
-+#include <limits>
- #include <memory>
- #include <string>
- 
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index ce58be57dc87..12f7800f2a28 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,30 +1,96 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.0.4
-revision=12
+version=3.4.3
+revision=1
 wrksrc="gdal-${version}"
 build_style=gnu-configure
-configure_args="--with-liblzma --with-webp --with-zstd --with-podofo --with-opencl=yes"
-hostmakedepends="gettext-devel pkg-config python-numpy json-c-devel"
-makedepends="freexl-devel geos-devel jasper-devel json-c-devel
- libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel
- libwebp-devel libxml2-devel libzstd-devel netcdf-devel opencl2-headers pcre2-devel
- proj-devel sqlite-devel ocl-icd-devel"
+configure_args="
+ --with-expat=yes
+ --with-hdf5=yes
+ --with-kml=no
+ --with-liblzma=yes
+ --with-opencl=yes
+ --with-pg=yes
+ --with-podofo=yes
+ --with-python=yes
+ --with-spatialite=yes
+ --with-sqlite3=yes
+ --with-webp=yes
+ --with-zstd=yes"
+hostmakedepends="gettext-devel
+ json-c-devel
+ pkg-config
+ python3-numpy
+ swig"
+makedepends="boost-devel
+ expat-devel
+ freexl-devel
+ geos-devel
+ jasper-devel
+ json-c-devel
+ libcurl-devel
+ libopenexr-devel
+ libopenjpeg2-devel
+ libpodofo-devel
+ libqhull-devel
+ libwebp-devel
+ libxml2-devel
+ libzstd-devel
+ netcdf-devel
+ ocl-icd-devel
+ opencl2-headers
+ pcre2-devel
+ proj-devel
+ python3-devel
+ sqlite-devel
+ postgresql-libs-devel"
 short_desc="Geospatial Data Abstraction Library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="http://www.gdal.org/"
-distfiles="http://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=5569a4daa1abcbba47a9d535172fc335194d9214fdb96cd0f139bb57329ae277
-subpackages="libgdal-devel libgdal-tools"
+homepage="https://gdal.org/"
+distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
+checksum=7244962628c82921b4a4903dbb721c7222b7d82ed5928fef55a52f87f68ad1fe
+subpackages="python3-gdal libgdal-devel libgdal-tools"
 
 if [ -z "$CROSS_BUILD" ]; then
 	makedepends+=" hdf5-devel"
 fi
 
+CFLAGS="-pthread -I${XBPS_CROSS_BASE}/${py3_inc}"
+LDFLAGS="-L${XBPS_CROSS_BASE}/${py3_lib}"
+
+post_build() {
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	rm -f swig/python/*_wrap.cpp
+	make -C swig/python generate
+	cd swig/python
+	python3 setup.py build
+}
+
 post_install() {
 	vinstall gdal.pc 644 usr/lib/pkgconfig
 	vlicense LICENSE.TXT
+	if [ "$CROSS_BUILD" ]; then
+		export PYPREFIX="$XBPS_CROSS_BASE"
+		export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+	fi
+	export LDSHARED="${CC} $CFLAGS -shared $LDFLAGS"
+
+	cd swig/python
+	python3 setup.py install --prefix=/usr --root=$DESTDIR
 }
 
 libgdal-tools_package() {
@@ -46,3 +112,14 @@ libgdal-devel_package() {
 		vmove usr/lib/*.so
 	}
 }
+
+python3-gdal_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - Python3 bindings"
+	pkg_install() {
+		vmove "usr/bin/*.py"
+		vmove "usr/lib/python*"
+		vdoc swig/python/README.rst
+		vmkdir usr/share/python3-gdal
+	}
+}
diff --git a/srcpkgs/python3-gdal b/srcpkgs/python3-gdal
new file mode 120000
index 000000000000..377d50dfc2b8
--- /dev/null
+++ b/srcpkgs/python3-gdal
@@ -0,0 +1 @@
+libgdal
\ No newline at end of file

From e6930095295c7ab9031479576dd7ede6c776ceb3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:22:59 +0100
Subject: [PATCH 03/11] postgis-postgresql13: update to 3.2.3; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql13/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index f17ace2f9fb4..b70e36d9a1a1 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,6 +1,6 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
-version=3.2.1
+version=3.2.3
 revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
+checksum=1b4d8b5c756e5aba59efbc1833b22efe4d6562778eeca56fa497feb2eb13668c
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From fedca40ba0bcb0859cfdf2de5b51ad6a3e7dd7b3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 14 Feb 2022 13:26:59 +0100
Subject: [PATCH 04/11] postgis-postgresql14: update to 3.2.3; rebuild against
 libgdal and proj

libgdal-3.4.1
proj-7.2.1
---
 srcpkgs/postgis-postgresql14/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index a7540659ab5a..8ec071981262 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
-version=3.2.1
-revision=2
+version=3.2.3
+revision=1
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="
@@ -20,7 +20,7 @@ license="GPL-2.0-or-later"
 homepage="https://postgis.net/"
 changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
+checksum=1b4d8b5c756e5aba59efbc1833b22efe4d6562778eeca56fa497feb2eb13668c
 nocross="FIXME: Cannot run test program to determine PROJ version"
 
 pre_configure() {

From 090e28f4cf779f649e1d862558518bde1ef07213 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 27 Jun 2021 22:18:46 +0200
Subject: [PATCH 05/11] merkaartor: rebuild against libgdal and proj

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index cffcfba1cf01..6603376111f2 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From f2067e9f0f623fc39aa68dd35a8ca6485dc24777 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:21:27 +0200
Subject: [PATCH 06/11] OpenOrienteering-Mapper: rebuild against libgdal and
 proj

---
 srcpkgs/OpenOrienteering-Mapper/template | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fd29a08e75b6..6a652a6a7b97 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=1
+revision=2
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
@@ -18,3 +19,9 @@ checksum=619152ca01a370875c15e1930918ce961284ccbf5d2371c147d50caf5e5c2f00
 
 build_options="location sensors"
 build_options_default="location sensors"
+
+do_check() {
+    # sensors_t test fails on test runner
+	cd build
+	ctest -E 'sensors_t'
+}

From 5f3c2642b0c24cc9653c526a59baf3528f8a7e1e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 00:38:35 +0200
Subject: [PATCH 07/11] osg: rebuild against libgdal, fix license

---
 srcpkgs/osg/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 08bf6d4b6591..f51535c5719d 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=12
+revision=13
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"
@@ -19,7 +19,7 @@ makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-dev
 depends="xrandr"
 short_desc="OpenSceneGraph: high performance real-time graphics toolkit"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="OSGPL-2.0-or-later"
+license="custom:OpenSceneGraph-Public-License-0.0"
 homepage="http://www.openscenegraph.org"
 distfiles="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-${version}.tar.gz"
 checksum=930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5

From 9b645326de4129a31f7a4b92208fa4a186897fc9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 18:43:05 +0200
Subject: [PATCH 08/11] vtk: rebuild against proj

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 858aa31b9c03..553cf9198465 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=7
+revision=8
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

From 6636e17c0e15a487d341a7f393813e06f29328bd Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 29 Jun 2021 19:26:57 +0200
Subject: [PATCH 09/11] XyGrib: rebuild against proj; fix build

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..995ec3eeeabb 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,8 +1,9 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From b4bff4d6c956b18f3c8ab35ac36a229654366c30 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Wed, 16 Feb 2022 20:51:16 +0100
Subject: [PATCH 10/11] grass: rebuild against libgdal and proj

---
 .../v.hull-bool-GDAL-compatibility.patch      | 84 +++++++++++++++++++
 srcpkgs/grass/template                        |  4 +-
 2 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch

diff --git a/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch b/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch
new file mode 100644
index 000000000000..c5e018aaaac2
--- /dev/null
+++ b/srcpkgs/grass/patches/v.hull-bool-GDAL-compatibility.patch
@@ -0,0 +1,84 @@
+From b86314c7f3b8aea961d380dbb836087b3990d7af Mon Sep 17 00:00:00 2001
+From: nilason <n_larsson@yahoo.com>
+Date: Thu, 6 May 2021 22:27:48 +0200
+Subject: [PATCH] v.hull: use standard C boolean type
+
+Fixes #1563
+---
+ vector/v.hull/chull.c | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
+index 1ad97396fa..41b627c50f 100644
+--- a/vector/v.hull/chull.c
++++ b/vector/v.hull/chull.c
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
++#include <stdbool.h>
+ 
+ #include <grass/gis.h>
+ #include <grass/vector.h>
+@@ -29,10 +30,6 @@
+ 
+ #include "globals.h"
+ 
+-/*Define Boolean type */
+-typedef enum
+-{ BFALSE, BTRUE } bool;
+-
+ /* Define vertex indices. */
+ #define X   0
+ #define Y   1
+@@ -76,10 +73,10 @@ struct tFaceStructure
+ };
+ 
+ /* Define flags */
+-#define ONHULL   	BTRUE
+-#define REMOVED  	BTRUE
+-#define VISIBLE  	BTRUE
+-#define PROCESSED	BTRUE
++#define ONHULL   	true
++#define REMOVED  	true
++#define VISIBLE  	true
++#define PROCESSED	true
+ 
+ /* Global variable definitions */
+ tVertex vertices = NULL;
+@@ -436,7 +433,7 @@ bool AddOne(tVertex p)
+     tFace f;
+     tEdge e, temp;
+     long int vol;
+-    bool vis = BFALSE;
++    bool vis = false;
+ 
+ 
+     /* Mark faces visible from p. */
+@@ -446,7 +443,7 @@ bool AddOne(tVertex p)
+ 
+ 	if (vol < 0) {
+ 	    f->visible = VISIBLE;
+-	    vis = BTRUE;
++	    vis = true;
+ 	}
+ 	f = f->next;
+     } while (f != faces);
+@@ -454,7 +451,7 @@ bool AddOne(tVertex p)
+     /* If no faces are visible from p, then p is inside the hull. */
+     if (!vis) {
+ 	p->onhull = !ONHULL;
+-	return BFALSE;
++	return false;
+     }
+ 
+     /* Mark edges in interior of visible region for deletion.
+@@ -470,7 +467,7 @@ bool AddOne(tVertex p)
+ 	    e->newface = MakeConeFace(e, p);
+ 	e = temp;
+     } while (e != edges);
+-    return BTRUE;
++    return true;
+ }
+ 
+ /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index bccd691a8116..5863a61a300d 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,7 +1,7 @@
 # Template file for 'grass'
 pkgname=grass
 version=7.6.1
-revision=4
+revision=5
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
@@ -17,7 +17,7 @@ license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
 checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2 #unverified
+python_version=2
 nocross="tries to execute target binaries"
 
 post_install() {

From 2404a397f26bf3bc9b746e1aa68248cd73e0df5d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 24 Apr 2022 15:30:21 +0200
Subject: [PATCH 11/11] sumo: rebuild against libgdal and proj

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index f3cc1c4490ae..39c47a46b44c 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (50 preceding siblings ...)
  2022-10-25 17:19 ` ar-jan
@ 2022-10-25 20:29 ` ar-jan
  2022-10-27  1:38 ` [PR REVIEW] " sgn
                   ` (5 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-10-25 20:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1291100361

Comment:
I updated the branch. @Chocimier or @sgn want to take a look at libgdal cross compilation?

(The other builds are failing because postgis-postgresql12 install is attempted).

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR REVIEW] proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (51 preceding siblings ...)
  2022-10-25 20:29 ` ar-jan
@ 2022-10-27  1:38 ` sgn
  2022-10-27  1:38 ` sgn
                   ` (4 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: sgn @ 2022-10-27  1:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#discussion_r1006324357

Comment:
You can use `build_helper=python3` (or python?) and remove this block

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR REVIEW] proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (52 preceding siblings ...)
  2022-10-27  1:38 ` [PR REVIEW] " sgn
@ 2022-10-27  1:38 ` sgn
  2022-10-29 19:35 ` ar-jan
                   ` (3 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: sgn @ 2022-10-27  1:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 181 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#discussion_r1006324382

Comment:
Please not split the lines like this.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (53 preceding siblings ...)
  2022-10-27  1:38 ` sgn
@ 2022-10-29 19:35 ` ar-jan
  2022-11-05  7:44 ` classabbyamp
                   ` (2 subsequent siblings)
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-10-29 19:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 5548 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1295948805

Comment:
I've updated the libgdal template like so (not pushing to avoid needless 4 hour CI build):

<details>
  <summary>Updated libgdal-3.4.3 template</summary>

```
# Template file for 'libgdal'
pkgname=libgdal
version=3.4.3
revision=1
wrksrc="gdal-${version}"
build_style=gnu-configure
build_helper="python3 numpy"
configure_args="--with-expat=yes --with-hdf5=yes --with-kml=no
 --with-liblzma=yes --with-opencl=yes --with-pg=yes --with-podofo=yes
 --with-python=yes --with-spatialite=yes --with-sqlite3=yes --with-webp=yes
 --with-zstd=yes"
hostmakedepends="gettext-devel json-c-devel pkg-config python3-numpy swig"
makedepends="boost-devel expat-devel freexl-devel geos-devel jasper-devel
 json-c-devel libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel
 libqhull-devel libwebp-devel libxml2-devel libzstd-devel netcdf-devel
 ocl-icd-devel opencl2-headers pcre2-devel proj-devel python3-devel
 sqlite-devel postgresql-libs-devel"
short_desc="Geospatial Data Abstraction Library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://gdal.org/"
distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz"
checksum=7244962628c82921b4a4903dbb721c7222b7d82ed5928fef55a52f87f68ad1fe
subpackages="python3-gdal libgdal-devel libgdal-tools"

if [ -z "$CROSS_BUILD" ]; then
	makedepends+=" hdf5-devel"
fi

post_install() {
	vinstall gdal.pc 644 usr/lib/pkgconfig
	vlicense LICENSE.TXT
}

libgdal-tools_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - tools"
	pkg_install() {
		vmove usr/bin
	}
}

libgdal-devel_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/bin/gdal-config
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove usr/lib/*.a
		vmove usr/lib/*.so
	}
}

python3-gdal_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - Python3 bindings"
	pkg_install() {
		vmove "usr/bin/*.py"
		vmove "usr/lib/python*"
		vdoc swig/python/README.rst
		vmkdir usr/share/python3-gdal
	}
}
```
</details>

But it looks like starting with `swig/python/setup.py` the crossbase is no longer used correctly:

> make[1]: Entering directory '/builddir/gdal-3.4.3/swig'
> for dir in python ; do (cd $dir; make build) || exit; done
> make[2]: Entering directory '/builddir/gdal-3.4.3/swig/python'
> ...
> python setup.py build
> WARNING: "CXX=/bin/sh /builddir/gdal-3.4.3/libtool --mode=compile --silent --tag=CXX armv7l-linux-gnueabihf-c++" was defined in the environment and contains more than one word. Unsetting it since that is incompatible of distutils
> WARNING: "CC=/bin/sh /builddir/gdal-3.4.3/libtool --mode=compile --silent --tag=CC armv7l-linux-gnueabihf-gcc -pthread -O2 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard   -I/usr/armv7l-linux-gnueabihf/usr/include/python3.10 -I/usr/armv7l-linux-gnueabihf/usr/include    -L/usr/armv7l-linux-gnueabihf/usr/lib/python3.10 -L/usr/armv7l-linux-gnueabihf/usr/lib" was defined in the environment and contains more than one word. Unsetting it since that is incompatible of distutils
> running build
> running build_py
> creating build
> creating build/lib.linux-x86_64-cpython-310
> ...
> creating build/temp.linux-x86_64-cpython-310/extensions
> ...
> gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -g -I/usr/armv7l-linux-gnueabihf/usr/include -fdebug-prefix-map=/builddir/Python-3.10.8=. -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -g -I/usr/armv7l-linux-gnueabihf/usr/include -fdebug-prefix-map=/builddir/Python-3.10.8=. -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -I/usr/armv7l-linux-gnueabihf/usr/include/python3.10 -I/usr/armv7l-linux-gnueabihf/usr/include -I/usr/armv7l-linux-gnueabihf/usr/lib/python3.10/site-packages/numpy/core/include -I/usr/armv7l-linux-gnueabihf/usr/include -fdebug-prefix-map=/builddir/gdal-3.4.3=. -Wall -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Wmissing-include-dirs -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -DGNM_ENABLED -iquote /builddir/gdal-3.4.3/port -I/usr/armv7l-linux-gnueabihf/usr/include/openjpeg-2.5 -DGDAL_COMPILATION -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.10 -I/usr/lib/python3.10/site-packages/numpy/core/include -I/builddir/gdal-3.4.3/include -c extensions/ogr_wrap.cpp -o build/temp.linux-x86_64-cpython-310/extensions/ogr_wrap.o -I/builddir/gdal-3.4.3/port -I/builddir/gdal-3.4.3/gcore -I/builddir/gdal-3.4.3/alg -I/builddir/gdal-3.4.3/gnm -I/builddir/gdal-3.4.3/ogr -I/builddir/gdal-3.4.3/ogr/ogrsf_frmts -I/builddir/gdal-3.4.3/frmts/vrt -I/builddir/gdal-3.4.3/apps
> gcc: error: unrecognized command-line option '-mfpu=vfpv3'
> gcc: error: unrecognized command-line option '-mfloat-abi=hard'

I think this is because `CC` and `CXX` are unset? https://github.com/OSGeo/gdal/blob/v3.4.3/gdal/swig/python/setup.py#L22-L42. 

Is that right? How to fix?

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (54 preceding siblings ...)
  2022-10-29 19:35 ` ar-jan
@ 2022-11-05  7:44 ` classabbyamp
  2022-11-05 13:01 ` [PR PATCH] [Closed]: " ar-jan
  2022-11-05 13:47 ` ar-jan
  57 siblings, 0 replies; 59+ messages in thread
From: classabbyamp @ 2022-11-05  7:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1304433757

Comment:
libgdal was updated in #40225, can you rebase for the proj update?

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [PR PATCH] [Closed]: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (55 preceding siblings ...)
  2022-11-05  7:44 ` classabbyamp
@ 2022-11-05 13:01 ` ar-jan
  2022-11-05 13:47 ` ar-jan
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-11-05 13:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1723 bytes --]

There's a closed pull request on the void-packages repository

proj + libgdal: update and rebuild dependants
https://github.com/void-linux/void-packages/pull/31687

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
    **I use PostGIS regularly and this works for me.**
- [x] I generally don't use the affected packages but briefly tested this PR
    **I generally don't use the other packages which have to be rebuilt against proj and/or gdal, but I did test all of them briefly**.

#### Motivation

- These updates are in preparation for adding QGIS.

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: proj + libgdal: update and rebuild dependants
  2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
                   ` (56 preceding siblings ...)
  2022-11-05 13:01 ` [PR PATCH] [Closed]: " ar-jan
@ 2022-11-05 13:47 ` ar-jan
  57 siblings, 0 replies; 59+ messages in thread
From: ar-jan @ 2022-11-05 13:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/31687#issuecomment-1304549837

Comment:
(easier to make a new branch)

^ permalink raw reply	[flat|nested] 59+ messages in thread

end of thread, other threads:[~2022-11-05 13:47 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-27 21:17 [PR PATCH] [WiP] Update libgdal and proj and rebuild against them ar-jan
2021-06-27 21:20 ` [PR PATCH] [Updated] " ar-jan
2021-06-28 18:20 ` ar-jan
2021-06-28 18:42 ` [PR REVIEW] " Johnnynator
2021-06-28 18:42 ` Johnnynator
2021-06-28 18:42 ` Johnnynator
2021-06-28 18:42 ` Johnnynator
2021-06-28 18:42 ` Johnnynator
2021-06-28 18:42 ` Johnnynator
2021-06-28 18:42 ` Johnnynator
2021-06-28 18:42 ` Johnnynator
2021-06-28 19:28 ` Chocimier
2021-06-29 21:11 ` [PR PATCH] [Updated] " ar-jan
2021-06-29 21:59 ` ar-jan
2021-06-30 16:50 ` sgn
2021-06-30 17:36 ` ar-jan
2021-06-30 17:37 ` Johnnynator
2021-06-30 18:56 ` [PR PATCH] [Updated] " ar-jan
2021-07-01 15:54 ` ar-jan
2021-07-02 10:05 ` ar-jan
2021-07-02 17:10 ` ar-jan
2021-07-05 13:19 ` ar-jan
2021-07-05 15:28 ` ar-jan
2021-08-09 18:49 ` [PR PATCH] [Updated] " ar-jan
2021-08-12  1:54 ` ericonr
2021-08-12  8:57 ` ar-jan
2021-08-12  8:59 ` ar-jan
2021-08-12 11:29 ` ericonr
2021-08-16 19:04 ` ar-jan
2022-02-15  0:26 ` [PR PATCH] [Updated] " ar-jan
2022-02-15  0:30 ` ar-jan
2022-02-15  0:35 ` ar-jan
2022-02-15  0:58 ` ar-jan
2022-02-15 21:57 ` [PR PATCH] [Updated] " ar-jan
2022-02-15 22:02 ` ar-jan
2022-02-15 22:13 ` ar-jan
2022-02-15 22:21 ` ar-jan
2022-02-15 22:50 ` ar-jan
2022-02-16 19:58 ` ar-jan
2022-02-16 20:02 ` ar-jan
2022-02-16 20:03 ` ar-jan
2022-02-17 11:45 ` proj + libgdal: update and rebuild dependants ar-jan
2022-02-17 11:45 ` ar-jan
2022-04-22 20:02 ` Chocimier
2022-04-24 17:45 ` [PR PATCH] [Updated] " ar-jan
2022-04-25 16:38 ` ar-jan
2022-07-25  2:14 ` github-actions
2022-08-02 18:00 ` Chocimier
2022-08-06  9:50 ` ar-jan
2022-10-25 16:25 ` [PR PATCH] [Updated] " ar-jan
2022-10-25 16:55 ` ar-jan
2022-10-25 17:19 ` ar-jan
2022-10-25 20:29 ` ar-jan
2022-10-27  1:38 ` [PR REVIEW] " sgn
2022-10-27  1:38 ` sgn
2022-10-29 19:35 ` ar-jan
2022-11-05  7:44 ` classabbyamp
2022-11-05 13:01 ` [PR PATCH] [Closed]: " ar-jan
2022-11-05 13:47 ` ar-jan

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).