diff mbox series

[bug#36411] gnu: Add libresprite.

Message ID 87y31m7d62.fsf@sdf.lonestar.org
State Accepted
Headers show
Series [bug#36411] gnu: Add libresprite. | expand

Commit Message

Jakob L. Kreuze June 28, 2019, 12:43 a.m. UTC
* gnu/packages/game-development.scm (libresprite): New variable.
---
 gnu/packages/game-development.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

swedebugia June 28, 2019, 5:28 a.m. UTC | #1
On 2019-06-28 02:43, Jakob L. Kreuze wrote:
> * gnu/packages/game-development.scm (libresprite): New variable.
> ---
>   gnu/packages/game-development.scm | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
> 
> diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
> index 05a68b717a..0e9d5f0b96 100644
> --- a/gnu/packages/game-development.scm
> +++ b/gnu/packages/game-development.scm
> @@ -15,6 +15,7 @@
>   ;;; Copyright © 2017, 2019 Rutger Helling<rhelling@mykolab.com>
>   ;;; Copyright © 2018 Marius Bakke<mbakke@fastmail.com>
>   ;;; Copyright © 2019 Pierre Neidhardt<mail@ambrevar.xyz>
> +;;; Copyright © 2019 Jakob L. Kreuze<zerodaysfordays@sdf.lonestar.org>
>   ;;;
>   ;;; This file is part of GNU Guix.
>   ;;;
> @@ -799,6 +800,27 @@ the creation of animations, tiled graphics, texture atlases, and more.")
>       (home-page"https://www.aseprite.org/")
>       (license license:gpl2+)))
>   
> +(define-public libresprite
> +  (let ((commit "f9002f282afd8a6a31bb4cd2dc6b665c24bd7779"))

Why not a release? Please ask upstream to release.

> +    (package
> +      (inherit aseprite)
> +      (name "libresprite")
> +      (version (string-append "1.1.7" "-" (string-take commit 7)))
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url"https://github.com/LibreSprite/LibreSprite.git")
> +                      (commit commit)
> +                      (recursive? #t)))

I see these:
Submodule 'third_party/duktape' 
(https://github.com/aseprite/duktape.git) registered for path 
'third_party/duktape'
Submodule 'third_party/freetype2' 
(https://github.com/aseprite/freetype2.git) registered for path 
'third_party/freetype2'
Submodule 'third_party/gtest' (https://github.com/aseprite/gtest.git) 
registered for path 'third_party/gtest'
Submodule 'third_party/libpng' (https://github.com/aseprite/libpng.git) 
registered for path 'third_party/libpng'
Submodule 'third_party/libwebp' 
(https://chromium.googlesource.com/webm/libwebp) registered for path 
'third_party/libwebp'
Submodule 'third_party/pixman' (https://github.com/aseprite/pixman.git) 
registered for path 'third_party/pixman'
Submodule 'third_party/simpleini' 
(https://github.com/aseprite/simpleini.git) registered for path 
'third_party/simpleini'
Submodule 'third_party/zlib' (https://github.com/aseprite/zlib.git) 
registered for path 'third_party/zlib'

Please unbundle as many as possible.

> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32 "1gjvlkpjyxkp5srqwa9g0a8x0kl1jm0xp6fs9a52nr1ynaaza1lx"))))

Synopsis?

> +      (description "LibreSprite is a tool for creating 2D pixel art for video
> +games.  In addition to basic pixel editing features, LibreSprite can assist in
> +the creation of animations, tiled graphics, texture atlases, and more.")
> +      (home-page"https://github.com/LibreSprite/LibreSprite/")
> +      (license license:gpl2+))))
> +
>   (define-public qqwing
>     (package
>       (name "qqwing")
> -- 2.22.0
> 

I did not build it because of all the thirdparty bundles.
Jakob L. Kreuze June 28, 2019, 2:05 p.m. UTC | #2
swedebugia <swedebugia@riseup.net> writes:

> Why not a release? Please ask upstream to release.

Will do. I agree, looking at their roadmap, the current state of the
repository is ripe for a release.

> I see these:
> Submodule 'third_party/duktape' (https://github.com/aseprite/duktape.git)
> registered for path 'third_party/duktape'
> Submodule 'third_party/freetype2' (https://github.com/aseprite/freetype2.git)
> registered for path 'third_party/freetype2'
> Submodule 'third_party/gtest' (https://github.com/aseprite/gtest.git) registered
> for path 'third_party/gtest'
> Submodule 'third_party/libpng' (https://github.com/aseprite/libpng.git)
> registered for path 'third_party/libpng'
> Submodule 'third_party/libwebp' (https://chromium.googlesource.com/webm/libwebp)
> registered for path 'third_party/libwebp'
> Submodule 'third_party/pixman' (https://github.com/aseprite/pixman.git)
> registered for path 'third_party/pixman'
> Submodule 'third_party/simpleini' (https://github.com/aseprite/simpleini.git)
> registered for path 'third_party/simpleini'
> Submodule 'third_party/zlib' (https://github.com/aseprite/zlib.git) registered
> for path 'third_party/zlib'
>
> Please unbundle as many as possible.

The bundled libraries is an issue with 'aseprite' as well. I'll see
about submitting a separate patch to resolve it there.

> Synopsis?

Inherited from 'aseprite'. Should I alter it to mention that it's a fork
of Aseprite?

Regards,
Jakob
swedebugia June 28, 2019, 3:51 p.m. UTC | #3
On 2019-06-28 16:05, Jakob L. Kreuze wrote:
> swedebugia <swedebugia@riseup.net> writes:
> 
>> Why not a release? Please ask upstream to release.
> 
> Will do. I agree, looking at their roadmap, the current state of the
> repository is ripe for a release.
> 
>> I see these:
>> Submodule 'third_party/duktape' (https://github.com/aseprite/duktape.git)
>> registered for path 'third_party/duktape'
>> Submodule 'third_party/freetype2' (https://github.com/aseprite/freetype2.git)
>> registered for path 'third_party/freetype2'
>> Submodule 'third_party/gtest' (https://github.com/aseprite/gtest.git) registered
>> for path 'third_party/gtest'
>> Submodule 'third_party/libpng' (https://github.com/aseprite/libpng.git)
>> registered for path 'third_party/libpng'
>> Submodule 'third_party/libwebp' (https://chromium.googlesource.com/webm/libwebp)
>> registered for path 'third_party/libwebp'
>> Submodule 'third_party/pixman' (https://github.com/aseprite/pixman.git)
>> registered for path 'third_party/pixman'
>> Submodule 'third_party/simpleini' (https://github.com/aseprite/simpleini.git)
>> registered for path 'third_party/simpleini'
>> Submodule 'third_party/zlib' (https://github.com/aseprite/zlib.git) registered
>> for path 'third_party/zlib'
>>
>> Please unbundle as many as possible.
> 
> The bundled libraries is an issue with 'aseprite' as well. I'll see
> about submitting a separate patch to resolve it there.

+1

> 
>> Synopsis?
> 
> Inherited from 'aseprite'. Should I alter it to mention that it's a fork
> of Aseprite?

Yeah, I think that would be preferable. We/I normally ad that as an 
aside in the end of the description "xx is a fork of yy". :)
Jakob L. Kreuze June 28, 2019, 9:23 p.m. UTC | #4
swedebugia <swedebugia@riseup.net> writes:

>> The bundled libraries is an issue with 'aseprite' as well. I'll see
>> about submitting a separate patch to resolve it there.
>
> +1

Though, after looking at it, I'm realizing that this involves about
three new packages, as well as some minor patches upstream. I think I'll
still work towards unbundling libraries, but it will take some time.
Christine Lemmer-Webber June 29, 2019, 2:39 p.m. UTC | #5
Jakob L. Kreuze writes:

> swedebugia <swedebugia@riseup.net> writes:
>
>>> The bundled libraries is an issue with 'aseprite' as well. I'll see
>>> about submitting a separate patch to resolve it there.
>>
>> +1
>
> Though, after looking at it, I'm realizing that this involves about
> three new packages, as well as some minor patches upstream. I think I'll
> still work towards unbundling libraries, but it will take some time.

I don't think this needs to be a blocker on merging libresprite if it
wasn't a blocker on merging aesprite.  How about filing a separate bug
for that so we don't forget, then we can just worry about getting this
one in?

I wonder also if there are any significant benefits to keeping aesprite
around if we have libresprite.  What do you think?  Maybe aesprite could
become an alias for the new libresprite.  Thoughts?
Tobias Geerinckx-Rice June 29, 2019, 3:27 p.m. UTC | #6
Jakob,

I didn't check all the bundled packages, but at least freetype2 
and libpng are trivial to unbundle (not patched in any way) and 
probably the most important to, security-wise, so things are 
looking good even if upstream wouldn't cooperate.

Jakob L. Kreuze wrote:
>> Synopsis?
>
> Inherited from 'aseprite'.  Should I alter it to mention that
> it's a fork of Aseprite?

It's certainly not important enough to include in the synopsis, so 
inheriting that is fine.

Now, I'd say it needn't be added to the description either.  We 
generally don't note the often chequered ancestry of our packages, 
nor the fact that they are ‘free’ or ‘open source’, and this is 
just a combination of the two.  But at least description space is 
cheaper if you disagree.  ;-)

Thanks for your work on Guix,

T G-R
swedebugia June 29, 2019, 5:10 p.m. UTC | #7
On 2019-06-29 17:27, Tobias Geerinckx-Rice wrote:
> Jakob,
> 
> I didn't check all the bundled packages, but at least freetype2 and 
> libpng are trivial to unbundle (not patched in any way) and probably the 
> most important to, security-wise, so things are looking good even if 
> upstream wouldn't cooperate.
> 
> Jakob L. Kreuze wrote:
>>> Synopsis?
>>
>> Inherited from 'aseprite'.  Should I alter it to mention that
>> it's a fork of Aseprite?
> 
> It's certainly not important enough to include in the synopsis, so 
> inheriting that is fine.
> 
> Now, I'd say it needn't be added to the description either.  We 
> generally don't note the often chequered ancestry of our packages, nor 
> the fact that they are ‘free’ or ‘open source’, and this is just a 
> combination of the two.  But at least description space is cheaper if 
> you disagree.  ;-)

What about noting it in the top of the recipe as a comment?
";; This is a fork of xx"
I find that helpful but it might be unnecessary too?
Jakob L. Kreuze June 30, 2019, 12:45 a.m. UTC | #8
Christopher Lemmer Webber <cwebber@dustycloud.org> writes:

> I wonder also if there are any significant benefits to keeping
> aesprite around if we have libresprite. What do you think? Maybe
> aesprite could become an alias for the new libresprite. Thoughts?

If my build system changes for unbundling duktape and simpleini are
merged upstream, that would probably make sense. Then we wouldn't need
to add a similar patch for aseprite.
Jakob L. Kreuze June 30, 2019, 12:49 a.m. UTC | #9
Hi Tobias,

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> I didn't check all the bundled packages, but at least freetype2 and
> libpng are trivial to unbundle (not patched in any way) and probably
> the most important to, security-wise, so things are looking good even
> if upstream wouldn't cooperate.

I believe they're already unbundled in the 'aseprite' package I'm
inheriting.

#+BEGIN_SRC scheme
    (arguments
     '(#:configure-flags
       ;; Use shared libraries instead of building bundled source.
       (list "-DWITH_WEBP_SUPPORT=1"
             "-DUSE_SHARED_CURL=1"
             "-DUSE_SHARED_GIFLIB=1"
             "-DUSE_SHARED_JPEGLIB=1"
             "-DUSE_SHARED_ZLIB=1"
             "-DUSE_SHARED_LIBPNG=1"
             "-DUSE_SHARED_LIBLOADPNG=1"
             "-DUSE_SHARED_LIBWEBP=1"
             "-DUSE_SHARED_TINYXML=1"
             "-DUSE_SHARED_PIXMAN=1"
             "-DUSE_SHARED_FREETYPE=1"
             "-DUSE_SHARED_ALLEGRO4=1"
             "-DENABLE_UPDATER=0" ; no auto-updates
             (string-append "-DFREETYPE_INCLUDE_DIR="
                            (assoc-ref %build-inputs "freetype")
                            "/include/freetype2"))))
#+END_SRC

#+BEGIN_SRC
jakob@Epsilon ~/Code/guix/gnu/packages $ ldd $(which libresprite) | grep freetype
        libfreetype.so.6 => /gnu/store/66db1c64qm8ar4d7qjxsyl3xvjqjpgj7-freetype-2.9.1/lib/libfreetype.so.6 (0x00007fa317cd7000)
jakob@Epsilon ~/Code/guix/gnu/packages $ ldd $(which libresprite) | grep libpng
        libpng16.so.16 => /gnu/store/c7sm7sn3yccffpggxrrfipqcn4wz3vfw-libpng-1.6.37/lib/libpng16.so.16 (0x00007f5715956000)
#+END_SRC

> Now, I'd say it needn't be added to the description either. We
> generally don't note the often chequered ancestry of our packages, nor
> the fact that they are ‘free’ or ‘open source’, and this is just a
> combination of the two. But at least description space is cheaper if
> you disagree. ;-)

I just thought it'd be a little tacky if I kept the old description,
since it uses the name "Aseprite" twice.

Regards,
Jakob
Julien Lepiller Nov. 21, 2021, 11:03 p.m. UTC | #10
Hi Jakob,

I noticed this patch when looking for old patches that are still open.
Ekaitz recently submitted a similar patch to add libresprite, and it
was applied quickly.

Sorry that this fell through the cracks and that you didn't receive any
feedback in such a long time! Since we now have libresprite, I'm
closing this one.
diff mbox series

Patch

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 05a68b717a..0e9d5f0b96 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -15,6 +15,7 @@ 
 ;;; Copyright © 2017, 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -799,6 +800,27 @@  the creation of animations, tiled graphics, texture atlases, and more.")
     (home-page "https://www.aseprite.org/")
     (license license:gpl2+)))
 
+(define-public libresprite
+  (let ((commit "f9002f282afd8a6a31bb4cd2dc6b665c24bd7779"))
+    (package
+      (inherit aseprite)
+      (name "libresprite")
+      (version (string-append "1.1.7" "-" (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/LibreSprite/LibreSprite.git")
+                      (commit commit)
+                      (recursive? #t)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32 "1gjvlkpjyxkp5srqwa9g0a8x0kl1jm0xp6fs9a52nr1ynaaza1lx"))))
+      (description "LibreSprite is a tool for creating 2D pixel art for video
+games.  In addition to basic pixel editing features, LibreSprite can assist in
+the creation of animations, tiled graphics, texture atlases, and more.")
+      (home-page "https://github.com/LibreSprite/LibreSprite/")
+      (license license:gpl2+))))
+
 (define-public qqwing
   (package
     (name "qqwing")