From 970c41de2b6d044d11606cd1ab37def9f67d7bff Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Wed, 17 Mar 2021 07:30:36 +0000 Subject: [PATCH] Accepting request 879480 from home:alois:branches:games - Update to version 2.35.0 Bug fixes: * asIScriptModule::GetGlobalVar was returning asSUCCESS when the given index was out of range * Compiler would give an error when compiling functions returning a reference to a type that cannot be instantiated * Fixed problem with LoadByteCode and shared classes * Fixed crash when using copy constructor declared as taking the object by value * Fixed memory invasion in compiler when compiling initialization lists with expressions using default arguments * Fixed memory invasion in compiler when compiling default arguments * Fixed an issue in compiler with auto type and constness * Fixed symbol lookup of child type from within class method while compiling a construct call * Fixed crash after a discarding a module that compiled a shared object type that continues to be used by other modules * Funcdefs are marked with asOBJ_GC as they can form circular references when used with delegates * Fixed memory leak when using CompileGlobalVar to add a variable to a module with an object type * Fixed error when loading bytecode that is using a list constructor for a value type * Fixed memory invasion in compiler when compiling default argument after an argument with index operator Library: * asIScriptModule::GetFunctionByName now supports informing the scope in the name * asIScriptModule::GetGlobalVarByName and GetTypeInfoByName also support informing the scope in the name * asIScriptEngine::GetTypeInfoByName and GetGlobalPropertyIndexByName also support informing the scope in the name * The default opAssign implementation for script classes will use the base class' opAssign method to copy inherited properties * Added config for 64bit x86 CPU on Haiku OS * Added flag asOBJ_APP_CLASS_MORE_CONSTRUCTORS to inform when a class with defaulted constructors has additional non-trivial constructors * Added support for native calling conventions on Linux with ARM64 * Improved time for compilation and loading pre-compiled bytecode for scripts with lots of type definitions * Added config to make the library buildable for Linux with Elbrus 2000 CPU Library interface: * asIScriptObject::CopyFrom now takes a const pointer * RegisterGlobalProperty and RegisterObjectProperty now return the index of the property upon success Virtual machine: * asBC_Thiscall1 bytecode instruction is now capable of catching and translating C++ exceptions to script exceptions Add-ons & Samples: * Implemented to-string debug callback for datetime in asrun * Fixed a problem due to daylight time when initializing a datetime object with specific date * debugger add-on handles incorrect user commands better * Implemented a version of exec for asrun sample that captures the standard output from the system command into a string * Implemented getCreateDateTime and getModifyDateTime on the filesystem add-on * Improved performance on array sort for arrays holding object types * Fixed registration of the virtual property accessors in the game sample * Fixed compilation error in scriptstdstring.cpp with AS_USE_NAMESPACE * Registered the script array add-on in the console sample * Added generic calling convention bindings for datetime and filesystem add-ons Project: * Fixed gnuc makefile to detect arm target and add a compiler flag to accept implicit IT constructs in thumb mode - Use https for source URL - Switch build to meson - Add angelscript-addons_lib.patch - Add pkgconfig support file - Build addons library and install related headers - Add angelscript_addons library subpackage - Move docs to -devel and drop main package OBS-URL: https://build.opensuse.org/request/show/879480 OBS-URL: https://build.opensuse.org/package/show/games/angelscript?expand=0&rev=15 --- angelscript-addons_lib.patch | 162 +++++++++++++++++++++++++++++++++++ angelscript.changes | 85 ++++++++++++++++++ angelscript.spec | 90 ++++++++++++++++--- angelscript_2.34.0.zip | 3 - angelscript_2.35.0.zip | 3 + 5 files changed, 327 insertions(+), 16 deletions(-) create mode 100644 angelscript-addons_lib.patch delete mode 100644 angelscript_2.34.0.zip create mode 100644 angelscript_2.35.0.zip diff --git a/angelscript-addons_lib.patch b/angelscript-addons_lib.patch new file mode 100644 index 0000000..ce21711 --- /dev/null +++ b/angelscript-addons_lib.patch @@ -0,0 +1,162 @@ +Index: sdk/angelscript/projects/meson/meson.build +=================================================================== +--- sdk.orig/angelscript/projects/meson/meson.build ++++ sdk/angelscript/projects/meson/meson.build +@@ -1,6 +1,6 @@ + project('angelscript', 'cpp', + version : run_command(find_program('python3'), 'detect_ver.py').stdout().strip(), +- meson_version : '>=0.28.0', ++ meson_version : '>=0.49.0', + license : 'zlib') + + threads = dependency('threads') +@@ -42,6 +42,31 @@ angel_srcs = [ + '../../source/as_typeinfo.cpp', + '../../source/as_variablescope.cpp', + ] ++ ++angel_incl_dir = get_option('includedir') / 'AngelScript' ++ ++angel_addons_srcs = [ ++ '../../../add_on/autowrapper/generator/generateheader.cpp', ++ '../../../add_on/contextmgr/contextmgr.cpp', ++ '../../../add_on/datetime/datetime.cpp', ++ '../../../add_on/debugger/debugger.cpp', ++ '../../../add_on/scriptany/scriptany.cpp', ++ '../../../add_on/scriptarray/scriptarray.cpp', ++ '../../../add_on/scriptbuilder/scriptbuilder.cpp', ++ '../../../add_on/scriptdictionary/scriptdictionary.cpp', ++ '../../../add_on/scriptfile/scriptfile.cpp', ++ '../../../add_on/scriptfile/scriptfilesystem.cpp', ++ '../../../add_on/scriptgrid/scriptgrid.cpp', ++ '../../../add_on/scripthandle/scripthandle.cpp', ++ '../../../add_on/scripthelper/scripthelper.cpp', ++ '../../../add_on/scriptmath/scriptmathcomplex.cpp', ++ '../../../add_on/scriptmath/scriptmath.cpp', ++ '../../../add_on/scriptstdstring/scriptstdstring.cpp', ++ '../../../add_on/scriptstdstring/scriptstdstring_utils.cpp', ++ '../../../add_on/serializer/serializer.cpp', ++ '../../../add_on/weakref/weakref.cpp' ++] ++ + if host_machine.cpu_family() == 'arm' + add_languages('c') + angel_srcs += [ +@@ -55,7 +80,8 @@ angelscript_lib = library( + 'angelscript', + sources : angel_srcs, + dependencies : threads, +- version : angelscript_version_num, ++ soversion : meson.project_version(), ++ version : meson.project_version(), + install : true, + ) + angelscript_inc = include_directories('../../include') +@@ -65,4 +91,93 @@ angelscript_dep = declare_dependency( + version : meson.project_version(), + ) + +-install_headers('../../include/angelscript.h') ++angelscript_addons_lib = library( ++ 'angelscript_addons', ++ sources : angel_addons_srcs, ++ link_with : angelscript_lib, ++ include_directories : angelscript_inc, ++ soversion : meson.project_version(), ++ version : meson.project_version(), ++ install : true ++ ) ++ ++pkg = import('pkgconfig') ++pkg.generate(angelscript_lib, filebase : 'angelscript', description : 'Scripting library', subdirs : 'AngelScript') ++pkg.generate(angelscript_addons_lib, filebase : 'angelscript_addons', description : 'Scripting library', subdirs : 'AngelScript') ++ ++install_headers( ++ '../../include/angelscript.h', ++ install_dir : angel_incl_dir ++ ) ++install_headers( ++ '../../../add_on/autowrapper/aswrappedcall.h', ++ install_dir : angel_incl_dir / 'autowrapper' ++ ) ++install_headers( ++ '../../../add_on/contextmgr/contextmgr.h', ++ install_dir : angel_incl_dir / 'contextmgr' ++ ) ++install_headers( ++ '../../../add_on/datetime/datetime.h', ++ install_dir : angel_incl_dir / 'datetime' ++ ) ++install_headers( ++ '../../../add_on/debugger/debugger.h', ++ install_dir : angel_incl_dir / 'debugger' ++ ) ++install_headers( ++ '../../../add_on/scriptany/scriptany.h', ++ install_dir : angel_incl_dir / 'scriptany' ++ ) ++install_headers( ++ '../../../add_on/scriptarray/scriptarray.h', ++ install_dir : angel_incl_dir / 'scriptarray' ++ ) ++install_headers( ++ '../../../add_on/scriptbuilder/scriptbuilder.h', ++ install_dir : angel_incl_dir / 'scriptbuilder' ++ ) ++install_headers( ++ '../../../add_on/scriptdictionary/scriptdictionary.h', ++ install_dir : angel_incl_dir / 'scriptdictionary' ++ ) ++install_headers( ++ '../../../add_on/scriptfile/scriptfile.h', ++ install_dir : angel_incl_dir / 'scriptfile' ++ ) ++install_headers( ++ '../../../add_on/scriptfile/scriptfilesystem.h', ++ install_dir : angel_incl_dir / 'scriptfile' ++ ) ++install_headers( ++ '../../../add_on/scriptgrid/scriptgrid.h', ++ install_dir : angel_incl_dir / 'scriptgrid' ++ ) ++install_headers( ++ '../../../add_on/scripthandle/scripthandle.h', ++ install_dir : angel_incl_dir / 'scripthandle' ++ ) ++install_headers( ++ '../../../add_on/scripthelper/scripthelper.h', ++ install_dir : angel_incl_dir / 'scripthelper' ++ ) ++install_headers( ++ '../../../add_on/scriptmath/scriptmathcomplex.h', ++ install_dir : angel_incl_dir / 'scriptmath' ++ ) ++install_headers( ++ '../../../add_on/scriptmath/scriptmath.h', ++ install_dir : angel_incl_dir / 'scriptmath' ++ ) ++install_headers( ++ '../../../add_on/scriptstdstring/scriptstdstring.h', ++ install_dir : angel_incl_dir / 'scriptstdstring' ++ ) ++install_headers( ++ '../../../add_on/serializer/serializer.h', ++ install_dir : angel_incl_dir / 'serializer' ++ ) ++install_headers( ++ '../../../add_on/weakref/weakref.h', ++ install_dir : angel_incl_dir / 'weakref' ++ ) +Index: sdk/add_on/scriptfile/scriptfilesystem.cpp +=================================================================== +--- sdk.orig/add_on/scriptfile/scriptfilesystem.cpp ++++ sdk/add_on/scriptfile/scriptfilesystem.cpp +@@ -15,6 +15,8 @@ + #endif + #include // assert + ++#include ++ + using namespace std; + + BEGIN_AS_NAMESPACE diff --git a/angelscript.changes b/angelscript.changes index d6b6e4a..2d5b726 100644 --- a/angelscript.changes +++ b/angelscript.changes @@ -1,3 +1,88 @@ +------------------------------------------------------------------- +Sat Mar 13 13:14:00 UTC 2021 - Luigi Baldoni + +- Update to version 2.35.0 + Bug fixes: + * asIScriptModule::GetGlobalVar was returning asSUCCESS when + the given index was out of range + * Compiler would give an error when compiling functions + returning a reference to a type that cannot be instantiated + * Fixed problem with LoadByteCode and shared classes + * Fixed crash when using copy constructor declared as taking + the object by value + * Fixed memory invasion in compiler when compiling + initialization lists with expressions using default arguments + * Fixed memory invasion in compiler when compiling default + arguments + * Fixed an issue in compiler with auto type and constness + * Fixed symbol lookup of child type from within class method + while compiling a construct call + * Fixed crash after a discarding a module that compiled a + shared object type that continues to be used by other modules + * Funcdefs are marked with asOBJ_GC as they can form circular + references when used with delegates + * Fixed memory leak when using CompileGlobalVar to add a + variable to a module with an object type + * Fixed error when loading bytecode that is using a list + constructor for a value type + * Fixed memory invasion in compiler when compiling default + argument after an argument with index operator + Library: + * asIScriptModule::GetFunctionByName now supports informing + the scope in the name + * asIScriptModule::GetGlobalVarByName and GetTypeInfoByName + also support informing the scope in the name + * asIScriptEngine::GetTypeInfoByName and + GetGlobalPropertyIndexByName also support informing the scope in + the name + * The default opAssign implementation for script classes will + use the base class' opAssign method to copy inherited properties + * Added config for 64bit x86 CPU on Haiku OS + * Added flag asOBJ_APP_CLASS_MORE_CONSTRUCTORS to inform when + a class with defaulted constructors has additional non-trivial + constructors + * Added support for native calling conventions on Linux with + ARM64 + * Improved time for compilation and loading pre-compiled + bytecode for scripts with lots of type definitions + * Added config to make the library buildable for Linux with + Elbrus 2000 CPU + Library interface: + * asIScriptObject::CopyFrom now takes a const pointer + * RegisterGlobalProperty and RegisterObjectProperty now return + the index of the property upon success + Virtual machine: + * asBC_Thiscall1 bytecode instruction is now capable of + catching and translating C++ exceptions to script exceptions + Add-ons & Samples: + * Implemented to-string debug callback for datetime in asrun + * Fixed a problem due to daylight time when initializing a + datetime object with specific date + * debugger add-on handles incorrect user commands better + * Implemented a version of exec for asrun sample that captures + the standard output from the system command into a string + * Implemented getCreateDateTime and getModifyDateTime on the + filesystem add-on + * Improved performance on array sort for arrays holding object + types + * Fixed registration of the virtual property accessors in the + game sample + * Fixed compilation error in scriptstdstring.cpp with + AS_USE_NAMESPACE + * Registered the script array add-on in the console sample + * Added generic calling convention bindings for datetime and + filesystem add-ons + Project: + * Fixed gnuc makefile to detect arm target and add a compiler + flag to accept implicit IT constructs in thumb mode +- Use https for source URL +- Switch build to meson +- Add angelscript-addons_lib.patch +- Add pkgconfig support file +- Build addons library and install related headers +- Add angelscript_addons library subpackage +- Move docs to -devel and drop main package + ------------------------------------------------------------------- Fri Mar 27 13:18:01 UTC 2020 - Christophe Giboudeaux diff --git a/angelscript.spec b/angelscript.spec index 6b1b852..c8a4492 100644 --- a/angelscript.spec +++ b/angelscript.spec @@ -1,7 +1,7 @@ # # spec file for package angelscript # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,17 +16,21 @@ # -%define sover 2_34_0 +%define sover 2_35_0 Name: angelscript -Version: 2.34.0 +Version: 2.35.0 Release: 0 Summary: Scripting library License: Zlib Group: Development/Libraries/C and C++ URL: https://www.angelcode.com/angelscript/ -Source: http://www.angelcode.com/angelscript/sdk/files/%{name}_%{version}.zip +Source: https://www.angelcode.com/angelscript/sdk/files/%{name}_%{version}.zip +# PATCH-FEATURE-OPENSUSE angelscript-addons_lib.patch aloisio@gmx.com -- build and install addons library +Patch0: angelscript-addons_lib.patch BuildRequires: fdupes BuildRequires: gcc-c++ +BuildRequires: meson >= 0.49.0 +BuildRequires: pkgconfig BuildRequires: unzip %description @@ -49,10 +53,23 @@ functionality through external scripts. It supports Unix sockets and TCP/IP sockets with optional SSL/TLS support. +%package -n lib%{name}_addons%{sover} +Summary: Scripting library +Group: System/Libraries + +%description -n lib%{name}_addons%{sover} +The AngelCode Scripting Library, or AngelScript as it is also known, +is a scripting library designed to allow applications to extend their +functionality through external scripts. + +It supports Unix sockets and TCP/IP sockets with optional +SSL/TLS support. + %package devel Summary: Development files for AngelScript Group: Development/Libraries/C and C++ Requires: lib%{name}%{sover} = %{version} +Requires: lib%{name}_addons%{sover} = %{version} %description devel The AngelCode Scripting Library, or AngelScript as it is also known, @@ -63,28 +80,75 @@ This subpackage contains libraries and header files for developing applications that want to make use of the AngelScript library. %prep -%setup -q -n sdk/%{name}/projects/gnuc +%autosetup -p1 -n sdk %build -export CXXFLAGS="%{optflags}" -%make_build shared +pushd %{name}/projects/meson +%meson +%meson_build +popd %install -make install_shared install_header install_docs PREFIX=%{_prefix} DESTDIR=%{buildroot} LIBDIR_DEST=%{_libdir} DOCDIR_BASEDIR=%{_defaultdocdir}/%{name} -%fdupes %{buildroot} %{_defaultdocdir}/%{name} +pushd %{name}/projects/meson +%meson_install +popd + +mv docs html %post -n lib%{name}%{sover} -p /sbin/ldconfig %postun -n lib%{name}%{sover} -p /sbin/ldconfig -%files -# manual also contains the license -%{_defaultdocdir}/%{name} +%post -n lib%{name}_addons%{sover} -p /sbin/ldconfig +%postun -n lib%{name}_addons%{sover} -p /sbin/ldconfig %files -n lib%{name}%{sover} %{_libdir}/libangelscript.so.* +%files -n lib%{name}_addons%{sover} +%{_libdir}/libangelscript_addons.so.* + %files devel -%attr(0644,root,root) %{_includedir}/*.h +# manual also contains the license +%doc html +%dir %{_includedir}/AngelScript +%dir %{_includedir}/AngelScript/autowrapper +%dir %{_includedir}/AngelScript/contextmgr +%dir %{_includedir}/AngelScript/datetime +%dir %{_includedir}/AngelScript/debugger +%dir %{_includedir}/AngelScript/scriptany +%dir %{_includedir}/AngelScript/scriptarray +%dir %{_includedir}/AngelScript/scriptbuilder +%dir %{_includedir}/AngelScript/scriptdictionary +%dir %{_includedir}/AngelScript/scriptfile +%dir %{_includedir}/AngelScript/scriptgrid +%dir %{_includedir}/AngelScript/scripthandle +%dir %{_includedir}/AngelScript/scripthelper +%dir %{_includedir}/AngelScript/scriptmath +%dir %{_includedir}/AngelScript/scriptstdstring +%dir %{_includedir}/AngelScript/serializer +%dir %{_includedir}/AngelScript/weakref +%{_includedir}/AngelScript/angelscript.h +%{_includedir}/AngelScript/autowrapper/aswrappedcall.h +%{_includedir}/AngelScript/contextmgr/contextmgr.h +%{_includedir}/AngelScript/datetime/datetime.h +%{_includedir}/AngelScript/debugger/debugger.h +%{_includedir}/AngelScript/scriptany/scriptany.h +%{_includedir}/AngelScript/scriptarray/scriptarray.h +%{_includedir}/AngelScript/scriptbuilder/scriptbuilder.h +%{_includedir}/AngelScript/scriptdictionary/scriptdictionary.h +%{_includedir}/AngelScript/scriptfile/scriptfile.h +%{_includedir}/AngelScript/scriptfile/scriptfilesystem.h +%{_includedir}/AngelScript/scriptgrid/scriptgrid.h +%{_includedir}/AngelScript/scripthandle/scripthandle.h +%{_includedir}/AngelScript/scripthelper/scripthelper.h +%{_includedir}/AngelScript/scriptmath/scriptmath.h +%{_includedir}/AngelScript/scriptmath/scriptmathcomplex.h +%{_includedir}/AngelScript/scriptstdstring/scriptstdstring.h +%{_includedir}/AngelScript/serializer/serializer.h +%{_includedir}/AngelScript/weakref/weakref.h %{_libdir}/libangelscript.so +%{_libdir}/libangelscript_addons.so +%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/pkgconfig/%{name}_addons.pc %changelog diff --git a/angelscript_2.34.0.zip b/angelscript_2.34.0.zip deleted file mode 100644 index 640ab09..0000000 --- a/angelscript_2.34.0.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6faa043717522ae0fb2677d907ca5b0e35a79d28e5f83294565e6c6229bfbdf7 -size 2020026 diff --git a/angelscript_2.35.0.zip b/angelscript_2.35.0.zip new file mode 100644 index 0000000..a80b283 --- /dev/null +++ b/angelscript_2.35.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:010dd45e23e734d46f5891d70e268607a12cb9ab12503dda42f842d9db7e8857 +size 1971850