* [gentoo-commits] repo/gentoo:master commit in: games-rpg/egoboo/, games-rpg/egoboo/files/
@ 2021-06-08 19:42 Ionen Wolkens
0 siblings, 0 replies; 2+ messages in thread
From: Ionen Wolkens @ 2021-06-08 19:42 UTC (permalink / raw
To: gentoo-commits
commit: cdf85e47c763e8c81cafa24b1c9a0f880cd208cb
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 8 17:39:54 2021 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Jun 8 19:31:54 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdf85e47
games-rpg/egoboo: rebase patch to drop edos2unix
edos2unix was only to accomodate a patch with wrong line terminators.
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
games-rpg/egoboo/egoboo-2.8.1-r1.ebuild | 5 +-
games-rpg/egoboo/files/egoboo-2.8.1-gentoo.patch | 93 ++++++++++--------------
2 files changed, 38 insertions(+), 60 deletions(-)
diff --git a/games-rpg/egoboo/egoboo-2.8.1-r1.ebuild b/games-rpg/egoboo/egoboo-2.8.1-r1.ebuild
index f1770edacd1..13cf1806ff6 100644
--- a/games-rpg/egoboo/egoboo-2.8.1-r1.ebuild
+++ b/games-rpg/egoboo/egoboo-2.8.1-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-inherit desktop edos2unix
+inherit desktop
DESCRIPTION="A 3d dungeon crawling adventure in the spirit of NetHack"
HOMEPAGE="http://egoboo.sourceforge.net/"
@@ -29,9 +29,6 @@ PATCHES=(
)
src_prepare() {
- edos2unix src/game/platform/file_linux.c \
- src/game/network.c \
- src/game/Makefile
default
sed -i \
-e "s:@GENTOO_CONFDIR@:/etc/${PN}:" \
diff --git a/games-rpg/egoboo/files/egoboo-2.8.1-gentoo.patch b/games-rpg/egoboo/files/egoboo-2.8.1-gentoo.patch
index 2f1205a4511..36e8adf6dc7 100644
--- a/games-rpg/egoboo/files/egoboo-2.8.1-gentoo.patch
+++ b/games-rpg/egoboo/files/egoboo-2.8.1-gentoo.patch
@@ -1,56 +1,37 @@
---- a/src/game/platform/file_linux.c 2012-04-29 21:45:29.627419281 +0200
-+++ b/src/game/platform/file_linux.c 2012-04-29 21:45:29.628419211 +0200
-@@ -79,9 +79,9 @@
- strncpy( linux_dataPath, PREFIX "/share/games/egoboo-2.x", SDL_arraysize( linux_dataPath ) );
- #else
- // these are read-only directories
-- strncpy( linux_configPath, "/etc/egoboo-2.x/", SDL_arraysize( linux_configPath ) );
-+ strncpy( linux_configPath, "@GENTOO_CONFDIR@", SDL_arraysize( linux_configPath ) );
- strncpy( linux_binaryPath, "/games/", SDL_arraysize( linux_binaryPath ) );
-- strncpy( linux_dataPath, "/share/games/egoboo-2.x/", SDL_arraysize( linux_dataPath ) );
-+ strncpy( linux_dataPath, "@GENTOO_DATADIR@", SDL_arraysize( linux_dataPath ) );
- #endif
-
- // the log file cannot be started until there is a user data path to dump the file into
---- a/src/game/network.c 2012-04-29 20:14:31.482179973 +0200
-+++ b/src/game/network.c 2012-04-29 20:14:52.077730184 +0200
-@@ -37,7 +37,7 @@
- #include "egoboo_setup.h"
- #include "egoboo.h"
-
--#include "enet/enet.h"
-+#include <enet/enet.h>
- #include "file_common.h"
-
- #include <stdarg.h>
---- a/src/game/Makefile 2012-04-29 20:17:09.303070070 +0200
-+++ b/src/game/Makefile 2012-04-29 20:18:21.047023847 +0200
-@@ -33,8 +33,7 @@
- # 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
-+INC := -I. -I.. ${SDLCONF_I} -I./extensions -I./file_formats -I./platform
-+LDLIBS := ${SDLCONF_L} -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -lenet -lm
-
- # use different options if the environmental variable PREFIX is defined
- ifdef ($(PREFIX),"")
-@@ -43,7 +43,7 @@
- OPT := -Os -Wall -DPREFIX=\"${PREFIX}\" -D_NIX_PREFIX
- endif
-
--CFLAGS := ${OPT} ${INC}
-+CFLAGS += ${INC} -DENET11
-
- #------------------------------------
- # definitions of the target projects
-@@ -52,7 +52,7 @@
- all: ${EGO_BIN}
-
- ${EGO_BIN}: ${EGO_OBJ}
-- ${CC} -o $@ $^ ${LDFLAGS} ${CFLAGS}
-+ ${CC} -o $@ $^ ${LDFLAGS} ${CFLAGS} ${LDLIBS}
-
- clean:
- rm -f ${ENET_OBJ} ${EGO_OBJ} ${EGO_BIN}
+--- a/src/game/Makefile
++++ b/src/game/Makefile
+@@ -34,5 +34,4 @@
+
+-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
++INC := -I. -I.. ${SDLCONF_I} -I./extensions -I./file_formats -I./platform
++LDLIBS := ${SDLCONF_L} -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -lenet -lm
+
+@@ -45,3 +44,3 @@
+
+-CFLAGS := ${OPT} ${INC}
++CFLAGS += ${INC} -DENET11
+
+@@ -55,3 +54,3 @@
+ ${EGO_BIN}: ${EGO_OBJ}
+- ${CC} -o $@ $^ ${LDFLAGS} ${CFLAGS}
++ ${CC} -o $@ $^ ${LDFLAGS} ${CFLAGS} ${LDLIBS}
+
+--- a/src/game/network.c
++++ b/src/game/network.c
+@@ -39,3 +39,3 @@
+
+-#include "enet/enet.h"
++#include <enet/enet.h>
+ #include "file_common.h"
+--- a/src/game/platform/file_linux.c
++++ b/src/game/platform/file_linux.c
+@@ -81,5 +81,5 @@
+ // these are read-only directories
+- strncpy( linux_configPath, "/etc/egoboo-2.x/", SDL_arraysize( linux_configPath ) );
++ strncpy( linux_configPath, "@GENTOO_CONFDIR@", SDL_arraysize( linux_configPath ) );
+ strncpy( linux_binaryPath, "/games/", SDL_arraysize( linux_binaryPath ) );
+- strncpy( linux_dataPath, "/share/games/egoboo-2.x/", SDL_arraysize( linux_dataPath ) );
++ strncpy( linux_dataPath, "@GENTOO_DATADIR@", SDL_arraysize( linux_dataPath ) );
+ #endif
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-rpg/egoboo/, games-rpg/egoboo/files/
@ 2021-06-08 19:42 Ionen Wolkens
0 siblings, 0 replies; 2+ messages in thread
From: Ionen Wolkens @ 2021-06-08 19:42 UTC (permalink / raw
To: gentoo-commits
commit: 1697cc49c1dff7cfeff0a20faea32d197903b516
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Thu Sep 10 16:27:27 2020 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Jun 8 19:31:55 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1697cc49
games-rpg/egoboo: migrate to enet-1.3 support
Added patch that adapts package to use enet 1.3 API.
Closes: https://bugs.gentoo.org/628038
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
games-rpg/egoboo/egoboo-2.8.1-r2.ebuild | 57 ++++++++++++++++++++++
games-rpg/egoboo/files/egoboo-2.8.1-enet-1.3.patch | 21 ++++++++
2 files changed, 78 insertions(+)
diff --git a/games-rpg/egoboo/egoboo-2.8.1-r2.ebuild b/games-rpg/egoboo/egoboo-2.8.1-r2.ebuild
new file mode 100644
index 00000000000..0ee1e0999c4
--- /dev/null
+++ b/games-rpg/egoboo/egoboo-2.8.1-r2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit desktop
+
+DESCRIPTION="A 3d dungeon crawling adventure in the spirit of NetHack"
+HOMEPAGE="http://egoboo.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ dev-games/physfs
+ media-libs/libsdl[joystick,video]
+ media-libs/sdl-image
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-ttf
+ net-libs/enet:1.3=
+ virtual/glu
+ virtual/opengl"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/${P}-enet-1.3.patch
+)
+
+src_prepare() {
+ default
+ sed -i \
+ -e "s:@GENTOO_CONFDIR@:/etc/${PN}:" \
+ -e "s:@GENTOO_DATADIR@:/usr/share/${PN}:" \
+ src/game/platform/file_linux.c || die "sed failed"
+ rm -rf src/enet || die
+}
+
+src_compile() {
+ emake -C src/game PROJ_NAME=egoboo-2.x
+}
+
+src_install() {
+ dodoc BUGS.txt Changelog.txt doc/*.txt doc/*.pdf
+
+ insinto /usr/share/${PN}
+ doins -r basicdat modules
+ insinto /etc/${PN}
+ doins -r controls.txt setup.txt
+
+ newbin src/game/egoboo-2.x ${PN}
+
+ newicon basicdat/icon.bmp ${PN}.bmp
+ make_desktop_entry ${PN} Egoboo /usr/share/pixmaps/${PN}.bmp
+}
diff --git a/games-rpg/egoboo/files/egoboo-2.8.1-enet-1.3.patch b/games-rpg/egoboo/files/egoboo-2.8.1-enet-1.3.patch
new file mode 100644
index 00000000000..dbde2db5386
--- /dev/null
+++ b/games-rpg/egoboo/files/egoboo-2.8.1-enet-1.3.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/628038
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Thu, 10 Sep 2020 18:39:45 +0300
+Subject: [PATCH] Add support for enet-1.3
+--- a/src/game/network.c
++++ b/src/game/network.c
+@@ -1847,3 +1847,3 @@
+ /// @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 )
+@@ -1863,3 +1863,3 @@
+ 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 )
+@@ -1906,3 +1906,3 @@
+ 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 )
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-08 19:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-08 19:42 [gentoo-commits] repo/gentoo:master commit in: games-rpg/egoboo/, games-rpg/egoboo/files/ Ionen Wolkens
-- strict thread matches above, loose matches on Subject: below --
2021-06-08 19:42 Ionen Wolkens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox