diff --git a/x11-libs/pango/pango-1.54.0.recipe b/x11-libs/pango/pango-1.54.0.recipe new file mode 100644 index 000000000..f8ae522ac --- /dev/null +++ b/x11-libs/pango/pango-1.54.0.recipe @@ -0,0 +1,124 @@ +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-2021 Red Hat Software + 2001,2002 Behdad Esfahbod + 1999-2002 International Business Machines + 2005-2007 Imendio AB + 2008 Jürg Billeter + 1999,2000 Dov Grobgeld + 2005 Keith Packard + 2010 Kristian Rietveld + 2000-2002 Tor Lillqvist + 2007 Novell, Inc. + 2001 Alexander Larsson + 2000 SuSE Linux Ltd" +LICENSE="GNU LGPL v2.1" +REVISION="1" +SOURCE_URI="https://download.gnome.org/sources/pango/${portVersion%.*}/pango-$portVersion.tar.xz" +CHECKSUM_SHA256="8a9eed75021ee734d7fc0fdf3a65c3bba51dfefe4ae51a9b414a60c70b2d1ed8" +PATCHES="pango-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +libVersion="0.5400.0" +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 + lib:libpangoft2_1.0$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcairo$secondaryArchSuffix + lib:libfontconfig$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libfribidi$secondaryArchSuffix + lib:libgio_2.0$secondaryArchSuffix + lib:libglib_2.0$secondaryArchSuffix + lib:libgobject_2.0$secondaryArchSuffix + lib:libharfbuzz$secondaryArchSuffix +# lib:libharfbuzz_gobject$secondaryArchSuffix + " + +PROVIDES_devel=" + pango${secondaryArchSuffix}_devel = $portVersion compat >= 1 + devel:libpango_1.0$secondaryArchSuffix = $libVersionCompat + devel:libpangocairo_1.0$secondaryArchSuffix = $libVersionCompat + devel:libpangoft2_1.0$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + pango$secondaryArchSuffix == $portVersion base + devel:libcairo$secondaryArchSuffix + devel:libfontconfig$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + devel:libfribidi$secondaryArchSuffix + devel:libgio_2.0$secondaryArchSuffix + devel:libglib_2.0$secondaryArchSuffix + devel:libgobject_2.0$secondaryArchSuffix + devel:libharfbuzz$secondaryArchSuffix + devel:libharfbuzz_gobject$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcairo$secondaryArchSuffix + devel:libfribidi$secondaryArchSuffix + devel:libfontconfig$secondaryArchSuffix + devel:libgio_2.0$secondaryArchSuffix + devel:libgirepository_1.0$secondaryArchSuffix + devel:libglib_2.0$secondaryArchSuffix + devel:libgobject_2.0$secondaryArchSuffix + devel:libharfbuzz$secondaryArchSuffix + devel:libharfbuzz_gobject$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:find + cmd:gcc$secondaryArchSuffix + cmd:gtkdocize + cmd:help2man + cmd:ld$secondaryArchSuffix + cmd:meson + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + meson build \ + --buildtype=debugoptimized \ + --prefix="$prefix" \ + --bindir="$binDir" \ + --libdir="$libDir" \ + --includedir="$includeDir" \ + --datadir="$dataDir" \ + -Dintrospection=enabled + ninja -C build +} + +INSTALL() +{ + ninja -C build install + + prepareInstalledDevelLibs libpango-1.0 \ + libpangocairo-1.0 \ + libpangoft2-1.0 + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir \ + $dataDir/gir-1.0 +} + +TEST() +{ + ninja -C build test +} diff --git a/x11-libs/pango/patches/pango-1.54.0.patchset b/x11-libs/pango/patches/pango-1.54.0.patchset new file mode 100644 index 000000000..dbb3b89b1 --- /dev/null +++ b/x11-libs/pango/patches/pango-1.54.0.patchset @@ -0,0 +1,235 @@ +From 46625e1a9d7eb644a8e57145a5d9cabba5e79d5b Mon Sep 17 00:00:00 2001 +From: Ken Mays +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 0021ffe..e7fb20e 100644 +--- a/tests/testserialize.c ++++ b/tests/testserialize.c +@@ -72,7 +72,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); +@@ -123,7 +123,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); +@@ -175,7 +175,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)); +@@ -296,9 +296,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"); +@@ -431,7 +431,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.42.0 + + +From 47a3999ee004515447277234e42be173f3fa06fc Mon Sep 17 00:00:00 2001 +From: Jerome Duval +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 5d3334e..a32641d 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: +@@ -785,7 +785,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"); +@@ -872,11 +872,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); +@@ -930,7 +930,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.42.0 +