1
0
mirror of https://github.com/gryf/gryf-overlay.git synced 2026-02-02 22:45:46 +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,6 +1,2 @@
DIST kydpdict-0.9.3.tar.bz2 606358 RMD160 d132cf5e637ff126e097e0d7c84712923808f558 SHA1 553db770428e9f33ec4663ad131a49c77d49ab97 SHA256 ea1abcd115c0eb10a306524d93a3952c1831bcc433e4454b7152440a7ebd95c4
DIST kydpdict-0.9.4.tar.bz2 617016 RMD160 162e3f1e886e48f4348f218e736597e17f736cb4 SHA1 2732d6ee052bfeaf6501816640d9372f6072485f SHA256 fc235dfc52520706236f7e401de716db463cbe6ecb5781986df6cc8c72654b7c
DIST kydpdict-0.9.5.tar.bz2 616587 RMD160 a987822ca2b1bc44c1eec99f1045e6cc9c0c9dcb SHA1 a5fefae7d7b879d13c7eea09fe6e5fcdc36aa443 SHA256 8ab15b97236e2b012dcef7545a37f5115d695b9f4b4875bc60d3b489432ef999
EBUILD kydpdict-0.9.3.ebuild 819 RMD160 5d9819be5abb77b250e5fe2f8d7a198fef046257 SHA1 f1cacfb14c2090c9a89bf5589074b334b8f0806e SHA256 2dd1ac6b234ecfb6b2fa4594e781e9534fae61341096c59094ac348676ae8b2c
EBUILD kydpdict-0.9.4.ebuild 819 RMD160 5d9819be5abb77b250e5fe2f8d7a198fef046257 SHA1 f1cacfb14c2090c9a89bf5589074b334b8f0806e SHA256 2dd1ac6b234ecfb6b2fa4594e781e9534fae61341096c59094ac348676ae8b2c
EBUILD kydpdict-0.9.5.ebuild 897 RMD160 14c05c715407cf253438a7f17b3409fc168e2c3a SHA1 92aeb6d953c6622bbf613d4eed3a6fb2b7c204bd SHA256 ce036e95d88b41306de1fe2566b2960f93ea4a00a728d87fc1b7cf4dfa2b1f71

View File

@@ -1,4 +1,6 @@
DIST calibre-0.6.40.tar.gz 11420347 RMD160 7493d62eea08f7d7d6f99136b6d2c0ca6abf0bf8 SHA1 9ba8324f038e915e3ef6a08090782d3d4c3a5ee8 SHA256 5042ddd332b988edc939b985a574aacea74df8da14be0c5c33f34705080a5160
DIST calibre-0.6.42.tar.gz 11501596 RMD160 72302b35b849e15413fe2b358ca1e3e9ea0751b1 SHA1 8944efd432293c8588b0b95896bfad2540f7dd4c SHA256 f62122616e345906c7d6c7565e1933c9d9cec28ad529f825feaea2b18cf45249
DIST calibre-0.6.45.tar.gz 12085471 RMD160 1fb0fd8672c047a01673f1115c79c937e1bc2217 SHA1 63aee33b8e4cd611bf2ba9a4ccd04ec89a4cbb9a SHA256 10255cf23c6cf38ad8cb60f66af1080a62a9ba3a374e58a71ebf5c4624acf898
EBUILD calibre-0.6.40.ebuild 4529 RMD160 30e02c241fc6974ab77196f7f8aae39bae033e56 SHA1 f6a7e90078f3999e7116b1639ceec4dccf1b4759 SHA256 07c1e433ded37f9b0d3774d9c221d5d92fdeb0c3d86c735481b2ed1d025b9f8e
EBUILD calibre-0.6.42.ebuild 4535 RMD160 242a8f0715aa9e667acb96396e7c015a5ed13712 SHA1 21066ae28238779d604058583c8d5b9a2ce04adf SHA256 c967accb615cf21eccd343537d54dbbd0cfeef1925afb9be88fa38c1810f9dcf
EBUILD calibre-0.6.45.ebuild 4524 RMD160 2ab0b7f976643199d03b7f57d452626777f7477c SHA1 e1d40c31d5e845dce7ce12a71ee1b8d47058f57a SHA256 36544fcb4b35bf2bb3472970b12c95cff5f3e86dc6a8a65cb0d7d9c01efaa6d2

View File

