Merge a couple of (old) patches from upstream and arch linux; this will

hopefully help an upcoming pango major update.
This commit is contained in:
ajacoutot 2019-10-26 09:31:59 +00:00
parent 56e78f3ace
commit 8d81032fc8
2 changed files with 36 additions and 3 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.10 2019/07/12 20:45:15 sthen Exp $
# $OpenBSD: Makefile,v 1.11 2019/10/26 09:31:59 ajacoutot Exp $
COMMENT= pangox compatibility library
GNOME_VERSION= 0.0.2
GNOME_PROJECT= pangox-compat
REVISION= 3
REVISION= 4
SHARED_LIBS += pangox-1.0 2906.0 # 0.0
@ -15,7 +15,7 @@ HOMEPAGE= http://www.pango.org/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# LGPLv2
PERMIT_PACKAGE= Yes
PERMIT_PACKAGE= Yes
WANTLIB += X11 ffi fribidi glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
WANTLIB += iconv intl m pango-1.0 pcre pthread xcb

View File

@ -0,0 +1,33 @@
$OpenBSD: patch-pangox_c,v 1.1 2019/10/26 09:31:59 ajacoutot Exp $
From edb9e0904d04d1da02bba7b78601a2aba05aaa47 Mon Sep 17 00:00:00 2001
From: Behdad Esfahbod <behdad@behdad.org>
Date: Thu, 30 Apr 2015 12:20:29 -0400
Subject: [PATCH] Fix find_shaper for module-less pango
From bd0fcfbd2f8f493e96955c1edd8a791de1e6568a Mon Sep 17 00:00:00 2001
From: Jan de Groot <jgc@archlinux.org>
Date: Sun, 19 Feb 2017 07:57:57 +0000
Subject: [PATCH] Re-add pango_x_get_shaper_map, it is still used in the fallback code
Index: pangox.c
--- pangox.c.orig
+++ pangox.c
@@ -1373,12 +1373,11 @@ pango_x_font_find_shaper (PangoFont *font G_GNUC_U
PangoLanguage *language,
guint32 ch)
{
- PangoMap *shape_map = NULL;
- PangoScript script;
-
- shape_map = pango_x_get_shaper_map (language);
- script = pango_script_for_unichar (ch);
- return (PangoEngineShape *)pango_map_get_engine (shape_map, script);
+ static PangoEngineShape *shaper;
+ if (g_once_init_enter (&shaper))
+ g_once_init_leave (&shaper,
+ _pango_basic_x_script_engine_create("BasicScriptEngineXCompat"));
+ return shaper;
}
/* Utility functions */