summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Schantl2023-05-10 16:54:47 +0000
committerMichael Schantl2023-05-10 16:54:47 +0000
commite043e95507fc89175d96c045efc3602252768486 (patch)
treea4f8e9dd7ad49d7d532d76a64afdae3b9b7d3873
parent6e5cf3e31f3ecd5fc70830f56d0dc8e744389bd1 (diff)
downloadaur-e043e95507fc89175d96c045efc3602252768486.tar.gz
Add patch for breaking change in Pillow
Applies commit 48f6053 from upstream repository.
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD13
-rw-r--r--pillow-rect.patch31
3 files changed, 42 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 0bd81df278df..d52a539b7d64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@
!weewx.service
!weewxd
!wunderfixer
+!pillow-rect.patch
diff --git a/PKGBUILD b/PKGBUILD
index 64cc0423d450..13f8f44e6ba9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,7 +13,7 @@ function _dl_url {
echo "https://github.com/weewx/weewx/archive/refs/tags/v$1.$2.$3.tar.gz"
}
-pkgrel=2
+pkgrel=3
pkgdesc="Software for logging data from weather stations"
arch=("any")
url="http://www.weewx.com/"
@@ -40,7 +40,8 @@ source=("$pkgname-$pkgver.tar.xz::$(_dl_url $_MAJOR $_MINOR $_PATCH)"
"wee_reports"
"weewxd"
"wunderfixer"
- "weewx.service")
+ "weewx.service"
+ "pillow-rect.patch")
sha512sums=('8fca9cd7720a29687a0d900e4d89ec2ce5ca5d2aa36bc5b5909ea14ecb849cdbdb6e699cf1c3a0d5505c89ad8c309517db32fd8dc4a0ae4704dfd5ed0cc5747f'
'SKIP'
'SKIP'
@@ -51,9 +52,15 @@ sha512sums=('8fca9cd7720a29687a0d900e4d89ec2ce5ca5d2aa36bc5b5909ea14ecb849cdbdb6
'SKIP'
'SKIP'
'SKIP'
- 'SKIP')
+ 'SKIP'
+ 'SKIP')
_watch="http://www.weewx.com/downloads/"
+prepare() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ patch --strip=1 --input="$srcdir/pillow-rect.patch"
+}
+
build() {
cd "$srcdir/${pkgname}-${pkgver}"
python setup.py build
diff --git a/pillow-rect.patch b/pillow-rect.patch
new file mode 100644
index 000000000000..5d2aa04ec641
--- /dev/null
+++ b/pillow-rect.patch
@@ -0,0 +1,31 @@
+diff --git a/bin/weeplot/utilities.py b/bin/weeplot/utilities.py
+index 73e955bd..f1c9d33a 100644
+--- a/bin/weeplot/utilities.py
++++ b/bin/weeplot/utilities.py
+@@ -431,14 +431,20 @@ class ScaledDraw(object):
+
+ def rectangle(self, box, **options):
+ """Draw a scaled rectangle.
+-
+- box: A pair of 2-way tuples, containing coordinates of opposing corners
+- of the box.
+-
++
++ box: A pair of 2-way tuples for the lower-left, then upper-right corners of
++ the box [(llx, lly), (urx, ury)]
++
+ options: passed on to draw.rectangle. Usually contains 'fill' (the color)
+ """
+- box_scaled = [(coord[0] * self.xscale + self.xoffset + 0.5,
+- coord[1] * self.yscale + self.yoffset + 0.5) for coord in box]
++ # Unpack the box
++ (llsx, llsy), (ursx, ursy) = box
++
++ ulix = int(llsx * self.xscale + self.xoffset + 0.5)
++ uliy = int(ursy * self.yscale + self.yoffset + 0.5)
++ lrix = int(ursx * self.xscale + self.xoffset + 0.5)
++ lriy = int(llsy * self.yscale + self.yoffset + 0.5)
++ box_scaled = ((ulix, uliy), (lrix, lriy))
+ self.draw.rectangle(box_scaled, **options)
+
+ def vector(self, x, vec, vector_rotate, **options):