python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / SDL_Pango / fixes.patch
blob9703c0d4918f5c868fabf4ecc61cf0c36429ec03
1 diff --git a/SDL_Pango.pc.in b/SDL_Pango.pc.in
2 index 750d091..3af38ff 100644
3 --- a/SDL_Pango.pc.in
4 +++ b/SDL_Pango.pc.in
5 @@ -6,6 +6,6 @@ includedir=@includedir@
6 Name: SDL_Pango
7 Description: SDL library for internationalized text rendering
8 Version: @VERSION@
9 -Requires: pango
10 +Requires: pango pangoft2
11 Libs: -L${libdir} -lSDL_Pango
12 Cflags: -I${includedir}
13 \ No newline at end of file
14 diff --git a/src/SDL_Pango.c b/src/SDL_Pango.c
15 index b969bc1..cc2c3f5 100644
16 --- a/src/SDL_Pango.c
17 +++ b/src/SDL_Pango.c
18 @@ -231,6 +231,41 @@
20 #include "SDL_Pango.h"
22 +const SDLPango_Matrix _MATRIX_WHITE_BACK
23 + = {255, 0, 0, 0,
24 + 255, 0, 0, 0,
25 + 255, 0, 0, 0,
26 + 255, 255, 0, 0,};
27 +const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
29 +const SDLPango_Matrix _MATRIX_BLACK_BACK
30 + = {0, 255, 0, 0,
31 + 0, 255, 0, 0,
32 + 0, 255, 0, 0,
33 + 255, 255, 0, 0,};
34 +const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
36 +const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
37 + = {0, 0, 0, 0,
38 + 0, 0, 0, 0,
39 + 0, 0, 0, 0,
40 + 0, 255, 0, 0,};
41 +const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
43 +const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
44 + = {255, 255, 0, 0,
45 + 255, 255, 0, 0,
46 + 255, 255, 0, 0,
47 + 0, 255, 0, 0,};
48 +const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
50 +const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
51 + = {255, 255, 0, 0,
52 + 255, 255, 0, 0,
53 + 255, 255, 0, 0,
54 + 0, 0, 0, 0,};
55 +const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
57 //! non-zero if initialized
58 static int IS_INITIALIZED = 0;
60 diff --git a/src/SDL_Pango.h b/src/SDL_Pango.h
61 index 6ebdf78..b7e5e58 100644
62 --- a/src/SDL_Pango.h
63 +++ b/src/SDL_Pango.h
64 @@ -47,57 +47,32 @@ typedef struct _SDLPango_Matrix {
65 Uint8 m[4][4]; /*! Matrix variables */
66 } SDLPango_Matrix;
68 -const SDLPango_Matrix _MATRIX_WHITE_BACK
69 - = {255, 0, 0, 0,
70 - 255, 0, 0, 0,
71 - 255, 0, 0, 0,
72 - 255, 255, 0, 0,};
74 /*!
75 Specifies white back and black letter.
77 -const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
78 +extern const SDLPango_Matrix *MATRIX_WHITE_BACK;
80 -const SDLPango_Matrix _MATRIX_BLACK_BACK
81 - = {0, 255, 0, 0,
82 - 0, 255, 0, 0,
83 - 0, 255, 0, 0,
84 - 255, 255, 0, 0,};
85 /*!
86 Specifies black back and white letter.
88 -const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
89 +extern const SDLPango_Matrix *MATRIX_BLACK_BACK;
91 -const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
92 - = {0, 0, 0, 0,
93 - 0, 0, 0, 0,
94 - 0, 0, 0, 0,
95 - 0, 255, 0, 0,};
96 /*!
97 Specifies transparent back and black letter.
99 -const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
100 +extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
102 -const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
103 - = {255, 255, 0, 0,
104 - 255, 255, 0, 0,
105 - 255, 255, 0, 0,
106 - 0, 255, 0, 0,};
108 Specifies transparent back and white letter.
110 -const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
111 +extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
113 -const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
114 - = {255, 255, 0, 0,
115 - 255, 255, 0, 0,
116 - 255, 255, 0, 0,
117 - 0, 0, 0, 0,};
119 Specifies transparent back and transparent letter.
120 This is useful for KARAOKE like rendering.
122 -const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
123 +extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
126 Specifies direction of text. See Pango reference for detail
127 @@ -186,7 +161,8 @@ extern DECLSPEC void SDLCALL SDLPango_SetBaseDirection(
128 SDLPango_Direction direction);
131 -#ifdef __FT2_BUILD_UNIX_H__
133 +#ifdef __PANGO_H__
135 extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(
136 const FT_Bitmap *bitmap,
137 @@ -194,11 +170,8 @@ extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(
138 const SDLPango_Matrix *matrix,
139 SDL_Rect *rect);
141 -#endif /* __FT2_BUILD_UNIX_H__ */
144 -#ifdef __PANGO_H__
146 extern DECLSPEC PangoFontMap* SDLCALL SDLPango_GetPangoFontMap(
147 SDLPango_Context *context);