~whereiseveryone/guixrus

guixrus/guixrus/packages/olive-editor.scm -rw-r--r-- 12.5 KiB
a25c7a86jgart add python-py2puml 5 hours ago
                                                                                
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2022 Evan Straw <evan.straw99@gmail.com>
;;;
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix 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.
;;;
;;; GNU Guix 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 GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages olive-editor)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system cmake)
  #:use-module (guix build-system gnu)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix utils)
  #:use-module (guix build utils)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (gnu packages)
  #:use-module (gnu packages audio)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages ghostscript)
  #:use-module (gnu packages qt)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages serialization)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages graphics)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages image-processing)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages video))

(define-public pystring
  (package
    (name "pystring")
    (version "1.1.3")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/imageworks/pystring")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1w31pjiyshqgk6zd6m3ab3xfgb0ribi77r6fwrry2aw8w1adjknf"))))
    (build-system gnu-build-system)
    (arguments
     `(#:test-target "test"
       #:phases
       (modify-phases %standard-phases
         ;; pystring does not have a configure script
         (delete 'configure)
         ;; Makefile attempts to install to /usr/lib; change this to the
         ;; proper output path
         (add-before 'install 'fix-install
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (lib (string-append out "/lib")))
               (substitute* "Makefile"
                 (("LIBDIR = /usr/lib")
                  (string-append "LIBDIR = " lib)))
               (mkdir-p lib)
               #t)))
         ;; Makefile does not install the header files for the library;
         ;; install them to an "include" directory under the proper output
         ;; path
         (add-after 'install 'install-header
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (inc (string-append out "/include/pystring")))
               (mkdir-p inc)
               (copy-file "pystring.h"
                          (string-append inc "/pystring.h"))))))))
    (native-inputs
      (list libtool))
    (home-page "https://github.com/imageworks/pystring")
    (synopsis "C++ functions matching the interface and behavior of Python
string methods")
    (description "Pystring is a collection of C++ functions which match the
interface and behavior of python's string class methods using std::string.
Implemented in C++, it does not require or make use of a python interpreter.
It provides convenience and familiarity for common string operations not
included in the standard C++ library.  It's also useful in environments where
both C++ and python are used.")
    (license license:bsd-3)))

(define-public opencolorio-2
  (package
    (name "opencolorio")
    (version "2.0.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/AcademySoftwareFoundation/OpenColorIO")
             (commit (string-append "v" version))))
       (sha256
        (base32 "0888fca8wa5zdc6f7lmh1wi7ljw75ql0rlzaslk2zffd08ij0s38"))
       (file-name (git-file-name name version))))
    (build-system cmake-build-system)
    (arguments
     `(#:configure-flags
       (list "-DOCIO_INSTALL_EXT_PACKAGES=NONE"
             (string-append "-Dpystring_ROOT="
                            (assoc-ref %build-inputs "pystring")))))
    (native-inputs
      (list git pkg-config python))
    (inputs
      (list lcms
            openexr
            tinyxml
            expat
            pybind11
            yaml-cpp
            ilmbase
            pystring))
    (home-page "https://opencolorio.org")
    (synopsis "Color management for visual effects and animation")
    (description
     "OpenColorIO, or OCIO, is a complete color management solution geared
towards motion picture production, with an emphasis on visual effects and
computer animation.  It provides a straightforward and consistent user
experience across all supporting applications while allowing for sophisticated
back-end configuration options suitable for high-end production usage.

OCIO is compatible with the @acronym{ACES, Academy Color Encoding
Specification} and is @acronym{LUT, look-up table}-format agnostic, supporting
many popular formats.")
    (license (list license:zlib         ; src/OpenColorIO/md5
                   license:bsd-3))))    ; the rest

(define-public openexr-3
  (package
    (name "openexr")
    (version "3.0.4")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/AcademySoftwareFoundation/openexr")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1pcd3rqdkl07fscnkxbxpy0h0qdzy5w5dl5k5mk36k6nizy2z8gx"))))
    (build-system cmake-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'fix-test-tmpdir
             (lambda _
               (let* ((new-tmpdir (string-append (getcwd) "/test-tmp"))
                      (test-dir (string-append (getcwd) "/src/test/"))
                      (get-tmpdir-h (lambda (dir) (string-append test-dir dir "/tmpDir.h")))
                      (replace-files (list (get-tmpdir-h "OpenEXRFuzzTest")
                                           (get-tmpdir-h "OpenEXRTest")
                                           (get-tmpdir-h "OpenEXRUtilTest"))))
                 (mkdir-p new-tmpdir)
                 (map (lambda (file)
                        (substitute* file
                          (("/var/tmp") new-tmpdir)))
                      replace-files)))))))
    (inputs
      (list zlib imath))
    (home-page "https://www.openexr.com")
    (synopsis "High-dynamic range file format library")
    (description "OpenEXR is a high dynamic-range (HDR) image file format developed for use in
computer imaging applications.  The IlmImf C++ libraries support storage of the \"EXR\" file
format for storing 16-bit floating-point images.")
    (license license:bsd-3)))

