From 272fbc2c0c34d20c6cb48aad82239a7a454713e2 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 5 Feb 2015 21:39:50 +0100 Subject: [PATCH] Ltris - a nice Tetris clone --- ports/ltris.hash | 1 + ports/ltris.port | 7 ++ run/ltris.run | 149 ++++++++++++++++++++++++++++++++++++++++ src/app/ltris/target.mk | 19 +++++ 4 files changed, 176 insertions(+) create mode 100644 ports/ltris.hash create mode 100644 ports/ltris.port create mode 100644 run/ltris.run create mode 100644 src/app/ltris/target.mk diff --git a/ports/ltris.hash b/ports/ltris.hash new file mode 100644 index 0000000..aa469aa --- /dev/null +++ b/ports/ltris.hash @@ -0,0 +1 @@ +847f5dccf16e2d2ddacfb784f75acb4ad40fb499 diff --git a/ports/ltris.port b/ports/ltris.port new file mode 100644 index 0000000..57e17d2 --- /dev/null +++ b/ports/ltris.port @@ -0,0 +1,7 @@ +LICENSE := GPLv2 +VERSION := 1.0.19 +DOWNLOADS := ltris.archive + +URL(ltris) := http://downloads.sourceforge.net/project/lgames/ltris/ltris-$(VERSION).tar.gz +SHA(ltris) := 6f9b0f3ff2de73e55d4e880b502c925f7168b2b6 +DIR(ltris) := src/app/ltris diff --git a/run/ltris.run b/run/ltris.run new file mode 100644 index 0000000..e020008 --- /dev/null +++ b/run/ltris.run @@ -0,0 +1,149 @@ +# +# Build +# + +set build_components { + core init + drivers/timer + app/ltris server/ram_fs + drivers/framebuffer drivers/pci drivers/input +} + +lappend_if [have_spec usb] build_components drivers/usb +lappend_if [have_spec platform_rpi] build_components drivers/platform + +build $build_components + +create_boot_directory + +# +# Generate config +# + +append config { + + + + + + + + + + + + + + + + + } + +append_if [have_spec sdl] config { + + + + + + + } + +append_if [have_spec pci] config { + + + + } + +append_if [have_spec platform_rpi] config { + + + + + } + +append_if [have_spec framebuffer] config { + + + + + } + +append_if [have_spec ps2] config { + + + + } + +append_if [expr ![have_spec ps2] && [have_spec usb]] config { + + + + + } + +append config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +install_config $config + +# +# Boot modules +# + +# generic modules +set boot_modules { + core init + timer ram_fs + ltris + ld.lib.so + libc.lib.so + libm.lib.so + pthread.lib.so + sdl_mixer.lib.so + sdl.lib.so + stdcxx.lib.so + zlib.lib.so + ltris_data.tar +} + +# platform-specific modules +lappend_if [have_spec linux] boot_modules fb_sdl +lappend_if [have_spec pci] boot_modules pci_drv +lappend_if [have_spec framebuffer] boot_modules fb_drv +lappend_if [have_spec ps2] boot_modules ps2_drv +lappend_if [have_spec usb] boot_modules usb_drv +lappend_if [have_spec platform_rpi] boot_modules platform_drv + +build_boot_image $boot_modules + +append qemu_args " -m 256 " + +run_genode_until forever diff --git a/src/app/ltris/target.mk b/src/app/ltris/target.mk new file mode 100644 index 0000000..e8cc51f --- /dev/null +++ b/src/app/ltris/target.mk @@ -0,0 +1,19 @@ +TARGET = ltris +LIBS = libc stdcxx sdl sdl_mixer + +LTRIS_DIR := $(call select_from_ports,ltris)/src/app/ltris + +# determine version by looking at the configure script +VERSION := $(shell grep "^ VERSION" $(LTRIS_DIR)/configure | sed "s/.*=//") + +CC_OPT += -DHI_DIR=\"/var\" -DSRC_DIR=\"/\" \ + -DVERSION=\"$(VERSION)\" + +INC_DIR += $(LTRIS_DIR)/src +SRC_C := $(notdir $(wildcard $(LTRIS_DIR)/src/*.c)) + +vpath %.c $(LTRIS_DIR)/src + +$(TARGET): ltris_data.tar +ltris_data.tar: + $(VERBOSE)cd $(LTRIS_DIR)/src; tar cf $(PWD)/bin/$@ gfx sounds figures