GNU bug report logs - #32155
[PATCH 0/4] sfml updates

Previous Next

Package: guix-patches;

Reported by: Marius Bakke <mbakke <at> fastmail.com>

Date: Sat, 14 Jul 2018 14:42:01 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32155 in the body.
You can then email your comments to 32155 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#32155; Package guix-patches. (Sat, 14 Jul 2018 14:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marius Bakke <mbakke <at> fastmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 14 Jul 2018 14:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: guix-patches <at> gnu.org
Cc: Marius Bakke <mbakke <at> fastmail.com>
Subject: [PATCH 0/4] sfml updates
Date: Sat, 14 Jul 2018 16:41:21 +0200
This series updates sfml to the latest release, and adds some of the
"stb" <https://github.com/nothings/stb> libraries in order to unbundle
all dependencies.

Marius Bakke (4):
  gnu: sfml: Update to 2.5.0.
  gnu: Add stb-image.
  gnu: Add stb-image-write.
  gnu: sfml: Remove all bundled dependencies.

 gnu/local.mk                      |   1 +
 gnu/packages/game-development.scm |  27 ++++++--
 gnu/packages/stb.scm              | 101 ++++++++++++++++++++++++++++++
 3 files changed, 123 insertions(+), 6 deletions(-)
 create mode 100644 gnu/packages/stb.scm

-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32155; Package guix-patches. (Sat, 14 Jul 2018 14:45:01 GMT) Full text and rfc822 format available.

