committed by
Norman Feske
parent
dc0367fd95
commit
2f4eeec662
39
lib/mk/abuse_imlib.mk
Normal file
39
lib/mk/abuse_imlib.mk
Normal file
@@ -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
|
||||||
1
ports/abuse.hash
Normal file
1
ports/abuse.hash
Normal file
@@ -0,0 +1 @@
|
|||||||
|
e018b9e6f6c836feba265069b84223b34adb268c
|
||||||
14
ports/abuse.port
Normal file
14
ports/abuse.port
Normal file
@@ -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
|
||||||
155
run/abuse.run
Normal file
155
run/abuse.run
Normal file
@@ -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 {
|
||||||
|
<policy label="ps2_drv"> <device name="PS2"/> </policy>
|
||||||
|
<policy label="usb_drv"> <pci class="USB"/> </policy>
|
||||||
|
<policy label="fb_drv"> <pci class="VGA"/> </policy>
|
||||||
|
<policy label="audio_drv"> <pci class="AUDIO"/> <pci class="HDAUDIO"/> </policy>}
|
||||||
|
}
|
||||||
|
|
||||||
|
append_platform_drv_build_components
|
||||||
|
|
||||||
|
build $build_components
|
||||||
|
|
||||||
|
create_boot_directory
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate config
|
||||||
|
#
|
||||||
|
|
||||||
|
append config {
|
||||||
|
<config>
|
||||||
|
<parent-provides>
|
||||||
|
<service name="CAP"/>
|
||||||
|
<service name="CPU"/>
|
||||||
|
<service name="IO_MEM"/>
|
||||||
|
<service name="IO_PORT"/>
|
||||||
|
<service name="IRQ"/>
|
||||||
|
<service name="LOG"/>
|
||||||
|
<service name="PD"/>
|
||||||
|
<service name="RAM"/>
|
||||||
|
<service name="RM"/>
|
||||||
|
<service name="ROM"/>
|
||||||
|
<service name="SIGNAL"/>
|
||||||
|
</parent-provides>
|
||||||
|
<default-route>
|
||||||
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
|
</default-route>}
|
||||||
|
|
||||||
|
append_if [have_spec sdl] config {
|
||||||
|
<start name="fb_sdl">
|
||||||
|
<resource name="RAM" quantum="4M"/>
|
||||||
|
<provides>
|
||||||
|
<service name="Input"/>
|
||||||
|
<service name="Framebuffer"/>
|
||||||
|
</provides>
|
||||||
|
<config width="640" height="480"/>
|
||||||
|
</start>}
|
||||||
|
|
||||||
|
append_platform_drv_config
|
||||||
|
|
||||||
|
append_if [have_spec vesa] config {
|
||||||
|
<start name="fb_drv">
|
||||||
|
<resource name="RAM" quantum="4M"/>
|
||||||
|
<provides><service name="Framebuffer"/></provides>
|
||||||
|
<config buffered="yes"> </config>
|
||||||
|
<config width="640" height="400"/>
|
||||||
|
</start>}
|
||||||
|
|
||||||
|
append_if [have_spec pl11x] config {
|
||||||
|
<start name="fb_drv">
|
||||||
|
<resource name="RAM" quantum="2M"/>
|
||||||
|
<provides><service name="Framebuffer"/></provides>
|
||||||
|
</start>}
|
||||||
|
|
||||||
|
append_if [have_spec ps2] config {
|
||||||
|
<start name="ps2_drv">
|
||||||
|
<resource name="RAM" quantum="1M"/>
|
||||||
|
<provides><service name="Input"/></provides>
|
||||||
|
</start>}
|
||||||
|
|
||||||
|
append config {
|
||||||
|
<start name="audio_drv">
|
||||||
|
<resource name="RAM" quantum="6M"/>
|
||||||
|
<provides><service name="Audio_out"/></provides>
|
||||||
|
</start>
|
||||||
|
<start name="timer">
|
||||||
|
<resource name="RAM" quantum="1M"/>
|
||||||
|
<provides><service name="Timer"/></provides>
|
||||||
|
</start>
|
||||||
|
<start name="abuse">
|
||||||
|
<resource name="RAM" quantum="128M"/>
|
||||||
|
<config>
|
||||||
|
<sdl_audio_volume value="100"/>
|
||||||
|
<libc stdout="/dev/log" stderr="/dev/log">
|
||||||
|
<vfs>
|
||||||
|
<inline name="abuserc">
|
||||||
|
; Location of the datafiles
|
||||||
|
datadir=/data
|
||||||
|
</inline>
|
||||||
|
<dir name="data">
|
||||||
|
<ram/>
|
||||||
|
<tar name="abuse.tar"/>
|
||||||
|
</dir>
|
||||||
|
<dir name="dev"> <log/> </dir>
|
||||||
|
</vfs>
|
||||||
|
</libc>
|
||||||
|
</config>
|
||||||
|
</start>
|
||||||
|
</config>}
|
||||||
|
|
||||||
|
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
|
||||||
129
src/app/abuse/config.h
Normal file
129
src/app/abuse/config.h
Normal file
@@ -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 <dirent.h> header file, and it defines `DIR'.
|
||||||
|
*/
|
||||||
|
#define HAVE_DIRENT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#define HAVE_DLFCN_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <fcntl.h> 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 <inttypes.h> header file. */
|
||||||
|
#define HAVE_INTTYPES_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <malloc.h> header file. */
|
||||||
|
#define HAVE_MALLOC_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#define HAVE_MEMORY_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||||
|
/* #undef HAVE_NDIR_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/in.h> 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 <SDL/SDL_mixer.h> header file. */
|
||||||
|
#define HAVE_SDL_SDL_MIXER_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#define HAVE_STDINT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#define HAVE_STRINGS_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> 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 <sys/dir.h> header file, and it defines `DIR'.
|
||||||
|
*/
|
||||||
|
/* #undef HAVE_SYS_DIR_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||||
|
#define HAVE_SYS_IOCTL_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||||
|
*/
|
||||||
|
/* #undef HAVE_SYS_NDIR_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#define HAVE_SYS_STAT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#define HAVE_SYS_TIME_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> 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
|
||||||
36
src/app/abuse/patch
Normal file
36
src/app/abuse/patch
Normal file
@@ -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 <stdlib.h>
|
||||||
|
+#include <stdint.h>
|
||||||
|
|
||||||
|
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 <string.h>
|
||||||
|
# include <sys/time.h>
|
||||||
|
# include <sys/ipc.h>
|
||||||
|
-# include <sys/shm.h>
|
||||||
|
# include <sys/socket.h>
|
||||||
|
# include <unistd.h>
|
||||||
|
# ifdef HAVE_BSTRING_H
|
||||||
53
src/app/abuse/target.mk
Normal file
53
src/app/abuse/target.mk
Normal file
@@ -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 .
|
||||||
Reference in New Issue
Block a user