mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-04 06:15:24 +00:00
Add lxpanel 0.2.4, LXPanel is a lightweight X11 desktop panel.
PR: ports/108423 Submitted by: Lin, Cheng-Tao <b89605222 at ntu.edu.tw> via chinsan
This commit is contained in:
parent
75a4753b18
commit
25d63d1bcf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=183506
@ -169,6 +169,7 @@
|
||||
SUBDIR += libxklavier
|
||||
SUBDIR += linux-xorg-libs
|
||||
SUBDIR += lupe
|
||||
SUBDIR += lxpanel
|
||||
SUBDIR += mgapdesk
|
||||
SUBDIR += mlterm
|
||||
SUBDIR += mrxvt
|
||||
|
40
x11/lxpanel/Makefile
Normal file
40
x11/lxpanel/Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
# New ports collection makefile for: lxpanel
|
||||
# Date created: Sat Oct 7 01:22:35 CST 2006
|
||||
# Whom: Lin, Cheng-Tao <b89605222@ntu.edu.tw>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= lxpanel
|
||||
PORTVERSION= 0.2.4
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= lxde
|
||||
|
||||
MAINTAINER= b89605222@ntu.edu.tw
|
||||
COMMENT= LXPanel is a lightweight X11 desktop panel
|
||||
|
||||
USE_XLIB= yes
|
||||
USE_GNOME= gtk20 gnomelibs gnomedesktop
|
||||
GNU_CONFIGURE= yes
|
||||
USE_AUTOTOOLS= automake:19
|
||||
CONFIGURE_ARGS= --prefix=${PREFIX}
|
||||
CONFIGURE_ENV= LDFLAGS="-L${X11BASE}/lib" CFLAGS="-I${LOCALBASE}/include"
|
||||
CFLAGS+= -I${WRKSRC}
|
||||
USE_GMAKE= yes
|
||||
|
||||
.if !defined(WITHOUT_NLS)
|
||||
USE_GETTEXT= yes
|
||||
PLIST_SUB+= NLS=""
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-nls
|
||||
PLIST_SUB+= NLS="@comment "
|
||||
.endif
|
||||
|
||||
pre-patch:
|
||||
@${REINPLACE_CMD} -e 's,linux,sys,' \
|
||||
M${WRKSRC}/src/plugins/volume/volume-impl.c
|
||||
@${REINPLACE_CMD} -e 's,$$(DATADIRNAME)/locale,share/locale,' \
|
||||
${WRKSRC}/po/Makefile.in.in
|
||||
|
||||
.include <bsd.port.mk>
|
3
x11/lxpanel/distinfo
Normal file
3
x11/lxpanel/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (lxpanel-0.2.4.tar.gz) = 37d0e9f2993fc63d9e7e1684552e10b4
|
||||
SHA256 (lxpanel-0.2.4.tar.gz) = c6e9bb54bb999f0a00bb6f6f77f01e572b4ad66b753339cf796c68525d557f79
|
||||
SIZE (lxpanel-0.2.4.tar.gz) = 714278
|
87
x11/lxpanel/files/patch-src-plugin-cpu-cpu.c
Normal file
87
x11/lxpanel/files/patch-src-plugin-cpu-cpu.c
Normal file
@ -0,0 +1,87 @@
|
||||
--- src/plugins/cpu/cpu.c.orig Sat Dec 23 17:32:42 2006
|
||||
+++ src/plugins/cpu/cpu.c Sat Dec 23 17:32:49 2006
|
||||
@@ -24,7 +24,15 @@
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
-#include <sys/sysinfo.h>
|
||||
+
|
||||
+#ifdef __FreeBSD__
|
||||
+# include <sys/types.h>
|
||||
+# include <sys/resource.h>
|
||||
+# include <sys/sysctl.h>
|
||||
+#else
|
||||
+# include <sys/sysinfo.h>
|
||||
+#endif
|
||||
+
|
||||
#include <stdlib.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
@@ -61,6 +69,38 @@
|
||||
struct cpu_stat cpu_anterior;
|
||||
} cpu_t;
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+static void
|
||||
+get_procstat(unsigned long *u, unsigned long *n, unsigned long *s,
|
||||
+ unsigned long *i)
|
||||
+{
|
||||
+ static int mib[2] = { -1, -1 }, init = 0, j, realhz;
|
||||
+ long ct[CPUSTATES];
|
||||
+
|
||||
+
|
||||
+ if(init == 0) {
|
||||
+ struct clockinfo ci;
|
||||
+ j = sizeof(ci);
|
||||
+ sysctlbyname("kern.clockrate", &ci, &j, NULL, 0);
|
||||
+ realhz = ci.stathz ? ci.stathz : ci.hz;
|
||||
+
|
||||
+ j = 2;
|
||||
+ sysctlnametomib("kern.cp_time", mib, &j);
|
||||
+
|
||||
+ init = 1;
|
||||
+ j = sizeof(ct);
|
||||
+ }
|
||||
+
|
||||
+ sysctl(mib, 2, ct, &j, NULL, 0);
|
||||
+ *u = ct[CP_USER] / realhz;
|
||||
+ *n = ct[CP_NICE] / realhz;
|
||||
+ *s = ct[CP_SYS] / realhz;
|
||||
+ *i = ct[CP_IDLE] / realhz;
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
|
||||
static int
|
||||
cpu_update(cpu_t *c)
|
||||
@@ -68,18 +108,28 @@
|
||||
int cpu_u=0, cpu_s=0, cpu_n=0, cpu_i=100;
|
||||
unsigned int i;
|
||||
struct cpu_stat cpu, cpu_r;
|
||||
+
|
||||
+#ifndef __FreeBSD__
|
||||
+ FILE *stat;
|
||||
+#endif
|
||||
+
|
||||
FILE *stat;
|
||||
float total;
|
||||
|
||||
ENTER;
|
||||
if(!c->pixmap)
|
||||
RET(TRUE);
|
||||
+
|
||||
+#ifdef __FreeBSD__
|
||||
+ get_procstat(&cpu.u, &cpu.n, &cpu.s, &cpu.i);
|
||||
+#else
|
||||
|
||||
stat = fopen("/proc/stat", "r");
|
||||
if(!stat)
|
||||
RET(TRUE);
|
||||
fscanf(stat, "cpu %lu %lu %lu %lu", &cpu.u, &cpu.n, &cpu.s, &cpu.i);
|
||||
fclose(stat);
|
||||
+#endif
|
||||
|
||||
cpu_r.u = cpu.u - c->cpu_anterior.u;
|
||||
cpu_r.n = cpu.n - c->cpu_anterior.n;
|
13
x11/lxpanel/files/patch-src-plugin.c
Normal file
13
x11/lxpanel/files/patch-src-plugin.c
Normal file
@ -0,0 +1,13 @@
|
||||
--- src/plugin.c.orig Sat Dec 23 22:15:17 2006
|
||||
+++ src/plugin.c Sat Dec 23 22:17:21 2006
|
||||
@@ -148,6 +148,10 @@
|
||||
REGISTER_PLUGIN_CLASS(icons_plugin_class, 0);
|
||||
#endif
|
||||
|
||||
+#if defined(STATIC_CPU) && defined(PLUGIN_CPU)
|
||||
+ REGISTER_PLUGIN_CLASS(cpu_plugin_class, 0);
|
||||
+#endif
|
||||
+
|
||||
RET();
|
||||
}
|
||||
|
10
x11/lxpanel/files/patch-src-plugin.h
Normal file
10
x11/lxpanel/files/patch-src-plugin.h
Normal file
@ -0,0 +1,10 @@
|
||||
--- src/plugin.h.orig Sat Dec 23 22:15:11 2006
|
||||
+++ src/plugin.h Sat Dec 23 22:16:07 2006
|
||||
@@ -88,6 +88,7 @@
|
||||
#define STATIC_MENU
|
||||
#define STATIC_SPACE
|
||||
#define STATIC_ICONS
|
||||
+#define STATIC_CPU
|
||||
|
||||
#if 0
|
||||
/* Try to handle GTypePlugin problems, but in vain. :-( */
|
8
x11/lxpanel/pkg-descr
Normal file
8
x11/lxpanel/pkg-descr
Normal file
@ -0,0 +1,8 @@
|
||||
LXpanel is a lightweight desktop panel like fbpanel.
|
||||
|
||||
It's not only with fbpanel features but also
|
||||
|
||||
* supports i18n
|
||||
* provides lxpanelctl to control lxpanel
|
||||
|
||||
WWW: http://lxpanel.sourceforge.net/
|
47
x11/lxpanel/pkg-plist
Normal file
47
x11/lxpanel/pkg-plist
Normal file
@ -0,0 +1,47 @@
|
||||
bin/lxpanel
|
||||
bin/lxpanelctl
|
||||
lib/lxpanel/plugins/netstatus.so
|
||||
lib/lxpanel/plugins/volume.so
|
||||
lib/lxpanel/plugins/cpu.so
|
||||
lib/lxpanel/plugins/deskno.so
|
||||
%%NLS%%share/locale/hu/LC_MESSAGES/lxpanel.mo
|
||||
%%NLS%%share/locale/ko/LC_MESSAGES/lxpanel.mo
|
||||
%%NLS%%share/locale/zh_TW/LC_MESSAGES/lxpanel.mo
|
||||
%%DATADIR%%/default
|
||||
%%DATADIR%%/images/my-computer.svg
|
||||
%%DATADIR%%/images/redhat-internet.svg
|
||||
%%DATADIR%%/images/stock_volume.png
|
||||
%%DATADIR%%/images/thunderbird.svg
|
||||
%%DATADIR%%/images/default.xpm
|
||||
%%DATADIR%%/images/emacs.svg
|
||||
%%DATADIR%%/images/file-manager.svg
|
||||
%%DATADIR%%/images/firefox2.svg
|
||||
%%DATADIR%%/images/gnome-applications.png
|
||||
%%DATADIR%%/images/gnome-control-center.png
|
||||
%%DATADIR%%/images/gnome-devel.png
|
||||
%%DATADIR%%/images/gnome-fs-desktop.svg
|
||||
%%DATADIR%%/images/gnome-globe.png
|
||||
%%DATADIR%%/images/gnome-graphics.png
|
||||
%%DATADIR%%/images/gnome-joystick.png
|
||||
%%DATADIR%%/images/gnome-multimedia.png
|
||||
%%DATADIR%%/images/gnome-logout.png
|
||||
%%DATADIR%%/images/gnome-settings.png
|
||||
%%DATADIR%%/images/gnome-netstatus-0-24.png
|
||||
%%DATADIR%%/images/gnome-netstatus-25-49.png
|
||||
%%DATADIR%%/images/gnome-netstatus-50-74.png
|
||||
%%DATADIR%%/images/gnome-netstatus-75-100.png
|
||||
%%DATADIR%%/images/gnome-netstatus-disconn.svg
|
||||
%%DATADIR%%/images/gnome-netstatus-error.svg
|
||||
%%DATADIR%%/images/gnome-netstatus-idle.svg
|
||||
%%DATADIR%%/images/gnome-netstatus-rx.svg
|
||||
%%DATADIR%%/images/gnome-netstatus-txrx.svg
|
||||
%%DATADIR%%/images/gnome-netstatus-tx.svg
|
||||
%%DATADIR%%/images/gnome-setting.svg
|
||||
%%DATADIR%%/images/gnome-system.png
|
||||
%%DATADIR%%/images/gnome_terminal.svg
|
||||
%%DATADIR%%/images/gnome-util.png
|
||||
%%DATADIR%%/pager
|
||||
@dirrmtry lib/lxpanel/plugins
|
||||
@dirrmtry lib/lxpanel
|
||||
@dirrm %%DATADIR%%/images
|
||||
@dirrm %%DATADIR%%
|
Loading…
Reference in New Issue
Block a user