summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x11/workrave/Makefile28
-rw-r--r--x11/workrave/pkg-descr.xfce6
2 files changed, 29 insertions, 5 deletions
diff --git a/x11/workrave/Makefile b/x11/workrave/Makefile
index d5d3ea3cee79..25c83486b7b7 100644
--- a/x11/workrave/Makefile
+++ b/x11/workrave/Makefile
@@ -5,7 +5,7 @@ CATEGORIES= x11
MASTER_SITES= https://github.com/rcaelers/workrave/releases/download/v${PORTVERSION:S/./_/g}/
MAINTAINER= cyberbotx@cyberbotx.com
-COMMENT= RSI prevention tool
+COMMENT= RSI prevention tool (${FLAVOR} flavor)
WWW= https://www.workrave.org/
LICENSE= GPLv3+
@@ -13,8 +13,24 @@ LICENSE= GPLv3+
LIB_DEPENDS= libgdome.so:textproc/gdome2 \
libharfbuzz.so:print/harfbuzz
-USES= compiler:c++11-lang gmake gnome libtool localbase pkgconfig \
- xorg
+FLAVORS= default xfce
+FLAVOR?= ${FLAVORS:[1]}
+xfce_PKGNAMESUFFIX= -xfce
+xfce_DESCR= ${.CURDIR}/pkg-descr.xfce
+xfce_CONFLICTS_INSTALL= workrave
+default_CONFLICTS_INSTALL= workrave-xfce
+
+USES= compiler:c++11-lang desktop-file-utils gmake gnome libtool \
+ localbase pkgconfig xorg
+.if ${FLAVOR} == xfce
+CATEGORIES+= xfce
+USES+= xfce
+USE_XFCE= libutil panel
+# Easier than using *_SUB since there's no flavor helper for that.
+PLIST_FILES= lib/xfce4/panel/plugins/libworkrave-plugin.a \
+ lib/xfce4/panel/plugins/libworkrave-plugin.so \
+ share/xfce4/panel/plugins/workrave-xfce-applet.desktop
+.endif
USE_CXXSTD= c++11
USE_GNOME= gdkpixbuf2 gtkmm30 intlhack intltool introspection:build
USE_LDCONFIG= yes
@@ -26,8 +42,10 @@ CONFIGURE_ARGS= --disable-gconf \
--disable-gsettings \
--disable-indicator \
--disable-mate \
- --disable-pulse \
- --disable-xfce
+ --disable-pulse
+.if ${FLAVOR} != xfce
+CONFIGURE_ARGS+= --disable-xfce
+.endif
INSTALL_TARGET= install-strip
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
diff --git a/x11/workrave/pkg-descr.xfce b/x11/workrave/pkg-descr.xfce
new file mode 100644
index 000000000000..219b7d5a54fe
--- /dev/null
+++ b/x11/workrave/pkg-descr.xfce
@@ -0,0 +1,6 @@
+Workrave is a program that assists in the recovery and prevention of
+Repetitive Strain Injury (RSI). The program frequently alerts you to
+take micro-pauses, rest breaks and restricts you to your daily limit.
+These can be customized and it stops the counter when you stop.
+
+This is the XFCE-enabled flavor.