| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> |
| 3 | ;;; Copyright © 2014 John Darrington <jmd@gnu.org> |
| 4 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
| 5 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
| 6 | ;;; |
| 7 | ;;; This file is part of GNU Guix. |
| 8 | ;;; |
| 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 10 | ;;; under the terms of the GNU General Public License as published by |
| 11 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 12 | ;;; your option) any later version. |
| 13 | ;;; |
| 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | ;;; GNU General Public License for more details. |
| 18 | ;;; |
| 19 | ;;; You should have received a copy of the GNU General Public License |
| 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | (define-module (gnu packages gstreamer) |
| 23 | #:use-module ((guix licenses) #:select (lgpl2.0+ bsd-2 bsd-3 gpl2+)) |
| 24 | #:use-module (guix packages) |
| 25 | #:use-module (guix download) |
| 26 | #:use-module (guix build-system gnu) |
| 27 | #:use-module (gnu packages) |
| 28 | #:use-module (gnu packages bison) |
| 29 | #:use-module (gnu packages cdrom) |
| 30 | #:use-module (gnu packages compression) |
| 31 | #:use-module (gnu packages flex) |
| 32 | #:use-module (gnu packages glib) |
| 33 | #:use-module (gnu packages gtk) |
| 34 | #:use-module (gnu packages image) |
| 35 | #:use-module (gnu packages linux) |
| 36 | #:use-module (gnu packages perl) |
| 37 | #:use-module (gnu packages pulseaudio) |
| 38 | #:use-module (gnu packages xorg) |
| 39 | #:use-module (gnu packages xiph) |
| 40 | #:use-module (gnu packages pkg-config) |
| 41 | #:use-module (gnu packages python) |
| 42 | #:use-module (gnu packages yasm) |
| 43 | #:use-module (gnu packages xml)) |
| 44 | |
| 45 | (define-public orc |
| 46 | (package |
| 47 | (name "orc") |
| 48 | (version "0.4.23") |
| 49 | (source (origin |
| 50 | (method url-fetch) |
| 51 | (uri (string-append "http://gstreamer.freedesktop.org/data/src/" |
| 52 | "orc/orc-" version ".tar.xz")) |
| 53 | (sha256 |
| 54 | (base32 |
| 55 | "1ryz1gfgrxcj806cakcblxf0bcwq8p2mw8k86fs3f5wlwayawzkn")))) |
| 56 | (build-system gnu-build-system) |
| 57 | (arguments `(#:phases |
| 58 | (alist-cons-before |
| 59 | 'check 'disable-faulty-test |
| 60 | (lambda _ |
| 61 | ;; XXX Disable the 'test-limits' and 'exec_opcodes_sys' |
| 62 | ;; tests, which fail on some machines. See: |
| 63 | ;; https://bugzilla.gnome.org/show_bug.cgi?id=735273 |
| 64 | (substitute* '("testsuite/test-limits.c" |
| 65 | "testsuite/exec_opcodes_sys.c") |
| 66 | (("if \\(error\\) return 1;") |
| 67 | "if (error) return 77;"))) |
| 68 | %standard-phases))) |
| 69 | (home-page "http://code.entropywave.com/orc/") |
| 70 | (synopsis "Oil runtime compiler") |
| 71 | (description |
| 72 | "Orc is a just-in-time compiler implemented as a library and set of |
| 73 | associated tools for compiling and executing simple programs that operate on |
| 74 | arrays of data.") |
| 75 | ;; The source code implementing the Marsenne Twister algorithm is licensed |
| 76 | ;; under the 3-clause BSD license, the rest is under 2-clause BSD license. |
| 77 | (license (list bsd-2 bsd-3)))) |
| 78 | |
| 79 | (define-public gstreamer |
| 80 | (package |
| 81 | (name "gstreamer") |
| 82 | (version "1.4.5") |
| 83 | (source |
| 84 | (origin |
| 85 | (method url-fetch) |
| 86 | (uri (string-append "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-" |
| 87 | version ".tar.xz")) |
| 88 | (sha256 |
| 89 | (base32 |
| 90 | "1bmhbhak6i5wmmb6w86jyyv8lax4gdq983la4lk4a0krz6kim020")))) |
| 91 | (build-system gnu-build-system) |
| 92 | (outputs '("out" "doc")) |
| 93 | (arguments |
| 94 | `(#:make-flags '("CC=gcc") ; for g-ir-scanner. |
| 95 | #:configure-flags |
| 96 | (list (string-append "--with-html-dir=" |
| 97 | (assoc-ref %outputs "doc") |
| 98 | "/share/gtk-doc/html")))) |
| 99 | (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc. |
| 100 | (native-inputs |
| 101 | `(("bison" ,bison) |
| 102 | ("flex" ,flex) |
| 103 | ("glib" ,glib "bin") |
| 104 | ("gobject-introspection" ,gobject-introspection) |
| 105 | ("perl" ,perl) |
| 106 | ("pkg-config" ,pkg-config) |
| 107 | ("python-wrapper" ,python-wrapper))) |
| 108 | (home-page "http://gstreamer.freedesktop.org/") |
| 109 | (synopsis "Multimedia library") |
| 110 | (description |
| 111 | "GStreamer is a library for constructing graphs of media-handling |
| 112 | components. The applications it supports range from simple Ogg/Vorbis |
| 113 | playback, audio/video streaming to complex audio (mixing) and video |
| 114 | (non-linear editing) processing. |
| 115 | |
| 116 | Applications can take advantage of advances in codec and filter technology |
| 117 | transparently. Developers can add new codecs and filters by writing a |
| 118 | simple plugin with a clean, generic interface. |
| 119 | |
| 120 | This package provides the core library and elements.") |
| 121 | (license lgpl2.0+))) |
| 122 | |
| 123 | (define-public gstreamer-0.10 |
| 124 | (package (inherit gstreamer) |
| 125 | (version "0.10.36") |
| 126 | (source |
| 127 | (origin |
| 128 | (method url-fetch) |
| 129 | (uri (string-append "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-" |
| 130 | version ".tar.xz")) |
| 131 | (sha256 |
| 132 | (base32 |
| 133 | "1nkid1n2l3rrlmq5qrf5yy06grrkwjh3yxl5g0w58w0pih8allci")) |
| 134 | (patches |
| 135 | (list (search-patch "gstreamer-0.10-bison3.patch") |
| 136 | (search-patch "gstreamer-0.10-silly-test.patch"))))) |
| 137 | (propagated-inputs |
| 138 | `(("libxml2" ,libxml2))) |
| 139 | (inputs `(("glib" ,glib))) |
| 140 | (native-inputs |
| 141 | `(("bison" ,bison) |
| 142 | ("flex" ,flex) |
| 143 | ("perl" ,perl) |
| 144 | ("pkg-config" ,pkg-config) |
| 145 | ("glib" ,glib "bin") |
| 146 | ("python" ,python-2))))) |
| 147 | |
| 148 | |
| 149 | (define-public gst-plugins-base |
| 150 | (package |
| 151 | (name "gst-plugins-base") |
| 152 | (version "1.4.5") |
| 153 | (source |
| 154 | (origin |
| 155 | (method url-fetch) |
| 156 | (uri (string-append "http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-" |
| 157 | version ".tar.xz")) |
| 158 | (sha256 |
| 159 | (base32 |
| 160 | "07ampnfa6p41s0lhia62l9h8bdx3c7vxvdz93pbx64m3wycq3gbp")))) |
| 161 | (build-system gnu-build-system) |
| 162 | (outputs '("out" "doc")) |
| 163 | (propagated-inputs |
| 164 | `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc |
| 165 | (inputs |
| 166 | `(("cdparanoia" ,cdparanoia) |
| 167 | ("orc" ,orc) |
| 168 | ("pango" ,pango) |
| 169 | ("libogg" ,libogg) |
| 170 | ("libtheora" ,libtheora) |
| 171 | ("libvorbis" ,libvorbis) |
| 172 | ("libx11" ,libx11) |
| 173 | ("zlib" ,zlib) |
| 174 | ("libXext" ,libxext) |
| 175 | ("libxv" ,libxv) |
| 176 | ("alsa-lib" ,alsa-lib))) |
| 177 | (native-inputs |
| 178 | `(("pkg-config" ,pkg-config) |
| 179 | ("glib" ,glib "bin") |
| 180 | ("gobject-introspection" ,gobject-introspection) |
| 181 | ("python-wrapper" ,python-wrapper))) |
| 182 | (arguments |
| 183 | `(#:configure-flags |
| 184 | (list (string-append "--with-html-dir=" |
| 185 | (assoc-ref %outputs "doc") |
| 186 | "/share/gtk-doc/html")) |
| 187 | #:phases |
| 188 | (alist-cons-before |
| 189 | 'configure 'patch |
| 190 | (lambda _ |
| 191 | (substitute* "tests/check/libs/pbutils.c" |
| 192 | (("/bin/sh") (which "sh"))) |
| 193 | ;; for g-ir-scanner. |
| 194 | (setenv "CC" "gcc")) |
| 195 | %standard-phases))) |
| 196 | (home-page "http://gstreamer.freedesktop.org/") |
| 197 | (synopsis |
| 198 | "Plugins for the GStreamer multimedia library") |
| 199 | (description "This package provides an essential exemplary set of plug-ins |
| 200 | for the GStreamer multimedia library.") |
| 201 | (license lgpl2.0+))) |
| 202 | |
| 203 | |
| 204 | (define-public gst-plugins-good |
| 205 | (package |
| 206 | (name "gst-plugins-good") |
| 207 | (version "1.4.5") |
| 208 | (source |
| 209 | (origin |
| 210 | (method url-fetch) |
| 211 | (uri (string-append |
| 212 | "http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-" |
| 213 | version ".tar.xz")) |
| 214 | (sha256 |
| 215 | (base32 |
| 216 | "0hg6qzdpib9nwn3hdxv0d4rvivi1c4bmxsq2a9hqmamwyzrvbcbr")))) |
| 217 | (build-system gnu-build-system) |
| 218 | (inputs |
| 219 | `(("glib" ,glib) |
| 220 | ("cairo" ,cairo) |
| 221 | ("gdk-pixbuf" ,gdk-pixbuf) |
| 222 | ("flac" ,flac) |
| 223 | ("speex" ,speex) |
| 224 | ("libogg" ,libogg) ;; should be a propagated input of the above |
| 225 | ("libx11" ,libx11) |
| 226 | ("zlib" ,zlib) |
| 227 | ("libpng" ,libpng) |
| 228 | ("libjpeg" ,libjpeg) |
| 229 | ("libXext" ,libxext) |
| 230 | ("libxv" ,libxv) |
| 231 | ("pulseaudio" ,pulseaudio) |
| 232 | ("gstreamer" ,gstreamer))) |
| 233 | (native-inputs |
| 234 | `(("pkg-config" ,pkg-config) |
| 235 | ("glib" ,glib "bin") |
| 236 | ("gst-plugins-base" ,gst-plugins-base) |
| 237 | ("python-wrapper" ,python-wrapper))) |
| 238 | (arguments |
| 239 | `(#:configure-flags (list "--disable-osx_audio" |
| 240 | "--disable-osx_video" |
| 241 | "--disable-directsound" |
| 242 | "--disable-waveform"))) |
| 243 | (home-page "http://gstreamer.freedesktop.org/") |
| 244 | (synopsis |
| 245 | "Plugins for the GStreamer multimedia library") |
| 246 | (description "GStreamer Good Plug-ins is a set of plug-ins for the |
| 247 | GStreamer multimedia library. This set contains those plug-ins which the |
| 248 | developers consider to have good quality code and correct functionality.") |
| 249 | (license lgpl2.0+))) |
| 250 | |
| 251 | (define-public gst-libav |
| 252 | (package |
| 253 | (name "gst-libav") |
| 254 | (version "1.4.5") |
| 255 | (source (origin |
| 256 | (method url-fetch) |
| 257 | (uri (string-append |
| 258 | "http://gstreamer.freedesktop.org/src/" name "/" |
| 259 | name "-" version ".tar.xz")) |
| 260 | (sha256 |
| 261 | (base32 |
| 262 | "1g7vg9amh3cc3nmc415h6g2rqxqi4wgwqi08hxfbpwq48ri64p30")))) |
| 263 | (build-system gnu-build-system) |
| 264 | (arguments |
| 265 | '(#:phases |
| 266 | (modify-phases %standard-phases |
| 267 | (add-before configure patch-/bin/sh |
| 268 | (lambda _ |
| 269 | (substitute* "gst-libs/ext/libav/configure" |
| 270 | (("#! /bin/sh") |
| 271 | (string-append "#! "(which "sh"))))))))) |
| 272 | (native-inputs |
| 273 | `(("pkg-config" ,pkg-config) |
| 274 | ("python" ,python) |
| 275 | ("yasm" ,yasm))) |
| 276 | (inputs |
| 277 | `(("gst-plugins-base" ,gst-plugins-base) |
| 278 | ("orc" ,orc) |
| 279 | ("zlib" ,zlib))) |
| 280 | (home-page "http://gstreamer.freedesktop.org/") |
| 281 | (synopsis "Plugins for the GStreamer multimedia library") |
| 282 | (description |
| 283 | "This GStreamer plugin supports a large number of audio and video |
| 284 | compression formats through the use of the libav library.") |
| 285 | (license gpl2+))) |
| 286 | |
| 287 | (define-public gst-plugins-base-0.10 |
| 288 | (package (inherit gst-plugins-base) |
| 289 | (version "0.10.36") |
| 290 | (source |
| 291 | (origin |
| 292 | (method url-fetch) |
| 293 | (uri (string-append |
| 294 | "http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-" |
| 295 | version ".tar.xz")) |
| 296 | (sha256 |
| 297 | (base32 |
| 298 | "0jp6hjlra98cnkal4n6bdmr577q8mcyp3c08s3a02c4hjhw5rr0z")))) |
| 299 | (inputs |
| 300 | `(("glib" ,glib) |
| 301 | ("gstreamer" ,gstreamer-0.10))) |
| 302 | (native-inputs |
| 303 | `(("pkg-config" ,pkg-config) |
| 304 | ("glib" ,glib "bin") |
| 305 | ("python" ,python-2))))) |