From 70bf439e35b014cc5fd0fdc6dc41dc74b0236ee1 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Sun, 30 Apr 2023 22:37:00 +0200 Subject: Split makeobj off from Simutrans --- tw/packages/games.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'tw/packages') 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)) -- cgit v1.2.3