@@ -0,0 +1,148 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-0.6.44.ebuild,v 1.1 2010/03/06 11:12:20 zmedico Exp $
EAPI=2
PYTHON_DEPEND=2:2.6
PYTHON_USE_WITH=sqlite
inherit python distutils eutils fdo-mime bash-completion
DESCRIPTION="Ebook management application."
HOMEPAGE="http://calibre-ebook.com/"
SRC_URI="http://calibre-ebook.com/downloads/$P.tar.gz"
LICENSE="GPL-2"
KEYWORDS="~amd64 x86"
SLOT="0"
IUSE=""
# libusb-compat is untested
SHARED_DEPEND=">=dev-python/cssutils-0.9.7_alpha2
>=dev-python/setuptools-0.6_rc5
>=dev-python/imaging-1.1.6
>=dev-libs/chmlib-0.40
>=dev-libs/libusb-0.1.12:0
>=dev-python/PyQt4-4.5[X,svg,webkit]
>=dev-python/mechanize-0.1.11
>=media-gfx/imagemagick-6.3.5
>=x11-misc/xdg-utils-1.0.2
>=dev-python/dbus-python-0.82.2
>=dev-python/lxml-2.1.5
>=dev-python/python-dateutil-1.4.1
>=dev-python/beautifulsoup-3.0.5
>=dev-python/dnspython-1.6.0
>=app-text/poppler-0.12.3-r3[qt4,xpdf-headers]
>=sys-apps/help2man-1.36.4
app-text/podofo"
RDEPEND="$SHARED_DEPEND
>=dev-python/reportlab-2.1"
DEPEND="$SHARED_DEPEND
dev-python/setuptools
>=gnome-base/librsvg-2.0.0
>=x11-misc/xdg-utils-1.0.2-r2
sys-apps/help2man"
S=$WORKDIR/$PN
pkg_setup() {
python_set_active_version 2
}
src_prepare() {
# Avoid sandbox violation in /usr/share/gnome/apps when linux.py
# calls xdg-* (bug #258938).
sed -e "s:'xdg-desktop-menu', 'install':'xdg-desktop-menu', 'install', '--mode', 'user':" \
-e "s:xdg-icon-resource install:xdg-icon-resource install --mode user:" \
-e "s:xdg-mime install:xdg-mime install --mode user:" \
-e "s:old_udev = '/etc:old_udev = '${D}etc:" \
-i src/calibre/linux.py || die "sed'ing in the IMAGE path failed"
# Disable unnecessary privilege dropping for bug #287067.
sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
-i setup/install.py || die "sed'ing in the IMAGE path failed"
distutils_src_prepare
}
src_install() {
# Bypass kbuildsycoca and update-mime-database in order to
# avoid sandbox violations if xdg-mime tries to call them.
cat - > "${T}/kbuildsycoca" <<-EOF
#!$BASH
exit 0
EOF
cp "${T}"/{kbuildsycoca,update-mime-database}
chmod +x "${T}"/{kbuildsycoca,update-mime-database}
# --bindir and --sharedir don't seem to work.
# Pass them in anyway so we'll know when they are fixed.
# Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
# violation with kbuildsycoca as in bug #287067, comment #13.
export -n DISPLAY
# Bug #295672 - Aavoid sandbox violation in ~/.config by forcing
# variables to point to our fake temporary $HOME.
export XDG_CONFIG_HOME="$HOME/.config"
export CALIBRE_CONFIG_DIRECTORY="$XDG_CONFIG_HOME/calibre"
mkdir -p "$XDG_CONFIG_HOME" "$CALIBRE_CONFIG_DIRECTORY"
PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
distutils_src_install --bindir="${D}usr/bin" --sharedir="${D}usr/share"
grep -rlZ "${D}" "${D}" | xargs -0 sed -e "s:${D}:/:g" -i ||
die "failed to fix harcoded \$D in paths"
# Python modules are no longer installed in
# site-packages, so remove empty dirs.
find "${D}$(python_get_libdir)" -type d -empty -delete
# This code may fail if behavior of --root, --bindir or
# --sharedir changes in the future.
dodir /usr/lib
mv "${D}lib/calibre" "${D}usr/lib/" ||
die "failed to move lib dir"
find "${D}"lib -type d -empty -delete
dodir /usr/bin
mv "${D}bin/"* "${D}usr/bin/" ||
die "failed to move bin dir"
find "${D}"bin -type d -empty -delete
dodir /usr/share
mv "${D}share/"* "${D}usr/share/" ||
die "failed to move share dir"
find "${D}"share -type d -empty -delete
# The menu entries end up here due to '--mode user' being added to
# xdg-* options in src_prepare.
dodir /usr/share/mime/packages
chmod -fR a+rX,u+w,g-w,o-w "$HOME"/.local
mv "$HOME"/.local/share/mime/packages/* "$D"usr/share/mime/packages/ ||
die "failed to register mime types"
dodir /usr/share/icons
mv "$HOME"/.local/share/icons/* "$D"usr/share/icons/ ||
die "failed to install icon files"
domenu "$HOME"/.local/share/applications/*.desktop ||
die "failed to install .desktop menu files"
dobashcompletion "$D"etc/bash_completion.d/calibre
rm -r "${D}"etc/bash_completion.d
find "${D}"etc -type d -empty -delete
python_convert_shebangs -r 2 "$D"
}
pkg_postinst() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
distutils_pkg_postinst
bash-completion_pkg_postinst
}

3
dev-libs/stfl/Manifest Normal file
View File

@@ -0,0 +1,3 @@
AUX stfl-0.21-multilib.patch 1936 RMD160 fce9de74ac0cab5abe0e9b2d53c82cad602a5be1 SHA1 1ae240823806120b94c5cda5ba96b57e289bd730 SHA256 905260dbd13b4ce374d95ced9ea5d443fc44de0f14c0f1140fc8c7cead6c1f06
DIST stfl-0.21.tar.gz 41093 RMD160 d8b56cc97b4d76adba8034ce9bbae631e6e9d17e SHA1 0313eafa1fe4dcfea1f2edd34d453baaa46df277 SHA256 bf0ead0a66b635602222bc9089414b99f99081b956c92baf77699d283bcc88eb
EBUILD stfl-0.21.ebuild 1683 RMD160 e628dc7b4e910438e695679368a13bec7d4d2035 SHA1 e62cbfdb730f0d544474791983fbd485affe2640 SHA256 1d7047e76ae71b740285b6b22f8570860bf6634bf750f531cd874cbfb3869219

View File

@@ -0,0 +1,39 @@
diff -ur stfl-0.21.orig/Makefile stfl-0.21/Makefile
--- stfl-0.21.orig/Makefile 2009-06-19 10:30:52.000000000 -0700
+++ stfl-0.21/Makefile 2009-12-23 15:12:34.986593069 -0800
@@ -46,7 +46,7 @@
rm -f widgets/*.o spl/mod_stfl.so spl/example.db
cd perl5 && perl Makefile.PL && make clean && rm -f Makefile.old
rm -f perl5/stfl_wrap.c perl5/stfl.pm perl5/build_ok
- rm -f python/stfl.py python/stfl.pyc python/_stfl.so
+ rm -f python/stfl.py python/_stfl.so
rm -f python/stfl_wrap.c python/stfl_wrap.o
rm -f ruby/Makefile ruby/stfl_wrap.c ruby/stfl_wrap.o
rm -f ruby/stfl.so ruby/build_ok Makefile.deps_new
diff -ur stfl-0.21.orig/python/Makefile.snippet stfl-0.21/python/Makefile.snippet
--- stfl-0.21.orig/python/Makefile.snippet 2009-06-18 01:27:16.000000000 -0700
+++ stfl-0.21/python/Makefile.snippet 2009-12-23 15:14:54.237606055 -0800
@@ -21,20 +21,17 @@
PYTHON_VERSION = $(shell python -V 2>&1 | cut -f2 -d' ' | cut -f1-2 -d'.')
PYTHON_SITEARCH = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
-all: python/_stfl.so python/stfl.py python/stfl.pyc
+all: python/_stfl.so python/stfl.py
install: install_python
-python/_stfl.so python/stfl.py python/stfl.pyc: libstfl.a stfl.h python/stfl.i swig/*.i
+python/_stfl.so python/stfl.py: libstfl.a stfl.h python/stfl.i swig/*.i
cd python && swig -python -threads stfl.i
gcc -shared -pthread -fPIC python/stfl_wrap.c -I/usr/include/python$(PYTHON_VERSION) \
-I. libstfl.a -lncursesw -o python/_stfl.so
- cd python && python -c 'import stfl'
-install_python: python/_stfl.so python/stfl.py python/stfl.pyc
- mkdir -p $(DESTDIR)$(PYTHON_SITEARCH)/
+install_python: python/_stfl.so python/stfl.py
mkdir -p $(DESTDIR)$(PYTHON_SITEARCH)/lib-dynload/
cp python/_stfl.so $(DESTDIR)$(PYTHON_SITEARCH)/lib-dynload/
- cp python/stfl.pyc $(DESTDIR)$(PYTHON_SITEARCH)/
cp python/stfl.py $(DESTDIR)$(PYTHON_SITEARCH)/

View File

@@ -0,0 +1,85 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit eutils multilib perl-module python toolchain-funcs
DESCRIPTION="A library which implements a curses-based widget set for text terminals"
HOMEPAGE="http://www.clifford.at/stfl/"
SRC_URI="http://www.clifford.at/${PN}/${P}.tar.gz"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64 ~ppc x86"
IUSE="examples perl python ruby"
COMMON_DEPEND="sys-libs/ncurses[unicode]
perl? ( dev-lang/perl )
ruby? ( dev-lang/ruby )
python? ( dev-lang/python )"
DEPEND="${COMMON_DEPEND}
perl? ( dev-lang/swig )
ruby? ( dev-lang/swig )"
RDEPEND="${COMMON_DEPEND}"
src_prepare() {
sed -i \
-e "s!-Os -ggdb!!" \
-e "s!^\(all:.*\) example!\1!" \
Makefile
epatch "${FILESDIR}/${P}-multilib.patch"
if ! use perl; then
echo "FOUND_PERL5=0" >>Makefile.cfg
fi
if ! use ruby; then
echo "FOUND_RUBY=0" >>Makefile.cfg
fi
if ! use python; then
echo "FOUND_PYTHON=0" >>Makefile.cfg
fi
}
src_compile() {
emake CC="$(tc-getCC)" || die "make failed"
}
src_install() {
python_version
emake prefix="/usr" DESTDIR="${D}" libdir="$(get_libdir)" install || die "make install failed"
dodoc README
local exdir="/usr/share/doc/${PF}/examples"
if use examples; then
insinto ${exdir}
doins example.{c,stfl}
insinto ${exdir}/python
doins python/example.py
if use perl; then
insinto ${exdir}/perl
doins perl5/example.pl
fi
if use ruby; then
insinto ${exdir}/ruby
doins ruby/example.rb
fi
fi
fixlocalpod
}
pkg_postinst() {
python_mod_optimize /usr/$(get_libdir)/python${PYVER}/stfl.py
}
pkg_postrm() {
python_mod_cleanup
}

View File

@@ -0,0 +1,2 @@
DIST newsbeuter-2.1.tar.gz 342195 RMD160 d7dc92adf1e59d17dea6f97c2f55c902c3a35f8e SHA1 15a9d242d8e1db95a9aa54c748c9f59fc8a99bed SHA256 640cc3cded3e7fedfb202a6b4fc751914f8aa36ba9ecad1fa7844104e3c42227
EBUILD newsbeuter-2.1.ebuild 967 RMD160 3a0aa3446c2a9b78f53cc775e1a15e7c02123045 SHA1 083d1c0845fff8047bfa306c4cb4522311861dd3 SHA256 ccf451433b55c646fd7b53774e1eaaf4fa217d59e4b80208480e8d85b833c5a9

View File

@@ -0,0 +1,46 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit toolchain-funcs eutils
DESCRIPTION="A RSS/Atom feed reader for the text console."
HOMEPAGE="http://www.newsbeuter.org/index.html"
SRC_URI="http://www.${PN}.org/downloads/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~ppc x86"
IUSE="test"
RDEPEND=">=dev-db/sqlite-3.5:3
>=dev-libs/stfl-0.21
net-misc/curl
dev-libs/libxml2"
DEPEND="${RDEPEND}
dev-util/pkgconfig
sys-devel/gettext
test? ( dev-libs/boost )"
src_prepare() {
sed -i \
-e "s:-ggdb:${CXXFLAGS}:" \
-e "s:^CXX=.*:CXX=$(tc-getCXX):" \
Makefile
}
src_test() {
emake test || die
# Tests fail if in ${S} rather than in ${S}/test
cd "${S}"/test
./test || die
}
src_install() {
emake prefix="${D}/usr" install || die
dodoc AUTHORS README CHANGES
mv "${D}"/usr/share/doc/${PN}/* "${D}"/usr/share/doc/${PF}/
rm -rf "${D}"/usr/share/doc/${PN}
}

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