accessibility/easystroke: Fix build with newer GCC.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Willy Sudiarto Raharjo 2016-02-03 22:39:44 +07:00
parent c356bd4d77
commit f329a86965
2 changed files with 48 additions and 4 deletions

View file

@ -47,16 +47,19 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Add StartupNotify to desktop menu item.
echo "StartupNotify=false" >> $PRGNAM.desktop.in
# Fix multithreading boost library in Makefile.
sed -i 's|-lboost_serialization-mt|-lboost_serialization|' Makefile
# Thanks to ARCH Linux
patch -p1 < $CWD/lambda.patch
make CXX="g++ $SLKCFLAGS" CC="gcc -std=c99 $SLKCFLAGS" PREFIX=/usr
# Determine if we compile manpages with help2man. Default is no.
@ -68,7 +71,7 @@ fi
make install PREFIX=/usr DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION

View file

@ -0,0 +1,41 @@
diff -uprb easystroke-0.6.0.orig/actions.cc easystroke-0.6.0/actions.cc
--- easystroke-0.6.0.orig/actions.cc 2013-03-27 17:52:38.000000000 +0200
+++ easystroke-0.6.0/actions.cc 2015-12-07 22:07:17.720041171 +0200
@@ -51,10 +51,11 @@ void TreeViewMulti::on_drag_begin(const
context->set_icon(pb, pb->get_width(), pb->get_height());
}
-bool negate(bool b) { return !b; }
-
TreeViewMulti::TreeViewMulti() : Gtk::TreeView(), pending(false) {
- get_selection()->set_select_function(sigc::group(&negate, sigc::ref(pending)));
+ get_selection()->set_select_function(
+ [this](Glib::RefPtr<Gtk::TreeModel> const&, Gtk::TreeModel::Path const&, bool) {
+ return !pending;
+ });
}
enum Type { COMMAND, KEY, TEXT, SCROLL, IGNORE, BUTTON, MISC };
diff -uprb easystroke-0.6.0.orig/Makefile easystroke-0.6.0/Makefile
--- easystroke-0.6.0.orig/Makefile 2013-03-27 17:52:38.000000000 +0200
+++ easystroke-0.6.0/Makefile 2015-12-07 21:54:47.926776791 +0200
@@ -21,8 +21,7 @@ LOCALEDIR= $(PREFIX)/share/locale
DFLAGS =
OFLAGS = -O2
AOFLAGS = -O3
-STROKEFLAGS = -Wall -std=c99 $(DFLAGS)
-CXXFLAGS = -Wall $(DFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" `pkg-config gtkmm-3.0 dbus-glib-1 --cflags`
+CXXFLAGS = -Wall $(DFLAGS) -std=c++11 -DLOCALEDIR=\"$(LOCALEDIR)\" `pkg-config gtkmm-3.0 dbus-glib-1 --cflags`
CFLAGS = -Wall $(DFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" `pkg-config gtk+-3.0 --cflags` -DGETTEXT_PACKAGE='"easystroke"'
LDFLAGS = $(DFLAGS)
@@ -63,7 +62,7 @@ $(BINARY): $(OFILES)
$(CXX) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
stroke.o: stroke.c
- $(CC) $(STROKEFLAGS) $(AOFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $<
+ $(CC) $(CFLAGS) $(AOFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $<
%.o: %.c
$(CC) $(CFLAGS) $(OFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $<