[packages/advancescan] - added throw patch to allow build in C++17 mode; release 2

qboosh qboosh at pld-linux.org
Wed Apr 17 22:19:42 CEST 2024


commit a703cc35943eeb90b810e048a782fd347c89c797
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Apr 17 22:13:34 2024 +0200

    - added throw patch to allow build in C++17 mode; release 2

 advancescan-throw.patch | 263 ++++++++++++++++++++++++++++++++++++++++++++++++
 advancescan.spec        |   4 +-
 2 files changed, 266 insertions(+), 1 deletion(-)
---
diff --git a/advancescan.spec b/advancescan.spec
index 6743492..0bd5405 100644
--- a/advancescan.spec
+++ b/advancescan.spec
@@ -3,12 +3,13 @@ Summary:	AdvanceSCAN ROMs Manager
 Summary(pl.UTF-8):	AdvanceSCAN - zarządca ROM-ów
 Name:		advancescan
 Version:	1.18
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		Applications/File
 #Source0Download: https://github.com/amadvance/advancescan/releases
 Source0:	https://github.com/amadvance/advancescan/releases/download/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	85d964fe0d34a5722ce923f7fbb8a115
+Patch0:		%{name}-throw.patch
 URL:		http://www.advancemame.it/scan-readme
 BuildRequires:	libstdc++-devel
 BuildRequires:	zlib-devel
