fix internally built deps with BUILD_SHARED_LIBS=OFF [release 4.4.2-2mamba;Sun Mar 03 2024]

This commit is contained in:
Silvan Calarco 2024-03-04 10:04:10 +01:00
parent 7acf87cd6a
commit ca46abca0b
3 changed files with 36 additions and 28 deletions

View File

@ -1,11 +0,0 @@
--- 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()

3
warzone2100-autoupdate Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
VERSION=$1
curl -L https://github.com/Warzone2100/warzone2100/releases/download/${VERSION}/warzone2100_src.tar.xz -o warzone2100-${VERSION}.tar.xz

View File

@ -1,5 +1,5 @@
Name: warzone2100
Version: 3.4.1
Version: 4.4.2
Release: 2mamba
Summary: 3D real time strategy game
Group: Applications/Games
@ -7,33 +7,32 @@ Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
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
Source: https://github.com/Warzone2100/warzone2100/releases/download/%{version}/warzone2100-%{version}.tar.xz
Source1: warzone2100-autoupdate
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libGL-devel
BuildRequires: libGLU-devel
BuildRequires: libSDL2-devel
BuildRequires: libcurl-devel
BuildRequires: libfreetype-devel
BuildRequires: libfribidi-devel
BuildRequires: libgcc
BuildRequires: libglew-devel
BuildRequires: libharfbuzz-devel
BuildRequires: libminiupnpc-devel
BuildRequires: libogg-devel
BuildRequires: libopenal-devel
BuildRequires: libopus-devel
BuildRequires: libphysfs-devel
BuildRequires: libpng-devel
BuildRequires: libqt5-devel
BuildRequires: libsodium-devel
BuildRequires: libsqlite-devel
BuildRequires: libstdc++6-devel
BuildRequires: libtheora-devel
BuildRequires: libvorbis-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: bison
BuildRequires: libdiscord-rpc-devel
%description
Warzone 2100 is a 3D realtime strategy game on a future Earth.
@ -59,12 +58,15 @@ Featuring:
%debug_package
%prep
%setup -q -n warzone2100
%setup -q -n %{name}
%build
%cmake -d build \
-DFMT_SYSTEM_HEADERS=ON \
-DFMT_INSTALL=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DWZ_DISTRIBUTOR="openmamba"
-DWZ_DISTRIBUTOR="openmamba" \
-Wno-dev
%make
@ -80,26 +82,40 @@ Featuring:
%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/warzone2100
%{_datadir}/applications/warzone2100.desktop
%{_datadir}/metainfo/warzone2100.appdata.xml
%{_datadir}/icons/warzone2100.png
%{_datadir}/applications/net.wz2100.warzone2100.desktop
%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
%{_metainfodir}/net.wz2100.warzone2100.metainfo.xml
%{_datadir}/warzone2100/fonts/Noto.LICENSE.txt
%{_datadir}/warzone2100/fonts/NotoSansCJK-VF.otf.ttc
%dir %{_datadir}/warzone2100/music/albums
%dir %{_datadir}/warzone2100/music/albums/aftermath_soundtrack
%{_datadir}/warzone2100/music/albums/aftermath_soundtrack/*
%dir %{_datadir}/warzone2100/music/albums/legacy_soundtrack
%{_datadir}/warzone2100/music/albums/legacy_soundtrack/*
%dir %{_datadir}/warzone2100/music/albums/original_soundtrack
%{_datadir}/warzone2100/music/albums/original_soundtrack/*
%{_datadir}/warzone2100/music/menu.opus
%dir %{_datadir}/warzone2100/terrain_overrides
%{_datadir}/warzone2100/terrain_overrides/*
%{_datadir}/warzone2100/*.wz
%{_datadir}/warzone2100/music/*.ogg
%{_datadir}/warzone2100/music/*.wpl
#%{_datadir}/warzone2100/mods/multiplay/*.wz
%{_datadir}/icons/net.wz2100.warzone2100.png
%dir %{_docdir}/warzone2100
%{_docdir}/warzone2100/*
%{_mandir}/man6/warzone2100.6*
%doc AUTHORS COPYING ChangeLog
%changelog
* Sun Mar 03 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.2-2mamba
- fix internally built deps with BUILD_SHARED_LIBS=OFF
* Sat Mar 02 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.2-1mamba
- update to 4.4.2
* Wed Mar 24 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.1-2mamba
- fix for missing third party libraries by passing BUILD_SHARED_LIBS=OFF