k...@openbsd.org wrote:
> http://build-failures.rhaalovely.net/sparc64/2022-05-03/games/godot,-main.log

/usr/bin/ld:platform/x11/pck_embed.legacy.ld:10: syntax error

This is due the recent changes in the port to build the engine alone.

On GCC arches platform/x11/detect.py finds that we're using GNU ld and
tries to use a ld script to create an export template.  We're not really
interested in those (*) and upstream says they don't work with llvm, so
I've just disable them.  While here, bump revision for the -tools too
just to be sure.

I indend to commit this in a bit if someone don't object it.

(*): the export templates are used to "bundle" together the engine and
the game data/scripts in a single executable.  they don't fit openbsd
well IMHO (plus I don't like the idea of people redistributing old godot
binaries) and for ports anyway we can just install the pck file and
launch it from a wrapper script.

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/games/godot/Makefile,v
retrieving revision 1.35
diff -u -p -r1.35 Makefile
--- Makefile    28 Apr 2022 22:18:01 -0000      1.35
+++ Makefile    6 May 2022 07:23:12 -0000
@@ -7,7 +7,8 @@ V =             3.4.4
 GODOTSTEAM_V = g34-s152-gs311
 DISTNAME =     godot-${V}-stable
 PKGNAME =      godot-${V}
-REVISION-main =        1
+REVISION-main =        2
+REVISION-tools = 0
 
 CATEGORIES =   games
 
Index: patches/patch-platform_x11_detect_py
===================================================================
RCS file: /home/cvs/ports/games/godot/patches/patch-platform_x11_detect_py,v
retrieving revision 1.9
diff -u -p -r1.9 patch-platform_x11_detect_py
--- patches/patch-platform_x11_detect_py        15 Apr 2022 20:23:19 -0000      
1.9
+++ patches/patch-platform_x11_detect_py        6 May 2022 07:17:18 -0000
@@ -1,5 +1,7 @@
-remove hardcoded -O2, found by bcallah@. Add sndio
-enable joydev
+- remove hardcoded -O2, found by bcallah@
+- add sndio
+- enable joydev
+- disable pck embedding (requires GNU ld and and is broken on GCC-arches)
 
 Index: platform/x11/detect.py
 --- platform/x11/detect.py.orig
@@ -45,13 +47,25 @@ Index: platform/x11/detect.py
      if env["pulseaudio"]:
          if os.system("pkg-config --exists libpulse") == 0:  # 0 means found
              env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED"])
-@@ -347,6 +328,9 @@ def configure(env):
-                 print("Warning: libudev development libraries not found. 
Disabling controller hotplugging support.")
+@@ -348,6 +329,9 @@ def configure(env):
      else:
          env["udev"] = False  # Linux specific
-+
+ 
 +    if platform.system() == "OpenBSD":
 +        env.Append(CPPDEFINES=["JOYDEV_ENABLED"])
- 
++
      # Linkflags below this line should typically stay the last ones
      if not env["builtin_zlib"]:
+         env.ParseConfig("pkg-config zlib --cflags --libs")
+@@ -375,11 +359,6 @@ def configure(env):
+             print(
+                 "Warning: Creating template binaries enabled for PCK 
embedding is currently only supported with GNU ld, not gold or LLD."
+             )
+-        else:
+-            if float(gnu_ld_version.group(1)) >= 2.30:
+-                env.Append(LINKFLAGS=["-T", "platform/x11/pck_embed.ld"])
+-            else:
+-                env.Append(LINKFLAGS=["-T", 
"platform/x11/pck_embed.legacy.ld"])
+ 
+     ## Cross-compilation
+ 

Reply via email to