all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#28164] gnu: red-eclipse: Add store "data" package path as default
@ 2017-08-20 18:28 Adonay Felipe Nogueira
  2017-09-23 15:30 ` Kei Kebreau
  0 siblings, 1 reply; 8+ messages in thread
From: Adonay Felipe Nogueira @ 2017-08-20 18:28 UTC (permalink / raw)
  To: 28164

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

This is an attempt to fix bug#25034
([[https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25034]]).

-- 
- [[https://libreplanet.org/wiki/User:Adfeno]]
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, use o GNU Ring ou o Tox.
- Contato: [[https://libreplanet.org/wiki/User:Adfeno#vCard]]
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.

[-- Attachment #2: 0001-gnu-red-eclipse-Add-store-data-package-path-as-defau.patch --]
[-- Type: text/x-diff, Size: 12682 bytes --]

From 6e1d96b5aeaca1a307d8fa42d12fc233e9cd831b Mon Sep 17 00:00:00 2001
From: Adonay Felipe Nogueira <adfeno@hyperbola.info>
Date: Sun, 20 Aug 2017 14:51:16 -0300
Subject: [PATCH] gnu: red-eclipse: Add store "data" package path as default

* gnu/packages/games.scm (red-eclipse): Remove "#t"s and extra spaces. Make version respect documentation.
[arguments]: Add "prefix" to make-flags. Add "add-store-data-package-path-as-default" phase. Improve "copy-data" phase.
---
 gnu/packages/games.scm | 117 +++++++++++++++++++++++++++++--------------------
 1 file changed, 69 insertions(+), 48 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 7932e84..f8243a6 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -24,7 +24,7 @@
 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Steve Webber <webber.sl@gmail.com>
-;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
+;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
@@ -133,6 +133,7 @@
   #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages networking)
+  #:use-module (guix build utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system haskell)
   #:use-module (guix build-system python)
@@ -2716,50 +2717,55 @@ http://lavachat.symlynx.com/unix/")
     (license license:gpl2+)))
 
 (define-public red-eclipse
-  (let ((data-sources
-         '(("acerspyro"   "0zmg78scrfdv33h7vszqvzylcqjwg7d5b0j2riav3rjfh326j8xx")
-           ("actors"      "0l00rsvppqzdpsikm5qpj38jiygirszxlzay2nxp4g4n2qjq0m4a")
-           ("appleflap"   "0jhfr7f13hk3nswwxqc4jajriipr6zz6j63v955nv4sgxs7lzbjd")
-           ("blendbrush"  "1nk0zaisbqf2khrivq8ls6z2lnh6d51m133m2ppxk7k4c9gq1imq")
-           ("caustics"    "1hq08k476wayi0kmk4ps8h6jr75yinq04f1r2p8r79xsdpxq9my5")
-           ("crosshairs"  "1gmrmjm7i7n9py0qrzamk7ygi63yx1mr2pp6iwz2vwngprl03n8m")
-           ("dziq"        "0gr36ydrv8syjxv7w9dw3ix8waaq201fzxr0klkqp260p8xp215s")
-           ("elyvisions"  "05syxlpsap6nfwxnnd0ls7qj1p4vhw2jxi41pi5inwpfifapfphz")
-           ("fonts"       "184syks602xc657q08973w5ji50x5zssvd4vp2q2ig8m68iyr51c")
+  (let ((release "1.5.8")
+        (revision 2)
+        (data-sources
+         '(("acerspyro" "0zmg78scrfdv33h7vszqvzylcqjwg7d5b0j2riav3rjfh326j8xx")
+           ("actors" "0l00rsvppqzdpsikm5qpj38jiygirszxlzay2nxp4g4n2qjq0m4a")
+           ("appleflap" "0jhfr7f13hk3nswwxqc4jajriipr6zz6j63v955nv4sgxs7lzbjd")
+           ("blendbrush" "1nk0zaisbqf2khrivq8ls6z2lnh6d51m133m2ppxk7k4c9gq1imq")
+           ("caustics" "1hq08k476wayi0kmk4ps8h6jr75yinq04f1r2p8r79xsdpxq9my5")
+           ("crosshairs" "1gmrmjm7i7n9py0qrzamk7ygi63yx1mr2pp6iwz2vwngprl03n8m")
+           ("dziq" "0gr36ydrv8syjxv7w9dw3ix8waaq201fzxr0klkqp260p8xp215s")
+           ("elyvisions" "05syxlpsap6nfwxnnd0ls7qj1p4vhw2jxi41pi5inwpfifapfphz")
+           ("fonts" "184syks602xc657q08973w5ji50x5zssvd4vp2q2ig8m68iyr51c")
            ("freezurbern" "020gpgcpy4rqjd9d18npfm96j8f02jcjnccbxcgzk1yb58y687ya")
-           ("john"        "0hj5kwlb2gb0gsnl9bk7dkqlk8r7vxcw8gxpgrb3kfn8d9cwcb7k")
-           ("jojo"        "0fij06040r7s5p7jksxm7wxi9jqwkhhm8iywys0dagk8j2wcbvsz")
-           ("jwin"        "0ysfynjvypc8dszf7rsvk02jgw8fmsli49vy2xpm83zpkrqpddgf")
+           ("john" "0hj5kwlb2gb0gsnl9bk7dkqlk8r7vxcw8gxpgrb3kfn8d9cwcb7k")
+           ("jojo" "0fij06040r7s5p7jksxm7wxi9jqwkhhm8iywys0dagk8j2wcbvsz")
+           ("jwin" "0ysfynjvypc8dszf7rsvk02jgw8fmsli49vy2xpm83zpkrqpddgf")
            ("luckystrike" "1bm0xdqjv35ry5xwbzw3a3v1xf2gj1jwfg29nyl6w3ch0h6crr11")
-           ("maps"        "0c9d1zxmpnngwhchzw6xb6cf84cx8xyycmdqcvyhamrd95d96qma")
-           ("mayhem"      "133pdql7ari159skd9qdmw0p1m73x32d1v6jswkz0xwk8vgxmkil")
-           ("mikeplus64"  "1d5npn9wlw0mviz9vhzzcsj98jvfh1wbvlh1nyqfj4ws5nfxhs7x")
-           ("misc"        "19x2ps6yxnfrz0xdhqdwncaq25ds7i4w2l8sdfi95yh2r7c5k1qn")
-           ("nieb"        "15029nipl92cb0jbh46z00k51hf3jk4v05pwx266b6b11bapdz0c")
-           ("nobiax"      "0k9apim5z4ihd5ajmnbq4gyh24w872dv0mr5v8wqn31a8gxzahhp")
-           ("particles"   "06827r9pnhzjil381xiwcbc93v9nxin7qlr59yrvk9gdzxmklk9m")
-           ("philipk"     "1l6fhl6qz471vjn05hvk29bm8dhwnzqbmi2hdylpa9k998nzkfc1")
+           ("maps" "0c9d1zxmpnngwhchzw6xb6cf84cx8xyycmdqcvyhamrd95d96qma")
+           ("mayhem" "133pdql7ari159skd9qdmw0p1m73x32d1v6jswkz0xwk8vgxmkil")
+           ("mikeplus64" "1d5npn9wlw0mviz9vhzzcsj98jvfh1wbvlh1nyqfj4ws5nfxhs7x")
+           ("misc" "19x2ps6yxnfrz0xdhqdwncaq25ds7i4w2l8sdfi95yh2r7c5k1qn")
+           ("nieb" "15029nipl92cb0jbh46z00k51hf3jk4v05pwx266b6b11bapdz0c")
+           ("nobiax" "0k9apim5z4ihd5ajmnbq4gyh24w872dv0mr5v8wqn31a8gxzahhp")
+           ("particles" "06827r9pnhzjil381xiwcbc93v9nxin7qlr59yrvk9gdzxmklk9m")
+           ("philipk" "1l6fhl6qz471vjn05hvk29bm8dhwnzqbmi2hdylpa9k998nzkfc1")
            ("projectiles" "03ay8ik52n3vx723swqlnl5gpkzf1v1gadwj3zcnh43ch7nd2bqh")
-           ("props"       "1yxz7gfmb79sqqrkyfdzp4ar9rf5f1kpfij4nrkk1l8vbw9liksc")
-           ("skyboxes"    "1mm98mhb6yhb006p1hlic91jcwjxhq79mblxciwbqqa9c5g4yki6")
-           ("snipergoth"  "1vlpmwlg71g6l5b706gp82bc07i5bbw2zphzynm2fx49za0zdi44")
-           ("sounds"      "156g5wh8cvdh6zr33haqm566sd28ylnzdf2h4pqzpxbb2i19vbfg")
-           ("textures"    "0wkhl5cgymr9kslzhksi83hs15rb0q01xvax5khi6b4dcl3mrmsh")
-           ("torley"      "1xlag6ndjyqafl984n6d9zi96dv9aif7vrc2nvikc3iwgjwlbxav")
-           ("trak"        "12x9ix8zkqn9svy56qmdgj4x2814qh25f4srplgq691lqn9qjhvd")
-           ("ulukai"      "0gz1hd8hca2biskc85hw4jjacpsmqg9x4w6cwrka8x987xmc92k5")
-           ("unnamed"     "09v8fjy6jqypm1i121kilg3z6zpw7dm0i4gxhd9b7ihprvzvy8r7")
-           ("vanities"    "0m3vfq9l71pbb80qz4s3k8r5azmm158chqbw8snch09ymxm6h462")
-           ("vegetation"  "07yzm9lbzr624j4i652ny5p762p83gadg40c1k8gwff4y7yk55gn")
-           ("weapons"     "05fsp17gdrhjqdwia7rwdw9gcijaqwcnny8lf6krms43xmn8cj0x")
-           ("wicked"      "0jjgwzdibr5my369gwvmvbklpjlwq939zgf643rv0168xc087xb2"))))
+           ("props" "1yxz7gfmb79sqqrkyfdzp4ar9rf5f1kpfij4nrkk1l8vbw9liksc")
+           ("skyboxes" "1mm98mhb6yhb006p1hlic91jcwjxhq79mblxciwbqqa9c5g4yki6")
+           ("snipergoth" "1vlpmwlg71g6l5b706gp82bc07i5bbw2zphzynm2fx49za0zdi44")
+           ("sounds" "156g5wh8cvdh6zr33haqm566sd28ylnzdf2h4pqzpxbb2i19vbfg")
+           ("textures" "0wkhl5cgymr9kslzhksi83hs15rb0q01xvax5khi6b4dcl3mrmsh")
+           ("torley" "1xlag6ndjyqafl984n6d9zi96dv9aif7vrc2nvikc3iwgjwlbxav")
+           ("trak" "12x9ix8zkqn9svy56qmdgj4x2814qh25f4srplgq691lqn9qjhvd")
+           ("ulukai" "0gz1hd8hca2biskc85hw4jjacpsmqg9x4w6cwrka8x987xmc92k5")
+           ("unnamed" "09v8fjy6jqypm1i121kilg3z6zpw7dm0i4gxhd9b7ihprvzvy8r7")
+           ("vanities" "0m3vfq9l71pbb80qz4s3k8r5azmm158chqbw8snch09ymxm6h462")
+           ("vegetation" "07yzm9lbzr624j4i652ny5p762p83gadg40c1k8gwff4y7yk55gn")
+           ("weapons" "05fsp17gdrhjqdwia7rwdw9gcijaqwcnny8lf6krms43xmn8cj0x")
+           ("wicked" "0jjgwzdibr5my369gwvmvbklpjlwq939zgf643rv0168xc087xb2"))))
     (package
       (name "red-eclipse")
-      (version "1.5.8")
+      (version (if (zero? revision)
+                   release
+                   (string-append release "-"
+                                  (number->string revision))))
       (source (origin
                 (method url-fetch)
                 (uri (string-append "https://github.com/red-eclipse/base"
-                                    "/archive/v" version ".tar.gz"))
+                                    "/archive/v" release ".tar.gz"))
                 (file-name (string-append name "-" version ".tar.gz"))
                 (sha256
                  (base32
@@ -2769,7 +2775,9 @@ http://lavachat.symlynx.com/unix/")
        `(#:tests? #f            ; no check target
          #:make-flags (list "CC=gcc" "-Csrc"
                             (string-append "INSTDIR="
-                                           (assoc-ref %outputs "out") "/bin"))
+                                           (assoc-ref %outputs "out") "/bin")
+                            (string-append "prefix="
+                                           (assoc-ref %outputs "out")))
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'unpack-data
@@ -2782,17 +2790,29 @@ http://lavachat.symlynx.com/unix/")
                                     "-Cdata"
                                     "--transform"
                                     (string-append "s/"
-                                                   name "-" ,version "/"
+                                                   name "-" ,release "/"
                                                    name "/")))
