Wednesday, July 31, 2019

Re: [ports-gcc] Unbreak games/maelstrom

On Wed, Jul 31, 2019 at 03:00:43PM +0200, Charlene Wendling wrote:
> Hi!
>
> > http://build-failures.rhaalovely.net/powerpc/2019-07-14/games/maelstrom.log
> > http://build-failures.rhaalovely.net/sparc64/2019-07-11/games/maelstrom.log
>
> This is just a redundant use of 'struct'. While here, later in the
> build gcc complained about missing headers, so i added them.
>
> Then it builds fine on macppc [0] and amd64. The runtime is good as well.
>
> Comments/feedback are welcome!
>

I can confirm this works on macppc and amd64, ok rapha@.

> Charl??ne.
>
>
> [0] https://bin.charlenew.xyz/maelstrom.log
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/games/maelstrom/Makefile,v
> retrieving revision 1.12
> diff -u -p -u -p -r1.12 Makefile
> --- Makefile 12 Jul 2019 20:46:20 -0000 1.12
> +++ Makefile 31 Jul 2019 12:54:43 -0000
> @@ -4,7 +4,7 @@ COMMENT = asteroid-like game
>
> DISTNAME = Maelstrom-3.0.6
> PKGNAME = ${DISTNAME:L}
> -REVISION = 3
> +REVISION = 4
> CATEGORIES = games x11
> HOMEPAGE = http://www.devolution.com/~slouken/Maelstrom/
> MASTER_SITES = ${HOMEPAGE}/src/
> Index: patches/patch-Maelstrom-netd_c
> ===================================================================
> RCS file: patches/patch-Maelstrom-netd_c
> diff -N patches/patch-Maelstrom-netd_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-Maelstrom-netd_c 31 Jul 2019 12:54:43 -0000
> @@ -0,0 +1,18 @@
> +$OpenBSD$
> +
> +ports-gcc: fix warnings of implicit built-in functions
> +
> +Index: Maelstrom-netd.c
> +--- Maelstrom-netd.c.orig
> ++++ Maelstrom-netd.c
> +@@ -8,8 +8,10 @@
> + #include <sys/types.h>
> + #include <sys/time.h>
> + #include <sys/socket.h>
> ++#include <arpa/inet.h>
> + #include <netinet/in.h>
> + #include <netdb.h>
> ++#include <stdlib.h>
> + #include <unistd.h>
> +
> + /* We wait in a loop for players to connect and tell us how many people
> Index: patches/patch-buttonlist_h
> ===================================================================
> RCS file: patches/patch-buttonlist_h
> diff -N patches/patch-buttonlist_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-buttonlist_h 31 Jul 2019 12:54:43 -0000
> @@ -0,0 +1,35 @@
> +$OpenBSD$
> +
> +ports-gcc: fix redundant use of struct:
> +error: using typedef-name 'ButtonList::button' after 'struct'
> +
> +Index: buttonlist.h
> +--- buttonlist.h.orig
> ++++ buttonlist.h
> +@@ -16,7 +16,7 @@ class ButtonList { (public)
> +
> + void Add_Button(Uint16 x, Uint16 y, Uint16 width, Uint16 height,
> + void (*callback)(void)) {
> +- struct button *belem;
> ++ button *belem;
> +
> + for ( belem=&button_list; belem->next; belem=belem->next );
> + belem->next = new button;
> +@@ -30,7 +30,7 @@ class ButtonList { (public)
> + }
> +
> + void Activate_Button(Uint16 x, Uint16 y) {
> +- struct button *belem;
> ++ button *belem;
> +
> + for ( belem=button_list.next; belem; belem=belem->next ) {
> + if ( (x >= belem->x1) && (x <= belem->x2) &&
> +@@ -42,7 +42,7 @@ class ButtonList { (public)
> + }
> +
> + void Delete_Buttons(void) {
> +- struct button *belem, *btemp;
> ++ button *belem, *btemp;
> +
> + for ( belem=button_list.next; belem; ) {
> + btemp = belem;
>

No comments:

Post a Comment