Merge pull request #116347 from jtojnar/pango-1.48

pango: 1.47.0 → 1.48.3
This commit is contained in:
Jan Tojnar 2021-03-18 14:23:01 +01:00 committed by GitHub
commit f2ec8eb9c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 155 additions and 25 deletions

View File

@ -1,57 +1,91 @@
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, cairo, harfbuzz
, libintl, libthai, gobject-introspection, darwin, fribidi, gnome3
, gtk-doc, docbook_xsl, docbook_xml_dtd_43, makeFontsConf, freefont_ttf
, meson, ninja, glib
{ lib
, stdenv
, fetchurl
, fetchpatch
, pkg-config
, cairo
, harfbuzz
, libintl
, libthai
, gobject-introspection
, darwin
, fribidi
, gnome3
, gi-docgen
, makeFontsConf
, freefont_ttf
, meson
, ninja
, glib
, x11Support? !stdenv.isDarwin, libXft
}:
with lib;
let
stdenv.mkDerivation rec {
pname = "pango";
version = "1.47.0";
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
version = "1.48.3";
outputs = [ "bin" "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "0ry3j9n0lvdfmjwi2w7wa4gkalnip56kghqq6bh8hcf45xjvh3bk";
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0ijbkcs6217ygzphlpi0vajxkccifdbsl0jdjpy8wz11h9f19sin";
};
# FIXME: docs fail on darwin
outputs = [ "bin" "dev" "out" ] ++ optional (!stdenv.isDarwin) "devdoc";
patches = [
# Install developer documentation.
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/pango/commit/a2f35860115e8cd44f07d5158e2df059e8163a08.patch";
sha256 = "hN7O4DBk4A+TmBl6DGx6RHni5qRBg6akdjv9o3iWKDQ=";
})
];
nativeBuildInputs = [
meson ninja
glib # for glib-mkenum
pkg-config gobject-introspection gtk-doc docbook_xsl docbook_xml_dtd_43
pkg-config
gobject-introspection
gi-docgen
];
buildInputs = [
fribidi
libthai
] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
ApplicationServices
Carbon
CoreGraphics
CoreText
]);
propagatedBuildInputs = [ cairo glib libintl harfbuzz ] ++
optional x11Support libXft;
mesonFlags = [
"-Dgtk_doc=${if stdenv.isDarwin then "false" else "true"}"
] ++ lib.optionals stdenv.isDarwin [
"-Dxft=disabled" # only works with x11
propagatedBuildInputs = [
cairo
glib
libintl
harfbuzz
] ++ lib.optionals x11Support [
libXft
];
enableParallelBuilding = true;
mesonFlags = [
"-Dgtk_doc=true"
] ++ lib.optionals (!x11Support) [
"-Dxft=disabled" # only works with x11
];
# Fontconfig error: Cannot load default config file
FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [ freefont_ttf ];
};
doCheck = false; # /layout/valid-1.markup: FAIL
doCheck = false; # test-font: FAIL
postInstall = ''
# So that devhelp can find this.
# https://gitlab.gnome.org/GNOME/pango/merge_requests/293/diffs#note_1058448
mkdir -p "$devdoc/share/devhelp"
mv "$out/share/doc/pango/reference" "$devdoc/share/devhelp/books"
rmdir -p --ignore-fail-on-non-empty "$out/share/doc/pango"
'';
passthru = {
updateScript = gnome3.updateScript {
@ -73,7 +107,7 @@ in stdenv.mkDerivation rec {
homepage = "https://www.pango.org/";
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ raskin ];
maintainers = with maintainers; [ raskin ] ++ teams.gnome.members;
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@ -0,0 +1,94 @@
{ lib
, fetchFromGitLab
, fetchpatch
, meson
, ninja
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "gi-docgen";
version = "2021.2";
format = "other";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "ebassi";
repo = pname;
rev = version;
sha256 = "17swx4s60anfyyb6dcsl8fq3s0j9cy54qcw0ciq4qj59d4039w5h";
};
patches = [
# Add pkg-config file so that Meson projects can find this.
# https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/26
(fetchpatch {
url = "https://gitlab.gnome.org/ebassi/gi-docgen/commit/d65ed2e4827c4129d26e3c1df9a48054b4e72c50.patch";
sha256 = "BEefcHiAd/HTW5zo39J2WtfQjGXUkNFB6MDJj8/Ge80=";
})
# Name generated devhelp files correctly.
# https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/27
(fetchpatch {
url = "https://gitlab.gnome.org/ebassi/gi-docgen/commit/7c4de72f55cbce5670c3a6a1451548e97e5f07f7.patch";
sha256 = "ov/PvrZzKmCzw7nHJkbeLCnhtUVw1UbZQjFrWT3AtVg=";
})
# Fix broken link in Devhelp TOC.
# https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/28
(fetchpatch {
url = "https://gitlab.gnome.org/ebassi/gi-docgen/commit/56f0e6f8b4bb9c92d635df60aa5d68f55b036711.patch";
sha256 = "5gFGiO9jPpkyZBL4qtWEotE5jY3sCGFGUGN/Fb6jZ+0=";
})
# Devhelp does not like subsections without links.
# https://gitlab.gnome.org/GNOME/devhelp/-/issues/28
(fetchpatch {
# Only visual but needed for the other two to apply.
# https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/28
url = "https://gitlab.gnome.org/ebassi/gi-docgen/commit/7f67fad5107b73489cb7bffca49177d9ad78e422.patch";
sha256 = "OKbC690nJsl1ckm/y9eeKDYX6AEClsNvIFy7DK+JYEc=";
})
# Add links to index.
(fetchpatch {
url = "https://gitlab.gnome.org/ebassi/gi-docgen/commit/f891cc5fd481bc4180eec144d14f32c15c91833b.patch";
sha256 = "Fcnvdgxei+2ulGoWoCZ8WFrNy01tlNXMkHru3ArGHVQ=";
})
# Use different link for each symbol type name.
# https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/29
(fetchpatch {
url = "https://gitlab.gnome.org/jtojnar/gi-docgen/commit/08dcc31f62be1a5af9bd9f8f702f321f4b5cffde.patch";
sha256 = "vAT8s7zQ9zCoZWK+6PsxcD5/48ZAfIOl4RSNljRCGWQ=";
})
];
nativeBuildInputs = [
meson
ninja
];
pythonPath = with python3.pkgs; [
jinja2
markdown
markupsafe
pygments
toml
typogrify
];
doCheck = false; # no tests
postFixup = ''
# Do not propagate Python
substituteInPlace $out/nix-support/propagated-build-inputs \
--replace "${python3}" ""
'';
meta = with lib; {
description = "Documentation generator for GObject-based libraries";
homepage = "https://gitlab.gnome.org/ebassi/gi-docgen";
license = licenses.asl20; # OR GPL-3.0-or-later
maintainers = teams.gnome.members;
};
}

View File

@ -12467,6 +12467,8 @@ in
inherit (xorg) libX11 libXext libXi libXtst;
};
gi-docgen = callPackage ../development/tools/documentation/gi-docgen { };
github-release = callPackage ../development/tools/github/github-release { };
global = callPackage ../development/tools/misc/global { };