forked from SuperTux/supertux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
guix.scm
170 lines (161 loc) · 5.86 KB
/
guix.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
;; SuperTux
;; Copyright (C) 2019 Ingo Ruhnke <[email protected]>
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (ice-9 popen)
(ice-9 rdelim)
(guix build utils)
(guix build-system cmake)
(guix build-system gnu)
(guix download)
(guix git-download)
(guix gexp)
((guix licenses) #:prefix license:)
(guix packages)
(gnu packages audio)
((gnu packages base) #:prefix base:)
(gnu packages autotools)
(gnu packages boost)
(gnu packages curl)
(gnu packages fontutils)
(gnu packages fribidi)
(gnu packages game-development)
(gnu packages gcc)
(gnu packages gl)
(gnu packages gtk)
(gnu packages pkg-config)
(gnu packages python)
(gnu packages sdl)
(gnu packages squirrel)
(gnu packages version-control)
(gnu packages xiph))
(define %source-dir (dirname (current-filename)))
(define (source-predicate . dirs)
(let ((preds (map (lambda (p)
(git-predicate (string-append %source-dir p)))
dirs)))
(lambda (file stat)
(let loop ((f (car preds))
(rest (cdr preds)))
(if (f file stat)
#t
(if (not (nil? rest))
(loop (car rest) (cdr rest))
#f))))))
(define current-commit
(with-directory-excursion %source-dir
(let* ((port (open-input-pipe "git describe --tags"))
(output (read-line port)))
(close-pipe port)
(string-trim-right output #\newline))))
(define-public raqm
(package
(name "raqm")
(version "0.7.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/HOST-Oman/libraqm")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0byxvrfb7g6wiykbzrfrvrcf178yjrfvix83bmxsvrdnyh7jqvfx"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f)) ; needs python and stuff
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)
("pkg-config" ,pkg-config)
; ("python" ,python)
))
(inputs
`(("which" ,base:which)
("gtk-doc" ,gtk-doc)
("freetype" ,freetype)))
(propagated-inputs
`(("harfbuzz" ,harfbuzz)
("fribidi" ,fribidi)))
(synopsis "A library for complex text layout")
(description "Raqm is a small library that encapsulates the logic
for complex text layout and provides a convenient API.
It currently provides bidirectional text support (using FriBiDi),
shaping (using HarfBuzz), and proper script itemization. As a result,
Raqm can support most writing systems covered by Unicode.")
(home-page "https://github.com/HOST-Oman/libraqm")
(license license:x11)))
(define-public supertux
(package
(name "supertux")
(version current-commit)
(source (local-file %source-dir
#:recursive? #t
#:select? (source-predicate
""
"/external/findlocale"
"/external/physfs"
"/external/SDL_ttf"
"/external/squirrel"
"/external/googletest"
"/external/obstack"
"/external/SDL_SavePNG"
"/external/sexp-cpp"
"/external/tinygettext")))
(arguments
`(#:tests? #f
#:configure-flags '("-DINSTALL_SUBDIR_BIN=bin"
"-DUSE_SYSTEM_PHYSFS=ON")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'set-version-number
(lambda _
(substitute* "version.cmake.in"
(("\\$\\{MAJOR_VERSION_GIT\\}") ,"0")
(("\\$\\{MINOR_VERSION_GIT\\}") ,"6")
(("\\$\\{PATCH_VERSION_GIT\\}") ,"0")
(("\\$\\{TWEAK_VERSION_GIT\\}") ,"")
(("\\$\\{VERSION_STRING_GIT\\}") ,current-commit))
(copy-file "version.cmake.in" "version.cmake")
#t)))))
(build-system cmake-build-system)
(native-inputs
`(;("git" ,git)
("pkg-config" ,pkg-config)
("python" ,python)))
(inputs
`(("sdl2" ,sdl2)
("sdl2-image" ,sdl2-image)
("sdl2-mixer" ,sdl2-mixer)
("openal" ,openal)
("mesa" ,mesa)
("glew" ,glew)
("libvorbis" ,libvorbis)
("libogg" ,libogg)
("physfs" ,physfs)
("curl" ,curl)
("boost" ,boost)
("freetype" ,freetype)
("raqm" ,raqm)
("squirrel" ,squirrel)))
(synopsis "2D platformer game")
(description "SuperTux is a free classic 2D jump'n run sidescroller game
in a style similar to the original Super Mario games covered under
the GNU GPL.")
(home-page "https://supertux.org/")
(license license:gpl3+)))
supertux
;; EOF ;;