wok rev 7409

Add libsdl-pango. Needed for frozen-bubble.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Nov 27 19:11:15 2010 +0000 (2010-11-27)
parents 13dc35a06ce8
children 90181603b240 e395e38e2e89
files libsdl-pango-dev/receipt libsdl-pango/receipt libsdl-pango/stuff/SDL_Pango-0.1.2-API-adds.patch libsdl-pango/stuff/matrix_declarations.patch
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libsdl-pango-dev/receipt	Sat Nov 27 19:11:15 2010 +0000
     1.3 @@ -0,0 +1,21 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="libsdl-pango-dev"
     1.7 +VERSION="0.1.2"
     1.8 +CATEGORY="development"
     1.9 +SHORT_DESC="devel files for libsdl-pango"
    1.10 +MAINTAINER="slaxemulator@gmail.com"
    1.11 +DEPENDS="libsdl-pango"
    1.12 +WEB_SITE="http://sdlpango.sourceforge.net/"
    1.13 +WANTED="libsdl-pango"
    1.14 +SOURCE="SDL_Pango"
    1.15 +
    1.16 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.17 +genpkg_rules()
    1.18 +{
    1.19 +	_pkg=$WOK/$WANTED/$SOURCE-$VERSION/_pkg
    1.20 +	mkdir -p $fs/usr/lib
    1.21 +	cp -a $_pkg/usr/lib/pkgconfig $fs/usr/lib
    1.22 +	cp -a $_pkg/usr/lib/*.*a $fs/usr/lib
    1.23 +}
    1.24 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/libsdl-pango/receipt	Sat Nov 27 19:11:15 2010 +0000
     2.3 @@ -0,0 +1,35 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="libsdl-pango"
     2.7 +VERSION="0.1.2"
     2.8 +CATEGORY="x-window"
     2.9 +SHORT_DESC="Pango SDL binding."
    2.10 +MAINTAINER="slaxemulator@gmail.com"
    2.11 +DEPENDS="pango libsdl"
    2.12 +BUILD_DEPENDS="pango-dev libsdl-dev pkg-config"
    2.13 +SOURCE="SDL_Pango"
    2.14 +TARBALL="$SOURCE-$VERSION.tar.gz"
    2.15 +WEB_SITE="http://sdlpango.sourceforge.net/"
    2.16 +WGET_URL="$SF_MIRROR/sdlpango/$TARBALL"
    2.17 +
    2.18 +# Rules to configure and make the package.
    2.19 +compile_rules()
    2.20 +{
    2.21 +	cd $src
    2.22 +	patch -Np0 -i ../stuff/SDL_Pango-$VERSION-API-adds.patch
    2.23 +	patch -Np1 -i ../stuff/matrix_declarations.patch
    2.24 +	./configure \
    2.25 +		--prefix=/usr \
    2.26 +		--infodir=/usr/share/info \
    2.27 +		--mandir=/usr/share/man \
    2.28 +		$CONFIGURE_ARGS &&
    2.29 +	make && make DESTDIR=$PWD/_pkg install
    2.30 +}
    2.31 +
    2.32 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.33 +genpkg_rules()
    2.34 +{
    2.35 +	mkdir -p $fs/usr/lib
    2.36 +	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
    2.37 +}
    2.38 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/libsdl-pango/stuff/SDL_Pango-0.1.2-API-adds.patch	Sat Nov 27 19:11:15 2010 +0000
     3.3 @@ -0,0 +1,116 @@
     3.4 +--- src/SDL_Pango.c	2004-12-10 10:06:33.000000000 +0100
     3.5 ++++ src/SDL_Pango.c	2006-09-24 22:46:24.000000000 +0200
     3.6 +@@ -723,13 +723,8 @@
     3.7 +     SDL_UnlockSurface(surface);
     3.8 + }
     3.9 + 
    3.10 +-/*!
    3.11 +-    Create a context which contains Pango objects.
    3.12 +-
    3.13 +-    @return A pointer to the context as a SDLPango_Context*.
    3.14 +-*/
    3.15 + SDLPango_Context*
    3.16 +-SDLPango_CreateContext()
    3.17 ++SDLPango_CreateContext_GivenFontDesc(const char* font_desc)
    3.18 + {
    3.19 +     SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context));
    3.20 +     G_CONST_RETURN char *charset;
    3.21 +@@ -743,8 +738,7 @@
    3.22 +     pango_context_set_language (context->context, pango_language_from_string (charset));
    3.23 +     pango_context_set_base_dir (context->context, PANGO_DIRECTION_LTR);
    3.24 + 
    3.25 +-    context->font_desc = pango_font_description_from_string(
    3.26 +-	MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
    3.27 ++    context->font_desc = pango_font_description_from_string(font_desc);
    3.28 + 
    3.29 +     context->layout = pango_layout_new (context->context);
    3.30 + 
    3.31 +@@ -762,6 +756,17 @@
    3.32 + }
    3.33 + 
    3.34 + /*!
    3.35 ++    Create a context which contains Pango objects.
    3.36 ++
    3.37 ++    @return A pointer to the context as a SDLPango_Context*.
    3.38 ++*/
    3.39 ++SDLPango_Context*
    3.40 ++SDLPango_CreateContext()
    3.41 ++{
    3.42 ++     SDLPango_CreateContext_GivenFontDesc(MAKE_FONT_NAME(DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
    3.43 ++}
    3.44 ++
    3.45 ++/*!
    3.46 +     Free a context.
    3.47 + 
    3.48 +     @param *context [i/o] Context to be free
    3.49 +@@ -1053,6 +1058,20 @@
    3.50 +     pango_layout_set_font_description (context->layout, context->font_desc);
    3.51 + }
    3.52 + 
    3.53 ++void
    3.54 ++SDLPango_SetText_GivenAlignment(
    3.55 ++    SDLPango_Context *context,
    3.56 ++    const char *text,
    3.57 ++    int length,
    3.58 ++    SDLPango_Alignment alignment)
    3.59 ++{
    3.60 ++    pango_layout_set_attributes(context->layout, NULL);
    3.61 ++    pango_layout_set_text (context->layout, text, length);
    3.62 ++    pango_layout_set_auto_dir (context->layout, TRUE);
    3.63 ++    pango_layout_set_alignment (context->layout, alignment);
    3.64 ++    pango_layout_set_font_description (context->layout, context->font_desc);
    3.65 ++}
    3.66 ++
    3.67 + /*!
    3.68 +     Set plain text to context.
    3.69 +     Text must be utf-8.
    3.70 +@@ -1067,11 +1086,7 @@
    3.71 +     const char *text,
    3.72 +     int length)
    3.73 + {
    3.74 +-    pango_layout_set_attributes(context->layout, NULL);
    3.75 +-    pango_layout_set_text (context->layout, text, length);
    3.76 +-    pango_layout_set_auto_dir (context->layout, TRUE);
    3.77 +-    pango_layout_set_alignment (context->layout, PANGO_ALIGN_LEFT);
    3.78 +-    pango_layout_set_font_description (context->layout, context->font_desc);
    3.79 ++     SDLPango_SetText_GivenAlignment(context, text, length, SDLPANGO_ALIGN_LEFT);
    3.80 + }
    3.81 + 
    3.82 + /*!
    3.83 +--- src/SDL_Pango.h	2004-12-10 10:06:33.000000000 +0100
    3.84 ++++ src/SDL_Pango.h	2006-09-24 22:46:01.000000000 +0200
    3.85 +@@ -109,12 +109,20 @@
    3.86 +     SDLPANGO_DIRECTION_NEUTRAL	/*! Neutral */
    3.87 + } SDLPango_Direction;
    3.88 + 
    3.89 +-
    3.90 ++/*!
    3.91 ++    Specifies alignment of text. See Pango reference for detail
    3.92 ++*/
    3.93 ++typedef enum {
    3.94 ++    SDLPANGO_ALIGN_LEFT,
    3.95 ++    SDLPANGO_ALIGN_CENTER,
    3.96 ++    SDLPANGO_ALIGN_RIGHT
    3.97 ++} SDLPango_Alignment;
    3.98 + 
    3.99 + extern DECLSPEC int SDLCALL SDLPango_Init();
   3.100 + 
   3.101 + extern DECLSPEC int SDLCALL SDLPango_WasInit();
   3.102 + 
   3.103 ++extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFontDesc(const char* font_desc);
   3.104 + extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext();
   3.105 + 
   3.106 + extern DECLSPEC void SDLCALL SDLPango_FreeContext(
   3.107 +@@ -157,6 +165,12 @@
   3.108 +     const char *markup,
   3.109 +     int length);
   3.110 + 
   3.111 ++extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment(
   3.112 ++    SDLPango_Context *context,
   3.113 ++    const char *text,
   3.114 ++    int length,
   3.115 ++    SDLPango_Alignment alignment);
   3.116 ++
   3.117 + extern DECLSPEC void SDLCALL SDLPango_SetText(
   3.118 +     SDLPango_Context *context,
   3.119 +     const char *markup,
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/libsdl-pango/stuff/matrix_declarations.patch	Sat Nov 27 19:11:15 2010 +0000
     4.3 @@ -0,0 +1,131 @@
     4.4 +Index: SDL_Pango-0.1.2/src/SDL_Pango.c
     4.5 +===================================================================
     4.6 +--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2007-09-18 15:03:10.732910311 +0200
     4.7 ++++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 15:04:41.970109622 +0200
     4.8 +@@ -286,6 +286,59 @@
     4.9 + } contextImpl;
    4.10 + 
    4.11 + 
    4.12 ++const SDLPango_Matrix _MATRIX_WHITE_BACK
    4.13 ++    = {255, 0, 0, 0,
    4.14 ++       255, 0, 0, 0,
    4.15 ++       255, 0, 0, 0,
    4.16 ++       255, 255, 0, 0,};
    4.17 ++
    4.18 ++/*!
    4.19 ++    Specifies white back and black letter.
    4.20 ++*/
    4.21 ++const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
    4.22 ++
    4.23 ++const SDLPango_Matrix _MATRIX_BLACK_BACK
    4.24 ++    = {0, 255, 0, 0,
    4.25 ++       0, 255, 0, 0,
    4.26 ++       0, 255, 0, 0,
    4.27 ++       255, 255, 0, 0,};
    4.28 ++/*!
    4.29 ++    Specifies black back and white letter.
    4.30 ++*/
    4.31 ++const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
    4.32 ++
    4.33 ++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
    4.34 ++    = {0, 0, 0, 0,
    4.35 ++       0, 0, 0, 0,
    4.36 ++       0, 0, 0, 0,
    4.37 ++       0, 255, 0, 0,};
    4.38 ++/*!
    4.39 ++    Specifies transparent back and black letter.
    4.40 ++*/
    4.41 ++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
    4.42 ++
    4.43 ++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
    4.44 ++    = {255, 255, 0, 0,
    4.45 ++       255, 255, 0, 0,
    4.46 ++       255, 255, 0, 0,
    4.47 ++       0, 255, 0, 0,};
    4.48 ++/*!
    4.49 ++    Specifies transparent back and white letter.
    4.50 ++*/
    4.51 ++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
    4.52 ++
    4.53 ++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
    4.54 ++    = {255, 255, 0, 0,
    4.55 ++       255, 255, 0, 0,
    4.56 ++       255, 255, 0, 0,
    4.57 ++       0, 0, 0, 0,};
    4.58 ++/*!
    4.59 ++    Specifies transparent back and transparent letter.
    4.60 ++    This is useful for KARAOKE like rendering.
    4.61 ++*/
    4.62 ++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
    4.63 ++
    4.64 ++
    4.65 + /*!
    4.66 +     Initialize the Glib and Pango API.
    4.67 +     This must be called before using other functions in this library,
    4.68 +Index: SDL_Pango-0.1.2/src/SDL_Pango.h
    4.69 +===================================================================
    4.70 +--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h	2007-09-18 15:03:10.732910311 +0200
    4.71 ++++ SDL_Pango-0.1.2/src/SDL_Pango.h	2007-09-18 15:06:24.919976401 +0200
    4.72 +@@ -47,57 +47,27 @@
    4.73 +     Uint8 m[4][4];  /*! Matrix variables */
    4.74 + } SDLPango_Matrix;
    4.75 + 
    4.76 +-const SDLPango_Matrix _MATRIX_WHITE_BACK
    4.77 +-    = {255, 0, 0, 0,
    4.78 +-       255, 0, 0, 0,
    4.79 +-       255, 0, 0, 0,
    4.80 +-       255, 255, 0, 0,};
    4.81 +-
    4.82 + /*!
    4.83 +     Specifies white back and black letter.
    4.84 + */
    4.85 +-const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
    4.86 +-
    4.87 +-const SDLPango_Matrix _MATRIX_BLACK_BACK
    4.88 +-    = {0, 255, 0, 0,
    4.89 +-       0, 255, 0, 0,
    4.90 +-       0, 255, 0, 0,
    4.91 +-       255, 255, 0, 0,};
    4.92 ++extern const SDLPango_Matrix *MATRIX_WHITE_BACK;
    4.93 + /*!
    4.94 +     Specifies black back and white letter.
    4.95 + */
    4.96 +-const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
    4.97 +-
    4.98 +-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
    4.99 +-    = {0, 0, 0, 0,
   4.100 +-       0, 0, 0, 0,
   4.101 +-       0, 0, 0, 0,
   4.102 +-       0, 255, 0, 0,};
   4.103 ++extern const SDLPango_Matrix *MATRIX_BLACK_BACK;
   4.104 + /*!
   4.105 +     Specifies transparent back and black letter.
   4.106 + */
   4.107 +-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
   4.108 +-
   4.109 +-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
   4.110 +-    = {255, 255, 0, 0,
   4.111 +-       255, 255, 0, 0,
   4.112 +-       255, 255, 0, 0,
   4.113 +-       0, 255, 0, 0,};
   4.114 ++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
   4.115 + /*!
   4.116 +     Specifies transparent back and white letter.
   4.117 + */
   4.118 +-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
   4.119 +-
   4.120 +-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
   4.121 +-    = {255, 255, 0, 0,
   4.122 +-       255, 255, 0, 0,
   4.123 +-       255, 255, 0, 0,
   4.124 +-       0, 0, 0, 0,};
   4.125 ++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
   4.126 + /*!
   4.127 +     Specifies transparent back and transparent letter.
   4.128 +     This is useful for KARAOKE like rendering.
   4.129 + */
   4.130 +-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
   4.131 ++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
   4.132 + 
   4.133 + /*!
   4.134 +     Specifies direction of text. See Pango reference for detail