From 7acf87cd6a85b43261c71c0ae74ac26674e08155 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 19:11:43 +0100 Subject: [PATCH] fix for missing third party libraries by passing BUILD_SHARED_LIBS=OFF [release 3.4.1-2mamba;Wed Mar 24 2021] --- warzone2100-3.4.1-link_libz.patch | 11 +++++++ warzone2100.spec | 51 ++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 warzone2100-3.4.1-link_libz.patch diff --git a/warzone2100-3.4.1-link_libz.patch b/warzone2100-3.4.1-link_libz.patch new file mode 100644 index 0000000..a15c88f --- /dev/null +++ b/warzone2100-3.4.1-link_libz.patch @@ -0,0 +1,11 @@ +--- warzone2100/src/CMakeLists.txt.orig 2021-03-01 00:36:07.480997337 +0100 ++++ warzone2100/src/CMakeLists.txt 2021-03-01 00:34:37.993463912 +0100 +@@ -185,7 +185,7 @@ + target_link_libraries(warzone2100 ${QT5ALL_LIBRARIES} ${QT5ALL_LDFLAGS_OTHER}) + target_link_libraries(warzone2100 version Qt5::QWindowsIntegrationPlugin Qt5ThemeSupport Qt5FontDatabaseSupport Qt5EventDispatcherSupport) + else() +- set_target_properties(warzone2100 PROPERTIES LINK_FLAGS "-Wl,--start-group") ++ set_target_properties(warzone2100 PROPERTIES LINK_FLAGS "-Wl,--start-group /usr/lib64/libz.a") + endif() + endif() + diff --git a/warzone2100.spec b/warzone2100.spec index 1bacfe4..63576af 100644 --- a/warzone2100.spec +++ b/warzone2100.spec @@ -1,37 +1,40 @@ Name: warzone2100 -Version: 3.2.3 -Release: 1mamba +Version: 3.4.1 +Release: 2mamba Summary: 3D real time strategy game Group: Applications/Games Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: http://wz2100.net/ -Source: http://downloads.sourceforge.net/project/%{name}/releases/%{version}/%{name}-%{version}.tar.xz -#Source: http://downloads.sourceforge.net/project/%{name}/%{name}/Warzone%202100%20%{version}/%{name}-%{version}.tar.gz +URL: https://wz2100.net/ +# Note: source manually renamed to add version +Source: https://sourceforge.net/projects/warzone2100/files/releases/%{version}/warzone2100-%{version}.tar.xz +Patch0: warzone2100-3.4.1-link_libz.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel -BuildRequires: libgcc BuildRequires: libGL-devel BuildRequires: libGLU-devel +BuildRequires: libSDL2-devel +BuildRequires: libcurl-devel +BuildRequires: libfreetype-devel +BuildRequires: libgcc +BuildRequires: libglew-devel +BuildRequires: libharfbuzz-devel +BuildRequires: libminiupnpc-devel BuildRequires: libogg-devel BuildRequires: libopenal-devel BuildRequires: libphysfs-devel BuildRequires: libpng-devel -BuildRequires: libpopt-devel -BuildRequires: libSDL-devel -BuildRequires: libSDL_net-devel +BuildRequires: libqt5-devel +BuildRequires: libsodium-devel BuildRequires: libstdc++6-devel BuildRequires: libtheora-devel BuildRequires: libvorbis-devel -BuildRequires: libX11-devel -BuildRequires: quesoglc-devel +BuildRequires: libz-devel ## AUTOBUILDREQ-END BuildRequires: bison -BuildRoot: %{_tmppath}/%{name}-%{version}-root - %description Warzone 2100 is a 3D realtime strategy game on a future Earth. Warzone 2100 Resurrection is an effort to continue maintainence and publishing of Warzone 2100. Warzone 2100 was one of the first 3D RTS games ever. It was released commercially by Pumpkin Studies in 1999, and released in 2004 under the GPL. @@ -53,17 +56,21 @@ Featuring: * Cross-Platform internet/intranet multiplayer with up to 8 players * Challenging Computer-AI +%debug_package + %prep -%setup -q +%setup -q -n warzone2100 %build -export LDFLAGS='-L %{_libdir}' -%configure +%cmake -d build \ + -DBUILD_SHARED_LIBS=OFF \ + -DWZ_DISTRIBUTOR="openmamba" + %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%makeinstall DESTDIR=%{buildroot} +%makeinstall -C build %find_lang %{name} @@ -77,6 +84,10 @@ export LDFLAGS='-L %{_libdir}' %{_datadir}/metainfo/warzone2100.appdata.xml %{_datadir}/icons/warzone2100.png %dir %{_datadir}/warzone2100 +%dir %{_datadir}/warzone2100/fonts +%{_datadir}/warzone2100/fonts/DejaVu.LICENSE.txt +%{_datadir}/warzone2100/fonts/DejaVuSans-Bold.ttf +%{_datadir}/warzone2100/fonts/DejaVuSans.ttf #%dir %{_datadir}/warzone2100/mods %dir %{_datadir}/warzone2100/music %{_datadir}/warzone2100/*.wz @@ -89,6 +100,12 @@ export LDFLAGS='-L %{_libdir}' %doc AUTHORS COPYING ChangeLog %changelog +* Wed Mar 24 2021 Silvan Calarco 3.4.1-2mamba +- fix for missing third party libraries by passing BUILD_SHARED_LIBS=OFF + +* Mon Feb 01 2021 Silvan Calarco 3.4.1-1mamba +- update to 3.4.1 + * Mon Aug 14 2017 Automatic Build System 3.2.3-1mamba - automatic version update by autodist