Hi,

The following diff works around some hardcoded gcc/g++ stuff.

This port has its own funky build system, so I just tried to make
a diff that's simple enough.

Tested while moving /usr/bin/gcc and /usr/bin/g++ out of the way.

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/teeworlds/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- Makefile    30 Nov 2016 18:17:03 -0000      1.19
+++ Makefile    28 Feb 2017 19:05:55 -0000
@@ -49,6 +49,7 @@ pre-configure:
                ${WRKSRC}/scripts/font_installer.sh \
                ${WRKSRC}/scripts/make_src.py \
                ${WRKSRC}/bam.lua \
+               ${WRKSRC}/configure.lua \
                ${BAM_WRKSRC}/make_unix.sh \
                ${BAM_WRKSRC}/src/driver_gcc.lua \
                ${BAM_WRKSRC}/src/base.lua
Index: patches/patch-configure_lua
===================================================================
RCS file: patches/patch-configure_lua
diff -N patches/patch-configure_lua
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_lua 28 Feb 2017 19:05:55 -0000
@@ -0,0 +1,36 @@
+$OpenBSD$
+
+Accept more compilers than a hardcoded gcc.
+
+(SetDriversClang() is also a no-op) 
+
+--- configure.lua.orig Sun Nov 13 16:41:35 2016
++++ configure.lua      Tue Feb 28 19:34:03 2017
+@@ -362,10 +362,9 @@ function OptCCompiler(name, default_driver, default_c,
+               else
+                       if ExecuteSilent("cl") == 0 then
+                               option.driver = "cl"
+-                      elseif ExecuteSilent("g++ -v") == 0 then
+-                              option.driver = "gcc"
+                       else
+-                              error("no c/c++ compiler found")
++                              -- Assume GCC compatible
++                              option.driver = "${CC}"
+                       end
+               end
+               --setup_compiler(option.value)
+@@ -374,12 +373,9 @@ function OptCCompiler(name, default_driver, default_c,
+       local apply = function(option, settings)
+               if option.driver == "cl" then
+                       SetDriversCL(settings)
+-              elseif option.driver == "gcc" then
+-                      SetDriversGCC(settings)
+-              elseif option.driver == "clang" then
+-                      SetDriversClang(settings)
+               else
+-                      error(option.driver.." is not a known c/c++ compile 
driver")
++                      -- Assume GCC compatible
++                      SetDriversGCC(settings)
+               end
+ 
+               if option.c_compiler then settings.cc.c_compiler = 
option.c_compiler end

Reply via email to