summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-06-14 23:21:51 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-06-20 15:05:58 +0100
commit67c093a1c6784ce885853f4b03ad4ac673f554d4 (patch)
treecc32b667a20e8bb7d136945e5cd131a7ec731faf /gnu
parent3bb6b4a0dd81b47f98cf61d6471b1ce8e7ea7ba4 (diff)
gnu: btanks: Improve style.
* gnu/packages/games.scm (btanks): Improve style. [inputs, description]: Improve style. [arguments]: Rewrite using gexps. Change-Id: I5ea099b1e08d60afa99c82b1225e4f46db93b3ce Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/games.scm133
1 files changed, 67 insertions, 66 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 78741da1d42..28f324d6c93 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -10266,76 +10266,77 @@ download and unpack them separately.")
(uri (string-append "mirror://sourceforge/btanks/btanks-source/"
"btanks-" version ".tar.bz2"))
(sha256
- (base32
- "0ha35kxc8xlbg74wsrbapfgxvcrwy6psjkqi7c6adxs55dmcxliz"))))
+ (base32 "0ha35kxc8xlbg74wsrbapfgxvcrwy6psjkqi7c6adxs55dmcxliz"))))
(build-system scons-build-system)
(arguments
- `(#:tests? #f ; there are none
- #:scons ,scons-python2
- #:scons-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'replace-removed-scons-syntax
- (lambda _
- (substitute* "SConstruct"
- (("Options") "Variables")
- (("opts.Add\\(BoolOption.*") "opts.Add('gcc_visibility', 'gcc visibility', 'true')")
- (("opts.Add\\(EnumOption.*") "opts.Add('mode', 'build mode', 'release')"))
- #t))
- (add-after 'set-paths 'set-sdl-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "CPATH"
- (string-append
- (search-input-directory inputs "/include/SDL")
- ":" (or (getenv "CPATH") "")))))
- (add-after 'unpack 'fix-compilation-errors
- (lambda _
- (substitute* "mrt/base_file.h"
- (("#include <string>" m)
- (string-append m "\n#include <sys/types.h>")))
- (substitute* '("engine/sl08/sl08.h"
- "engine/sl08/sl08.py")
- (("signal = NULL") "signal = 0")
- (("object\\(NULL\\)") "object(0)")
- (("func\\(NULL\\)") "func(0)")
- ((" connect\\(signal_ref\\)")
- " this->connect(signal_ref)"))
- (substitute* "math/range_list.h"
- ((" lower_bound\\(value\\)")
- " this->lower_bound(value)")
- ((" erase\\(i\\)")
- " this->erase(i)"))
- (substitute* "clunk/source.cpp"
- (("using namespace clunk" m)
- (string-append "# define pow10f(x) exp10f(x)\n" m)))
- #t))
- (add-after 'unpack 'find-lua
- (lambda _
- (substitute* "engine/SConscript"
- (("lua5.1") "lua-5.1")
- (("bt_libs.append\\(lua\\)")
- "bt_libs.append(\"lua\")"))
- #t)))))
- (inputs
- `(("expat" ,expat)
- ("glu" ,glu)
- ("libsmpeg" ,libsmpeg-with-sdl1)
- ("libvorbis" ,libvorbis)
- ("lua51" ,lua-5.1)
- ("sdl" ,(sdl-union (list sdl
- sdl-mixer
- sdl-image
- sdl-ttf)))
- ("zlib" ,zlib)))
- (native-inputs
- (list pkg-config zip))
+ (list
+ #:tests? #f ;there are none
+ #:scons scons-python2
+ #:scons-flags
+ #~(list (string-append "prefix=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'replace-removed-scons-syntax
+ (lambda _
+ (substitute* "SConstruct"
+ (("Options")
+ "Variables")
+ (("opts.Add\\(BoolOption.*")
+ "opts.Add('gcc_visibility', 'gcc visibility', 'true')")
+ (("opts.Add\\(EnumOption.*")
+ "opts.Add('mode', 'build mode', 'release')"))))
+ (add-after 'set-paths 'set-sdl-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "CPATH"
+ (string-append (search-input-directory inputs
+ "/include/SDL")
+ ":"
+ (or (getenv "CPATH") "")))))
+ (add-after 'unpack 'fix-compilation-errors
+ (lambda _
+ (substitute* "mrt/base_file.h"
+ (("#include <string>" m)
+ (string-append m "\n#include <sys/types.h>")))
+ (substitute* '("engine/sl08/sl08.h" "engine/sl08/sl08.py")
+ (("signal = NULL")
+ "signal = 0")
+ (("object\\(NULL\\)")
+ "object(0)")
+ (("func\\(NULL\\)")
+ "func(0)")
+ ((" connect\\(signal_ref\\)")
+ " this->connect(signal_ref)"))
+ (substitute* "math/range_list.h"
+ ((" lower_bound\\(value\\)")
+ " this->lower_bound(value)")
+ (("\terase\\(i\\)")
+ "\tthis->erase(i)"))
+ (substitute* "clunk/source.cpp"
+ (("using namespace clunk" m)
+ (string-append "# define pow10f(x) exp10f(x)\n" m)))))
+ (add-after 'unpack 'find-lua
+ (lambda _
+ (substitute* "engine/SConscript"
+ (("lua5.1")
+ "lua-5.1")
+ (("bt_libs.append\\(lua\\)")
+ "bt_libs.append(\"lua\")")))))))
+ (inputs (list expat
+ glu
+ libsmpeg-with-sdl1
+ libvorbis
+ lua-5.1
+ (sdl-union (list sdl sdl-mixer sdl-image sdl-ttf))
+ zlib))
+ (native-inputs (list pkg-config zip))
(home-page "https://btanks.sourceforge.net")
(synopsis "Multiplayer tank battle game")
- (description "Battle Tanks (also known as \"btanks\") is a funny battle
-game, where you can choose one of three vehicles and eliminate your enemy
-using the whole arsenal of weapons. It has original cartoon-like graphics and
-cool music, it’s fun and dynamic, it has several network modes for deathmatch
-and cooperative.")
+ (description
+ "Battle Tanks (also known as \"btanks\") is a funny battle game, where
+you can choose one of three vehicles and eliminate your enemy using the whole
+arsenal of weapons. It has original cartoon-like graphics and cool music,
+it’s fun and dynamic, it has several network modes for deathmatch and
+cooperative.")
;; Some parts (e.g. mrt/b64.cpp) are LGPLv2.1+, but the whole package is
;; released under GPLv2 or later. It comes with extra exceptions for the
;; developers.