guix-more/more/packages/games.scm

games.scm

1
;;; GNU Guix --- Functional package management for GNU
2
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
3
;;;
4
;;; This file is part of GNU Guix.
5
;;;
6
;;; GNU Guix is free software; you can redistribute it and/or modify it
7
;;; under the terms of the GNU General Public License as published by
8
;;; the Free Software Foundation; either version 3 of the License, or (at
9
;;; your option) any later version.
10
;;;
11
;;; GNU Guix is distributed in the hope that it will be useful, but
12
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
;;; GNU General Public License for more details.
15
;;;
16
;;; You should have received a copy of the GNU General Public License
17
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
18
19
(define-module (more packages games)
20
  #:use-module (guix packages)
21
  #:use-module (guix download)
22
  #:use-module (guix git-download)
23
  #:use-module (guix build-system ant)
24
  #:use-module (guix build-system cmake)
25
  #:use-module (guix build-system gnu)
26
  #:use-module (guix build-system trivial)
27
  #:use-module ((guix licenses) #:prefix license:)
28
  #:use-module (gnu packages)
29
  #:use-module (gnu packages assembly)
30
  #:use-module (gnu packages audio)
31
  #:use-module (gnu packages base)
32
  #:use-module (gnu packages boost)
33
  #:use-module (gnu packages check)
34
  #:use-module (gnu packages compression)
35
  #:use-module (gnu packages curl)
36
  #:use-module (gnu packages databases)
37
  #:use-module (gnu packages documentation)
38
  #:use-module (gnu packages fontutils)
39
  #:use-module (gnu packages fribidi)
40
  #:use-module (gnu packages games)
41
  #:use-module (gnu packages gcc)
42
  #:use-module (gnu packages gl)
43
  #:use-module (gnu packages graphics)
44
  #:use-module (gnu packages gtk)
45
  #:use-module (gnu packages image)
46
  #:use-module (gnu packages java)
47
  #:use-module (gnu packages lua)
48
  #:use-module (more packages lua)
49
  #:use-module (gnu packages llvm)
50
  #:use-module (gnu packages ncurses)
51
  #:use-module (gnu packages pcre)
52
  #:use-module (gnu packages pkg-config)
53
  #:use-module (gnu packages python)
54
  #:use-module (gnu packages python-xyz)
55
  #:use-module (more packages python)
56
  #:use-module (gnu packages qt)
57
  #:use-module (gnu packages sdl)
58
  #:use-module (gnu packages sqlite)
59
  #:use-module (gnu packages tbb)
60
  #:use-module (more packages tcl)
61
  #:use-module (gnu packages tls)
62
  #:use-module (gnu packages xiph)
63
  #:use-module (gnu packages xml)
64
  #:use-module (gnu packages xorg))
65
66
(define-public cegui
67
  (package
68
    (name "cegui")
69
    (version "0.8.7")
70
    (source (origin
71
              (method url-fetch)
72
              (uri (string-append
73
                     "http://prdownloads.sourceforge.net/crayzedsgui/cegui-"
74
                     version ".tar.bz2"))
75
              (sha256
76
               (base32
77
                "067562s71kfsnbp2zb2bmq8zj3jk96g5a4rcc5qc3n8nfyayhldk"))))
78
    (build-system cmake-build-system)
79
    (arguments
80
     `(#:tests? #f))
81
    (native-inputs
82
     `(("pkg-config" ,pkg-config)))
83
    (inputs
84
     `(("pcre" ,pcre)
85
       ("gl" ,mesa)
86
       ("freetype" ,freetype)
87
       ("fribidi" ,fribidi)
88
       ("glew" ,glew)
89
       ("sdl2" ,sdl2)
90
       ("irrlicht" ,irrlicht)
91
       ("ogre" ,ogre)
92
       ("epoxy" ,libepoxy)
93
       ("expat" ,expat)
94
       ("libxml2" ,libxml2)
95
       ("freeimage" ,freeimage)
96
       ("python" ,python)
97
       ("lua" ,lua-5.1)
98
       ("gtk" ,gtk+-2)
99
       ("boost" ,boost)
100
       ("minizip" ,minizip)
101
       ("tinyxml" ,tinyxml)))
102
    (home-page "http://cegui.org.uk/")
103
    (synopsis "Crazy Eddie's GUI system")
104
    (description "Crazy Eddie's GUI System is a free library providing windowing
105
and widgets for graphics APIs / engines where such functionality is not natively
106
available, or severely lacking.  The library is object-oriented, written in C++,
107
cross-platform, and targeted at game and application developers.  Additionally,
108
it offers a WYSIWYG editor for creating layouts and imagesets.")
109
    (license license:expat)))
110
111
(define-public morji
112
  (package
113
    (name "morji")
114
    (version "0.3")
115
    (source (origin
116
              (method url-fetch)
117
              (uri (string-append
118
                     "https://bardinflor.perso.aquilenet.fr/morji/morji-"
119
                     version ".tar.gz"))
120
              (sha256
121
               (base32
122
                "1icpqn7ypg4jbbn222zvgdg96x0k1nb9rbcfr5ky86ldhly1flq2"))))
123
    (build-system gnu-build-system)
124
    (arguments
125
     `(#:tests? #f; Tests don't run in our environment
126
       #:phases
127
       (modify-phases %standard-phases
128
         (delete 'configure)
129
         (delete 'build)
130
         (replace 'install
131
           (lambda* (#:key outputs #:allow-other-keys)
132
             (zero? (system* "make" "install"
133
                             (string-append "PREFIX=" (assoc-ref outputs "out")))))))))
134
    (propagated-inputs
135
     `(("ncurses" ,ncurses) ; TODO: this should probably be a propagated-input of tcllib.
136
       ("sqlite" ,sqlite)
137
       ("tcl" ,tcl-fix)
138
       ("tcllib" ,tcllib-fix)))
139
    (native-inputs
140
     `(("expect" ,expect-fix)))
141
    (home-page "https://bardinflor.perso.aquilenet.fr/morji/intro-en")
142
    (synopsis "Simple flashcard program for the terminal")
143
    (description "Morji is a simple flashcard program for the terminal.  It
144
uses a modified version of the SM2 algorithm taking inspiration from mnemosyne
145
and anki.")
146
    (license license:isc)))
147
148
(define-public cpptest
149
  (package
150
    (name "cpptest")
151
    (version "1.1.2")
152
    (source (origin
153
              (method url-fetch)
154
              (uri (string-append "mirror://sourceforge/cpptest/cpptest/cpptest-"
155
                                  version "/cpptest-" version ".tar.gz"))
156
              (sha256
157
               (base32
158
                "09v070a9dv6zq6hgj4v67i31zsis3s96psrnhlq9g4vhdcaxykwy"))))
159
    (build-system gnu-build-system)
160
    (home-page "http://cpptest.sourceforge.net/")
161
    (synopsis "")
162
    (description "")
163
    (license license:lgpl2.1)))
164
165
(define-public khanat
166
  (package
167
    (name "khanat")
168
    (version "3.0")
169
    (source (origin
170
              (method git-fetch)
171
              (uri (git-reference
172
                     (url "https://git.khaganat.net/khaganat/mmorpg_khanat/khanat-opennel-code.git")
173
                     ;(commit "0ca90c49a5e1e6f8865ef15517bd25e388a2db96")))
174
                     (commit "302ee7e20ea93caded5d46637918ba0092f207fd")))
175
              (sha256
176
               (base32
177
                ;"1rfrk43ya8mx576ycs4rln67kdrci37ryixk7abf1cqjdrz7a883"))))
178
                "1w0bhspsgf3dg33xdyypc4rm935n6g5d7shid92jf4j6jb0cjahh"))))
179
    (build-system cmake-build-system)
180
    (inputs
181
     `(("boost" ,boost)
182
       ("cpptest" ,cpptest)
183
       ("curl" ,curl)
184
       ("giflib" ,giflib)
185
       ("libfreetype" ,freetype)
186
       ("libjpeg" ,libjpeg)
187
       ("libpng" ,libpng)
188
       ("libvorbis" ,libvorbis)
189
       ("libxml2" ,libxml2)
190
       ("lua" ,lua-5.1)
191
       ("luabind" ,luabind)
192
       ("mesa" ,mesa)
193
       ("openal" ,openal)
194
       ("openssl" ,openssl)
195
       ("zlib" ,zlib)))
196
    (arguments
197
     `(#:out-of-source? #t
198
       #:tests? #f
199
       #:configure-flags (list "-DFINAL_VERSION=ON" "-DWITH_RYZOM_SERVER=OFF"
200
                               "-DWITH_RYZOM_TOOLS=OFF" "-DWITH_NEL_TESTS=OFF"
201
                               "-DWITH_RYZOM_CLIENT=ON" "-DWITH_NEL_TOOLS=OFF"
202
                               "-DWITH_NEL_SAMPLES=OFF" "-DWITH_STATIC=OFF"
203
                               "-DWITH_STATIC_EXTERNAL=OFF")
204
       #:phases
205
       (modify-phases %standard-phases
206
         (add-before 'configure 'chdir
207
           (lambda _
208
             (chdir "code")))
209
         (add-after 'install 'link-khanat
210
           (lambda* (#:key outputs #:allow-other-keys)
211
             (let* ((out (assoc-ref outputs "out"))
212
                    (game (string-append out "/games/khanat_client"))
213
                    (bin (string-append out "/bin/khanat_client")))
214
             (symlink game bin)))))))
215
    (home-page "https://khaganat.net/")
216
    (synopsis "")
217
    (description "")
218
    (license license:agpl3)))
