Wednesday, April 13, 2022

Re: update games/irrlamb

Jeremie Courreges-Anglas <jca@wxcvbn.org> wrote:
> On Tue, Apr 05 2022, Stuart Henderson <stu@spacehopper.org> wrote:
> > On 2022/04/05 20:13, Jeremie Courreges-Anglas wrote:
> >>
> >> (post-7.1)
> >>
> >> On Mon, Jan 03 2022, Jeremie Courreges-Anglas <jca@wxcvbn.org> wrote:
> >> > On Thu, Dec 30 2021, Pascal Stumpf <pascal@stumpf.co> wrote:
> >> >> Here's an update for games/irrlamb, which now no longer uses
> >> >> devel/bullet. It has an internal copy of Irrlicht, but working around
> >> >> this to use the version from ports seems to not create any issues.
> >> >
> >> > This breaks on !(amd64) for various reasons.
> >> >
> >> > 1. -msse -mfpmath=sse should only be used on amd64, see Makefile and
> >> > patches/patch-CMakeLists_txt below.
> >> >
> >> > 2. src/ode/odeconfig.h is a pile of ifdef kludges. I added a hack in the
> >> > second part of the diff below but I really suggest not using it as is.
> >> > Maybe this should only be built on amd64. And arm64. *argh*.
> >>
> >> Updated diff that builds on sparc64 and riscv64, and probably all our
> >> architectures. Since the package seems currently built with SSE i386,
> >> either the diff lacks a bump or I could tweak the conditional to keep
> >> using SSE on i386.
> >>
> >> Aren't we supposed to disable SSE on i386? Or is it done on
> >> a case-by-case basis?
> >
> > Case-by-case for ports. Probably makes sense to keep sse for this. There
> > are many things which just don't make any sense to run on an i386 that's
> > so old it doesn't even have SSE (that is very old..) Especially if it
> > means making it worse on slightly newer machines which can run it but
> > only barely.
>
> Thanks for confirming. With this in mind, ok? (post-lock)

i'm feeling a bit guilty to not have noticed the fact that it tries to
use SSE unconditionally when I tested the update, sorry!

FWIW I agree with the diff, ok op@. It still builds fine on amd64 and
i386. I couldn't test it on my i386 (it doesn't like to run over Xvnc
apparently.)

> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/games/irrlamb/Makefile,v
> retrieving revision 1.16
> diff -u -p -r1.16 Makefile
> --- Makefile 24 Mar 2022 07:57:06 -0000 1.16
> +++ Makefile 5 Apr 2022 21:09:56 -0000
> @@ -1,6 +1,3 @@
> -BROKEN-sparc64 = uses sse, but fails an assert even without sse
> -ONLY_FOR_ARCHS = amd64 i386 # build configuration forces sse
> -
> V = 1.0.1
> COMMENT = third person, 3D physics game
> DISTNAME = irrlamb-$Vr613-src
> @@ -30,6 +27,13 @@ RUN_DEPENDS = devel/desktop-file-utils
> WRKDIST = ${WRKDIR}/irrlamb-$Vr613
>
> NO_TEST = Yes
> +
> +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
> +SSE_FLAGS = -msse -mfpmath=sse
> +.else
> +SSE_FLAGS =
> +.endif
> +SUBST_VARS += SSE_FLAGS
>
> post-extract:
> rm -rf ${WRKSRC}/src/irrlicht
> Index: patches/patch-CMakeLists_txt
> ===================================================================
> RCS file: /home/cvs/ports/games/irrlamb/patches/patch-CMakeLists_txt,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-CMakeLists_txt
> --- patches/patch-CMakeLists_txt 11 Mar 2022 19:04:34 -0000 1.2
> +++ patches/patch-CMakeLists_txt 5 Apr 2022 21:09:30 -0000
> @@ -1,7 +1,7 @@
> Index: CMakeLists.txt
> --- CMakeLists.txt.orig
> +++ CMakeLists.txt
> -@@ -29,7 +29,6 @@ if(WIN32)
> +@@ -29,11 +29,10 @@ if(WIN32)
> elseif(UNIX)
> add_definitions(-DPLATFORM=0)
> add_definitions(-DLUA_USE_LINUX)
> @@ -9,6 +9,11 @@ Index: CMakeLists.txt
> endif()
>
> # compiler flags
> +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated-declarations -pedantic -std=gnu++11 -msse -mfpmath=sse")
> ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated-declarations -pedantic -std=gnu++11 ${SSE_FLAGS}")
> + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DdNODEBUG -s")
> + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DdNODEBUG -s")
> +
> @@ -72,7 +71,7 @@ find_package(Threads REQUIRED)
>
> # include paths
> Index: patches/patch-src_ode_odeconfig_h
> ===================================================================
> RCS file: patches/patch-src_ode_odeconfig_h
> diff -N patches/patch-src_ode_odeconfig_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_ode_odeconfig_h 5 Apr 2022 21:09:30 -0000
> @@ -0,0 +1,61 @@
> +$OpenBSD$
> +
> +Sync this file with upstream, up to commit 92362ac.
> +https://bitbucket.org/odedevs/ode/src/92362ac1e6cf3a12343493f67807780505253e1c/include/ode/odeconfig.h
> +Lets this build on riscv64 and friends.
> +
> +Index: src/ode/odeconfig.h
> +--- src/ode/odeconfig.h.orig
> ++++ src/ode/odeconfig.h
> +@@ -80,8 +80,12 @@
> +

No comments:

Post a Comment