aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2007-01-28 13:03:54 +0800
committerrafan <rafan@FreeBSD.org>2007-01-28 13:03:54 +0800
commit65f88c8e1031e3098f9db00a0ac164126ec8a757 (patch)
tree3523c770a3a59772ca7d43aa0ffb6177b2bb0c98 /x11
parent4554fa5712fa3401662f2682e0a72f1d7be00555 (diff)
downloadfreebsd-ports-gnome-65f88c8e1031e3098f9db00a0ac164126ec8a757.tar.gz
freebsd-ports-gnome-65f88c8e1031e3098f9db00a0ac164126ec8a757.tar.zst
freebsd-ports-gnome-65f88c8e1031e3098f9db00a0ac164126ec8a757.zip
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
Diffstat (limited to 'x11')
-rw-r--r--x11/Makefile1
-rw-r--r--x11/lxpanel/Makefile40
-rw-r--r--x11/lxpanel/distinfo3
-rw-r--r--x11/lxpanel/files/patch-src-plugin-cpu-cpu.c87
-rw-r--r--x11/lxpanel/files/patch-src-plugin.c13
-rw-r--r--x11/lxpanel/files/patch-src-plugin.h10
-rw-r--r--x11/lxpanel/pkg-descr8
-rw-r--r--x11/lxpanel/pkg-plist47
8 files changed, 209 insertions, 0 deletions
diff --git a/x11/Makefile b/x11/Makefile
index e3081afb50ee..2ea5ecbb5cd5 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -169,6 +169,7 @@
SUBDIR += libxklavier
SUBDIR += linux-xorg-libs
SUBDIR += lupe
+ SUBDIR += lxpanel
SUBDIR += mgapdesk
SUBDIR += mlterm
SUBDIR += mrxvt
diff --git a/x11/lxpanel/Makefile b/x11/lxpanel/Makefile
new file mode 100644
index 000000000000..e58f81b00fa5
--- /dev/null
+++ b/x11/lxpanel/Makefile
@@ -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>
diff --git a/x11/lxpanel/distinfo b/x11/lxpanel/distinfo
new file mode 100644
index 000000000000..164bd70b0c91
--- /dev/null
+++ b/x11/lxpanel/distinfo
@@ -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
diff --git a/x11/lxpanel/files/patch-src-plugin-cpu-cpu.c b/x11/lxpanel/files/patch-src-plugin-cpu-cpu.c
new file mode 100644
index 000000000000..a3e060757fbd
--- /dev/null
+++ b/x11/lxpanel/files/patch-src-plugin-cpu-cpu.c
@@ -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;
diff --git a/x11/lxpanel/files/patch-src-plugin.c b/x11/lxpanel/files/patch-src-plugin.c
new file mode 100644
index 000000000000..b091ef3d9321
--- /dev/null
+++ b/x11/lxpanel/files/patch-src-plugin.c
@@ -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();
+ }
+
diff --git a/x11/lxpanel/files/patch-src-plugin.h b/x11/lxpanel/files/patch-src-plugin.h
new file mode 100644
index 000000000000..91d0540faed2
--- /dev/null
+++ b/x11/lxpanel/files/patch-src-plugin.h
@@ -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. :-( */
diff --git a/x11/lxpanel/pkg-descr b/x11/lxpanel/pkg-descr
new file mode 100644
index 000000000000..6f38a6db506e
--- /dev/null
+++ b/x11/lxpanel/pkg-descr
@@ -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/
diff --git a/x11/lxpanel/pkg-plist b/x11/lxpanel/pkg-plist
new file mode 100644
index 000000000000..386baa0ed85f
--- /dev/null
+++ b/x11/lxpanel/pkg-plist
@@ -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%%