diff --git a/deskutils/easystroke/Makefile b/deskutils/easystroke/Makefile index e20af0beda99..6ac1643460ad 100644 --- a/deskutils/easystroke/Makefile +++ b/deskutils/easystroke/Makefile @@ -1,49 +1,53 @@ PORTNAME= easystroke -PORTVERSION= 0.6.0 -PORTREVISION= 26 +DISTVERSION= 0.6.0-9 +DISTVERSIONSUFFIX= -gf7c1614 CATEGORIES= deskutils -MASTER_SITES= SF -MAINTAINER= ports@FreeBSD.org +MAINTAINER= madpilot@FreeBSD.org COMMENT= Gesture-recognition application for X11 LICENSE= ISCL LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_FreeBSD_12_powerpc64= fails to build on powerpc64 elfv1: handler.cc:560:27: call of overloaded 'abs(float&)' is ambiguous BUILD_DEPENDS= help2man:misc/help2man \ ${LOCALBASE}/include/xorg/xserver-properties.h:x11-servers/xorg-server LIB_DEPENDS= libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libboost_serialization.so:devel/boost-libs -USES= compiler:c++11-lang gettext gmake gnome pkgconfig xorg -USE_GNOME= gtkmm30 +USES= compiler:c++11-lang gettext-tools gmake gnome pkgconfig xorg +USE_GNOME= gtkmm30 intltool USE_XORG= x11 xext xfixes xi xtst USE_CXXSTD= c++11 +USE_GITHUB= yes +GH_ACCOUNT= thjaeger + OPTIONS_DEFINE= NLS OPTIONS_SUB= yes -NLS_BUILD_DEPENDS= intltool-merge:textproc/intltool +NLS_USES= gettext-runtime NLS_ALL_TARGET= easystroke.desktop all man # This builds easystroke without translations NLS_ALL_TARGET_OFF= man # Create a .desktop file without translations. # It's usually created by intltool-merge during the build. pre-build-NLS-off: @${CP} ${WRKSRC}/${PORTNAME}.desktop.in ${WRKSRC}/${PORTNAME}.desktop do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/ + @${MKDIR} ${STAGEDIR}${PREFIX}/share/metainfo + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.appdata.xml ${STAGEDIR}${PREFIX}/share/metainfo/ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.svg ${STAGEDIR}${PREFIX}/share/pixmaps/ ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 do-install-NLS-on: (cd ${WRKSRC}/po/ && \ ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share/locale/ "-name *.mo") .include diff --git a/deskutils/easystroke/distinfo b/deskutils/easystroke/distinfo index 191d9b47d873..0da37f20a468 100644 --- a/deskutils/easystroke/distinfo +++ b/deskutils/easystroke/distinfo @@ -1,2 +1,3 @@ -SHA256 (easystroke-0.6.0.tar.gz) = f4c37adbc4dd405a24badb9e6be20d3223b4087ff9caed2c15ff71674051d0fd -SIZE (easystroke-0.6.0.tar.gz) = 121358 +TIMESTAMP = 1660820168 +SHA256 (thjaeger-easystroke-0.6.0-9-gf7c1614_GH0.tar.gz) = d9963d74dbf9448d2ce53a773f0a96bf38d55836bc13207e02a8effeccc15442 +SIZE (thjaeger-easystroke-0.6.0-9-gf7c1614_GH0.tar.gz) = 120662 diff --git a/deskutils/easystroke/files/patch-Makefile b/deskutils/easystroke/files/patch-Makefile index 2233fd5ecf77..4113da28cad6 100644 --- a/deskutils/easystroke/files/patch-Makefile +++ b/deskutils/easystroke/files/patch-Makefile @@ -1,38 +1,38 @@ ---- Makefile.orig 2013-03-27 15:52:38 UTC +--- Makefile.orig 2016-07-05 18:32:44 UTC +++ Makefile -@@ -12,19 +12,15 @@ +@@ -12,23 +12,15 @@ # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -DESTDIR = -PREFIX = /usr/local BINDIR = $(PREFIX)/bin ICONDIR = $(PREFIX)/share/icons/hicolor/scalable/apps MENUDIR = $(PREFIX)/share/applications LOCALEDIR= $(PREFIX)/share/locale - DFLAGS = +-DFLAGS = -OFLAGS = -O2 -AOFLAGS = -O3 --STROKEFLAGS = -Wall -std=c99 $(DFLAGS) --CXXFLAGS = -Wall $(DFLAGS) -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"' +-STROKEFLAGS = -Wall -std=c11 $(DFLAGS) +-CXXSTD = -std=c++11 + INCLUDES = $(shell pkg-config gtkmm-3.0 dbus-glib-1 --cflags) +-CXXFLAGS = $(CXXSTD) -Wall $(DFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" $(INCLUDES) +-CFLAGS = -std=c11 -Wall $(DFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" $(INCLUDES) -DGETTEXT_PACKAGE='"easystroke"' -LDFLAGS = $(DFLAGS) -+STROKEFLAGS = -Wall -std=c99 $(CFLAGS) -+CXXFLAGS += -Wall $(DFLAGS) -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) ++CXXFLAGS += -std=c++11 -Wall -DLOCALEDIR=\"$(LOCALEDIR)\" $(INCLUDES) ++CFLAGS += -std=c11 -Wall -DLOCALEDIR=\"$(LOCALEDIR)\" $(INCLUDES) -DGETTEXT_PACKAGE='"easystroke"' - LIBS = $(DFLAGS) -lboost_serialization -lX11 -lXext -lXi -lXfixes -lXtst `pkg-config gtkmm-3.0 dbus-glib-1 --libs` +-LIBS = $(DFLAGS) -lboost_serialization -lX11 -lXext -lXi -lXfixes -lXtst `pkg-config gtkmm-3.0 dbus-glib-1 --libs` ++LIBS = -lboost_serialization -lX11 -lXext -lXi -lXfixes -lXtst $(shell pkg-config gtkmm-3.0 dbus-glib-1 --libs) -@@ -82,9 +78,9 @@ gui.c: gui.glade - easystroke.desktop: easystroke.desktop.in $(MOFILES) - intltool-merge po/ -d -u $< $@ + BINARY = easystroke + ICON = easystroke.svg +@@ -65,7 +57,7 @@ stroke.o: stroke.c + $(CXX) $(LDFLAGS) -o $@ $(OFILES) $(LIBS) --desktop.c: easystroke.desktop -+desktop.c: - echo "const char *desktop_file = \"\\" > $@ -- sed 's/Exec=easystroke/Exec=%1$$s/' $< | sed 's/"/\\"/g' | sed 's/.*/&\\n\\/' >> $@ -+ sed 's/Exec=easystroke/Exec=%1$$s/' easystroke.desktop | sed 's/"/\\"/g' | sed 's/.*/&\\n\\/' >> $@ - echo "\";" >> $@ + stroke.o: stroke.c +- $(CC) $(STROKEFLAGS) $(AOFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $< ++ $(CC) $(CFLAGS) $(AOFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $< - po/POTFILES.in: $(CCFILES) $(HFILES) + %.o: %.c + $(CC) $(CFLAGS) $(OFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $< diff --git a/deskutils/easystroke/files/patch-actiondb.cc b/deskutils/easystroke/files/patch-actiondb.cc index cfbdf2ee92a4..2f8477eab77a 100644 --- a/deskutils/easystroke/files/patch-actiondb.cc +++ b/deskutils/easystroke/files/patch-actiondb.cc @@ -1,20 +1,20 @@ ---- actiondb.cc.orig 2013-03-27 15:52:38 UTC +--- actiondb.cc.orig 2016-07-05 18:32:44 UTC +++ actiondb.cc -@@ -118,14 +118,9 @@ template void StrokeInfo::serialize(Arc +@@ -119,14 +119,9 @@ void Command::run() { using namespace std; void Command::run() { - pid_t pid = fork(); - switch (pid) { - case 0: -- execlp("/bin/sh", "sh", "-c", cmd.c_str(), NULL); +- execlp("/bin/sh", "sh", "-c", cmd.c_str(), nullptr); - exit(1); - case -1: - printf(_("Error: can't execute command \"%s\": fork() failed\n"), cmd.c_str()); - } + gchar* argv[] = {(gchar*) "/bin/sh", (gchar*) "-c", NULL, NULL}; + argv[2] = (gchar *) cmd.c_str(); + g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL); } ButtonInfo Button::get_button_info() const { diff --git a/deskutils/easystroke/files/patch-easystroke.desktop.in b/deskutils/easystroke/files/patch-easystroke.desktop.in new file mode 100644 index 000000000000..d6202fdc0e5f --- /dev/null +++ b/deskutils/easystroke/files/patch-easystroke.desktop.in @@ -0,0 +1,11 @@ +--- easystroke.desktop.in.orig 2013-03-27 15:52:38 UTC ++++ easystroke.desktop.in +@@ -6,7 +6,7 @@ Categories=GTK;Utility;Accessibility; + Exec=easystroke + Icon=easystroke + Categories=GTK;Utility;Accessibility; +-Actions=About;Enable;Disable;Quit ++Actions=About;Enable;Disable;Quit; + _Comment=Control your desktop using mouse gestures + + [Desktop Action About] diff --git a/deskutils/easystroke/files/patch-win.cc b/deskutils/easystroke/files/patch-win.cc new file mode 100644 index 000000000000..44bf69676acc --- /dev/null +++ b/deskutils/easystroke/files/patch-win.cc @@ -0,0 +1,22 @@ +From 140b9cae66ba874bf0994eea71210baf417a136e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Kondor=20D=C3=A1niel?= +Date: Sat, 22 Sep 2018 22:42:06 +0800 +Subject: [PATCH] fixed recurring crash when trying to render 0x0 tray icon + +--- + win.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/win.cc b/win.cc +index da41b0e8..36746430 100644 +--- win.cc ++++ win.cc +@@ -275,7 +275,7 @@ void Win::timeout() { + } + + void Win::set_icon(RStroke stroke, bool invert) { +- if (!icon) ++ if (!icon || icon->get_size() <= 0) + return; + icon->set(stroke->draw(icon->get_size(), 2.0, invert)); + set_timeout(10000); diff --git a/deskutils/easystroke/pkg-descr b/deskutils/easystroke/pkg-descr index b838823e377d..ca601de275cd 100644 --- a/deskutils/easystroke/pkg-descr +++ b/deskutils/easystroke/pkg-descr @@ -1,10 +1,10 @@ Easystroke is a gesture-recognition application for X11. Gestures or strokes are movements that you make with your mouse (or your pen, finger etc.) while holding down a specific mouse button. Easystroke will execute certain actions if it recognizes the stroke; currently easystroke can emulate key presses, execute shell commands, hold down modifiers and emulate a scroll wheel. The program was designed with Tablet PCs in mind and can be used effectively even without access to a keyboard. -WWW: http://easystroke.sourceforge.net/ +WWW: https://github.com/thjaeger/easystroke diff --git a/deskutils/easystroke/pkg-plist b/deskutils/easystroke/pkg-plist index 4e07bcd400d5..7fc113ff15c8 100644 --- a/deskutils/easystroke/pkg-plist +++ b/deskutils/easystroke/pkg-plist @@ -1,21 +1,22 @@ +bin/easystroke man/man1/easystroke.1.gz -share/pixmaps/easystroke.svg -%%NLS%%share/locale/ru/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/ko/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/fi/LC_MESSAGES/easystroke.mo +share/applications/easystroke.desktop +%%NLS%%share/locale/ca/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/cs/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/de/LC_MESSAGES/easystroke.mo %%NLS%%share/locale/el/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/es/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/fi/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/fr/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/he/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/hu/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/it/LC_MESSAGES/easystroke.mo %%NLS%%share/locale/ja/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/de/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/ko/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/pl/LC_MESSAGES/easystroke.mo +%%NLS%%share/locale/ru/LC_MESSAGES/easystroke.mo %%NLS%%share/locale/vi/LC_MESSAGES/easystroke.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/it/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/ca/LC_MESSAGES/easystroke.mo %%NLS%%share/locale/zh_TW/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/hu/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/es/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/pl/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/fr/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/he/LC_MESSAGES/easystroke.mo -%%NLS%%share/locale/cs/LC_MESSAGES/easystroke.mo -share/applications/easystroke.desktop -bin/easystroke +share/metainfo/easystroke.appdata.xml +share/pixmaps/easystroke.svg