[arch-commits] Commit in subtitleeditor/trunk (PKGBUILD cxx11-fixes.patch)

Evangelos Foutras foutrelis at archlinux.org
Mon Dec 7 19:25:03 UTC 2015


    Date: Monday, December 7, 2015 @ 20:25:02
  Author: foutrelis
Revision: 150094

Build in C++11 mode

Added:
  subtitleeditor/trunk/cxx11-fixes.patch
Modified:
  subtitleeditor/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   12 +++++++++-
 cxx11-fixes.patch |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-12-07 18:25:57 UTC (rev 150093)
+++ PKGBUILD	2015-12-07 19:25:02 UTC (rev 150094)
@@ -13,9 +13,17 @@
 makedepends=('intltool')
 install=$pkgname.install
 changelog=$pkgname.changelog
-source=(http://download.gna.org/$pkgname/0.52/$pkgname-$pkgver.tar.gz)
-sha256sums=('5b3e5fc1f12bcf0d4bcf5014249b6832181bd3b513ac04ee665ec979441412d5')
+source=(http://download.gna.org/$pkgname/0.52/$pkgname-$pkgver.tar.gz
+        cxx11-fixes.patch)
+sha256sums=('5b3e5fc1f12bcf0d4bcf5014249b6832181bd3b513ac04ee665ec979441412d5'
+            '6e28116cc79553349eecde84a1f45dd50e4fabea58cdc0f809e4be4711ea6d76')
 
+prepare() {
+  cd "${srcdir}"/$pkgname-$pkgver
+  patch -Np1 -i ../cxx11-fixes.patch
+  sed -i -e 's/-ansi -Wall -Wextra -Wconversion/-std=c++11/' configure
+}
+
 build() {
   cd "${srcdir}"/$pkgname-$pkgver
 

Added: cxx11-fixes.patch
===================================================================
--- cxx11-fixes.patch	                        (rev 0)
+++ cxx11-fixes.patch	2015-12-07 19:25:02 UTC (rev 150094)
@@ -0,0 +1,57 @@
+diff -uprb subtitleeditor-0.52.1.orig/plugins/actions/dialoguize/dialoguize.cc subtitleeditor-0.52.1/plugins/actions/dialoguize/dialoguize.cc
+--- subtitleeditor-0.52.1.orig/plugins/actions/dialoguize/dialoguize.cc	2015-06-22 00:09:31.000000000 +0300
++++ subtitleeditor-0.52.1/plugins/actions/dialoguize/dialoguize.cc	2015-12-07 21:05:46.340426646 +0200
+@@ -23,7 +23,7 @@
+  *	along with this program. If not, see <http://www.gnu.org/licenses/>.
+  */
+  
+-#include <auto_ptr.h>
++#include <memory>
+ #include "extension/action.h"
+ #include "i18n.h"
+ #include "debug.h"
+diff -uprb subtitleeditor-0.52.1.orig/plugins/actions/documentmanagement/documentmanagement.cc subtitleeditor-0.52.1/plugins/actions/documentmanagement/documentmanagement.cc
+--- subtitleeditor-0.52.1.orig/plugins/actions/documentmanagement/documentmanagement.cc	2015-06-22 00:09:31.000000000 +0300
++++ subtitleeditor-0.52.1/plugins/actions/documentmanagement/documentmanagement.cc	2015-12-07 21:08:40.702810369 +0200
+@@ -178,9 +178,9 @@ public:
+ 
+ 		ui_id = ui->new_merge_id();
+ 
+-		#define ADD_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/"name, name, name);
+-		#define ADD_OPEN_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-open/"name, name, name);
+-		#define ADD_SAVE_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-save/"name, name, name);
++		#define ADD_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/" name, name, name);
++		#define ADD_OPEN_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-open/" name, name, name);
++		#define ADD_SAVE_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-save/" name, name, name);
+ 
+ 		ADD_UI("new-document");
+ 		ADD_OPEN_UI("open-document");
+diff -uprb subtitleeditor-0.52.1.orig/src/subtitleview.cc subtitleeditor-0.52.1/src/subtitleview.cc
+--- subtitleeditor-0.52.1.orig/src/subtitleview.cc	2015-06-22 00:09:29.000000000 +0300
++++ subtitleeditor-0.52.1/src/subtitleview.cc	2015-12-07 21:01:22.456819460 +0200
+@@ -1363,7 +1363,7 @@ bool SubtitleView::on_key_press_event(Gd
+ 	{
+ 		int num;
+ 		std::istringstream ss(event->string);
+-		bool is_num = ss >> num != 0; 
++		bool is_num = static_cast<bool>(ss >> num);
+ 		// Update only if it's different
+ 		if(is_num != get_enable_search())
+ 			set_enable_search(is_num);
+@@ -1647,4 +1647,3 @@ Glib::ustring SubtitleView::get_current_
+ 		return get_name_of_column(m_currentColumn);
+ 	return Glib::ustring();
+ }
+-
+diff -uprb subtitleeditor-0.52.1.orig/src/utility.h subtitleeditor-0.52.1/src/utility.h
+--- subtitleeditor-0.52.1.orig/src/utility.h	2015-06-22 00:09:29.000000000 +0300
++++ subtitleeditor-0.52.1/src/utility.h	2015-12-07 20:57:40.037095232 +0200
+@@ -91,7 +91,7 @@ bool from_string(const Glib::ustring &sr
+ 	std::istringstream s(src);
+ 	// return s >> dest != 0;
+ 
+-	bool state = s >> dest != 0;
++	bool state = static_cast<bool>(s >> dest);
+ 
+ 	if(!state)
+ 		se_debug_message(SE_DEBUG_UTILITY, "string:'%s'failed.", src.c_str());



More information about the arch-commits mailing list