[packages/warzone2100] - up to 4.6.1

baggins baggins at pld-linux.org
Tue Sep 30 23:55:16 CEST 2025


commit 01231fd833e39eedbe157085d2097511d7f47faf
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Oct 1 01:54:58 2025 +0200

    - up to 4.6.1

 gcc8.patch       |  11 -----
 glew-1.12.patch  | 125 -------------------------------------------------------
 warzone2100.spec |  52 +++++++++--------------
 3 files changed, 19 insertions(+), 169 deletions(-)
---
diff --git a/warzone2100.spec b/warzone2100.spec
index 1084d82..038ab46 100644
--- a/warzone2100.spec
+++ b/warzone2100.spec
@@ -1,26 +1,18 @@
 Summary:	3D realtime strategy on a future Earth
 Summary(pl.UTF-8):	Gra RTS, której akcja toczy się w przyszłości
 Name:		warzone2100
-Version:	3.1.2
-Release:	5
+Version:	4.6.1
+Release:	1
 License:	GPL v2+
 Group:		X11/Applications/Games/Strategy
-Source0:	http://downloads.sourceforge.net/warzone2100/%{name}-%{version}.tar.xz
-# Source0-md5:	4e947125e9604821164f1ad9d1922447
-Patch0:		glew-1.12.patch
-Patch1:		gcc8.patch
-URL:		http://www.wz2100.net/
+Source0:	https://downloads.sourceforge.net/warzone2100/releases/%{version}/%{name}_src.tar.xz
+# Source0-md5:	500e1a169f39454789bfc6bdb66b7582
+URL:		https://www.wz2100.net/
 BuildRequires:	OpenAL-devel >= 0.0.8-4
 BuildRequires:	OpenGL-GLU-devel
-BuildRequires:	QtNetwork-devel
-BuildRequires:	QtScript-devel
 BuildRequires:	SDL-devel >= 1.2
 BuildRequires:	SDL_net-devel
-BuildRequires:	autoconf
-BuildRequires:	automake
-BuildRequires:	bison
-BuildRequires:	flex
-BuildRequires:	gettext-tools
+BuildRequires:	cmake
 BuildRequires:	glew-devel
 BuildRequires:	libjpeg-devel
 BuildRequires:	libmad-devel
@@ -62,36 +54,29 @@ BuildArch:	noarch
 Warzone 2100 data files
 
 %prep
-%setup -q
-%patch -P0 -p1
-%patch -P1 -p1
-
-# et_EE -> et
-%{__sed} -e 's/et_EE/et/g' -i po/LINGUAS
-mv po/et{_EE,}.po
-mv po/et{_EE,}.gmo
+%setup -q -n %{name}
 
 %build
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-%configure \
-	--with-distributor="PLD" \
-	--docdir=%{_docdir}/%{name}-%{version} \
-	--with-icondir=%{_pixmapsdir}
+mkdir -p build
+cd build
+%cmake ../ \
+	-DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name}-%{version}
+
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_pixmapsdir}
 
-%{__make} install \
+%{__make} -C build install \
         DESTDIR=$RPM_BUILD_ROOT
 
 # unsupported
 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ca_ES
 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/uk_UA
 
+%{__mv} $RPM_BUILD_ROOT{%{_iconsdir},%{_pixmapsdir}}/net.wz2100.warzone2100.png
+
 %find_lang %{name}
 
 %clean
@@ -102,8 +87,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc %{_docdir}/%{name}-%{version}
 %attr(755,root,root) %{_bindir}/%{name}
 %{_mandir}/man6/%{name}.6*
-%{_desktopdir}/%{name}.desktop
-%{_pixmapsdir}/%{name}.png
+%{_desktopdir}/net.wz2100.warzone2100.desktop
+%{_datadir}/metainfo/net.wz2100.warzone2100.metainfo.xml
+%{_pixmapsdir}/net.wz2100.warzone2100.png
 
 %files data
 %defattr(644,root,root,755)
