mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
pango: added 1.50.3 recipe (#6504)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
SUMMARY="Multi-platform 2D graphics library"
|
||||
DESCRIPTION="Pango is a library for laying out and rendering of text, with an \
|
||||
SUMMARY="Open-source library for layout and rendering of i18n text"
|
||||
DESCRIPTION="Pango is a library for layout and rendering of text, with an \
|
||||
emphasis on internationalization."
|
||||
HOMEPAGE="https://www.pango.org/"
|
||||
COPYRIGHT="1999-2007,2010 Red Hat Software
|
||||
COPYRIGHT="1999-2021 Red Hat Software
|
||||
2001,2002 Behdad Esfahbod
|
||||
1999-2002 International Business Machines
|
||||
2005-2007 Imendio AB
|
||||
@@ -17,18 +17,19 @@ COPYRIGHT="1999-2007,2010 Red Hat Software
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://ftp.gnome.org/pub/GNOME/sources/pango/${portVersion%.*}/pango-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="501e74496173c02dcd024ded7fbb3f09efd37e2a488e248aa40799424dbb3b2a"
|
||||
CHECKSUM_SHA256="4add05edf51c1fb375a1ccde7498914120e23cb280dd7395b1aeb441f1838a4c"
|
||||
PATCHES="pango-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="0.4800.5"
|
||||
libVersion="0.5000.3"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
pango$secondaryArchSuffix = $portVersion compat >= 1
|
||||
cmd:pango_list$secondaryArchSuffix
|
||||
cmd:pango_segmentation$secondaryArchSuffix
|
||||
cmd:pango_view$secondaryArchSuffix
|
||||
lib:libpango_1.0$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libpangocairo_1.0$secondaryArchSuffix = $libVersionCompat
|
||||
@@ -85,13 +86,13 @@ BUILD()
|
||||
{
|
||||
meson build \
|
||||
--prefix="$prefix" --libdir="$libDir" --includedir="$includeDir" \
|
||||
--bindir="$binDir"
|
||||
meson compile -C build
|
||||
--bindir="$binDir" --buildtype=debugoptimized
|
||||
ninja -C build
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
meson install -C build
|
||||
ninja install -C build
|
||||
|
||||
prepareInstalledDevelLibs libpango-1.0 \
|
||||
libpangocairo-1.0 libpangoft2-1.0
|
||||
@@ -104,5 +105,5 @@ INSTALL()
|
||||
|
||||
TEST()
|
||||
{
|
||||
meson test -C build
|
||||
ninja test -C build
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
From 2d117cae0c7298d1e408e39e2056e7ff2950fcce Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 12 Oct 2015 22:19:59 +0000
|
||||
Subject: Haiku patch
|
||||
|
||||
|
||||
diff --git a/tests/testattributes.c b/tests/testattributes.c
|
||||
index 8e63201..1c9f8d9 100644
|
||||
--- a/tests/testattributes.c
|
||||
+++ b/tests/testattributes.c
|
||||
@@ -412,7 +412,7 @@ test_list_filter (void)
|
||||
g_assert_null (out);
|
||||
|
||||
out = pango_attr_list_filter (list, just_weight, NULL);
|
||||
- g_assert_nonnull (out);
|
||||
+ g_assert (out != NULL);
|
||||
|
||||
assert_attr_list (list, "[0,-1]size=10\n"
|
||||
"[10,20]stretch=2\n");
|
||||
@@ -505,11 +505,11 @@ test_iter_get (void)
|
||||
iter = pango_attr_list_get_iterator (list);
|
||||
pango_attr_iterator_next (iter);
|
||||
attr = pango_attr_iterator_get (iter, PANGO_ATTR_SIZE);
|
||||
- g_assert_nonnull (attr);
|
||||
+ g_assert (attr != NULL);
|
||||
g_assert_cmpuint (attr->start_index, ==, 0);
|
||||
g_assert_cmpuint (attr->end_index, ==, G_MAXUINT);
|
||||
attr = pango_attr_iterator_get (iter, PANGO_ATTR_STRETCH);
|
||||
- g_assert_nonnull (attr);
|
||||
+ g_assert (attr != NULL);
|
||||
g_assert_cmpuint (attr->start_index, ==, 10);
|
||||
g_assert_cmpuint (attr->end_index, ==, 30);
|
||||
attr = pango_attr_iterator_get (iter, PANGO_ATTR_WEIGHT);
|
||||
@@ -567,7 +567,7 @@ test_iter_get_font (void)
|
||||
pango_attr_iterator_get_font (iter, desc, &lang, &attrs);
|
||||
desc2 = pango_font_description_from_string ("Times Condensed 10");
|
||||
g_assert_true (pango_font_description_equal (desc, desc2));
|
||||
- g_assert_nonnull (lang);
|
||||
+ g_assert (lang != NULL);
|
||||
g_assert_cmpstr (pango_language_to_string (lang), ==, "ja-jp");
|
||||
g_assert_null (attrs);
|
||||
pango_font_description_free (desc);
|
||||
--
|
||||
2.30.2
|
||||
|
||||
235
x11-libs/pango/patches/pango-1.50.3.patchset
Normal file
235
x11-libs/pango/patches/pango-1.50.3.patchset
Normal file
@@ -0,0 +1,235 @@
|
||||
From 4b453298912881209c6da1d4e6da01c8f86c282c Mon Sep 17 00:00:00 2001
|
||||
From: Ken Mays <kmays2000@gmail.com>
|
||||
Date: Fri, 24 Dec 2021 15:06:02 +0000
|
||||
Subject: Fix Pango 1.50 unit tests for Haiku
|
||||
|
||||
|
||||
diff --git a/tests/markup-parse.c b/tests/markup-parse.c
|
||||
index b324867..fbe1440 100644
|
||||
--- a/tests/markup-parse.c
|
||||
+++ b/tests/markup-parse.c
|
||||
@@ -261,7 +261,7 @@ main (int argc, char *argv[])
|
||||
const gchar *name;
|
||||
gchar *path;
|
||||
|
||||
- g_setenv ("LC_ALL", "en_US.UTF8", TRUE);
|
||||
+ g_setenv ("LC_ALL", "C", TRUE);
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
/* allow to easily generate expected output for new test cases */
|
||||
diff --git a/tests/test-font.c b/tests/test-font.c
|
||||
index 2eef439..95e1b75 100644
|
||||
--- a/tests/test-font.c
|
||||
+++ b/tests/test-font.c
|
||||
@@ -125,7 +125,7 @@ test_empty_variations (void)
|
||||
gchar *str;
|
||||
|
||||
desc = pango_font_description_from_string ("Cantarell 14");
|
||||
- g_assert_nonnull (desc);
|
||||
+ g_assert ((desc) !=NULL);
|
||||
g_assert_cmpint ((pango_font_description_get_set_fields (desc) & PANGO_FONT_MASK_VARIATIONS), ==, 0);
|
||||
g_assert_null (pango_font_description_get_variations (desc));
|
||||
|
||||
@@ -513,9 +513,9 @@ test_to_filename (void)
|
||||
desc = pango_font_description_from_string ("Futura Medium Italic 14");
|
||||
str = pango_font_description_to_filename (desc);
|
||||
|
||||
- g_assert_nonnull (strstr (str, "futura"));
|
||||
- g_assert_nonnull (strstr (str, "medium"));
|
||||
- g_assert_nonnull (strstr (str, "italic"));
|
||||
+ g_assert ((strstr (str, "futura")) !=NULL);
|
||||
+ g_assert ((strstr (str, "medium")) !=NULL);
|
||||
+ g_assert ((strstr (str, "italic")) !=NULL);
|
||||
|
||||
g_free (str);
|
||||
|
||||
diff --git a/tests/testcontext.c b/tests/testcontext.c
|
||||
index 9cd8d83..27f7b01 100644
|
||||
--- a/tests/testcontext.c
|
||||
+++ b/tests/testcontext.c
|
||||
@@ -39,7 +39,7 @@ test_list_families (void)
|
||||
pango_context_set_font_map (context, pango_cairo_font_map_get_default ());
|
||||
|
||||
pango_context_list_families (context, &families, &n_families);
|
||||
- g_assert_nonnull (families);
|
||||
+ g_assert ((families) !=NULL);
|
||||
g_assert_cmpint (n_families, >, 0);
|
||||
|
||||
g_free (families);
|
||||
diff --git a/tests/testlanguage.c b/tests/testlanguage.c
|
||||
index 35844d4..ed78296 100644
|
||||
--- a/tests/testlanguage.c
|
||||
+++ b/tests/testlanguage.c
|
||||
@@ -43,7 +43,7 @@ test_language_env (void)
|
||||
g_setenv ("LANGUAGE", "fr", TRUE);
|
||||
|
||||
preferred = pango_language_get_preferred ();
|
||||
- g_assert_nonnull (preferred);
|
||||
+ g_assert ((preferred) !=NULL);
|
||||
g_assert_true (preferred[0] == pango_language_from_string ("de"));
|
||||
g_assert_true (preferred[1] == pango_language_from_string ("ja"));
|
||||
g_assert_null (preferred[2]);
|
||||
diff --git a/tests/testmisc.c b/tests/testmisc.c
|
||||
index 1aa9094..903bfab 100644
|
||||
--- a/tests/testmisc.c
|
||||
+++ b/tests/testmisc.c
|
||||
@@ -307,7 +307,7 @@ test_version_info (void)
|
||||
|
||||
g_assert_null (pango_version_check (1, 0, 0));
|
||||
g_assert_null (pango_version_check (PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR, PANGO_VERSION_MICRO));
|
||||
- g_assert_nonnull (pango_version_check (2, 0, 0));
|
||||
+ g_assert ((pango_version_check (2, 0, 0)) !=NULL);
|
||||
|
||||
str = g_strdup_printf ("%d.%d.%d", PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR, PANGO_VERSION_MICRO);
|
||||
g_assert_cmpstr (str, ==, pango_version_string ());
|
||||
@@ -544,7 +544,7 @@ test_index_to_x (void)
|
||||
|
||||
pango_layout_index_to_line_x (layout, index, FALSE, &l, NULL);
|
||||
line = pango_layout_get_line (layout, l);
|
||||
- g_assert_nonnull (line);
|
||||
+ g_assert ((line) !=NULL);
|
||||
|
||||
pango_layout_line_index_to_x (line, index, 0, &x);
|
||||
pango_layout_line_x_to_index (line, x, &index2, &trailing);
|
||||
diff --git a/tests/testserialize.c b/tests/testserialize.c
|
||||
index e480da3..d0ddf07 100644
|
||||
--- a/tests/testserialize.c
|
||||
+++ b/tests/testserialize.c
|
||||
@@ -62,7 +62,7 @@ test_serialize_attr_list (void)
|
||||
char *str;
|
||||
|
||||
attrs = pango_attr_list_from_string (valid[i]);
|
||||
- g_assert_nonnull (attrs);
|
||||
+ g_assert ((attrs) !=NULL);
|
||||
str = pango_attr_list_to_string (attrs);
|
||||
g_assert_cmpstr (str, ==, roundtripped[i]);
|
||||
g_free (str);
|
||||
@@ -113,7 +113,7 @@ test_serialize_tab_array (void)
|
||||
char *str;
|
||||
|
||||
tabs = pango_tab_array_from_string (valid[i]);
|
||||
- g_assert_nonnull (tabs);
|
||||
+ g_assert ((tabs) !=NULL);
|
||||
str = pango_tab_array_to_string (tabs);
|
||||
g_assert_cmpstr (str, ==, roundtripped[i]);
|
||||
g_free (str);
|
||||
@@ -165,7 +165,7 @@ test_serialize_font (void)
|
||||
|
||||
font2 = pango_font_deserialize (context, bytes, &error);
|
||||
g_assert_no_error (error);
|
||||
- g_assert_nonnull (font2);
|
||||
+ g_assert ((font2) !=NULL);
|
||||
|
||||
bytes2 = pango_font_serialize (font2);
|
||||
g_assert_true (g_bytes_equal (bytes2, bytes));
|
||||
@@ -286,9 +286,9 @@ test_serialize_layout_valid (void)
|
||||
g_assert_no_error (error);
|
||||
g_assert_true (PANGO_IS_LAYOUT (layout));
|
||||
g_assert_cmpstr (pango_layout_get_text (layout), ==, "Some fun with layouts!");
|
||||
- g_assert_nonnull (pango_layout_get_attributes (layout));
|
||||
+ g_assert ((pango_layout_get_attributes (layout)) !=NULL);
|
||||
tabs = pango_layout_get_tabs (layout);
|
||||
- g_assert_nonnull (tabs);
|
||||
+ g_assert ((tabs) !=NULL);
|
||||
pango_tab_array_free (tabs);
|
||||
s = pango_font_description_to_string (pango_layout_get_font_description (layout));
|
||||
g_assert_cmpstr (s, ==, "Sans Bold 32");
|
||||
@@ -421,7 +421,7 @@ test_serialize_layout_invalid (void)
|
||||
if (test[i].expected_error)
|
||||
g_assert_error (error, PANGO_LAYOUT_DESERIALIZE_ERROR, test[i].expected_error);
|
||||
else
|
||||
- g_assert_nonnull (error);
|
||||
+ g_assert ((error) !=NULL);
|
||||
g_bytes_unref (bytes);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 24d1dce96a5fc997a520a8b3e6cf07668a4e6c91 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 12 Oct 2015 22:19:59 +0000
|
||||
Subject: Haiku patch for testattributes unit test
|
||||
|
||||
|
||||
diff --git a/tests/testattributes.c b/tests/testattributes.c
|
||||
index cd70edc..a86b5bc 100644
|
||||
--- a/tests/testattributes.c
|
||||
+++ b/tests/testattributes.c
|
||||
@@ -132,31 +132,31 @@ test_binding (PangoAttribute *attr)
|
||||
switch (attr_base[attr->klass->type])
|
||||
{
|
||||
case INT:
|
||||
- g_assert_nonnull (pango_attribute_as_int (attr));
|
||||
+ g_assert ((pango_attribute_as_int (attr)) !=NULL);
|
||||
break;
|
||||
case LANGUAGE:
|
||||
- g_assert_nonnull (pango_attribute_as_language (attr));
|
||||
+ g_assert ((pango_attribute_as_language (attr)) !=NULL);
|
||||
break;
|
||||
case STRING:
|
||||
- g_assert_nonnull (pango_attribute_as_string (attr));
|
||||
+ g_assert ((pango_attribute_as_string (attr)) !=NULL);
|
||||
break;
|
||||
case SIZE:
|
||||
- g_assert_nonnull (pango_attribute_as_size (attr));
|
||||
+ g_assert ((pango_attribute_as_size (attr)) !=NULL);
|
||||
break;
|
||||
case FONT_DESC:
|
||||
- g_assert_nonnull (pango_attribute_as_font_desc (attr));
|
||||
+ g_assert ((pango_attribute_as_font_desc (attr)) !=NULL);
|
||||
break;
|
||||
case COLOR:
|
||||
- g_assert_nonnull (pango_attribute_as_color (attr));
|
||||
+ g_assert ((pango_attribute_as_color (attr)) !=NULL);
|
||||
break;
|
||||
case SHAPE:
|
||||
- g_assert_nonnull (pango_attribute_as_shape (attr));
|
||||
+ g_assert ((pango_attribute_as_shape (attr)) !=NULL);
|
||||
break;
|
||||
case FLOAT:
|
||||
- g_assert_nonnull (pango_attribute_as_float (attr));
|
||||
+ g_assert ((pango_attribute_as_float (attr)) !=NULL);
|
||||
break;
|
||||
case FONT_FEATURES:
|
||||
- g_assert_nonnull (pango_attribute_as_font_features (attr));
|
||||
+ g_assert ((pango_attribute_as_font_features (attr)) !=NULL);
|
||||
break;
|
||||
case INVALID:
|
||||
default:
|
||||
@@ -765,7 +765,7 @@ test_list_filter (void)
|
||||
g_assert_null (out);
|
||||
|
||||
out = pango_attr_list_filter (list, just_weight, NULL);
|
||||
- g_assert_nonnull (out);
|
||||
+ g_assert ((out) !=NULL);
|
||||
|
||||
assert_attr_list (list, "0 -1 size 10\n"
|
||||
"10 20 stretch condensed\n");
|
||||
@@ -852,11 +852,11 @@ test_iter_get (void)
|
||||
iter = pango_attr_list_get_iterator (list);
|
||||
pango_attr_iterator_next (iter);
|
||||
attr = pango_attr_iterator_get (iter, PANGO_ATTR_SIZE);
|
||||
- g_assert_nonnull (attr);
|
||||
+ g_assert ((attr) !=NULL);
|
||||
g_assert_cmpuint (attr->start_index, ==, 0);
|
||||
g_assert_cmpuint (attr->end_index, ==, G_MAXUINT);
|
||||
attr = pango_attr_iterator_get (iter, PANGO_ATTR_STRETCH);
|
||||
- g_assert_nonnull (attr);
|
||||
+ g_assert ((attr) !=NULL);
|
||||
g_assert_cmpuint (attr->start_index, ==, 10);
|
||||
g_assert_cmpuint (attr->end_index, ==, 30);
|
||||
attr = pango_attr_iterator_get (iter, PANGO_ATTR_WEIGHT);
|
||||
@@ -910,7 +910,7 @@ test_iter_get_font (void)
|
||||
pango_attr_iterator_get_font (iter, desc, &lang, &attrs);
|
||||
desc2 = pango_font_description_from_string ("Times Condensed 10px");
|
||||
g_assert_true (pango_font_description_equal (desc, desc2));
|
||||
- g_assert_nonnull (lang);
|
||||
+ g_assert ((lang) !=NULL);
|
||||
g_assert_cmpstr (pango_language_to_string (lang), ==, "ja-jp");
|
||||
g_assert_null (attrs);
|
||||
pango_font_description_free (desc);
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user