(define-public optional-lite
  (package
    (name "optional-lite")
    (version "3.4.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/martinmoene/optional-lite")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "17g8jcwyc3skf8nr68yr0mbp4q2hankgidgdgjfkyl03f5ysy64v"))))
    (build-system cmake-build-system)
    (home-page "https://github.com/martinmoene/optional-lite")
    (synopsis "C++17-like optional type for C++98, C++11, and later")
    (description
"optional lite is a single-file header-only library to represent optional
(nullable) objects and pass them by value.  The library aims to provide
a C++17-like optional for use with C++98 and later.")
    (license license:boost1.0)))

(define-public cpp11-any
  (let ((version "0.0.0")
	(revision "1")
	(commit "f67bd5f8bbf7eb628bf38206d4ac5cb22438e6bb"))
    (package
      (name "cpp11-any")
      (version (git-version version revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/thelink2012/any")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1ch6aq363dqx6bx7yjg4lkq346sy2acw1fnamg4jdqs4z8rqz9jz"))))
      (build-system cmake-build-system)
      (home-page "https://github.com/thelink2012/any")
      (synopsis "Implementation of std::experimental::any")
      (description
"This is a implementation of N4562 std::experimental::any (merged into
C++17) for C++11 compilers.  It contains a small object optimization
for objects with a size of up to 2 words (such as int, float and
std::shared_ptr).  Storing those objects in the container will not trigger
a dynamic allocation.")
      (license license:boost1.0))))

(define-public olive
  (let ((revision "2")
	    (commit "efa74c72a80522fdd85a56e7dee13e341b73de99"))
    (package
      (name "olive")
      (version (git-version "0.2.0" revision commit))
      (source (origin
		(method git-fetch)
		(uri (git-reference
		      (url "https://github.com/olive-editor/olive")
		      (commit commit)))
		(file-name (git-file-name name version))
		(sha256
		 (base32
		  "00zv1h9acf3z76ivy04272r4f6rv0yip4bx1vs5znajffnyaj0jm"))))
      (build-system cmake-build-system)
      (arguments
       `(#:configure-flags '("-DCMAKE_CXX_FLAGS=-Wno-error=shadow")))
      (inputs
        (list qtbase-5
		      qtmultimedia
		      qttools
		      qtsvg
		      ffmpeg
		      opencolorio-2
		      openimageio
              portaudio
              zlib
              imath
		      openexr-3
              ilmbase))
      (native-inputs
        (list pkg-config))
      (home-page "https://olivevideoeditor.org")
      (synopsis "Free non-linear video editor")
      (description
"@code{olive} is a free and open source non-linear video editor.")
      (license license:gpl3+))))

;; TODO let's automate tracking nightlies
(define-public olive-5dd6f9d
  (let ((revision "0")
	    (commit "5dd6f9d0ce923ef96147525f4aced2c67e71d184"))
    (package (inherit olive)
      (name "olive-5dd6f9d")
      (version (git-version "0.2.0" revision commit))
      (source (origin
		(method git-fetch)
		(uri (git-reference
		      (url "https://github.com/olive-editor/olive")
		      (commit commit)))
		(file-name (git-file-name name version))
		(sha256
		 (base32
		  "0s04z38r2nvjjazy3fd1vxh2wx57hgdfj7mfjgp03imdmijba86c"))))
      (build-system cmake-build-system)
      (arguments
       `(,@(package-arguments olive)
         #:tests? #f)) ; fixme
;; starting phase `check'
;; Running tests...
;; /gnu/store/zga679c4nldah9l8dhd5a4hdy820hcyf-cmake-minimal-3.21.4/bin/ctest --force-new-ctest-process 
;; Test project /tmp/guix-build-olive-0.2.0-3.5dd6f9d.drv-0/build
    ;; Start 1: compositing-tests
;; 1/5 Test #1: compositing-tests ................   Passed    0.05 sec
    ;; Start 2: common-tests
;; 2/5 Test #2: common-tests .....................   Passed    0.05 sec
    ;; Start 3: rational-tests
;; 3/5 Test #3: rational-tests ...................   Passed    0.05 sec
    ;; Start 4: timerange-tests
;; 4/5 Test #4: timerange-tests ..................   Passed    0.05 sec
    ;; Start 5: timeline-tests
;; 5/5 Test #5: timeline-tests ...................Subprocess aborted***Exception:   0.05 sec
;; Failed to create destination directory "/homeless-shelter/.cache/ocioconf"
;; Extracting default OCIO config to "/homeless-shelter/.cache/ocioconf"
;; terminate called after throwing an instance of 'OpenColorIO_v2_0::Exception'
  ;; what():  Error could not read '/homeless-shelter/.cache/ocioconf/config.ocio' OCIO profile.
;; 
;; 
;; 80% tests passed, 1 tests failed out of 5
;; 
;; Total Test time (real) =   0.25 sec
;; 
;; The following tests FAILED:
	  ;; 5 - timeline-tests (Subprocess aborted)
;; Errors while running CTest
;; make: *** [Makefile:139: test] Error 8
      (synopsis "trackviewitem: fixed bug")))) ; TODO automate getting git commit message