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