Friday, August 27, 2021

Re: [macppc / lld] Unbreak games/moonlander

On Thu, 26 Aug 2021 18:30:48 +0000
Charlene Wendling <julianaito@posteo.jp> wrote:

> Hi,
>
> The build is broken in the current macppc bulk:
>
> > https://bin.charlenew.xyz/moonlander.log
>
> Please see my previous report [0] for explanations about what is going on.
>
> Adding the `-lm' linker flag allows to fix the build on macppc [1].
> That's only 2 such fixes for around 2000 ports built. I expect to see more
> of them, yet hope not being inundated ;)
>
> While here, i wasn't able to access upstream's Makefile due to
> PORTS_PRIVSEP, so i added FIX_EXTRACT_PERMISSIONS. I also updated
> WANTLIB.
>
> The runtime is fine on amd64 and macppc.
>
> OK?

ok gkoehler@, suggest to add a patch comment to explain that -lm is
for sqrt on powerpc.

> Charlène.
>
>
> [0] https://marc.info/?l=openbsd-ports&m=162999190921813&w=2
> [1] https://bin.charlenew.xyz/moonlander_fixed.log
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/games/moonlander/Makefile,v
> retrieving revision 1.14
> diff -u -p -u -p -r1.14 Makefile
> --- Makefile 20 Mar 2020 16:44:23 -0000 1.14
> +++ Makefile 26 Aug 2021 17:54:01 -0000
> @@ -3,16 +3,18 @@
> COMMENT= clone of atari game
> DISTNAME= moon-lander-1.0
> PKGNAME= moonlander-1.0
> -REVISION= 2
> +REVISION= 3
> CATEGORIES= games x11
> MASTER_SITES= http://downloads.daveblood.com/lunar_lander/
>
> +FIX_EXTRACT_PERMISSIONS= yes
> +
> HOMEPAGE= http://magigames.org/moonlander.html
>
> # BSD
> PERMIT_PACKAGE= Yes
>
> -WANTLIB= SDL X11 Xext c m pthread usbhid xcb SDL_image SDL_mixer
> +WANTLIB += SDL SDL_image SDL_mixer c m pthread
>
> LIB_DEPENDS= devel/sdl-image \
> devel/sdl-mixer
> Index: patches/patch-Makefile
> ===================================================================
> RCS file: /cvs/ports/games/moonlander/patches/patch-Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -u -p -r1.1.1.1 patch-Makefile
> --- patches/patch-Makefile 15 Apr 2003 16:01:42 -0000 1.1.1.1
> +++ patches/patch-Makefile 26 Aug 2021 17:54:01 -0000
> @@ -1,6 +1,7 @@
> $OpenBSD: patch-Makefile,v 1.1.1.1 2003/04/15 16:01:42 espie Exp $
> ---- Makefile.orig Tue Aug 14 18:28:49 2001
> -+++ Makefile Thu Apr 10 14:54:33 2003
> +Index: Makefile
> +--- Makefile.orig
> ++++ Makefile
> @@ -1,26 +1,20 @@
> # Makefile for test program for game_libs - lunar lander
> -CFLAGS=-Wall `sdl-config --libs --cflags`
> @@ -9,7 +10,7 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2003/
> +#CC=gcc
>
> -LIBS=SDL_image
> -+LIBS=`sdl-config --libs` -lSDL_image -lSDL_mixer
> ++LIBS=`sdl-config --libs` -lSDL_image -lSDL_mixer -lm
>
> C_FILES=moon_lander.c game_lib.c DT_drawtext.c
> OBJ_FILES=moon_lander.o game_lib.o DT_drawtext.o
>


--
George Koehler <kernigh@gmail.com>

No comments:

Post a Comment