diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index aa2b55964b73..c1d28e58c4e6 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, python, gst-plugins-base, orc +{ stdenv, fetchurl, fetchpatch, meson, ninja, gettext +, pkgconfig, python, gst-plugins-base, orc , faacSupport ? false, faac ? null , gtkSupport ? false, gtk3 ? null , faad2, libass, libkate, libmms @@ -38,14 +39,18 @@ stdenv.mkDerivation rec { platforms = platforms.linux ++ platforms.darwin; }; - # TODO: Fix Cocoa build. The problem was ARC, which might be related to too - # old version of Apple SDK's. - configureFlags = optional stdenv.isDarwin "--disable-cocoa"; - - patchPhase = '' - sed -i 's/openjpeg-2.2/openjpeg-${openJpegVersion}/' ext/openjpeg/* + preConfigure = '' + patchShebangs . ''; + patches = [ + (fetchpatch { + url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370409"; + sha256 = "0hy0rcn35alq65yqwri4fqjz2hf3nyyg5c7rnndk51msmqjxpprk"; + }) + ./fix_pkgconfig_includedir.patch + ]; + src = fetchurl { url = "${meta.homepage}/src/gst-plugins-bad/${name}.tar.xz"; sha256 = "17sgzgx1c54k5rzz7ljyz3is0n7yj56k74vv05h8z1gjnsnjnppd"; @@ -53,7 +58,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkgconfig python ]; + nativeBuildInputs = [ meson ninja pkgconfig python gettext ]; buildInputs = [ gst-plugins-base orc @@ -76,6 +81,4 @@ stdenv.mkDerivation rec { ++ optional (!stdenv.isDarwin) mjpegtools; LDFLAGS = optionalString stdenv.isDarwin "-lintl"; - - enableParallelBuilding = true; } diff --git a/pkgs/development/libraries/gstreamer/bad/fix_pkgconfig_includedir.patch b/pkgs/development/libraries/gstreamer/bad/fix_pkgconfig_includedir.patch new file mode 100644 index 000000000000..b3deb05aebd9 --- /dev/null +++ b/pkgs/development/libraries/gstreamer/bad/fix_pkgconfig_includedir.patch @@ -0,0 +1,15 @@ +diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build +index 271f327f3..ddc52cca8 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', api_version) + pkgconf.set('VERSION', gst_version) +