Port of TuxMath
This commit is contained in:
19
lib/mk/tuxmath_t4k.mk
Normal file
19
lib/mk/tuxmath_t4k.mk
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
T4K_DIR := $(call select_from_ports,tuxmath)/src/app/tuxmath/t4k
|
||||||
|
|
||||||
|
LIBS += libc sdl sdl_image sdl_mixer sdl_ttf sdl_net libiconv libxml2
|
||||||
|
|
||||||
|
INC_DIR += $(REP_DIR)/src/app/tuxmath/t4k \
|
||||||
|
$(T4K_DIR)/src/linebreak
|
||||||
|
|
||||||
|
CC_OPT += -DCOMMON_DATA_PREFIX=\"/data\"
|
||||||
|
|
||||||
|
SRC_C := $(notdir $(wildcard $(T4K_DIR)/src/*.c) \
|
||||||
|
$(wildcard $(T4K_DIR)/src/linebreak/unistr/*.c) \
|
||||||
|
width.c linebreak.c)
|
||||||
|
|
||||||
|
CC_WARN += -Wall -Wno-unused-function
|
||||||
|
|
||||||
|
vpath %.c $(T4K_DIR)/src
|
||||||
|
vpath %.c $(T4K_DIR)/src/linebreak
|
||||||
|
vpath %.c $(T4K_DIR)/src/linebreak/unistr
|
||||||
|
vpath %.c $(T4K_DIR)/src/linebreak/uniwidth
|
||||||
1
ports/tuxmath.hash
Normal file
1
ports/tuxmath.hash
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ea0e7acf7c3f477de34e5e2d04a55102a6f9c3f5
|
||||||
12
ports/tuxmath.port
Normal file
12
ports/tuxmath.port
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
LICENSE := GPLv3
|
||||||
|
VERSION := 2.0.1
|
||||||
|
DOWNLOADS := t4k.archive tuxmath.archive
|
||||||
|
|
||||||
|
URL(t4k) := http://downloads.sourceforge.net/project/tuxmath/t4k_common/t4k_common-0.1.1.tar.gz
|
||||||
|
SHA(t4k) := 626eddedee86059ccab593a226c8d98571018b46
|
||||||
|
DIR(t4k) := src/app/tuxmath/t4k
|
||||||
|
|
||||||
|
URL(tuxmath) := http://downloads.sourceforge.net/project/tuxmath/tuxmath-source/TuxMath%202.0.1%20-%20Source/tuxmath_w_fonts-2.0.1.tar.gz
|
||||||
|
SHA(tuxmath) := 7a73430c29e5f1fdb20d33dbce484ed1655044f6
|
||||||
|
DIR(tuxmath) := src/app/tuxmath
|
||||||
|
|
||||||
34
run/tuxmath.run
Normal file
34
run/tuxmath.run
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
set build_components { app/tuxmath }
|
||||||
|
|
||||||
|
set app_config {
|
||||||
|
<start name="tuxmath" priority="-2">
|
||||||
|
<resource name="RAM" quantum="64M"/>
|
||||||
|
<config>
|
||||||
|
<libc stdout="/dev/log" stderr="/dev/log" >
|
||||||
|
<vfs>
|
||||||
|
<tar name="tuxmath_data.tar" />
|
||||||
|
<dir name="dev"> <log/> </dir>
|
||||||
|
</vfs>
|
||||||
|
</libc>
|
||||||
|
</config>
|
||||||
|
</start>}
|
||||||
|
|
||||||
|
set boot_modules {
|
||||||
|
tuxmath
|
||||||
|
libc.lib.so
|
||||||
|
libm.lib.so
|
||||||
|
pthread.lib.so
|
||||||
|
libiconv.lib.so
|
||||||
|
jpeg.lib.so
|
||||||
|
freetype.lib.so
|
||||||
|
libpng.lib.so
|
||||||
|
sdl_mixer.lib.so
|
||||||
|
sdl_image.lib.so
|
||||||
|
sdl_net.lib.so
|
||||||
|
sdl_ttf.lib.so
|
||||||
|
sdl.lib.so
|
||||||
|
zlib.lib.so
|
||||||
|
tuxmath_data.tar
|
||||||
|
}
|
||||||
|
|
||||||
|
source ${genode_dir}/repos/world/run/framebuffer_app.inc
|
||||||
6
src/app/tuxmath/config.h
Normal file
6
src/app/tuxmath/config.h
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#define HAVE_STDINT_H 1
|
||||||
|
#define HAVE_SCANDIR 1
|
||||||
|
#define HAVE_LIBSDL_NET 1
|
||||||
|
|
||||||
|
#define PACKAGE "tuxmath"
|
||||||
|
#define VERSION "2.0.1"
|
||||||
1
src/app/tuxmath/t4k/SDL_ttf.h
Normal file
1
src/app/tuxmath/t4k/SDL_ttf.h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#include <SDL/SDL_ttf.h>
|
||||||
6
src/app/tuxmath/t4k/config.h
Normal file
6
src/app/tuxmath/t4k/config.h
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#include <limits.h> /* definition of PATH_MAX */
|
||||||
|
|
||||||
|
#define HAVE_STDINT_H 1
|
||||||
|
#define HAVE_SCANDIR 1
|
||||||
|
|
||||||
|
#define PACKAGE_STRING "Tux4Kids-Common 0.1.1"
|
||||||
37
src/app/tuxmath/target.mk
Normal file
37
src/app/tuxmath/target.mk
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
TARGET := tuxmath
|
||||||
|
|
||||||
|
TUXMATH_DIR := $(call select_from_ports,tuxmath)/src/app/tuxmath
|
||||||
|
|
||||||
|
LIBS += libc libm sdl sdl_image sdl_mixer sdl_ttf sdl_net tuxmath_t4k
|
||||||
|
|
||||||
|
INC_DIR += $(REP_DIR)/src/app/tuxmath \
|
||||||
|
$(TUXMATH_DIR)/t4k/src
|
||||||
|
|
||||||
|
CC_OPT += -DDATA_PREFIX=\"/data\" \
|
||||||
|
-DLOCALEDIR=\"/locale\"
|
||||||
|
|
||||||
|
SRC_C := tuxmath.c setup.c titlescreen.c menu.c menu_lan.c game.c \
|
||||||
|
factoroids.c fileops_media.c options.c credits.c highscore.c \
|
||||||
|
audio.c network.c mathcards.c campaign.c multiplayer.c fileops.c \
|
||||||
|
SDL_rotozoom.c lessons.c server.c
|
||||||
|
|
||||||
|
#
|
||||||
|
# Disable sound during the game because the current version of sdl_mixer is
|
||||||
|
# compiled w/o ogg/mod, which produces a stream of error messages.
|
||||||
|
#
|
||||||
|
CC_OPT_game := -DNOSOUND
|
||||||
|
|
||||||
|
# suppress build noise caused by warnings in 3rd-party code
|
||||||
|
CC_WARN = -Wno-address
|
||||||
|
|
||||||
|
vpath %.c $(TUXMATH_DIR)/src
|
||||||
|
|
||||||
|
# supply custom getenv implementation (tuxmath asks for HOME)
|
||||||
|
SRC_CC += getenv.cc
|
||||||
|
|
||||||
|
vpath getenv.cc $(REP_DIR)/src/app/numptyphysics
|
||||||
|
|
||||||
|
$(TARGET): tuxmath_data.tar
|
||||||
|
tuxmath_data.tar:
|
||||||
|
$(VERBOSE)cd $(TUXMATH_DIR); tar cf $(PWD)/bin/$@ data
|
||||||
|
$(VERBOSE)cd $(TUXMATH_DIR)/t4k; tar rf $(PWD)/bin/$@ data
|
||||||
Reference in New Issue
Block a user