# HG changeset patch # User Claudinei Pereira # Date 1244333042 0 # Node ID 98e87512d34ddf9939add97dda58d6de515eb898 # Parent 55a59aa123da358b505aae8b272e46b4ae00c53e Add: tuxmath diff -r 55a59aa123da -r 98e87512d34d tuxmath/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tuxmath/receipt Sun Jun 07 00:04:02 2009 +0000 @@ -0,0 +1,43 @@ +# SliTaz package receipt. + +PACKAGE="tuxmath" +SOURCE="tuxmath_w_fonts" +VERSION="1.7.2" +CATEGORY="games" +SHORT_DESC="Arcade game that helps kids practice their math facts." +MAINTAINER="claudinei@slitaz.org" +TARBALL="$SOURCE-$VERSION.tar.gz" +WEB_SITE="http://tux4kids.alioth.debian.org" +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" +DEPENDS="libSDL libsdl-image libsdl-mixer libsdl-ttf" +BUILD_DEPENDS="libSDL libSDL-dev libsdl-image libsdl-image-dev \ +libsdl-mixer libsdl-mixer-dev libsdl-ttf libsdl-ttf-dev" + + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + patch -p1 -i ../stuff/SDL_extras.c.patch + ./configure \ + --prefix=/usr \ + --without-sdlpango \ + $CONFIGURE_ARGS && + make && + make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr $fs/usr/share + cp -a $_pkg/usr/bin $fs/usr + cp -a $_pkg/usr/share/tuxmath $fs/usr/share + + for lang in de es fr pt_BR zh_CN; do + mkdir -p $fs/usr/share/locale/$lang/LC_MESSAGES + cp -a $_pkg/usr/share/locale/$lang/LC_MESSAGES/tuxmath.mo \ + $fs/usr/share/locale/$lang/LC_MESSAGES + done +} + diff -r 55a59aa123da -r 98e87512d34d tuxmath/stuff/SDL_extras.c.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tuxmath/stuff/SDL_extras.c.patch Sun Jun 07 00:04:02 2009 +0000 @@ -0,0 +1,19 @@ +--- tuxmath_w_fonts-1.7.2/src/SDL_extras.c.old Mon Mar 9 10:44:42 2009 ++++ tuxmath_w_fonts-1.7.2/src/SDL_extras.c Sat Jun 6 18:55:22 2009 +@@ -987,6 +987,7 @@ + /* font in memory once loaded until cleanup. */ + static TTF_Font* get_font(int size) + { ++ static char prev_font_name[FONT_NAME_LENGTH]; + if (size < 0) + { + fprintf(stderr, "Error - requested font size %d is negative\n", size); +@@ -1001,7 +1002,7 @@ + } + + /* If the font has changed, we need to wipe out the old ones: */ +- if (0 != strncmp(prev_font_name, Opts_FontName(),sizeof(prev_font_name))) ++ if (0 != strncmp(prev_font_name, Opts_FontName(), FONT_NAME_LENGTH)) + { + free_font_list(); + strncpy(prev_font_name, Opts_FontName(), sizeof(prev_font_name)); diff -r 55a59aa123da -r 98e87512d34d tuxmath/stuff/tuxmath.desktop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tuxmath/stuff/tuxmath.desktop Sun Jun 07 00:04:02 2009 +0000 @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Encoding=UTF-8 +Name=Tux, of Math Command +Exec=tuxmath +Icon=tuxmath.png +Terminal=false +Categories=Application;Game; diff -r 55a59aa123da -r 98e87512d34d tuxmath/stuff/tuxmath.png Binary file tuxmath/stuff/tuxmath.png has changed