[packages/libsap] Rel 4
arekm
arekm at pld-linux.org
Sun Mar 15 16:58:42 CET 2026
commit 98a7e007859bbbb059a7d3cb368bd9adfb66975f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Mar 15 16:58:35 2026 +0100
Rel 4
libsap-fix-warnings.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++
libsap.spec | 4 +++-
2 files changed, 50 insertions(+), 1 deletion(-)
---
diff --git a/libsap.spec b/libsap.spec
index 55d2f8b..c58dbfb 100644
--- a/libsap.spec
+++ b/libsap.spec
@@ -2,7 +2,7 @@ Summary: Emulation library of CPU 6502 and Pokey chip used in Atari XL/XE
Summary(pl.UTF-8): Biblioteka emulacji procesora 6502 i układu Pokey z Atari XL/XE
Name: libsap
Version: 1.54.1
-Release: 3
+Release: 4
License: Freeware
Group: Libraries
#Source0: http://kunik.republika.pl/sap/dl/%{name}-%{version}.tar.gz
@@ -13,6 +13,7 @@ Patch1: %{name}-shared.patch
Patch2: %{name}-warnings.patch
Patch3: %{name}-c.patch
Patch4: dword_u.patch
+Patch5: %{name}-fix-warnings.patch
URL: http://kunik.republika.pl/sap/
BuildRequires: libstdc++-devel
BuildRequires: libtool
@@ -64,6 +65,7 @@ Statyczna biblioteka libsap.
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
+%patch -P5 -p1
mv -f sapLib.h libsap.h
ln -sf libsap.h sapLib.h
diff --git a/libsap-fix-warnings.patch b/libsap-fix-warnings.patch
new file mode 100644
index 0000000..bccff0f
--- /dev/null
+++ b/libsap-fix-warnings.patch
@@ -0,0 +1,47 @@
+--- sap.src/sapEngine.cpp.orig 2026-03-15 16:11:10.279895229 +0100
++++ sap.src/sapEngine.cpp 2026-03-15 16:10:42.991671086 +0100
+@@ -133,7 +133,7 @@
+ if( i==0 )
+ continue;
+ inputBuffer[i++] = 0;
+- char *codes[]={ "PLAYER", "MUSIC", "INIT", "TYPE", "SONGS", "DEFSONG", "FASTPLAY", "STEREO", "TIME", NULL };
++ const char *codes[]={ "PLAYER", "MUSIC", "INIT", "TYPE", "SONGS", "DEFSONG", "FASTPLAY", "STEREO", "TIME", NULL };
+ int j,k,a;
+ for( j=0;; j++ )
+ {
+@@ -231,7 +231,7 @@
+ goto cont;
+ }
+ numOfSongs = a;
+- sprintf( &commentBuffer[ strlen(commentBuffer) ], "Number of songs = %d\n", numOfSongs );
++ snprintf( &commentBuffer[ strlen(commentBuffer) ], sizeof(commentBuffer) - strlen(commentBuffer), "Number of songs = %d\n", numOfSongs );
+ i = 0;
+ goto cont;
+ break;
+@@ -262,7 +262,7 @@
+ case 7: // Stereo
+ isStereo = true;
+ sampleStep = 2;
+- sprintf( &commentBuffer[ strlen(commentBuffer) ], "In Stereo!\n" );
++ snprintf( &commentBuffer[ strlen(commentBuffer) ], sizeof(commentBuffer) - strlen(commentBuffer), "In Stereo!\n" );
+ i = 0;
+ goto cont;
+ break;
+@@ -276,7 +276,7 @@
+ i = 0;
+ goto cont;
+ }
+- sprintf( &commentBuffer[ strlen(commentBuffer) ], "Time in sec %d\n", min*60+sec );
++ snprintf( &commentBuffer[ strlen(commentBuffer) ], sizeof(commentBuffer) - strlen(commentBuffer), "Time in sec %d\n", min*60+sec );
+ i = 0;
+ goto cont;
+ break;
+@@ -292,7 +292,7 @@
+ k++;
+ }
+ }
+- sprintf( &commentBuffer[ strlen(commentBuffer) ], "%s\n", inputBuffer );
++ snprintf( &commentBuffer[ strlen(commentBuffer) ], sizeof(commentBuffer) - strlen(commentBuffer), "%s\n", inputBuffer );
+ // not found
+ i = 0;
+ continue;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libsap.git/commitdiff/98a7e007859bbbb059a7d3cb368bd9adfb66975f
More information about the pld-cvs-commit
mailing list