diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2008-12-11 01:30:53 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2008-12-11 01:30:53 (GMT) |
commit | 8417e5e3b118ed9e12563a3d4fceeb38b9e73d4f (patch) | |
tree | 99edff3d756441a12087ecd5053d9ca60536beff /abs/extra-testing/sdl_pango | |
parent | e649efa24662af962e6cbd7b9ece1bdd8f6a9340 (diff) | |
download | linhes_pkgbuild-8417e5e3b118ed9e12563a3d4fceeb38b9e73d4f.zip linhes_pkgbuild-8417e5e3b118ed9e12563a3d4fceeb38b9e73d4f.tar.gz linhes_pkgbuild-8417e5e3b118ed9e12563a3d4fceeb38b9e73d4f.tar.bz2 |
Deps for emulators and Miro.
Diffstat (limited to 'abs/extra-testing/sdl_pango')
-rw-r--r-- | abs/extra-testing/sdl_pango/PKGBUILD | 24 | ||||
-rw-r--r-- | abs/extra-testing/sdl_pango/SDL_Pango-0.1.2-API-adds.patch | 116 |
2 files changed, 140 insertions, 0 deletions
diff --git a/abs/extra-testing/sdl_pango/PKGBUILD b/abs/extra-testing/sdl_pango/PKGBUILD new file mode 100644 index 0000000..705e900 --- /dev/null +++ b/abs/extra-testing/sdl_pango/PKGBUILD @@ -0,0 +1,24 @@ +# $Id: PKGBUILD 8769 2008-08-16 05:40:38Z eric $ +# +# Contributor: gyo <nucleogeek@gmail.com> + +pkgname=sdl_pango +pkgver=0.1.2 +pkgrel=1 +pkgdesc="Pango SDL binding" +arch=('i686' 'x86_64') +url="http://sdlpango.sourceforge.net/" +license="" +depends=('pango' 'sdl') +options=('!libtool') +source=(http://switch.dl.sourceforge.net/sourceforge/sdlpango/SDL_Pango-$pkgver.tar.gz http://zarb.org/~gc/t/SDL_Pango-$pkgver-API-adds.patch) +md5sums=('85bbf9bb7b1cee0538154dadd045418c' '5decf3d7eb724e27548af3142131a2f6') + +build() { + _prefixname=SDL_Pango + cd $startdir/src/$_prefixname-$pkgver + patch -Np0 < $startdir/src/$_prefixname-$pkgver-API-adds.patch + ./configure --prefix=/usr + make || return 1 + make DESTDIR=$startdir/pkg install +} diff --git a/abs/extra-testing/sdl_pango/SDL_Pango-0.1.2-API-adds.patch b/abs/extra-testing/sdl_pango/SDL_Pango-0.1.2-API-adds.patch new file mode 100644 index 0000000..1535a56 --- /dev/null +++ b/abs/extra-testing/sdl_pango/SDL_Pango-0.1.2-API-adds.patch @@ -0,0 +1,116 @@ +--- src/SDL_Pango.c 2004-12-10 10:06:33.000000000 +0100 ++++ src/SDL_Pango.c 2006-09-24 22:46:24.000000000 +0200 +@@ -723,13 +723,8 @@ + SDL_UnlockSurface(surface);
+ }
+
+-/*!
+- Create a context which contains Pango objects.
+-
+- @return A pointer to the context as a SDLPango_Context*.
+-*/
+ SDLPango_Context*
+-SDLPango_CreateContext()
++SDLPango_CreateContext_GivenFontDesc(const char* font_desc)
+ {
+ SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context));
+ G_CONST_RETURN char *charset;
+@@ -743,8 +738,7 @@ + pango_context_set_language (context->context, pango_language_from_string (charset));
+ pango_context_set_base_dir (context->context, PANGO_DIRECTION_LTR);
+
+- context->font_desc = pango_font_description_from_string(
+- MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
++ context->font_desc = pango_font_description_from_string(font_desc);
+
+ context->layout = pango_layout_new (context->context);
+
+@@ -762,6 +756,17 @@ + }
+
+ /*!
++ Create a context which contains Pango objects.
++
++ @return A pointer to the context as a SDLPango_Context*.
++*/
++SDLPango_Context*
++SDLPango_CreateContext()
++{
++ SDLPango_CreateContext_GivenFontDesc(MAKE_FONT_NAME(DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
++}
++
++/*!
+ Free a context.
+
+ @param *context [i/o] Context to be free
+@@ -1053,6 +1058,20 @@ + pango_layout_set_font_description (context->layout, context->font_desc);
+ }
+
++void
++SDLPango_SetText_GivenAlignment(
++ SDLPango_Context *context,
++ const char *text,
++ int length,
++ SDLPango_Alignment alignment)
++{
++ pango_layout_set_attributes(context->layout, NULL);
++ pango_layout_set_text (context->layout, text, length);
++ pango_layout_set_auto_dir (context->layout, TRUE);
++ pango_layout_set_alignment (context->layout, alignment);
++ pango_layout_set_font_description (context->layout, context->font_desc);
++}
++
+ /*!
+ Set plain text to context.
+ Text must be utf-8.
+@@ -1067,11 +1086,7 @@ + const char *text,
+ int length)
+ {
+- pango_layout_set_attributes(context->layout, NULL);
+- pango_layout_set_text (context->layout, text, length);
+- pango_layout_set_auto_dir (context->layout, TRUE);
+- pango_layout_set_alignment (context->layout, PANGO_ALIGN_LEFT);
+- pango_layout_set_font_description (context->layout, context->font_desc);
++ SDLPango_SetText_GivenAlignment(context, text, length, SDLPANGO_ALIGN_LEFT);
+ }
+
+ /*!
+--- src/SDL_Pango.h 2004-12-10 10:06:33.000000000 +0100 ++++ src/SDL_Pango.h 2006-09-24 22:46:01.000000000 +0200 +@@ -109,12 +109,20 @@ + SDLPANGO_DIRECTION_NEUTRAL /*! Neutral */
+ } SDLPango_Direction;
+
+-
++/*!
++ Specifies alignment of text. See Pango reference for detail
++*/
++typedef enum {
++ SDLPANGO_ALIGN_LEFT,
++ SDLPANGO_ALIGN_CENTER,
++ SDLPANGO_ALIGN_RIGHT
++} SDLPango_Alignment;
+
+ extern DECLSPEC int SDLCALL SDLPango_Init();
+
+ extern DECLSPEC int SDLCALL SDLPango_WasInit();
+
++extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFontDesc(const char* font_desc);
+ extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext();
+
+ extern DECLSPEC void SDLCALL SDLPango_FreeContext(
+@@ -157,6 +165,12 @@ + const char *markup,
+ int length);
+
++extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment(
++ SDLPango_Context *context,
++ const char *text,
++ int length,
++ SDLPango_Alignment alignment);
++
+ extern DECLSPEC void SDLCALL SDLPango_SetText(
+ SDLPango_Context *context,
+ const char *markup,
|