[arch-commits] Commit in xcur2png/trunk (0001-fix-wrong-math.patch PKGBUILD)
Christian Hesse
eworm at archlinux.org
Mon Jun 1 20:38:16 UTC 2020
Date: Monday, June 1, 2020 @ 20:38:14
Author: eworm
Revision: 637906
upgpkg: xcur2png 0.7.1-7
Added:
xcur2png/trunk/0001-fix-wrong-math.patch
Modified:
xcur2png/trunk/PKGBUILD
---------------------------+
0001-fix-wrong-math.patch | 27 +++++++++++++++++++++++++++
PKGBUILD | 14 +++++++++++---
2 files changed, 38 insertions(+), 3 deletions(-)
Added: 0001-fix-wrong-math.patch
===================================================================
--- 0001-fix-wrong-math.patch (rev 0)
+++ 0001-fix-wrong-math.patch 2020-06-01 20:38:14 UTC (rev 637906)
@@ -0,0 +1,27 @@
+From cda8f7af382f5c5f1e9a395eb03e2b819770d499 Mon Sep 17 00:00:00 2001
+From: Yuji Saeki <44311901+YujiSaeki at users.noreply.github.com>
+Date: Mon, 1 Jun 2020 22:32:16 +0200
+Subject: [PATCH 1/1] fix wrong math
+
+Signed-off-by: Christian Hesse <mail at eworm.de>
+---
+ xcur2png.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/xcur2png.c b/xcur2png.c
+index 8723a10..f7dd95d 100644
+--- a/xcur2png.c
++++ b/xcur2png.c
+@@ -586,9 +586,9 @@ int writePngFileFromXcur (const XcursorDim width, const XcursorDim height,
+ unsigned int red = (pixels[i]>>16) & 0xff;
+ unsigned int green = (pixels[i]>>8) & 0xff;
+ unsigned int blue = pixels[i] & 0xff;
+- red = (div (red * 256, alpha).quot) & 0xff;
+- green = (div (green * 256, alpha).quot) & 0xff;
+- blue = (div (blue * 256, alpha).quot) & 0xff;
++ red = (div (red * 255, alpha).quot) & 0xff;
++ green = (div (green * 255, alpha).quot) & 0xff;
++ blue = (div (blue * 255, alpha).quot) & 0xff;
+ pix[i] = (alpha << 24) + (red << 16) + (green << 8) + blue;
+ }
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-06-01 19:20:26 UTC (rev 637905)
+++ PKGBUILD 2020-06-01 20:38:14 UTC (rev 637906)
@@ -3,15 +3,23 @@
pkgname=xcur2png
pkgver=0.7.1
-pkgrel=6
+pkgrel=7
pkgdesc='Convert X cursors to PNG images'
arch=('x86_64')
url='https://github.com/eworm-de/xcur2png'
license=('GPL')
depends=('libpng' 'libxcursor')
-source=("https://github.com/eworm-de/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('bc6a062fdb48615a7159ed56ef3d2011168cd8a9decaf1d8a4e316d3064132c9')
+source=("https://github.com/eworm-de/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ '0001-fix-wrong-math.patch')
+sha256sums=('bc6a062fdb48615a7159ed56ef3d2011168cd8a9decaf1d8a4e316d3064132c9'
+ '224cf894c53eeb647a696ff311054cecf1a3dfeb10f49d96293c8bfeba4b88e9')
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -Np1 < ../0001-fix-wrong-math.patch
+}
+
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
More information about the arch-commits
mailing list