gst-plugins-bad: Switch to meson build system

This commit is contained in:
Bastian Köcher 2018-03-31 23:03:18 +02:00
parent fd0474e6f8
commit ac0d32b866
2 changed files with 28 additions and 10 deletions

View File

@ -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;
}

View File

@ -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)