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 cmake)
24
  #:use-module (guix build-system gnu)
25
  #:use-module (guix build-system trivial)
26
  #:use-module ((guix licenses) #:prefix license:)
27
  #:use-module (gnu packages)
28
  #:use-module (gnu packages audio)
29
  #:use-module (more packages boost)
30
  #:use-module (gnu packages boost)
31
  #:use-module (gnu packages check)
32
  #:use-module (gnu packages compression)
33
  #:use-module (gnu packages curl)
34
  #:use-module (gnu packages databases)
35
  #:use-module (gnu packages documentation)
36
  #:use-module (gnu packages fontutils)
37
  #:use-module (gnu packages fribidi)
38
  #:use-module (gnu packages games)
39
  #:use-module (gnu packages gl)
40
  #:use-module (gnu packages gtk)
41
  #:use-module (gnu packages image)
42
  #:use-module (gnu packages lua)
43
  #:use-module (more packages lua)
44
  #:use-module (gnu packages ncurses)
45
  #:use-module (gnu packages pcre)
46
  #:use-module (gnu packages pkg-config)
47
  #:use-module (gnu packages python)
48
  #:use-module (gnu packages sdl)
49
  #:use-module (gnu packages tbb)
50
  #:use-module (more packages tcl)
51
  #:use-module (gnu packages tls)
52
  #:use-module (gnu packages xiph)
53
  #:use-module (gnu packages xml)
54
  #:use-module (gnu packages xorg))
