[arch-commits] Commit in lcms2/repos (3 files)
Christian Hesse
eworm at gemini.archlinux.org
Tue Feb 1 12:53:54 UTC 2022
Date: Tuesday, February 1, 2022 @ 12:53:51
Author: eworm
Revision: 435667
archrelease: copy trunk to testing-x86_64
Added:
lcms2/repos/testing-x86_64/
lcms2/repos/testing-x86_64/0001-fix-for-optimisation-error-on-grayscale.patch
(from rev 435666, lcms2/trunk/0001-fix-for-optimisation-error-on-grayscale.patch)
lcms2/repos/testing-x86_64/PKGBUILD
(from rev 435666, lcms2/trunk/PKGBUILD)
----------------------------------------------------+
0001-fix-for-optimisation-error-on-grayscale.patch | 41 ++++++++++++++++++
PKGBUILD | 42 +++++++++++++++++++
2 files changed, 83 insertions(+)
Copied: lcms2/repos/testing-x86_64/0001-fix-for-optimisation-error-on-grayscale.patch (from rev 435666, lcms2/trunk/0001-fix-for-optimisation-error-on-grayscale.patch)
===================================================================
--- testing-x86_64/0001-fix-for-optimisation-error-on-grayscale.patch (rev 0)
+++ testing-x86_64/0001-fix-for-optimisation-error-on-grayscale.patch 2022-02-01 12:53:51 UTC (rev 435667)
@@ -0,0 +1,41 @@
+From fdbfb7694f9d7048d53674b79ddfc38068bfdaf7 Mon Sep 17 00:00:00 2001
+From: Marti Maria <marti.maria at littlecms.com>
+Date: Sun, 30 Jan 2022 16:56:48 +0100
+Subject: Fix for optimisation error on grayscale
+
+Thanks to Aaron Boxer for reporting this issue
+---
+ src/cmsintrp.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/cmsintrp.c b/src/cmsintrp.c
+index 5cd6d16..5eb98e6 100644
+--- a/src/cmsintrp.c
++++ b/src/cmsintrp.c
+@@ -278,10 +278,10 @@ void Eval1Input(CMSREGISTER const cmsUInt16Number Input[],
+ // if last value...
+ if (Input[0] == 0xffff || p16->Domain[0] == 0) {
+
+- cmsUInt16Number y0 = LutTable[p16->Domain[0]];
+-
++ cmsUInt32Number y0 = p16->Domain[0] * p16->opta[0];
++
+ for (OutChan = 0; OutChan < p16->nOutputs; OutChan++) {
+- Output[OutChan] = y0;
++ Output[OutChan] = LutTable[y0 + OutChan];
+ }
+ }
+ else
+@@ -324,10 +324,10 @@ void Eval1InputFloat(const cmsFloat32Number Value[],
+ // if last value...
+ if (val2 == 1.0 || p->Domain[0] == 0) {
+
+- y0 = LutTable[p->Domain[0]];
++ cmsUInt32Number start = p->Domain[0] * p->opta[0];
+
+ for (OutChan = 0; OutChan < p->nOutputs; OutChan++) {
+- Output[OutChan] = y0;
++ Output[OutChan] = LutTable[start + OutChan];
+ }
+ }
+ else
Copied: lcms2/repos/testing-x86_64/PKGBUILD (from rev 435666, lcms2/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2022-02-01 12:53:51 UTC (rev 435667)
@@ -0,0 +1,42 @@
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=lcms2
+pkgver=2.13
+pkgrel=2
+pkgdesc='Small-footprint color management engine, version 2'
+arch=('x86_64')
+url='http://www.littlecms.com/'
+license=('MIT')
+depends=('libtiff')
+provides=('liblcms2.so')
+source=("https://github.com/mm2/Little-CMS/releases/download/lcms${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ '0001-fix-for-optimisation-error-on-grayscale.patch')
+sha256sums=('0c67a5cc144029cfa34647a52809ec399aae488db4258a6a66fba318474a070f'
+ 'efb68be0ad7bec92fb60d477ec1ba143feeba198e6e78fa0fc52d44bb4c2f9b4')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+
+ patch -Np1 < ../0001-fix-for-optimisation-error-on-grayscale.patch
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr
+ make
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+
+ make check
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+ install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
More information about the arch-commits
mailing list