View Single Post
  #1   (View Single Post)  
Old 3rd October 2017
puffymon puffymon is offline
Real Name: Leonid
Port Guard
 
Join Date: Apr 2017
Location: Earth
Posts: 37
Default AngelScript/QFusion game

Hi! I'm trying to make a port of AngelScript 2.31.2, it compiles without patches, but fails to install. Installing AngelScript 2.30.2 was easy, but it seems that I need AngelScript 2.31.x to compile Warsow 2.1:
Code:
$ cmake -DQFUSION_GAME="Warsow" .
-- The C compiler identification is Clang 4.0.0
-- The CXX compiler identification is Clang 4.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OGG: /usr/local/include  
-- Found VORBIS: /usr/local/include  
-- Found THEORA: /usr/local/include  
-- Found CURL: /usr/local/lib/libcurl.so.25.11 (found version "7.55.1") 
-- Found ZLIB: /usr/lib/libz.so.5.0 (found version "1.2.3") 
-- Found Freetype: /usr/X11R6/lib/libfreetype.so.28.1 (found version "2.8.0") 
-- Found JPEG: /usr/local/lib/libjpeg.so.68.1  
-- Found PNG: /usr/local/lib/libpng.so.17.4 (found version "1.6.31") 
-- Found ANGELSCRIPT: /usr/local/include  
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/warsow_21_sdk/source/source
$ gmake                           
Scanning dependencies of target angelwrap
[  0%] Building CXX object angelwrap/CMakeFiles/angelwrap.dir/qas_angelwrap.cpp.o
In file included from /tmp/warsow_21_sdk/source/source/angelwrap/qas_angelwrap.cpp:32:
In file included from /usr/include/c++/v1/list:180:
/usr/include/c++/v1/__undef_min_max:17:2: warning: : macro min is incompatible
      with C++. #undefing min [-W#warnings]
#warning: macro min is incompatible with C++.  #undefing min
 ^
/usr/include/c++/v1/__undef_min_max:29:2: warning: : macro max is incompatible
      with C++. #undefing max [-W#warnings]
#warning: macro max is incompatible with C++.  #undefing max
 ^
2 warnings generated.
[  0%] Building CXX object angelwrap/CMakeFiles/angelwrap.dir/qas_main.cpp.o
[  0%] Building CXX object angelwrap/CMakeFiles/angelwrap.dir/qas_precompiled.cpp.o
[  0%] Building CXX object angelwrap/CMakeFiles/angelwrap.dir/qas_syscalls.cpp.o
[  0%] Building CXX object angelwrap/CMakeFiles/angelwrap.dir/addon/addon_any.cpp.o
/tmp/warsow_21_sdk/source/source/angelwrap/addon/addon_any.cpp:345:12: error: 
      no member named 'IsHandleCompatibleWithObject' in 'asIScriptEngine'
                        engine->IsHandleCompatibleWithObject(value.value...
                        ~~~~~~  ^
1 error generated.
gmake[2]: *** [angelwrap/CMakeFiles/angelwrap.dir/build.make:159: angelwrap/CMakeFiles/angelwrap.dir/addon/addon_any.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:86: angelwrap/CMakeFiles/angelwrap.dir/all] Error 2
gmake: *** [Makefile:84: all] Error 2
$
Now the reason why AngelScript 2.31.x doesn't install: since version 2.31.0 AngelScript's Makefile contains "CP_SYMLINK = cp --no-dereference --preserve=links". After reading cp(1) man page I've made a patch:
Code:
$ cat patches/patch-angelscript_projects_gnuc_Makefile  
$OpenBSD$

Index: angelscript/projects/gnuc/Makefile
--- angelscript/projects/gnuc/Makefile.orig
+++ angelscript/projects/gnuc/Makefile
@@ -43,7 +43,7 @@ INSTALL_DIR = $(INSTALL) -d
 INSTALL_SHLIB = $(INSTALL) -m 755
 INSTALL_ARLIB = $(INSTALL) -m 644
 INSTALL_HEADER = $(INSTALL) -m 644
-CP_SYMLINK = cp --no-dereference --preserve=links
+CP_SYMLINK = cp -P -p
 CP_R = cp -R
 
 
$
Of course that didn't work because -p flag is not equivalent to --preserve=links flag. So, is there any equivalent command to "cp -P --preserve=links"?
Note: Yes, I don't know C++. Yes, I don't know AngelScript. And yes, I don't know how Makefile works
__________________
mazocomp$ uname -a
OpenBSD mazocomp.lan 6.3 GENERIC.MP#47 amd64
mazocomp$
Reply With Quote