-                         (list ,@(map car data-sources)))
-               #t))
+                         (list ,@(map car data-sources)))))
+	   (add-after 'unpack-data 'add-store-data-package-path-as-default
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* "src/engine/server.cpp"
+                 (("(else[[:space:]]*)((addpackagedir\\()\"data\"(\\);))" _ else_part addpackagedir_original addpackagedir_open addpackagedir_close)
+                  (string-append else_part
+                                 "{ "
+                                 addpackagedir_open
+                                 "\""
+                                 (assoc-ref outputs "out")
+                                 "/share/redeclipse/data\""
+                                 addpackagedir_close
+                                 " "
+                                 addpackagedir_original
+                                 " }")))))
            (delete 'configure)  ; no configure script
            (add-after 'set-paths 'set-sdl-paths
              (lambda* (#:key inputs #:allow-other-keys)
                (setenv "CPATH"
                        (string-append (assoc-ref inputs "sdl-union")
-                                      "/include/SDL2"))
-               #t))
+                                      "/include/SDL2"))))
            (add-after 'install 'copy-data
              (lambda* (#:key outputs #:allow-other-keys)
                (let ((out (assoc-ref outputs "out")))
@@ -2801,8 +2821,10 @@ http://lavachat.symlynx.com/unix/")
                  (copy-file "doc/examples/servinit.cfg"
                             (string-append out "/config/servinit.cfg"))
                  (copy-recursively "data"
-                                   (string-append out "/data")))
-               #t))
+                                   (string-append out "/share/redeclipse/data"))
+                 (mkdir-p (string-append out "/lib/redeclipse"))
+		 (symlink (string-append out "/share/redeclipse/data")
+		 	  (string-append out "/lib/redeclipse/data")))))
            (add-after 'copy-data 'wrap-program
              (lambda* (#:key inputs outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
@@ -2831,8 +2853,7 @@ exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
                                (string-append out)
                                (string-append bin))))
                    (chmod "redeclipse_linux" #o555)
-                   (chmod "redeclipse_server_linux" #o555)))
-               #t)))))
+                   (chmod "redeclipse_server_linux" #o555))))))))
       (native-inputs `(("pkg-config" ,pkg-config)))
       (inputs
        `(("curl" ,curl)
@@ -2848,7 +2869,7 @@ exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
                            (method url-fetch)
                            (uri (string-append
                                  "https://github.com/red-eclipse/"
-                                 name "/archive/v" version ".tar.gz"))
+                                 name "/archive/v" release ".tar.gz"))
                            (sha256 (base32 hash))
                            (file-name (string-append name "-" version
                                                      ".tar.gz"))))))
-- 
1.9.1


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

* [bug#28164] gnu: red-eclipse: Add store "data" package path as default
  2017-08-20 18:28 [bug#28164] gnu: red-eclipse: Add store "data" package path as default Adonay Felipe Nogueira
@ 2017-09-23 15:30 ` Kei Kebreau
  2017-10-07 20:49   ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Kei Kebreau @ 2017-09-23 15:30 UTC (permalink / raw)
  To: Adonay Felipe Nogueira; +Cc: 28164

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

Adonay Felipe Nogueira <adfeno@hyperbola.info> writes:

> This is an attempt to fix bug#25034
> ([[https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25034]]).
>

Nice catch!

> -- 
> - [[https://libreplanet.org/wiki/User:Adfeno]]
> - Palestrante e consultor sobre /software/ livre (não confundir com
>   gratis).
> - "WhatsApp"? Ele não é livre. Por favor, use o GNU Ring ou o Tox.
> - Contato: [[https://libreplanet.org/wiki/User:Adfeno#vCard]]
> - Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
>   Office, MP3, MP4, WMA, WMV.
> - Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
>   GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
>   (apenas sem DRM), PNG, TXT, WEBM.
>
>>From 6e1d96b5aeaca1a307d8fa42d12fc233e9cd831b Mon Sep 17 00:00:00 2001
> From: Adonay Felipe Nogueira <adfeno@hyperbola.info>
> Date: Sun, 20 Aug 2017 14:51:16 -0300
> Subject: [PATCH] gnu: red-eclipse: Add store "data" package path as default
>
> * gnu/packages/games.scm (red-eclipse): Remove "#t"s and extra spaces. Make version respect documentation.

This spacing is there to make the list more readable. I suppose the
spaces could be removed, but I'd prefer to keep them if we don't have to
get rid of them.

Also, the "#t"s were there to make sure that the phases returned true
like they're supposed to. They should probably stay unless that
convention has changed.

> [arguments]: Add "prefix" to make-flags. Add
> "add-store-data-package-path-as-default" phase. Improve "copy-data"
> phase.

I tried removing "prefix" from the make-flags and everything still seems
to work fine. Am I missing what this is intended to do, or was it left
over from some earlier work on this patch?

> ---
>  gnu/packages/games.scm | 117 +++++++++++++++++++++++++++++--------------------
>  1 file changed, 69 insertions(+), 48 deletions(-)
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 7932e84..f8243a6 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -24,7 +24,7 @@
>  ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
>  ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
>  ;;; Copyright © 2016 Steve Webber <webber.sl@gmail.com>
> -;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
> +;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
>  ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
>  ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
>  ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
> @@ -133,6 +133,7 @@
>    #:use-module (gnu packages gnuzilla)
>    #:use-module (gnu packages icu4c)
>    #:use-module (gnu packages networking)
> +  #:use-module (guix build utils)
>    #:use-module (guix build-system gnu)
>    #:use-module (guix build-system haskell)
>    #:use-module (guix build-system python)
> @@ -2716,50 +2717,55 @@ http://lavachat.symlynx.com/unix/")
>      (license license:gpl2+)))
>  
>  (define-public red-eclipse
> -  (let ((data-sources
> -         '(("acerspyro"   "0zmg78scrfdv33h7vszqvzylcqjwg7d5b0j2riav3rjfh326j8xx")
> -           ("actors"      "0l00rsvppqzdpsikm5qpj38jiygirszxlzay2nxp4g4n2qjq0m4a")
> -           ("appleflap"   "0jhfr7f13hk3nswwxqc4jajriipr6zz6j63v955nv4sgxs7lzbjd")
> -           ("blendbrush"  "1nk0zaisbqf2khrivq8ls6z2lnh6d51m133m2ppxk7k4c9gq1imq")
> -           ("caustics"    "1hq08k476wayi0kmk4ps8h6jr75yinq04f1r2p8r79xsdpxq9my5")
> -           ("crosshairs"  "1gmrmjm7i7n9py0qrzamk7ygi63yx1mr2pp6iwz2vwngprl03n8m")
> -           ("dziq"        "0gr36ydrv8syjxv7w9dw3ix8waaq201fzxr0klkqp260p8xp215s")
> -           ("elyvisions"  "05syxlpsap6nfwxnnd0ls7qj1p4vhw2jxi41pi5inwpfifapfphz")
> -           ("fonts"       "184syks602xc657q08973w5ji50x5zssvd4vp2q2ig8m68iyr51c")
> +  (let ((release "1.5.8")
> +        (revision 2)
> +        (data-sources
> +         '(("acerspyro" "0zmg78scrfdv33h7vszqvzylcqjwg7d5b0j2riav3rjfh326j8xx")
> +           ("actors" "0l00rsvppqzdpsikm5qpj38jiygirszxlzay2nxp4g4n2qjq0m4a")
> +           ("appleflap" "0jhfr7f13hk3nswwxqc4jajriipr6zz6j63v955nv4sgxs7lzbjd")
> +           ("blendbrush" "1nk0zaisbqf2khrivq8ls6z2lnh6d51m133m2ppxk7k4c9gq1imq")
> +           ("caustics" "1hq08k476wayi0kmk4ps8h6jr75yinq04f1r2p8r79xsdpxq9my5")
> +           ("crosshairs" "1gmrmjm7i7n9py0qrzamk7ygi63yx1mr2pp6iwz2vwngprl03n8m")
> +           ("dziq" "0gr36ydrv8syjxv7w9dw3ix8waaq201fzxr0klkqp260p8xp215s")
> +           ("elyvisions" "05syxlpsap6nfwxnnd0ls7qj1p4vhw2jxi41pi5inwpfifapfphz")
> +           ("fonts" "184syks602xc657q08973w5ji50x5zssvd4vp2q2ig8m68iyr51c")
>             ("freezurbern" "020gpgcpy4rqjd9d18npfm96j8f02jcjnccbxcgzk1yb58y687ya")
> -           ("john"        "0hj5kwlb2gb0gsnl9bk7dkqlk8r7vxcw8gxpgrb3kfn8d9cwcb7k")
> -           ("jojo"        "0fij06040r7s5p7jksxm7wxi9jqwkhhm8iywys0dagk8j2wcbvsz")
> -           ("jwin"        "0ysfynjvypc8dszf7rsvk02jgw8fmsli49vy2xpm83zpkrqpddgf")
> +           ("john" "0hj5kwlb2gb0gsnl9bk7dkqlk8r7vxcw8gxpgrb3kfn8d9cwcb7k")
> +           ("jojo" "0fij06040r7s5p7jksxm7wxi9jqwkhhm8iywys0dagk8j2wcbvsz")
> +           ("jwin" "0ysfynjvypc8dszf7rsvk02jgw8fmsli49vy2xpm83zpkrqpddgf")
>             ("luckystrike" "1bm0xdqjv35ry5xwbzw3a3v1xf2gj1jwfg29nyl6w3ch0h6crr11")
> -           ("maps"        "0c9d1zxmpnngwhchzw6xb6cf84cx8xyycmdqcvyhamrd95d96qma")
> -           ("mayhem"      "133pdql7ari159skd9qdmw0p1m73x32d1v6jswkz0xwk8vgxmkil")
> -           ("mikeplus64"  "1d5npn9wlw0mviz9vhzzcsj98jvfh1wbvlh1nyqfj4ws5nfxhs7x")
> -           ("misc"        "19x2ps6yxnfrz0xdhqdwncaq25ds7i4w2l8sdfi95yh2r7c5k1qn")
> -           ("nieb"        "15029nipl92cb0jbh46z00k51hf3jk4v05pwx266b6b11bapdz0c")
> -           ("nobiax"      "0k9apim5z4ihd5ajmnbq4gyh24w872dv0mr5v8wqn31a8gxzahhp")
> -           ("particles"   "06827r9pnhzjil381xiwcbc93v9nxin7qlr59yrvk9gdzxmklk9m")
> -           ("philipk"     "1l6fhl6qz471vjn05hvk29bm8dhwnzqbmi2hdylpa9k998nzkfc1")
> +           ("maps" "0c9d1zxmpnngwhchzw6xb6cf84cx8xyycmdqcvyhamrd95d96qma")
> +           ("mayhem" "133pdql7ari159skd9qdmw0p1m73x32d1v6jswkz0xwk8vgxmkil")
> +           ("mikeplus64" "1d5npn9wlw0mviz9vhzzcsj98jvfh1wbvlh1nyqfj4ws5nfxhs7x")
> +           ("misc" "19x2ps6yxnfrz0xdhqdwncaq25ds7i4w2l8sdfi95yh2r7c5k1qn")
> +           ("nieb" "15029nipl92cb0jbh46z00k51hf3jk4v05pwx266b6b11bapdz0c")
> +           ("nobiax" "0k9apim5z4ihd5ajmnbq4gyh24w872dv0mr5v8wqn31a8gxzahhp")
> +           ("particles" "06827r9pnhzjil381xiwcbc93v9nxin7qlr59yrvk9gdzxmklk9m")
> +           ("philipk" "1l6fhl6qz471vjn05hvk29bm8dhwnzqbmi2hdylpa9k998nzkfc1")
>             ("projectiles" "03ay8ik52n3vx723swqlnl5gpkzf1v1gadwj3zcnh43ch7nd2bqh")
> -           ("props"       "1yxz7gfmb79sqqrkyfdzp4ar9rf5f1kpfij4nrkk1l8vbw9liksc")
> -           ("skyboxes"    "1mm98mhb6yhb006p1hlic91jcwjxhq79mblxciwbqqa9c5g4yki6")
> -           ("snipergoth"  "1vlpmwlg71g6l5b706gp82bc07i5bbw2zphzynm2fx49za0zdi44")
> -           ("sounds"      "156g5wh8cvdh6zr33haqm566sd28ylnzdf2h4pqzpxbb2i19vbfg")
> -           ("textures"    "0wkhl5cgymr9kslzhksi83hs15rb0q01xvax5khi6b4dcl3mrmsh")
> -           ("torley"      "1xlag6ndjyqafl984n6d9zi96dv9aif7vrc2nvikc3iwgjwlbxav")
> -           ("trak"        "12x9ix8zkqn9svy56qmdgj4x2814qh25f4srplgq691lqn9qjhvd")
> -           ("ulukai"      "0gz1hd8hca2biskc85hw4jjacpsmqg9x4w6cwrka8x987xmc92k5")
> -           ("unnamed"     "09v8fjy6jqypm1i121kilg3z6zpw7dm0i4gxhd9b7ihprvzvy8r7")
> -           ("vanities"    "0m3vfq9l71pbb80qz4s3k8r5azmm158chqbw8snch09ymxm6h462")
> -           ("vegetation"  "07yzm9lbzr624j4i652ny5p762p83gadg40c1k8gwff4y7yk55gn")
> -           ("weapons"     "05fsp17gdrhjqdwia7rwdw9gcijaqwcnny8lf6krms43xmn8cj0x")
> -           ("wicked"      "0jjgwzdibr5my369gwvmvbklpjlwq939zgf643rv0168xc087xb2"))))
> +           ("props" "1yxz7gfmb79sqqrkyfdzp4ar9rf5f1kpfij4nrkk1l8vbw9liksc")
> +           ("skyboxes" "1mm98mhb6yhb006p1hlic91jcwjxhq79mblxciwbqqa9c5g4yki6")
> +           ("snipergoth" "1vlpmwlg71g6l5b706gp82bc07i5bbw2zphzynm2fx49za0zdi44")
> +           ("sounds" "156g5wh8cvdh6zr33haqm566sd28ylnzdf2h4pqzpxbb2i19vbfg")
> +           ("textures" "0wkhl5cgymr9kslzhksi83hs15rb0q01xvax5khi6b4dcl3mrmsh")
> +           ("torley" "1xlag6ndjyqafl984n6d9zi96dv9aif7vrc2nvikc3iwgjwlbxav")
> +           ("trak" "12x9ix8zkqn9svy56qmdgj4x2814qh25f4srplgq691lqn9qjhvd")
> +           ("ulukai" "0gz1hd8hca2biskc85hw4jjacpsmqg9x4w6cwrka8x987xmc92k5")
> +           ("unnamed" "09v8fjy6jqypm1i121kilg3z6zpw7dm0i4gxhd9b7ihprvzvy8r7")
> +           ("vanities" "0m3vfq9l71pbb80qz4s3k8r5azmm158chqbw8snch09ymxm6h462")
> +           ("vegetation" "07yzm9lbzr624j4i652ny5p762p83gadg40c1k8gwff4y7yk55gn")
> +           ("weapons" "05fsp17gdrhjqdwia7rwdw9gcijaqwcnny8lf6krms43xmn8cj0x")
> +           ("wicked" "0jjgwzdibr5my369gwvmvbklpjlwq939zgf643rv0168xc087xb2"))))
>      (package
>        (name "red-eclipse")
> -      (version "1.5.8")
> +      (version (if (zero? revision)
> +                   release
> +                   (string-append release "-"
> +                                  (number->string revision))))
>        (source (origin
>                  (method url-fetch)
>                  (uri (string-append "https://github.com/red-eclipse/base"
> -                                    "/archive/v" version ".tar.gz"))
> +                                    "/archive/v" release ".tar.gz"))
>                  (file-name (string-append name "-" version ".tar.gz"))

The file-name now needs to use the upstream release number instead of the
Guix-specific version number.

>                  (sha256
>                   (base32
> @@ -2769,7 +2775,9 @@ http://lavachat.symlynx.com/unix/")
>         `(#:tests? #f            ; no check target
>           #:make-flags (list "CC=gcc" "-Csrc"
>                              (string-append "INSTDIR="
> -                                           (assoc-ref %outputs "out") "/bin"))
> +                                           (assoc-ref %outputs "out") "/bin")
> +                            (string-append "prefix="
> +                                           (assoc-ref %outputs "out")))
>           #:phases
>           (modify-phases %standard-phases
>             (add-after 'unpack 'unpack-data
> @@ -2782,17 +2790,29 @@ http://lavachat.symlynx.com/unix/")
>                                      "-Cdata"
>                                      "--transform"
>                                      (string-append "s/"
> -                                                   name "-" ,version "/"
> +                                                   name "-" ,release "/"
>                                                     name "/")))
> -                         (list ,@(map car data-sources)))
> -               #t))
> +                         (list ,@(map car data-sources)))))
> +	   (add-after 'unpack-data 'add-store-data-package-path-as-default
> +             (lambda* (#:key outputs #:allow-other-keys)
> +               (substitute* "src/engine/server.cpp"
> +                 (("(else[[:space:]]*)((addpackagedir\\()\"data\"(\\);))" _ else_part addpackagedir_original addpackagedir_open addpackagedir_close)
> +                  (string-append else_part
> +                                 "{ "
> +                                 addpackagedir_open
> +                                 "\""
> +                                 (assoc-ref outputs "out")
> +                                 "/share/redeclipse/data\""
> +                                 addpackagedir_close
> +                                 " "
> +                                 addpackagedir_original
> +                                 " }")))))
>             (delete 'configure)  ; no configure script
>             (add-after 'set-paths 'set-sdl-paths
>               (lambda* (#:key inputs #:allow-other-keys)
>                 (setenv "CPATH"
>                         (string-append (assoc-ref inputs "sdl-union")
> -                                      "/include/SDL2"))
> -               #t))
> +                                      "/include/SDL2"))))
>             (add-after 'install 'copy-data
>               (lambda* (#:key outputs #:allow-other-keys)
>                 (let ((out (assoc-ref outputs "out")))
> @@ -2801,8 +2821,10 @@ http://lavachat.symlynx.com/unix/")
>                   (copy-file "doc/examples/servinit.cfg"
>                              (string-append out "/config/servinit.cfg"))
>                   (copy-recursively "data"
> -                                   (string-append out "/data")))
> -               #t))
> +                                   (string-append out "/share/redeclipse/data"))
> +                 (mkdir-p (string-append out "/lib/redeclipse"))
> +		 (symlink (string-append out "/share/redeclipse/data")
> +		 	  (string-append out "/lib/redeclipse/data")))))
>             (add-after 'copy-data 'wrap-program
>               (lambda* (#:key inputs outputs #:allow-other-keys)
>                 (let* ((out (assoc-ref outputs "out"))
> @@ -2831,8 +2853,7 @@ exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
>                                 (string-append out)
>                                 (string-append bin))))
>                     (chmod "redeclipse_linux" #o555)
> -                   (chmod "redeclipse_server_linux" #o555)))
> -               #t)))))
> +                   (chmod "redeclipse_server_linux" #o555))))))))
>        (native-inputs `(("pkg-config" ,pkg-config)))
>        (inputs
>         `(("curl" ,curl)
> @@ -2848,7 +2869,7 @@ exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
>                             (method url-fetch)
>                             (uri (string-append
>                                   "https://github.com/red-eclipse/"
> -                                 name "/archive/v" version ".tar.gz"))
> +                                 name "/archive/v" release ".tar.gz"))
>                             (sha256 (base32 hash))
>                             (file-name (string-append name "-" version
>                                                       ".tar.gz"))))))

Thanks for your work!

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

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

* [bug#28164] gnu: red-eclipse: Add store "data" package path as default
  2017-09-23 15:30 ` Kei Kebreau
@ 2017-10-07 20:49   ` Ludovic Courtès
  2017-10-09 16:34     ` Kei Kebreau
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2017-10-07 20:49 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: 28164

Kei Kebreau <kkebreau@posteo.net> skribis:

> Adonay Felipe Nogueira <adfeno@hyperbola.info> writes:
>
>> This is an attempt to fix bug#25034
>> ([[https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25034]]).
>>
>
> Nice catch!

Kei, Adonay: what's the status of this patch?

  https://bugs.gnu.org/28164

TIA,
Ludo'.

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

* [bug#28164] gnu: red-eclipse: Add store "data" package path as default
  2017-10-07 20:49   ` Ludovic Courtès
@ 2017-10-09 16:34     ` Kei Kebreau
  2017-10-09 16:58       ` Adonay Felipe Nogueira
  2017-10-10  7:20       ` Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Kei Kebreau @ 2017-10-09 16:34 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 28164


[-- Attachment #1.1: Type: text/plain, Size: 721 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>> Adonay Felipe Nogueira <adfeno@hyperbola.info> writes:
>>
>>> This is an attempt to fix bug#25034
>>> ([[https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25034]]).
>>>
>>
>> Nice catch!
>
> Kei, Adonay: what's the status of this patch?
>
>   https://bugs.gnu.org/28164
>
> TIA,
> Ludo'.

I've attached the tentative patch, which differs a bit from Adonay's
patch. Namely, I've kept the #t's at the end of the phases, changed
from the version string ("1.5.8-2") to release ("1.5.8") in the URL so
the download works again and corrected the sha256 hash becuase of the
new file name based on the version string.

[-- Attachment #1.2: 0001-gnu-red-eclipse-Add-store-data-package-path-as-defau.patch --]
[-- Type: text/plain, Size: 11897 bytes --]

From 59e71c1f353fc895318612e7cffe890e1caac029 Mon Sep 17 00:00:00 2001
From: Adonay Felipe Nogueira <adfeno@hyperbola.info>
Date: Sun, 20 Aug 2017 15:28:20 -0300
Subject: [PATCH] gnu: red-eclipse: Add store "data" package path as default.

* gnu/packages/games.scm (red-eclipse): Remove extra spaces. Make version
respect documentation.
[arguments]: Add "prefix" to make-flags. Add
"add-store-data-package-path-as-default" phase. Improve "copy-data" phase.

Signed-off-by: Kei Kebreau <kkebreau@posteo.net>
---
 gnu/packages/games.scm | 110 ++++++++++++++++++++++++++++++-------------------
 1 file changed, 68 insertions(+), 42 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 7729c5b3b..3702c3c61 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -24,7 +24,7 @@
 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Steve Webber <webber.sl@gmail.com>
-;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
+;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
@@ -133,6 +133,7 @@
   #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages networking)
+  #:use-module (guix build utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system haskell)
   #:use-module (guix build-system python)
@@ -2796,60 +2797,67 @@ http://lavachat.symlynx.com/unix/")
     (license license:gpl2+)))
 
 (define-public red-eclipse
-  (let ((data-sources
-         '(("acerspyro"   "0zmg78scrfdv33h7vszqvzylcqjwg7d5b0j2riav3rjfh326j8xx")
-           ("actors"      "0l00rsvppqzdpsikm5qpj38jiygirszxlzay2nxp4g4n2qjq0m4a")
-           ("appleflap"   "0jhfr7f13hk3nswwxqc4jajriipr6zz6j63v955nv4sgxs7lzbjd")
-           ("blendbrush"  "1nk0zaisbqf2khrivq8ls6z2lnh6d51m133m2ppxk7k4c9gq1imq")
-           ("caustics"    "1hq08k476wayi0kmk4ps8h6jr75yinq04f1r2p8r79xsdpxq9my5")
-           ("crosshairs"  "1gmrmjm7i7n9py0qrzamk7ygi63yx1mr2pp6iwz2vwngprl03n8m")
-           ("dziq"        "0gr36ydrv8syjxv7w9dw3ix8waaq201fzxr0klkqp260p8xp215s")
-           ("elyvisions"  "05syxlpsap6nfwxnnd0ls7qj1p4vhw2jxi41pi5inwpfifapfphz")
-           ("fonts"       "184syks602xc657q08973w5ji50x5zssvd4vp2q2ig8m68iyr51c")
+  (let ((release "1.5.8")
+        (revision 2)
+        (data-sources
+         '(("acerspyro" "0zmg78scrfdv33h7vszqvzylcqjwg7d5b0j2riav3rjfh326j8xx")
+           ("actors" "0l00rsvppqzdpsikm5qpj38jiygirszxlzay2nxp4g4n2qjq0m4a")
+           ("appleflap" "0jhfr7f13hk3nswwxqc4jajriipr6zz6j63v955nv4sgxs7lzbjd")
+           ("blendbrush" "1nk0zaisbqf2khrivq8ls6z2lnh6d51m133m2ppxk7k4c9gq1imq")
+           ("caustics" "1hq08k476wayi0kmk4ps8h6jr75yinq04f1r2p8r79xsdpxq9my5")
+           ("crosshairs" "1gmrmjm7i7n9py0qrzamk7ygi63yx1mr2pp6iwz2vwngprl03n8m")
+           ("dziq" "0gr36ydrv8syjxv7w9dw3ix8waaq201fzxr0klkqp260p8xp215s")
+           ("elyvisions" "05syxlpsap6nfwxnnd0ls7qj1p4vhw2jxi41pi5inwpfifapfphz")
+           ("fonts" "184syks602xc657q08973w5ji50x5zssvd4vp2q2ig8m68iyr51c")
            ("freezurbern" "020gpgcpy4rqjd9d18npfm96j8f02jcjnccbxcgzk1yb58y687ya")
-           ("john"        "0hj5kwlb2gb0gsnl9bk7dkqlk8r7vxcw8gxpgrb3kfn8d9cwcb7k")
-           ("jojo"        "0fij06040r7s5p7jksxm7wxi9jqwkhhm8iywys0dagk8j2wcbvsz")
-           ("jwin"        "0ysfynjvypc8dszf7rsvk02jgw8fmsli49vy2xpm83zpkrqpddgf")
+           ("john" "0hj5kwlb2gb0gsnl9bk7dkqlk8r7vxcw8gxpgrb3kfn8d9cwcb7k")
+           ("jojo" "0fij06040r7s5p7jksxm7wxi9jqwkhhm8iywys0dagk8j2wcbvsz")
+           ("jwin" "0ysfynjvypc8dszf7rsvk02jgw8fmsli49vy2xpm83zpkrqpddgf")
            ("luckystrike" "1bm0xdqjv35ry5xwbzw3a3v1xf2gj1jwfg29nyl6w3ch0h6crr11")
-           ("maps"        "0c9d1zxmpnngwhchzw6xb6cf84cx8xyycmdqcvyhamrd95d96qma")
-           ("mayhem"      "133pdql7ari159skd9qdmw0p1m73x32d1v6jswkz0xwk8vgxmkil")
-           ("mikeplus64"  "1d5npn9wlw0mviz9vhzzcsj98jvfh1wbvlh1nyqfj4ws5nfxhs7x")
-           ("misc"        "19x2ps6yxnfrz0xdhqdwncaq25ds7i4w2l8sdfi95yh2r7c5k1qn")
-           ("nieb"        "15029nipl92cb0jbh46z00k51hf3jk4v05pwx266b6b11bapdz0c")
-           ("nobiax"      "0k9apim5z4ihd5ajmnbq4gyh24w872dv0mr5v8wqn31a8gxzahhp")
-           ("particles"   "06827r9pnhzjil381xiwcbc93v9nxin7qlr59yrvk9gdzxmklk9m")
-           ("philipk"     "1l6fhl6qz471vjn05hvk29bm8dhwnzqbmi2hdylpa9k998nzkfc1")
+           ("maps" "0c9d1zxmpnngwhchzw6xb6cf84cx8xyycmdqcvyhamrd95d96qma")
+           ("mayhem" "133pdql7ari159skd9qdmw0p1m73x32d1v6jswkz0xwk8vgxmkil")
+           ("mikeplus64" "1d5npn9wlw0mviz9vhzzcsj98jvfh1wbvlh1nyqfj4ws5nfxhs7x")
+           ("misc" "19x2ps6yxnfrz0xdhqdwncaq25ds7i4w2l8sdfi95yh2r7c5k1qn")
+           ("nieb" "15029nipl92cb0jbh46z00k51hf3jk4v05pwx266b6b11bapdz0c")
+           ("nobiax" "0k9apim5z4ihd5ajmnbq4gyh24w872dv0mr5v8wqn31a8gxzahhp")
+           ("particles" "06827r9pnhzjil381xiwcbc93v9nxin7qlr59yrvk9gdzxmklk9m")
+           ("philipk" "1l6fhl6qz471vjn05hvk29bm8dhwnzqbmi2hdylpa9k998nzkfc1")
            ("projectiles" "03ay8ik52n3vx723swqlnl5gpkzf1v1gadwj3zcnh43ch7nd2bqh")
-           ("props"       "1yxz7gfmb79sqqrkyfdzp4ar9rf5f1kpfij4nrkk1l8vbw9liksc")
-           ("skyboxes"    "1mm98mhb6yhb006p1hlic91jcwjxhq79mblxciwbqqa9c5g4yki6")
-           ("snipergoth"  "1vlpmwlg71g6l5b706gp82bc07i5bbw2zphzynm2fx49za0zdi44")
-           ("sounds"      "156g5wh8cvdh6zr33haqm566sd28ylnzdf2h4pqzpxbb2i19vbfg")
-           ("textures"    "0wkhl5cgymr9kslzhksi83hs15rb0q01xvax5khi6b4dcl3mrmsh")
-           ("torley"      "1xlag6ndjyqafl984n6d9zi96dv9aif7vrc2nvikc3iwgjwlbxav")
-           ("trak"        "12x9ix8zkqn9svy56qmdgj4x2814qh25f4srplgq691lqn9qjhvd")
-           ("ulukai"      "0gz1hd8hca2biskc85hw4jjacpsmqg9x4w6cwrka8x987xmc92k5")
-           ("unnamed"     "09v8fjy6jqypm1i121kilg3z6zpw7dm0i4gxhd9b7ihprvzvy8r7")
-           ("vanities"    "0m3vfq9l71pbb80qz4s3k8r5azmm158chqbw8snch09ymxm6h462")
-           ("vegetation"  "07yzm9lbzr624j4i652ny5p762p83gadg40c1k8gwff4y7yk55gn")
-           ("weapons"     "05fsp17gdrhjqdwia7rwdw9gcijaqwcnny8lf6krms43xmn8cj0x")
-           ("wicked"      "0jjgwzdibr5my369gwvmvbklpjlwq939zgf643rv0168xc087xb2"))))
+           ("props" "1yxz7gfmb79sqqrkyfdzp4ar9rf5f1kpfij4nrkk1l8vbw9liksc")
+           ("skyboxes" "1mm98mhb6yhb006p1hlic91jcwjxhq79mblxciwbqqa9c5g4yki6")
+           ("snipergoth" "1vlpmwlg71g6l5b706gp82bc07i5bbw2zphzynm2fx49za0zdi44")
+           ("sounds" "156g5wh8cvdh6zr33haqm566sd28ylnzdf2h4pqzpxbb2i19vbfg")
+           ("textures" "0wkhl5cgymr9kslzhksi83hs15rb0q01xvax5khi6b4dcl3mrmsh")
+           ("torley" "1xlag6ndjyqafl984n6d9zi96dv9aif7vrc2nvikc3iwgjwlbxav")
+           ("trak" "12x9ix8zkqn9svy56qmdgj4x2814qh25f4srplgq691lqn9qjhvd")
+           ("ulukai" "0gz1hd8hca2biskc85hw4jjacpsmqg9x4w6cwrka8x987xmc92k5")
+           ("unnamed" "09v8fjy6jqypm1i121kilg3z6zpw7dm0i4gxhd9b7ihprvzvy8r7")
+           ("vanities" "0m3vfq9l71pbb80qz4s3k8r5azmm158chqbw8snch09ymxm6h462")
+           ("vegetation" "07yzm9lbzr624j4i652ny5p762p83gadg40c1k8gwff4y7yk55gn")
+           ("weapons" "05fsp17gdrhjqdwia7rwdw9gcijaqwcnny8lf6krms43xmn8cj0x")
+           ("wicked" "0jjgwzdibr5my369gwvmvbklpjlwq939zgf643rv0168xc087xb2"))))
     (package
       (name "red-eclipse")
-      (version "1.5.8")
+      (version (if (zero? revision)
+                   release
+                   (string-append release "-"
+                                  (number->string revision))))
       (source (origin
                 (method url-fetch)
                 (uri (string-append "https://github.com/red-eclipse/base"
-                                    "/archive/v" version ".tar.gz"))
+                                    "/archive/v" release ".tar.gz"))
                 (file-name (string-append name "-" version ".tar.gz"))
                 (sha256
                  (base32
-                  "1ah92axwcai0fhgm7pvfb2dxvfdiwwyh8iqyiffndh6782hxz3bc"))))
+                  "0r66rsqxvd7hxrhb0fahqqmf3r0cw2drhv5vndbswcq90l1bxfmf"))))
       (build-system gnu-build-system)
       (arguments
        `(#:tests? #f            ; no check target
          #:make-flags (list "CC=gcc" "-Csrc"
                             (string-append "INSTDIR="
-                                           (assoc-ref %outputs "out") "/bin"))
+                                           (assoc-ref %outputs "out") "/bin")
+                            (string-append "prefix="
+                                           (assoc-ref %outputs "out")))
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'unpack-data
@@ -2862,10 +2870,25 @@ http://lavachat.symlynx.com/unix/")
                                     "-Cdata"
                                     "--transform"
                                     (string-append "s/"
-                                                   name "-" ,version "/"
+                                                   name "-" ,release "/"
                                                    name "/")))
                          (list ,@(map car data-sources)))
                #t))
