diff mbox series

[bug#39109] gnu: red-eclipse: Update to 2.0.0.

Message ID 20200113013240.28578-1-kkebreau@posteo.net
State Accepted
Headers show
Series [bug#39109] gnu: red-eclipse: Update to 2.0.0. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Kei Kebreau Jan. 13, 2020, 1:32 a.m. UTC
* gnu/packages/games.scm (red-eclipse): Update to 2.0.0.
[source]: Remove obsolete patch, and fetch submodules making recursive true.
[arguments]: Remove "unpack-data" phase and adjust
"add-store-data-package-path-as-default" phase.
[inputs]: Add freetype and remove data-sources.
* gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Delete file.
---
 gnu/local.mk                                  |  1 -
 gnu/packages/games.scm                        | 96 +++----------------
 .../red-eclipse-remove-gamma-name-hack.patch  | 52 ----------
 3 files changed, 12 insertions(+), 137 deletions(-)
 delete mode 100644 gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch

Comments

Christopher Baines Jan. 13, 2020, 10:31 p.m. UTC | #1
Kei Kebreau <kkebreau@posteo.net> writes:

> * gnu/packages/games.scm (red-eclipse): Update to 2.0.0.
> [source]: Remove obsolete patch, and fetch submodules making recursive true.
> [arguments]: Remove "unpack-data" phase and adjust
> "add-store-data-package-path-as-default" phase.
> [inputs]: Add freetype and remove data-sources.
> * gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch: Delete file.
> * gnu/local.mk (dist_patch_DATA): Delete file.
> ---
>  gnu/local.mk                                  |  1 -
>  gnu/packages/games.scm                        | 96 +++----------------
>  .../red-eclipse-remove-gamma-name-hack.patch  | 52 ----------
>  3 files changed, 12 insertions(+), 137 deletions(-)
>  delete mode 100644 gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch

Looks good to me :) The changes look good, I like that the package
definition is a little shorter. I've successfully built the package on
x86_64-linux, and launched the game.
Kei Kebreau Jan. 16, 2020, 3:47 a.m. UTC | #2
On Mon, 2020-01-13 at 22:31 +0000, Christopher Baines wrote:
> Kei Kebreau <kkebreau@posteo.net> writes:
> 
> > * gnu/packages/games.scm (red-eclipse): Update to 2.0.0.
> > [source]: Remove obsolete patch, and fetch submodules making
> > recursive true.
> > [arguments]: Remove "unpack-data" phase and adjust
> > "add-store-data-package-path-as-default" phase.
> > [inputs]: Add freetype and remove data-sources.
> > * gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch:
> > Delete file.
> > * gnu/local.mk (dist_patch_DATA): Delete file.
> > ---
> >  gnu/local.mk                                  |  1 -
> >  gnu/packages/games.scm                        | 96 +++----------
> > ------
> >  .../red-eclipse-remove-gamma-name-hack.patch  | 52 ----------
> >  3 files changed, 12 insertions(+), 137 deletions(-)
> >  delete mode 100644 gnu/packages/patches/red-eclipse-remove-gamma-
> > name-hack.patch
> 
> Looks good to me :) The changes look good, I like that the package
> definition is a little shorter. I've successfully built the package
> on
> x86_64-linux, and launched the game.

I just built and tested i686-linux version of the game with no issues. 
Pushed to master with your help.  Thank you!

Kei
diff mbox series

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cb46ee7880..4cd33f779e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1344,7 +1344,6 @@  dist_patch_DATA =						\
   %D%/packages/patches/rct-add-missing-headers.patch		\
   %D%/packages/patches/readline-link-ncurses.patch		\
   %D%/packages/patches/readline-6.2-CVE-2014-2524.patch		\
