View | Details | Raw Unified | Return to bug 229297 | Differences between
and this patch

Collapse All | Expand All

(-)x11-wm/lxqt-panel/Makefile (+61 lines)
Line 0 Link Here
1
# Created by: Olivier Duchateau
2
# $FreeBSD$
3
4
PORTNAME=	lxqt-panel
5
PORTVERSION=	0.13.0
6
CATEGORIES=	x11-wm
7
MASTER_SITES=	LXQT
8
9
MAINTAINER=	jesper@schmitz.computer
10
COMMENT=	Panel for the LXQt desktop
11
12
LICENSE=	LGPL21+
13
14
LIB_DEPENDS=	libmenu-cache.so:x11/menu-cache \
15
	libdbusmenu-qt5.so:devel/libdbusmenu-qt@qt5 \
16
	libxkbcommon.so:x11/libxkbcommon \
17
	libxcb-util.so:x11/xcb-util \
18
	libsysstat-qt5.so:sysutils/libsysstat
19
RUN_DEPENDS=	lxmenu-data>=0.1.2:x11/lxmenu-data
20
21
USES=	cmake:outsource compiler:c++11-lib gettext-runtime kde:5 \
22
	localbase:ldflags lxqt pkgconfig tar:xz
23
USE_QT5=	buildtools_build qmake_build core dbus gui svg widgets \
24
	x11extras xml
25
USE_KDE=	windowsystem
26
USE_LXQT=	buildtools lxqt globalkeys qtxdg
27
USE_XORG=	ice sm x11 xcb xcomposite xdamage xext xfixes xrender
28
USE_GNOME=	glib20
29
30
OPTIONS_RADIO=	SOUND
31
OPTIONS_RADIO_SOUND=	ALSA PULSEAUDIO
32
OPTIONS_DEFINE=	CPULOAD MOUNT
33
OPTIONS_DEFAULT=	PULSEAUDIO
34
ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
35
ALSA_CMAKE_ON=	-DVOLUME_USE_PULSEAUDIO:BOOL=OFF
36
CPULOAD_LIB_DEPENDS=	libstatgrab.so:devel/libstatgrab
37
CPULOAD_CMAKE_OFF=	-DCPULOAD_PLUGIN:BOOL=OFF
38
CPULOAD_DESC=	CPU stat plugin
39
PULSEAUDIO_CMAKE_ON=	-DVOLUME_USE_ALSA:BOOL=OFF
40
PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
41
MOUNT_USE=	kde=solid
42
MOUNT_CMAKE_OFF=	-DMOUNT_PLUGIN:BOOL=OFF
43
MOUNT_DESC=	Mount removable devices support
44
OPTIONS_SUB=	yes
45
46
LDFLAGS+=	-Xlinker --export-dynamic
47
48
CMAKE_ARGS+=	-DSENSORS_PLUGIN:BOOL=OFF \
49
	-DNETWORKMONITOR_PLUGIN:BOOL=OFF \
50
	-DWITH_SCREENSAVER_FALLBACK:BOOL=OFF
51
52
.include <bsd.port.options.mk>
53
54
.if ! ${PORT_OPTIONS:MALSA} && ! ${PORT_OPTIONS:MPULSEAUDIO}
55
CMAKE_ARGS+=	-DVOLUME_PLUGIN:BOOL=OFF
56
PLIST_SUB+=	SOUND="@comment "
57
.elif ${PORT_OPTIONS:MALSA} || ${PORT_OPTIONS:MPULSEAUDIO}
58
PLIST_SUB+=	SOUND=""
59
.endif
60
61
.include <bsd.port.mk>
(-)x11-wm/lxqt-panel/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1527328541
2
SHA256 (lxqt/lxqt-panel-0.13.0.tar.xz) = a139dc43d19adf6b7674e7ad518772aebf033aefcb1767b05085d983ff8b2ae3
3
SIZE (lxqt/lxqt-panel-0.13.0.tar.xz) = 273924
(-)x11-wm/lxqt-panel/files/patch-panel_resources_panel.conf (+11 lines)
Line 0 Link Here
1
--- panel/resources/panel.conf.orig	2018-05-26 09:42:02 UTC
2
+++ panel/resources/panel.conf
3
@@ -1,7 +1,7 @@
4
 panels=panel1
5
 
6
 [panel1]
7
-plugins=mainmenu,desktopswitch,quicklaunch,taskbar,tray,statusnotifier,mount,volume,worldclock,showdesktop
8
+plugins=mainmenu,desktopswitch,quicklaunch,taskbar,tray,statusnotifier,volume,worldclock,showdesktop
9
 position=Bottom
10
 desktop=0
11
 
