[packages/mysdl] Rel 2

arekm arekm at pld-linux.org
Fri May 8 23:10:46 CEST 2026


commit 59af4c937178985c8d41a971b58da74cd468ca99
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri May 8 23:10:37 2026 +0200

    Rel 2

 mysdl-gcc15-fixes.patch   | 142 ++++++++++++++++++++++++++++++++++++++++++++++
 mysdl-scons-python3.patch |  91 +++++++++++++++++++++++++++++
 mysdl.spec                |   8 ++-
 3 files changed, 240 insertions(+), 1 deletion(-)
---
diff --git a/mysdl.spec b/mysdl.spec
index 7b85b56..55de7dc 100644
--- a/mysdl.spec
+++ b/mysdl.spec
@@ -2,11 +2,15 @@ Summary:	MySDL library
 Summary(pl.UTF-8):	Biblioteka MySDL
 Name:		mysdl
 Version:	1.0.1
-Release:	1
+Release:	2
 License:	GPL
 Group:		Libraries
 Source0:	http://source.musgit.com/files/%{name}_%{version}.tar.bz2
 # Source0-md5:	57338c671b01df9636cba1466f05be73
+Patch0:		%{name}-scons-python3.patch
+# Patch0-md5:	794887ecb1fa44ee1d08b9c071d53916
+Patch1:		%{name}-gcc15-fixes.patch
+# Patch1-md5:	a7d00d3a29945d9fadec8b32cf01532a
 URL:		http://source.musgit.com/
 BuildRequires:	OpenAL-devel
 BuildRequires:	OpenGL-GLU-devel
@@ -27,6 +31,8 @@ OpenGL, OpenAL i kilku innych o otwartych źródłach.
 
 %prep
 %setup -q -n %{name}_%{version}
+%patch -P 0 -p1
+%patch -P 1 -p1
 
 %build
 sed -i "s/CXXFLAGS=\['-march=pentium'\]/CXXFLAGS=Split(ARGUMENTS.get('CXXFLAGS',''))/" SConstruct
