gtk3: re-disable introspection if no emulator
e.g. when cross compiling from Linux to FreeBSD.
This commit is contained in:
parent
52a479d024
commit
0913507b13
|
@ -8,6 +8,7 @@
|
|||
, docbook_xml_dtd_43
|
||||
, gtk-doc
|
||||
, meson
|
||||
, mesonEmulatorHook
|
||||
, ninja
|
||||
, python3
|
||||
, makeWrapper
|
||||
|
@ -21,6 +22,8 @@
|
|||
, atk
|
||||
, at-spi2-atk
|
||||
, gobject-introspection
|
||||
, buildPackages
|
||||
, withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages
|
||||
, fribidi
|
||||
, xorg
|
||||
, libepoxy
|
||||
|
@ -39,7 +42,6 @@
|
|||
, wayland-protocols
|
||||
, xineramaSupport ? stdenv.isLinux
|
||||
, cupsSupport ? stdenv.isLinux
|
||||
, withGtkDoc ? stdenv.isLinux && (stdenv.buildPlatform == stdenv.hostPlatform)
|
||||
, cups
|
||||
, AppKit
|
||||
, Cocoa
|
||||
|
@ -63,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
pname = "gtk+3";
|
||||
version = "3.24.36";
|
||||
|
||||
outputs = [ "out" "dev" ] ++ lib.optional withGtkDoc "devdoc";
|
||||
outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
|
||||
outputBin = "dev";
|
||||
|
||||
setupHooks = [
|
||||
|
@ -94,7 +96,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
];
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
gobject-introspection
|
||||
makeWrapper
|
||||
meson
|
||||
ninja
|
||||
|
@ -102,12 +103,15 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
python3
|
||||
sassc
|
||||
gdk-pixbuf
|
||||
] ++ finalAttrs.setupHooks ++ lib.optionals withGtkDoc [
|
||||
] ++ finalAttrs.setupHooks ++ lib.optionals withIntrospection [
|
||||
gobject-introspection
|
||||
docbook_xml_dtd_43
|
||||
docbook-xsl-nons
|
||||
gtk-doc
|
||||
# For xmllint
|
||||
libxml2
|
||||
] ++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||
mesonEmulatorHook
|
||||
] ++ lib.optionals waylandSupport [
|
||||
wayland-scanner
|
||||
];
|
||||
|
@ -157,12 +161,13 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dgtk_doc=${lib.boolToString withGtkDoc}"
|
||||
"-Dgtk_doc=${lib.boolToString withIntrospection}"
|
||||
"-Dtests=false"
|
||||
"-Dtracker3=${lib.boolToString trackerSupport}"
|
||||
"-Dbroadway_backend=${lib.boolToString broadwaySupport}"
|
||||
"-Dx11_backend=${lib.boolToString x11Support}"
|
||||
"-Dquartz_backend=${lib.boolToString (stdenv.isDarwin && !x11Support)}"
|
||||
"-Dintrospection=${lib.boolToString withIntrospection}"
|
||||
];
|
||||
|
||||
doCheck = false; # needs X11
|
||||
|
|
Loading…
Reference in a new issue