mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 16:40:12 +00:00
gdk_pixbuf: 2.36.7 → 2.36.12 (#39026)
This commit is contained in:
parent
9a66462635
commit
50953c3cbc
|
@ -1,40 +1,50 @@
|
||||||
{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, gnome3
|
{ stdenv, fetchurl, meson, ninja, pkgconfig, gettext, python3, libxml2, libxslt, docbook_xsl
|
||||||
, jasper, gobjectIntrospection, doCheck ? false }:
|
, docbook_xml_dtd_43, gtk-doc, glib, libtiff, libjpeg, libpng, libX11, gnome3
|
||||||
|
, jasper, gobjectIntrospection, doCheck ? false, makeWrapper }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "gdk-pixbuf";
|
pname = "gdk-pixbuf";
|
||||||
version = "2.36.7";
|
version = "2.36.12";
|
||||||
# TODO: since 2.36.8 gdk-pixbuf gets configured to use mime-type sniffing,
|
|
||||||
# which apparently requires access to shared-mime-info files during runtime.
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
|
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
|
||||||
sha256 = "1b6e5eef09d98f05f383014ecd3503e25dfb03d7e5b5f5904e5a65b049a6a4d8";
|
sha256 = "0d534ysa6n9prd17wwzisq7mj6qkhwh8wcf8qgin1ar3hbs5ry7z";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "dev" "devdoc" ];
|
patches = [
|
||||||
|
# TODO: since 2.36.8 gdk-pixbuf gets configured to use mime-type sniffing,
|
||||||
|
# which requires access to shared-mime-info files during runtime.
|
||||||
|
# For now, we are patching the build script to avoid the dependency.
|
||||||
|
./no-mime-sniffing.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
outputs = [ "out" "dev" "man" "devdoc" ];
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
# !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
|
# !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
|
||||||
buildInputs = [ libX11 gobjectIntrospection ];
|
buildInputs = [ libX11 ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [
|
||||||
|
meson ninja pkgconfig gettext python3 libxml2 libxslt docbook_xsl docbook_xml_dtd_43
|
||||||
|
gtk-doc gobjectIntrospection makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ glib libtiff libjpeg libpng jasper ];
|
propagatedBuildInputs = [ glib libtiff libjpeg libpng jasper ];
|
||||||
|
|
||||||
configureFlags = "--with-libjasper --with-x11"
|
mesonFlags = [
|
||||||
+ stdenv.lib.optionalString (gobjectIntrospection != null) " --enable-introspection=yes"
|
"-Ddocs=true"
|
||||||
;
|
"-Djasper=true"
|
||||||
|
"-Dx11=true"
|
||||||
|
"-Dgir=${if gobjectIntrospection != null then "true" else "false"}"
|
||||||
|
];
|
||||||
|
|
||||||
# on darwin, tests don't link
|
postPatch = ''
|
||||||
preBuild = stdenv.lib.optionalString (stdenv.isDarwin && !doCheck) ''
|
chmod +x build-aux/* # patchShebangs only applies to executables
|
||||||
substituteInPlace Makefile --replace "docs tests" "docs"
|
patchShebangs build-aux
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall =
|
postInstall =
|
||||||
|
@ -42,6 +52,9 @@ stdenv.mkDerivation rec {
|
||||||
''
|
''
|
||||||
moveToOutput "bin" "$dev"
|
moveToOutput "bin" "$dev"
|
||||||
moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
|
moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
|
||||||
|
|
||||||
|
# We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/
|
||||||
|
$dev/bin/gdk-pixbuf-query-loaders --update-cache
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# The tests take an excessive amount of time (> 1.5 hours) and memory (> 6 GB).
|
# The tests take an excessive amount of time (> 1.5 hours) and memory (> 6 GB).
|
||||||
|
|
18
pkgs/development/libraries/gdk-pixbuf/no-mime-sniffing.patch
Normal file
18
pkgs/development/libraries/gdk-pixbuf/no-mime-sniffing.patch
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -186,13 +186,8 @@
|
||||||
|
gmodule_dep = dependency('gmodule-no-export-2.0')
|
||||||
|
gio_dep = dependency('gio-2.0')
|
||||||
|
|
||||||
|
-# On non-Windows/macOS systems we always required shared-mime-info and GIO
|
||||||
|
-if host_system != 'windows' and host_system != 'darwin'
|
||||||
|
- shared_mime_dep = dependency('shared-mime-info')
|
||||||
|
- gdk_pixbuf_conf.set('GDK_PIXBUF_USE_GIO_MIME', 1)
|
||||||
|
-else
|
||||||
|
- shared_mime_dep = []
|
||||||
|
-endif
|
||||||
|
+# No MIME sniffing for now
|
||||||
|
+shared_mime_dep = []
|
||||||
|
|
||||||
|
gdk_pixbuf_deps = [ mathlib_dep, gobject_dep, gmodule_dep, gio_dep, shared_mime_dep ]
|
||||||
|
|
Loading…
Reference in a new issue