From 2e9bd91b74718474773b7992a07bcfde881143e9 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 18:41:46 +0100 Subject: [PATCH] update to 1.2.0~test.3 [release 1.2.0~test.3-1mamba;Sun Jun 06 2021] --- README.md | 2 + tremulous-1.2.0~test.3-sol-gcc-11.1.0.patch | 47 ++++++++ tremulous.spec | 124 ++++++++++++++++++++ 3 files changed, 173 insertions(+) create mode 100644 tremulous-1.2.0~test.3-sol-gcc-11.1.0.patch create mode 100644 tremulous.spec diff --git a/README.md b/README.md index a7fc121..151aa53 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # tremulous +Tremulous is a free, open source game that blends a team based FPS with elements of an RTS. + diff --git a/tremulous-1.2.0~test.3-sol-gcc-11.1.0.patch b/tremulous-1.2.0~test.3-sol-gcc-11.1.0.patch new file mode 100644 index 0000000..dd6359e --- /dev/null +++ b/tremulous-1.2.0~test.3-sol-gcc-11.1.0.patch @@ -0,0 +1,47 @@ +--- tremulous-1.2.0-test.3/src/sol/sol.hpp.orig 2021-06-06 18:11:40.972505977 +0200 ++++ tremulous-1.2.0-test.3/src/sol/sol.hpp 2021-06-06 19:28:27.332544204 +0200 +@@ -6100,7 +6100,7 @@ + } + + static int push(lua_State* L, const wchar_t* wstr, std::size_t sz) { +- return push(L, wstr, wstr + sz); ++ return push(L, wstr, (const wchar_t*)(wstr + sz)); + } + + static int push(lua_State* L, const wchar_t* strb, const wchar_t* stre) { +@@ -6166,7 +6166,7 @@ + } + + static int push(lua_State* L, const wchar_t(&str)[N], std::size_t sz) { +- return stack::push(L, str, str + sz); ++ return stack::push(L, (const wchar_t*)str, str + sz); + } + }; + +@@ -6177,7 +6177,7 @@ + } + + static int push(lua_State* L, const char16_t(&str)[N], std::size_t sz) { +- return stack::push(L, str, str + sz); ++ return stack::push(L, (const char16_t*)str, str + sz); + } + }; + +@@ -6188,7 +6188,7 @@ + } + + static int push(lua_State* L, const char32_t(&str)[N], std::size_t sz) { +- return stack::push(L, str, str + sz); ++ return stack::push(L, (const wchar_t*)str, str + sz); + } + }; + +@@ -6212,7 +6212,7 @@ + struct pusher { + static int push(lua_State* L, char32_t c) { + const char32_t str[2] = { c, '\0' }; +- return stack::push(L, str, 1); ++ return stack::push(L, (const char32_t*)str, 1); + } + }; + diff --git a/tremulous.spec b/tremulous.spec new file mode 100644 index 0000000..38b4a63 --- /dev/null +++ b/tremulous.spec @@ -0,0 +1,124 @@ +%define gitver %(echo %version | tr '~' -) +Name: tremulous +Version: 1.2.0~test.3 +Release: 1mamba +Summary: First Person Shooter game +Group: Applications/Games +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://tremulous.net/ +Source0: https://github.com/wtfbbqhax/tremulous.git/%{gitver}/tremulous-%{version}.tar.bz2 +Source1: https://github.com/wtfbbqhax/tremulous-data.git/master/tremulous-data-%{version}.tar.bz2 +Patch0: tremulous-1.2.0~test.3-sol-gcc-11.1.0.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libGLU-devel +BuildRequires: libSDL2-devel +BuildRequires: libcurl-devel +BuildRequires: libgcc +BuildRequires: libglvnd-devel +BuildRequires: libopenal-devel +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END + +%description +Tremulous is a free, open source game that blends a team based FPS with elements of an RTS. + +%debug_package + +%prep +%setup -q -a1 + +%global __requires_exclude_from ^%{_datadir}/tremolous/.*$ + +%patch0 -p1 + +%build +%cmake -d build + +%make + +:<< __OLD +# the CROSS_COMPILING=1 is a hack to not build q3cc and qvm files +# since we've stripped out q3cc as this is not Free Software. +%make \ + OPTIMIZE="%{optflags} -fno-strict-aliasing -ffast-math" \ + DEFAULT_BASEDIR=%{buildroo}%{_datadir}/%{name}/base USE_OPENAL_DLOPEN=1 USE_CODEC_VORBIS=1 \ + USE_LOCAL_HEADERS=0 BUILD_GAME_SO=0 COPYDIR=%{buildroot}%{_datadir}/%{name} USE_SYSTEM_JPEG=1 \ + BUILD_DIR=%{buildroot} COPYDIR=%{builddir}%{_datadir}/games/%{name} \ + BUILD_GAME_SO=0 GENERATE_DEPENDENCIES=0 USE_SDL=1 CROSS_COMPILING=1 + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +install -d -m0755 %{buildroot}%{_datadir} +cp -a build/release-linux-%{_target_cpu} %{buildroot}%{_datadir}/tremulous + +cp build/src/granger/src/nettle/libgranger_nettle.so %{buildroot}%{_datadir}/tremulous/ +cp build/src/granger/src/lua/libgranger_lua.so %{buildroot}%{_datadir}/tremulous/ +cp build/src/granger/src/premake/libpremake.so %{buildroot}%{_datadir}/tremulous/ +cp build/src/restclient/librestclient.so %{buildroot}%{_datadir}/tremulous/ + +convert misc/tremulous.xpm misc/%{name}.png +install -D -m 644 misc/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png + +install -d -m0755 %{buildroot}%{_datadir}/tremulous/base +cp tremulous-data-%{version}/*.pk3 %{buildroot}%{_datadir}/tremulous/base/ + +# Create the system menu entry +mkdir -p %{buildroot}%{_datadir}/applications +cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF +[Desktop Entry] +Name=Tremulous +Comment=First Person Shooter +Comment[it]=Sparatutto in prima persona +Exec=/usr/share/tremulous/tremulous +Icon=/usr/share/pixmaps/tremulous.png +Terminal=0 +Type=Application +Categories=Application;Game +EOF + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%dir %{_datadir}/tremulous +%dir %{_datadir}/tremulous/base +%{_datadir}/tremulous/base/*.pk3 +%dir %{_datadir}/tremulous/gpp +%{_datadir}/tremulous/gpp/*.so +%{_datadir}/tremulous/granger +%dir %{_datadir}/tremulous/qvm_tools +%{_datadir}/tremulous/qvm_tools/* +%{_datadir}/tremulous/renderer_opengl1.so +%{_datadir}/tremulous/renderer_opengl2.so +%{_datadir}/tremulous/libgranger_lua.so +%{_datadir}/tremulous/libgranger_nettle.so +%{_datadir}/tremulous/libpremake.so +%{_datadir}/tremulous/librestclient.so +%{_datadir}/tremulous/tremded +%{_datadir}/tremulous/tremulous +%{_datadir}/applications/tremulous.desktop +%{_datadir}/pixmaps/tremulous.png +%doc COPYING GPL CC + +%changelog +* Sun Jun 06 2021 Silvan Calarco 1.2.0~test.3-1mamba +- update to 1.2.0~test.3 + +* Sun Jun 06 2021 Silvan Calarco 2.0.0~alpha.3-1mamba +- update to 2.0.0~alpha.3 + +* Sun Jun 06 2021 Silvan Calarco 1.2.0-1mamba +- update to 1.2.0 + +* Thu Aug 22 2013 Automatic Build System 1.1.0-3mamba +- automatic rebuild by autodist + +* Sun Jul 27 2008 Ercole 'ercolinux' Carpanetto 1.1.0-2mamba +- correct some bug in the spec file, added a patch to correct the Makefile +* Tue May 20 2008 gil 1.1.0-1mamba +- first build