summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorBastian Köcher <git@kchr.de>2018-03-31 13:39:20 +0200
committerBastian Köcher <git@kchr.de>2018-04-04 17:25:39 +0200
commit365640a6f36823d79361d6bb28bb1d522bea6446 (patch)
tree5e0b6878e953f1f9c985993c7c36a5f4615bfe9b /pkgs
parent1884beb21e9ba8fdb99efd44094f30b25fa1670f (diff)
downloadnixpkgs-365640a6f36823d79361d6bb28bb1d522bea6446.tar
nixpkgs-365640a6f36823d79361d6bb28bb1d522bea6446.tar.gz
nixpkgs-365640a6f36823d79361d6bb28bb1d522bea6446.tar.bz2
nixpkgs-365640a6f36823d79361d6bb28bb1d522bea6446.tar.lz
nixpkgs-365640a6f36823d79361d6bb28bb1d522bea6446.tar.xz
nixpkgs-365640a6f36823d79361d6bb28bb1d522bea6446.tar.zst
nixpkgs-365640a6f36823d79361d6bb28bb1d522bea6446.zip
gstreamer: Switch to meson build system
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/gstreamer/core/default.nix29
-rw-r--r--pkgs/development/libraries/gstreamer/core/fix_pkgconfig_includedir.patch15
2 files changed, 33 insertions, 11 deletions
diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix
index 74791bb6659..ab3f78767a1 100644
--- a/pkgs/development/libraries/gstreamer/core/default.nix
+++ b/pkgs/development/libraries/gstreamer/core/default.nix
@@ -1,6 +1,7 @@
-{ stdenv, fetchurl, pkgconfig, perl, bison, flex, python, gobjectIntrospection
-, glib, makeWrapper
-, darwin
+{ stdenv, fetchurl, fetchpatch, meson, ninja
+, pkgconfig, gettext, gobjectIntrospection
+, bison, flex, python3, glib, makeWrapper
+, libcap,libunwind, darwin
 }:
 
 stdenv.mkDerivation rec {
@@ -19,28 +20,34 @@ stdenv.mkDerivation rec {
     sha256 = "0vj6k01lp2yva6rfd95fkyng9jdr62gkz0x8d2l81dyly1ki6dpw";
   };
 
+  patches = [ 
+    (fetchpatch {
+        url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370411";
+        sha256 = "16plzzmkk906k4892zq68j3c9z8vdma5nxzlviq20jfv04ykhmk2";
+    })
+    ./fix_pkgconfig_includedir.patch
+  ];
+
   outputs = [ "out" "dev" ];
   outputBin = "dev";
 
   nativeBuildInputs = [
-    pkgconfig perl bison flex python gobjectIntrospection makeWrapper
+    meson ninja pkgconfig gettext bison flex python3 makeWrapper gobjectIntrospection
   ];
-  buildInputs = stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreServices;
+  buildInputs = [ libcap libunwind ] ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreServices;
 
   propagatedBuildInputs = [ glib ];
 
-  enableParallelBuilding = true;
-
-  preConfigure = ''
-    configureFlagsArray+=("--exec-prefix=$dev")
-  '';
-
   postInstall = ''
     for prog in "$dev/bin/"*; do
         wrapProgram "$prog" --suffix GST_PLUGIN_SYSTEM_PATH : "\$(unset _tmp; for profile in \$NIX_PROFILES; do _tmp="\$profile/lib/gstreamer-1.0''$\{_tmp:+:\}\$_tmp"; done; printf "\$_tmp")"
     done
   '';
 
+  preConfigure= ''
+    patchShebangs .
+  '';
+
   preFixup = ''
     moveToOutput "share/bash-completion" "$dev"
   '';
diff --git a/pkgs/development/libraries/gstreamer/core/fix_pkgconfig_includedir.patch b/pkgs/development/libraries/gstreamer/core/fix_pkgconfig_includedir.patch
new file mode 100644
index 00000000000..ae0dbfa36ff
--- /dev/null
+++ b/pkgs/development/libraries/gstreamer/core/fix_pkgconfig_includedir.patch
@@ -0,0 +1,15 @@
+diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build
+index edb0586c2..0325cdf4a 100644
+--- a/pkgconfig/meson.build
++++ b/pkgconfig/meson.build
+@@ -2,8 +2,8 @@ pkgconf = configuration_data()
+ 
+ pkgconf.set('prefix', join_paths(get_option('prefix')))
+ pkgconf.set('exec_prefix', '${prefix}')
+-pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
+-pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
++pkgconf.set('libdir', get_option('libdir'))
++pkgconf.set('includedir', get_option('includedir'))
+ pkgconf.set('GST_API_VERSION', apiversion)
+ pkgconf.set('VERSION', gst_version)
+ pkgconf.set('LIBM', mathlib.found() ? '-lm' : '')