From edd17a0cabefd208360e26e54d31b47f3340fe63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Sat, 31 Mar 2018 15:16:56 +0200 Subject: [PATCH] gst-plugins-base: Switch to meson build system --- .../libraries/gstreamer/base/default.nix | 28 +++++++++++-------- .../base/fix_pkgconfig_includedir.patch | 15 ++++++++++ 2 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 pkgs/development/libraries/gstreamer/base/fix_pkgconfig_includedir.patch diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index b5edd7cb93bc..e2a8c36bf026 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -1,6 +1,7 @@ -{ stdenv, fetchurl, pkgconfig, python, gstreamer, gobjectIntrospection -, orc, alsaLib, libXv, pango, libtheora -, cdparanoia, libvisual, libintlOrEmpty +{ stdenv, fetchurl, fetchpatch, pkgconfig, meson +, ninja, gettext, gobjectIntrospection, python +, gstreamer, orc, alsaLib, libXv, pango, libtheora +, wayland, cdparanoia, libvisual, libintlOrEmpty }: stdenv.mkDerivation rec { @@ -21,11 +22,11 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; nativeBuildInputs = [ - pkgconfig python gobjectIntrospection + pkgconfig python meson ninja gettext gobjectIntrospection ]; buildInputs = [ - orc libXv pango libtheora cdparanoia + orc libXv pango libtheora cdparanoia wayland ] ++ libintlOrEmpty ++ stdenv.lib.optional stdenv.isLinux alsaLib @@ -33,14 +34,17 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ gstreamer ]; - configureFlags = if stdenv.isDarwin then [ - # Does not currently build on Darwin - "--disable-libvisual" - # Undefined symbols _cdda_identify and _cdda_identify_scsi in cdparanoia - "--disable-cdparanoia" - ] else null; + preConfigure = '' + patchShebangs . + ''; NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; - enableParallelBuilding = true; + patches = [ + (fetchpatch { + url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370414"; + sha256 = "07x43xis0sr0hfchf36ap0cibx0lkfpqyszb3r3w9dzz301fk04z"; + }) + ./fix_pkgconfig_includedir.patch + ]; } diff --git a/pkgs/development/libraries/gstreamer/base/fix_pkgconfig_includedir.patch b/pkgs/development/libraries/gstreamer/base/fix_pkgconfig_includedir.patch new file mode 100644 index 000000000000..987cf0d87395 --- /dev/null +++ b/pkgs/development/libraries/gstreamer/base/fix_pkgconfig_includedir.patch @@ -0,0 +1,15 @@ +diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build +index 04abfbee5..74e3f290d 100644 +--- a/pkgconfig/meson.build ++++ b/pkgconfig/meson.build +@@ -2,8 +2,8 @@ pkgconf = configuration_data() + + pkgconf.set('prefix', 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', api_version) + pkgconf.set('VERSION', gst_version) + pkgconf.set('LIBM', libm.found() ? '-lm' : '')