root/trenchbroom.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
(define-module (hidamari-blue trenchbroom)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system scons)
  #:use-module (guix build-system cmake)
  #:use-module ((guix licenses) #:renamer (symbol-prefix-proc 'license:))
  #:use-module (gnu packages)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages base)
  #:use-module (gnu packages sdl)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages bison)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages fonts)
  #:use-module (gnu packages image)
  #:use-module (gnu packages games)
  #:use-module (gnu packages audio)
  #:use-module (gnu packages video)
  #:use-module (gnu packages mp3)
  #:use-module (gnu packages xiph)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages xorg)
  ;; #:use-module (gnu packages wxwidgets)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages perl)

  ;; wx
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module ((guix licenses) #:prefix l:)
  #:use-module (guix build-system glib-or-gtk)
  #:use-module (guix build-system python)
  #:use-module (guix build utils)
  #:use-module (guix utils)
  #:use-module (gnu packages)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages gstreamer)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages image)
  #:use-module (gnu packages photo)
  #:use-module (gnu packages video)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages sdl)
  #:use-module (gnu packages webkit)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages haskell)
  )

"http://quark.sourceforge.net/"
;;; tag 3763 https://svn.icculus.org/alienarena/

;;; TODO properly fix the setup.h install for wxwidgets
(define wxwidgets
  (package
   (name "wxwidgets")
   (version "3.0.3")
   (source
    (origin
     (method url-fetch)
     (uri (string-append "https://github.com/wxWidgets/wxWidgets/"
                         "releases/download/v" version
                         "/wxWidgets-" version ".tar.bz2"))
     (sha256
      (base32 "0yrhp5cs2g33cpbdwdzicmm5m4mfnlvxwv031x9266zc90zh7j08"))))
   (build-system glib-or-gtk-build-system)
   (inputs
    `(("glu" ,glu)
      ;; XXX gstreamer-0.10 builds fail
      ;; ("gstreamer" ,gstreamer-0.10)
      ("gtk" ,gtk+)
      ("libjpeg" ,libjpeg)
      ("libmspack" ,libmspack)
      ("libsm" ,libsm)
      ("libtiff" ,libtiff)
      ("mesa" ,mesa)
      ("webkitgtk" ,webkitgtk)
      ("sdl" ,sdl)))
   (native-inputs
    `(("pkg-config" ,pkg-config)))
   (arguments
    `(#:configure-flags
      '("--with-regex" "--with-libmspack"
        "--with-sdl"
        "--enable-webview"
        "--enable-webkit"
        "--enable-webviewwebkit"
        ,@(if (string=? "aarch64-linux"
                        (%current-system))
              '("--build=aarch64-unknown-linux-gnu")
              '()))
      #:make-flags
      (list (string-append "LDFLAGS=-Wl,-rpath="
                           (assoc-ref %outputs "out") "/lib"))
      #:phases
      (modify-phases %standard-phases
                     (add-before 'install 'setup.h
                                 (lambda* (#:key outputs #:allow-other-keys)
                                   (let ((out (assoc-ref outputs "out")))
                                     (mkdir-p (string-append out "/include/wx/"))
                                     (copy-file "lib/wx/include/gtk3-unicode-3.1/wx/setup.h"
                                                (string-append out "/include/wx/setup.h"))))))
      ;; No 'check' target.
      #:tests? #f))
   (home-page "https://www.wxwidgets.org/")
   (synopsis "Widget toolkit for creating graphical user interfaces")
   (description
    "wxWidgets is a C++ library that lets developers create applications with
a graphical user interface.  It has language bindings for Python, Perl, Ruby
and many other languages.")
   (license (list l:lgpl2.0+ (l:fsf-free "file://doc/license.txt")))))

;; Development version of wxWidgets, required to build against gstreamer-1.x.
;; This can be removed when wxWidgets is updated to the next stable version.
(define wxwidgets-3.1
  (package (inherit wxwidgets)
           (version "3.1.0")
           (source
            (origin
             (method url-fetch)
             (uri (string-append "https://github.com/wxWidgets/wxWidgets/archive/v"
                                 version ".tar.gz"))
             (file-name (string-append "wxwidgets-" version ".tar.gz"))
             (sha256
              (base32 "1yan5ysjwh6a7xw82sfjd1xn0nsy1dn2s0cx9ac7cw19191blc3y"))))
           (inputs `(("gstreamer" ,gstreamer)
                     ("gst-plugins-base" ,gst-plugins-base)
                     ,@(package-inputs wxwidgets)))
           (arguments
            (substitute-keyword-arguments (package-arguments wxwidgets)
                                          ((#:configure-flags flags)
                                           `(cons "--enable-mediactrl" ,flags))))))

;;; status wxwidgets wx/setup.h does not seem to be installed
;;; a bunch of unpackaged stuff in bundeled in lib/ gtest, gmock, ...
(define-public trenchbroom
  (package
   (name "trenchbroom")
   (version "2.0.0-RC4")
   (source (origin
            (method url-fetch)
            (uri (string-append "https://github.com/kduske/TrenchBroom/archive/v"
                                version ".tar.gz"))
            (sha256
             (base32
              "1lm4lgv15qacrnq3qnb9ln3wb8n6axd8lnl4i2z2qjh7yzkv94a8"))))
   (arguments
    `(#:tests?
      #f
      #:phases (modify-phases
                %standard-phases
                (add-after
                 'unpack 'fix-wx-include-paths
                 (lambda* (#:key outputs #:allow-other-keys)
                   (setenv "CPATH"
                           (string-append
                            (assoc-ref %build-inputs "wxwidgets")
                            "/include/wx-3.1"
                            ":" (getenv "C_INCLUDE_PATH"))))))))
   (build-system cmake-build-system)
   (inputs `(("glew" ,glew)
             ("libgtk2" ,gtk+-2)
             ;; ("gmock" ,gmock)
             ;; ("gtest" ,gtest)
             ;; ("stackwalker" ,stackwalker)
             ("wxwidgets" ,wxwidgets-3.1)
             ("freeimage" ,freeimage)
             ("freetype" ,freetype)
             ("libxxf86vm" ,libxxf86vm)))
   (native-inputs `(("pandoc" ,ghc-pandoc)
                    ("googletest" ,googletest)))
   (synopsis "first person shooter map editor")
   (description "map editor for quake 1 based first person shooters")
   (home-page "http://kristianduske.com/trenchbroom/")
   (license license:gpl3+)))