-  %D%/packages/patches/red-eclipse-remove-gamma-name-hack.patch	\
   %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch	\
   %D%/packages/patches/ri-li-modernize_cpp.patch		\
   %D%/packages/patches/ripperx-missing-file.patch		\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 6d5d8e7ad0..856157e869 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3169,45 +3169,8 @@  http://lavachat.symlynx.com/unix/")
     (license license:gpl2+)))
 
 (define-public red-eclipse
-  (let ((release "1.6.0")
-        (revision 0)
-        (data-sources
-         '(("acerspyro" "12b0bngl7hlxw4iwdbn99jp081yl6z1ic0s788nm349drbr2pck8")
-           ("actors" "0x7qqx67679q6ark9zz02skwhzgabid69kwi6zmhfpfgicn4927r")
-           ("appleflap" "08xslwqfqz3j4m03pv5ry2gdzj5k2ns51z8n6sln3sa94i9x8qkm")
-           ("blendbrush" "18zf5i2ax4p14x4c9nhk9fq6l1xgbxw62gm72vx59vbfdpjrw3cg")
-           ("caustics" "172fxwx7kbz5nmbjq98kr52ips505wb99fibgnpg8cj02syrya8k")
-           ("crosshairs" "14w8ysqzdsx9bzpfbl700jzngbh14rdghhjdf6zd6jlkvrl6754r")
-           ("dziq" "056imqszvp90j7cgz52ly0f31px64gsrmvm9k2c78ldbx87jnhc3")
-           ("elyvisions" "1bsgr0gr7njydj8fqclh0a27lrsyic3xfd5a4vwggw7g54azpgk2")
-           ("fonts" "00ibisza1qci0ghf2rynyf28l6r3nqhfzjf80k6gg76q4v7p1myx")
-           ("freezurbern" "07l9ldk9b82f12c13wcg5xxdf15bw0yjxk3vvk8v3ygrl2mwksyr")
-           ("john" "1jdmwkrdi5b9pivkm22rxhmkk1db9dx6l54wzcc23cvdz04ij93k")
-           ("jojo" "0f7kjy43fbk9kw8fip6bbw4gn3pryh0fndlahjfkaysrx98krdj3")
-           ("jwin" "0nc8dndnpqk2ad6316a8k6kgzsrkpwvk8s4gyh7aqfi4axfclril")
-           ("luckystrike" "04jiipqahphmvz5cd74dygr62dlvv6l4iglb8hzh4pp8frhls8bq")
-           ("maps" "0an46ipjvw4h0nxvb6qvnzp1cdkzlkiinqz4zh9lmxy1ds0gclim")
-           ("mayhem" "15k10imm2wr6c6fq35n4r99k7kz7n9zdnjlw6dmdq6fba67i6sbc")
-           ("mikeplus64" "0v4wiiivm3829j4phlavy22n4c6k6ib9ixxpdz7r6ysg5cdkaw33")
-           ("misc" "13rfgwrlfhflz6inbkg3fypyf8im0m49sw112b17qrw2zgp8i1rz")
-           ("nieb" "0z0h9jdn2gkkjil3vsvwidb1p2k09pi5n3wjxza12hhvqmcs7q8f")
-           ("nobiax" "08bfp4q6gbfis18bp1h4d0hqssk79jc4fhyjxnv21dbam4v4mnkn")
-           ("particles" "1vsx3fgg19xggxfhz3vlrh6nqhmw7kl9kmxrvb2j84blp00vd6z2")
-           ("philipk" "14irscg80607i5k5l2ci0n9nwibvda2f3xsykgv96d0vldrp5n5a")
-           ("projectiles" "09bnfsrywirwgjm6d7ff5nicx6w6b7w9568x9pb5q0ncaps3l85s")
-           ("props" "1dlabbprlkif8af3daf9nbgcwgxiymvj0yiphqhlri8ylfy2vpz4")
-           ("skyboxes" "14bi3md5y47cvb9ybipdvksz40gqsqw2r0lh3zzqb4acq367w18y")
-           ("snipergoth" "0m8rvvy5n8n9pm0b5cqvzsxsw51mqk8m7s1h3qc849b38isliwq2")
-           ("sounds" "0ivf3w5bphz5pzzx6kwcb67vbly1l19cgv3s0cyp8n87afiqj5rd")
-           ("textures" "0qdmgx7zbcqnb9rrga2izr93p5inirczhddfxs504rsnv0v8vyxm")
-           ("torley" "05ppyhghq859cbbxzj3dnl9fcx3ghy04ds1pylypwg2hsxzbjwcd")
-           ("trak" "0g3vq86q91a3syli38lwc8ca4ychfwsmmqf85kqzfzyd627ybclm")
-           ("ulukai" "0asa5fz400impklcg6dy2f7jiaqfc1sn1c36fpg8jd01gw66lw93")
-           ("unnamed" "0rz5683j7sfwkcycfypbv4b0ihp0qwn9rzskfsabwc1s5g324917")
-           ("vanities" "13f18783rc8cjf22p61zr8m5g1migzlx05fzl8xnbjdkqq4cdyix")
-           ("vegetation" "1y5d97nfmvax7y4fr0y5v0c8zb1ajkqwx76kjd4qc9n4spdsi5sc")
-           ("weapons" "103g1dhxv5ffz4ddg2xcbshbgv9606chsbas3pzk6h9ybqsyjrqh")
-           ("wicked" "1884rk34a2dj83gz82rc4zh3ch0dyj5221hvsr0a5h60578i7yj6"))))
+  (let ((release "2.0.0")
+        (revision 0))
     (package
       (name "red-eclipse")
       (version (if (zero? revision)
@@ -3218,13 +3181,12 @@  http://lavachat.symlynx.com/unix/")
        (origin
          (method git-fetch)
          (uri (git-reference
-               (url "https://github.com/red-eclipse/base.git")
-               (commit (string-append "v" release))))
+               (url "https://github.com/redeclipse/base.git")
+               (commit (string-append "v" release))
+               (recursive? #t))) ; for game data
          (file-name (git-file-name name version))
          (sha256
-          (base32 "0qy9kmq21wc4bdhwifasxc5dv1y5c53sn7dfmyc5y3zyz8wjyij4"))
-         (patches
-          (search-patches "red-eclipse-remove-gamma-name-hack.patch"))))
+          (base32 "0sz0mqhwx8r9n4mk3qrxw420nlsm3y0n48gd0lazgd64lfqjh3ab"))))
       (build-system gnu-build-system)
       (arguments
        `(#:tests? #f            ; no check target
@@ -3235,34 +3197,13 @@  http://lavachat.symlynx.com/unix/")
                                            (assoc-ref %outputs "out")))
          #:phases
          (modify-phases %standard-phases
-           (add-after 'unpack 'unpack-data
-             (lambda* (#:key inputs #:allow-other-keys)
-               (delete-file-recursively "data")
-               (mkdir "data")
-               (with-directory-excursion "data"
-                 (for-each (lambda (name)
-                             (copy-recursively (assoc-ref inputs name) name))
-                           (list ,@(map car data-sources))))
-               #t))
-           (add-after 'unpack-data 'add-store-data-package-path-as-default
+           (add-after 'unpack '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
-                                 "\""
+                 (("data = \"data\"")
+                  (string-append "data = \""
                                  (assoc-ref outputs "out")
-                                 "/share/redeclipse/data\""
-                                 addpackagedir_close
-                                 " "
-                                 addpackagedir_original
-                                 " }")))
+                                 "/share/redeclipse/data\"")))
                #t))
            (delete 'configure)  ; no configure script
            (add-after 'set-paths 'set-sdl-paths
@@ -3319,24 +3260,11 @@  exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
        `(("pkg-config" ,pkg-config)))
       (inputs
        `(("curl" ,curl)
+         ("freetype" ,freetype)
          ("glu" ,glu)
          ("sdl-union" ,(sdl-union (list sdl2
                                         sdl2-image
-                                        sdl2-mixer)))
-         ;; Create origin records for the many separate data packages.
-         ,@(map (match-lambda
-                  ((name hash)
-                   (list name
-                         (origin
-                           (method git-fetch)
-                           (uri
-                            (git-reference
-                             (url (string-append "https://github.com/"
-                                                 "red-eclipse/" name ".git"))
-                             (commit (string-append "v" release))))
-                           (sha256 (base32 hash))
-                           (file-name (git-file-name name version))))))
-                data-sources)))
+                                        sdl2-mixer)))))
       (home-page "http://redeclipse.net/")
       (synopsis "Arena shooter derived from the Cube 2 engine")
       (description
diff --git a/gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch b/gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch
deleted file mode 100644
index 573920cb99..0000000000
--- a/gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch
+++ /dev/null
@@ -1,52 +0,0 @@ 
-From b16b4963c1ad81bb9ef784bc4913a4c8ab5f1bb4 Mon Sep 17 00:00:00 2001
-From: Lee Salzman <lsalzman@gmail.com>
-Date: Tue, 12 Sep 2017 14:45:10 -0400
-Subject: [PATCH] remove gamma name hack
-
----
- src/engine/main.cpp | 6 +++---
- src/shared/cube.h   | 8 --------
- 2 files changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/src/engine/main.cpp b/src/engine/main.cpp
-index 1032004d..77c9233a 100644
---- a/src/engine/main.cpp
-+++ b/src/engine/main.cpp
-@@ -278,10 +278,10 @@ static void setgamma(int val)
- }
- 
- static int curgamma = 100;
--VARF(IDF_PERSIST, gamma, 30, 100, 300,
-+VARFN(IDF_PERSIST, gamma, reqgamma, 30, 100, 300,
- {
--    if(initing || gamma == curgamma) return;
--    curgamma = gamma;
-+    if(initing || reqgamma == curgamma) return;
-+    curgamma = reqgamma;
-     setgamma(curgamma);
- });
- 
-diff --git a/src/shared/cube.h b/src/shared/cube.h
-index 3864c492..7ff5e267 100644
---- a/src/shared/cube.h
-+++ b/src/shared/cube.h
-@@ -3,19 +3,11 @@
- 
- #define _FILE_OFFSET_BITS 64
- 
--#ifdef __GNUC__
--#define gamma __gamma
--#endif
--
- #ifdef WIN32
- #define _USE_MATH_DEFINES
- #endif
- #include <math.h>
- 
--#ifdef __GNUC__
--#undef gamma
--#endif
--
- #include <string.h>
- #include <stdio.h>
- #include <stdlib.h>