diff --git a/gcc8.patch b/gcc8.patch
deleted file mode 100644
index edb786d..0000000
--- a/gcc8.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- warzone2100-3.1.2/src/challenge.cpp~	2013-11-24 02:25:10.000000000 +0100
-+++ warzone2100-3.1.2/src/challenge.cpp	2019-04-06 10:18:01.394811430 +0200
-@@ -100,7 +100,7 @@
- 
- 	fStr = strrchr(sRequestResult, '/');
- 	fStr++;	// skip slash
--	if (fStr == '\0')
-+	if (*fStr == '\0')
- 	{
- 		debug(LOG_ERROR, "Bad path to challenge file (%s)", sRequestResult);
- 		return;
diff --git a/glew-1.12.patch b/glew-1.12.patch
deleted file mode 100644
index 29a7fa7..0000000
--- a/glew-1.12.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 6a6c611ca3d9d6745e5343f2ee041892772ccae6 Mon Sep 17 00:00:00 2001
-From: vexed <vexed at wz2100.net>
-Date: Thu, 16 Jul 2015 22:45:14 -0400
-Subject: [PATCH] Resync/backport the code base:
-
-3.1: Remove hack to support some pre-OpenGL-2.0 systems that made
-assumptions about internals in GLEW that breaks with GLEW 1.12.
-
-See ticket:4300 reported by pabs
-
-(cherry picked from commit d512d1dc9857e3c2bbfa0a7b5856bdf420412b8f)
-
-Conflicts:
-	lib/ivis_opengl/screen.cpp
----
- lib/ivis_opengl/screen.cpp | 61 ----------------------------------------------
- lib/ivis_opengl/screen.h   |  1 -
- src/init.cpp               |  3 ---
- 3 files changed, 65 deletions(-)
-
-diff --git a/lib/ivis_opengl/screen.cpp b/lib/ivis_opengl/screen.cpp
-index b0aa0f5..b957227 100644
---- a/lib/ivis_opengl/screen.cpp
-+++ b/lib/ivis_opengl/screen.cpp
-@@ -175,7 +175,6 @@ bool screenInitialise()
- 
- 	if (canRunShaders)
- 	{
--		screen_EnableMissingFunctions();  // We need to do this before pie_LoadShaders(), but the effect of this call will be undone later by iV_TextInit(), so we will need to call it again.
- 		if (pie_LoadShaders())
- 		{
- 			pie_SetShaderAvailability(true);
-@@ -207,66 +206,6 @@ void screenShutDown(void)
- 	return GLEW_VERSION_1_5 || GLEW_ARB_vertex_buffer_object;
- }
- 
--// Make OpenGL's VBO functions available under the core names for drivers that support OpenGL 1.4 only but have the VBO extension
--void screen_EnableMissingFunctions()
--{
--	if (!GLEW_VERSION_1_3 && GLEW_ARB_multitexture)
--	{
--		debug(LOG_WARNING, "Pre-OpenGL 1.3: Fixing ARB_multitexture extension function names.");
--
--		__glewActiveTexture = __glewActiveTextureARB;
--		__glewMultiTexCoord2fv = __glewMultiTexCoord2fvARB;
--	}
--
--	if (!GLEW_VERSION_1_5 && GLEW_ARB_vertex_buffer_object)
--	{
--		debug(LOG_WARNING, "Pre-OpenGL 1.5: Fixing ARB_vertex_buffer_object extension function names.");
--
--		__glewBindBuffer = __glewBindBufferARB;
--		__glewBufferData = __glewBufferDataARB;
--		__glewBufferSubData = __glewBufferSubDataARB;
--		__glewDeleteBuffers = __glewDeleteBuffersARB;
--		__glewGenBuffers = __glewGenBuffersARB;
--		__glewGetBufferParameteriv = __glewGetBufferParameterivARB;
--		__glewGetBufferPointerv = __glewGetBufferPointervARB;
--		__glewGetBufferSubData = __glewGetBufferSubDataARB;
--		__glewIsBuffer = __glewIsBufferARB;
--		__glewMapBuffer = __glewMapBufferARB;
--		__glewUnmapBuffer = __glewUnmapBufferARB;
--	}
--
--	if (!GLEW_VERSION_2_0 && GLEW_ARB_shader_objects)
--	{
--		debug(LOG_WARNING, "Pre-OpenGL 2.0: Fixing ARB_shader_objects extension function names.");
--
--		__glewGetUniformLocation = __glewGetUniformLocationARB;
--		__glewAttachShader = __glewAttachObjectARB;
--		__glewCompileShader = __glewCompileShaderARB;
--		__glewCreateProgram = __glewCreateProgramObjectARB;
--		__glewCreateShader = __glewCreateShaderObjectARB;
--		__glewGetProgramInfoLog = __glewGetInfoLogARB;
--		__glewGetShaderInfoLog = __glewGetInfoLogARB;  // Same as previous.
--		__glewGetProgramiv = __glewGetObjectParameterivARB;
--		__glewUseProgram = __glewUseProgramObjectARB;
--		__glewGetShaderiv = __glewGetObjectParameterivARB;
--		__glewLinkProgram = __glewLinkProgramARB;
--		__glewShaderSource = __glewShaderSourceARB;
--		__glewUniform1f = __glewUniform1fARB;
--		__glewUniform1i = __glewUniform1iARB;
--		__glewUniform4fv = __glewUniform4fvARB;
--	}
--
--	if ((GLEW_ARB_imaging || GLEW_EXT_blend_color) && __glewBlendColor == NULL)
--	{
--		__glewBlendColor = __glewBlendColorEXT;  // Shouldn't be needed if GLEW_ARB_imaging is true, but apparently is needed even in that case, with some drivers..?
--		if (__glewBlendColor == NULL)
--		{
--			debug(LOG_ERROR, "Your graphics driver is broken, and claims to support ARB_imaging or EXT_blend_color without exporting glBlendColor[EXT].");
--			__GLEW_ARB_imaging = __GLEW_EXT_blend_color = 0;
--		}
--	}
--}
--
- void screen_SetBackDropFromFile(const char* filename)
- {
- 	// HACK : We should use a resource handler here!
-diff --git a/lib/ivis_opengl/screen.h b/lib/ivis_opengl/screen.h
-index 7cfc819..09235f4 100644
---- a/lib/ivis_opengl/screen.h
-+++ b/lib/ivis_opengl/screen.h
-@@ -62,7 +62,6 @@ extern void screenDoDumpToDiskIfRequired(void);
- void screen_enableMapPreview(char *name, int width, int height, Vector2i *playerpositions);
- void screen_disableMapPreview(void);
- bool screen_getMapPreview(void);
--void screen_EnableMissingFunctions();
- 
- struct OPENGL_DATA
- {
-diff --git a/src/init.cpp b/src/init.cpp
-index aaf7003..3f42313 100644
---- a/src/init.cpp
-+++ b/src/init.cpp
-@@ -716,9 +716,6 @@ bool systemInitialise(void)
- 	// Initialize the iVis text rendering module
- 	iV_TextInit();
- 
--	// Fix badly named OpenGL functions. Must be done after iV_TextInit, to avoid the renames being clobbered by an extra glewInit() call.
--	screen_EnableMissingFunctions();
--
- 	iV_Reset();								// Reset the IV library.
- 	readAIs();
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/warzone2100.git/commitdiff/01231fd833e39eedbe157085d2097511d7f47faf



More information about the pld-cvs-commit mailing list