Wednesday, October 03, 2018

Re: games/ezquake add multiplayer server list

Solene Rapenne <solene@perso.pw> wrote:
> hello
> this patch changes the default path where ezquake looks for a sources.txt file
> containing address to file servers list. The default is $PWD/sb/sources.txt,
> the sources.txt file is provided in the sources in a folder
> misc/sb/sources.txt.
>
> This patch creates ${PREFIX}/share/ezquake/ and add the file sources.txt and
> some others files that are included from sources.txt, others files contains
> regional servers.
>
> When launching ezquake, you can then browse multiplayer servers lists instead
> of having empty results or having to dig out from code that you need to have
> the file $PWD/sb/sources.txt
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/games/ezquake/Makefile,v
> retrieving revision 1.4
> diff -u -p -r1.4 Makefile
> --- Makefile 15 Sep 2018 18:54:54 -0000 1.4
> +++ Makefile 2 Oct 2018 16:57:52 -0000
> @@ -5,7 +5,7 @@ COMMENT = modern QuakeWorld client
> DISTNAME = ezquake-source-${V}
> PKGNAME = ezquake-${V}
> CATEGORIES = games
> -REVISION = 1
> +REVISION = 2
>
> HOMEPAGE = https://ezquake.github.io/
> MAINTAINER = Tom Murphy <openbsd@pertho.net>
> @@ -32,7 +32,16 @@ WRKDIST = ${WRKDIR}
>
> NO_TEST = Yes
>
> +GAMEDIR = ${PREFIX}/share/ezquake
> +SUBST_VARS += GAMEDIR
> +
> +do-configure:
> + ${SUBST_CMD} ${WRKSRC}/EX_browser_sources.c
> +
> do-install:
> - ${INSTALL_PROGRAM} ${WRKSRC}/ezquake ${PREFIX}/bin
> + ${INSTALL_PROGRAM} ${WRKSRC}/ezquake ${PREFIX}/bin
> + ${INSTALL_DATA_DIR} ${GAMEDIR}
> + @cp ${WRKSRC}/misc/sb/*.txt ${GAMEDIR}/
> + #${INSTALL_DATA} ${WRKSRC}/misc/sb/sources.txt ${GAMEDIR}
>
> .include <bsd.port.mk>
> Index: patches/patch-EX_browser_sources.c
> ===================================================================
> RCS file: patches/patch-EX_browser_sources.c
> diff -N patches/patch-EX_browser_sources.c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-EX_browser_sources.c 2 Oct 2018 16:57:52 -0000
> @@ -0,0 +1,11 @@
> +--- /usr/ports/pobj/ezquake-3.1/EX_browser_sources.c.orig Tue Oct 2 18:45:41 2018
> ++++ /usr/ports/pobj/ezquake-3.1/EX_browser_sources.c Tue Oct 2 18:45:54 2018
> +@@ -36,7 +36,7 @@
> +
> + #include "EX_browser.h"
> +
> +-#define SOURCES_LIST_FILENAME "sb/sources.txt"
> ++#define SOURCES_LIST_FILENAME "${GAMEDIR}/sources.txt"
> +
> + // Used by curl to read server lists from the web
> + struct curl_buf
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/games/ezquake/pkg/PLIST,v
> retrieving revision 1.2
> diff -u -p -r1.2 PLIST
> --- pkg/PLIST 4 Sep 2018 12:53:16 -0000 1.2
> +++ pkg/PLIST 2 Oct 2018 16:57:52 -0000
> @@ -1,3 +1,14 @@
> @comment $OpenBSD: PLIST,v 1.2 2018/09/04 12:53:16 espie Exp $
> @bin bin/ezquake
> share/doc/pkg-readmes/${PKGSTEM}
> +share/ezquake/
> +share/ezquake/au-sv.txt
> +share/ezquake/ctf.txt
> +share/ezquake/eu-4on4.txt
> +share/ezquake/eu-sv.txt
> +share/ezquake/global.txt
> +share/ezquake/na-sv.txt
> +share/ezquake/qizmo.txt
> +share/ezquake/sa-sv.txt
> +share/ezquake/sources.txt
> +share/ezquake/tf.txt

some people had issues copying this patch. I send it again, being sure it's not
copied from tmux.

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/ezquake/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile 15 Sep 2018 18:54:54 -0000 1.4
+++ Makefile 4 Oct 2018 06:19:32 -0000
@@ -5,7 +5,7 @@ COMMENT = modern QuakeWorld client
DISTNAME = ezquake-source-${V}
PKGNAME = ezquake-${V}
CATEGORIES = games
-REVISION = 1
+REVISION = 2

HOMEPAGE = https://ezquake.github.io/
MAINTAINER = Tom Murphy <openbsd@pertho.net>
@@ -32,7 +32,16 @@ WRKDIST = ${WRKDIR}

NO_TEST = Yes

+GAMEDIR = ${PREFIX}/share/ezquake
+SUBST_VARS += GAMEDIR
+
+do-configure:
+ ${SUBST_CMD} ${WRKSRC}/EX_browser_sources.c
+
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/ezquake ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/ezquake ${PREFIX}/bin
+ ${INSTALL_DATA_DIR} ${GAMEDIR}
+ @cp ${WRKSRC}/misc/sb/*.txt ${GAMEDIR}/
+ #${INSTALL_DATA} ${WRKSRC}/misc/sb/sources.txt ${GAMEDIR}

.include <bsd.port.mk>
Index: patches/patch-EX_browser_sources.c
===================================================================
RCS file: patches/patch-EX_browser_sources.c
diff -N patches/patch-EX_browser_sources.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-EX_browser_sources.c 4 Oct 2018 06:19:32 -0000
@@ -0,0 +1,11 @@
+--- /usr/ports/pobj/ezquake-3.1/EX_browser_sources.c.orig Tue Oct 2 18:45:41 2018
++++ /usr/ports/pobj/ezquake-3.1/EX_browser_sources.c Tue Oct 2 18:45:54 2018
+@@ -36,7 +36,7 @@
+
+ #include "EX_browser.h"
+
+-#define SOURCES_LIST_FILENAME "sb/sources.txt"
++#define SOURCES_LIST_FILENAME "${GAMEDIR}/sources.txt"
+
+ // Used by curl to read server lists from the web
+ struct curl_buf
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/ezquake/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 4 Sep 2018 12:53:16 -0000 1.2
+++ pkg/PLIST 4 Oct 2018 06:19:32 -0000
@@ -1,3 +1,14 @@
@comment $OpenBSD: PLIST,v 1.2 2018/09/04 12:53:16 espie Exp $
@bin bin/ezquake
share/doc/pkg-readmes/${PKGSTEM}
+share/ezquake/
+share/ezquake/au-sv.txt
+share/ezquake/ctf.txt
+share/ezquake/eu-4on4.txt
+share/ezquake/eu-sv.txt
+share/ezquake/global.txt
+share/ezquake/na-sv.txt
+share/ezquake/qizmo.txt
+share/ezquake/sa-sv.txt
+share/ezquake/sources.txt
+share/ezquake/tf.txt

No comments:

Post a Comment