diff --git a/lib/mk/abuse_imlib.mk b/lib/mk/abuse_imlib.mk new file mode 100644 index 0000000..630ed69 --- /dev/null +++ b/lib/mk/abuse_imlib.mk @@ -0,0 +1,39 @@ +ABUSE_SRC := $(call select_from_ports,abuse)/src/app/abuse/src + +LIBS += libc stdcxx sdl_image + +SRC_CC := \ + dprint.cpp \ + filesel.cpp \ + filter.cpp \ + fonts.cpp \ + guistat.cpp \ + image.cpp \ + include.cpp \ + input.cpp \ + jrand.cpp \ + jwindow.cpp \ + keys.cpp \ + linked.cpp \ + palette.cpp \ + pcxread.cpp \ + pmenu.cpp \ + scroller.cpp \ + specs.cpp \ + sprite.cpp \ + status.cpp \ + supmorph.cpp \ + tools.cpp \ + transimage.cpp \ + video.cpp + +INC_DIR += $(ABUSE_SRC)/imlib $(ABUSE_SRC) + +vpath %.cpp $(ABUSE_SRC)/imlib + +CC_WARN += \ + -Wno-unused-but-set-variable \ + -Wno-delete-non-virtual-dtor \ + -Wno-unused-but-set-variable \ + -Wno-unused-function \ + -Wno-narrowing \ No newline at end of file diff --git a/ports/abuse.hash b/ports/abuse.hash new file mode 100644 index 0000000..b5b71d4 --- /dev/null +++ b/ports/abuse.hash @@ -0,0 +1 @@ +e018b9e6f6c836feba265069b84223b34adb268c diff --git a/ports/abuse.port b/ports/abuse.port new file mode 100644 index 0000000..a0270e1 --- /dev/null +++ b/ports/abuse.port @@ -0,0 +1,14 @@ +LICENSE := WTFPL GPL2 +VERSION := 0.8 +DOWNLOADS := abuse.archive + +# Backup URL +# /ipfs/QmYej8uE4Zv8wKVTReYGofEYVJvfdDdsbHPSeSkRi4dq58/abuse-0.8.tar.gz + +URL(abuse) := http://abuse.zoy.org/raw-attachment/wiki/download/abuse-$(VERSION).tar.gz +SHA(abuse) := 12fea968a1494338ad71c6ec24954f3eef56826a +DIR(abuse) := src/app/abuse + +PATCHES := src/app/abuse/patch + +PATCH_OPT := -p1 -d src/app/abuse diff --git a/run/abuse.run b/run/abuse.run new file mode 100644 index 0000000..f3fbc76 --- /dev/null +++ b/run/abuse.run @@ -0,0 +1,155 @@ +# +# Build +# + +set build_components { + core init + drivers/audio + drivers/framebuffer + drivers/input + drivers/timer + app/abuse +} + +source ${genode_dir}/repos/base/run/platform_drv.inc +# override default platform driver policy +proc platform_drv_policy {} { + return { + + + + } +} + +append_platform_drv_build_components + +build $build_components + +create_boot_directory + +# +# Generate config +# + +append config { + + + + + + + + + + + + + + + + + } + +append_if [have_spec sdl] config { + + + + + + + + } + +append_platform_drv_config + +append_if [have_spec vesa] config { + + + + + + } + +append_if [have_spec pl11x] config { + + + + } + +append_if [have_spec ps2] config { + + + + } + +append config { + + + + + + + + + + + + + + + +; Location of the datafiles +datadir=/data + + + + + + + + + + +} + +install_config $config + +# +# Boot modules +# + +file copy -force app/abuse/abuse.tar bin + +# generic modules +set boot_modules { + core init + audio_drv + jpeg.lib.so + ld.lib.so + libc.lib.so + libm.lib.so + libpng.lib.so + pthread.lib.so + sdl_image.lib.so + sdl.lib.so + sdl_mixer.lib.so + sdl_net.lib.so + stdcxx.lib.so + timer + zlib.lib.so + abuse abuse.tar +} + +# platform-specific modules +lappend_if [have_spec linux] boot_modules fb_sdl +lappend_if [have_spec vesa] boot_modules fb_drv +lappend_if [have_spec ps2] boot_modules ps2_drv +lappend_if [have_spec pl11x] boot_modules fb_drv + +append_platform_drv_boot_modules + +build_boot_image $boot_modules + +append qemu_args " -m 256 -soundhw es1370 " + +run_genode_until forever diff --git a/src/app/abuse/config.h b/src/app/abuse/config.h new file mode 100644 index 0000000..cc16e9c --- /dev/null +++ b/src/app/abuse/config.h @@ -0,0 +1,129 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 to activate debug */ +/* #undef HAVE_DEBUG */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the `on_exit' function. */ +#define HAVE_ON_EXIT 1 + +/* Define to 1 to activate final release */ +/* #undef HAVE_RELEASE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SDL_SDL_MIXER_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "abuse" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "abuse" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "abuse 0.8" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "abuse" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.8" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "0.8" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif diff --git a/src/app/abuse/patch b/src/app/abuse/patch new file mode 100644 index 0000000..e1f5b2f --- /dev/null +++ b/src/app/abuse/patch @@ -0,0 +1,36 @@ +diff -ur abuse-0.8/src/imlib/transimage.cpp abuse-dummy/src/app/abuse/src/imlib/transimage.cpp +--- abuse-0.8/src/imlib/transimage.cpp 2011-05-06 11:46:43.000000000 +0200 ++++ abuse-dummy/src/app/abuse/src/imlib/transimage.cpp 2015-09-07 09:30:30.271941376 +0200 +@@ -168,10 +168,6 @@ + if (!datap) + return; // if ClipToLine says nothing to draw, return + +- CONDITION(N == BLEND && pos.y >= bpos.y +- && pos.y + ysteps < bpos.y + blend->Size().y + 1, +- "Blend doesn't fit on TransImage"); +- + if (N == FADE || N == FADE_TINT || N == BLEND) + paddr = (uint8_t *)pal->addr(); + +diff -ur abuse-0.8/src/intsect.cpp abuse-dummy/src/app/abuse/src/intsect.cpp +--- abuse-0.8/src/intsect.cpp 2011-05-02 13:55:06.000000000 +0200 ++++ abuse-dummy/src/app/abuse/src/intsect.cpp 2015-09-07 09:31:33.671940250 +0200 +@@ -13,6 +13,7 @@ + #endif + + #include ++#include + + void pushback(int32_t x1,int32_t y1,int32_t &x2,int32_t &y2, + int32_t xp1, int32_t yp1, int32_t xp2, int32_t yp2, int xdir, int ydir, int inside) +diff -ur abuse-0.8/src/net/tcpip.h abuse-dummy/src/app/abuse/src/net/tcpip.h +--- abuse-0.8/src/net/tcpip.h 2011-05-02 13:55:06.000000000 +0200 ++++ abuse-dummy/src/app/abuse/src/net/tcpip.h 2015-09-07 09:31:10.831940656 +0200 +@@ -27,7 +27,6 @@ + # include + # include + # include +-# include + # include + # include + # ifdef HAVE_BSTRING_H diff --git a/src/app/abuse/target.mk b/src/app/abuse/target.mk new file mode 100644 index 0000000..4f24147 --- /dev/null +++ b/src/app/abuse/target.mk @@ -0,0 +1,53 @@ +TARGET := abuse + +ABUSE_DIR := $(call select_from_ports,abuse)/src/app/abuse +ABUSE_SRC := $(ABUSE_DIR)/src + +SRC_CC := \ + $(notdir $(wildcard $(ABUSE_SRC)/*.cpp)) \ + $(notdir $(wildcard $(ABUSE_SRC)/lol/*.cpp)) \ + $(notdir $(wildcard $(ABUSE_SRC)/ui/*.cpp)) \ + $(notdir $(wildcard $(ABUSE_SRC)/net/*.cpp)) \ + $(notdir $(wildcard $(ABUSE_SRC)/lisp/*.cpp)) + + +SDLPORT_SRC_CC = $(notdir $(wildcard $(ABUSE_SRC)/sdlport/*.cpp)) + +SRC_CC += $(SDLPORT_SRC_CC) + +vpath %.cpp $(ABUSE_SRC) +vpath %.cpp $(ABUSE_SRC)/lol +vpath %.cpp $(ABUSE_SRC)/ui +vpath %.cpp $(ABUSE_SRC)/lisp +vpath %.cpp $(ABUSE_SRC)/net +vpath %.cpp $(ABUSE_SRC)/sdlport + +INC_DIR += $(PRG_DIR) \ + $(ABUSE_SRC) \ + $(ABUSE_SRC)/imlib \ + $(ABUSE_SRC)/lisp \ + $(ABUSE_SRC)/lol \ + $(ABUSE_SRC)/net \ + $(ABUSE_SRC)/ui + +LIBS += abuse_imlib libc stdcxx sdl sdl_image sdl_mixer sdl_net + +CC_WARN += \ + -Wno-unused-but-set-variable \ + -Wno-delete-non-virtual-dtor \ + -Wno-unused-but-set-variable \ + -Wno-unused-function \ + -Wno-narrowing + +CC_OPT += \ + -DHAVE_CONFIG_H \ + -DNO_CHECK \ + -DASSETDIR=\"$(ABUSE_DIR)/data\" \ + -D_GNU_SOURCE=1 + +.PHONY: abuse.tar + +$(TARGET): abuse.tar + +abuse.tar: + $(VERBOSE) tar cf $@ -C $(ABUSE_DIR)/data . \ No newline at end of file