GNU bug report logs - #55541
[PATCH] gnu: Add azpainter.

Previous Next

Package: guix-patches;

Reported by: Tobias Kortkamp <tobias.kortkamp <at> gmail.com>

Date: Fri, 20 May 2022 14:17:01 UTC

Severity: normal

Tags: patch

Done: zimoun <zimon.toutoune <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Tobias Kortkamp <tobias.kortkamp <at> gmail.com>
Subject: bug#55541: closed (Re: bug#55541: [PATCH] gnu: Add azpainter.)
Date: Fri, 24 Jun 2022 20:57:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#55541: [PATCH] gnu: Add azpainter.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 55541 <at> debbugs.gnu.org.

-- 
55541: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55541
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Tobias Kortkamp <tobias.kortkamp <at> gmail.com>
Cc: 55541-done <at> debbugs.gnu.org
Subject: Re: bug#55541: [PATCH] gnu: Add azpainter.
Date: Fri, 24 Jun 2022 22:56:06 +0200
Hi Tobias,

Tobias Kortkamp <tobias.kortkamp <at> gmail.com> skribis:

> * gnu/packages/graphics.scm (azpainter): New variable.

Applied, thanks!

Maxime Devos <maximedevos <at> telenet.be> skribis:

> As-is, this home-grown build system is broken when cross-compiling:
>
>   * When cross-compiling, TARGET-gcc needs to be used instead of gcc.
>     Maybe do (setenv "CC" #$(cc-for-target)) first?
>
>   * Likewise, TARGET-pkg-config instead of pkg-config (not 100% sure)
>
>   * It tries to run binaries during ./configure.  When cross-compiling,
>     ./conftest will always fail (unless using emulation) and hence
>     always detect ‘little endian’ but this is incorrect when
>     cross-compiling for big-endian architectures.
>
> (Needs some fixes or work-arounds.)  You can test with "guix build
> azpainter --target=aarch64-linux-gnu" or such.
>
> Also, some other problems.  From mlk_studio.c
>
> int mFILEreadBE32(FILE *fp,void *buf)
> {
> 	uint8_t v[4];
>
> 	if(fread(v, 1, 4, fp) < 4)
> 		return 1;
> 	else
> 	{
> 		*((uint32_t *)buf) = ((uint32_t)v[0] << 24) | (v[1] <<
> 16) | (v[2] << 8) | v[3];
> 		return 0;
> 	}
> }
>
> looks like a potential strict-aliasing violation to me, resulting in
> undefined behaviour -- what if buf is a pointer to an array of, say,
> doubles?  Also a potential alignment problem, though maybe it's only
> called for sufficiently aligned 'buf'.  The strict-aliasing problem
> can be worked around with -fno-strict-aliasing or maybe just -fno-ipa-
> strict-aliasing , though I don't know if that's sufficient.

These are all good points and I appreciate that you did such a thorough
review (audit?) of the package!

That said, I think it’s a bit too much to ask of a downstream packager
or user to address these issues.  As I see it, these issues should be
reported upstream and addressed upstream.

I hope that makes sense!

Thanks,
Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Tobias Kortkamp <tobias.kortkamp <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Tobias Kortkamp <tobias.kortkamp <at> gmail.com>
Subject: [PATCH] gnu: Add azpainter.
Date: Fri, 20 May 2022 13:18:39 +0200
* gnu/packages/graphics.scm (azpainter): New variable.
---
 gnu/packages/graphics.scm | 66 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index e966a82dbb..1457cf83fb 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -30,6 +30,7 @@
 ;;; Copyright © 2022 Michael Rohleder <mike <at> rohleder.de>
 ;;; Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com>
 ;;; Copyright © 2022 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2124,3 +2125,68 @@ (define-public monado
 such as VR and AR on mobile, PC/desktop, and any other device.  Monado aims to be
 a complete and conforming implementation of the OpenXR API made by Khronos.")
     (license license:boost1.0)))
+
+(define-public azpainter
+  (package
+    (name "azpainter")
+    (version "3.0.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/azelpg/azpainter")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1iplp3p8pw9q44kb43hrk89sv2aff6bdy9fk58j2v6k5lqbk6kvf"))))
+    (build-system gnu-build-system) ;actually a home grown build system
+    (arguments
+     (list #:tests? #f
+           #:phases
+           #~(modify-phases %standard-phases
+               (replace 'configure
+                 (lambda _
+                   (invoke "./configure"
+                           (string-append "--prefix="
+                                          #$output))))
+               (replace 'build
+                 (lambda* (#:key parallel-build? #:allow-other-keys)
+                   (let ((job-count (if parallel-build?
+                                        (number->string (parallel-job-count))
+                                        "1")))
+                     (invoke "ninja" "-j" job-count "-C" "build"))))
+               (add-before 'install 'disable-cache-generation
+                 (lambda _
+                   (setenv "DESTDIR" "/") #t))
+               (replace 'install
+                 (lambda _
+                   (invoke "ninja" "-C" "build" "install"))))))
+    (inputs (list fontconfig
+                  freetype
+                  libjpeg-turbo
+                  libpng
+                  libtiff
+                  libwebp
+                  libx11
+                  libxcursor
+                  libxext
+                  libxi
+                  zlib))
+    (native-inputs (list ninja pkg-config))
+    (home-page "http://azsky2.html.xdomain.jp/soft/azpainter.html")
+    (synopsis "Paint software for editing illustrations and images")
+    (description
+     "AzPainter is a lightweight full color painting application for editing
+illustrations and images.
+
+Features include:
+@itemize
+@item Layers
+@item Many artistic filters
+@item Good range of selection tools
+@item Pen pressure support with automatic brush size adjustment
+@item Support for 16-bit color images with transparency (RGBA)
+@item Support for image formats like PSD, PNG, JPEG, TIFF, WebP
+@end itemize
+")
+    (license license:gpl3+)))

base-commit: 2f170893719e6e9fc8e19cc5f0568e20a95d92b4
-- 
2.36.0




This bug report was last modified 2 years and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.