From 1babfe0decf6cf2029e65c44a6e259851306cb5a Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Wed, 15 Jan 2020 13:05:12 +0100 Subject: [PATCH 2/2] gnu: Port gstreamer to meson-build-system. * gnu/packages/gstreamer.scm (gstreamer, gst-plugins-good, gst-plugins-bad) (gst-plugins-ugly, gst-libav, gst-editing-services): Use meson-build-system. (gstreamer) [arguments]: Drop configure-flags. Move documentation in post-install phase. [native-inputs]: Add gtk-doc. (gst-plugins-base, gst-plugins-bad) [outputs]: Remove doc. (gst-editing-services) [native-inputs]: Add gst-plugins-good, gst-plugins-bad and python-pygobject, all of which seem to be required by the build system only. --- gnu/packages/gstreamer.scm | 56 ++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 151d222c68..1f1f632e70 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -116,19 +116,25 @@ arrays of data.") (sha256 (base32 "0kp93622y29pck8asvil1fmzf55s2gx76wv475a6izc3cwj49w73")))) - (build-system gnu-build-system) + (build-system meson-build-system) (outputs '("out" "doc")) (arguments - `(#:configure-flags - (list (string-append "--with-html-dir=" - (assoc-ref %outputs "doc") - "/share/gtk-doc/html")))) + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'move-docs + (lambda* (#:key outputs #:allow-other-keys) + (mkdir-p (string-append (assoc-ref outputs "doc") "/share")) + (rename-file + (string-append (assoc-ref outputs "out") "/share/gtk-doc") + (string-append (assoc-ref outputs "doc") "/share/gtk-doc")) + #t))))) (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc. (native-inputs `(("bison" ,bison) ("flex" ,flex) ("glib" ,glib "bin") ("gobject-introspection" ,gobject-introspection) + ("gtk-doc" ,gtk-doc) ("perl" ,perl) ("pkg-config" ,pkg-config) ("python-wrapper" ,python-wrapper))) @@ -163,8 +169,10 @@ This package provides the core library and elements.") (sha256 (base32 "0sl1hxlyq46r02k7z70v09vx1gi4rcypqmzra9jid93lzvi76gmi")))) - (build-system gnu-build-system) - (outputs '("out" "doc")) + (build-system meson-build-system) + ;; TODO: documentation target is broken in meson + ;; future versions rely on hotdoc to be built, which is not yet packaged + ;; (outputs '("out" "doc")) (propagated-inputs `(("glib" ,glib) ;required by gstreamer-sdp-1.0.pc ("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc @@ -199,10 +207,6 @@ This package provides the core library and elements.") ("python-wrapper" ,python-wrapper))) (arguments `(#:parallel-tests? #f ; 'pipelines/tcp' fails in parallel - #:configure-flags - (list (string-append "--with-html-dir=" - (assoc-ref %outputs "doc") - "/share/gtk-doc/html")) #:phases (modify-phases %standard-phases (add-before 'configure 'patch @@ -230,7 +234,7 @@ for the GStreamer multimedia library.") (sha256 (base32 "068k3cbv1yf3gbllfdzqsg263kzwh21y8dpwr0wvgh15vapkpfs0")))) - (build-system gnu-build-system) + (build-system meson-build-system) (inputs `(("aalib" ,aalib) ("cairo" ,cairo) @@ -291,14 +295,17 @@ developers consider to have good quality code and correct functionality.") (sha256 (base32 "0x0y0hm0ga3zqi5q4090hw5sjh59y1ry9ak16qsaascm72i7mjzi")))) - (outputs '("out" "doc")) - (build-system gnu-build-system) + ;; TODO: upstream currently does not build documentation with meson. + ;; (outputs '("out" "doc")) + (build-system meson-build-system) (arguments - '(#:tests? #f ; XXX: 13 of 53 tests fail - #:configure-flags - (list (string-append "--with-html-dir=" - (assoc-ref %outputs "doc") - "/share/gtk-doc/html")))) + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-failing-tests + (lambda _ + (substitute* "tests/check/meson.build" + (("\\['elements/dash_mpd.c'\\], not xml2_dep.found\\(\\),") + "['elements/dash_mpd.c'], true,"))))))) (propagated-inputs `(("gst-plugins-base" ,gst-plugins-base))) (native-inputs @@ -367,7 +374,7 @@ par compared to the rest.") (sha256 (base32 "1jpvc32x6q01zjkfgh6gmq6aaikiyfwwnhj7bmvn52syhrdl202m")))) - (build-system gnu-build-system) + (build-system meson-build-system) (inputs `(("gst-plugins-base" ,gst-plugins-base) ("liba52" ,liba52) @@ -408,9 +415,7 @@ distribution problems in some jurisdictions, e.g. due to patent threats.") ;; Drop bundled ffmpeg. (delete-file-recursively "gst-libs/ext/libav") #t)))) - (build-system gnu-build-system) - (arguments - '(#:configure-flags '("--with-system-libav"))) + (build-system meson-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("python" ,python))) @@ -438,7 +443,7 @@ compression formats through the use of the libav library.") (sha256 (base32 "05hcf3prna8ajjnqd53221gj9syarrrjbgvjcbhicv0c38csc1hf")))) - (build-system gnu-build-system) + (build-system meson-build-system) (arguments ;; TODO: 16/22 failing tests with meson, 21 with gnu `(#:tests? #f)) @@ -447,8 +452,11 @@ compression formats through the use of the libav library.") ("libxml2" ,libxml2))) (native-inputs `(("flex" ,flex) + ("gst-plugins-good" ,gst-plugins-good) + ("gst-plugins-bad" ,gst-plugins-bad) ("perl" ,perl) ("pkg-config" ,pkg-config) + ("python-pygobject" ,python-pygobject) ("python" ,python))) (home-page "https://gstreamer.freedesktop.org/") (synopsis "GStreamer library for non-linear editors") -- 2.24.1