219
220
(define-public emojicode
221
  (package
222
    (name "emojicode")
223
    (version "0.5.4")
224
    (source (origin
225
              (method url-fetch)
226
              (uri (string-append "https://github.com/emojicode/emojicode/archive/v"
227
                                  version ".tar.gz"))
228
              (sha256
229
               (base32
230
                "1l3f4i0vh09x8dz5fl1f4mb8wlgmi0j2bhjkfzrnmbgp09hi8wsl"))))
231
    (build-system cmake-build-system)
232
    (arguments
233
     `(#:phases
234
       (modify-phases %standard-phases
235
         (add-before 'configure 'fixgcc7
236
           (lambda _
237
             (display (getenv "CXX_INCLUDE_PATH"))
238
             (setenv "CPATH" (getenv "C_INCLUDE_PATH"))
239
             (unsetenv "C_INCLUDE_PATH")
240
             (setenv "CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES" (getenv "CPATH"))
241
             (setenv "CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES" (getenv "CPATH")))))))
242
    (inputs
243
     `(("llvm" ,llvm)))
244
    (native-inputs
245
     `(("gcc" ,gcc-7)))
246
    (home-page "http://www.emojicode.org")
247
    (synopsis "World’s only programming language that’s bursting with emojis")
248
    (description "Emojicode is the only programming language consisting of
249
emojis.  Emojicode is a straightforward language to learn, whatever background
250
you have.")
251
    (license license:artistic2.0)))
252
253
(define-public torque3d
254
  (package
255
    (name "torque3d")
256
    (version "3.10.1")
257
    (source (origin
258
              (method url-fetch)
259
              (uri (string-append "https://github.com/GarageGames/Torque3D/archive/v"
260
                                  version ".tar.gz"))
261
              (file-name (string-append name "-" version ".tar.gz"))
262
              (sha256
263
               (base32
264
                "0qxaybdmir90ynfqs7l45di7vh0xa619abq53l9avj6yycihgw8b"))))
265
    (build-system cmake-build-system)
266
    (arguments
267
     `(#:configure-flags
268
       (list "-DTORQUE_APP_NAME=Torque3D")
269
       #:tests? #f))
270
    (inputs
271
     `(("gtk+" ,gtk+)
272
       ("libxft" ,libxft)
273
       ("openal" ,openal)))
274
    (native-inputs
275
     `(("nasm" ,nasm)
276
       ("pkg-config" ,pkg-config)))
277
    (home-page "http://torque3d.org/")
278
    (synopsis "Game engine")
279
    (description "")
280
    (license license:expat)))
281
282
(define-public actor-framework
283
  (package
284
    (name "actor-framework")
285
    (version "0.16.3")
286
    (source (origin
287
              (method git-fetch)
288
              (uri (git-reference
289
                     (url "https://github.com/actor-framework/actor-framework.git")
290
                     (commit version)))
291
              (sha256
292
               (base32
293
                "0nqw1cv7wxbcn2qwm08qffb6k4n3kgvdiaphks5gjgm305jk4vnx"))))
294
    (build-system cmake-build-system)
295
    (arguments
296
     `(#:configure-flags (list "-DCAF_NO_EXAMPLES=yes")))
297
    (home-page "http://actor-framework.org/")
298
    (synopsis "Concurrency library implementing the actor model")
299
    (description "CAF is a C++11 actor model implementation featuring
300
lightweight & fast actor implementations, pattern matching for messages,
301
network transparent messaging, and more.")
302
    (license (list license:boost1.0 license:bsd-3))))
303
304
(define-public mecab
305
  (package
306
    (name "mecab")
307
    (version "0.996")
308
    (source (origin
309
              (method url-fetch)
310
              (uri "https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7cENtOXlicTFaRUE")
311
              (file-name (string-append name "-" version ".tar.gz"))
312
              (sha256
313
               (base32
314
                "0ncwlqxl1hdn1x4v4kr2sn1sbbcgnhdphp0lcvk74nqkhdbk4wz0"))
315
              (patches
316
                (search-patches
317
                  "mecab-variable-param.patch"))))
318
    (build-system gnu-build-system)
319
    (search-paths
320
      (list (search-path-specification
321
              (variable "MECAB_DICDIR")
322
              (separator #f)
323
              (files '("lib/mecab/dic")))))
324
    (arguments
325
     `(#:phases
326
       (modify-phases %standard-phases
327
         (add-before 'build 'add-mecab-dicdir-variable
328
           (lambda _
329
             (substitute* "mecabrc.in"
330
               (("dicdir = .*")
331
                "dicdir = $MECAB_DICDIR"))
332
             (substitute* "mecab-config.in"
333
               (("echo @libdir@/mecab/dic")
334
                "if [ -z \"$MECAB_DICDIR\" ]; then
335
  echo @libdir@/mecab/dic
336
else
337
  echo \"$MECAB_DICDIR\"
338
fi"))
339
             #t)))))
340
    (inputs
341
     `(("libiconv" ,libiconv)))
342
    (home-page "https://taku910.github.io/mecab")
343
    (synopsis "Morphological analysis engine for texts")
344
    (description "Mecab is a morphological analysis engine developped as a
345
collaboration between the Kyoto university and Nippon Telegraph and Telephone
346
Corporation.  The engine is independent of any language, dictionary or corpus.
347
")
348
    (license (list license:gpl2+ license:lgpl2.1+ license:bsd-3))))
349
350
(define-public mecab-ipadic
351
  (package
352
    (name "mecab-ipadic")
353
    (version "2.7.0")
354
    (source (origin
355
              (method url-fetch)
356
              (uri "https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7MWVlSDBCSXZMTXM")
357
              (file-name (string-append name "-" version ".tar.gz"))
358
              (sha256
359
               (base32
360
                "08rmkvj0f0x6jq0axrjw2y5nam0mavv6x77dp9v4al0wi1ym4bxn"))))
361
    (build-system gnu-build-system)
362
    (arguments
363
     `(#:configure-flags
364
       (list (string-append "--with-dicdir=" (assoc-ref %outputs "out")
365
                            "/lib/mecab/dic")
366
             "--with-charset=utf8")
367
       #:phases
368
       (modify-phases %standard-phases
369
         (add-before 'configure 'set-mecab-dir
370
           (lambda* (#:key outputs #:allow-other-keys)
371
             (setenv "MECAB_DICDIR" (string-append (assoc-ref outputs "out")
372
                                                   "/lib/mecab/dic"))
373
             #t)))))
374
    (native-inputs
375
     `(("mecab" ,mecab))); for mecab-config
376
    (home-page "")
377
    (synopsis "")
378
    (description "")
379
    (license (license:non-copyleft "COPYING"))))
380
381
(define-public uqm
382
  (package
383
    (name "uqm")
384
    (version "0.7.0")
385
    (source (origin
386
              (method url-fetch)
387
              (uri (string-append "mirror://sourceforge/sc2/UQM/0.7/uqm-"
388
                                  version "-1-source.tgz"))
389
              (sha256
390
               (base32
391
                "1rr8s25qsbqqbp3qsm2ndv11iqaxh72fc6fd8xdf80vb56piaq0k"))))
392
    (build-system gnu-build-system)
393
    (arguments
394
     `(#:tests? #f; no tests
395
       #:phases
396
       (modify-phases %standard-phases
397
         (delete 'configure)
398
         (replace 'build
399
           (lambda* (#:key outputs inputs #:allow-other-keys)
400
             ;; Configuration can only happen interactively, so change default
401
             ;; values instead.
402
             (substitute* "build/unix/build.config"
403
               (("/usr/local/games") (assoc-ref outputs "out")))
404
             (substitute* "build.sh"
405
               (("/bin/sh") (which "sh")))
406
             (setenv "CFLAGS"
407
                     (string-append
408
                       "-I" (assoc-ref inputs "sdl-image") "/include/SDL"
409
                       " -I" (assoc-ref inputs "glu") "/include"
410
                       " -O3 -DNDEBUG"))
411
             (chmod "build/unix/build_collect" #x755)
412
             (setenv "MAKE_VERBOSE" "1")
413
             (invoke (which "sh") "build.sh" "uqm")
414
             #t))
415
         (replace 'install
416
           (lambda* (#:key outputs inputs #:allow-other-keys)
417
             ;; Configuration can only happen interactively, so change default
418
             ;; values instead.
419
             (invoke (which "sh") "build/unix/build.sh" "uqm" "install")
420
             (mkdir-p (string-append (assoc-ref outputs "out")
421
                                     "/share/uqm/content/packages"))
422
             (copy-file (assoc-ref inputs "uqm-content")
423
                        (string-append (assoc-ref outputs "out")
424
                                       "/share/uqm/content/packages/uqm-"
425
                                       ,version "-content.uqm"))
426
             #t)))))
427
    (inputs
428
     `(("libmikmod" ,libmikmod)
429
       ("libvorbis" ,libvorbis)
430
       ("glu" ,glu)
431
       ("sdl" ,sdl)
432
       ("sdl-image" ,sdl-image)
433
       ("uqm-content"
434
        ,(origin
435
           (method url-fetch)
436
           (uri (string-append "mirror://sourceforge/sc2/UQM/0.7/uqm-"
437
                               version "-content.uqm"))
438
           (sha256
439
            (base32
440
             "1gx39ns698hyczd4nx73mr0z86bbi4q3h8sw3pxjh1lzla5xpxmq"))))))
441
    (native-inputs
442
     `(("pkg-config" ,pkg-config)))
443
    (home-page "http://sc2.sourceforge.net")
444
    (synopsis "")
445
    (description "")
446
    (license license:gpl2+)))
447
448
(define-public java-arc-core
449
  (package
450
    (name "java-arc-core")
451
    (version "110")
452
    (source (origin
453
              (method git-fetch)
454
              (uri (git-reference
455
                     (url "https://github.com/Anuken/Arc")
456
                     (commit (string-append "v" version))))
457
              (file-name (git-file-name name version))
458
              (sha256
459
               (base32
460
                "1iyckj4y47bcw15vsr104gysc9idx0m301qsx817mdgfdbjp9hmi"))))
461
    (build-system ant-build-system)
462
    (arguments
463
     `(#:jar-name "arc-core.jar"
464
       #:source-dir "arc-core/src/arc"
465
       #:test-dir "arc-core/test"
466
       #:phases
467
       (modify-phases %standard-phases
468
         (add-after 'build 'build-native
469
           (lambda* (#:key inputs outputs #:allow-other-keys)
470
             (let ((stb (assoc-ref inputs "stb_image.h"))
471
                   (jdk (assoc-ref inputs "jdk"))
472
                   (lib (string-append (assoc-ref outputs "out") "/lib")))
473
               (copy-file stb "arc-core/csrc/stb_image.h")
474
               (invoke "gcc" "-shared" "-O2" "-fPIC"
475
                       ; symbols specify GLIBC_2.2.5 in memcpy_wrap.c
476
                       ;(if (member ,(%current-system)
477
                       ;            '("i686-linux" "armhf-linux" "i586-gnu"))
478
                       ;  "-Wl,-wrap,memcpy"
479
                       ;  "-Wl,-wrap,memcpy,-wrap,pow")
480
                       "-Wl,--no-undefined"
481
                       "-Iarc-core/csrc"
482
                       (string-append "-I" jdk "/include")
483
                       (string-append "-I" jdk "/include/linux")
484
                       "arc-core/csrc/pix.c"
485
                       "-lm"
486
                       ;"natives/memcpy_wrap.c"
487
                       "-o" "libarc.so")
488
               (mkdir-p lib)
489
               (install-file "libarc.so" lib)
490
               (install-file "libarc.so" "build/classes/"))
491
             #t))
492
         (add-before 'build 'fix-native-loading
493
           (lambda _
494
             ;; Ensure the name of the library is the same, independently from
495
             ;; the platform, as we don't perform a cross-build for every platform.
496
             (substitute* "arc-core/src/arc/util/SharedLibraryLoader.java"
497
               (("if\\(isLinux\\).*")
498
                "if(isLinux) return \"lib\" + libraryName + \".so\";\n"))
499
             #t))
500
         (add-after 'build-native 'repack
501
           (lambda _
502
             (invoke "jar" "-cf" "build/jar/arc-core.jar" "-C" "build/classes"
503
                     ".")
504
             #t))
505
         (add-before 'check 'fix-test-dir
506
           (lambda _
507
             (substitute* "build.xml"
508
               (("\\}/java") "}"))
509
             #t)))))
510
    (native-inputs
511
     `(("java-junit" ,java-junit)))
512
    (inputs
513
     `(("stb_image.h"
514
        ,(origin (method url-fetch)
515
                 (uri (string-append
516
                        "https://raw.githubusercontent.com/nothings/stb/"
517
                        ;; latest commit, since there are no releases
518
                        "b42009b3b9d4ca35bc703f5310eedc74f584be58"
519
                        "/stb_image.h"))
520
                 (file-name "stb_image.h-b42009b")
521
                 (sha256
522
                  (base32
523
                   "132nblax05sqk0f77qc6jl03s24dwwh2s87gjx6872pwgmqhsnwf"))))))
524
    (home-page "https://github.com/Anuken/Arc")
525
    (synopsis "Java game development framework based off of libGDX")
526
    (description "This package contains a development framework for Java
527
games based on libGDX.  This is mostly used by Mindustry.")
528
    (license license:expat)))
529