diff options
Diffstat (limited to 'community/libpar2/libpar2-0.2-bugfixes.patch')
-rw-r--r-- | community/libpar2/libpar2-0.2-bugfixes.patch | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/community/libpar2/libpar2-0.2-bugfixes.patch b/community/libpar2/libpar2-0.2-bugfixes.patch index cb3c938df..0ce3a43bd 100644 --- a/community/libpar2/libpar2-0.2-bugfixes.patch +++ b/community/libpar2/libpar2-0.2-bugfixes.patch @@ -1,7 +1,9 @@ -diff -aud ../libpar2-0.2-original/par2repairer.cpp ../libpar2-0.2/par2repairer.cpp +diff -aud -U 5 ../libpar2-0.2-original/par2repairer.cpp ../libpar2-0.2/par2repairer.cpp --- ../libpar2-0.2-original/par2repairer.cpp 2006-01-20 18:25:20.000000000 +0100 -+++ ../libpar2-0.2/par2repairer.cpp 2008-02-06 12:02:53.226050300 +0100 -@@ -78,6 +78,7 @@ ++++ ../libpar2-0.2/par2repairer.cpp 2012-11-30 14:23:31.000000000 +0100 +@@ -76,10 +76,11 @@ + ++sf; + } delete mainpacket; delete creatorpacket; @@ -9,7 +11,11 @@ diff -aud ../libpar2-0.2-original/par2repairer.cpp ../libpar2-0.2/par2repairer.c } -@@ -1261,7 +1262,7 @@ + Result Par2Repairer::PreProcess(const CommandLine &commandline) + { +@@ -1259,11 +1260,11 @@ + string path; + string name; DiskFile::SplitFilename(filename, path, name); cout << "Target: \"" << name << "\" - missing." << endl; @@ -18,12 +24,37 @@ diff -aud ../libpar2-0.2-original/par2repairer.cpp ../libpar2-0.2/par2repairer.c } } -@@ -1804,7 +1805,7 @@ + ++sf; + } +@@ -1802,11 +1803,11 @@ + << "\" - no data found." + << endl; } } } - sig_done.emit(name,count,sourcefile->GetVerificationPacket()->BlockCount()); -+ sig_done.emit(name,count, sourcefile->GetVerificationPacket() ? sourcefile->GetVerificationPacket()->BlockCount() : 0); ++ sig_done.emit(name,count, count>0 && sourcefile->GetVerificationPacket() ? sourcefile->GetVerificationPacket()->BlockCount() : 0); sig_progress.emit(1000.0); return true; } + + // Find out how much data we have found +diff -aud -U 5 ../libpar2-0.2-original/par2repairer.h ../libpar2-0.2/par2repairer.h +--- ../libpar2-0.2-original/par2repairer.h 2006-01-20 00:38:27.000000000 +0100 ++++ ../libpar2-0.2/par2repairer.h 2012-11-30 14:24:46.000000000 +0100 +@@ -34,10 +34,15 @@ + sigc::signal<void, std::string> sig_filename; + sigc::signal<void, double> sig_progress; + sigc::signal<void, ParHeaders*> sig_headers; + sigc::signal<void, std::string, int, int> sig_done; + ++ // This method allows to determine whether libpar2 includes the patches ++ // ("libpar2-0.2-bugfixes.patch") submitted to libpar2 project. ++ // Use the method in configure scripts for detection. ++ void BugfixesPatchVersion2() { } ++ + protected: + // Steps in verifying and repairing files: + + // Load packets from the specified file + bool LoadPacketsFromFile(string filename); |