port of Abuse

http://abuse.zoy.org/

Fixes #3
This commit is contained in:
Emery Hemingway
2015-09-07 09:37:17 +02:00
committed by Norman Feske
parent dc0367fd95
commit 2f4eeec662
7 changed files with 427 additions and 0 deletions

129
src/app/abuse/config.h Normal file
View 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
View 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
View 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 .