From owner-dev-commits-ports-all@freebsd.org Fri Apr 9 19:14:48 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 886725C5C87; Fri, 9 Apr 2021 19:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FH79h14Zjz3nJY; Fri, 9 Apr 2021 19:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D34B523796; Fri, 9 Apr 2021 19:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 139JElia051500; Fri, 9 Apr 2021 19:14:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 139JElfI051499; Fri, 9 Apr 2021 19:14:47 GMT (envelope-from git) Date: Fri, 9 Apr 2021 19:14:47 GMT Message-Id: <202104091914.139JElfI051499@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dmitry Marakasov Subject: git: 5fe665bea083 - main - games/egoboo: update to 2.8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: amdmi3 X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fe665bea0830f15788dfbf75fecf15aefc45668 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2021 19:14:48 -0000 The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=5fe665bea0830f15788dfbf75fecf15aefc45668 commit 5fe665bea0830f15788dfbf75fecf15aefc45668 Author: Dmitry Marakasov AuthorDate: 2021-04-08 22:23:45 +0000 Commit: Dmitry Marakasov CommitDate: 2021-04-09 19:14:22 +0000 games/egoboo: update to 2.8.1 --- games/egoboo/Makefile | 58 ++++++++++++++-------- games/egoboo/distinfo | 7 ++- games/egoboo/files/patch-game-Makefile.unix | 29 ----------- games/egoboo/files/patch-game-lin-file.c | 12 ----- games/egoboo/files/patch-src_game_Makefile | 26 ++++++++++ .../files/patch-src_game_file__formats_id_md2.c | 11 ++++ games/egoboo/files/patch-src_game_game.c | 17 +++++++ games/egoboo/files/patch-src_game_network.c | 54 ++++++++++++++++++++ .../files/patch-src_game_platform_file__linux.c | 23 +++++++++ games/egoboo/pkg-plist | 3 ++ 10 files changed, 175 insertions(+), 65 deletions(-) diff --git a/games/egoboo/Makefile b/games/egoboo/Makefile index 6f1bb8706b54..e199439132c2 100644 --- a/games/egoboo/Makefile +++ b/games/egoboo/Makefile @@ -1,37 +1,55 @@ # Created by: Jan Stocker 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} -PORTDATA= * +BUILD_WRKSRC= ${WRKSRC}/src/game +MAKE_ENV= PROJ_NAME=${PROJ_NAME} +ALL_TARGET= ${PROJ_NAME} -post-patch: - @${REINPLACE_CMD} -e 's|/usr/share/egoboo|${DATADIR}|g; \ - s|cp -a|cp -RPp|; s|/usr/libexec|${PREFIX}/libexec|' \ - ${WRKSRC}/egoboo.sh +ETCDIR= ${PREFIX}/etc/${PROJ_NAME} +DATADIR= ${PREFIX}/share/${PROJ_NAME} + +PORTDOCS= * +PORTDATA= * -post-install: - @cd ${WRKDIR}/${DISTNAME:S/-/-data-/} && \ - ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/ - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME} +DESKTOP_ENTRIES="Egoboo" \ + "" \ + "${DATADIR}/icon.bmp" \ + "${PROJ_NAME}" \ + "Game;AdventureGame;RolePlaying;" \ + "" + +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 diff --git a/games/egoboo/distinfo b/games/egoboo/distinfo index 31f2be846ec5..14bf17c4f166 100644 --- a/games/egoboo/distinfo +++ b/games/egoboo/distinfo @@ -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 diff --git a/games/egoboo/files/patch-game-Makefile.unix b/games/egoboo/files/patch-game-Makefile.unix deleted file mode 100644 index c88312ac977e..000000000000 --- a/games/egoboo/files/patch-game-Makefile.unix +++ /dev/null @@ -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 - diff --git a/games/egoboo/files/patch-game-lin-file.c b/games/egoboo/files/patch-game-lin-file.c deleted file mode 100644 index 349573027a8f..000000000000 --- a/games/egoboo/files/patch-game-lin-file.c +++ /dev/null @@ -1,12 +0,0 @@ ---- lin-file.c.orig 2019-06-15 14:41:01 UTC -+++ lin-file.c -@@ -8,7 +8,8 @@ - #include - #include - #include --#include -+#include -+#include - - //File Routines----------------------------------------------------------- - void fs_init() diff --git a/games/egoboo/files/patch-src_game_Makefile b/games/egoboo/files/patch-src_game_Makefile new file mode 100644 index 000000000000..7501270c34b2 --- /dev/null +++ b/games/egoboo/files/patch-src_game_Makefile @@ -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 diff --git a/games/egoboo/files/patch-src_game_file__formats_id_md2.c b/games/egoboo/files/patch-src_game_file__formats_id_md2.c new file mode 100644 index 000000000000..2e5dafa4f086 --- /dev/null +++ b/games/egoboo/files/patch-src_game_file__formats_id_md2.c @@ -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 ++#include + + //-------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------------------------- diff --git a/games/egoboo/files/patch-src_game_game.c b/games/egoboo/files/patch-src_game_game.c new file mode 100644 index 000000000000..2bc724211b4e --- /dev/null +++ b/games/egoboo/files/patch-src_game_game.c @@ -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; diff --git a/games/egoboo/files/patch-src_game_network.c b/games/egoboo/files/patch-src_game_network.c new file mode 100644 index 000000000000..8db876335afd --- /dev/null +++ b/games/egoboo/files/patch-src_game_network.c @@ -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 ++} diff --git a/games/egoboo/files/patch-src_game_platform_file__linux.c b/games/egoboo/files/patch-src_game_platform_file__linux.c new file mode 100644 index 000000000000..98473e756eba --- /dev/null +++ b/games/egoboo/files/patch-src_game_platform_file__linux.c @@ -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 + #include + #include +-#include ++#include + #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 ) ); diff --git a/games/egoboo/pkg-plist b/games/egoboo/pkg-plist new file mode 100644 index 000000000000..df0a527557fb --- /dev/null +++ b/games/egoboo/pkg-plist @@ -0,0 +1,3 @@ +bin/egoboo +@sample %%ETCDIR%%/controls.txt.sample +@sample %%ETCDIR%%/setup.txt.sample