[arch-commits] Commit in xcur2png/repos/community-x86_64 (3 files)

Christian Hesse eworm at archlinux.org
Mon Jun 1 20:38:22 UTC 2020


    Date: Monday, June 1, 2020 @ 20:38:21
  Author: eworm
Revision: 637907

archrelease: copy trunk to community-x86_64

Added:
  xcur2png/repos/community-x86_64/0001-fix-wrong-math.patch
    (from rev 637906, xcur2png/trunk/0001-fix-wrong-math.patch)
  xcur2png/repos/community-x86_64/PKGBUILD
    (from rev 637906, xcur2png/trunk/PKGBUILD)
Deleted:
  xcur2png/repos/community-x86_64/PKGBUILD

---------------------------+
 0001-fix-wrong-math.patch |   27 +++++++++++++++++++
 PKGBUILD                  |   61 +++++++++++++++++++++++++-------------------
 2 files changed, 63 insertions(+), 25 deletions(-)

Copied: xcur2png/repos/community-x86_64/0001-fix-wrong-math.patch (from rev 637906, xcur2png/trunk/0001-fix-wrong-math.patch)
===================================================================
--- 0001-fix-wrong-math.patch	                        (rev 0)
+++ 0001-fix-wrong-math.patch	2020-06-01 20:38:21 UTC (rev 637907)
@@ -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;
+   }
+ 

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-06-01 20:38:14 UTC (rev 637906)
+++ PKGBUILD	2020-06-01 20:38:21 UTC (rev 637907)
@@ -1,25 +0,0 @@
-# Maintainer: Christian Hesse <mail at eworm.de>
-# Contributor: Jarred Leonardo <jarredleonardo at googlemail dot com>
-
-pkgname=xcur2png
-pkgver=0.7.1
-pkgrel=6
-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')
-
-build() {
-	cd ${srcdir}/${pkgname}-${pkgver}
-	./configure --prefix=/usr
-	make
-}
-
-package() {
-	cd ${srcdir}/${pkgname}-${pkgver}
-	make DESTDIR=${pkgdir} install
-}
-

Copied: xcur2png/repos/community-x86_64/PKGBUILD (from rev 637906, xcur2png/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-06-01 20:38:21 UTC (rev 637907)
@@ -0,0 +1,36 @@
+# Maintainer: Christian Hesse <mail at eworm.de>
+# Contributor: Jarred Leonardo <jarredleonardo at googlemail dot com>
+
+pkgname=xcur2png
+pkgver=0.7.1
+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"
+        '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}"
+
+  ./configure \
+    --prefix=/usr
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make DESTDIR="${pkgdir}" install
+}
+



More information about the arch-commits mailing list