(-)x11-wm/lxqt-panel/files/patch-plugin-sysstat_CMakeLists.txt (+14 lines)
Line 0 Link Here
1
--- plugin-sysstat/CMakeLists.txt.orig	2017-01-01 22:27:14 UTC
2
+++ plugin-sysstat/CMakeLists.txt
3
@@ -1,5 +1,11 @@
4
 set(PLUGIN "sysstat")
5
 
6
+if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
7
+    add_definitions("-DCMAKE_SYSTEM_NAME_FREEBSD=1")
8
+elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
9
+    add_definitions("-DCMAKE_SYSTEM_NAME_LINUX=1") 
10
+endif()
11
+
12
 find_package(SysStat-Qt5 REQUIRED)
13
 
14
 set(HEADERS
(-)x11-wm/lxqt-panel/files/patch-plugin-sysstat_lxqtsysstat.cpp (+82 lines)
Line 0 Link Here
1
--- plugin-sysstat/lxqtsysstat.cpp.orig	2017-01-01 22:27:14 UTC
2
+++ plugin-sysstat/lxqtsysstat.cpp
3
@@ -320,6 +320,7 @@ void LXQtSysStatContent::updateSettings(
4
         {
5
             if (mDataType == "CPU")
6
             {
7
+#if defined(Q_OS_LINUX)
8
                 if (mUseFrequency)
9
                 {
10
                     qobject_cast<SysStat::CpuStat*>(mStat)->setMonitoring(SysStat::CpuStat::LoadAndFrequency);
11
@@ -330,6 +331,10 @@ void LXQtSysStatContent::updateSettings(
12
                     qobject_cast<SysStat::CpuStat*>(mStat)->setMonitoring(SysStat::CpuStat::LoadOnly);
13
                     connect(qobject_cast<SysStat::CpuStat*>(mStat), SIGNAL(update(float, float, float, float)), this, SLOT(cpuUpdate(float, float, float, float)));
14
                 }
15
+#elif defined(Q_OS_FREEBSD)
16
+                qobject_cast<SysStat::CpuStat*>(mStat)->setMonitoring(SysStat::CpuStat::LoadOnly);
17
+                connect(qobject_cast<SysStat::CpuStat*>(mStat), SIGNAL(update(float, float, float, float, float)), this, SLOT(cpuUpdate(float, float, float, float, float)));
18
+#endif
19
             }
20
             else if (mDataType == "Memory")
21
             {
22
@@ -386,6 +391,7 @@ void LXQtSysStatContent::clearLine()
23
         reinterpret_cast<QRgb*>(mHistoryImage.scanLine(i))[mHistoryOffset] = bg;
24
 }
25
 
26
+#if defined(Q_OS_LINUX)
27
 void LXQtSysStatContent::cpuUpdate(float user, float nice, float system, float other, float frequencyRate, uint)
28
 {
29
     int y_system = static_cast<int>(system * 100.0 * frequencyRate);
30
@@ -478,6 +484,52 @@ void LXQtSysStatContent::cpuUpdate(float
31
 
32
     update(0, mTitleFontPixelHeight, width(), height() - mTitleFontPixelHeight);
33
 }
34
+#elif defined(Q_OS_FREEBSD)
35
+void LXQtSysStatContent::cpuUpdate(float user, float nice, float system, float idle, float other)
36
+{
37
+    int y_system = static_cast<int>(round(system * 100.0));
38
+    int y_user   = static_cast<int>(round(user   * 100.0));
39
+    int y_nice   = static_cast<int>(round(nice   * 100.0));
40
+    int y_idle   = static_cast<int>(round(idle   * 100.0));
41
+    int y_other  = static_cast<int>(round(other  * 100.0));
42
+
43
+    toolTipInfo(tr("system: %1%<br>user: %2%<br>nice: %3%<br>other: %4%", "CPU tooltip information")
44
+                .arg(y_system).arg(y_user).arg(y_nice).arg(y_other));
45
+
46
+
47
+    y_system = clamp(y_system, 0, 99);
48
+    y_user   = clamp(y_user + y_system, 0, 99);
49
+    y_nice   = clamp(y_nice+y_user, 0, 99);
50
+    y_other  = clamp(y_other+y_nice, 0, 99);
51
+
52
+    clearLine();
53
+    QPainter painter(&mHistoryImage);
54
+    if (y_system != 0)
55
+    {
56
+        painter.setPen(mColours.cpuSystemColour);
57
+        painter.drawLine(mHistoryOffset, y_system, mHistoryOffset, 0);
58
+    }
59
+    if (y_user != y_system)
60
+    {
61
+        painter.setPen(mColours.cpuUserColour);
62
+        painter.drawLine(mHistoryOffset, y_user, mHistoryOffset, y_system);
63
+    }
64
+    if (y_nice != y_user)
65
+    {
66
+        painter.setPen(mColours.cpuNiceColour);
67
+        painter.drawLine(mHistoryOffset, y_nice, mHistoryOffset, y_user);
68
+    }
69
+    if (y_other != y_nice)
70
+    {
71
+        painter.setPen(mColours.cpuOtherColour);
72
+        painter.drawLine(mHistoryOffset, y_other, mHistoryOffset, y_nice);
73
+    }
74
+
75
+    mHistoryOffset = (mHistoryOffset + 1) % width();
76
+
77
+    update(0, mTitleFontPixelHeight, width(), height() - mTitleFontPixelHeight);
78
+}
79
+#endif
80
 
81
 void LXQtSysStatContent::memoryUpdate(float apps, float buffers, float cached)
82
 {
(-)x11-wm/lxqt-panel/files/patch-plugin-sysstat_lxqtsysstat.h (+16 lines)
Line 0 Link Here
1
--- plugin-sysstat/lxqtsysstat.h.orig	2017-01-01 22:27:14 UTC
2
+++ plugin-sysstat/lxqtsysstat.h
3
@@ -137,8 +137,13 @@ protected:
4
     void resizeEvent(QResizeEvent *);
5
 
6
 protected slots:
7
+/* moc only expands macros directly */
8
+#ifdef CMAKE_SYSTEM_NAME_LINUX
9
     void cpuUpdate(float user, float nice, float system, float other, float frequencyRate, uint frequency);
10
     void cpuUpdate(float user, float nice, float system, float other);
11
+#elif CMAKE_SYSTEM_NAME_FREEBSD
12
+    void cpuUpdate(float user, float nice, float system, float idle, float other);
13
+#endif
14
     void memoryUpdate(float apps, float buffers, float cached);
15
     void swapUpdate(float used);
16
     void networkUpdate(unsigned received, unsigned transmitted);
(-)x11-wm/lxqt-panel/pkg-descr (+3 lines)
Line 0 Link Here
1
LXQt desktop panel and plugins.
2
3
WWW: http://lxqt.org/
(-)x11-wm/lxqt-panel/pkg-plist (+35 lines)
Line 0 Link Here
1
bin/lxqt-panel
2
etc/xdg/autostart/lxqt-panel.desktop
3
etc/xdg/menus/lxqt-applications.menu
4
%%LXQT_INCLUDEDIR%%/ilxqtpanel.h
5
%%LXQT_INCLUDEDIR%%/ilxqtpanelplugin.h
6
%%LXQT_INCLUDEDIR%%/lxqtpanelglobals.h
7
%%LXQT_INCLUDEDIR%%/pluginsettings.h
8
lib/lxqt-panel/libcolorpicker.so
9
%%CPULOAD%%lib/lxqt-panel/libcpuload.so
10
lib/lxqt-panel/libdirectorymenu.so
11
lib/lxqt-panel/libkbindicator.so
12
%%MOUNT%%lib/lxqt-panel/libmount.so
13
lib/lxqt-panel/libsysstat.so
14
%%SOUND%%lib/lxqt-panel/libvolume.so
15
man/man1/lxqt-panel.1.gz
16
share/desktop-directories/lxqt-leave.directory
17
share/desktop-directories/lxqt-settings.directory
18
%%LXQT_SHAREDIR%%/lxqt-panel/clock.desktop
19
%%LXQT_SHAREDIR%%/lxqt-panel/colorpicker.desktop
20
%%CPULOAD%%%%LXQT_SHAREDIR%%/lxqt-panel/cpuload.desktop
21
%%LXQT_SHAREDIR%%/lxqt-panel/desktopswitch.desktop
22
%%LXQT_SHAREDIR%%/lxqt-panel/directorymenu.desktop
23
%%LXQT_SHAREDIR%%/lxqt-panel/kbindicator.desktop
24
%%LXQT_SHAREDIR%%/lxqt-panel/mainmenu.desktop
25
%%MOUNT%%%%LXQT_SHAREDIR%%/lxqt-panel/mount.desktop
26
%%LXQT_SHAREDIR%%/lxqt-panel/quicklaunch.desktop
27
%%LXQT_SHAREDIR%%/lxqt-panel/showdesktop.desktop
28
%%LXQT_SHAREDIR%%/lxqt-panel/spacer.desktop
29
%%LXQT_SHAREDIR%%/lxqt-panel/statusnotifier.desktop
30
%%LXQT_SHAREDIR%%/lxqt-panel/sysstat.desktop
31
%%LXQT_SHAREDIR%%/lxqt-panel/taskbar.desktop
32
%%LXQT_SHAREDIR%%/lxqt-panel/tray.desktop
33
%%SOUND%%%%LXQT_SHAREDIR%%/lxqt-panel/volume.desktop
34
%%LXQT_SHAREDIR%%/lxqt-panel/worldclock.desktop
35
%%LXQT_SHAREDIR%%/panel.conf

Return to bug 229297