2021-03-14 17:23:36 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, cairo
|
|
|
|
, harfbuzz
|
|
|
|
, libintl
|
|
|
|
, libthai
|
|
|
|
, darwin
|
|
|
|
, fribidi
|
2021-05-07 21:18:14 +00:00
|
|
|
, gnome
|
2021-03-14 17:23:36 +00:00
|
|
|
, gi-docgen
|
|
|
|
, makeFontsConf
|
|
|
|
, freefont_ttf
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, glib
|
2021-10-23 01:18:52 +00:00
|
|
|
, python3
|
2022-07-07 18:34:37 +00:00
|
|
|
, x11Support? !stdenv.isDarwin, libXft
|
2023-01-26 21:47:50 +00:00
|
|
|
, withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages
|
|
|
|
, buildPackages, gobject-introspection
|
2014-10-19 18:28:23 +00:00
|
|
|
}:
|
|
|
|
|
2021-03-14 17:23:36 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-08-29 19:28:46 +00:00
|
|
|
pname = "pango";
|
2022-12-04 00:28:29 +00:00
|
|
|
version = "1.50.12";
|
2021-03-14 17:23:36 +00:00
|
|
|
|
2023-01-26 21:47:50 +00:00
|
|
|
outputs = [ "bin" "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
|
2011-09-20 16:18:12 +00:00
|
|
|
|
2012-02-07 21:03:12 +00:00
|
|
|
src = fetchurl {
|
2021-03-14 17:23:36 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2022-12-04 00:28:29 +00:00
|
|
|
sha256 = "yu+W0nu+eSpr6ScnxzRo2DKxPaV8gHHvebnfae4Fj+M=";
|
2011-09-20 16:18:12 +00:00
|
|
|
};
|
|
|
|
|
2021-10-23 01:18:52 +00:00
|
|
|
depsBuildBuild = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2019-03-07 18:23:48 +00:00
|
|
|
nativeBuildInputs = [
|
2020-03-16 18:27:23 +00:00
|
|
|
meson ninja
|
|
|
|
glib # for glib-mkenum
|
2021-03-14 17:23:36 +00:00
|
|
|
pkg-config
|
2021-10-23 01:18:52 +00:00
|
|
|
python3
|
2023-01-26 21:48:57 +00:00
|
|
|
] ++ lib.optionals withIntrospection [
|
|
|
|
gi-docgen
|
|
|
|
gobject-introspection
|
|
|
|
];
|
2021-03-14 17:23:36 +00:00
|
|
|
|
2019-03-07 18:23:48 +00:00
|
|
|
buildInputs = [
|
2019-10-23 09:41:56 +00:00
|
|
|
fribidi
|
2020-10-29 23:53:42 +00:00
|
|
|
libthai
|
2021-03-14 17:23:36 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
2019-03-07 18:23:48 +00:00
|
|
|
ApplicationServices
|
2018-08-29 19:28:46 +00:00
|
|
|
Carbon
|
|
|
|
CoreGraphics
|
|
|
|
CoreText
|
|
|
|
]);
|
2019-03-07 18:23:48 +00:00
|
|
|
|
2021-03-14 17:23:36 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cairo
|
|
|
|
glib
|
|
|
|
libintl
|
|
|
|
harfbuzz
|
|
|
|
] ++ lib.optionals x11Support [
|
|
|
|
libXft
|
2019-03-07 18:23:48 +00:00
|
|
|
];
|
2011-09-20 16:18:12 +00:00
|
|
|
|
2021-03-14 17:23:36 +00:00
|
|
|
mesonFlags = [
|
2023-01-26 21:47:50 +00:00
|
|
|
(lib.mesonBool "gtk_doc" withIntrospection)
|
|
|
|
(lib.mesonEnable "introspection" withIntrospection)
|
|
|
|
(lib.mesonEnable "xft" x11Support)
|
2021-03-14 17:23:36 +00:00
|
|
|
];
|
2012-05-16 21:58:57 +00:00
|
|
|
|
2018-08-29 19:28:46 +00:00
|
|
|
# Fontconfig error: Cannot load default config file
|
|
|
|
FONTCONFIG_FILE = makeFontsConf {
|
|
|
|
fontDirectories = [ freefont_ttf ];
|
|
|
|
};
|
|
|
|
|
2022-07-07 18:34:37 +00:00
|
|
|
# Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
|
|
|
|
# it should be a build-time dep for build
|
|
|
|
# TODO: send upstream
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace meson.build \
|
|
|
|
--replace "dependency('gi-docgen', ver" "dependency('gi-docgen', native:true, ver"
|
|
|
|
|
|
|
|
substituteInPlace docs/meson.build \
|
|
|
|
--replace "'gi-docgen', req" "'gi-docgen', native:true, req"
|
|
|
|
'';
|
|
|
|
|
2021-03-14 17:23:36 +00:00
|
|
|
doCheck = false; # test-font: FAIL
|
|
|
|
|
2022-07-07 18:34:37 +00:00
|
|
|
postFixup = ''
|
2022-02-27 11:54:30 +00:00
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
|
|
moveToOutput "share/doc" "$devdoc"
|
2021-03-14 17:23:36 +00:00
|
|
|
'';
|
2016-03-29 16:04:46 +00:00
|
|
|
|
2018-08-29 19:28:46 +00:00
|
|
|
passthru = {
|
2021-05-07 21:18:14 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2018-08-29 19:28:46 +00:00
|
|
|
packageName = pname;
|
2021-03-20 23:57:24 +00:00
|
|
|
versionPolicy = "odd-unstable";
|
2022-09-21 16:00:39 +00:00
|
|
|
# 1.90 is alpha for API 2.
|
|
|
|
freeze = true;
|
2018-08-29 19:28:46 +00:00
|
|
|
};
|
|
|
|
};
|
2018-07-29 09:23:20 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2011-09-20 16:18:12 +00: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-03 22:49:40 +00: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 16:18:12 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.pango.org/";
|
2015-09-23 10:23:45 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
2011-09-20 16:18:12 +00:00
|
|
|
|
2021-03-14 17:23:36 +00:00
|
|
|
maintainers = with maintainers; [ raskin ] ++ teams.gnome.members;
|
2023-01-26 21:48:57 +00:00
|
|
|
platforms = platforms.unix;
|
2011-09-20 16:18:12 +00:00
|
|
|
};
|
|
|
|
}
|