From 4c2f35603b318cbf51fb8042114c2afe3f63593f Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 23 May 2017 11:14:16 +0200 Subject: [PATCH] gsmartcontrol: update to 0.9.0. --- ...m-gsmartcontrol-0.87-parser_crash_fix.diff | 44 ------------------- srcpkgs/gsmartcontrol/template | 6 +-- 2 files changed, 3 insertions(+), 47 deletions(-) delete mode 100644 srcpkgs/gsmartcontrol/patches/upstream-gsmartcontrol-0.87-parser_crash_fix.diff diff --git a/srcpkgs/gsmartcontrol/patches/upstream-gsmartcontrol-0.87-parser_crash_fix.diff b/srcpkgs/gsmartcontrol/patches/upstream-gsmartcontrol-0.87-parser_crash_fix.diff deleted file mode 100644 index 2b0aba87d0..0000000000 --- a/srcpkgs/gsmartcontrol/patches/upstream-gsmartcontrol-0.87-parser_crash_fix.diff +++ /dev/null @@ -1,44 +0,0 @@ -Fix provided by upstream gsmartcontrol.sf.net, in -HomePage > News > 2015-04-29: - The Linux binary packages have been updated with a patch that fixes crash on - startup for some smartmontools version and system configuration combinations. - The source patch can be downloaded separately as well. Note that he fix has - been included in the SVN version for some time now. - -direct link for this patch: -fix https://build.opensuse.org/source/home:alex_sh/gsmartcontrol/gsmartcontrol_parser_crash_fix.diff?rev=da33e1d56b052b483f576e5e6823da3b - -Index: src/applib/smartctl_parser.cpp -=================================================================== ---- src/applib/smartctl_parser.cpp (revision 106) -+++ src/applib/smartctl_parser.cpp (revision 107) -@@ -201,21 +201,20 @@ - while (section_start_pos != std::string::npos - && (section_start_pos = s.find("===", section_start_pos)) != std::string::npos) { - -- tmp_pos = s.find("\n", section_start_pos); // works with \r\n too. -+ tmp_pos = s.find("\n", section_start_pos); // works with \r\n too. This may be npos if nothing follows the header. - - // trim is needed to remove potential \r in the end - std::string section_header = hz::string_trim_copy(s.substr(section_start_pos, - (tmp_pos == std::string::npos ? tmp_pos : (tmp_pos - section_start_pos)) )); - -- if (tmp_pos != std::string::npos) -- ++tmp_pos; // set to start of the next section -- -- section_end_pos = s.find("===", tmp_pos); // start of the next section -- std::string section_body_str = hz::string_trim_copy(s.substr(tmp_pos, -- (section_end_pos == std::string::npos ? section_end_pos : section_end_pos - tmp_pos))); -- -+ std::string section_body_str; -+ if (tmp_pos != std::string::npos) { -+ section_end_pos = s.find("===", tmp_pos); // start of the next section -+ section_body_str = hz::string_trim_copy(s.substr(tmp_pos, -+ (section_end_pos == std::string::npos ? section_end_pos : section_end_pos - tmp_pos))); -+ } - status = parse_section(section_header, section_body_str) || status; -- section_start_pos = section_end_pos; -+ section_start_pos = (tmp_pos == std::string::npos ? std::string::npos : section_end_pos); - } - - if (!status) { diff --git a/srcpkgs/gsmartcontrol/template b/srcpkgs/gsmartcontrol/template index 27d28a862e..3081dc09ba 100644 --- a/srcpkgs/gsmartcontrol/template +++ b/srcpkgs/gsmartcontrol/template @@ -1,7 +1,7 @@ # Template file for 'gsmartcontrol' pkgname=gsmartcontrol -version=0.8.7 -revision=2 +version=0.9.0 +revision=1 build_style=gnu-configure hostmakedepends="pkg-config" makedepends="gtkmm2-devel pcre-devel desktop-file-utils" @@ -11,7 +11,7 @@ maintainer="yopito " license="GPL-3" homepage="http://gsmartcontrol.sourceforge.net/" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2" -checksum=708fa803243abb852ed52050fc82cd3592a798c02743342441996e77f19ffec6 +checksum=5da6435aa0845acef134f72c2b5f6fce79f9c51bebe9d099402e0f21a3388651 CXXFLAGS="-std=c++11"