2021-03-14 18:23:36 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, cairo
|
|
|
|
, harfbuzz
|
|
|
|
, libintl
|
|
|
|
, libthai
|
|
|
|
, gobject-introspection
|
|
|
|
, darwin
|
|
|
|
, fribidi
|
2021-05-07 23:18:14 +02:00
|
|
|
, gnome
|
2021-03-14 18:23:36 +01:00
|
|
|
, gi-docgen
|
|
|
|
, makeFontsConf
|
|
|
|
, freefont_ttf
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, glib
|
2019-03-15 10:10:29 +01:00
|
|
|
, x11Support? !stdenv.isDarwin, libXft
|
2014-10-19 20:28:23 +02:00
|
|
|
}:
|
|
|
|
|
2021-06-07 21:39:26 +02:00
|
|
|
let
|
|
|
|
withDocs = stdenv.buildPlatform == stdenv.hostPlatform;
|
|
|
|
in
|
2021-03-14 18:23:36 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-08-29 21:28:46 +02:00
|
|
|
pname = "pango";
|
2021-06-17 14:58:09 +02:00
|
|
|
version = "1.48.5";
|
2021-03-14 18:23:36 +01:00
|
|
|
|
2021-06-07 21:39:26 +02:00
|
|
|
outputs = [ "bin" "out" "dev" ]
|
|
|
|
++ lib.optionals withDocs [ "devdoc" ];
|
2011-09-20 18:18:12 +02:00
|
|
|
|
2012-02-07 22:03:12 +01:00
|
|
|
src = fetchurl {
|
2021-03-14 18:23:36 +01:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2021-06-17 14:58:09 +02:00
|
|
|
sha256 = "0aivpd6l5687lj5293j859zd7vq97yxpzvad0b6jvh3kc54p87jh";
|
2011-09-20 18:18:12 +02:00
|
|
|
};
|
|
|
|
|
2019-03-07 19:23:48 +01:00
|
|
|
nativeBuildInputs = [
|
2020-03-16 19:27:23 +01:00
|
|
|
meson ninja
|
|
|
|
glib # for glib-mkenum
|
2021-03-14 18:23:36 +01:00
|
|
|
pkg-config
|
|
|
|
gobject-introspection
|
|
|
|
gi-docgen
|
2019-03-07 19:23:48 +01:00
|
|
|
];
|
2021-03-14 18:23:36 +01:00
|
|
|
|
2019-03-07 19:23:48 +01:00
|
|
|
buildInputs = [
|
2019-10-23 11:41:56 +02:00
|
|
|
fribidi
|
2020-10-30 00:53:42 +01:00
|
|
|
libthai
|
2021-03-14 18:23:36 +01:00
|
|
|
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
2019-03-07 19:23:48 +01:00
|
|
|
ApplicationServices
|
2018-08-29 21:28:46 +02:00
|
|
|
Carbon
|
|
|
|
CoreGraphics
|
|
|
|
CoreText
|
|
|
|
]);
|
2019-03-07 19:23:48 +01:00
|
|
|
|
2021-03-14 18:23:36 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cairo
|
|
|
|
glib
|
|
|
|
libintl
|
|
|
|
harfbuzz
|
|
|
|
] ++ lib.optionals x11Support [
|
|
|
|
libXft
|
2019-03-07 19:23:48 +01:00
|
|
|
];
|
2011-09-20 18:18:12 +02:00
|
|
|
|
2021-03-14 18:23:36 +01:00
|
|
|
mesonFlags = [
|
2021-06-07 21:39:26 +02:00
|
|
|
"-Dgtk_doc=${lib.boolToString withDocs}"
|
2021-03-14 18:23:36 +01:00
|
|
|
] ++ lib.optionals (!x11Support) [
|
|
|
|
"-Dxft=disabled" # only works with x11
|
2021-06-07 21:39:26 +02:00
|
|
|
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
|
|
|
"-Dintrospection=disabled"
|
2021-03-14 18:23:36 +01:00
|
|
|
];
|
2012-05-16 23:58:57 +02:00
|
|
|
|
2018-08-29 21:28:46 +02:00
|
|
|
# Fontconfig error: Cannot load default config file
|
|
|
|
FONTCONFIG_FILE = makeFontsConf {
|
|
|
|
fontDirectories = [ freefont_ttf ];
|
|
|
|
};
|
|
|
|
|
2021-03-14 18:23:36 +01:00
|
|
|
doCheck = false; # test-font: FAIL
|
|
|
|
|
2021-06-07 21:39:26 +02:00
|
|
|
postInstall = lib.optionalString withDocs ''
|
2021-03-14 18:23:36 +01:00
|
|
|
# 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"
|
|
|
|
'';
|
2016-03-29 18:04:46 +02:00
|
|
|
|
2018-08-29 21:28:46 +02:00
|
|
|
passthru = {
|
2021-05-07 23:18:14 +02:00
|
|
|
updateScript = gnome.updateScript {
|
2018-08-29 21:28:46 +02:00
|
|
|
packageName = pname;
|
2021-03-21 00:57:24 +01:00
|
|
|
versionPolicy = "odd-unstable";
|
2018-08-29 21:28:46 +02:00
|
|
|
};
|
|
|
|
};
|
2018-07-29 11:23:20 +02:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2011-09-20 18:18:12 +02:00
|
|
|
description = "A library for laying out and rendering of text, with an emphasis on internationalization";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Pango is a library for laying out and rendering of text, with an
|
|
|
|
emphasis on internationalization. Pango can be used anywhere
|
|
|
|
that text layout is needed, though most of the work on Pango so
|
2019-09-04 00:49:40 +02:00
|
|
|
far has been done in the context of the GTK widget toolkit.
|
|
|
|
Pango forms the core of text and font handling for GTK.
|
2011-09-20 18:18:12 +02:00
|
|
|
'';
|
|
|
|
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.pango.org/";
|
2015-09-23 12:23:45 +02:00
|
|
|
license = licenses.lgpl2Plus;
|
2011-09-20 18:18:12 +02:00
|
|
|
|
2021-03-14 18:23:36 +01:00
|
|
|
maintainers = with maintainers; [ raskin ] ++ teams.gnome.members;
|
2016-12-23 22:14:03 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2011-09-20 18:18:12 +02:00
|
|
|
};
|
|
|
|
}
|