mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 21:18:28 +03:00
gdk-pixbuf: support cross-compilation by disabling introspection and gtk_doc
I don't know why the gating on whether gobject-introspection is or isn't
null was added, but I removed it.
It was added here: 7fbcc56260
.
This commit is contained in:
parent
17689c66d4
commit
4a98b2f40e
@ -22,11 +22,16 @@
|
|||||||
, lib
|
, lib
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
withGtkDoc = stdenv.buildPlatform == stdenv.hostPlatform;
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gdk-pixbuf";
|
pname = "gdk-pixbuf";
|
||||||
version = "2.42.6";
|
version = "2.42.6";
|
||||||
|
|
||||||
outputs = [ "out" "dev" "man" "devdoc" "installedTests" ];
|
outputs = [ "out" "dev" "man" ]
|
||||||
|
++ lib.optional withGtkDoc "devdoc"
|
||||||
|
++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) "installedTests";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||||
@ -63,8 +68,8 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dgtk_doc=true"
|
"-Dgtk_doc=${lib.boolToString withGtkDoc}"
|
||||||
"-Dintrospection=${if gobject-introspection != null then "enabled" else "disabled"}"
|
"-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}"
|
||||||
"-Dgio_sniffing=false"
|
"-Dgio_sniffing=false"
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -85,9 +90,6 @@ stdenv.mkDerivation rec {
|
|||||||
moveToOutput "bin" "$dev"
|
moveToOutput "bin" "$dev"
|
||||||
moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
|
moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
|
||||||
|
|
||||||
# So that devhelp can find this.
|
|
||||||
mkdir -p "$devdoc/share/devhelp"
|
|
||||||
mv "$out/share/doc" "$devdoc/share/devhelp/books"
|
|
||||||
'' + lib.optionalString stdenv.isDarwin ''
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
# meson erroneously installs loaders with .dylib extension on Darwin.
|
# meson erroneously installs loaders with .dylib extension on Darwin.
|
||||||
# Their @rpath has to be replaced before gdk-pixbuf-query-loaders looks at them.
|
# Their @rpath has to be replaced before gdk-pixbuf-query-loaders looks at them.
|
||||||
@ -98,6 +100,10 @@ stdenv.mkDerivation rec {
|
|||||||
'' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
'' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||||
# We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/
|
# We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/
|
||||||
$dev/bin/gdk-pixbuf-query-loaders --update-cache
|
$dev/bin/gdk-pixbuf-query-loaders --update-cache
|
||||||
|
'' + lib.optionalString withGtkDoc ''
|
||||||
|
# So that devhelp can find this.
|
||||||
|
mkdir -p "$devdoc/share/devhelp"
|
||||||
|
mv "$out/share/doc" "$devdoc/share/devhelp/books"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# The fixDarwinDylibNames hook doesn't patch binaries.
|
# The fixDarwinDylibNames hook doesn't patch binaries.
|
||||||
|
Loading…
Reference in New Issue
Block a user