summaryrefslogtreecommitdiff
path: root/tw/packages/games.scm
diff options
context:
space:
mode:
authorTimo Wilken2023-04-30 22:37:00 +0200
committerTimo Wilken2023-04-30 23:55:07 +0200
commit70bf439e35b014cc5fd0fdc6dc41dc74b0236ee1 (patch)
tree2da4d95e6a1f50847bc2cecda803f8c20ef3c4b3 /tw/packages/games.scm
parentfb39298bfeaa2cdfe5ff61aa1ac2124391e4e554 (diff)
Split makeobj off from Simutrans
Diffstat (limited to 'tw/packages/games.scm')
-rw-r--r--tw/packages/games.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/tw/packages/games.scm b/tw/packages/games.scm
index 1bdefa2c..68fa2f62 100644
--- a/tw/packages/games.scm
+++ b/tw/packages/games.scm
@@ -144,6 +144,34 @@ Install a @code{simutrans-with-pak*} package instead.")
"file://simutrans/license.txt"
"This is Simutrans' custom artistic license."))))
+(define-public simutrans-makeobj
+ (package
+ (inherit simutrans)
+ (name "simutrans-makeobj")
+ (arguments
+ `(#:make-flags '("VERBOSE=1" "OPTIMISE=1" "OSTYPE=linux" "BACKEND=posix" "makeobj")
+ #:tests? #f ; there are no tests for makeobj
+ #:phases
+ ,#~(modify-phases %standard-phases
+ (replace 'bootstrap
+ (lambda _
+ (apply invoke #+(file-append dos2unix "/bin/dos2unix")
+ "-q" (find-files "."))
+ (substitute* "Makefile"
+ (("\\\\#define") "#define"))))
+ (replace 'configure
+ (lambda _
+ (copy-file "config.template" "config.default")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (install-file "build/default/makeobj/makeobj"
+ (string-append (assoc-ref outputs "out") "/bin")))))))
+ (inputs (list libpng))
+ (native-inputs (list pkg-config))
+ (synopsis "Addon compiler for Simutrans")
+ (description "@code{makeobj} compiles images and configuration files into
+addons for the Simutrans game, as @code{.pak} files.")))
+
;; See also: `sdl-union' in (gnu packages sdl).
(define* (simutrans-pak-union name #:optional (paksets (list simutrans-pak128))
(base-game simutrans))