+	   (add-after 'unpack-data 'add-store-data-package-path-as-default
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* "src/engine/server.cpp"
+                 (("(else[[:space:]]*)((addpackagedir\\()\"data\"(\\);))" _ else_part addpackagedir_original addpackagedir_open addpackagedir_close)
+                  (string-append else_part
+                                 "{ "
+                                 addpackagedir_open
+                                 "\""
+                                 (assoc-ref outputs "out")
+                                 "/share/redeclipse/data\""
+                                 addpackagedir_close
+                                 " "
+                                 addpackagedir_original
+                                 " }")))
+               #t))
            (delete 'configure)  ; no configure script
            (add-after 'set-paths 'set-sdl-paths
              (lambda* (#:key inputs #:allow-other-keys)
@@ -2881,7 +2904,10 @@ http://lavachat.symlynx.com/unix/")
                  (copy-file "doc/examples/servinit.cfg"
                             (string-append out "/config/servinit.cfg"))
                  (copy-recursively "data"
-                                   (string-append out "/data")))
+                                   (string-append out "/share/redeclipse/data"))
+                 (mkdir-p (string-append out "/lib/redeclipse"))
+		 (symlink (string-append out "/share/redeclipse/data")
+			  (string-append out "/lib/redeclipse/data")))
                #t))
            (add-after 'copy-data 'wrap-program
              (lambda* (#:key inputs outputs #:allow-other-keys)
@@ -2928,7 +2954,7 @@ exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
                            (method url-fetch)
                            (uri (string-append
                                  "https://github.com/red-eclipse/"
-                                 name "/archive/v" version ".tar.gz"))
+                                 name "/archive/v" release ".tar.gz"))
                            (sha256 (base32 hash))
                            (file-name (string-append name "-" version
                                                      ".tar.gz"))))))
