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
|
, pkg-config
|
||||||
, gettext
|
, gettext
|
||||||
, graphene
|
, graphene
|
||||||
, docbook-xsl-nons
|
, gi-docgen
|
||||||
, docbook_xml_dtd_43
|
|
||||||
, gtk-doc
|
|
||||||
, meson
|
, meson
|
||||||
, ninja
|
, ninja
|
||||||
, python3
|
, python3
|
||||||
@ -45,7 +43,6 @@
|
|||||||
, wayland-protocols
|
, wayland-protocols
|
||||||
, xineramaSupport ? stdenv.isLinux
|
, xineramaSupport ? stdenv.isLinux
|
||||||
, cupsSupport ? stdenv.isLinux
|
, cupsSupport ? stdenv.isLinux
|
||||||
, withGtkDoc ? stdenv.isLinux
|
|
||||||
, cups
|
, cups
|
||||||
, AppKit
|
, AppKit
|
||||||
, Cocoa
|
, Cocoa
|
||||||
@ -64,9 +61,9 @@ in
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gtk4";
|
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";
|
outputBin = "dev";
|
||||||
|
|
||||||
setupHooks = [
|
setupHooks = [
|
||||||
@ -76,7 +73,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/gtk/${lib.versions.majorMinor version}/gtk-${version}.tar.xz";
|
url = "mirror://gnome/sources/gtk/${lib.versions.majorMinor version}/gtk-${version}.tar.xz";
|
||||||
sha256 = "18mJNyV5C1C9mjuyeIVtnVQ7RLa5uVHXtg573swTGJA=";
|
sha256 = "AjFpd13kPwof3gZvvBnXhUXqanViwZFavem4rkpzCeY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -88,21 +85,17 @@ stdenv.mkDerivation rec {
|
|||||||
pkg-config
|
pkg-config
|
||||||
python3
|
python3
|
||||||
sassc
|
sassc
|
||||||
] ++ setupHooks ++ lib.optionals withGtkDoc [
|
gi-docgen
|
||||||
pandoc
|
] ++ setupHooks;
|
||||||
docbook_xml_dtd_43
|
|
||||||
docbook-xsl-nons
|
|
||||||
gtk-doc
|
|
||||||
# For xmllint
|
|
||||||
libxml2
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
epoxy
|
epoxy
|
||||||
json-glib
|
json-glib
|
||||||
isocodes
|
isocodes
|
||||||
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||||
vulkan-headers
|
vulkan-headers
|
||||||
|
] ++ [
|
||||||
librest
|
librest
|
||||||
libsoup
|
libsoup
|
||||||
ffmpeg
|
ffmpeg
|
||||||
@ -141,18 +134,27 @@ stdenv.mkDerivation rec {
|
|||||||
glib
|
glib
|
||||||
graphene
|
graphene
|
||||||
pango
|
pango
|
||||||
vulkan-loader # TODO: Possibly not used on Darwin
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||||
|
vulkan-loader
|
||||||
|
] ++ [
|
||||||
# Required for GSettings schemas at runtime.
|
# Required for GSettings schemas at runtime.
|
||||||
# Will be picked up by wrapGAppsHook.
|
# Will be picked up by wrapGAppsHook.
|
||||||
gsettings-desktop-schemas
|
gsettings-desktop-schemas
|
||||||
];
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dgtk_doc=${lib.boolToString withGtkDoc}"
|
# ../docs/tools/shooter.c:4:10: fatal error: 'cairo-xlib.h' file not found
|
||||||
"-Dtests=false"
|
"-Dgtk_doc=${lib.boolToString x11Support}"
|
||||||
"-Dtracker3=${lib.boolToString trackerSupport}"
|
"-Dbuild-tests=false"
|
||||||
"-Dbroadway_backend=${lib.boolToString broadwaySupport}"
|
"-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
|
doCheck = false; # needs X11
|
||||||
@ -171,20 +173,12 @@ stdenv.mkDerivation rec {
|
|||||||
gdk/gen-gdk-gresources-xml.py
|
gdk/gen-gdk-gresources-xml.py
|
||||||
gtk/gen-gtk-gresources-xml.py
|
gtk/gen-gtk-gresources-xml.py
|
||||||
gtk/gentypefuncs.py
|
gtk/gentypefuncs.py
|
||||||
docs/reference/gtk/gtk-markdown-to-docbook
|
|
||||||
)
|
)
|
||||||
|
|
||||||
chmod +x ''${files[@]}
|
chmod +x ''${files[@]}
|
||||||
patchShebangs ''${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 = ''
|
preInstall = ''
|
||||||
OLD_PATH="$PATH"
|
OLD_PATH="$PATH"
|
||||||
PATH="$PATH:$dev/bin" # so the install script finds gtk4-update-icon-cache
|
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
|
for f in $dev/bin/gtk4-encode-symbolic-svg; do
|
||||||
wrapProgram $f --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
wrapProgram $f --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
||||||
done
|
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
|
# Wrap demos
|
||||||
|
Loading…
Reference in New Issue
Block a user