pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pango: Update wip/pango to 1.48.0 based on devel/pango GTK4 requires pango >= 1.47.0



Module Name:	pkgsrc-wip
Committed By:	Dan Cîrnaț <dan%alt.md@localhost>
Pushed By:	cirnatdan
Date:		Wed Nov 18 10:15:24 2020 +0100
Changeset:	08cb03f57842688648549c86ae816d02a0abfeeb

Added Files:
	pango/DESCR
	pango/Makefile
	pango/PLIST
	pango/buildlink3.mk
	pango/distinfo
	pango/files/pango-view.sh
	pango/options.mk
	pango/patches/patch-pango_pangocairo-coretextfont.c
	pango/patches/patch-pango_pangocairo-coretextfontmap.c
	pango/patches/patch-pango_pangocoretext-fontmap.c
	pango/patches/patch-pango_pangocoretext-private.h
	pango/patches/patch-pango_pangocoretext.c
	pango/patches/patch-pango_pangocoretext.h
	pango/patches/patch-pangocairo-coretext.h
	pango/patches/patch-utils_meson.build

Log Message:
pango: Update wip/pango to 1.48.0 based on devel/pango
GTK4 requires pango >= 1.47.0

Overview of changes in 1.48.0
=============================
- docs: Clarify use of PangoAnalysis in shaping
- fontconfig: Make pango_font_family_get_face more reliable
- introspection: Fix use of PangoFcSubstituteFunc
- introspection: Skip fontconfig types
- build: Use yielding meson feature for introspection

Overview of changes in 1.47.0
=============================
- Add pango_language_get_preferred
- Add pango_fc_font_get_languages
- Sort faces of a family by slant and weight

Overview of changes in 1.46.2
=============================
- Fix pango_win32_font_map_load_font with falback families
- Fix an assertion in pango_language_get_scripts
- Fix a crash in get_items_log_attrs
- Fix attribute iterators with overlapping attributes
- Fix rendering of Emoji keycap sequences
- ci: Run the testsuite under asan and fix all reported issues
- build: Make libthai, cairo, xft, fontconfig, freetype
  dependencies meson features

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=08cb03f57842688648549c86ae816d02a0abfeeb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 pango/DESCR                                        | 20 +++++++
 pango/Makefile                                     | 70 ++++++++++++++++++++++
 pango/PLIST                                        | 69 +++++++++++++++++++++
 pango/buildlink3.mk                                | 35 +++++++++++
 pango/distinfo                                     | 14 +++++
 pango/files/pango-view.sh                          | 16 +++++
 pango/options.mk                                   | 48 +++++++++++++++
 .../patches/patch-pango_pangocairo-coretextfont.c  | 58 ++++++++++++++++++
 .../patch-pango_pangocairo-coretextfontmap.c       | 18 ++++++
 pango/patches/patch-pango_pangocoretext-fontmap.c  | 45 ++++++++++++++
 pango/patches/patch-pango_pangocoretext-private.h  | 19 ++++++
 pango/patches/patch-pango_pangocoretext.c          | 22 +++++++
 pango/patches/patch-pango_pangocoretext.h          | 17 ++++++
 pango/patches/patch-pangocairo-coretext.h          | 16 +++++
 pango/patches/patch-utils_meson.build              | 17 ++++++
 15 files changed, 484 insertions(+)