@@ -24,6 +25,7 @@ emulatorów AdvanceMAME, AdvanceMESS i innych pochodnych MAME.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure
diff --git a/advancescan-throw.patch b/advancescan-throw.patch
new file mode 100644
index 0000000..47ac918
--- /dev/null
+++ b/advancescan-throw.patch
@@ -0,0 +1,263 @@
+--- advancescan-1.18/file.h.orig	2013-03-01 19:36:17.000000000 +0100
++++ advancescan-1.18/file.h	2024-04-17 21:12:28.946721160 +0200
+@@ -67,28 +67,28 @@ typedef unsigned crc_t;
+ crc_t crc_compute(const char* data, unsigned len);
+ crc_t crc_compute(crc_t pred, const char* data, unsigned len);
+ 
+-bool file_exists(const std::string& file) throw (error);
+-void file_write(const std::string& path, const char* data, unsigned size) throw (error);
+-void file_read(const std::string& path, char* data, unsigned size) throw (error);
+-void file_read(const std::string& path, char* data, unsigned offset, unsigned size) throw (error);
+-time_t file_time(const std::string& path) throw (error);
+-void file_utime(const std::string& path, time_t tod) throw (error);
+-unsigned file_size(const std::string& path) throw (error);
+-crc_t file_crc(const std::string& path) throw (error);
+-void file_copy(const std::string& path1, const std::string& path2) throw (error);
+-void file_move(const std::string& path1, const std::string& path2) throw (error);
+-void file_remove(const std::string& path1) throw (error);
+-void file_mktree(const std::string& path1) throw (error);
++bool file_exists(const std::string& file);
++void file_write(const std::string& path, const char* data, unsigned size);
++void file_read(const std::string& path, char* data, unsigned size);
++void file_read(const std::string& path, char* data, unsigned offset, unsigned size);
++time_t file_time(const std::string& path);
++void file_utime(const std::string& path, time_t tod);
++unsigned file_size(const std::string& path);
++crc_t file_crc(const std::string& path);
++void file_copy(const std::string& path1, const std::string& path2);
++void file_move(const std::string& path1, const std::string& path2);
++void file_remove(const std::string& path1);
++void file_mktree(const std::string& path1);
+ 
+-std::string file_temp(const std::string& path) throw ();
+-std::string file_randomize(const std::string& path, int n) throw ();
+-std::string file_name(const std::string& file) throw ();
+-std::string file_dir(const std::string& file) throw ();
+-std::string file_basename(const std::string& file) throw ();
+-std::string file_basepath(const std::string& file) throw ();
+-std::string file_ext(const std::string& file) throw ();
+-int file_compare(const std::string& path1, const std::string& path2) throw ();
+-std::string file_adjust(const std::string& path) throw ();
++std::string file_temp(const std::string& path);
++std::string file_randomize(const std::string& path, int n);
++std::string file_name(const std::string& file);
++std::string file_dir(const std::string& file);
++std::string file_basename(const std::string& file);
++std::string file_basepath(const std::string& file);
++std::string file_ext(const std::string& file);
++int file_compare(const std::string& path1, const std::string& path2);
++std::string file_adjust(const std::string& path);
+ 
+ #endif
+ 
+--- advancescan-1.18/file.cc.orig	2013-03-01 19:34:40.000000000 +0100
++++ advancescan-1.18/file.cc	2024-04-17 21:16:46.921630058 +0200
+@@ -98,7 +98,7 @@ void infopath::readonly_set(bool Areadon
+ /**
+  * Check if a file exists.
+  */
+-bool file_exists(const string& path) throw (error)
++bool file_exists(const string& path)
+ {
+ 	struct stat s;
+ 	if (stat(path.c_str(), &s) != 0) {
+@@ -114,7 +114,7 @@ bool file_exists(const string& path) thr
+ /**
+  * Write a whole file.
+  */
+-void file_write(const string& path, const char* data, unsigned size) throw (error)
++void file_write(const string& path, const char* data, unsigned size)
+ {
+ 	FILE* f = fopen(path.c_str(), "wb");
+ 	if (!f)
+@@ -134,7 +134,7 @@ void file_write(const string& path, cons
+ /**
+  * Read a whole file.
+  */
+-void file_read(const string& path, char* data, unsigned size) throw (error)
++void file_read(const string& path, char* data, unsigned size)
+ {
+ 	file_read(path, data, 0, size);
+ }
+@@ -142,7 +142,7 @@ void file_read(const string& path, char*
+ /**
+  * Read a whole file.
+  */
+-void file_read(const string& path, char* data, unsigned offset, unsigned size) throw (error)
++void file_read(const string& path, char* data, unsigned offset, unsigned size)
+ {
+ 	FILE* f = fopen(path.c_str(), "rb");
+ 	if (!f)
+@@ -166,7 +166,7 @@ void file_read(const string& path, char*
+ /**
+  * Get the time of a file.
+  */
+-time_t file_time(const string& path) throw (error)
++time_t file_time(const string& path)
+ {
+ 	struct stat s;
+ 	if (stat(path.c_str(), &s)!=0)
+@@ -178,7 +178,7 @@ time_t file_time(const string& path) thr
+ /**
+  * Set the time of a file.
+  */
+-void file_utime(const string& path, time_t tod) throw (error)
++void file_utime(const string& path, time_t tod)
+ {
+ 	struct utimbuf u;
+ 
+@@ -192,7 +192,7 @@ void file_utime(const string& path, time
+ /**
+  * Get the size of a file.
+  */
+-unsigned file_size(const string& path) throw (error)
++unsigned file_size(const string& path)
+ {
+ 	struct stat s;
+ 	if (stat(path.c_str(), &s)!=0)
+@@ -204,7 +204,7 @@ unsigned file_size(const string& path) t
+ /**
+  * Get the crc of a file.
+  */
+-crc_t file_crc(const string& path) throw (error)
++crc_t file_crc(const string& path)
+ {
+ 	unsigned size = file_size(path);
+ 
+@@ -227,7 +227,7 @@ crc_t file_crc(const string& path) throw
+ /**
+  * Copy a file.
+  */
+-void file_copy(const string& path1, const string& path2) throw (error)
++void file_copy(const string& path1, const string& path2)
+ {
+ 	unsigned size;
+ 
+@@ -249,7 +249,7 @@ void file_copy(const string& path1, cons
+ /**
+  * Move a file.
+  */
+-void file_move(const string& path1, const string& path2) throw (error)
++void file_move(const string& path1, const string& path2)
+ {
+ 	if (rename(path1.c_str(), path2.c_str())!=0
+ 		&& errno==EXDEV) {
+@@ -271,7 +271,7 @@ void file_move(const string& path1, cons
+ /**
+  * Remove a file.
+  */
+-void file_remove(const string& path1) throw (error)
++void file_remove(const string& path1)
+ {
+ 	if (remove(path1.c_str())!=0) {
+ 		throw error() << "Failed remove of " << path1;
+@@ -281,7 +281,7 @@ void file_remove(const string& path1) th
+ /**
+  * Rename a file.
+  */
+-void file_rename(const string& path1, const string& path2) throw (error)
++void file_rename(const string& path1, const string& path2)
+ {
+ 	if (rename(path1.c_str(), path2.c_str())!=0) {
+ 		throw error() << "Failed rename of " << path1 << " to " << path2;
+@@ -291,7 +291,7 @@ void file_rename(const string& path1, co
+ /**
+  * Randomize a name file.
+  */
+-string file_randomize(const string& path, int n) throw ()
++string file_randomize(const string& path, int n)
+ {
+ 	ostringstream os;
+ 
+@@ -307,7 +307,7 @@ string file_randomize(const string& path
+ 	return os.str();
+ }
+ 
+-string file_temp(const string& path) throw ()
++string file_temp(const string& path)
+ {
+ 	ostringstream os;
+ 
+@@ -319,7 +319,7 @@ string file_temp(const string& path) thr
+ /**
+  * Get the directory from a path.
+  */
+-string file_dir(const string& path) throw ()
++string file_dir(const string& path)
+ {
+ 	size_t pos = path.rfind('/');
+ 	if (pos == string::npos) {
+@@ -332,7 +332,7 @@ string file_dir(const string& path) thro
+ /**
+  * Get the file name from a path.
+  */
+-string file_name(const string& path) throw ()
++string file_name(const string& path)
+ {
+ 	size_t pos = path.rfind('/');
+ 	if (pos == string::npos) {
+@@ -345,7 +345,7 @@ string file_name(const string& path) thr
+ /**
+  * Get the basepath (path without extension) from a path.
+  */
+-string file_basepath(const string& path) throw ()
++string file_basepath(const string& path)
+ {
+ 	size_t dot = path.rfind('.');
+ 	if (dot == string::npos)
+@@ -357,7 +357,7 @@ string file_basepath(const string& path)
+ /**
+  * Get the basename (name without extension) from a path.
+  */
+-string file_basename(const string& path) throw ()
++string file_basename(const string& path)
+ { 
+ 	string name = file_name(path);
+ 	size_t dot = name.rfind('.');
+@@ -370,7 +370,7 @@ string file_basename(const string& path)
+ /**
+  * Get the extension from a path.
+  */
+-string file_ext(const string& path) throw ()
++string file_ext(const string& path)
+ { 
+ 	string name = file_name(path);
+ 	size_t dot = name.rfind('.');
+@@ -383,7 +383,7 @@ string file_ext(const string& path) thro
+ /**
+  * Compare two path.
+  */
+-int file_compare(const string& path1, const string& path2) throw ()
++int file_compare(const string& path1, const string& path2)
+ {
+ 	return strcasecmp(path1.c_str(), path2.c_str());
+ }
+@@ -391,7 +391,7 @@ int file_compare(const string& path1, co
+ /**
+  * Convert a path to the C format.
+  */
+-string file_adjust(const string& path) throw ()
++string file_adjust(const string& path)
+ {
+ 	string r;
+ 	for(unsigned i=0;i<path.length();++i) {
+@@ -409,7 +409,7 @@ string file_adjust(const string& path) t
+ /**
+  * Make a drectory tree.
+  */
+-void file_mktree(const std::string& path) throw (error)
++void file_mktree(const std::string& path)
+ {
+ 	string dir = file_dir(path);
+ 	string name = file_name(path);
+--- advancescan-1.18/conf.cc.orig	2013-05-22 20:10:05.000000000 +0200
++++ advancescan-1.18/conf.cc	2024-04-17 21:13:32.930445400 +0200
+@@ -28,7 +28,7 @@
+ 
+ using namespace std;
+ 
+-static void expand_tree(const string& path, filepath_container& ds) throw (error)
++static void expand_tree(const string& path, filepath_container& ds)
+ {
+ 	DIR* dir = opendir(path.c_str());
+ 	if (!dir)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/advancescan.git/commitdiff/a703cc35943eeb90b810e048a782fd347c89c797



More information about the pld-cvs-commit mailing list