1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

- Update to 0.5.6

Grab maintainership while here

Approved by: Outgoing maintainer - Lin, Cheng-Tao <b89605222@ntu.edu.tw>
This commit is contained in:
Kris Moore 2010-09-30 15:21:51 +00:00
parent 3db2b1a49c
commit 15c8c542f6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=262180
9 changed files with 216 additions and 151 deletions

View File

@ -6,19 +6,21 @@
#
PORTNAME= lxpanel
PORTVERSION= 0.3.7
PORTREVISION= 5
PORTVERSION= 0.5.6
CATEGORIES= x11
MASTER_SITES= SF/lxde/LXPanel%20%28desktop%20panel%29/LXPanel%20${PORTVERSION}
MAINTAINER= b89605222@ntu.edu.tw
MAINTAINER= kmoore@freebsd.org
COMMENT= LXPanel is a lightweight X11 desktop panel
LIB_DEPENDS= menu-cache.1:${PORTSDIR}/x11/menu-cache
BUILD_DEPENDS= ${LOCALBASE}/share/desktop-directories/lxde-audio-video.directory:${PORTSDIR}/x11/lxmenu-data
OPTIONS= ALSA "enable ALSA audio architecture support" Off \
NLS "NLS support" On
USE_XORG= x11 xmu
USE_GNOME= gtk20 gnomedesktop gnomeprefix libgnome
USE_GNOME= gtk20 pkgconfig
GNU_CONFIGURE= yes
USE_AUTOTOOLS= automake:110:env
CONFIGURE_ARGS= --prefix=${PREFIX} \
@ -28,12 +30,11 @@ CFLAGS+= -I${WRKSRC}
USE_GMAKE= yes
MAN1= lxpanel.1 lxpanelctl.1
WITH_ALSA= yes
.include <bsd.port.pre.mk>
.if defined(WITH_ALSA)
RUN_DEPENDS+= ${LINUXBASE}/lib/libasound.so.2:${PORTSDIR}/audio/linux-alsa-lib
RUN_DEPENDS+= ${LINUXBASE}/lib/libasound.so.2:${PORTSDIR}/audio/linux-f10-alsa-lib
.else
CONFIGURE_ARGS+=--disable-alsa
.endif
@ -52,4 +53,12 @@ pre-patch:
@${REINPLACE_CMD} -e 's,$$(DATADIRNAME)/locale,share/locale,' \
${WRKSRC}/po/Makefile.in.in
post-configure:
${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g' \
${WRKSRC}/Makefile.in
${REINPLACE_CMD} -e 's|(datadir)/pkgconfig|(prefix)/libdata/pkgconfig|g' \
${WRKSRC}/Makefile.in
${REINPLACE_CMD} -e 's|(prefix)/lib/pkgconfig|(prefix)/libdata/pkgconfig|g' \
${WRKSRC}/Makefile.in
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
MD5 (lxpanel-0.3.7.tar.gz) = 9a963d2e8b1ce9da70d2bb3c3aa61297
SHA256 (lxpanel-0.3.7.tar.gz) = b0db3edc8ebd6cbf4291e6b336667d1e691a84f57d20dc5bc36591d425cff3a5
SIZE (lxpanel-0.3.7.tar.gz) = 753241
MD5 (lxpanel-0.5.6.tar.gz) = 3c6b5498b5f4109c3913b10a66809fe6
SHA256 (lxpanel-0.5.6.tar.gz) = 9c04839e2d23feec8b107a1d76899aca645416862b4b6ca01f8db743944348e1
SIZE (lxpanel-0.5.6.tar.gz) = 1074786

View File

@ -1,19 +0,0 @@
--- src/configurator.c.orig 2008-07-17 14:36:27.000000000 +0800
+++ src/configurator.c 2008-07-17 14:38:36.000000000 +0800
@@ -46,6 +46,7 @@
void restart(void);
void gtk_run(void);
void panel_config_save(Panel* panel);
+void save_global_config(void);
static void logout(void);
Command commands[] = {
@@ -532,7 +533,7 @@
gtk_box_pack_start( (GtkBox*)GTK_DIALOG(dlg)->vbox, scroll,
TRUE, TRUE, 4 );
view = (GtkTreeView*)gtk_tree_view_new();
- gtk_container_add( (GtkContainer*)scroll, view );
+ gtk_container_add( (GtkContainer*)scroll, (GtkWidget*)view );
tree_sel = gtk_tree_view_get_selection( view );
gtk_tree_selection_set_mode( tree_sel, GTK_SELECTION_BROWSE );

View File

@ -1,10 +0,0 @@
--- src/panel.h.orig 2008-07-17 14:40:37.000000000 +0800
+++ src/panel.h 2008-07-17 14:41:21.000000000 +0800
@@ -190,6 +190,7 @@
void panel_set_dock_type(Panel *p);
void panel_set_orientation(Panel *p);
void panel_update_background( Panel* p );
+void panel_destroy( Panel* p );
extern const char* lxpanel_get_file_manager();
extern const char* lxpanel_get_terminal();

View File

@ -1,13 +0,0 @@
--- 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();
}

View File

@ -1,10 +0,0 @@
--- 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. :-( */

View File

@ -1,15 +1,16 @@
--- src/plugins/cpu/cpu.c.orig 2008-06-21 13:06:29.000000000 +0800
+++ src/plugins/cpu/cpu.c 2008-06-21 13:14:46.000000000 +0800
@@ -18,14 +18,24 @@
--- src/plugins/cpu/cpu.c.orig 2010-02-08 01:37:52.000000000 -0500
+++ src/plugins/cpu/cpu.c 2010-09-24 12:30:27.856886131 -0400
@@ -19,12 +19,24 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-/*A little bug fixed by Mykola <mykola@2ka.mipt.ru>:) */
+
+/*
+ * A little bug fixed by Mykola <mykola@2ka.mipt.ru> :)
+ * FreeBSD support added by Andreas Wiese <aw@instandbesetzt.net>
+ */
+
#include <string.h>
#include <sys/time.h>
@ -19,17 +20,16 @@
+# include <sys/types.h>
+# include <sys/resource.h>
+# include <sys/sysctl.h>
+# include <stdio.h>
+#else
+# include <sys/sysinfo.h>
+#endif
#include <stdlib.h>
+#include <stdio.h>
#include <glib/gi18n.h>
#include "plugin.h"
@@ -59,6 +69,38 @@
struct cpu_stat cpu_anterior;
} cpu_t;
@@ -65,6 +77,39 @@
static int cpu_constructor(Plugin * p, char ** fp);
static void cpu_destructor(Plugin * p);
+#ifdef __FreeBSD__
+static void
@ -41,16 +41,16 @@
+
+
+ if(init == 0) {
+ struct clockinfo ci;
+ j = sizeof(ci);
+ sysctlbyname("kern.clockrate", &ci, &j, NULL, 0);
+ realhz = ci.stathz ? ci.stathz : ci.hz;
+ 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);
+ j = 2;
+ sysctlnametomib("kern.cp_time", mib, &j);
+
+ init = 1;
+ j = sizeof(ct);
+ init = 1;
+ j = sizeof(ct);
+ }
+
+ sysctl(mib, 2, ct, &j, NULL, 0);
@ -63,32 +63,31 @@
+}
+#endif
+
+
/* Redraw after timer callback or resize. */
static void redraw_pixmap(CPUPlugin * c)
{
@@ -99,11 +144,18 @@
{
/* Open statistics file and scan out CPU usage. */
struct cpu_stat cpu;
- FILE * stat = fopen("/proc/stat", "r");
- if (stat == NULL)
- return TRUE;
- int fscanf_result = fscanf(stat, "cpu %lu %lu %lu %lu", &cpu.u, &cpu.n, &cpu.s, &cpu.i);
- fclose(stat);
+ FILE * stat;
+
+ #ifdef __FreeBSD__
+ get_procstat(&cpu.u, &cpu.n, &cpu.s, &cpu.i);
+ int fscanf_result = 4;
+ #else
+ stat = fopen("/proc/stat", "r");
+ if (stat == NULL)
+ return TRUE;
+ int fscanf_result = fscanf(stat, "cpu %lu %lu %lu %lu", &cpu.u, &cpu.n, &cpu.s, &cpu.i);
+ fclose(stat);
+ #endif
static int
cpu_update(cpu_t *c)
@@ -66,18 +108,24 @@
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
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;
/* Ensure that fscanf succeeded. */
if (fscanf_result == 4)

View File

@ -1,11 +0,0 @@
--- src/systray/fixedtip.h.orig 2008-07-17 14:48:22.000000000 +0800
+++ src/systray/fixedtip.h 2008-07-17 14:49:43.000000000 +0800
@@ -52,6 +52,8 @@
void (* clicked) (NaFixedTip *fixedtip);
};
+ void fixed_tip_hide(void);
+
GType na_fixed_tip_get_type (void);
GtkWidget *na_fixed_tip_new (GtkWidget *parent,

View File

@ -2,31 +2,22 @@ bin/lxpanel
bin/lxpanelctl
lib/lxpanel/plugins/batt.so
lib/lxpanel/plugins/cpu.so
lib/lxpanel/plugins/cpufreq.so
lib/lxpanel/plugins/deskno.so
lib/lxpanel/plugins/kbled.so
lib/lxpanel/plugins/netstatus.so
lib/lxpanel/plugins/thermal.so
lib/lxpanel/plugins/volume.so
%%NLS%%share/locale/de/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/fi/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/fr/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/hu/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ko/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/pl/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/pt_BR/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/sk/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/zh_TW/LC_MESSAGES/lxpanel.mo
lib/lxpanel/plugins/xkb.so
libdata/pkgconfig/lxpanel.pc
include/lxpanel/plugin.h
%%DATADIR%%/images/background.png
%%DATADIR%%/images/capslock-off.png
%%DATADIR%%/images/capslock-on.png
%%DATADIR%%/images/clock.png
%%DATADIR%%/images/cpufreq-icon.png
%%DATADIR%%/images/file-manager.png
%%DATADIR%%/images/gnome-applications.png
%%DATADIR%%/images/gnome-control-center.png
%%DATADIR%%/images/gnome-devel.png
%%DATADIR%%/images/gnome-fs-desktop.png
%%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
@ -35,37 +26,166 @@ lib/lxpanel/plugins/volume.so
%%DATADIR%%/images/gnome-netstatus-error.png
%%DATADIR%%/images/gnome-netstatus-idle.png
%%DATADIR%%/images/gnome-netstatus-rx.png
%%DATADIR%%/images/gnome-netstatus-txrx.png
%%DATADIR%%/images/gnome-netstatus-tx.png
%%DATADIR%%/images/gnome-setting.png
%%DATADIR%%/images/gnome-system.png
%%DATADIR%%/images/gnome-util.png
%%DATADIR%%/images/gnome-netstatus-txrx.png
%%DATADIR%%/images/mute.png
%%DATADIR%%/images/my-computer.png
%%DATADIR%%/images/ns-bothrs.png
%%DATADIR%%/images/ns-connected.png
%%DATADIR%%/images/ns-disconnect.png
%%DATADIR%%/images/ns-lock.png
%%DATADIR%%/images/ns-problem.png
%%DATADIR%%/images/ns-recvdata.png
%%DATADIR%%/images/ns-senddata.png
%%DATADIR%%/images/ns-lock.png
%%DATADIR%%/images/capslock-on.png
%%DATADIR%%/images/capslock-off.png
%%DATADIR%%/images/numlock-on.png
%%DATADIR%%/images/numlock-off.png
%%DATADIR%%/images/scrllock-on.png
%%DATADIR%%/images/numlock-on.png
%%DATADIR%%/images/scrllock-off.png
%%DATADIR%%/images/my-computer.png
%%DATADIR%%/images/redhat-internet.png
%%DATADIR%%/images/scrllock-on.png
%%DATADIR%%/images/stock_volume.png
%%DATADIR%%/images/volume.png
%%DATADIR%%/images/window-manager.png
%%DATADIR%%/images/xkb-flags/ae.png
%%DATADIR%%/images/xkb-flags/am.png
%%DATADIR%%/images/xkb-flags/ar.png
%%DATADIR%%/images/xkb-flags/at.png
%%DATADIR%%/images/xkb-flags/az.png
%%DATADIR%%/images/xkb-flags/be.png
%%DATADIR%%/images/xkb-flags/bg.png
%%DATADIR%%/images/xkb-flags/bh.png
%%DATADIR%%/images/xkb-flags/br.png
%%DATADIR%%/images/xkb-flags/by.png
%%DATADIR%%/images/xkb-flags/ca.png
%%DATADIR%%/images/xkb-flags/ch.png
%%DATADIR%%/images/xkb-flags/cu.png
%%DATADIR%%/images/xkb-flags/cz.png
%%DATADIR%%/images/xkb-flags/de.png
%%DATADIR%%/images/xkb-flags/dj.png
%%DATADIR%%/images/xkb-flags/dk.png
%%DATADIR%%/images/xkb-flags/dz.png
%%DATADIR%%/images/xkb-flags/ee.png
%%DATADIR%%/images/xkb-flags/eg.png
%%DATADIR%%/images/xkb-flags/es.png
%%DATADIR%%/images/xkb-flags/eu.png
%%DATADIR%%/images/xkb-flags/fi.png
%%DATADIR%%/images/xkb-flags/fr.png
%%DATADIR%%/images/xkb-flags/ge.png
%%DATADIR%%/images/xkb-flags/gr.png
%%DATADIR%%/images/xkb-flags/hr.png
%%DATADIR%%/images/xkb-flags/hu.png
%%DATADIR%%/images/xkb-flags/il.png
%%DATADIR%%/images/xkb-flags/iq.png
%%DATADIR%%/images/xkb-flags/is.png
%%DATADIR%%/images/xkb-flags/it.png
%%DATADIR%%/images/xkb-flags/jo.png
%%DATADIR%%/images/xkb-flags/jp.png
%%DATADIR%%/images/xkb-flags/km.png
%%DATADIR%%/images/xkb-flags/kr.png
%%DATADIR%%/images/xkb-flags/kw.png
%%DATADIR%%/images/xkb-flags/la.png
%%DATADIR%%/images/xkb-flags/lb.png
%%DATADIR%%/images/xkb-flags/lt.png
%%DATADIR%%/images/xkb-flags/ly.png
%%DATADIR%%/images/xkb-flags/ma.png
%%DATADIR%%/images/xkb-flags/mk.png
%%DATADIR%%/images/xkb-flags/mn.png
%%DATADIR%%/images/xkb-flags/mx.png
%%DATADIR%%/images/xkb-flags/nl.png
%%DATADIR%%/images/xkb-flags/no.png
%%DATADIR%%/images/xkb-flags/om.png
%%DATADIR%%/images/xkb-flags/pl.png
%%DATADIR%%/images/xkb-flags/ps.png
%%DATADIR%%/images/xkb-flags/pt.png
%%DATADIR%%/images/xkb-flags/qa.png
%%DATADIR%%/images/xkb-flags/qc.png
%%DATADIR%%/images/xkb-flags/ro.png
%%DATADIR%%/images/xkb-flags/ru.png
%%DATADIR%%/images/xkb-flags/sa.png
%%DATADIR%%/images/xkb-flags/sd.png
%%DATADIR%%/images/xkb-flags/se.png
%%DATADIR%%/images/xkb-flags/si.png
%%DATADIR%%/images/xkb-flags/sk.png
%%DATADIR%%/images/xkb-flags/so.png
%%DATADIR%%/images/xkb-flags/sr.png
%%DATADIR%%/images/xkb-flags/sy.png
%%DATADIR%%/images/xkb-flags/th.png
%%DATADIR%%/images/xkb-flags/tn.png
%%DATADIR%%/images/xkb-flags/tr.png
%%DATADIR%%/images/xkb-flags/ua.png
%%DATADIR%%/images/xkb-flags/uk.png
%%DATADIR%%/images/xkb-flags/un.png
%%DATADIR%%/images/xkb-flags/us.png
%%DATADIR%%/images/xkb-flags/uy.png
%%DATADIR%%/images/xkb-flags/vn.png
%%DATADIR%%/images/xkb-flags/ye.png
%%DATADIR%%/images/xkb-flags/yu.png
%%DATADIR%%/ui/launchbar.ui
%%DATADIR%%/ui/netstatus.ui
%%DATADIR%%/ui/panel-pref.ui
%%DATADIR%%/profile/default/config
%%DATADIR%%/profile/default/panels/panel
%%DATADIR%%/ui/panel-pref.glade
@dirrmtry lib/lxpanel/plugins
@dirrmtry lib/lxpanel
@dirrm %%DATADIR%%/ui
%%NLS%%share/locale/af/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ar/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/bg/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/bn_IN/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ca/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/cs/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/da/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/de/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/el/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/es/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/es_VE/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/et/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/eu/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/fa/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/fi/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/fr/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/frp/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/gl/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/he/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/hr/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/hu/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/id/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/it/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ja/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ko/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/lt/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ml/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ms/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/nb/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/nl/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/nn/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/pl/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ps/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/pt/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/pt_BR/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ru/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/sk/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/sl/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/sr/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/sv/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/tr/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/uk/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ur/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/ur_PK/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/vi/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/zh_CN/LC_MESSAGES/lxpanel.mo
%%NLS%%share/locale/zh_TW/LC_MESSAGES/lxpanel.mo
@dirrm %%DATADIR%%/images/xkb-flags
@dirrm %%DATADIR%%/images
@dirrm %%DATADIR%%/profile/default/panels
@dirrm %%DATADIR%%/profile/default
@dirrm %%DATADIR%%/profile
@dirrm %%DATADIR%%/images
@dirrm %%DATADIR%%/ui
@dirrm %%DATADIR%%
@dirrm include/lxpanel
@dirrmtry share/locale/es_VE/LC_MESSAGES
@dirrmtry share/locale/es_VE
@dirrmtry share/locale/frp/LC_MESSAGES
@dirrmtry share/locale/frp
@dirrmtry share/locale/nn/LC_MESSAGES
@dirrmtry share/locale/nn
@dirrmtry share/locale/ur_PK/LC_MESSAGES
@dirrmtry share/locale/ur_PK
@dirrmtry lib/lxpanel/plugins
@dirrmtry lib/lxpanel
@dirrmtry lib/pkgconfig