diffs:
diff --git a/pango/DESCR b/pango/DESCR
new file mode 100644
index 0000000000..65e28390d3
--- /dev/null
+++ b/pango/DESCR
@@ -0,0 +1,20 @@
+Pango is a library for layout and rendering of text, with an emphasis
+on internationalization. Pango can be used anywhere that text layout
+is needed; however, most of the work on Pango-1.0 was done using the
+GTK+ widget toolkit as a test platform. Pango forms the core of text
+and font handling for GTK+-2.0.
+
+Pango is designed to be modular; the core Pango layout can be used
+with four different font backends:
+
+ - Core X windowing system fonts
+ - Client-side fonts on X using the Xft library
+ - Direct rendering of scalable fonts using the FreeType library
+ - Native fonts on Microsoft backends
+
+Dynamically loaded modules then handle text layout for particular
+combinations of script and font backend.
+
+As well as the low level layout rendering routines, Pango includes
+PangoLayout, a high level driver for laying out entire blocks of text,
+and routines to assist in editing internationalized text.
diff --git a/pango/Makefile b/pango/Makefile
new file mode 100644
index 0000000000..1e0e967e54
--- /dev/null
+++ b/pango/Makefile
@@ -0,0 +1,70 @@
+# $NetBSD: Makefile,v 1.236 2020/09/15 10:45:41 prlw1 Exp $
+
+DISTNAME=	pango-1.48.0
+CATEGORIES=	devel fonts
+MASTER_SITES=	${MASTER_SITE_GNOME:=sources/pango/${PKGVERSION_NOREV:R}/}
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://www.pango.org/
+COMMENT=	Library for layout and rendering of text
+LICENSE=	gnu-lgpl-v2
+
+TOOL_DEPENDS+=		help2man-[0-9]*:../../converters/help2man
+
+USE_LANGUAGES=		c c++
+USE_TOOLS+=		gmake pkg-config
+INSTALLATION_DIRS=	${PKGMANDIR}/man1
+
+SUBST_CLASSES+=		wrksrc
+SUBST_STAGE.wrksrc=	pre-configure
+SUBST_FILES.wrksrc=	output/utils/pango-view.sh
+SUBST_VARS.wrksrc=	WRKSRC
+
+PKGCONFIG_OVERRIDE+=		output/meson-private/pango.pc
+PKGCONFIG_OVERRIDE+=		output/meson-private/pangocairo.pc
+PKGCONFIG_OVERRIDE+=		output/meson-private/pangofc.pc
+PKGCONFIG_OVERRIDE+=		output/meson-private/pangoft2.pc
+PKGCONFIG_OVERRIDE+=		output/meson-private/pangoot.pc
+PKGCONFIG_OVERRIDE+=		output/meson-private/pangoxft.pc
+PKGCONFIG_OVERRIDE_STAGE=	pre-install
+MAKE_ENV+=			LD_LIBRARY_PATH=${WRKSRC}/output/${PKGBASE}
+
+CHECK_FILES_SKIP+=		${PREFIX}/libdata/pango/pango.modules
+CHECK_PORTABILITY_SKIP+=	docs/check.docs
+
+BUILDLINK_TRANSFORM+=	rm:-Werror=implicit-fallthrough # clang10svn
+
+post-extract:
+	${MKDIR} -p ${WRKSRC}/output/utils
+	${CP} ${FILESDIR}/pango-view.sh ${WRKSRC}/output/utils
+
+post-install:
+	${MV} ${DESTDIR}${PREFIX}/share/man/man1/pango-view.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/pango-view.1 || ${TRUE}
+
+.include "options.mk"
+.include "../../graphics/librsvg/available.mk"
+
+BUILDLINK_API_DEPENDS.fribidi+=	fribidi>=0.19.7
+.include "../../converters/fribidi/buildlink3.mk"
+BUILDLINK_API_DEPENDS.glib2+=	glib2>=2.60
+.include "../../devel/glib2/buildlink3.mk"
+BUILDLINK_DEPMETHOD.gobject-introspection=	build
+.include "../../devel/gobject-introspection/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+BUILDLINK_API_DEPENDS.fontconfig+=	fontconfig>=2.11.91
+.include "../../fonts/fontconfig/buildlink3.mk"
+BUILDLINK_API_DEPENDS.harfbuzz+= harfbuzz>=2.7.2
+.include "../../fonts/harfbuzz/buildlink3.mk"
+.if ${LIBRSVG_TYPE} == "rust"
+.include "../../graphics/graphite2/buildlink3.mk"
+.endif
+BUILDLINK_API_DEPENDS.cairo+=	cairo>=1.12.10
+.include "../../graphics/cairo/buildlink3.mk"
+.include "../../graphics/cairo-gobject/buildlink3.mk"
+# XXX freetype versioning is insane. needs libtool version >= 21.0.15,
+# which corresponds to release version 2.8.1
+BUILDLINK_API_DEPENDS.freetype2+= freetype2>=2.8.1
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../devel/meson/build.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/pango/PLIST b/pango/PLIST
new file mode 100644
index 0000000000..09c2d681fa
--- /dev/null
+++ b/pango/PLIST
@@ -0,0 +1,69 @@
+@comment $NetBSD: PLIST,v 1.74 2020/09/04 11:14:08 prlw1 Exp $
+bin/pango-list
+bin/pango-view
+include/pango-1.0/pango/pango-attributes.h
+include/pango-1.0/pango/pango-bidi-type.h
+include/pango-1.0/pango/pango-break.h
+include/pango-1.0/pango/pango-context.h
+include/pango-1.0/pango/pango-coverage.h
+include/pango-1.0/pango/pango-direction.h
+include/pango-1.0/pango/pango-engine.h
+include/pango-1.0/pango/pango-enum-types.h
+include/pango-1.0/pango/pango-features.h
+include/pango-1.0/pango/pango-font.h
+include/pango-1.0/pango/pango-fontmap.h
+include/pango-1.0/pango/pango-fontset.h
+include/pango-1.0/pango/pango-glyph-item.h
+include/pango-1.0/pango/pango-glyph.h
+include/pango-1.0/pango/pango-gravity.h
+include/pango-1.0/pango/pango-item.h
+include/pango-1.0/pango/pango-language.h
+include/pango-1.0/pango/pango-layout.h
+include/pango-1.0/pango/pango-matrix.h
+include/pango-1.0/pango/pango-modules.h
+include/pango-1.0/pango/pango-ot.h
+include/pango-1.0/pango/pango-renderer.h
+include/pango-1.0/pango/pango-script.h
+include/pango-1.0/pango/pango-tabs.h
+include/pango-1.0/pango/pango-types.h
+include/pango-1.0/pango/pango-utils.h
+include/pango-1.0/pango/pango-version-macros.h
+include/pango-1.0/pango/pango.h
+include/pango-1.0/pango/pangocairo.h
+include/pango-1.0/pango/pangofc-decoder.h
+include/pango-1.0/pango/pangofc-font.h
+include/pango-1.0/pango/pangofc-fontmap.h
+include/pango-1.0/pango/pangoft2.h
+${PLIST.x11}include/pango-1.0/pango/pangoxft-render.h
+${PLIST.x11}include/pango-1.0/pango/pangoxft.h
+lib/girepository-1.0/Pango-1.0.typelib
+lib/girepository-1.0/PangoCairo-1.0.typelib
+lib/girepository-1.0/PangoFT2-1.0.typelib
+lib/girepository-1.0/PangoFc-1.0.typelib
+lib/girepository-1.0/PangoOT-1.0.typelib
+${PLIST.x11}lib/girepository-1.0/PangoXft-1.0.typelib
+lib/libpango-1.0.so
+lib/libpango-1.0.so.0
+lib/libpango-1.0.so.0.4600.1
+lib/libpangocairo-1.0.so
+lib/libpangocairo-1.0.so.0
+lib/libpangocairo-1.0.so.0.4600.1
+lib/libpangoft2-1.0.so
+lib/libpangoft2-1.0.so.0
+lib/libpangoft2-1.0.so.0.4600.1
+${PLIST.x11}lib/libpangoxft-1.0.so
+${PLIST.x11}lib/libpangoxft-1.0.so.0
+${PLIST.x11}lib/libpangoxft-1.0.so.0.4600.1
+lib/pkgconfig/pango.pc
+lib/pkgconfig/pangocairo.pc
+lib/pkgconfig/pangofc.pc
+lib/pkgconfig/pangoft2.pc
+lib/pkgconfig/pangoot.pc
+${PLIST.x11}lib/pkgconfig/pangoxft.pc
+man/man1/pango-view.1
+share/gir-1.0/Pango-1.0.gir
+share/gir-1.0/PangoCairo-1.0.gir
+share/gir-1.0/PangoFT2-1.0.gir
+share/gir-1.0/PangoFc-1.0.gir
+share/gir-1.0/PangoOT-1.0.gir
+${PLIST.x11}share/gir-1.0/PangoXft-1.0.gir
diff --git a/pango/buildlink3.mk b/pango/buildlink3.mk
new file mode 100644
index 0000000000..144a51091e
--- /dev/null
+++ b/pango/buildlink3.mk
@@ -0,0 +1,35 @@
+# $NetBSD: buildlink3.mk,v 1.54 2020/08/17 20:17:24 leot Exp $
+
+BUILDLINK_TREE+=	pango
+
+.if !defined(PANGO_BUILDLINK3_MK)
+PANGO_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.pango+=	pango>=1.6.0
+BUILDLINK_ABI_DEPENDS.pango+=	pango>=1.44.7nb3
+BUILDLINK_PKGSRCDIR.pango?=	../../devel/pango
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+pkgbase := pango
+.include "../../mk/pkg-build-options.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.pango:Mlibthai)
+.include "../../devel/libthai/buildlink3.mk"
+.endif
+
+.if !empty(PKG_BUILD_OPTIONS.pango:Mx11)
+.include "../../x11/libXft/buildlink3.mk"
+.include "../../x11/libXrender/buildlink3.mk"
+.endif
+
+.include "../../converters/fribidi/buildlink3.mk"
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../fonts/fontconfig/buildlink3.mk"
+.include "../../fonts/harfbuzz/buildlink3.mk"
+.include "../../graphics/cairo/buildlink3.mk"
+.include "../../graphics/freetype2/buildlink3.mk"
+.endif # PANGO_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-pango
diff --git a/pango/distinfo b/pango/distinfo
new file mode 100644
index 0000000000..c42ea5c743
--- /dev/null
+++ b/pango/distinfo
@@ -0,0 +1,14 @@
+$NetBSD: distinfo,v 1.125 2020/09/04 11:14:08 prlw1 Exp $
+
+SHA1 (pango-1.48.0.tar.xz) = 6167e5a5b0273f8ffc7217d057aa432b63bf8372
+RMD160 (pango-1.48.0.tar.xz) = 4a9a829e9506839b900ef6df55f3dea2cf507cb1
+SHA512 (pango-1.48.0.tar.xz) = 4819575a583134083819c1548d86bba71af97fd927f7cac05e3903b6d1c84de0ab1b593eea1e17b974f194e2d81123aa46e3af942eef258ad1bd14c72322342e
+Size (pango-1.48.0.tar.xz) = 536136 bytes
+SHA1 (patch-pango_pangocairo-coretextfont.c) = cfef0e1372d5770d5988af411d435ee87fdfd0bd
+SHA1 (patch-pango_pangocairo-coretextfontmap.c) = 395cb1f8472a319c4b1c58ea137e36452bc44cc6
+SHA1 (patch-pango_pangocoretext-fontmap.c) = 643dfdb0e9672382d4d5259c90e451a829b9875e
+SHA1 (patch-pango_pangocoretext-private.h) = 554d80a4f9b63cda37745a6fbb3dcc348f986e9c
+SHA1 (patch-pango_pangocoretext.c) = 44b65b64da1d2ae819a5e984b5c672ad9d333622
+SHA1 (patch-pango_pangocoretext.h) = d6817eb02f0020c102ab95d63202f9508a70e647
+SHA1 (patch-pangocairo-coretext.h) = 2f7c8efad48b58398070f48e71c16d99d3d59f57
+SHA1 (patch-utils_meson.build) = 4c2564d54209b4bed286db3d85963c78897ceb49
diff --git a/pango/files/pango-view.sh b/pango/files/pango-view.sh
new file mode 100755
index 0000000000..0e48e6b16b
--- /dev/null
+++ b/pango/files/pango-view.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# $NetBSD: pango-view.sh,v 1.1 2020/02/24 17:08:31 brook Exp $
+#
+# Run pango-view with LD_LIBRARY_PATH
+#
+# During the build process, help2man is used to create a man page for
+# pango-view, which it does by running pango-view.  On some platforms
+# (notably Darwin) this fails because pango-view requires access to a
+# shared library just built and rpath is not set appropriately.
+# Therefore, LD_LIBRARY_PATH must be set, which cannot be done in
+# meson.build, because help2man does not propagate the environment to
+# programs it runs.  The solution is to wrap pango-view in this script
+# and provide LD_LIBRARY_PATH here.
+#
+
+env LD_LIBRARY_PATH=@WRKSRC@/output/pango @WRKSRC@/output/utils/pango-view ${*}
diff --git a/pango/options.mk b/pango/options.mk
new file mode 100644
index 0000000000..6ca28c7e6d
--- /dev/null
+++ b/pango/options.mk
@@ -0,0 +1,48 @@
+# $NetBSD: options.mk,v 1.17 2019/08/16 10:43:24 wiz Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.pango
+PKG_SUPPORTED_OPTIONS=	libthai quartz x11
+PKG_SUGGESTED_OPTIONS=	x11
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=		coretext quartz x11 thai
+
+###
+### X11 support
+###
+.if !empty(PKG_OPTIONS:Mx11)
+# fix for pangox.pc
+PLIST.x11=		yes
+BUILDLINK_API_DEPENDS.Xft2+=	Xft2>=2.1.7nb3
+.include "../../x11/libXft/buildlink3.mk"
+.include "../../x11/libXrender/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+BUILDLINK_DEPMETHOD.libXt?=	build # only for configure
+.include "../../x11/libXt/buildlink3.mk"
+.endif
+
+###
+### Thai language support
+###
+.if !empty(PKG_OPTIONS:Mlibthai)
+PLIST.thai=		yes
+.include "../../devel/libthai/buildlink3.mk"
+.endif
+
+.include "../../mk/bsd.prefs.mk"
+
+###
+### Quartz "support"
+###
+.if ${OPSYS} == "Darwin"
+### always looks for system CoreText
+.  if empty(MACHINE_PLATFORM:MDarwin-[1-8].*-*)
+### CoreText is only available in 10.5 or newer
+PLIST.coretext=		yes
+.  endif
+.  if !empty(PKG_OPTIONS:Mquartz)
+### installs its coretext header file if cairo was built with "quartz" option
+PLIST.quartz=		yes
+.  endif
+.endif
diff --git a/pango/patches/patch-pango_pangocairo-coretextfont.c b/pango/patches/patch-pango_pangocairo-coretextfont.c
new file mode 100644
index 0000000000..62e3608094
--- /dev/null
+++ b/pango/patches/patch-pango_pangocairo-coretextfont.c
@@ -0,0 +1,58 @@
+$NetBSD: patch-pango_pangocairo-coretextfont.c,v 1.1 2018/11/20 08:34:43 maya Exp $
+
+From 60df2b006e5d4553abc7bb5fe9a99539c91b0022 Mon Sep 17 00:00:00 2001
+From: Tom Schoonjans <Tom.Schoonjans%diamond.ac.uk@localhost>
+Date: Fri, 20 Jul 2018 12:30:34 +0100
+Subject: [PATCH] Revert "Restore scaling of CoreText fonts."
+
+This reverts commit f661cdbf8cfbdb2ba7241d8dfa4a579c6dfe0a94.
+
+--- pango/pangocairo-coretextfont.c.orig	2018-07-16 00:50:43.000000000 +0000
++++ pango/pangocairo-coretextfont.c
+@@ -36,7 +36,6 @@ struct _PangoCairoCoreTextFont
+ {
+   PangoCoreTextFont font;
+   PangoCairoFontPrivate cf_priv;
+-  int abs_size;
+ };
+ 
+ struct _PangoCairoCoreTextFontClass
+@@ -163,17 +162,6 @@ pango_cairo_core_text_font_create_base_m
+   return metrics;
+ }
+ 
+-static PangoFontDescription *
+-pango_cairo_core_text_font_describe_absolute (PangoFont *font)
+-{
+-  PangoCairoCoreTextFont *cafont = (PangoCairoCoreTextFont *)font;
+-  PangoFontDescription *desc = pango_font_describe (font);
+-  
+-  pango_font_description_set_absolute_size (desc, cafont->abs_size);
+-
+-  return desc;
+-}
+-
+ static void
+ pango_cairo_core_text_font_finalize (GObject *object)
+ {
+@@ -191,10 +179,9 @@ pango_cairo_core_text_font_class_init (P
+   PangoFontClass *font_class = PANGO_FONT_CLASS (class);
+ 
+   object_class->finalize = pango_cairo_core_text_font_finalize;
+-  /* font_class->describe defined by parent class PangoCoreTextFont. */
++
+   font_class->get_glyph_extents = pango_cairo_core_text_font_get_glyph_extents;
+   font_class->get_metrics = _pango_cairo_font_get_metrics;
+-  font_class->describe_absolute = pango_cairo_core_text_font_describe_absolute;
+ }
+ 
+ static void
+@@ -232,8 +219,6 @@ _pango_cairo_core_text_font_new (PangoCa
+   cafont = g_object_new (PANGO_TYPE_CAIRO_CORE_TEXT_FONT, NULL);
+   cfont = PANGO_CORE_TEXT_FONT (cafont);
+ 
+-  cafont->abs_size = pango_core_text_font_key_get_size (key);
+-
+   _pango_core_text_font_set_ctfont (cfont, font_ref);
+ 
+   if (synthesize_italic)
diff --git a/pango/patches/patch-pango_pangocairo-coretextfontmap.c b/pango/patches/patch-pango_pangocairo-coretextfontmap.c
new file mode 100644
index 0000000000..1e177329f4
--- /dev/null
+++ b/pango/patches/patch-pango_pangocairo-coretextfontmap.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-pango_pangocairo-coretextfontmap.c,v 1.1 2018/11/20 08:34:43 maya Exp $
+
+From 60df2b006e5d4553abc7bb5fe9a99539c91b0022 Mon Sep 17 00:00:00 2001
+From: Tom Schoonjans <Tom.Schoonjans%diamond.ac.uk@localhost>
+Date: Fri, 20 Jul 2018 12:30:34 +0100
+Subject: [PATCH] Revert "Restore scaling of CoreText fonts."
+
+This reverts commit f661cdbf8cfbdb2ba7241d8dfa4a579c6dfe0a94.
+
+--- pango/pangocairo-coretextfontmap.c.orig	2018-07-16 00:50:43.000000000 +0000
++++ pango/pangocairo-coretextfontmap.c
+@@ -186,5 +186,5 @@ static void
+ pango_cairo_core_text_font_map_init (PangoCairoCoreTextFontMap *cafontmap)
+ {
+   cafontmap->serial = 1;
+-  cafontmap->dpi = 96.;
++  cafontmap->dpi = 72.;
+ }
diff --git a/pango/patches/patch-pango_pangocoretext-fontmap.c b/pango/patches/patch-pango_pangocoretext-fontmap.c
new file mode 100644
index 0000000000..9f283902e6
--- /dev/null
+++ b/pango/patches/patch-pango_pangocoretext-fontmap.c
@@ -0,0 +1,45 @@
+$NetBSD: patch-pango_pangocoretext-fontmap.c,v 1.1 2018/11/20 08:34:43 maya Exp $
+From 60df2b006e5d4553abc7bb5fe9a99539c91b0022 Mon Sep 17 00:00:00 2001
+From: Tom Schoonjans <Tom.Schoonjans%diamond.ac.uk@localhost>
+Date: Fri, 20 Jul 2018 12:30:34 +0100
+Subject: [PATCH] Revert "Restore scaling of CoreText fonts."
+
+This reverts commit f661cdbf8cfbdb2ba7241d8dfa4a579c6dfe0a94.
+
+--- pango/pangocoretext-fontmap.c.orig	2018-08-06 02:47:22.000000000 +0000
++++ pango/pangocoretext-fontmap.c
+@@ -806,7 +806,6 @@ get_context_matrix (PangoContext *contex
+ /*
+  * Helper functions for PangoCoreTextFontsetKey
+  */
+-static const double ppi = 72.0; /* typographic points per inch */
+ 
+ static double
+ pango_core_text_font_map_get_resolution (PangoCoreTextFontMap *fontmap,
+@@ -818,7 +817,7 @@ pango_core_text_font_map_get_resolution 
+   /* FIXME: acquire DPI from CoreText using some deafault font */
+   g_warning ("FIXME: returning default DPI");
+ 
+-  return ppi;
++  return 72.0;
+ }
+ 
+ static int
+@@ -827,16 +826,8 @@ get_scaled_size (PangoCoreTextFontMap   
+                  const PangoFontDescription *desc)
+ {
+   double size = pango_font_description_get_size (desc);
+-  PangoMatrix *matrix = pango_context_get_matrix (context);
+-  double scale_factor = pango_matrix_get_font_scale_factor (matrix);
+-  
+-  if (!pango_font_description_get_size_is_absolute(desc))
+-  {
+-    double dpi = pango_core_text_font_map_get_resolution (fontmap, context);
+-    size *= (dpi/ppi);
+-  }
+ 
+-  return .5 +  scale_factor * size;
++  return .5 + pango_matrix_get_font_scale_factor (pango_context_get_matrix (context)) * size;
+ }
+ 
+ 
diff --git a/pango/patches/patch-pango_pangocoretext-private.h b/pango/patches/patch-pango_pangocoretext-private.h
new file mode 100644
index 0000000000..4e6f9a7fde
--- /dev/null
+++ b/pango/patches/patch-pango_pangocoretext-private.h
@@ -0,0 +1,19 @@
+$NetBSD: patch-pango_pangocoretext-private.h,v 1.1 2018/11/20 08:34:43 maya Exp $
+From 60df2b006e5d4553abc7bb5fe9a99539c91b0022 Mon Sep 17 00:00:00 2001
+From: Tom Schoonjans <Tom.Schoonjans%diamond.ac.uk@localhost>
+Date: Fri, 20 Jul 2018 12:30:34 +0100
+Subject: [PATCH] Revert "Restore scaling of CoreText fonts."
+
+This reverts commit f661cdbf8cfbdb2ba7241d8dfa4a579c6dfe0a94.
+
+--- pango/pangocoretext-private.h.orig	2018-07-16 00:50:43.000000000 +0000
++++ pango/pangocoretext-private.h
+@@ -99,8 +99,6 @@ void                  _pango_core_text_f
+ PangoFontDescription *_pango_core_text_font_description_from_ct_font_descriptor (CTFontDescriptorRef desc);
+ 
+ _PANGO_EXTERN
+-int                   pango_core_text_font_key_get_size             (const PangoCoreTextFontKey *key);
+-_PANGO_EXTERN
+ int                   pango_core_text_font_key_get_size    (const PangoCoreTextFontKey *key);
+ _PANGO_EXTERN
+ double                pango_core_text_font_key_get_resolution       (const PangoCoreTextFontKey *key);
diff --git a/pango/patches/patch-pango_pangocoretext.c b/pango/patches/patch-pango_pangocoretext.c
new file mode 100644
index 0000000000..9da773cb96
--- /dev/null
+++ b/pango/patches/patch-pango_pangocoretext.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-pango_pangocoretext.c,v 1.2 2019/08/16 10:43:24 wiz Exp $
+From 60df2b006e5d4553abc7bb5fe9a99539c91b0022 Mon Sep 17 00:00:00 2001
+From: Tom Schoonjans <Tom.Schoonjans%diamond.ac.uk@localhost>
+Date: Fri, 20 Jul 2018 12:30:34 +0100
+Subject: [PATCH] Revert "Restore scaling of CoreText fonts."
+
+This reverts commit f661cdbf8cfbdb2ba7241d8dfa4a579c6dfe0a94.
+
+--- pango/pangocoretext.c.orig	2019-08-04 01:59:02.000000000 +0000
++++ pango/pangocoretext.c
+@@ -204,7 +204,10 @@ pango_core_text_font_class_init (PangoCo
+   object_class->finalize = pango_core_text_font_finalize;
+ 
+   font_class->describe = pango_core_text_font_describe;
+-  /* font_class->describe_absolute is left virtual for PangoCairoCoreTextFont. */
++  /* In CoreText the device unit is points so describe_absoulute and
++   * describe are the same.
++   */
++  font_class->describe_absolute = pango_core_text_font_describe;
+   font_class->get_coverage = pango_core_text_font_get_coverage;
+   font_class->get_font_map = pango_core_text_font_get_font_map;
+   font_class->create_hb_font = pango_core_text_font_create_hb_font;
diff --git a/pango/patches/patch-pango_pangocoretext.h b/pango/patches/patch-pango_pangocoretext.h
new file mode 100644
index 0000000000..a037015a4a
--- /dev/null
+++ b/pango/patches/patch-pango_pangocoretext.h
@@ -0,0 +1,17 @@
+$NetBSD: patch-pango_pangocoretext.h,v 1.3 2015/06/10 23:30:24 prlw1 Exp $
+
+Use correct CoreText header on Mac OS X.
+
+--- pango/pangocoretext.h.orig	2015-05-27 17:38:43.000000000 +0000
++++ pango/pangocoretext.h
+@@ -24,7 +24,9 @@
+ #define __PANGOCORETEXT_H__
+ 
+ #include <pango/pango.h>
+-#include <Carbon/Carbon.h>
++#ifndef __GI_SCANNER__
++#include <ApplicationServices/ApplicationServices.h>
++#endif
+ 
+ G_BEGIN_DECLS
+ 
diff --git a/pango/patches/patch-pangocairo-coretext.h b/pango/patches/patch-pangocairo-coretext.h
new file mode 100644
index 0000000000..1a08f133bb
--- /dev/null
+++ b/pango/patches/patch-pangocairo-coretext.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-pangocairo-coretext.h,v 1.1 2012/05/15 15:07:23 adam Exp $
+
+Let g-ir-scanner skip this header file, since it cannot inspect frameworks.
+
+--- pango/pangocairo-coretext.h.orig	2012-05-15 14:55:59.000000000 +0000
++++ pango/pangocairo-coretext.h
+@@ -25,7 +25,9 @@
+ 
+ #include "pangocoretext-private.h"
+ #include <pango/pangocairo.h>
++#ifndef __GI_SCANNER__
+ #include <cairo-quartz.h>
++#endif
+ 
+ G_BEGIN_DECLS
+ 
diff --git a/pango/patches/patch-utils_meson.build b/pango/patches/patch-utils_meson.build
new file mode 100644
index 0000000000..f137f0e61d
--- /dev/null
+++ b/pango/patches/patch-utils_meson.build
@@ -0,0 +1,17 @@
+$NetBSD: patch-utils_meson.build,v 1.1 2020/02/24 17:08:31 brook Exp $
+
+Make help2man execute a wrapper script so that LD_LIBRARY_PATH can be defined.
+
+--- utils/meson.build.orig	2019-10-25 03:45:11.000000000 +0000
++++ utils/meson.build
+@@ -52,8 +52,9 @@ if help2man.found() and not meson.is_cro
+ 
+   custom_target('pango-view.1',
+                 output: 'pango-view.1',
++		depends: pango_view,
+                 command: [
+-                  help2man, help2man_opts, '--output=@OUTPUT@', pango_view
++                  help2man, help2man_opts, '--output=@OUTPUT@', '--no-discard-stderr', meson.current_build_dir() + '/pango-view.sh'
+                 ],
+                 install: true,
+                 install_dir: join_paths(pango_datadir, 'man/man1'))


Home | Main Index | Thread Index | Old Index