Message #8 received at 32155 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: 32155 <at> debbugs.gnu.org
Cc: Marius Bakke <mbakke <at> fastmail.com>
Subject: [PATCH 1/4] gnu: sfml: Update to 2.5.0.
Date: Sat, 14 Jul 2018 16:43:52 +0200
* gnu/packages/game-development.scm (sfml): Update to 2.5.0.
[arguments]: Specify pkg-config dir in #:configure-flags.
[native-inputs]: Add PKG-CONFIG.
[inputs]: Move FLAC, FREETYPE, LIBVORBIS and OPENAL ...
[propagated-inputs]: ... here.  New field.
---
 gnu/packages/game-development.scm | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index fde139c0b..4610e389b 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -440,7 +440,7 @@ clone.")
 (define-public sfml
   (package
     (name "sfml")
-    (version "2.3.2")
+    (version "2.5.0")
     (source (origin
               (method url-fetch)
               ;; Do not fetch the archives from
@@ -451,24 +451,29 @@ clone.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm"))))
+                "1x3yvhdrln5b6h4g5r4mds76gq8zsxw6icxqpwqkmxsqcq5yviab"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags
-       (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE")
+       (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE"
+             "-DSFML_OS_PKGCONFIG_DIR=lib/pkgconfig")
        #:tests? #f)) ; no tests
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (inputs
      `(("mesa" ,mesa)
        ("glew" ,glew)
-       ("flac" ,flac)
-       ("libvorbis" ,libvorbis)
        ("libx11" ,libx11)
        ("xcb-util-image" ,xcb-util-image)
        ("libxrandr" ,libxrandr)
        ("eudev" ,eudev)
-       ("freetype" ,freetype)
        ("libjpeg" ,libjpeg)
-       ("libsndfile" ,libsndfile)
+       ("libsndfile" ,libsndfile)))
+    (propagated-inputs
+     ;; In Requires.private of pkg-config files.
+     `(("flac" ,flac)
+       ("freetype" ,freetype)
+       ("libvorbis" ,libvorbis)
        ("openal" ,openal)))
     (home-page "https://www.sfml-dev.org")
     (synopsis "Simple and Fast Multimedia Library")
-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32155; Package guix-patches. (Sat, 14 Jul 2018 14:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 32155 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: 32155 <at> debbugs.gnu.org
Cc: Marius Bakke <mbakke <at> fastmail.com>
Subject: [PATCH 2/4] gnu: Add stb-image.
Date: Sat, 14 Jul 2018 16:43:53 +0200
* gnu/packages/stb.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register it.
---
 gnu/local.mk         |  1 +
 gnu/packages/stb.scm | 95 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+)
 create mode 100644 gnu/packages/stb.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 9e875263a..5c6fc8e86 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -403,6 +403,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/sssd.scm				\
   %D%/packages/stalonetray.scm			\
   %D%/packages/statistics.scm			\
+  %D%/packages/stb.scm				\
   %D%/packages/storage.scm			\
   %D%/packages/suckless.scm			\
   %D%/packages/swig.scm				\
diff --git a/gnu/packages/stb.scm b/gnu/packages/stb.scm
new file mode 100644
index 000000000..148e8dbdb
--- /dev/null
+++ b/gnu/packages/stb.scm
@@ -0,0 +1,95 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Marius Bakke <mbakke <at> fastmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages stb)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
+  #:use-module ((guix licenses) #:select (expat public-domain)))
+
+(define stb
+  ;; stb is a collection of libraries developed within the same repository.
+  ;; When updating this, remember to change versions below as appropriate.
+  (let ((commit "e6afb9cbae4064da8c3e69af3ff5c4629579c1d2")
+        (revision "0"))
+    (package
+      (name "stb")
+      (home-page "https://github.com/nothings/stb")
+      (version (git-version "0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url home-page)
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "079nsn9bnb8c0vfq26g5l53q6gzx19a5x9q2nb55mpcljxsgxnmf"))
+                (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:modules ((ice-9 ftw)
+                    (ice-9 regex)
+                    (srfi srfi-26)
+                    ,@%gnu-build-system-modules)
+         #:phases (modify-phases %standard-phases
+                    (delete 'configure)
+                    (delete 'build)
+                    (replace 'check
+                      (lambda _
+                        (invoke "make" "-C" "tests" "CC=gcc")))
+                    (replace 'install
+                      (lambda* (#:key outputs #:allow-other-keys)
+                        (let ((out (assoc-ref outputs "out"))
+                              (files (make-regexp "\\.(c|h|md)$")))
+                          (for-each (lambda (file)
+                                      (install-file file out))
+                                    (scandir "." (cut regexp-exec files <>)))
+                          #t))))))
+      (synopsis "Single file libraries for C/C++")
+      (description
+       "This package contains a variety of small independent libraries for
+the C programming language.")
+      ;; The user can choose either license.
+      (license (list expat public-domain)))))
+
+(define (make-stb-header-package name version description)
+  (package
+    (inherit stb)
+    (name name)
+    (version version)
+    (source #f)
+    (inputs `(("stb" ,stb)))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+                   (let ((stb (assoc-ref %build-inputs "stb"))
+                         (lib (string-join (string-split ,name #\-) "_"))
+                         (out (assoc-ref %outputs "out")))
+                     (install-file (string-append stb "/" lib ".h")
+                                   (string-append out "/include"))
+                     #t))))
+    (description description)))
+
+(define-public stb-image
+  (make-stb-header-package
+   "stb-image" "2.19"
+   "stb-image is a small and self-contained library for image loading or
+decoding from file or memory.  A variety of formats are supported."))
-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32155; Package guix-patches. (Sat, 14 Jul 2018 14:45:02 GMT) Full text and rfc822 format available.

Message #14 received at 32155 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: 32155 <at> debbugs.gnu.org
Cc: Marius Bakke <mbakke <at> fastmail.com>
Subject: [PATCH 3/4] gnu: Add stb-image-write.
Date: Sat, 14 Jul 2018 16:43:54 +0200
* gnu/packages/stb.scm (stb-image-write): New public variable.
---
 gnu/packages/stb.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/stb.scm b/gnu/packages/stb.scm
index 148e8dbdb..7abaaba6b 100644
--- a/gnu/packages/stb.scm
+++ b/gnu/packages/stb.scm
@@ -93,3 +93,9 @@ the C programming language.")
    "stb-image" "2.19"
    "stb-image is a small and self-contained library for image loading or
 decoding from file or memory.  A variety of formats are supported."))
+
+(define-public stb-image-write
+  (make-stb-header-package
+   "stb-image-write" "1.09"
+   "stb-image-write is a small library for writing image files to the
+C <at> tie{}@code{stdio} interface."))
-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32155; Package guix-patches. (Sat, 14 Jul 2018 14:45:03 GMT) Full text and rfc822 format available.

Message #17 received at 32155 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: 32155 <at> debbugs.gnu.org
Cc: Marius Bakke <mbakke <at> fastmail.com>
Subject: [PATCH 4/4] gnu: sfml: Remove all bundled dependencies.
Date: Sat, 14 Jul 2018 16:43:55 +0200
* gnu/packages/game-development.scm (sfml)[source](snippet): New field.
[inputs]: Add STB-IMAGE and STB-IMAGE-WRITE.
---
 gnu/packages/game-development.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 4610e389b..842894da0 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -74,6 +74,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages stb)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
@@ -451,7 +452,14 @@ clone.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1x3yvhdrln5b6h4g5r4mds76gq8zsxw6icxqpwqkmxsqcq5yviab"))))
+                "1x3yvhdrln5b6h4g5r4mds76gq8zsxw6icxqpwqkmxsqcq5yviab"))
+              (modules '((guix build utils)
+                         (ice-9 ftw)))
+              (snippet
+               '(begin
+                  ;; Ensure system libraries are used.
+                  (delete-file-recursively "extlibs")
+                  #t))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags
@@ -468,7 +476,9 @@ clone.")
        ("libxrandr" ,libxrandr)
        ("eudev" ,eudev)
        ("libjpeg" ,libjpeg)
-       ("libsndfile" ,libsndfile)))
+       ("libsndfile" ,libsndfile)
+       ("stb-image" ,stb-image)
+       ("stb-image-write" ,stb-image-write)))
     (propagated-inputs
      ;; In Requires.private of pkg-config files.
      `(("flac" ,flac)
-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32155; Package guix-patches. (Sat, 14 Jul 2018 14:48:01 GMT) Full text and rfc822 format available.

Message #20 received at 32155 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: 32155 <at> debbugs.gnu.org
Subject: Re: [PATCH 4/4] gnu: sfml: Remove all bundled dependencies.
Date: Sat, 14 Jul 2018 16:47:46 +0200
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

> * gnu/packages/game-development.scm (sfml)[source](snippet): New field.
> [inputs]: Add STB-IMAGE and STB-IMAGE-WRITE.

[...]

> +              (modules '((guix build utils)
> +                         (ice-9 ftw)))

Whoops, (ice-9 ftw) is not needed (anymore ;-)).  Fixed locally.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32155; Package guix-patches. (Tue, 17 Jul 2018 21:17:01 GMT) Full text and rfc822 format available.

Message #23 received at 32155 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 32155 <at> debbugs.gnu.org
Subject: Re: [bug#32155] [PATCH 0/4] sfml updates
Date: Tue, 17 Jul 2018 23:16:03 +0200
Hello Marius,

Marius Bakke <mbakke <at> fastmail.com> skribis:

> This series updates sfml to the latest release, and adds some of the
> "stb" <https://github.com/nothings/stb> libraries in order to unbundle
> all dependencies.
>
> Marius Bakke (4):
>   gnu: sfml: Update to 2.5.0.
>   gnu: Add stb-image.
>   gnu: Add stb-image-write.
>   gnu: sfml: Remove all bundled dependencies.

It all LGTM!

> +(define (make-stb-header-package name version description)
> +  (package
> +    (inherit stb)
> +    (name name)
> +    (version version)
> +    (source #f)
> +    (inputs `(("stb" ,stb)))
> +    (build-system trivial-build-system)
> +    (arguments
> +     `(#:modules ((guix build utils))
> +       #:builder (begin
> +                   (use-modules (guix build utils))
> +                   (let ((stb (assoc-ref %build-inputs "stb"))
> +                         (lib (string-join (string-split ,name #\-) "_"))
> +                         (out (assoc-ref %outputs "out")))
> +                     (install-file (string-append stb "/" lib ".h")
> +                                   (string-append out "/include"))
> +                     #t))))
> +    (description description)))
> +
> +(define-public stb-image
> +  (make-stb-header-package
> +   "stb-image" "2.19"
> +   "stb-image is a small and self-contained library for image loading or
> +decoding from file or memory.  A variety of formats are supported."))

Not sure if it really matters here, but note that the description here
won’t be subject to translation.

To make it translatable, it would have to be embedded in a (description
"…") form.  I address that with phony macros as in
‘define-word-list-dictionary’ in aspell.scm.

Thanks,
Ludo’.




Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Tue, 17 Jul 2018 23:19:02 GMT) Full text and rfc822 format available.

Notification sent to Marius Bakke <mbakke <at> fastmail.com>:
bug acknowledged by developer. (Tue, 17 Jul 2018 23:19:02 GMT) Full text and rfc822 format available.

Message #28 received at 32155-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 32155-done <at> debbugs.gnu.org
Subject: Re: [bug#32155] [PATCH 0/4] sfml updates
Date: Wed, 18 Jul 2018 01:18:35 +0200
[Message part 1 (text/plain, inline)]
Hello Ludo,

ludo <at> gnu.org (Ludovic Courtès) writes:

>> +(define (make-stb-header-package name version description)
>> +  (package
>> +    (inherit stb)
>> +    (name name)
>> +    (version version)
>> +    (source #f)
>> +    (inputs `(("stb" ,stb)))
>> +    (build-system trivial-build-system)
>> +    (arguments
>> +     `(#:modules ((guix build utils))
>> +       #:builder (begin
>> +                   (use-modules (guix build utils))
>> +                   (let ((stb (assoc-ref %build-inputs "stb"))
>> +                         (lib (string-join (string-split ,name #\-) "_"))
>> +                         (out (assoc-ref %outputs "out")))
>> +                     (install-file (string-append stb "/" lib ".h")
>> +                                   (string-append out "/include"))
>> +                     #t))))
>> +    (description description)))
>> +
>> +(define-public stb-image
>> +  (make-stb-header-package
>> +   "stb-image" "2.19"
>> +   "stb-image is a small and self-contained library for image loading or
>> +decoding from file or memory.  A variety of formats are supported."))
>
> Not sure if it really matters here, but note that the description here
> won’t be subject to translation.
>
> To make it translatable, it would have to be embedded in a (description
> "…") form.  I address that with phony macros as in
> ‘define-word-list-dictionary’ in aspell.scm.

Oh, thanks for the heads-up!  I did not know that.

I added a TODO note about it and committed.

As always, thanks a lot for reviewing! :-)
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 15 Aug 2018 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 277 days ago.

Previous Next


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