diff --git a/mysdl-gcc15-fixes.patch b/mysdl-gcc15-fixes.patch
new file mode 100644
index 0000000..cf4414e
--- /dev/null
+++ b/mysdl-gcc15-fixes.patch
@@ -0,0 +1,142 @@
+--- a/src/files.cpp	2026-05-08 23:00:40.140731621 +0200
++++ b/src/files.cpp	2026-05-08 23:00:43.003169508 +0200
+@@ -23,6 +23,7 @@
+ #include <string.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <unistd.h>
+ 
+ #include "files.h"
+ 
+--- a/src/gui/core.cpp	2026-05-08 23:00:40.142538891 +0200
++++ b/src/gui/core.cpp	2026-05-08 23:00:52.599836174 +0200
+@@ -31,31 +31,28 @@
+ 
+ namespace mysdl
+ {
++	template<> gui::Orientation strTo<gui::Orientation>(std::string str)
++	{
++		if(str=="horizontal")
++		{
++			return(mysdl::gui::orHorizontal);
++		}
++		else if(str=="vertical")
++		{
++			return(mysdl::gui::orVertical);
++		}
++		else
++		{
++			throw(str);
++		}
++	}
++
+ 	namespace gui
+ 	{
+ 		// ================================================================
+ 		//  Common functions
+ 		// ================================================================
+ 
+-		/*
+-		 * See header file for documentation.
+-		 */
+-		template<> Orientation strTo<Orientation>(std::string str)
+-		{
+-			if(str=="horizontal")
+-			{
+-				return(mysdl::gui::orHorizontal);
+-			}
+-			else if(str=="vertical")
+-			{
+-				return(mysdl::gui::orVertical);
+-			}
+-			else
+-			{
+-				throw(str);
+-			}
+-		}
+-
+ 		// ================================================================
+ 		//  GuiResourceBankGenerator
+ 		// ================================================================
+--- a/src/gui/slider.cpp	2026-05-08 23:00:40.144163439 +0200
++++ b/src/gui/slider.cpp	2026-05-08 23:00:59.646502841 +0200
+@@ -24,37 +24,34 @@
+ 
+ namespace mysdl
+ {
++	template<> gui::SliderButtons strTo<gui::SliderButtons>(std::string str)
++	{
++		if(str=="none")
++		{
++			return(mysdl::gui::sbNone);
++		}
++		else if(str=="dec")
++		{
++			return(mysdl::gui::sbDec);
++		}
++		else if(str=="inc")
++		{
++			return(mysdl::gui::sbInc);
++		}
++		else if(str=="both")
++		{
++			return(mysdl::gui::sbBoth);
++		}
++		else
++		{
++			throw(str);
++		}
++	}
++
+ 	namespace gui
+ 	{
+ 		// ================================================================
+ 		//  Slider
+ 		// ================================================================
+-
+-		/*
+-		 * See header file for documentation.
+-		 */
+-		template<> SliderButtons strTo<SliderButtons>(std::string str)
+-		{
+-			if(str=="none")
+-			{
+-				return(mysdl::gui::sbNone);
+-			}
+-			else if(str=="dec")
+-			{
+-				return(mysdl::gui::sbDec);
+-			}
+-			else if(str=="inc")
+-			{
+-				return(mysdl::gui::sbInc);
+-			}
+-			else if(str=="both")
+-			{
+-				return(mysdl::gui::sbBoth);
+-			}
+-			else
+-			{
+-				throw(str);
+-			}
+-		}
+ 	};
+ };
+--- a/src/mysdl.cpp	2026-05-08 23:00:40.145806829 +0200
++++ b/src/mysdl.cpp	2026-05-08 23:01:11.916502842 +0200
+@@ -804,12 +804,9 @@
+ 				{
+ 					png_init_io(png_ptr,file);
+ 
+-					info_ptr->width=surf->w;
+-					info_ptr->height=surf->h;
+-					info_ptr->bit_depth=8;
+-					info_ptr->color_type=PNG_COLOR_TYPE_RGBA;
+-					info_ptr->interlace_type=1;
+-					info_ptr->valid=0;
++					png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h,
++						8, PNG_COLOR_TYPE_RGBA, PNG_INTERLACE_ADAM7,
++						PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+ 
+ 					png_write_info(png_ptr,info_ptr);
+ 
diff --git a/mysdl-scons-python3.patch b/mysdl-scons-python3.patch
new file mode 100644
index 0000000..68753fb
--- /dev/null
+++ b/mysdl-scons-python3.patch
@@ -0,0 +1,91 @@
+--- mysdl_1.0.1.orig/SConstruct	2026-05-08 22:57:08.149928959 +0200
++++ mysdl_1.0.1/SConstruct	2026-05-08 22:59:18.139836174 +0200
+@@ -27,7 +27,7 @@
+ 		env.Append(CXXFLAGS='-ansi');
+ 
+ 		if(platform=='win32'):
+-			print "Cross-compiling on posix for win32.";
++			print("Cross-compiling on posix for win32.");
+ 
+ 			env['CC']='i586-mingw32msvc-gcc';
+ 			env['CXX']='i586-mingw32msvc-g++';
+@@ -39,7 +39,7 @@
+ 			env.Append(LIBS=WIN_LIBS);
+ 			env.Append(CPPDEFINES="win32");
+ 		else:
+-			print "Compiling for native linux system.";
++			print("Compiling for native linux system.");
+ 			platform='linux';
+ 
+ 			conf=Configure(env);
+@@ -48,28 +48,28 @@
+ 			#		print 'pthread library required.';
+ 			#		Exit(1);
+ 
+-			if(not(conf.CheckLibWithHeader('SDL','SDL/SDL.h','c++','SDL_Init(0);'))):
+-					print 'SDL library required.';
++			if(not(conf.CheckLibWithHeader('SDL','SDL/SDL.h','c++',call='SDL_Init(0);'))):
++					print('SDL library required.');
+ 					Exit(1);
+ 
+-			if(not(conf.CheckLibWithHeader('GL','GL/gl.h','c++','glLoadIdentity();'))):
+-					print 'OpenGL library required.';
++			if(not(conf.CheckLibWithHeader('GL','GL/gl.h','c++',call='glLoadIdentity();'))):
++					print('OpenGL library required.');
+ 					Exit(1);
+ 
+-			if(not(conf.CheckLibWithHeader('GLU','GL/glu.h','c++','gluPerspective(0,0,0,0);'))):
+-					print 'OpenGL library required.';
++			if(not(conf.CheckLibWithHeader('GLU','GL/glu.h','c++',call='gluPerspective(0,0,0,0);'))):
++					print('OpenGL library required.');
+ 					Exit(1);
+ 
+-			if(not(conf.CheckLibWithHeader('SDL_image','SDL/SDL_image.h','c++','IMG_Load(0);'))):
+-					print 'SDL_image library required.';
++			if(not(conf.CheckLibWithHeader('SDL_image','SDL/SDL_image.h','c++',call='IMG_Load(0);'))):
++					print('SDL_image library required.');
+ 					Exit(1);
+ 
+-			if(not(conf.CheckLibWithHeader('expat','expat.h','c++','XML_ParserCreate(0);'))):
+-					print 'eXpat library required.';
++			if(not(conf.CheckLibWithHeader('expat','expat.h','c++',call='XML_ParserCreate(0);'))):
++					print('eXpat library required.');
+ 					Exit(1);
+ 
+-			if(not(conf.CheckLibWithHeader('openal','AL/al.h','c++','alGenBuffers(1,0);'))):
+-					print 'OpenAL library required.';
++			if(not(conf.CheckLibWithHeader('openal','AL/al.h','c++',call='alGenBuffers(1,0);'))):
++					print('OpenAL library required.');
+ 					Exit(1);
+ 
+ 			#if(not(conf.CheckLibWithHeader('physfs','physfs.h','c++','PHYSFS_init(0);'))):
+@@ -78,7 +78,7 @@
+ 
+ 			env=conf.Finish();
+ 	else:
+-		print "Compiling for native win32 system.";
++		print("Compiling for native win32 system.");
+ 		platform='win32';
+ 
+ 		env.Append(CXXFLAGS=WIN_CXX_FLAGS);
+@@ -93,7 +93,7 @@
+ 	#env.Append(LIBS='mysdl');
+ 
+ 	# Prepare build
+-	env.BuildDir(BUILD_DIR,'src',duplicate=0);
++	env.VariantDir(BUILD_DIR,'src',duplicate=0);
+ 	Export('env');
+ 
+ 	# Build
+@@ -160,9 +160,9 @@
+ dist=ARGUMENTS.get('dist','0');
+ 
+ if(dist=='1'):
+-	print "Building distribution version.";
++	print("Building distribution version.");
+ else:
+-	print "Building development version.";
++	print("Building development version.");
+ 
+ built=0;
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mysdl.git/commitdiff/59af4c937178985c8d41a971b58da74cd468ca99



More information about the pld-cvs-commit mailing list