build: Add a new fonts option

Allowing to disable font rendering integration, making it possible to
build Mutter without pango/harfbuzz/fribidi dependencies.

This commit also adds a new clutter-pango header that is used to include
pango specific bits.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
This commit is contained in:
Bilal Elmoussaoui
2024-11-12 14:17:34 +01:00
committed by Marge Bot
parent b0b1e0ef4e
commit 32c5faf010
41 changed files with 300 additions and 79 deletions

View File

@ -20,6 +20,7 @@
#include <atk/atk.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include "cally-examples-util.h"

View File

@ -29,6 +29,7 @@
*/
#include <atk/atk.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include "cally-examples-util.h"

View File

@ -20,6 +20,7 @@
#include <atk/atk.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include "cally-examples-util.h"

View File

@ -20,6 +20,7 @@
#include <atk/atk.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include "cally-examples-util.h"

View File

@ -16,12 +16,17 @@ clutter_accessibility_tests_dependencies = [
clutter_accessibility_tests = [
'cally-atkcomponent-example',
'cally-atktext-example',
'cally-atkevents-example',
'cally-atkeditabletext-example',
'cally-clone-example',
]
if have_fonts
clutter_accessibility_tests += [
'cally-atkeditabletext-example',
'cally-atkevents-example',
'cally-atktext-example',
'cally-clone-example',
]
endif
foreach test : clutter_accessibility_tests
executable(test,
sources: [

View File

@ -76,7 +76,7 @@ test_destroy_init (TestDestroy *self)
clutter_actor_add_child (CLUTTER_ACTOR (self), self->bg);
clutter_actor_set_name (self->bg, "Background");
self->label = clutter_text_new ();
self->label = clutter_actor_new ();
clutter_actor_add_child (CLUTTER_ACTOR (self), self->label);
clutter_actor_set_name (self->label, "Label");
}

View File

@ -1,4 +1,5 @@
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include <stdlib.h>
#include "tests/clutter-test-utils.h"

View File

@ -1,4 +1,5 @@
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include <string.h>
#include <stdlib.h>

View File

@ -20,16 +20,23 @@ clutter_conform_tests_actor_tests = [
'actor-layout',
'actor-meta',
'actor-offscreen-redirect',
'actor-paint-opacity',
'actor-pick',
'actor-pivot-point',
'actor-shader-effect',
'actor-size',
]
clutter_conform_tests_classes_tests = [
'text',
]
clutter_conform_tests_classes_tests = []
if have_fonts
clutter_conform_tests_actor_tests += [
'actor-paint-opacity',
]
clutter_conform_tests_classes_tests += [
'text',
]
endif
clutter_conform_tests_general_tests = [
'binding-pool',

View File

@ -1,4 +1,5 @@
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include <string.h>
#include <stdlib.h>

View File

@ -1,5 +1,6 @@
#include <glib.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include <string.h>
#include "tests/clutter-test-utils.h"

View File

@ -1,4 +1,5 @@
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include <cogl/cogl.h>
#include "test-conform-common.h"

View File

@ -17,15 +17,20 @@ clutter_tests_interactive_test_sources = [
'test-grab.c',
'test-animation.c',
'test-binding-pool.c',
'test-text.c',
'test-text-field.c',
'test-stage-sizing.c',
'test-swipe-action.c',
'test-cogl-point-sprites.c',
'test-content.c',
'test-keyframe-transition.c',
]
if have_fonts
clutter_tests_interactive_test_sources += [
'test-content.c',
'test-stage-sizing.c',
'test-swipe-action.c',
'test-text.c',
'test-text-field.c',
]
endif
gen_test_unit_names = find_program('meson/gen-test-unit-names.sh')
clutter_interactive_test_unit_names_h = custom_target('gen-test-unit-names',
output: 'test-unit-names.h',

View File

@ -1,6 +1,7 @@
#include <stdlib.h>
#include <gmodule.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include "tests/clutter-test-utils.h"

View File

@ -1,6 +1,7 @@
#include <stdlib.h>
#include <gmodule.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include "tests/clutter-test-utils.h"

View File

@ -1,5 +1,6 @@
#include <stdlib.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include "tests/clutter-test-utils.h"

View File

@ -1,6 +1,7 @@
#include <stdlib.h>
#include <gmodule.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include "tests/clutter-test-utils.h"

View File

@ -2,6 +2,7 @@
#include <gmodule.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include "tests/clutter-test-utils.h"

View File

@ -5,13 +5,18 @@ clutter_tests_micro_bench_c_args = [
clutter_tests_micro_bench_c_args += clutter_debug_c_args
clutter_tests_micro_bench_tests = [
'test-text',
'test-picking',
'test-text-perf',
'test-random-text',
'test-cogl-perf',
]
if have_fonts
clutter_tests_micro_bench_tests += [
'test-text',
'test-text-perf',
'test-random-text',
]
endif
foreach test : clutter_tests_micro_bench_tests
executable(test,
sources: [

View File

@ -1,5 +1,6 @@
#include <gmodule.h>
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include <stdlib.h>
#include "tests/clutter-test-utils.h"

View File

@ -1,4 +1,5 @@
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,4 +1,5 @@
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include <stdlib.h>
#include <string.h>

View File

@ -8,9 +8,14 @@ clutter_tests_performance_c_args += clutter_debug_c_args
clutter_tests_performance_tests = [
'test-picking',
'test-text-perf',
]
if have_fonts
clutter_tests_performance_tests += [
'test-text-perf',
]
endif
foreach test : clutter_tests_performance_tests
executable(test,
sources: [

View File

@ -1,4 +1,5 @@
#include <clutter/clutter.h>
#include <clutter/clutter-pango.h>
#include <stdlib.h>
#include <string.h>