From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- x11-plugins/wmmemfree/Manifest | 1 + .../wmmemfree-0.7-add-kernel-26-support.patch | 83 ++++++++++++++++++++++ ...mfree-0.7-fix-crash-when-there-is-no-swap.patch | 18 +++++ x11-plugins/wmmemfree/metadata.xml | 5 ++ x11-plugins/wmmemfree/wmmemfree-0.7-r2.ebuild | 41 +++++++++++ 5 files changed, 148 insertions(+) create mode 100644 x11-plugins/wmmemfree/Manifest create mode 100644 x11-plugins/wmmemfree/files/wmmemfree-0.7-add-kernel-26-support.patch create mode 100644 x11-plugins/wmmemfree/files/wmmemfree-0.7-fix-crash-when-there-is-no-swap.patch create mode 100644 x11-plugins/wmmemfree/metadata.xml create mode 100644 x11-plugins/wmmemfree/wmmemfree-0.7-r2.ebuild (limited to 'x11-plugins/wmmemfree') diff --git a/x11-plugins/wmmemfree/Manifest b/x11-plugins/wmmemfree/Manifest new file mode 100644 index 00000000000..5ddfe9e66f4 --- /dev/null +++ b/x11-plugins/wmmemfree/Manifest @@ -0,0 +1 @@ +DIST wmmemfree-0.7.tar.bz2 14287 SHA256 52cff4e2850de4528e55459ab3eab6b14c7ad29d15e793eb1eb6e69b94aace34 diff --git a/x11-plugins/wmmemfree/files/wmmemfree-0.7-add-kernel-26-support.patch b/x11-plugins/wmmemfree/files/wmmemfree-0.7-add-kernel-26-support.patch new file mode 100644 index 00000000000..c4545d0654c --- /dev/null +++ b/x11-plugins/wmmemfree/files/wmmemfree-0.7-add-kernel-26-support.patch @@ -0,0 +1,83 @@ +diff -Naur wmmemfree-0.7/mem_linux.c wmmemfree-0.7.new/mem_linux.c +--- wmmemfree-0.7/mem_linux.c 2003-03-17 14:23:05.000000000 +0100 ++++ wmmemfree-0.7/mem_linux.c 2004-08-28 23:18:56.783772744 +0200 +@@ -20,24 +20,48 @@ + + #include + #include ++#include ++ ++long int mem_total, mem_used, mem_free, mem_buffers, mem_cached; ++long int swp_total, swp_used, swp_free; + +-long long int mem_total, mem_used, mem_free, mem_shared, mem_buffers, mem_cached; +-long long int swp_total, swp_used, swp_free; + + void mem_getfree() + { +- FILE *file; ++ FILE *memfp; ++ ++ static char buf[1024]; ++ static char *p_mem_tot=NULL, *p_mem_free, *p_mem_buffers, *p_mem_cache; ++ static char *p_swap_total, *p_swap_free; ++ ++ memfp = fopen("/proc/meminfo", "r"); ++ if (!memfp) ++ { ++ perror("/proc/meminfo"); ++ exit(1); ++ } ++ ++ fread_unlocked (buf, 1024, 1, memfp); ++ fclose(memfp); ++ ++ 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; ++ } ++ ++ 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_cached ); ++ sscanf(p_swap_total, "%ld", &swp_total ); ++ sscanf(p_swap_free, "%ld", &swp_free ); ++ ++ mem_used = mem_total - mem_free; ++ swp_used = swp_total - swp_free; + +- file = fopen("/proc/meminfo", "r"); +- if(!file) +- { +- perror("/proc/meminfo"); +- exit(1); +- } +- while(fgetc(file)!='\n'){} +- fscanf(file, "%*s %Ld %Ld %Ld %Ld %Ld %Ld", +- &mem_total, &mem_used, &mem_free, &mem_shared, &mem_buffers, &mem_cached); +- fscanf(file, "%*s %Ld %Ld %Ld", +- &swp_total, &swp_used, &swp_free); +- fclose(file); + } +diff -Naur wmmemfree-0.7/mem_linux.h wmmemfree-0.7.new/mem_linux.h +--- wmmemfree-0.7/mem_linux.h 2003-03-22 19:51:35.000000000 +0100 ++++ wmmemfree-0.7/mem_linux.h 2004-08-28 23:12:19.066235000 +0200 +@@ -21,9 +21,9 @@ + #ifndef __MEM_LINUX_H__ + #define __MEM_LINUX_H__ + +-extern long long int mem_total, mem_used; +-extern long long int mem_shared, mem_buffers, mem_cached; +-extern long long int swp_total, swp_used; ++extern long int mem_total, mem_used; ++extern long int mem_buffers, mem_cached; ++extern long int swp_total, swp_used; + + void mem_getfree(); + diff --git a/x11-plugins/wmmemfree/files/wmmemfree-0.7-fix-crash-when-there-is-no-swap.patch b/x11-plugins/wmmemfree/files/wmmemfree-0.7-fix-crash-when-there-is-no-swap.patch new file mode 100644 index 00000000000..d062fd9ee09 --- /dev/null +++ b/x11-plugins/wmmemfree/files/wmmemfree-0.7-fix-crash-when-there-is-no-swap.patch @@ -0,0 +1,18 @@ +--- wmmemfree-0.7/draw.c 2003-03-21 21:56:25.000000000 +0100 ++++ wmmemfree-0.7/draw.c 2008-02-16 10:02:51.000000000 +0100 +@@ -44,13 +44,13 @@ + XCopyArea(display, on, buffer, gc, 0, 0, 2, 11, 7 + n * 2, 27); + else + XCopyArea(display, off, buffer, gc, 0, 0, 2, 11, 7 + n * 2, 27); +- if(n < (swp * 25 / swp_total)) ++ if(n < ((swp_total) ? (swp * 25 / swp_total) : 0)) + XCopyArea(display, on, buffer, gc, 0, 0, 2, 11, 7 + n * 2, 47); + else + XCopyArea(display, off, buffer, gc, 0, 0, 2, 11, 7 + n * 2, 47); + } + mem_percent = mem * 100 / mem_total; +- swp_percent = swp * 100 / swp_total; ++ swp_percent = (swp_total) ? swp * 100 / swp_total : 0; + if(mem_percent == 100) + XCopyArea(display, numbers, buffer, gc, 5, 0, 5, 6, 33, 20); + else diff --git a/x11-plugins/wmmemfree/metadata.xml b/x11-plugins/wmmemfree/metadata.xml new file mode 100644 index 00000000000..b1a9efc4f2f --- /dev/null +++ b/x11-plugins/wmmemfree/metadata.xml @@ -0,0 +1,5 @@ + + + +desktop-dock + diff --git a/x11-plugins/wmmemfree/wmmemfree-0.7-r2.ebuild b/x11-plugins/wmmemfree/wmmemfree-0.7-r2.ebuild new file mode 100644 index 00000000000..64e44694f6c --- /dev/null +++ b/x11-plugins/wmmemfree/wmmemfree-0.7-r2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 + +inherit eutils toolchain-funcs + +DESCRIPTION="a blue memory monitoring dockapp" +HOMEPAGE="http://misuceldestept.go.ro/wmmemfree" +SRC_URI="http://ibiblio.org/pub/linux/X11/xutils/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ppc ppc64 sparc x86" +IUSE="" + +RDEPEND="x11-libs/libX11 + x11-libs/libXext + x11-libs/libXpm" +DEPEND="${RDEPEND} + x11-proto/xextproto" + +src_prepare() { + epatch "${FILESDIR}"/${P}-add-kernel-26-support.patch + epatch "${FILESDIR}"/${P}-fix-crash-when-there-is-no-swap.patch + + #Honour Gentoo LDFLAGS, see bug #337927. + sed -e "s/-o \$(PROG)/\$(LDFLAGS) -o \$(PROG)/" -i Makefile +} + +src_compile() { + emake CC="$(tc-getCC)" FLAGS="${CFLAGS}" \ + STRIP="true" || die "emake failed." +} + +src_install() { + dobin ${PN} + doman ${PN}.1 + dodoc ChangeLog README THANKS TODO WMS +} -- cgit v1.2.1