unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39263] [PATCH 0/2] Update Godot
@ 2020-01-24 14:50 Timotej Lazar
  2020-01-24 15:02 ` [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2 Timotej Lazar
  2020-01-28 18:25 ` [bug#39263] [PATCH v2 1/3] " Timotej Lazar
  0 siblings, 2 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-24 14:50 UTC (permalink / raw)
  To: 39263

Hi,

these patches update Godot to latest stable version 3.1.2 and unbundle
bullet, pcre2 and zstd libraries.

Thanks!

Timotej Lazar (2):
  gnu: godot: Update to 3.1.2.
  gnu: godot: Unbundle some dependencies.

 gnu/packages/game-development.scm | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

-- 
2.25.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2.
  2020-01-24 14:50 [bug#39263] [PATCH 0/2] Update Godot Timotej Lazar
@ 2020-01-24 15:02 ` Timotej Lazar
  2020-01-24 15:02   ` [bug#39263] [PATCH 2/2] gnu: godot: Unbundle some dependencies Timotej Lazar
  2020-01-25  9:16   ` [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2 Christopher Baines
  2020-01-28 18:25 ` [bug#39263] [PATCH v2 1/3] " Timotej Lazar
  1 sibling, 2 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-24 15:02 UTC (permalink / raw)
  To: 39263; +Cc: Timotej Lazar

* gnu/packages/game-development.scm (godot): Update to 3.1.2.
[inputs]: Remove openssl, replaced by a (modified) bundled copy of mbedtls.
[arguments](configure-flags): Remove builtin_openssl flag.
[source]: Don’t try to remove the (now nonexistent) bundled openssl directory.
---
 gnu/packages/game-development.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index ee8dea23b5..79e3f6dc6c 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2019, 2020 Leo Prikler <leo.prikler@student.tugraz.at>
 ;;; Copyright © 2019 Jethro Cao <jethrocao@gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1503,7 +1504,7 @@ games.")
 (define-public godot
   (package
     (name "godot")
-    (version "3.0.6")
+    (version "3.1.2")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1512,7 +1513,7 @@ games.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
+                "12305wj2i4067jc50l8r0wmb7zjcna24fli8vb8kiaild0jrlip6"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -1527,7 +1528,6 @@ games.")
                                 "libvorbis"
                                 "libvpx"
                                 "libwebp"
-                                "openssl"
                                 "opus"
                                 "zlib"))
                     #t)))))
@@ -1550,7 +1550,6 @@ games.")
                            "builtin_libvorbis=no"
                            "builtin_libvpx=no"
                            "builtin_libwebp=no"
-                           "builtin_openssl=no"
                            "builtin_opus=no"
                            "builtin_zlib=no")
        #:tests? #f ; There are no tests
@@ -1612,7 +1611,6 @@ games.")
               ("libxinerama" ,libxinerama)
               ("libxrandr" ,libxrandr)
               ("mesa" ,mesa)
-              ("openssl" ,openssl)
               ("opusfile" ,opusfile)
               ("pulseaudio" ,pulseaudio)))
     (home-page "https://godotengine.org/")
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#39263] [PATCH 2/2] gnu: godot: Unbundle some dependencies.
  2020-01-24 15:02 ` [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2 Timotej Lazar
@ 2020-01-24 15:02   ` Timotej Lazar
  2020-01-25  9:18     ` Christopher Baines
  2020-01-25  9:16   ` [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2 Christopher Baines
  1 sibling, 1 reply; 10+ messages in thread
From: Timotej Lazar @ 2020-01-24 15:02 UTC (permalink / raw)
  To: 39263; +Cc: Timotej Lazar

* gnu/packages/game-development.scm (godot)[inputs]: Add bullet, pcre2, zstd.
[arguments](configure-flags): Use system libraries for the above.
[source](snippet): Remove bundled copies.
---
 gnu/packages/game-development.scm | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 79e3f6dc6c..9ded71375f 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -78,6 +78,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages music)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
@@ -1521,7 +1522,8 @@ games.")
                   ;; of these may be modified; see "thirdparty/README.md".
                   (with-directory-excursion "thirdparty"
                     (for-each delete-file-recursively
-                              '("freetype"
+                              '("bullet"
+                                "freetype"
                                 "libogg"
                                 "libpng"
                                 "libtheora"
@@ -1529,7 +1531,9 @@ games.")
                                 "libvpx"
                                 "libwebp"
                                 "opus"
-                                "zlib"))
+                                "pcre2"
+                                "zlib"
+                                "zstd"))
                     #t)))))
     (build-system scons-build-system)
     (arguments
@@ -1541,6 +1545,7 @@ games.")
                                '())
                            ;; Avoid using many of the bundled libs.
                            ;; Note: These options can be found in the SConstruct file.
+                           "builtin_bullet=no"
                            "builtin_freetype=no"
                            "builtin_glew=no"
                            "builtin_libmpdec=no"
@@ -1551,7 +1556,9 @@ games.")
                            "builtin_libvpx=no"
                            "builtin_libwebp=no"
                            "builtin_opus=no"
-                           "builtin_zlib=no")
+                           "builtin_pcre2=no"
+                           "builtin_zlib=no"
+                           "builtin_zstd=no")
        #:tests? #f ; There are no tests
        #:phases
        (modify-phases %standard-phases
@@ -1598,6 +1605,7 @@ games.")
                #t))))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("alsa-lib" ,alsa-lib)
+              ("bullet" ,bullet)
               ("freetype" ,freetype)
               ("glew" ,glew)
               ("glu" ,glu)
@@ -1612,7 +1620,9 @@ games.")
               ("libxrandr" ,libxrandr)
               ("mesa" ,mesa)
               ("opusfile" ,opusfile)
-              ("pulseaudio" ,pulseaudio)))
+              ("pcre2" ,pcre2)
+              ("pulseaudio" ,pulseaudio)
+              ("zstd" ,zstd "lib")))
     (home-page "https://godotengine.org/")
     (synopsis "Advanced 2D and 3D game engine")
     (description
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2.
  2020-01-24 15:02 ` [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2 Timotej Lazar
  2020-01-24 15:02   ` [bug#39263] [PATCH 2/2] gnu: godot: Unbundle some dependencies Timotej Lazar
@ 2020-01-25  9:16   ` Christopher Baines
  1 sibling, 0 replies; 10+ messages in thread
From: Christopher Baines @ 2020-01-25  9:16 UTC (permalink / raw)
  To: Timotej Lazar; +Cc: 39263

[-- Attachment #1: Type: text/plain, Size: 2990 bytes --]


Timotej Lazar <timotej.lazar@araneo.si> writes:

> * gnu/packages/game-development.scm (godot): Update to 3.1.2.
> [inputs]: Remove openssl, replaced by a (modified) bundled copy of mbedtls.
> [arguments](configure-flags): Remove builtin_openssl flag.
> [source]: Don’t try to remove the (now nonexistent) bundled openssl directory.
> ---
>  gnu/packages/game-development.scm | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
> index ee8dea23b5..79e3f6dc6c 100644
> --- a/gnu/packages/game-development.scm
> +++ b/gnu/packages/game-development.scm
> @@ -18,6 +18,7 @@
>  ;;; Copyright © 2019, 2020 Leo Prikler <leo.prikler@student.tugraz.at>
>  ;;; Copyright © 2019 Jethro Cao <jethrocao@gmail.com>
>  ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
> +;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1503,7 +1504,7 @@ games.")
>  (define-public godot
>    (package
>      (name "godot")
> -    (version "3.0.6")
> +    (version "3.1.2")
>      (source (origin
>                (method git-fetch)
>                (uri (git-reference
> @@ -1512,7 +1513,7 @@ games.")
>                (file-name (git-file-name name version))
>                (sha256
>                 (base32
> -                "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
> +                "12305wj2i4067jc50l8r0wmb7zjcna24fli8vb8kiaild0jrlip6"))
>                (modules '((guix build utils)))
>                (snippet
>                 '(begin
> @@ -1527,7 +1528,6 @@ games.")
>                                  "libvorbis"
>                                  "libvpx"
>                                  "libwebp"
> -                                "openssl"
>                                  "opus"
>                                  "zlib"))
>                      #t)))))
> @@ -1550,7 +1550,6 @@ games.")
>                             "builtin_libvorbis=no"
>                             "builtin_libvpx=no"
>                             "builtin_libwebp=no"
> -                           "builtin_openssl=no"
>                             "builtin_opus=no"
>                             "builtin_zlib=no")
>         #:tests? #f ; There are no tests
> @@ -1612,7 +1611,6 @@ games.")
>                ("libxinerama" ,libxinerama)
>                ("libxrandr" ,libxrandr)
>                ("mesa" ,mesa)
> -              ("openssl" ,openssl)
>                ("opusfile" ,opusfile)
>                ("pulseaudio" ,pulseaudio)))
>      (home-page "https://godotengine.org/")

I did have a look if the package builds with the mbedtls-apache package,
rather than using the included source code, and it looks to. Although
I'm aware that [1] says there are modifications.

1: https://github.com/godotengine/godot/tree/master/thirdparty#mbedtls

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#39263] [PATCH 2/2] gnu: godot: Unbundle some dependencies.
  2020-01-24 15:02   ` [bug#39263] [PATCH 2/2] gnu: godot: Unbundle some dependencies Timotej Lazar
@ 2020-01-25  9:18     ` Christopher Baines
  2020-01-28 18:18       ` Timotej Lazar
  0 siblings, 1 reply; 10+ messages in thread
From: Christopher Baines @ 2020-01-25  9:18 UTC (permalink / raw)
  To: Timotej Lazar; +Cc: 39263

[-- Attachment #1: Type: text/plain, Size: 3743 bytes --]


Timotej Lazar <timotej.lazar@araneo.si> writes:

> * gnu/packages/game-development.scm (godot)[inputs]: Add bullet, pcre2, zstd.
> [arguments](configure-flags): Use system libraries for the above.
> [source](snippet): Remove bundled copies.
> ---

Generally, this is good :)

>  gnu/packages/game-development.scm | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
> index 79e3f6dc6c..9ded71375f 100644
> --- a/gnu/packages/game-development.scm
> +++ b/gnu/packages/game-development.scm
> @@ -78,6 +78,7 @@
>    #:use-module (gnu packages multiprecision)
>    #:use-module (gnu packages music)
>    #:use-module (gnu packages ncurses)
> +  #:use-module (gnu packages pcre)
>    #:use-module (gnu packages pkg-config)
>    #:use-module (gnu packages pulseaudio)
>    #:use-module (gnu packages python)
> @@ -1521,7 +1522,8 @@ games.")
>                    ;; of these may be modified; see "thirdparty/README.md".
>                    (with-directory-excursion "thirdparty"
>                      (for-each delete-file-recursively
> -                              '("freetype"
> +                              '("bullet"
> +                                "freetype"
>                                  "libogg"
>                                  "libpng"
>                                  "libtheora"
> @@ -1529,7 +1531,9 @@ games.")
>                                  "libvpx"
>                                  "libwebp"
>                                  "opus"
> -                                "zlib"))
> +                                "pcre2"
> +                                "zlib"
> +                                "zstd"))
>                      #t)))))

One thought I had here is that it would be more rigorous to have a list
of directories that are kept, and anything not on the list is
deleted. That way it's harder for new thirdparty dependencies to sneak
in. Not something that necessarily needs changing now though.

>      (build-system scons-build-system)
>      (arguments
> @@ -1541,6 +1545,7 @@ games.")
>                                 '())
>                             ;; Avoid using many of the bundled libs.
>                             ;; Note: These options can be found in the SConstruct file.
> +                           "builtin_bullet=no"
>                             "builtin_freetype=no"
>                             "builtin_glew=no"
>                             "builtin_libmpdec=no"
> @@ -1551,7 +1556,9 @@ games.")
>                             "builtin_libvpx=no"
>                             "builtin_libwebp=no"
>                             "builtin_opus=no"
> -                           "builtin_zlib=no")
> +                           "builtin_pcre2=no"
> +                           "builtin_zlib=no"
> +                           "builtin_zstd=no")
>         #:tests? #f ; There are no tests
>         #:phases
>         (modify-phases %standard-phases
> @@ -1598,6 +1605,7 @@ games.")
>                 #t))))))
>      (native-inputs `(("pkg-config" ,pkg-config)))
>      (inputs `(("alsa-lib" ,alsa-lib)
> +              ("bullet" ,bullet)
>                ("freetype" ,freetype)
>                ("glew" ,glew)
>                ("glu" ,glu)
> @@ -1612,7 +1620,9 @@ games.")
>                ("libxrandr" ,libxrandr)
>                ("mesa" ,mesa)
>                ("opusfile" ,opusfile)
> -              ("pulseaudio" ,pulseaudio)))
> +              ("pcre2" ,pcre2)
> +              ("pulseaudio" ,pulseaudio)
> +              ("zstd" ,zstd "lib")))
>      (home-page "https://godotengine.org/")
>      (synopsis "Advanced 2D and 3D game engine")
>      (description

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#39263] [PATCH 2/2] gnu: godot: Unbundle some dependencies.
  2020-01-25  9:18     ` Christopher Baines
@ 2020-01-28 18:18       ` Timotej Lazar
  2020-01-29  8:00         ` bug#39263: " Christopher Baines
  0 siblings, 1 reply; 10+ messages in thread
From: Timotej Lazar @ 2020-01-28 18:18 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 39263

Thanks for the feedback! I am sending updated patches after this reply.

Christopher Baines <mail@cbaines.net> [2020-01-25 09:16:08+0000]:
> I did have a look if the package builds with the mbedtls-apache
> package, rather than using the included source code, and it looks to.
> Although I'm aware that [1] says there are modifications.

The two Godot patches for mbedtls don’t seem to be relevant to Guix, so
I replaced the bundled copy with the mbedtls-apache package. I don’t
have a use case to test this, but the minimal example from the
HTTPRequest tutorial seems to work OK with an HTTPS URI.

Christopher Baines <mail@cbaines.net> [2020-01-25 09:18:33+0000]:
> One thought I had here is that it would be more rigorous to have a list
> of directories that are kept, and anything not on the list is deleted.
> That way it's harder for new thirdparty dependencies to sneak in.

Makes sense. As you suggest, I flipped the logic for removing thirdparty
files: whitelist preserved files and remove everything else. The snippet
can only preserve direct children of the thirdparty/ directory, which
keeps it simple but perhaps not flexible enough in the long run.

Do we generally prefer whitelisting bundled files? Most packages I have
seen (and written) do the opposite and list the files to remove. Maybe
we could add a guideline somewhere? Or point me to the one I missed. :)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#39263] [PATCH v2 1/3] gnu: godot: Update to 3.1.2.
  2020-01-24 14:50 [bug#39263] [PATCH 0/2] Update Godot Timotej Lazar
  2020-01-24 15:02 ` [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2 Timotej Lazar
@ 2020-01-28 18:25 ` Timotej Lazar
  2020-01-28 18:25   ` [bug#39263] [PATCH v2 2/3] gnu: godot: Unbundle some dependencies Timotej Lazar
  2020-01-28 18:25   ` [bug#39263] [PATCH v2 3/3] gnu: godot: List which third party files to keep Timotej Lazar
  1 sibling, 2 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-28 18:25 UTC (permalink / raw)
  To: 39263; +Cc: Timotej Lazar

* gnu/packages/game-development.scm (godot): Update to 3.1.2.
[inputs]: Remove openssl, replaced by a bundled copy of mbedtls.
[arguments](configure-flags): Remove builtin_openssl flag.
[source]: Don’t try to remove the (now nonexistent) bundled openssl directory.
---
 gnu/packages/game-development.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 13006f3509..49e18602a0 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2019, 2020 Leo Prikler <leo.prikler@student.tugraz.at>
 ;;; Copyright © 2019 Jethro Cao <jethrocao@gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1503,7 +1504,7 @@ games.")
 (define-public godot
   (package
     (name "godot")
-    (version "3.0.6")
+    (version "3.1.2")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1512,7 +1513,7 @@ games.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
+                "12305wj2i4067jc50l8r0wmb7zjcna24fli8vb8kiaild0jrlip6"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -1527,7 +1528,6 @@ games.")
                                 "libvorbis"
                                 "libvpx"
                                 "libwebp"
-                                "openssl"
                                 "opus"
                                 "zlib"))
                     #t)))))
@@ -1550,7 +1550,6 @@ games.")
                            "builtin_libvorbis=no"
                            "builtin_libvpx=no"
                            "builtin_libwebp=no"
-                           "builtin_openssl=no"
                            "builtin_opus=no"
                            "builtin_zlib=no")
        #:tests? #f ; There are no tests
@@ -1612,7 +1611,6 @@ games.")
               ("libxinerama" ,libxinerama)
               ("libxrandr" ,libxrandr)
               ("mesa" ,mesa)
-              ("openssl" ,openssl)
               ("opusfile" ,opusfile)
               ("pulseaudio" ,pulseaudio)))
     (home-page "https://godotengine.org/")
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#39263] [PATCH v2 2/3] gnu: godot: Unbundle some dependencies.
  2020-01-28 18:25 ` [bug#39263] [PATCH v2 1/3] " Timotej Lazar
@ 2020-01-28 18:25   ` Timotej Lazar
  2020-01-28 18:25   ` [bug#39263] [PATCH v2 3/3] gnu: godot: List which third party files to keep Timotej Lazar
  1 sibling, 0 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-28 18:25 UTC (permalink / raw)
  To: 39263; +Cc: Timotej Lazar

* gnu/packages/game-development.scm (godot)[inputs]: Add bullet, mbedtls-apache,
pcre2 and zstd.
[arguments](configure-flags): Use system libraries for the above.
[source](snippet): Remove bundled copies.
---
 gnu/packages/game-development.scm | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 49e18602a0..0ef9fcc7dd 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -78,6 +78,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages music)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
@@ -1521,15 +1522,19 @@ games.")
                   ;; of these may be modified; see "thirdparty/README.md".
                   (with-directory-excursion "thirdparty"
                     (for-each delete-file-recursively
-                              '("freetype"
+                              '("bullet"
+                                "freetype"
                                 "libogg"
                                 "libpng"
                                 "libtheora"
                                 "libvorbis"
                                 "libvpx"
                                 "libwebp"
+                                "mbedtls"
                                 "opus"
-                                "zlib"))
+                                "pcre2"
+                                "zlib"
+                                "zstd"))
                     #t)))))
     (build-system scons-build-system)
     (arguments
@@ -1541,6 +1546,7 @@ games.")
                                '())
                            ;; Avoid using many of the bundled libs.
                            ;; Note: These options can be found in the SConstruct file.
+                           "builtin_bullet=no"
                            "builtin_freetype=no"
                            "builtin_glew=no"
                            "builtin_libmpdec=no"
@@ -1550,8 +1556,11 @@ games.")
                            "builtin_libvorbis=no"
                            "builtin_libvpx=no"
                            "builtin_libwebp=no"
+                           "builtin_mbedtls=no"
                            "builtin_opus=no"
-                           "builtin_zlib=no")
+                           "builtin_pcre2=no"
+                           "builtin_zlib=no"
+                           "builtin_zstd=no")
        #:tests? #f ; There are no tests
        #:phases
        (modify-phases %standard-phases
@@ -1598,6 +1607,7 @@ games.")
                #t))))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("alsa-lib" ,alsa-lib)
+              ("bullet" ,bullet)
               ("freetype" ,freetype)
               ("glew" ,glew)
               ("glu" ,glu)
@@ -1610,9 +1620,12 @@ games.")
               ("libxi" ,libxi)
               ("libxinerama" ,libxinerama)
               ("libxrandr" ,libxrandr)
+              ("mbedtls" ,mbedtls-apache)
               ("mesa" ,mesa)
               ("opusfile" ,opusfile)
-              ("pulseaudio" ,pulseaudio)))
+              ("pcre2" ,pcre2)
+              ("pulseaudio" ,pulseaudio)
+              ("zstd" ,zstd "lib")))
     (home-page "https://godotengine.org/")
     (synopsis "Advanced 2D and 3D game engine")
     (description
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#39263] [PATCH v2 3/3] gnu: godot: List which third party files to keep.
  2020-01-28 18:25 ` [bug#39263] [PATCH v2 1/3] " Timotej Lazar
  2020-01-28 18:25   ` [bug#39263] [PATCH v2 2/3] gnu: godot: Unbundle some dependencies Timotej Lazar
@ 2020-01-28 18:25   ` Timotej Lazar
  1 sibling, 0 replies; 10+ messages in thread
From: Timotej Lazar @ 2020-01-28 18:25 UTC (permalink / raw)
  To: 39263; +Cc: Timotej Lazar

Remove everything else to catch added dependencies in new versions.

* gnu/packages/game-development.scm (godot)[source](snippet): Instead of
  removing (only) the unbundled libs, remove everything except the listed files.
---
 gnu/packages/game-development.scm | 51 ++++++++++++++++++++-----------
 1 file changed, 33 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 0ef9fcc7dd..517d91df54 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1515,27 +1515,42 @@ games.")
               (sha256
                (base32
                 "12305wj2i4067jc50l8r0wmb7zjcna24fli8vb8kiaild0jrlip6"))
-              (modules '((guix build utils)))
+              (modules '((guix build utils)
+                         (ice-9 ftw)
+                         (srfi srfi-1)))
               (snippet
                '(begin
-                  ;; Drop libraries that we take from Guix.  Note that some
-                  ;; of these may be modified; see "thirdparty/README.md".
+                  ;; Keep only those bundled files we have not (yet) replaced
+                  ;; with Guix versions. Note that some of these may be
+                  ;; modified; see "thirdparty/README.md".
                   (with-directory-excursion "thirdparty"
-                    (for-each delete-file-recursively
-                              '("bullet"
-                                "freetype"
-                                "libogg"
-                                "libpng"
-                                "libtheora"
-                                "libvorbis"
-                                "libvpx"
-                                "libwebp"
-                                "mbedtls"
-                                "opus"
-                                "pcre2"
-                                "zlib"
-                                "zstd"))
-                    #t)))))
+                    (let* ((preserved-files
+                            '("README.md"
+                              "b2d_convexdecomp"
+                              "certs"
+                              "cvtt"
+                              "enet"
+                              "etc2comp"
+                              "fonts"
+                              "glad"
+                              "jpeg-compressor"
+                              "libsimplewebm"
+                              "libwebsockets"
+                              "miniupnpc"
+                              "minizip"
+                              "misc"
+                              "nanosvg"
+                              "pvrtccompressor"
+                              "recastnavigation"
+                              "squish"
+                              "thekla_atlas"
+                              "tinyexr"
+                              "xatlas")))
+                      (for-each delete-file-recursively
+                                (lset-difference string=?
+                                                 (scandir ".")
+                                                 (cons* "." ".." preserved-files)))))
+                  #t))))
     (build-system scons-build-system)
     (arguments
      `(#:scons ,scons-python2
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* bug#39263: [PATCH 2/2] gnu: godot: Unbundle some dependencies.
  2020-01-28 18:18       ` Timotej Lazar
@ 2020-01-29  8:00         ` Christopher Baines
  0 siblings, 0 replies; 10+ messages in thread
From: Christopher Baines @ 2020-01-29  8:00 UTC (permalink / raw)
  To: Timotej Lazar; +Cc: 39263-done

[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]


Timotej Lazar <timotej.lazar@araneo.si> writes:

> Thanks for the feedback! I am sending updated patches after this reply.
>
> Christopher Baines <mail@cbaines.net> [2020-01-25 09:16:08+0000]:
>> I did have a look if the package builds with the mbedtls-apache
>> package, rather than using the included source code, and it looks to.
>> Although I'm aware that [1] says there are modifications.
>
> The two Godot patches for mbedtls don’t seem to be relevant to Guix, so
> I replaced the bundled copy with the mbedtls-apache package. I don’t
> have a use case to test this, but the minimal example from the
> HTTPRequest tutorial seems to work OK with an HTTPS URI.

Wonderful :)

> Christopher Baines <mail@cbaines.net> [2020-01-25 09:18:33+0000]:
>> One thought I had here is that it would be more rigorous to have a list
>> of directories that are kept, and anything not on the list is deleted.
>> That way it's harder for new thirdparty dependencies to sneak in.
>
> Makes sense. As you suggest, I flipped the logic for removing thirdparty
> files: whitelist preserved files and remove everything else. The snippet
> can only preserve direct children of the thirdparty/ directory, which
> keeps it simple but perhaps not flexible enough in the long run.

Great, this looks really useful.

> Do we generally prefer whitelisting bundled files? Most packages I have
> seen (and written) do the opposite and list the files to remove. Maybe
> we could add a guideline somewhere? Or point me to the one I missed. :)

I don't know if it's written down somewhere, all I can say is it
occurred to me when looking at the package definition.

I've pushed the 3 latest patches you sent to master, so they're included
in 18f8e935e85a99d5c284c0a6b719351a402ada21.

Thanks,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-01-29  8:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24 14:50 [bug#39263] [PATCH 0/2] Update Godot Timotej Lazar
2020-01-24 15:02 ` [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2 Timotej Lazar
2020-01-24 15:02   ` [bug#39263] [PATCH 2/2] gnu: godot: Unbundle some dependencies Timotej Lazar
2020-01-25  9:18     ` Christopher Baines
2020-01-28 18:18       ` Timotej Lazar
2020-01-29  8:00         ` bug#39263: " Christopher Baines
2020-01-25  9:16   ` [bug#39263] [PATCH 1/2] gnu: godot: Update to 3.1.2 Christopher Baines
2020-01-28 18:25 ` [bug#39263] [PATCH v2 1/3] " Timotej Lazar
2020-01-28 18:25   ` [bug#39263] [PATCH v2 2/3] gnu: godot: Unbundle some dependencies Timotej Lazar
2020-01-28 18:25   ` [bug#39263] [PATCH v2 3/3] gnu: godot: List which third party files to keep Timotej Lazar

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).