From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Oct 7 01:40:21 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C4F016A415 for ; Sat, 7 Oct 2006 01:40:21 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D868C43D46 for ; Sat, 7 Oct 2006 01:40:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k971eKQU083773 for ; Sat, 7 Oct 2006 01:40:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k971eK97083769; Sat, 7 Oct 2006 01:40:20 GMT (envelope-from gnats) Resent-Date: Sat, 7 Oct 2006 01:40:20 GMT Resent-Message-Id: <200610070140.k971eK97083769@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "psilotum" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA57A16A403 for ; Sat, 7 Oct 2006 01:32:14 +0000 (UTC) (envelope-from psilotum@msa.hinet.net) Received: from psilotum.myphotos.cc (61-228-28-50.dynamic.hinet.net [61.228.28.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E713643D45 for ; Sat, 7 Oct 2006 01:32:13 +0000 (GMT) (envelope-from psilotum@msa.hinet.net) Received: from psilotum.myphotos.cc (localhost [127.0.0.1]) by psilotum.myphotos.cc (8.13.8/8.13.6) with SMTP id k971UH6j082973 for ; Sat, 7 Oct 2006 09:30:17 +0800 (CST) (envelope-from psilotum@msa.hinet.net) Received: by psilotum.myphotos.cc (sSMTP sendmail emulation); Sat, 7 Oct 2006 09:30:17 +0800 Message-Id: <200610070130.k971UH6j082973@psilotum.myphotos.cc> Date: Sat, 7 Oct 2006 09:30:17 +0800 From: "psilotum" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/104081: [NEW PORT] x11/lxpanel: LXPanel is a lightweight X11 desktop panel X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Oct 2006 01:40:21 -0000 >Number: 104081 >Category: ports >Synopsis: [NEW PORT] x11/lxpanel: LXPanel is a lightweight X11 desktop panel >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 07 01:40:20 GMT 2006 >Closed-Date: >Last-Modified: >Originator: psilotum >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: >Environment: System: FreeBSD psilotum.myphotos.cc 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #2: Fri Oct 6 19:36:23 CST >Description: LXpanel is a lightweight desktop panel like fbpanel. >How-To-Repeat: >Fix: --- lxpanel-0.1.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # lxpanel # lxpanel/Makefile # lxpanel/distinfo # lxpanel/pkg-descr # lxpanel/pkg-plist # lxpanel/files # lxpanel/files/patch-cpu.c # lxpanel/files/patch-plugin.h # lxpanel/files/patch-plugin.c # echo c - lxpanel mkdir -p lxpanel > /dev/null 2>&1 echo x - lxpanel/Makefile sed 's/^X//' >lxpanel/Makefile << 'END-of-lxpanel/Makefile' X# New ports collection makefile for: lxpanel X# Date created: Sat Oct 7 01:22:35 CST 2006 X# Whom: Lin, Cheng-Tao X# X# $FreeBSD$ X# X XPORTNAME= lxpanel XPORTVERSION= 0.1 XCATEGORIES= x11 XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= ${PORTNAME} X XMAINTAINER= b89605222@ntu.edu.tw XCOMMENT= LXPanel is a lightweight X11 desktop panel X XUSE_X_PREFIX= yes XUSE_XLIB= yes XUSE_GNOME= gtk20 XGNU_CONFIGURE= yes XUSE_AUTOTOOLS= automake:19 XCONFIGURE_ARGS= --prefix=${PREFIX} XCONFIGURE_ENV= LDFLAGS="-L${X11BASE}/lib" CFLAGS="-I${LOCALBASE}/include" XCFLAGS+= -I${WRKSRC} XUSE_GMAKE= yes X X.if !defined(WITHOUT_NLS) X USE_GETTEXT= yes XPLIST_SUB+= NLS="" X.else XCONFIGURE_ARGS+=--disable-nls XPLIST_SUB+= NLS="@comment " X.endif X X.include END-of-lxpanel/Makefile echo x - lxpanel/distinfo sed 's/^X//' >lxpanel/distinfo << 'END-of-lxpanel/distinfo' XMD5 (lxpanel-0.1.tar.gz) = 45f8a5b3a5a22ac3e00ca1803591aae4 XSHA256 (lxpanel-0.1.tar.gz) = cb2d235299748b6b68cbed664dae6ae0e429b93560bf7579399b843870016347 XSIZE (lxpanel-0.1.tar.gz) = 343734 END-of-lxpanel/distinfo echo x - lxpanel/pkg-descr sed 's/^X//' >lxpanel/pkg-descr << 'END-of-lxpanel/pkg-descr' XLXpanel is a lightweight desktop panel like fbpanel. X XIt's not only with fbpanel features but also X X* supports i18n X* provides lxpanelctl to control lxpanel X XWWW: http://lxpanel.sourceforge.net/ END-of-lxpanel/pkg-descr echo x - lxpanel/pkg-plist sed 's/^X//' >lxpanel/pkg-plist << 'END-of-lxpanel/pkg-plist' Xbin/lxpanel Xbin/lxpanelctl X%%NLS%%locale/zh_TW/LC_MESSAGES/lxpanel.mo X%%DATADIR%%/default X%%DATADIR%%/images/bottom-left.xpm X%%DATADIR%%/images/bottom-right.xpm X%%DATADIR%%/images/default.xpm X%%DATADIR%%/images/emacs.svg X%%DATADIR%%/images/file-manager.svg X%%DATADIR%%/images/firefox2.svg X%%DATADIR%%/images/gnome-fs-desktop.svg X%%DATADIR%%/images/gnome-setting.svg X%%DATADIR%%/images/gnome_terminal.svg X%%DATADIR%%/images/my-computer.svg X%%DATADIR%%/images/redhat-internet.svg X%%DATADIR%%/images/thunderbird.svg X%%DATADIR%%/images/top-left.xpm X%%DATADIR%%/images/top-right.xpm X%%DATADIR%%/pager X@dirrm %%DATADIR%%/images X@dirrm %%DATADIR%% END-of-lxpanel/pkg-plist echo c - lxpanel/files mkdir -p lxpanel/files > /dev/null 2>&1 echo x - lxpanel/files/patch-cpu.c sed 's/^X//' >lxpanel/files/patch-cpu.c << 'END-of-lxpanel/files/patch-cpu.c' X--- src/plugins/cpu.c.orig Sat Oct 7 01:48:45 2006 X+++ src/plugins/cpu.c Sat Oct 7 02:00:22 2006 X@@ -24,7 +24,13 @@ X #include X #include X #include X-#include X+#ifdef __FreeBSD__ X+# include X+# include X+# include X+#else X+# include X+#endif X #include X #include X X@@ -61,6 +67,38 @@ X struct cpu_stat cpu_anterior; X } cpu_t; X X+#ifdef __FreeBSD__ X+static void X+get_procstat(unsigned long *u, unsigned long *n, unsigned long *s, X+ unsigned long *i) X+{ X+ static int mib[2] = { -1, -1 }, init = 0, j, realhz; X+ long ct[CPUSTATES]; X+ X+ X+ if(init == 0) { X+ struct clockinfo ci; X+ j = sizeof(ci); X+ sysctlbyname("kern.clockrate", &ci, &j, NULL, 0); X+ realhz = ci.stathz ? ci.stathz : ci.hz; X+ X+ j = 2; X+ sysctlnametomib("kern.cp_time", mib, &j); X+ X+ init = 1; X+ j = sizeof(ct); X+ } X+ X+ sysctl(mib, 2, ct, &j, NULL, 0); X+ *u = ct[CP_USER] / realhz; X+ *n = ct[CP_NICE] / realhz; X+ *s = ct[CP_SYS] / realhz; X+ *i = ct[CP_IDLE] / realhz; X+ X+ return; X+ } X+#endif X+ X X static int X cpu_update(cpu_t *c) X@@ -68,18 +106,27 @@ X int cpu_u=0, cpu_s=0, cpu_n=0, cpu_i=100; X unsigned int i; X struct cpu_stat cpu, cpu_r; X+#ifndef __FreeBSD__ X+ FILE *stat; X+#endif X+ X FILE *stat; X float total; X X ENTER; X if(!c->pixmap) X RET(TRUE); X- X+#ifdef __FreeBSD__ X+ get_procstat(&cpu.u, &cpu.n, &cpu.s, &cpu.i); X+#else X+ X stat = fopen("/proc/stat", "r"); X if(!stat) X RET(TRUE); X fscanf(stat, "cpu %lu %lu %lu %lu", &cpu.u, &cpu.n, &cpu.s, &cpu.i); X fclose(stat); X+#endif X+ X X cpu_r.u = cpu.u - c->cpu_anterior.u; X cpu_r.n = cpu.n - c->cpu_anterior.n; END-of-lxpanel/files/patch-cpu.c echo x - lxpanel/files/patch-plugin.h sed 's/^X//' >lxpanel/files/patch-plugin.h << 'END-of-lxpanel/files/patch-plugin.h' X--- src/plugin.h.orig Sat Oct 7 02:01:56 2006 X+++ src/plugin.h Sat Oct 7 02:02:54 2006 X@@ -62,6 +62,7 @@ X #define STATIC_SPACE X #define STATIC_ICONS X #define STATIC_DESKNO X+#define STATIC_CPU X #endif X X END-of-lxpanel/files/patch-plugin.h echo x - lxpanel/files/patch-plugin.c sed 's/^X//' >lxpanel/files/patch-plugin.c << 'END-of-lxpanel/files/patch-plugin.c' X--- src/plugin.c.orig Sat Oct 7 02:04:15 2006 X+++ src/plugin.c Sat Oct 7 02:05:06 2006 X@@ -104,6 +104,10 @@ X REGISTER_PLUGIN_CLASS(deskno_plugin_class, 0); X #endif X X+#if defined(STATIC_CPU) && defined(PLUGIN_CPU) X+ REGISTER_PLUGIN_CLASS(cpu_plugin_class, 0); X+#endif X+ X RET(); X } X END-of-lxpanel/files/patch-plugin.c exit --- lxpanel-0.1.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: