Update to 2.31.2

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
Igor Gnatenko 2016-12-18 17:28:23 +01:00
commit bdcb577458
6 changed files with 10 additions and 334 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
/angelscript_2.30.2.zip
/angelscript_2.31.0.zip
/angelscript_2.31.1.zip
/angelscript_2.31.2.zip

View file

@ -1,91 +0,0 @@
From 5c3df25a087d2808a4dc7558663b02b318d7e064 Mon Sep 17 00:00:00 2001
From: angelcode <angelcode@404ce1b2-830e-0410-a2e2-b09542c77caf>
Date: Thu, 29 Sep 2016 22:38:58 +0000
Subject: [PATCH 1/3] Fixed compiler error on Linux with non-x86 64bit
platforms, e.g. arm64, mips, and s390x architectures
git-svn-id: http://svn.code.sf.net/p/angelscript/code/trunk@2353 404ce1b2-830e-0410-a2e2-b09542c77caf
(cherry picked from commit 0fc7f2dbe7cdc455e9c2e5a7a372817b815a6eb4)
---
sdk/angelscript/projects/cmake/CMakeLists.txt | 7 +++++--
sdk/angelscript/source/as_config.h | 7 ++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/sdk/angelscript/projects/cmake/CMakeLists.txt b/sdk/angelscript/projects/cmake/CMakeLists.txt
index 3af7f6f..9ad2440 100644
--- a/sdk/angelscript/projects/cmake/CMakeLists.txt
+++ b/sdk/angelscript/projects/cmake/CMakeLists.txt
@@ -63,6 +63,7 @@ set(ANGELSCRIPT_SOURCE
../../source/as_builder.cpp
../../source/as_bytecode.cpp
../../source/as_callfunc.cpp
+ ../../source/as_callfunc_mips.cpp
../../source/as_callfunc_x86.cpp
../../source/as_callfunc_x64_gcc.cpp
../../source/as_callfunc_x64_msvc.cpp
@@ -135,7 +136,8 @@ endif()
set(ANGELSCRIPT_LIBRARY_NAME ${ANGELSCRIPT_LIBRARY_NAME} CACHE STRING "" FORCE)
add_library(${ANGELSCRIPT_LIBRARY_NAME} ${ANGELSCRIPT_SOURCE} ${ANGELSCRIPT_HEADERS})
-set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../../lib)
+# Don't override the default library output path to avoid conflicts when building for multiple target platforms
+#set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../../lib)
target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} ${CMAKE_THREAD_LIBS_INIT})
set_target_properties(${ANGELSCRIPT_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
@@ -156,6 +158,7 @@ if(MSVC)
set_target_properties(${ANGELSCRIPT_LIBRARY_NAME} PROPERTIES COMPILE_FLAGS "/MP")
endif()
-set(RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../../bin)
+# Don't override the default runtime output path to avoid conflicts when building for multiple target platforms
+#set(RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../../bin)
diff --git a/sdk/angelscript/source/as_config.h b/sdk/angelscript/source/as_config.h
index 9edaf0f..fce2f25 100644
--- a/sdk/angelscript/source/as_config.h
+++ b/sdk/angelscript/source/as_config.h
@@ -841,6 +841,7 @@
#define COMPLEX_RETURN_MASK (asOBJ_APP_CLASS_DESTRUCTOR | asOBJ_APP_CLASS_COPY_CONSTRUCTOR | asOBJ_APP_ARRAY)
#if (defined(i386) || defined(__i386) || defined(__i386__)) && !defined(__LP64__)
+ // x86 32bit
#define THISCALL_RETURN_SIMPLE_IN_MEMORY
#define CDECL_RETURN_SIMPLE_IN_MEMORY
#define STDCALL_RETURN_SIMPLE_IN_MEMORY
@@ -849,7 +850,8 @@
#define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK
#define AS_X86
#undef AS_NO_THISCALL_FUNCTOR_METHOD
- #elif defined(__LP64__) && !defined(__arm64__) && !defined(__PPC64__)
+ #elif defined(__x86_64__)
+ // x86 64bit
#define AS_X64_GCC
#undef AS_NO_THISCALL_FUNCTOR_METHOD
#define HAS_128_BIT_PRIMITIVES
@@ -860,6 +862,7 @@
#undef STDCALL
#define STDCALL
#elif (defined(__ARMEL__) || defined(__arm__)) && !(defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__))
+ // arm 32bit
#define AS_ARM
// TODO: The stack unwind on exceptions currently fails due to the assembler code in as_callfunc_arm_gcc.S
@@ -897,11 +900,13 @@
#undef AS_NO_THISCALL_FUNCTOR_METHOD
#elif defined(__mips__)
+ // mips
#define AS_MIPS
#undef STDCALL
#define STDCALL
#ifdef _ABIO32
+ // 32bit O32 ABI
#define AS_MIPS
// All structures are returned in memory regardless of size or complexity
--
2.10.2

View file

@ -1,113 +0,0 @@
From b3a1fa7b884ea8f1ba63a55237c8c773050a185e Mon Sep 17 00:00:00 2001
From: angelcode <angelcode@404ce1b2-830e-0410-a2e2-b09542c77caf>
Date: Mon, 21 Nov 2016 23:28:50 +0000
Subject: [PATCH 2/3] Changes to meson project files
git-svn-id: http://svn.code.sf.net/p/angelscript/code/trunk@2361 404ce1b2-830e-0410-a2e2-b09542c77caf
(cherry picked from commit 602584f835ef007463bb7d798cf4baeee4d37f2b)
---
sdk/angelscript/projects/meson/detect_ver.py | 31 ++++++++++++++++++++++----
sdk/angelscript/projects/meson/meson.build | 33 ++++++++++++++++++----------
2 files changed, 48 insertions(+), 16 deletions(-)
diff --git a/sdk/angelscript/projects/meson/detect_ver.py b/sdk/angelscript/projects/meson/detect_ver.py
index d7ae8a5..2e05ddf 100644
--- a/sdk/angelscript/projects/meson/detect_ver.py
+++ b/sdk/angelscript/projects/meson/detect_ver.py
@@ -1,5 +1,28 @@
+import argparse
+import os
import re
-with open('../../include/angelscript.h') as f:
- for l in f.readlines():
- if l.startswith('#define ANGELSCRIPT_VERSION_STRING'):
- print(re.search('[\d]+\.[\d]+\.[\d]+', l).group(0))
+
+HEADER = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+ "..", "..", "include", "angelscript.h")
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--num", action="store_true", help="Print numeric version")
+ args = parser.parse_args()
+
+ if args.num:
+ regex = re.compile(r'^#define ANGELSCRIPT_VERSION\s+(\d+)')
+ else:
+ regex = re.compile(r'^#define ANGELSCRIPT_VERSION_STRING\s+"(\d+\.\d+\.\d+.*)"')
+
+ with open(HEADER, "r") as fobj:
+ for l in fobj:
+ match = re.match(regex, l)
+ if match is not None:
+ print(match.group(1))
+ return
+
+ assert False, "Can't find version"
+
+if __name__ == "__main__":
+ main()
\ No newline at end of file
diff --git a/sdk/angelscript/projects/meson/meson.build b/sdk/angelscript/projects/meson/meson.build
index 891e8c2..9dea003 100644
--- a/sdk/angelscript/projects/meson/meson.build
+++ b/sdk/angelscript/projects/meson/meson.build
@@ -1,14 +1,15 @@
-project('angelscript', 'cpp', 'c')
+project('angelscript', 'cpp',
+ version : run_command(find_program('python3'), 'detect_ver.py').stdout().strip(),
+ meson_version : '>=0.28.0',
+ license : 'zlib')
-arch = run_command('uname', '-p').stdout().strip()
-version = run_command(find_program('python3'), 'detect_ver.py').stdout().strip()
+threads = dependency('threads')
-srcs = [
+angel_srcs = [
'../../source/as_atomic.cpp',
'../../source/as_builder.cpp',
'../../source/as_bytecode.cpp',
'../../source/as_callfunc.cpp',
- '../../source/as_callfunc_arm.cpp',
'../../source/as_callfunc_mips.cpp',
'../../source/as_callfunc_ppc.cpp',
'../../source/as_callfunc_ppc_64.cpp',
@@ -41,19 +42,27 @@ srcs = [
'../../source/as_typeinfo.cpp',
'../../source/as_variablescope.cpp',
]
-if arch == 'armv7l'
- srcs = srcs + [
+if host_machine.cpu_family() == 'arm'
+ add_languages('c')
+ angel_srcs += [
'../../source/as_callfunc_arm.cpp',
- '../../source/as_callfunc_arm_gcc.S'
+ '../../source/as_callfunc_arm_gcc.S',
]
endif
-shared_library(
+angelscript_version_num = run_command(find_program('python3'), 'detect_ver.py', '--num').stdout().strip()
+angelscript_lib = library(
'angelscript',
- sources : srcs,
+ sources : angel_srcs,
+ dependencies : threads,
+ version : angelscript_version_num,
install : true,
- soversion : '0',
- version : version,
+)
+angelscript_inc = include_directories('../../include')
+angelscript_dep = declare_dependency(
+ link_with : angelscript_lib,
+ include_directories : angelscript_inc,
+ version : meson.project_version(),
)
install_headers('../../include/angelscript.h')
--
2.10.2

View file

@ -1,118 +0,0 @@
From ba6c8a4380a54de2e3ef246d8207d2f7dfb71c1a Mon Sep 17 00:00:00 2001
From: angelcode <angelcode@404ce1b2-830e-0410-a2e2-b09542c77caf>
Date: Thu, 24 Nov 2016 15:10:09 +0000
Subject: [PATCH 3/3] Corrected as_config.h so Linux for 64bit ARM doesn't try
to compile as_callfunc_x64_gcc.cpp
git-svn-id: http://svn.code.sf.net/p/angelscript/code/trunk@2364 404ce1b2-830e-0410-a2e2-b09542c77caf
(cherry picked from commit 58087fcf4b0a9cc950a48e4444654f2930ac997a)
---
sdk/angelscript/source/as_config.h | 77 +++++++++++++++++++-------------------
1 file changed, 39 insertions(+), 38 deletions(-)
diff --git a/sdk/angelscript/source/as_config.h b/sdk/angelscript/source/as_config.h
index fce2f25..8542c18 100644
--- a/sdk/angelscript/source/as_config.h
+++ b/sdk/angelscript/source/as_config.h
@@ -861,43 +861,47 @@
// STDCALL is not available on 64bit Linux
#undef STDCALL
#define STDCALL
- #elif (defined(__ARMEL__) || defined(__arm__)) && !(defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__))
- // arm 32bit
- #define AS_ARM
+ #elif defined(__ARMEL__) || defined(__arm__) || defined(__aarch64__) || defined(__AARCH64EL__)
+ // arm
- // TODO: The stack unwind on exceptions currently fails due to the assembler code in as_callfunc_arm_gcc.S
- #define AS_NO_EXCEPTIONS
+ // The assembler code currently doesn't support arm v4, nor 64bit (v8)
+ #if !defined(__ARM_ARCH_4__) && !defined(__ARM_ARCH_4T__) && !defined(__LP64__)
+ #define AS_ARM
- #undef STDCALL
- #define STDCALL
+ // TODO: The stack unwind on exceptions currently fails due to the assembler code in as_callfunc_arm_gcc.S
+ #define AS_NO_EXCEPTIONS
- #define CDECL_RETURN_SIMPLE_IN_MEMORY
- #define STDCALL_RETURN_SIMPLE_IN_MEMORY
- #define THISCALL_RETURN_SIMPLE_IN_MEMORY
+ #undef STDCALL
+ #define STDCALL
- #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE
- #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE
- #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE
+ #define CDECL_RETURN_SIMPLE_IN_MEMORY
+ #define STDCALL_RETURN_SIMPLE_IN_MEMORY
+ #define THISCALL_RETURN_SIMPLE_IN_MEMORY
- #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2
- #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2
- #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2
+ #undef THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE
+ #undef CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE
+ #undef STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE
- #ifndef AS_MAX_PORTABILITY
- // Make a few checks against incompatible ABI combinations
- #if defined(__FAST_MATH__) && __FAST_MATH__ == 1
- #error -ffast-math is not supported with native calling conventions
- #endif
- #endif
+ #define THISCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2
+ #define CDECL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2
+ #define STDCALL_RETURN_SIMPLE_IN_MEMORY_MIN_SIZE 2
- // Verify if soft-float or hard-float ABI is used
- #if defined(__SOFTFP__) && __SOFTFP__ == 1
- // -ffloat-abi=softfp or -ffloat-abi=soft
- #define AS_SOFTFP
- #endif
+ #ifndef AS_MAX_PORTABILITY
+ // Make a few checks against incompatible ABI combinations
+ #if defined(__FAST_MATH__) && __FAST_MATH__ == 1
+ #error -ffast-math is not supported with native calling conventions
+ #endif
+ #endif
- // Tested with both hard float and soft float abi
- #undef AS_NO_THISCALL_FUNCTOR_METHOD
+ // Verify if soft-float or hard-float ABI is used
+ #if defined(__SOFTFP__) && __SOFTFP__ == 1
+ // -ffloat-abi=softfp or -ffloat-abi=soft
+ #define AS_SOFTFP
+ #endif
+
+ // Tested with both hard float and soft float abi
+ #undef AS_NO_THISCALL_FUNCTOR_METHOD
+ #endif
#elif defined(__mips__)
// mips
@@ -922,15 +926,12 @@
#define AS_MAX_PORTABILITY
#endif
#elif defined(__PPC64__)
- // Support native calling conventions on Linux with PPC64
- // TODO: This has not yet been confirmed to work
- #define AS_PPC_64
- #define SPLIT_OBJS_BY_MEMBER_TYPES
- #define THISCALL_RETURN_SIMPLE_IN_MEMORY
- #define CDECL_RETURN_SIMPLE_IN_MEMORY
- #define STDCALL_RETURN_SIMPLE_IN_MEMORY
- #undef STDCALL
- #define STDCALL
+ // PPC 64bit
+
+ // The code in as_callfunc_ppc_64.cpp was built for PS3 and XBox 360, that
+ // although use 64bit PPC only uses 32bit pointers.
+ // TODO: Add support for native calling conventions on Linux with PPC 64bit
+ #define AS_MAX_PORTABILITY
#else
#define AS_MAX_PORTABILITY
#endif
--
2.10.2

View file

@ -3,22 +3,16 @@
%global _vpath_srcdir sdk/%{name}/projects/meson/
Name: angelscript
Version: 2.31.1
Release: 4%{?dist}
Version: 2.31.2
Release: 1%{?dist}
Summary: Flexible cross-platform scripting library
License: zlib
URL: http://www.angelcode.com/angelscript/
Source0: %{url}/sdk/files/%{name}_%{version}.zip
# r2353
Patch0001: 0001-Fixed-compiler-error-on-Linux-with-non-x86-64bit-pla.patch
# r2361
Patch0002: 0002-Changes-to-meson-project-files.patch
# r2364
Patch0003: 0003-Corrected-as_config.h-so-Linux-for-64bit-ARM-doesn-t.patch
BuildRequires: meson
BuildRequires: dos2unix
#BuildRequires: dos2unix
%description
The AngelScript library is a software library for easy integration of
@ -38,8 +32,8 @@ developing applications that use %{name}.
%prep
%setup -q -c
find -type f -exec dos2unix {} ';'
%autopatch -p1
#find -type f -exec dos2unix {} ';'
#autopatch -p1
%build
%meson
@ -61,6 +55,9 @@ find -type f -exec dos2unix {} ';'
%{_includedir}/%{name}.h
%changelog
* Sun Dec 18 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.31.2-1
- Update to 2.31.2
* Fri Dec 16 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.31.1-4
- Use VPATH macro properly

View file

@ -1 +1 @@
961ddac47dde68f3c4b27b7bd0d136f7 angelscript_2.31.1.zip
SHA512 (angelscript_2.31.2.zip) = 4dd4c64caf4fc66a9fbda55d0fb81b91a6af5f5d4f28728343ff06455418ebaf5a36895e04e0bc2aebd76b510e81357f7e0ffd7e575b49bbc9573c106f24b265