55
56
(define-public ogre3d
57
  (package
58
    (name "ogre3d")
59
    (version "1.9.0")
60
    (source (origin
61
              (method url-fetch)
62
              (uri (string-append
63
                     "https://bitbucket.org/sinbad/ogre/get/v"
64
                     (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
65
                     ".tar.gz"))
66
              (file-name (string-append name "-" version ".tar.gz"))
67
              (sha256
68
               (base32
69
                "0p8gyn293qn3iyiy1smfmjd9zpnjb8h2zgvff8778fwh0ylbmlpa"))))
70
    (build-system cmake-build-system)
71
    (native-inputs
72
     `(("doxygen" ,doxygen)))
73
    (inputs
74
     `(("freetype" ,freetype)
75
       ("boost" ,boost-fix)
76
       ("sdl2" ,sdl2)
77
       ("cppunit" ,cppunit)
78
       ("freeimage" ,freeimage)
79
       ("glu" ,glu)
80
       ("libxt" ,libxt)
81
       ("libxaw" ,libxaw)
82
       ("libxxf86vm" ,libxxf86vm)
83
       ("libxrandr" ,libxrandr)
84
       ("mesa" ,mesa)
85
       ("tbb" ,tbb)
86
       ("tinyxml" ,tinyxml)
87
       ("zziplib" ,zziplib)))
88
    (arguments
89
     `(#:tests? #f
90
       #:configure-flags
91
       (list (string-append "-DFREETYPE_FT2BUILD_INCLUDE_DIR="
92
               (assoc-ref %build-inputs "freetype")
93
               "/include"))
94
       #:phases
95
       (modify-phases %standard-phases
96
         (add-after 'build 'build-doc
97
           (lambda* _
98
             (zero? (system* "make" "OgreDoc")))))))
99
    (home-page "http://www.ogre3d.org")
100
    (synopsis "3D graphics engine")
101
    (description "3D graphics engine")
102
    (license license:expat)))
103
104
(define-public cegui
105
  (package
106
    (name "cegui")
107
    (version "0.8.7")
108
    (source (origin
109
              (method url-fetch)
110
              (uri (string-append
111
                     "http://prdownloads.sourceforge.net/crayzedsgui/cegui-"
112
                     version ".tar.bz2"))
113
              (sha256
114
               (base32
115
                "067562s71kfsnbp2zb2bmq8zj3jk96g5a4rcc5qc3n8nfyayhldk"))))
116
    (build-system cmake-build-system)
117
    (arguments
118
     `(#:tests? #f))
119
    (native-inputs
120
     `(("pkg-config" ,pkg-config)))
121
    (inputs
122
     `(("pcre" ,pcre)
123
       ("gl" ,mesa)
124
       ("freetype" ,freetype)
125
       ("fribidi" ,fribidi)
126
       ("glew" ,glew)
127
       ("sdl2" ,sdl2)
128
       ("irrlicht" ,irrlicht)
129
       ("ogre" ,ogre3d)
130
       ("epoxy" ,libepoxy)
131
       ("expat" ,expat)
132
       ("libxml2" ,libxml2)
133
       ("freeimage" ,freeimage)
134
       ("python" ,python)
135
       ("lua" ,lua-5.1)
136
       ("gtk" ,gtk+-2)
137
       ("boost" ,boost-fix)
138
       ("minizip" ,minizip)
139
       ("tinyxml" ,tinyxml)))
140
    (home-page "http://cegui.org.uk/")
141
    (synopsis "Crazy Eddie's GUI system")
142
    (description "Crazy Eddie's GUI System is a free library providing windowing
143
and widgets for graphics APIs / engines where such functionality is not natively
144
available, or severely lacking.  The library is object-oriented, written in C++,
145
cross-platform, and targeted at game and application developers.  Additionally,
146
it offers a WYSIWYG editor for creating layouts and imagesets.")
147
    (license license:expat)))
148
149
(define-public morji
150
  (package
151
    (name "morji")
152
    (version "0.1")
153
    (source (origin
154
              (method url-fetch)
155
              (uri (string-append
156
                     "https://bardinflor.perso.aquilenet.fr/morji/morji-"
157
                     version ".tar.gz"))
158
              (sha256
159
               (base32
160
                "18givlgh10cg0a3gs3747ihhfm4hyj056cr3x7vqhcnrx6vgy06i"))))
161
    (build-system gnu-build-system)
162
    (arguments
163
     `(#:phases
164
       (modify-phases %standard-phases
165
         (delete 'configure)
166
         (delete 'build)
167
         (replace 'install
168
           (lambda* (#:key outputs #:allow-other-keys)
169
             (zero? (system* "make" "install"
170
                             (string-append "PREFIX=" (assoc-ref outputs "out"))))))
171
         (replace 'check
172
           (lambda _
173
             (zero? (system* "tclsh" "test_expect.tcl")))))))
174
    (propagated-inputs
175
     `(("ncurses" ,ncurses) ; TODO: this should probably be a propagated-input of tcllib.
176
       ("sqlite" ,sqlite)
177
       ("tcl" ,tcl-fix)
178
       ("tcllib" ,tcllib-fix)))
179
    (native-inputs
180
     `(("expect" ,expect-fix)))
181
    (home-page "https://bardinflor.perso.aquilenet.fr/morji/intro-en")
182
    (synopsis "Simple flashcard program for the terminal")
183
    (description "Morji is a simple flashcard program for the terminal.  It
184
uses a modified version of the SM2 algorithm taking inspiration from mnemosyne
185
and anki.")
186
    (license license:isc)))
187
188
(define-public cpptest
189
  (package
190
    (name "cpptest")
191
    (version "1.1.2")
192
    (source (origin
193
              (method url-fetch)
194
              (uri (string-append "mirror://sourceforge/cpptest/cpptest/cpptest-"
195
                                  version "/cpptest-" version ".tar.gz"))
196
              (sha256
197
               (base32
198
                "09v070a9dv6zq6hgj4v67i31zsis3s96psrnhlq9g4vhdcaxykwy"))))
199
    (build-system gnu-build-system)
200
    (home-page "http://cpptest.sourceforge.net/")
201
    (synopsis "")
202
    (description "")
203
    (license license:lgpl2.1)))
204
205
(define-public khanat
206
  (package
207
    (name "khanat")
208
    (version "3.0")
209
    (source (origin
210
              (method git-fetch)
211
              (uri (git-reference
212
                     (url "https://git.khaganat.net/khaganat/khanat-code.git")
213
                     (commit "90d9f6da6c367312ea856e1b8df67ec9ef1959c7")))
214
              (sha256
215
               (base32
216
                "0wh4k6k4213pm4bbynlsnbvpcmqiliny19v9sffgd011pzywy7cp"))))
217
    (build-system cmake-build-system)
218
    (inputs
219
     `(("boost" ,boost-fix)
220
       ("cpptest" ,cpptest)
221
       ("curl" ,curl)
222
       ("giflib" ,giflib)
223
       ("libfreetype" ,freetype)
224
       ("libjpeg" ,libjpeg)
225
       ("libpng" ,libpng)
226
       ("libvorbis" ,libvorbis)
227
       ("libxml2" ,libxml2)
228
       ("lua" ,lua-5.1)
229
       ("luabind" ,luabind)
230
       ("mesa" ,mesa)
231
       ("openal" ,openal)
232
       ("openssl" ,openssl)
233
       ("zlib" ,zlib)))
234
    (arguments
235
     `(#:out-of-source? #t
236
       #:tests? #f
237
       #:configure-flags (list "-DFINAL_VERSION=ON" "-DWITH_RYZOM_SERVER=OFF"
238
                               "-DWITH_RYZOM_TOOLS=OFF" "-DWITH_NEL_TESTS=OFF"
239
                               "-DWITH_RYZOM_CLIENT=ON" "-DWITH_NEL_TOOLS=OFF"
240
                               "-DWITH_NEL_SAMPLES=OFF" "-DWITH_STATIC=OFF"
241
                               "-DWITH_STATIC_EXTERNAL=OFF")
242
       #:phases
243
       (modify-phases %standard-phases
244
         (add-before 'configure 'chdir
245
           (lambda _
246
             (chdir "code"))))))
247
    (home-page "https://khaganat.net/")
248
    (synopsis "")
249
    (description "")
250
    (license license:agpl3)))
251
252
(define-public khanat-assets
253
  (package
254
    (name "khanat-assets")
255
    (version "3.0")
256
    (source (origin
257
              (method url-fetch)
258
              (uri (string-append "https://git.khaganat.net/khaganat/khanat-assets"
259
                                  "/repository/archive.tar.bz2?ref="
260
                                  "22abb542c6b87637ccf24bfd79ccd762b35f8f19"))
261
              (file-name (string-append name "-" version ".tar.bz2"))
262
              (sha256
263
               (base32
264
                "1f08s6682v6i909d0gp20pk599685gyhwivqxgs9cxxg6h132azz"))))
265
    (build-system trivial-build-system)
266
    (arguments
267
     `(#:modules ((guix build utils))
268
       #:builder
269
       (begin
270
         (use-modules (guix build utils))
271
         (let* ((source (assoc-ref %build-inputs "source"))
272
                (output (assoc-ref %outputs "out"))
273
                (vardir (string-append output "/share/khanat")))
274
           (chdir (string-append source "/database"))
275
           (for-each
276
             (lambda (file)
277
               (mkdir-p (dirname (string-append vardir "/" file)))
278
               (copy-file file (string-append vardir "/" file)))
279
             (find-files "." "[^/]*"))))))
280
    (home-page "")
281
    (synopsis "")
282
    (description "")
283
    (license license:cc-by-sa3.0)))
284
285
(define-public khanat-resources
286
  (package
287
    (name "khanat-resources")
288
    (version "3.0")
289
    (source (origin
290
              (method git-fetch)
291
              (uri (git-reference
292
                     (url "https://git.khaganat.net/khaganat/khanat-ressources.git")
293
                     (commit "8db7ba5840ced758710696a401ee4a4246eb9b70")))
294
              (sha256
295
               (base32
296
                "010z3wvh0bkdbar0n0rvk0pqj87nnk9srgjh8pjx7mic8p517k8j"))))
297
    (build-system trivial-build-system)
298
    (arguments
299
     `(#:modules ((guix build utils))
300
       #:builder
301
       (begin
302
         (use-modules (guix build utils))
303
         (let* ((source (assoc-ref %build-inputs "source"))
304
                (output (assoc-ref %outputs "out"))
305
                (vardir (string-append output "/share/khanat")))
306
           (chdir source)
307
           (for-each
308
             (lambda (file)
309
               (mkdir-p (dirname (string-append vardir "/" file)))
310
               (copy-file file (string-append vardir "/" file)))
311
             (find-files "." "[^/]*"))))))
312
    (home-page "")
313
    (synopsis "")
314
    (description "")
315
    (license license:cc-by-sa3.0)))
316