diff options
author | Jeremy Olexa <darkside@gentoo.org> | 2010-08-25 15:54:04 +0000 |
---|---|---|
committer | Jeremy Olexa <darkside@gentoo.org> | 2010-08-25 15:54:04 +0000 |
commit | c5e7113fc2655628872765ed44567efb1aae8f93 (patch) | |
tree | 080688a5ca77487b9042f80c08724a28869337f1 /x11-plugins | |
parent | Migrate changes from Gentoo Prefix overlay. KEYWORDS, EAPI3, CFLAG handling. ... (diff) | |
download | historical-c5e7113fc2655628872765ed44567efb1aae8f93.tar.gz historical-c5e7113fc2655628872765ed44567efb1aae8f93.tar.bz2 historical-c5e7113fc2655628872765ed44567efb1aae8f93.zip |
Migrate changes from Gentoo Prefix overlay. KEYWORDS, EAPI3, specific patches. Approved by maintainer. Also respect LDFLAGS as an extra QA commit.
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'x11-plugins')
-rw-r--r-- | x11-plugins/wmload/ChangeLog | 10 | ||||
-rw-r--r-- | x11-plugins/wmload/Manifest | 16 | ||||
-rw-r--r-- | x11-plugins/wmload/files/wmload-0.9.2-prefix.patch | 11 | ||||
-rw-r--r-- | x11-plugins/wmload/files/wmload.solaris.patch | 141 | ||||
-rw-r--r-- | x11-plugins/wmload/wmload-0.9.2.ebuild | 26 |
5 files changed, 181 insertions, 23 deletions
diff --git a/x11-plugins/wmload/ChangeLog b/x11-plugins/wmload/ChangeLog index 286a0982814c..5e200ab9b690 100644 --- a/x11-plugins/wmload/ChangeLog +++ b/x11-plugins/wmload/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-plugins/wmload -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmload/ChangeLog,v 1.10 2008/11/26 00:01:43 tcunha Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmload/ChangeLog,v 1.11 2010/08/25 15:54:04 darkside Exp $ + + 25 Aug 2010; Jeremy Olexa <darkside@gentoo.org> wmload-0.9.2.ebuild, + +files/wmload-0.9.2-prefix.patch, +files/wmload.solaris.patch: + Migrate changes from Gentoo Prefix overlay. KEYWORDS, EAPI3, specific + patches. Approved by maintainer. Also respect LDFLAGS as an extra QA + commit. 26 Nov 2008; Tiago Cunha <tcunha@gentoo.org> wmload-0.9.2.ebuild: stable sparc, bug 215651 diff --git a/x11-plugins/wmload/Manifest b/x11-plugins/wmload/Manifest index bd5ac45a9216..c8fd596e8bb5 100644 --- a/x11-plugins/wmload/Manifest +++ b/x11-plugins/wmload/Manifest @@ -1,16 +1,8 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - +AUX wmload-0.9.2-prefix.patch 222 RMD160 5bade022d5f06c8b3c093d912f94642d0b9e638f SHA1 0fb902fcc91e230bf84f2ed3498673ee441f6208 SHA256 3b5db5473bbb38a8e91fbac19d94eb2d8be913cdbe58bfcc6c8679595fa3c31a AUX wmload-ComplexProgramTargetNoMan.patch 224 RMD160 c15c32a6d6a0d7bb99955388f01d0b2d9250205a SHA1 7c3a0526a5c8551126bb915c806c9014b0600b84 SHA256 96b7e8cec9ac03362cbb2f0fb11da35db034ef5b1421bc508a6379779cac06c9 AUX wmload.desktop 178 RMD160 725f0a82367cb4e30ff2486e6483800988516d59 SHA1 7af80634ddb4d7891628198e8e7006e3ea0dc32a SHA256 329f7a66d4b0fa33c936120aae2a3e474c9ed0dc0cd80bf88419be535a4d7ed0 +AUX wmload.solaris.patch 3494 RMD160 40d0fe4dd4fab7c251c40838b172754e8e6ead34 SHA1 94c107b308ba88df25147167d6cb0b4cc46b8699 SHA256 326a2939c2914ea2c544d0b730763d6babfe44109dcd305fb720ca9ef5b25fef DIST wmload-0.9.2.tgz 8499 RMD160 b71f5589f1ba0dec86d6cbb3eecff8692df034ea SHA1 98f0806314596ae9ec66ceb49ec989e84fb057ad SHA256 5c4c99ad683b58f22efecf3e780011ec6dc3211d8fca7ffb5b9fd0b661a56176 -EBUILD wmload-0.9.2.ebuild 1034 RMD160 cc605449f46ec936124dfdcd4b0e187be89edaaa SHA1 4cee03409a5a24b14debbb5c433cb557ab4836e0 SHA256 a38c6cd405a459e94a4cef956b5e1d304cd627eec5b7a3312fc0aa019ad825be -MISC ChangeLog 1268 RMD160 140490e0c4be9af09eb344f05314658e7e04e8d3 SHA1 86ff5a3684a6ce8328025ceffbb9f3e53344c8f2 SHA256 218d4dda1234a3990e109ed2a2fc80e43d1702771e55a7ef36b83055893fcd18 +EBUILD wmload-0.9.2.ebuild 1332 RMD160 f9d2a47d515185212543942c1c99c00fb5a81fb1 SHA1 c89a02a12b666e3482275f1a5beb93a6cb65b6ab SHA256 099834297d53b0e0822ef4dc6738dbcee62c652bae1f123d3e4648f108a90b14 +MISC ChangeLog 1560 RMD160 36e560ac9a1b20ddfd6ad30ea8c8e457b718e6b7 SHA1 67ff4073f487371aeb356ae69596b5cdb1987531 SHA256 5febba0a03f9eaa079cb5799a92a3c2de9d923da1de9cc111ad6a9d6afa4d61c MISC metadata.xml 165 RMD160 a554e96dc33b1fb4b3518f27a21bf3f59dc21b1c SHA1 674655a4f0fc35c7b3b2e05aab1910c0ebafade1 SHA256 c2f8a0b30c83dba56f0c36a4ba1cb002621ae58dfc13fae94b9db6eb67fb9f1b ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) - -iEYEARECAAYFAkkskfsACgkQ/Kkm35zQzl7NXQCgjrlABBu+OW+TXcAQnVoxEShp -EwEAn2WFQuIyPWOq33FBpdgUAKXl+kZu -=inGO ------END PGP SIGNATURE----- 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.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/wmload-0.9.2.ebuild b/x11-plugins/wmload/wmload-0.9.2.ebuild index 43653ea3d0a9..defdb35d43fa 100644 --- a/x11-plugins/wmload/wmload-0.9.2.ebuild +++ b/x11-plugins/wmload/wmload-0.9.2.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmload/wmload-0.9.2.ebuild,v 1.10 2008/11/26 00:01:43 tcunha Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmload/wmload-0.9.2.ebuild,v 1.11 2010/08/25 15:54:04 darkside Exp $ +EAPI=3 inherit eutils IUSE="" @@ -20,21 +21,28 @@ DEPEND="${RDEPEND} SLOT="0" LICENSE="GPL-2" -KEYWORDS="~amd64 ppc sparc x86" +KEYWORDS="~amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" -src_unpack() { - unpack ${A} - cd "${S}" +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_compile() { +src_configure() { xmkmf || die "xmkmf failed." - emake CDEBUGFLAGS="${CFLAGS}" || die "emake failed." +} + +src_compile() { + emake CDEBUGFLAGS="${CFLAGS}" LOCAL_LDFLAGS="${LDFLAGS}" \ + || die "emake failed." } src_install() { - einstall DESTDIR="${D}" BINDIR=/usr/bin || die "einstall failed." + einstall DESTDIR="${D}" BINDIR="${EPREFIX}"/usr/bin \ + || die "einstall failed." dodoc README |