gtk4: 4.0.3 → 4.2.1
Switches to gi-docgen for building docs.
This commit is contained in:
parent
b2f39d6edc
commit
0c0f16e2f7
@ -5,9 +5,7 @@
|
||||
, pkg-config
|
||||
, gettext
|
||||
, graphene
|
||||
, docbook-xsl-nons
|
||||
, docbook_xml_dtd_43
|
||||
, gtk-doc
|
||||
, gi-docgen
|
||||
, meson
|
||||
, ninja
|
||||
, python3
|
||||
@ -45,7 +43,6 @@
|
||||
, wayland-protocols
|
||||
, xineramaSupport ? stdenv.isLinux
|
||||
, cupsSupport ? stdenv.isLinux
|
||||
, withGtkDoc ? stdenv.isLinux
|
||||
, cups
|
||||
, AppKit
|
||||
, Cocoa
|
||||
@ -64,9 +61,9 @@ in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gtk4";
|
||||
version = "4.0.3";
|
||||
version = "4.2.1";
|
||||
|
||||
outputs = [ "out" "dev" ] ++ lib.optional withGtkDoc "devdoc";
|
||||
outputs = [ "out" "dev" ] ++ lib.optionals x11Support [ "devdoc" ];
|
||||
outputBin = "dev";
|
||||
|
||||
setupHooks = [
|
||||
@ -76,7 +73,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gtk/${lib.versions.majorMinor version}/gtk-${version}.tar.xz";
|
||||
sha256 = "18mJNyV5C1C9mjuyeIVtnVQ7RLa5uVHXtg573swTGJA=";
|
||||
sha256 = "AjFpd13kPwof3gZvvBnXhUXqanViwZFavem4rkpzCeY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -88,21 +85,17 @@ stdenv.mkDerivation rec {
|
||||
pkg-config
|
||||
python3
|
||||
sassc
|
||||
] ++ setupHooks ++ lib.optionals withGtkDoc [
|
||||
pandoc
|
||||
docbook_xml_dtd_43
|
||||
docbook-xsl-nons
|
||||
gtk-doc
|
||||
# For xmllint
|
||||
libxml2
|
||||
];
|
||||
gi-docgen
|
||||
] ++ setupHooks;
|
||||
|
||||
buildInputs = [
|
||||
libxkbcommon
|
||||
epoxy
|
||||
json-glib
|
||||
isocodes
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
vulkan-headers
|
||||
] ++ [
|
||||
librest
|
||||
libsoup
|
||||
ffmpeg
|
||||
@ -141,18 +134,27 @@ stdenv.mkDerivation rec {
|
||||
glib
|
||||
graphene
|
||||
pango
|
||||
vulkan-loader # TODO: Possibly not used on Darwin
|
||||
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
vulkan-loader
|
||||
] ++ [
|
||||
# Required for GSettings schemas at runtime.
|
||||
# Will be picked up by wrapGAppsHook.
|
||||
gsettings-desktop-schemas
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dgtk_doc=${lib.boolToString withGtkDoc}"
|
||||
"-Dtests=false"
|
||||
"-Dtracker3=${lib.boolToString trackerSupport}"
|
||||
"-Dbroadway_backend=${lib.boolToString broadwaySupport}"
|
||||
# ../docs/tools/shooter.c:4:10: fatal error: 'cairo-xlib.h' file not found
|
||||
"-Dgtk_doc=${lib.boolToString x11Support}"
|
||||
"-Dbuild-tests=false"
|
||||
"-Dtracker=${if trackerSupport then "enabled" else "disabled"}"
|
||||
"-Dbroadway-backend=${lib.boolToString broadwaySupport}"
|
||||
] ++ lib.optionals (!cupsSupport) [
|
||||
"-Dprint-cups=disabled"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"-Dvulkan=disabled"
|
||||
"-Dmedia-gstreamer=disabled" # requires gstreamer-gl
|
||||
] ++ lib.optionals (!x11Support) [
|
||||
"-Dx11-backend=false"
|
||||
];
|
||||
|
||||
doCheck = false; # needs X11
|
||||
@ -171,20 +173,12 @@ stdenv.mkDerivation rec {
|
||||
gdk/gen-gdk-gresources-xml.py
|
||||
gtk/gen-gtk-gresources-xml.py
|
||||
gtk/gentypefuncs.py
|
||||
docs/reference/gtk/gtk-markdown-to-docbook
|
||||
)
|
||||
|
||||
chmod +x ''${files[@]}
|
||||
patchShebangs ''${files[@]}
|
||||
'';
|
||||
|
||||
postBuild = lib.optionalString withGtkDoc ''
|
||||
# Meson not building `custom_target`s passed to `custom_files` argument of `gnome.gtkdoc` function
|
||||
# as part of the `install` target. We have to build the docs manually first.
|
||||
# https://github.com/mesonbuild/meson/issues/2831
|
||||
ninja g{t,d,s}k4-doc
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
OLD_PATH="$PATH"
|
||||
PATH="$PATH:$dev/bin" # so the install script finds gtk4-update-icon-cache
|
||||
@ -202,6 +196,13 @@ stdenv.mkDerivation rec {
|
||||
for f in $dev/bin/gtk4-encode-symbolic-svg; do
|
||||
wrapProgram $f --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
||||
done
|
||||
|
||||
'' + lib.optionalString x11Support ''
|
||||
# So that DevHelp can find this.
|
||||
# TODO: Remove this with DevHelp 41.
|
||||
mkdir -p "$devdoc/share/devhelp/books"
|
||||
mv "$out/share/doc/"* "$devdoc/share/devhelp/books"
|
||||
rmdir -p --ignore-fail-on-non-empty "$out/share/doc"
|
||||
'';
|
||||
|
||||
# Wrap demos
|
||||
|
Loading…
Reference in New Issue
Block a user