games/egoboo: update to 2.8.1
This commit is contained in:
parent
3e48a34056
commit
5fe665bea0
@ -1,37 +1,55 @@
|
||||
# Created by: Jan Stocker <Jan.Stocker@t-online.de>
|
||||
|
||||
PORTNAME= egoboo
|
||||
PORTVERSION= 2.7.5
|
||||
PORTREVISION= 11
|
||||
PORTVERSION= 2.8.1
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= SF/${PORTNAME}/Linux%20Source%20Distro/${PORTVERSION}
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
||||
${DISTNAME:S/-/-data-/}${EXTRACT_SUFX}
|
||||
MASTER_SITES= SF/${PORTNAME}/Linux%20Source%20Distro/${PORTVERSION}%20(Stable)
|
||||
|
||||
MAINTAINER= amdmi3@FreeBSD.org
|
||||
COMMENT= 3D dungeon crawling adventure in the spirit of NetHack
|
||||
|
||||
LICENSE= GPLv3+
|
||||
LICENSE_FILE= ${WRKSRC}/license.txt
|
||||
|
||||
LIB_DEPENDS= libphysfs.so:devel/physfs \
|
||||
libenet.so:net/enet
|
||||
|
||||
USES= dos2unix gl gmake sdl
|
||||
USE_SDL= sdl ttf mixer image
|
||||
USE_GL= glu
|
||||
DOS2UNIX_GLOB= *.c
|
||||
USE_GL= gl glu
|
||||
DOS2UNIX_GLOB= Makefile *.c
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}/game
|
||||
MAKEFILE= Makefile.unix
|
||||
MAKE_ARGS= PREFIX="${STAGEDIR}${PREFIX}"
|
||||
PROJ_NAME= egoboo
|
||||
|
||||
PLIST_FILES= bin/${PORTNAME} libexec/${PORTNAME}
|
||||
BUILD_WRKSRC= ${WRKSRC}/src/game
|
||||
MAKE_ENV= PROJ_NAME=${PROJ_NAME}
|
||||
ALL_TARGET= ${PROJ_NAME}
|
||||
|
||||
ETCDIR= ${PREFIX}/etc/${PROJ_NAME}
|
||||
DATADIR= ${PREFIX}/share/${PROJ_NAME}
|
||||
|
||||
PORTDOCS= *
|
||||
PORTDATA= *
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|/usr/share/egoboo|${DATADIR}|g; \
|
||||
s|cp -a|cp -RPp|; s|/usr/libexec|${PREFIX}/libexec|' \
|
||||
${WRKSRC}/egoboo.sh
|
||||
DESKTOP_ENTRIES="Egoboo" \
|
||||
"" \
|
||||
"${DATADIR}/icon.bmp" \
|
||||
"${PROJ_NAME}" \
|
||||
"Game;AdventureGame;RolePlaying;" \
|
||||
""
|
||||
|
||||
post-install:
|
||||
@cd ${WRKDIR}/${DISTNAME:S/-/-data-/} && \
|
||||
${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PROJ_NAME} ${STAGEDIR}${PREFIX}/bin/
|
||||
@cd ${WRKSRC} && ${COPYTREE_SHARE} "basicdat modules" ${STAGEDIR}${DATADIR}/
|
||||
@${MKDIR} ${STAGEDIR}${ETCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/controls.txt ${STAGEDIR}${ETCDIR}/controls.txt.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/setup.txt ${STAGEDIR}${ETCDIR}/setup.txt.sample
|
||||
|
||||
do-install-DOCS-on:
|
||||
@cd ${WRKSRC} && ${COPYTREE_SHARE} "BUGS.txt Changelog.txt doc" \
|
||||
${STAGEDIR}${DOCSDIR} "-not -empty"
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,4 +1,3 @@
|
||||
SHA256 (egoboo-2.7.5.tar.gz) = 83af95f66b68afdf1b322dffa883f8568ca402f203257315ebacff6fc95ddb2b
|
||||
SIZE (egoboo-2.7.5.tar.gz) = 368781
|
||||
SHA256 (egoboo-data-2.7.5.tar.gz) = aa1455d285d28c1e7e584fac67438efe57b9dce9495ca860deb8069bed95500e
|
||||
SIZE (egoboo-data-2.7.5.tar.gz) = 64254746
|
||||
TIMESTAMP = 1611855459
|
||||
SHA256 (egoboo-2.8.1.tar.gz) = a2694187d28a7aadf4ca3b9b7a6c6dcd3bb03ec8f145435c744bb77afb5f4c26
|
||||
SIZE (egoboo-2.8.1.tar.gz) = 150029960
|
||||
|
@ -1,29 +0,0 @@
|
||||
--- Makefile.unix.orig 2008-01-02 00:35:35.000000000 +0300
|
||||
+++ Makefile.unix 2008-02-07 04:07:36.000000000 +0300
|
||||
@@ -1,5 +1,4 @@
|
||||
# note if you change the prefix also update egoboo.sh
|
||||
-PREFIX := /usr
|
||||
EGO_SRC := camera.c char.c Client.c Clock.c common-file.c configfile.c \
|
||||
egoboostrutil.c enchant.c Font.c game.c gltexture.c graphicfan.c \
|
||||
graphicmad.c graphic.c graphicprt.c id_normals.c input.c \
|
||||
@@ -12,15 +11,15 @@
|
||||
../enet/unix.c
|
||||
ENET_OBJ := ${ENET_SRC:.c=.o}
|
||||
|
||||
-SDL_CONF := sdl-config
|
||||
+SDL_CONF := ${SDL_CONFIG}
|
||||
SDLCONF_I := $(shell ${SDL_CONF} --cflags)
|
||||
SDLCONF_L := $(shell ${SDL_CONF} --libs)
|
||||
|
||||
-CC := gcc
|
||||
+CC ?= gcc
|
||||
OPT := -Os
|
||||
-INC := -I. -I.. ${SDLCONF_I}
|
||||
-CFLAGS := ${OPT} ${INC}
|
||||
-LDFLAGS := ${SDLCONF_L} -lSDL_ttf -lSDL_mixer -lSDL_image -lGL -lGLU
|
||||
+INC := -I. -I.. ${SDLCONF_I} -I${LOCALBASE}/include
|
||||
+CFLAGS += ${INC}
|
||||
+LDFLAGS := ${SDLCONF_L} -L${LOCALBASE}/lib -lSDL_ttf -lSDL_mixer -lSDL_image -lGL -lGLU -lm
|
||||
|
||||
EGO_BIN := egoboo
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- lin-file.c.orig 2019-06-15 14:41:01 UTC
|
||||
+++ lin-file.c
|
||||
@@ -8,7 +8,8 @@
|
||||
#include <glob.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
-#include <sys/dir.h>
|
||||
+#include <dirent.h>
|
||||
+#include <sys/syslimits.h>
|
||||
|
||||
//File Routines-----------------------------------------------------------
|
||||
void fs_init()
|
26
games/egoboo/files/patch-src_game_Makefile
Normal file
26
games/egoboo/files/patch-src_game_Makefile
Normal file
@ -0,0 +1,26 @@
|
||||
--- src/game/Makefile.orig 2021-01-28 17:44:39 UTC
|
||||
+++ src/game/Makefile
|
||||
@@ -32,18 +32,18 @@ SDLCONF_L := $(shell ${SDL_CONF} --libs)
|
||||
#---------------------
|
||||
# the compiler options
|
||||
|
||||
-CC := gcc
|
||||
-INC := -I. -I.. -I../enet/include ${SDLCONF_I} -I./extensions -I./file_formats -I./platform
|
||||
-LDFLAGS := ${SDLCONF_L} -L../enet/lib -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -lenet
|
||||
+CC ?= gcc
|
||||
+INC := -I. -I.. -isystem${LOCALBASE}/include ${SDLCONF_I} -I./extensions -I./file_formats -I./platform
|
||||
+LDFLAGS := ${SDLCONF_L} -L${LOCALBASE}/lib -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -lenet -lm
|
||||
|
||||
# use different options if the environmental variable PREFIX is defined
|
||||
ifdef ($(PREFIX),"")
|
||||
OPT := -Os -Wall
|
||||
else
|
||||
- OPT := -Os -Wall -DPREFIX=\"${PREFIX}\" -D_NIX_PREFIX
|
||||
+ OPT := -Wall -DPREFIX=\"${PREFIX}\" -D_NIX_PREFIX
|
||||
endif
|
||||
|
||||
-CFLAGS := ${OPT} ${INC}
|
||||
+CFLAGS += ${OPT} ${INC}
|
||||
|
||||
#------------------------------------
|
||||
# definitions of the target projects
|
11
games/egoboo/files/patch-src_game_file__formats_id_md2.c
Normal file
11
games/egoboo/files/patch-src_game_file__formats_id_md2.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/game/file_formats/id_md2.c.orig 2021-01-29 16:26:24 UTC
|
||||
+++ src/game/file_formats/id_md2.c
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "id_md2.h"
|
||||
#include "egoboo_vfs.h"
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
//--------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------
|
17
games/egoboo/files/patch-src_game_game.c
Normal file
17
games/egoboo/files/patch-src_game_game.c
Normal file
@ -0,0 +1,17 @@
|
||||
Fix controls (left acting as right and up as down)
|
||||
|
||||
Arith with booleans is a bad idea.
|
||||
|
||||
--- src/game/game.c.orig 2021-04-09 17:57:53 UTC
|
||||
+++ src/game/game.c
|
||||
@@ -2052,8 +2052,8 @@ void set_one_player_latch( const PLA_REF player )
|
||||
if (( CAM_TURN_GOOD == PCamera->turn_mode && 1 == local_numlpla ) ||
|
||||
!control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_CAMERA ) )
|
||||
{
|
||||
- joy_pos.x = ( control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_RIGHT ) - control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_LEFT ) );
|
||||
- joy_pos.y = ( control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_DOWN ) - control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_UP ) );
|
||||
+ joy_pos.x = ( (int)control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_RIGHT ) - (int)control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_LEFT ) );
|
||||
+ joy_pos.y = ( (int)control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_DOWN ) - (int)control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_UP ) );
|
||||
|
||||
if ( CAM_TURN_GOOD == PCamera->turn_mode &&
|
||||
1 == local_numlpla ) joy_pos.x = 0;
|
54
games/egoboo/files/patch-src_game_network.c
Normal file
54
games/egoboo/files/patch-src_game_network.c
Normal file
@ -0,0 +1,54 @@
|
||||
--- src/game/network.c.orig 2010-12-22 19:26:01 UTC
|
||||
+++ src/game/network.c
|
||||
@@ -173,7 +173,7 @@ void close_session()
|
||||
|
||||
for ( i = 0; i < numPeers; i++ )
|
||||
{
|
||||
-#if defined(ENET11)
|
||||
+#if 1
|
||||
enet_peer_disconnect( &net_myHost->peers[i], 0 );
|
||||
#else
|
||||
enet_peer_disconnect( &net_myHost->peers[i] );
|
||||
@@ -1519,7 +1519,7 @@ void listen_for_packets()
|
||||
// don't allow anyone to connect during the game session
|
||||
log_warning( "listen_for_packets: Client tried to connect during the game: %x:%u\n",
|
||||
event.peer->address.host, event.peer->address.port );
|
||||
-#if defined(ENET11)
|
||||
+#if 1
|
||||
enet_peer_disconnect( event.peer, 0 );
|
||||
#else
|
||||
enet_peer_disconnect( event.peer );
|
||||
@@ -1845,7 +1845,7 @@ int cl_joinGame( const char* hostname )
|
||||
log_info( "cl_joinGame: Creating client network connection... " );
|
||||
// Create my host thingamabober
|
||||
/// @todo Should I limit client bandwidth here?
|
||||
- net_myHost = enet_host_create( NULL, 1, 0, 0 );
|
||||
+ net_myHost = enet_host_create( NULL, 1, 0, 0, 0 );
|
||||
if ( NULL == net_myHost )
|
||||
{
|
||||
// can't create a network connection at all
|
||||
@@ -1861,7 +1861,7 @@ int cl_joinGame( const char* hostname )
|
||||
log_info( "cl_joinGame: Attempting to connect to %s:%d\n", hostname, NET_EGOBOO_PORT );
|
||||
enet_address_set_host( &address, hostname );
|
||||
address.port = NET_EGOBOO_PORT;
|
||||
- net_gameHost = enet_host_connect( net_myHost, &address, NET_EGOBOO_NUM_CHANNELS );
|
||||
+ net_gameHost = enet_host_connect( net_myHost, &address, NET_EGOBOO_NUM_CHANNELS, 0 );
|
||||
if ( NULL == net_gameHost )
|
||||
{
|
||||
log_info( "cl_joinGame: No available peers to create a connection!\n" );
|
||||
@@ -1904,7 +1904,7 @@ int sv_hostGame()
|
||||
address.port = NET_EGOBOO_PORT;
|
||||
|
||||
log_info( "sv_hostGame: Creating game on port %d\n", NET_EGOBOO_PORT );
|
||||
- net_myHost = enet_host_create( &address, MAX_PLAYER, 0, 0 );
|
||||
+ net_myHost = enet_host_create( &address, MAX_PLAYER, 0, 0, 0 );
|
||||
if ( NULL == net_myHost )
|
||||
{
|
||||
log_info( "sv_hostGame: Could not create network connection!\n" );
|
||||
@@ -2180,4 +2180,4 @@ player_t* chr_get_ppla( const CHR_REF ichr )
|
||||
if ( !VALID_PLA( iplayer ) ) return NULL;
|
||||
|
||||
return PlaStack.lst + iplayer;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
23
games/egoboo/files/patch-src_game_platform_file__linux.c
Normal file
23
games/egoboo/files/patch-src_game_platform_file__linux.c
Normal file
@ -0,0 +1,23 @@
|
||||
--- src/game/platform/file_linux.c.orig 2021-01-29 16:26:24 UTC
|
||||
+++ src/game/platform/file_linux.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <glob.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
-#include <sys/dir.h>
|
||||
+#include <sys/syslimits.h>
|
||||
#include "egoboo_mem.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------
|
||||
@@ -75,8 +75,8 @@ void sys_fs_init()
|
||||
// .rpm or .deb package.
|
||||
|
||||
- strncpy( linux_configPath, PREFIX "/etc/egoboo-2.x", SDL_arraysize( linux_configPath ) );
|
||||
- strncpy( linux_binaryPath, PREFIX "/games/", SDL_arraysize( linux_binaryPath ) );
|
||||
- strncpy( linux_dataPath, PREFIX "/share/games/egoboo-2.x", SDL_arraysize( linux_dataPath ) );
|
||||
+ strncpy( linux_configPath, PREFIX "/etc/egoboo", SDL_arraysize( linux_configPath ) );
|
||||
+ strncpy( linux_binaryPath, PREFIX "/bin/", SDL_arraysize( linux_binaryPath ) );
|
||||
+ strncpy( linux_dataPath, PREFIX "/share/egoboo", SDL_arraysize( linux_dataPath ) );
|
||||
#else
|
||||
// these are read-only directories
|
||||
strncpy( linux_configPath, "/etc/egoboo-2.x/", SDL_arraysize( linux_configPath ) );
|
3
games/egoboo/pkg-plist
Normal file
3
games/egoboo/pkg-plist
Normal file
@ -0,0 +1,3 @@
|
||||
bin/egoboo
|
||||
@sample %%ETCDIR%%/controls.txt.sample
|
||||
@sample %%ETCDIR%%/setup.txt.sample
|
Loading…
Reference in New Issue
Block a user