1
0
mirror of https://github.com/gryf/gryf-overlay.git synced 2026-02-25 21:35:48 +01:00

- Added new version of Calibre,

- Added patch for bubblemon dockapp (bug#310399, upgrade GTK to 2.18), removed
  some old patches
- Added newest version of newsbeuter (+ stfl lib)
This commit is contained in:
root
2010-03-25 23:02:02 +01:00
parent 707f68ee83
commit 58e78d874f
14 changed files with 507 additions and 194 deletions

View File

@@ -1,3 +1,4 @@
AUX bubblemon-1.46-correct_mem-swap_values.patch 4549 RMD160 48d0e1775a6d7f38518cadc8f11544e68cfbaeab SHA1 0298dc7c9bd24c93f4305d2758a2c05dfd04148f SHA256 1fbe00f7892b0d1e258d137812b58a5147739e8c2503f40e37c09ebf73fae256
AUX bubblemon-1.46-gtk.patch 3435 RMD160 45e2d5d562237ec1b45553a21cc003796058dccd SHA1 ed04fadb80b5942f5358986881de53ced0d26984 SHA256 6e02353acaebba6d0b0d2fc51ad200e5d499523e933586c41770bf4b652208b1
AUX bubblemon-1.46-no_display.patch 814 RMD160 4ed909636e4d62d7bfcff91998c026459291c6dd SHA1 55af501262c525e97ad40c494f43de334eea4588 SHA256 b848d4c7f9c57408e688b8968efe6bddafc172a50b11bc5283405770096489e2
DIST bubblemon-dockapp-1.46.tar.gz 40001 RMD160 79e8be36cd11a2c6f4998cd747b6125696603a81 SHA1 172de9ea7d78e4578143469187a72da8f836647a SHA256 f928073d3c69b2668e89b93cdcca5f390437831aab3eac3aa2129f8713e79dbf
EBUILD bubblemon-1.46-r10.ebuild 1001 RMD160 aa0ea160d7eb84bd1c497ee73195bac63205fcda SHA1 cb18e9d7a344b6c5cbc866aedc2814b5d7b86fa9 SHA256 7cb0c32c3f7faec99ba5a799cf478c78e3cc1db95000aa708487efcf4e754f73
EBUILD bubblemon-1.46-r10.ebuild 1051 RMD160 c2b0a58b303c8c2f7c9a50fc3af7228c4a29b65f SHA1 04407128dba14b2e573c80b69e25c19f950ab58c SHA256 4051d364b4b7274a407cae842b9373401082ae798c56e5fa7442713635cd35ab

View File

@@ -1,35 +1,43 @@
# Copyright 1999-2006 Gentoo Foundation
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-misc/bubblemon/bubblemon-1.46.ebuild,v 1.7 2006/02/07 21:11:56 blubb Exp $
# $Header: /var/cvsroot/gentoo-x86/x11-misc/bubblemon/bubblemon-1.46-r1.ebuild,v 1.8 2010/01/10 18:39:54 fauli Exp $
inherit eutils
DESCRIPTION="A fun monitoring applet for your desktop, complete with swimming duck"
HOMEPAGE="http://www.ne.jp/asahi/linux/timecop"
SRC_URI="http://www.ne.jp/asahi/linux/timecop/software/${PN}-dockapp-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
KEYWORDS="alpha amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~x64-solaris"
IUSE=""
RDEPEND=">=x11-libs/gtk+-2"
DEPEND="${RDEPEND}
dev-util/pkgconfig"
S=${WORKDIR}/${PN}-dockapp-${PV}
SRC_URI="http://www.ne.jp/asahi/linux/timecop/software/${PN}-dockapp-${PV}.tar.gz"
DEPEND="virtual/libc
=x11-libs/gtk+-1.2*
>=sys-apps/sed-4"
src_unpack(){
src_unpack() {
unpack ${A}
cd ${S}
epatch ${FILESDIR}/bubblemon-1.46-correct_mem-swap_values.patch || die "epatch failed"
cd "${S}"
epatch "${FILESDIR}"/${P}-gtk.patch
epatch "${FILESDIR}"/${P}-no_display.patch
}
src_compile() {
sed -i "s/CFLAGS = -O3/CFLAGS = ${CFLAGS}/" Makefile
# sed -i "s/# EXTRA += -DUPSIDE_DOWN_DUCK/EXTRA += -DUPSIDE_DOWN_DUCK/" Makefile
make || die
src_compile() {
emake GENTOO_CFLAGS="${CFLAGS}" || die "emake failed."
}
src_install () {
into /usr
dobin bubblemon
dodoc ChangeLog README doc/* misc/*
dodoc ChangeLog README doc/Xdefaults.sample
insinto /usr/share/${PN}
doins misc/{*.xcf,*.wav}
exeinto /usr/share/${PN}
doexe misc/wakwak.sh
}

View File

@@ -1,169 +0,0 @@
--- bubblemon-dockapp-1.46/sys_linux.c 2003-10-01 04:30:41.000000000 +0200
+++ bubblemon-dockapp-1.46-patched/sys_linux.c 2007-02-18 17:43:46.000000000 +0100
@@ -69,89 +69,92 @@ int system_cpu(void)
return cpuload;
}
+/* code was taken from wmsysmon which is better */
int system_memory(void)
{
- u_int64_t my_mem_used, my_mem_max;
- u_int64_t my_swap_used, my_swap_max;
-#ifdef KERNEL_26
- char *p;
-#endif
-
- static int mem_delay = 0;
- FILE *mem;
- static u_int64_t aa, ab, ac, ad;
-#ifndef KERNEL_26
- static u_int64_t ae, af, ag, ah;
-#endif
- /* put this in permanent storage instead of stack */
- static char shit[2048];
-
- /* we might as well get both swap and memory at the same time.
- * sure beats opening the same file twice */
+ static int mem_delay = 0;
if (mem_delay-- <= 0) {
+ FILE *memfp;
+ char buf[1024];
+ long mem_total = 0;
+ long mem_buffers = 0;
+ long mem_cache = 0;
+ long swap_total = 0;
+ long swap_free = 0;
#ifdef KERNEL_26
- mem = fopen("/proc/meminfo", "r");
- memset(shit, 0, sizeof(shit));
- fread(shit, 2048, 1, mem);
- p = strstr(shit, "MemTotal");
- if (p) {
- sscanf(p, "MemTotal:%Ld", &aa);
- my_mem_max = aa << 10;
-
- p = strstr(p, "Active");
- if (p) {
- sscanf(p, "Active:%Ld", &ab);
- my_mem_used = ab << 10;
-
- p = strstr(p, "SwapTotal");
- if (p) {
- sscanf(p, "SwapTotal:%Ld", &ac);
- my_swap_max = ac << 10;
-
- p = strstr(p, "SwapFree");
- if (p) {
- sscanf(p, "SwapFree:%Ld", &ad);
- my_swap_used = my_swap_max - (ad << 10);
+ static char *p_mem_tot=NULL, *p_mem_free, *p_mem_buffers, *p_mem_cache;
+ static char *p_swap_total, *p_swap_free;
+
+ static long mem_free = 0;
+
+ memfp = fopen("/proc/meminfo", "r");
+ fread(buf, 1024, 1, memfp);
- bm.mem_used = my_mem_used;
- bm.mem_max = my_mem_max;
- bm.swap_used = my_swap_used;
- bm.swap_max = my_swap_max;
- }
+ if (!p_mem_tot)
+ {
+ p_mem_tot = strstr(buf, "MemTotal:" ) + 13;
+ p_mem_free = strstr(buf, "MemFree:" ) + 13;
+ p_mem_buffers = strstr(buf, "Buffers:" ) + 13;
+ p_mem_cache = strstr(buf, "Cached:" ) + 13;
+ p_swap_total = strstr(buf, "SwapTotal:") + 13;
+ p_swap_free = strstr(buf, "SwapFree:" ) + 13;
}
- }
- }
- fclose(mem);
- mem_delay = 25;
+
+
+ sscanf(p_mem_tot, "%ld", &mem_total );
+ sscanf(p_mem_free, "%ld", &mem_free );
+ sscanf(p_mem_buffers, "%ld", &mem_buffers);
+ sscanf(p_mem_cache, "%ld", &mem_cache );
+ sscanf(p_swap_total, "%ld", &swap_total );
+ sscanf(p_swap_free, "%ld", &swap_free );
+
+ fclose(memfp);
+
+ bm.mem_used = (mem_total - mem_free - mem_buffers - mem_cache) * 1024;
+ bm.mem_max = mem_total * 1024;
+ bm.swap_used = (swap_total - swap_free) * 1024;
+ bm.swap_max = swap_total * 1024;
+ mem_delay = 25;
#else
- mem = fopen("/proc/meminfo", "r");
- fgets(shit, 2048, mem);
-
- fscanf(mem, "%*s %Ld %Ld %Ld %Ld %Ld %Ld", &aa, &ab, &ac,
- &ad, &ae, &af);
- fscanf(mem, "%*s %Ld %Ld", &ag, &ah);
- fclose(mem);
- mem_delay = 25;
-
- /* calculate it */
- my_mem_max = aa; /* memory.total; */
- my_swap_max = ag; /* swap.total; */
-
- my_mem_used = ah + ab - af - ae; /* swap.used + memory.used - memory.cached - memory.buffer; */
-
- if (my_mem_used > my_mem_max) {
- my_swap_used = my_mem_used - my_mem_max;
- my_mem_used = my_mem_max;
- } else {
- my_swap_used = 0;
- }
+ int last_mem = 0, last_swap = 0, first = 1;
+ long swap_used = 0;
+ long mem_used = 0;
+ int Mem_l;
+ int Swap_l;
+ int i, ents;
+
+ memfp = fopen("/proc/meminfo", "r");
+ for(i = 0; fgets(buf, 1024, memfp); i++) {
+ if(strstr(buf, "Mem:")) Mem_l = i;
+ else if(strstr(buf, "Swap:")) Swap_l = i;
+ }
+
+ memfp = freopen("/proc/meminfo", "r", memfp);
- bm.mem_used = my_mem_used;
- bm.mem_max = my_mem_max;
- bm.swap_used = my_swap_used;
- bm.swap_max = my_swap_max;
+ for(i = 0, ents = 0; ents < 2 && fgets(buf, 1024, memfp); i++) {
+ if(i == Mem_l) {
+ sscanf(buf, "%*s %ld %ld %*d %*d %ld %ld",
+ &mem_total,
+ &mem_used,
+ &mem_buffers,
+ &mem_cache);
+ ents++;
+ } else if(i == Swap_l) {
+ sscanf(buf, "%*s %ld %ld %ld",
+ &swap_total,
+ &swap_used,
+ &swap_free);
+ ents++;
+ }
+ }
+ fclose(memfp);
+
+ bm.mem_used = mem_used - mem_buffers - mem_cache;
+ bm.mem_max = mem_total;
+ bm.swap_used = swap_used;
+ bm.swap_max = swap_total;
+ mem_delay = 25;
#endif
-
/* memory info changed - update things */
return 1;
}

View File

@@ -0,0 +1,124 @@
diff -ur bubblemon-dockapp-1.46.orig/bubblemon.c bubblemon-dockapp-1.46/bubblemon.c
--- bubblemon-dockapp-1.46.orig/bubblemon.c 2003-10-01 03:37:32.000000000 +0300
+++ bubblemon-dockapp-1.46/bubblemon.c 2007-05-28 18:10:43.000000000 +0300
@@ -58,6 +58,7 @@
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <X11/Xresource.h>
+#include <gtk/gtk.h>
#include "include/master.xpm"
#include "include/bubblemon.h"
@@ -575,7 +576,7 @@
attri.colormap = gdk_colormap_get_system();
attri.wmclass_name = "bubblemon";
attri.wmclass_class = "bubblemon";
- attri.window_type = GDK_WINDOW_TOPLEVEL;
+ attri.window_type = GDK_WINDOW_CHILD;
bm.iconwin = gdk_window_new(bm.win, &attri,
GDK_WA_TITLE | GDK_WA_WMCLASS);
@@ -593,7 +594,6 @@
wmhints.window_group = win;
wmhints.flags =
StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
- XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints);
bm.gc = gdk_gc_new(bm.win);
@@ -606,6 +606,7 @@
gdk_window_set_back_pixmap(bm.iconwin, bm.pixmap, False);
gdk_window_show(bm.win);
+ XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints);
#ifdef KDE_DOCKAPP
/* makes the dockapp visible inside KDE wm */
gdk_window_show(bm.iconwin);
diff -ur bubblemon-dockapp-1.46.orig/Makefile bubblemon-dockapp-1.46/Makefile
--- bubblemon-dockapp-1.46.orig/Makefile 2003-10-04 03:22:07.000000000 +0300
+++ bubblemon-dockapp-1.46/Makefile 2007-05-28 18:11:20.000000000 +0300
@@ -11,30 +11,49 @@
# no user serviceable parts below
EXTRA += $(WMAN)
+# gtk cflags and gtk lib flags
+GTK2_CFLAGS = $(shell pkg-config gtk+-2.0 --cflags)
+GTK2_LIBS = $(shell pkg-config gtk+-2.0 --libs)
+
+
# optimization cflags
-CFLAGS = -O3 -ansi -Wall `gtk-config --cflags` ${EXTRA}
+#CFLAGS = -O3 -Wall ${EXTRA}
+CFLAGS = ${GENTOO_CFLAGS} ${EXTRA}
+
# profiling cflags
-# CFLAGS = -ansi -Wall -pg -O3 `gtk-config --cflags` ${EXTRA} -DPRO
+# CFLAGS = -ansi -Wall -pg -O3 ${EXTRA} -DPRO
# test coverage cflags
-# CFLAGS = -fprofile-arcs -ftest-coverage -Wall -ansi -g `gtk-config --cflags` ${EXTRA} -DPRO
+# CFLAGS = -fprofile-arcs -ftest-coverage -Wall -ansi -g ${EXTRA} -DPRO
-SHELL=sh
+SHELL = sh
OS = $(shell uname -s)
+SRCS = bubblemon.c
OBJS = bubblemon.o
+BUBBLEMON = bubblemon
+
+LDFLAGS = -shared -Wl
+
+STRIP = strip
+
CC = gcc
+INSTALLMAN = -m 644
+
+
# special things for Linux
ifeq ($(OS), Linux)
- OBJS += sys_linux.o
- LIBS = `gtk-config --libs | sed "s/-lgtk//g"`
- INSTALL = -m 755
+ SRCS += sys_linux.c
+ OBJS += sys_linux.o
+ INSTALL = -m 755
+ INSTALLMAN = -m 644
endif
# special things for FreeBSD
ifeq ($(OS), FreeBSD)
+ SRCS += sys_freebsd.c
OBJS += sys_freebsd.o
- LIBS = `gtk-config --libs | sed "s/-lgtk//g"` -lkvm
+ LIBS = -lkvm
INSTALL = -c -g kmem -m 2755 -o root
endif
@@ -62,17 +81,21 @@
ifeq ($(COMPILER), gcc)
CFLAGS=-O3 -Wall
endif
- CFLAGS +=`gtk-config --cflags` ${EXTRA}
+ CFLAGS += ${EXTRA}
+ SRCS += sys_sunos.c
OBJS += sys_sunos.o
- LIBS = `gtk-config --libs` -lkstat -lm
+ LIBS = -lkstat -lm
INSTALL = -m 755
endif
+all: $(BUBBLEMON)
-all: bubblemon
+bubblemon: clean_obj
+ $(CC) $(GTK2_CFLAGS) $(CFLAGS) -o $(BUBBLEMON) \
+ $(LIBS) $(GTK2_LIBS) $(SRCS)
-bubblemon: $(OBJS)
- $(CC) $(CFLAGS) -o bubblemon $(OBJS) $(LIBS)
+clean_obj:
+ rm -rf *.o
clean:
rm -f bubblemon *.o *.bb* *.gcov gmon.* *.da *~

View File

@@ -0,0 +1,31 @@
--- bubblemon-dockapp-1.46_gentoo/bubblemon.c 2010-03-25 22:27:19.000000000 +0100
+++ bubblemon-dockapp-1.46/bubblemon.c 2010-03-25 22:30:04.000000000 +0100
@@ -44,7 +44,7 @@
*/
#define _GNU_SOURCE
-#define VERSION "1.41"
+#define VERSION "1.46"
/* general includes */
#include <stdio.h>
@@ -276,6 +276,8 @@
int main(int argc, char **argv)
{
+ /* This is needed to proper dockapp work on >=GTK+-2.18 */
+ setenv("GDK_NATIVE_WINDOWS", "1", 0);
char execute[256];
int proximity = 0;
int ch;
@@ -607,10 +609,7 @@
gdk_window_show(bm.win);
XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints);
-#ifdef KDE_DOCKAPP
- /* makes the dockapp visible inside KDE wm */
gdk_window_show(bm.iconwin);
-#endif
/* We begin with zero bubbles */
bm.n_bubbles = 0;

View File

@@ -1,3 +0,0 @@
MD5 f1f86fe5c725bf3a6f5fef8709992931 bubblemon-dockapp-1.46.tar.gz 40001
RMD160 79e8be36cd11a2c6f4998cd747b6125696603a81 bubblemon-dockapp-1.46.tar.gz 40001
SHA256 f928073d3c69b2668e89b93cdcca5f390437831aab3eac3aa2129f8713e79dbf bubblemon-dockapp-1.46.tar.gz 40001