From 365640a6f36823d79361d6bb28bb1d522bea6446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Sat, 31 Mar 2018 13:39:20 +0200 Subject: [PATCH] gstreamer: Switch to meson build system --- .../libraries/gstreamer/core/default.nix | 29 ++++++++++++------- .../core/fix_pkgconfig_includedir.patch | 15 ++++++++++ 2 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 pkgs/development/libraries/gstreamer/core/fix_pkgconfig_includedir.patch 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' : '')