-- 
2.14.2


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

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

* [bug#28164] gnu: red-eclipse: Add store "data" package path as default
  2017-10-09 16:34     ` Kei Kebreau
@ 2017-10-09 16:58       ` Adonay Felipe Nogueira
  2017-10-10  7:20       ` Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Adonay Felipe Nogueira @ 2017-10-09 16:58 UTC (permalink / raw)
  To: 28164

Looks good to me. ;)

Kei Kebreau <kkebreau@posteo.net> writes:

> I've attached the tentative patch, which differs a bit from Adonay's
> patch. Namely, I've kept the #t's at the end of the phases, changed
> from the version string ("1.5.8-2") to release ("1.5.8") in the URL so
> the download works again and corrected the sha256 hash becuase of the
> new file name based on the version string.

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

* [bug#28164] gnu: red-eclipse: Add store "data" package path as default
  2017-10-09 16:34     ` Kei Kebreau
  2017-10-09 16:58       ` Adonay Felipe Nogueira
@ 2017-10-10  7:20       ` Ludovic Courtès
  2017-10-10 12:27         ` bug#28164: " Kei Kebreau
  2017-10-12 13:33         ` [bug#28164] " Adonay Felipe Nogueira
  1 sibling, 2 replies; 8+ messages in thread
From: Ludovic Courtès @ 2017-10-10  7:20 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: 28164

Kei Kebreau <kkebreau@posteo.net> skribis:

> From 59e71c1f353fc895318612e7cffe890e1caac029 Mon Sep 17 00:00:00 2001
> From: Adonay Felipe Nogueira <adfeno@hyperbola.info>
> Date: Sun, 20 Aug 2017 15:28:20 -0300
> Subject: [PATCH] gnu: red-eclipse: Add store "data" package path as default.
>
> * gnu/packages/games.scm (red-eclipse): Remove extra spaces. Make version
> respect documentation.
> [arguments]: Add "prefix" to make-flags. Add
> "add-store-data-package-path-as-default" phase. Improve "copy-data" phase.
>
> Signed-off-by: Kei Kebreau <kkebreau@posteo.net>

At first sight, it LGTM.  I think you can go ahead.

Thank you Adonay & Kei!

Ludo’.

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

* bug#28164: gnu: red-eclipse: Add store "data" package path as default
  2017-10-10  7:20       ` Ludovic Courtès
@ 2017-10-10 12:27         ` Kei Kebreau
  2017-10-12 13:33         ` [bug#28164] " Adonay Felipe Nogueira
  1 sibling, 0 replies; 8+ messages in thread
From: Kei Kebreau @ 2017-10-10 12:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 28164-done

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

ludo@gnu.org (Ludovic Courtès) writes:

> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>> From 59e71c1f353fc895318612e7cffe890e1caac029 Mon Sep 17 00:00:00 2001
>> From: Adonay Felipe Nogueira <adfeno@hyperbola.info>
>> Date: Sun, 20 Aug 2017 15:28:20 -0300
>> Subject: [PATCH] gnu: red-eclipse: Add store "data" package path as default.
>>
>> * gnu/packages/games.scm (red-eclipse): Remove extra spaces. Make version
>> respect documentation.
>> [arguments]: Add "prefix" to make-flags. Add
>> "add-store-data-package-path-as-default" phase. Improve "copy-data" phase.
>>
>> Signed-off-by: Kei Kebreau <kkebreau@posteo.net>
>
> At first sight, it LGTM.  I think you can go ahead.
>
> Thank you Adonay & Kei!
>
> Ludo’.

Pushed to master as 42abb842f64f5dd7834cabd445a5f4d01f1e68a4.

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

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

* [bug#28164] gnu: red-eclipse: Add store "data" package path as default
  2017-10-10  7:20       ` Ludovic Courtès
  2017-10-10 12:27         ` bug#28164: " Kei Kebreau
@ 2017-10-12 13:33         ` Adonay Felipe Nogueira
  1 sibling, 0 replies; 8+ messages in thread
From: Adonay Felipe Nogueira @ 2017-10-12 13:33 UTC (permalink / raw)
  To: 28164

You're welcome! ;)

ludo@gnu.org (Ludovic Courtès) writes:

> At first sight, it LGTM.  I think you can go ahead.
>
> Thank you Adonay & Kei!
>
> Ludo’.
>

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

end of thread, other threads:[~2017-10-12 13:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-20 18:28 [bug#28164] gnu: red-eclipse: Add store "data" package path as default Adonay Felipe Nogueira
2017-09-23 15:30 ` Kei Kebreau
2017-10-07 20:49   ` Ludovic Courtès
2017-10-09 16:34     ` Kei Kebreau
2017-10-09 16:58       ` Adonay Felipe Nogueira
2017-10-10  7:20       ` Ludovic Courtès
2017-10-10 12:27         ` bug#28164: " Kei Kebreau
2017-10-12 13:33         ` [bug#28164] " Adonay Felipe Nogueira

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.