gstreamer: Switch to meson build system
This commit is contained in:
parent
1884beb21e
commit
365640a6f3
|
@ -1,6 +1,7 @@
|
||||||
{ stdenv, fetchurl, pkgconfig, perl, bison, flex, python, gobjectIntrospection
|
{ stdenv, fetchurl, fetchpatch, meson, ninja
|
||||||
, glib, makeWrapper
|
, pkgconfig, gettext, gobjectIntrospection
|
||||||
, darwin
|
, bison, flex, python3, glib, makeWrapper
|
||||||
|
, libcap,libunwind, darwin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -19,28 +20,34 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0vj6k01lp2yva6rfd95fkyng9jdr62gkz0x8d2l81dyly1ki6dpw";
|
sha256 = "0vj6k01lp2yva6rfd95fkyng9jdr62gkz0x8d2l81dyly1ki6dpw";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370411";
|
||||||
|
sha256 = "16plzzmkk906k4892zq68j3c9z8vdma5nxzlviq20jfv04ykhmk2";
|
||||||
|
})
|
||||||
|
./fix_pkgconfig_includedir.patch
|
||||||
|
];
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
outputBin = "dev";
|
outputBin = "dev";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
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 ];
|
propagatedBuildInputs = [ glib ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
configureFlagsArray+=("--exec-prefix=$dev")
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
for prog in "$dev/bin/"*; do
|
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")"
|
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
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
preConfigure= ''
|
||||||
|
patchShebangs .
|
||||||
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
moveToOutput "share/bash-completion" "$dev"
|
moveToOutput "share/bash-completion" "$dev"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -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' : '')
|
Loading…
Reference in New Issue