diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /x11-plugins/wmload | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
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 <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'x11-plugins/wmload')
-rw-r--r-- | x11-plugins/wmload/Manifest | 2 | ||||
-rw-r--r-- | x11-plugins/wmload/files/wmload-0.9.2-prefix.patch | 11 | ||||
-rw-r--r-- | x11-plugins/wmload/files/wmload-0.9.6-solaris.patch | 132 | ||||
-rw-r--r-- | x11-plugins/wmload/files/wmload-ComplexProgramTargetNoMan.patch | 8 | ||||
-rw-r--r-- | x11-plugins/wmload/files/wmload.desktop | 8 | ||||
-rw-r--r-- | x11-plugins/wmload/files/wmload.solaris.patch | 141 | ||||
-rw-r--r-- | x11-plugins/wmload/metadata.xml | 5 | ||||
-rw-r--r-- | x11-plugins/wmload/wmload-0.9.2.ebuild | 50 | ||||
-rw-r--r-- | x11-plugins/wmload/wmload-0.9.6.ebuild | 39 |
9 files changed, 396 insertions, 0 deletions
diff --git a/x11-plugins/wmload/Manifest b/x11-plugins/wmload/Manifest new file mode 100644 index 000000000000..287bf22d1c7c --- /dev/null +++ b/x11-plugins/wmload/Manifest @@ -0,0 +1,2 @@ +DIST wmload-0.9.2.tgz 8499 SHA256 5c4c99ad683b58f22efecf3e780011ec6dc3211d8fca7ffb5b9fd0b661a56176 SHA512 fd3875d8da5bb309f0d49eb6ebe0903832d021a244b90ad70821e90aa85e835ef727d84957fb0cdb0290075ba1c0bb11cd4756a5a933cfebb35682f0b8e0dbca WHIRLPOOL e37d0cdff1cdbbcc1f548de9aa1575b86035840b8405bdadda37580c65039e9d4124cd6ae92ef806590807093e67265dc5b14bc09109140d73dacafdb076a585 +DIST wmload-0.9.6.tar.gz 17143 SHA256 1919566199b6e376e1c7acad119a9bbe765aedb2f2e5da2cb7b7f880af7e8f62 SHA512 989dfce6f6bbc32403702e06b47c873af45b6196ff20572290e88022ced1817cc0d29bae79f20fb289cf37ec2bd532e1b6e7c975a9b1e6e6059c9307a4d7e63d WHIRLPOOL d8c933be200d2abd778ecb23770895401401be396293642d3e4316aa81332ad21e6f11754e35cf9102379fb339f2d7cacad2647e82e063158ec2ce25720e71b4 diff --git a/x11-plugins/wmload/files/wmload-0.9.2-prefix.patch b/x11-plugins/wmload/files/wmload-0.9.2-prefix.patch new file mode 100644 index 000000000000..3ec43c570df0 --- /dev/null +++ b/x11-plugins/wmload/files/wmload-0.9.2-prefix.patch @@ -0,0 +1,11 @@ +--- Imakefile ++++ Imakefile +@@ -2,7 +2,7 @@ + DESTDIR = /usr/local + BINDIR = /bin + +-XPMLIB = -L/usr/lib/X11 -lXpm -lm ++XPMLIB = `pkg-config xpm --libs` -lm + DEPLIBS = $(DEPXLIB) + + LOCAL_LIBRARIES = $(XPMLIB) $(XLIB) diff --git a/x11-plugins/wmload/files/wmload-0.9.6-solaris.patch b/x11-plugins/wmload/files/wmload-0.9.6-solaris.patch new file mode 100644 index 000000000000..210b28419fa8 --- /dev/null +++ b/x11-plugins/wmload/files/wmload-0.9.6-solaris.patch @@ -0,0 +1,132 @@ +* original: http://www.rampant.org/~dp/software/wmload.solaris.patch + +--- wmload.c ++++ wmload.c +@@ -6,6 +6,11 @@ + #include <math.h> + #include <fcntl.h> + #include <X11/Xatom.h> ++#ifdef sun ++#include <sys/types.h> ++#include <sys/sysinfo.h> ++#include <kstat.h> ++#endif + + #include "back.xpm" + #include "mask2.xbm" +@@ -410,6 +415,107 @@ + return (char *)p; + } + ++#ifdef sun ++ ++static kstat_ctl_t *kc; ++static kstat_t **cpu_ksp_list; ++static int ncpus; ++ ++void ++cpu_stats_init() ++{ ++ int i = 0; ++ kstat_t *ksp; ++ static int kstats_ready = 0; ++ ++ if (!kstats_ready) { ++ if ((kc = kstat_open()) == NULL) { ++ fprintf(stderr,"wmload: can't open /dev/kstat\n"); ++ exit (1); ++ } ++ kstats_ready = 1; ++ } ++ ++ for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { ++ if (strcmp(ksp->ks_module, "cpu_stat") == 0) ++ i++; ++ } ++ ++ if (cpu_ksp_list) { ++ free(cpu_ksp_list); ++ } ++ cpu_ksp_list = (kstat_t **) calloc(i * sizeof (kstat_t *), 1); ++ ncpus = i; ++ ++ /* ++ * stash the ksp for each CPU. ++ */ ++ i = 0; ++ for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { ++ if (strcmp(ksp->ks_module, "cpu_stat") == 0) { ++ cpu_ksp_list[i] = ksp; ++ i++; ++ } ++ } ++} ++ ++int ++get_cpu_stats() ++{ ++ int i; ++ cpu_stat_t stat; ++ static int firsttime = 1; ++ ++ if (firsttime) { ++ firsttime = 0; ++ return (1); /* force code to go initialize kstat stuff */ ++ } ++ ++ /* ++ * Read each cpu's data. If the chain has changed (a state change ++ * has happened, maybe a new cpu was added to the system), then ++ * return 1. This will cause the code to reinitialize the cpu_ksp_list ++ * array. word. ++ */ ++ cp_time[0] = cp_time[1] = cp_time[2] = cp_time[3] = 0; ++ for (i = 0; i < ncpus; i++) { ++ if (kstat_read(kc, cpu_ksp_list[i], (void *) &stat) == -1) ++ return (1); ++ cp_time[0] += stat.cpu_sysinfo.cpu[CPU_USER]; /* user */ ++ cp_time[1] += stat.cpu_sysinfo.cpu[CPU_WAIT]; /* "nice" */ ++ cp_time[2] += stat.cpu_sysinfo.cpu[CPU_KERNEL]; /* sys */ ++ cp_time[3] += stat.cpu_sysinfo.cpu[CPU_IDLE]; /* idle ("free")*/ ++ } ++ return (0); ++} ++ ++void GetLoad(int Maximum, int *usr, int *nice, int *sys, int *free) ++{ ++ int total; ++ ++ while (get_cpu_stats() != 0) { ++ cpu_stats_init(); ++ } ++ ++ *usr = cp_time[0] - last[0]; ++ *nice = cp_time[1] - last[1]; ++ *sys = cp_time[2] - last[2]; ++ *free = cp_time[3] - last[3]; ++ ++ /* printf("[%d %d %d %d]\n", *usr, *nice, *sys, *free); */ ++ ++ total = *usr + *nice + *sys + *free; ++ last[0] = cp_time[0]; ++ last[1] = cp_time[1]; ++ last[2] = cp_time[2]; ++ last[3] = cp_time[3]; ++ ++ *usr = rint(Maximum * (float)(*usr) /total); ++ *nice =rint(Maximum * (float)(*nice) /total); ++ *sys = rint(Maximum * (float)(*sys) /total); ++ *free = rint(Maximum * (float)(*free) /total); ++} ++#else /* sun */ + void GetLoad(int Maximum, int *usr, int *nice, int *sys, int *free) + { + char buffer[100];/*[4096+1];*/ +@@ -445,6 +551,7 @@ + *sys = rint(Maximum * (float)(*sys) /total); + *free = rint(Maximum * (float)(*free) /total); + } ++#endif + + void InsertLoad() + { diff --git a/x11-plugins/wmload/files/wmload-ComplexProgramTargetNoMan.patch b/x11-plugins/wmload/files/wmload-ComplexProgramTargetNoMan.patch new file mode 100644 index 000000000000..8d3d25d6fa3c --- /dev/null +++ b/x11-plugins/wmload/files/wmload-ComplexProgramTargetNoMan.patch @@ -0,0 +1,8 @@ +--- wmload-0.9.2/Imakefile~ Sat Dec 1 21:53:52 2001 ++++ wmload-0.9.2/Imakefile Sat Dec 1 21:53:52 2001 +@@ -14,4 +14,4 @@ + SRCS = wmload.c + OBJS = wmload.o + +-ComplexProgramTarget(wmload) ++ComplexProgramTargetNoMan(wmload) diff --git a/x11-plugins/wmload/files/wmload.desktop b/x11-plugins/wmload/files/wmload.desktop new file mode 100644 index 000000000000..b9b02e9dc2a4 --- /dev/null +++ b/x11-plugins/wmload/files/wmload.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=WmLoad +Comment=Simple network monitor +Comment[pl]=Prosty monitor sieci +Exec=wmload +Type=Application +Terminal=false +Categories=System; diff --git a/x11-plugins/wmload/files/wmload.solaris.patch b/x11-plugins/wmload/files/wmload.solaris.patch new file mode 100644 index 000000000000..788d4190aba0 --- /dev/null +++ b/x11-plugins/wmload/files/wmload.solaris.patch @@ -0,0 +1,141 @@ +* original: http://www.rampant.org/~dp/software/wmload.solaris.patch + +--- wmload.c ++++ wmload.c +@@ -6,6 +6,11 @@ + #include <math.h> + #include <fcntl.h> + #include <X11/Xatom.h> ++#ifdef sun ++#include <sys/types.h> ++#include <sys/sysinfo.h> ++#include <kstat.h> ++#endif + + #include "back.xpm" + #include "mask2.xbm" +@@ -214,7 +219,7 @@ + NormalGC = XCreateGC(dpy, Root, gcm, &gcv); + + if (ONLYSHAPE) { /* try to make shaped window here */ +- pixmask = XCreateBitmapFromData(dpy, win, mask2_bits, mask2_width, ++ pixmask = XCreateBitmapFromData(dpy, win, (char *)mask2_bits, mask2_width, + mask2_height); + XShapeCombineMask(dpy, win, ShapeBounding, 0, 0, pixmask, ShapeSet); + XShapeCombineMask(dpy, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet); +@@ -410,6 +415,107 @@ + return (char *)p; + } + ++#ifdef sun ++ ++static kstat_ctl_t *kc; ++static kstat_t **cpu_ksp_list; ++static int ncpus; ++ ++void ++cpu_stats_init() ++{ ++ int i = 0; ++ kstat_t *ksp; ++ static int kstats_ready = 0; ++ ++ if (!kstats_ready) { ++ if ((kc = kstat_open()) == NULL) { ++ fprintf(stderr,"wmload: can't open /dev/kstat\n"); ++ exit (1); ++ } ++ kstats_ready = 1; ++ } ++ ++ for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { ++ if (strcmp(ksp->ks_module, "cpu_stat") == 0) ++ i++; ++ } ++ ++ if (cpu_ksp_list) { ++ free(cpu_ksp_list); ++ } ++ cpu_ksp_list = (kstat_t **) calloc(i * sizeof (kstat_t *), 1); ++ ncpus = i; ++ ++ /* ++ * stash the ksp for each CPU. ++ */ ++ i = 0; ++ for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { ++ if (strcmp(ksp->ks_module, "cpu_stat") == 0) { ++ cpu_ksp_list[i] = ksp; ++ i++; ++ } ++ } ++} ++ ++int ++get_cpu_stats() ++{ ++ int i; ++ cpu_stat_t stat; ++ static int firsttime = 1; ++ ++ if (firsttime) { ++ firsttime = 0; ++ return (1); /* force code to go initialize kstat stuff */ ++ } ++ ++ /* ++ * Read each cpu's data. If the chain has changed (a state change ++ * has happened, maybe a new cpu was added to the system), then ++ * return 1. This will cause the code to reinitialize the cpu_ksp_list ++ * array. word. ++ */ ++ cp_time[0] = cp_time[1] = cp_time[2] = cp_time[3] = 0; ++ for (i = 0; i < ncpus; i++) { ++ if (kstat_read(kc, cpu_ksp_list[i], (void *) &stat) == -1) ++ return (1); ++ cp_time[0] += stat.cpu_sysinfo.cpu[CPU_USER]; /* user */ ++ cp_time[1] += stat.cpu_sysinfo.cpu[CPU_WAIT]; /* "nice" */ ++ cp_time[2] += stat.cpu_sysinfo.cpu[CPU_KERNEL]; /* sys */ ++ cp_time[3] += stat.cpu_sysinfo.cpu[CPU_IDLE]; /* idle ("free")*/ ++ } ++ return (0); ++} ++ ++void GetLoad(int Maximum, int *usr, int *nice, int *sys, int *free) ++{ ++ int total; ++ ++ while (get_cpu_stats() != 0) { ++ cpu_stats_init(); ++ } ++ ++ *usr = cp_time[0] - last[0]; ++ *nice = cp_time[1] - last[1]; ++ *sys = cp_time[2] - last[2]; ++ *free = cp_time[3] - last[3]; ++ ++ /* printf("[%d %d %d %d]\n", *usr, *nice, *sys, *free); */ ++ ++ total = *usr + *nice + *sys + *free; ++ last[0] = cp_time[0]; ++ last[1] = cp_time[1]; ++ last[2] = cp_time[2]; ++ last[3] = cp_time[3]; ++ ++ *usr = rint(Maximum * (float)(*usr) /total); ++ *nice =rint(Maximum * (float)(*nice) /total); ++ *sys = rint(Maximum * (float)(*sys) /total); ++ *free = rint(Maximum * (float)(*free) /total); ++} ++#else /* sun */ + void GetLoad(int Maximum, int *usr, int *nice, int *sys, int *free) + { + char buffer[100];/*[4096+1];*/ +@@ -445,6 +551,7 @@ + *sys = rint(Maximum * (float)(*sys) /total); + *free = rint(Maximum * (float)(*free) /total); + } ++#endif + + void InsertLoad() + { diff --git a/x11-plugins/wmload/metadata.xml b/x11-plugins/wmload/metadata.xml new file mode 100644 index 000000000000..b1a9efc4f2f0 --- /dev/null +++ b/x11-plugins/wmload/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>desktop-dock</herd> +</pkgmetadata> diff --git a/x11-plugins/wmload/wmload-0.9.2.ebuild b/x11-plugins/wmload/wmload-0.9.2.ebuild new file mode 100644 index 000000000000..f63729562abc --- /dev/null +++ b/x11-plugins/wmload/wmload-0.9.2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 +inherit eutils + +IUSE="" + +DESCRIPTION="yet another dock application showing a system load gauge" +SRC_URI="http://www.cs.mun.ca/~gstarkes/wmaker/dockapps/files/${P}.tgz" +HOMEPAGE="http://www.cs.mun.ca/~gstarkes/wmaker/dockapps/sys.html#wmload" + +RDEPEND="x11-libs/libX11 + x11-libs/libXext + x11-libs/libXpm" +DEPEND="${RDEPEND} + x11-misc/imake + x11-proto/xproto + x11-proto/xextproto" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-ComplexProgramTargetNoMan.patch + epatch "${FILESDIR}"/${PN}.solaris.patch + epatch "${FILESDIR}"/${P}-prefix.patch + [[ ${CHOST} == *-solaris* ]] && \ + sed -i -e 's/\(^XPMLIB = \)\(.*$\)/\1-lkstat \2/' Imakefile +} + +src_configure() { + xmkmf || die "xmkmf failed." +} + +src_compile() { + emake CDEBUGFLAGS="${CFLAGS}" LOCAL_LDFLAGS="${LDFLAGS}" \ + || die "emake failed." +} + +src_install() { + emake DESTDIR="${D}" BINDIR="${EPREFIX}"/usr/bin install \ + || die "install failed." + + dodoc README + + domenu "${FILESDIR}"/${PN}.desktop +} diff --git a/x11-plugins/wmload/wmload-0.9.6.ebuild b/x11-plugins/wmload/wmload-0.9.6.ebuild new file mode 100644 index 000000000000..1e66a885e2fb --- /dev/null +++ b/x11-plugins/wmload/wmload-0.9.6.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="yet another dock application showing a system load gauge" +HOMEPAGE="http://windowmaker.org/dockapps/?name=wmload" +# Grab from http://windowmaker.org/dockapps/?download=${P}.tar.gz +SRC_URI="http://dev.gentoo.org/~voyageur/distfiles/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND="x11-libs/libX11 + x11-libs/libXext + x11-libs/libXpm" +DEPEND="${RDEPEND} + x11-proto/xproto" + +S=${WORKDIR}/dockapps + +src_prepare() { + epatch "${FILESDIR}"/${P}-solaris.patch +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install + + dodoc README + domenu "${FILESDIR}"/${PN}.desktop +} |