summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2010-09-08 05:37:38 +0000
committerJeroen Roovers <jer@gentoo.org>2010-09-08 05:37:38 +0000
commitdccc93336eb63957b884ff4702142070569b2786 (patch)
tree078b7c52489f2114135da8fc3d62533471c7565d /sys-power/nvclock
parentFix breakage in patchset and linguas xpi's install. (diff)
downloadgentoo-2-dccc93336eb63957b884ff4702142070569b2786.tar.gz
gentoo-2-dccc93336eb63957b884ff4702142070569b2786.tar.bz2
gentoo-2-dccc93336eb63957b884ff4702142070569b2786.zip
Move from media-video/nvclock to sys-power/nvclock.
(Portage version: 2.2_rc77/cvs/Linux i686, RepoMan options: --force)
Diffstat (limited to 'sys-power/nvclock')
-rw-r--r--sys-power/nvclock/ChangeLog192
-rw-r--r--sys-power/nvclock/files/nvclock-0.8_beta4-as-needed.patch14
-rw-r--r--sys-power/nvclock/files/nvclock-0.8_beta4-flags.patch114
-rw-r--r--sys-power/nvclock/files/nvclock-0.8_beta4-headers.patch99
-rw-r--r--sys-power/nvclock/files/nvclock_confd9
-rw-r--r--sys-power/nvclock/files/nvclock_initd12
-rw-r--r--sys-power/nvclock/metadata.xml12
-rw-r--r--sys-power/nvclock/nvclock-0.8_beta4-r4.ebuild71
-rw-r--r--sys-power/nvclock/nvclock-9999.ebuild64
9 files changed, 587 insertions, 0 deletions
diff --git a/sys-power/nvclock/ChangeLog b/sys-power/nvclock/ChangeLog
new file mode 100644
index 000000000000..8c06a7825918
--- /dev/null
+++ b/sys-power/nvclock/ChangeLog
@@ -0,0 +1,192 @@
+# ChangeLog for sys-power/nvclock
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/nvclock/ChangeLog,v 1.1 2010/09/08 05:37:38 jer Exp $
+
+ 08 Sep 2010; Jeroen Roovers <jer@gentoo.org> +nvclock-0.8_beta4-r4.ebuild,
+ +files/nvclock-0.8_beta4-as-needed.patch,
+ +files/nvclock-0.8_beta4-flags.patch,
+ +files/nvclock-0.8_beta4-headers.patch, +nvclock-9999.ebuild,
+ +files/nvclock_confd, +files/nvclock_initd, +metadata.xml:
+ Move from media-video/nvclock to sys-power/nvclock.
+
+ 17 Aug 2010; Jeroen Roovers <jer@gentoo.org> nvclock-9999.ebuild,
+ metadata.xml:
+ Respect LDFLAGS, fix --as-needed, respect CC and CFLAGS, basically what
+ the patches for 0.8_beta4-r4 already do. Describe USE=gtk better than the
+ global description.
+
+ 03 Jan 2010; Samuli Suominen <ssuominen@gentoo.org>
+ nvclock-0.8_beta4-r4.ebuild, nvclock-9999.ebuild:
+ Remove USE="qt3" support wrt bug #284046.
+
+ 15 Dec 2009; Mike Frysinger <vapier@gentoo.org>
+ nvclock-0.8_beta4-r4.ebuild, +files/nvclock-0.8_beta4-headers.patch:
+ Fix implicit function warnings.
+
+ 29 Sep 2009; Jeroen Roovers <jer@gentoo.org> -nvclock-0.7-r2.ebuild,
+ -nvclock-0.8_beta4-r3.ebuild, -files/callbacks.patch,
+ -files/configure.in.diff, -files/nvclock-insecure-tmp.diff:
+ Remove old (bug #284017).
+
+ 27 Sep 2009; Mounir Lamouri <volkmar@gentoo.org>
+ nvclock-0.8_beta4-r4.ebuild:
+ Stable for ppc. Fix bug 284017
+
+ 11 Sep 2009; Markus Meier <maekke@gentoo.org> nvclock-0.8_beta4-r4.ebuild:
+ amd64/x86 stable, bug #284017
+
+*nvclock-0.8_beta4-r4 (07 Sep 2009)
+
+ 07 Sep 2009; Jeroen Roovers <jer@gentoo.org> +nvclock-0.8_beta4-r4.ebuild:
+ No need for virtual/libc. Fix trivial spelling error. Make sure
+ --enable-nvcontrol is only set when either toolkit is in USE (bug
+ #265804).
+
+ 28 Jul 2009; Jeroen Roovers <jer@gentoo.org> -nvclock-0.8_beta2.ebuild,
+ -nvclock-0.8_beta4.ebuild, -nvclock-0.8_beta4-r2.ebuild:
+ Remove old.
+
+*nvclock-9999 (28 Jul 2009)
+
+ 28 Jul 2009; Jeroen Roovers <jer@gentoo.org> +nvclock-9999.ebuild:
+ Add a live ebuild (based on the one by Peter Fern attached to bug #204428).
+
+ 28 Jul 2009; Jeroen Roovers <jer@gentoo.org> metadata.xml:
+ Pick up maintainership.
+
+ 13 Jul 2009; Joseph Jezak <josejx@gentoo.org> nvclock-0.7-r2.ebuild,
+ nvclock-0.8_beta4-r3.ebuild:
+ Marked ~ppc for bug #268571.
+
+ 09 Jul 2009; Jeroen Roovers <jer@gentoo.org> files/nvclock_initd:
+ More strict init.d dependency, ought to fix bug #144592 thanks to Stefano
+ Priore.
+
+*nvclock-0.8_beta4-r3 (03 Apr 2009)
+
+ 03 Apr 2009; Jeroen Roovers <jer@gentoo.org>
+ +files/nvclock-0.8_beta4-as-needed.patch, +nvclock-0.8_beta4-r3.ebuild:
+ Patch for --as-needed (bug #247909).
+
+ 02 Apr 2009; Jeroen Roovers <jer@gentoo.org> nvclock-0.8_beta4-r2.ebuild:
+ Install into proper docdir (bug #241292).
+
+*nvclock-0.8_beta4-r2 (02 Apr 2009)
+
+ 02 Apr 2009; Jeroen Roovers <jer@gentoo.org>
+ files/nvclock-0.8_beta4-flags.patch, -nvclock-0.8_beta4-r1.ebuild,
+ +nvclock-0.8_beta4-r2.ebuild:
+ Use emake and econf (but with a --bindir= hack because ./configure sucks).
+
+*nvclock-0.8_beta4-r1 (02 Apr 2009)
+
+ 02 Apr 2009; Jeroen Roovers <jer@gentoo.org>
+ +files/nvclock-0.8_beta4-flags.patch, +nvclock-0.8_beta4-r1.ebuild:
+ Respect CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS (bug #240846). Install and validate
+ upstream desktop entry.
+
+ 13 Mar 2009; Thilo Bangert <bangert@gentoo.org> -nvclock-0.7-r1.ebuild:
+ remove old/insecure version
+
+*nvclock-0.8_beta4 (13 Mar 2009)
+
+ 13 Mar 2009; Thilo Bangert <bangert@gentoo.org> +nvclock-0.8_beta4.ebuild:
+ version bump - bug #260586
+
+ 04 Jun 2008; Diego Pettenò <flameeyes@gentoo.org>
+ nvclock-0.8_beta2.ebuild:
+ Use eautoreconf, not the bootstrap script.
+
+ 21 Apr 2008; Christian Heim <phreak@gentoo.org> metadata.xml:
+ Fix up metadata.xml. If there's no maintainer for the package, the metadata
+ also needs to contain m-needed@g.o.
+
+ 27 Nov 2007; Matthias Schwarzott <zzam@gentoo.org> nvclock-0.7-r1.ebuild,
+ nvclock-0.7-r2.ebuild, nvclock-0.8_beta2.ebuild:
+ Fixed quoting.
+
+ 05 Jul 2007; Raúl Porcel <armin76@gentoo.org> nvclock-0.7-r2.ebuild:
+ x86 stable wrt security #184071
+
+*nvclock-0.7-r2 (05 Jul 2007)
+
+ 05 Jul 2007; Tavis Ormandy <taviso@gentoo.org>
+ +files/nvclock-insecure-tmp.diff, +nvclock-0.7-r2.ebuild:
+ emergency bump by security team #184071 - ** do not assign me bugs **
+
+ 15 May 2007; Thilo Bangert <bangert@gentoo.org> metadata.xml:
+ add <herd>no-herd</herd>
+
+ 01 May 2007; Marius Mauch <genone@gentoo.org> nvclock-0.7-r1.ebuild,
+ nvclock-0.8_beta2.ebuild:
+ Replacing einfo with elog
+
+*nvclock-0.8_beta2 (14 Oct 2006)
+
+ 14 Oct 2006; <malverian@gentoo.org> +files/nvclock_acinclude_qtlibs.patch,
+ nvclock-0.7-r1.ebuild, +nvclock-0.8_beta2.ebuild, -nvclock-0.8b.ebuild:
+ Fix compile problem with USE=qt3 when Qt4 is installed (#114872).
+ Compilation fix with USE=qt3 on AMD64. Version bump (#143023, #107334).
+
+ 24 Jun 2006; Doug Goldstein <cardoe@gentoo.org> nvclock-0.7-r1.ebuild,
+ nvclock-0.8b.ebuild:
+ USE flag qt->qt3/qt4 change bug #137785
+
+ 31 Aug 2005; <malverian@gentoo.org> nvclock-0.8b.ebuild:
+ Explicitly disable qt support unless use flag is set
+
+*nvclock-0.8b (30 Aug 2005)
+
+ 30 Aug 2005; <malverian@gentoo.org> +nvclock-0.8b.ebuild:
+ Version bump, bug #104281. Works on amd64 and x86.
+
+ 06 Oct 2004; Patrick Kursawe <phosphan@gentoo.org> +files/callbacks.patch,
+ nvclock-0.7-r1.ebuild:
+ Adding fix from bug #38251. Thanks!
+
+ 01 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ nvclock-0.7-r1.ebuild:
+ virtual/glibc -> virtual/libc
+
+ 06 Dec 2003; <spider@gentoo.org> nvclock-0.7-r1.ebuild:
+ Removed gtk2 IUSE statement
+
+*nvclock-0.7-r1 (05 Nov 2003)
+
+ 05 Nov 2003; Philip Walls <malverian@gentoo.org> nvclock-0.7-r1.ebuild
+ files/configure.in.diff files/nvclock_initd files/nvclock_confd :
+ Fix QT detection support, closes bug #32339. Add rc scripts for
+ nvclock (#19365)
+
+*nvclock-0.7 (30 Oct 2003)
+
+ 30 Oct 2003; Philip Walls <malverian@gentoo.org> nvclock-0.7.ebuild :
+ Version bump, closes bug #25779; Ebuild cleanups, no more GTK1 frontend
+
+*nvclock-0.6.2-r1 (15 Apr 2003)
+
+ 15 Apr 2003; Philip Walls <malverian@gentoo.org> nvclock-0.6.2-r1.ebuild :
+ Moved into stable, removed 0.5 ebuild: see #19394
+ Thanks to Trans13nt for fixed ebuild/testing
+
+*nvclock-0.6.2 (10 Feb 2003)
+
+ 10 Feb 2003; Mike Frysinger <vapier@gentoo.org> :
+ Version bump + configure fixes #15123.
+
+*nvclock-0.5 (2 Jun 2002)
+
+ 9 Apr 2003; Martin Holzer <mholzer@gentoo.org> nvclock-0.5.ebuild:
+ Adding /usr to make install. Closes #19060.
+
+ 2 Jun 2002; Joachim Blaabjerg <styx@SuxOS.org> nvclock-0.5.ebuild:
+ Version bump to 0.5, QT GUI support, minor cleanup.
+
+*nvclock-0.4.2 (1 Feb 2002)
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/sys-power/nvclock/files/nvclock-0.8_beta4-as-needed.patch b/sys-power/nvclock/files/nvclock-0.8_beta4-as-needed.patch
new file mode 100644
index 000000000000..5b2d3ea1a6f3
--- /dev/null
+++ b/sys-power/nvclock/files/nvclock-0.8_beta4-as-needed.patch
@@ -0,0 +1,14 @@
+Change linking order to make it possible to use -Wl,--as-needed in LDFLAGS
+
+diff -ru nvclock0.8b4.orig/src/Makefile.in nvclock0.8b4/src/Makefile.in
+--- nvclock0.8b4.orig/src/Makefile.in 2009-01-03 12:02:54.000000000 -0500
++++ nvclock0.8b4/src/Makefile.in 2009-04-02 20:04:12.678271229 -0400
+@@ -15,7 +15,7 @@
+ ifeq ($(HAVE_NVCONTROL), yes)
+ DEPS=$(libbackend) $(libnvcontrol)
+ INCLUDES=@X11_CFLAGS@ -I./backend -I./nvcontrol -I..
+- LIBS=@X11_LIBS@ -L./backend -lbackend -L./nvcontrol -lnvcontrol
++ LIBS=-L./backend -lbackend -L./nvcontrol -lnvcontrol @X11_LIBS@
+ else
+ DEPS=$(libbackend)
+ INCLUDES=-I./backend -I./nvcontrol -I..
diff --git a/sys-power/nvclock/files/nvclock-0.8_beta4-flags.patch b/sys-power/nvclock/files/nvclock-0.8_beta4-flags.patch
new file mode 100644
index 000000000000..6f00fc1a3f3b
--- /dev/null
+++ b/sys-power/nvclock/files/nvclock-0.8_beta4-flags.patch
@@ -0,0 +1,114 @@
+--- ./nvclock0.8b4/src/backend/Makefile.in.orig 2007-12-27 17:05:38.000000000 +0100
++++ ./nvclock0.8b4/src/backend/Makefile.in 2009-04-02 09:07:53.000000000 +0200
+@@ -1,11 +1,10 @@
+-CC=@CC@ -O0
+ AR=ar
+ RANLIB=@RANLIB@
+
+ system=@system@
+ HAVE_NVCONTROL=@HAVE_NVCONTROL@
+ OBJECTS=backend.o bios.o config.o error.o nv30.o nv40.o nv50.o info.o overclock.o utils.o i2c.o xf86i2c.o adt7473.o f75375.o lm99.o w83781d.o w83l785r.o libc_wrapper.o
+-CFLAGS=@X11_CFLAGS@ -I../.. -I../nvcontrol
++CFLAGS+=@X11_CFLAGS@ -I../.. -I../nvcontrol
+
+ ifeq ($(system), FreeBSD)
+ OBJECTS+=back_bsd.o
+@@ -36,4 +35,4 @@
+ rm -f Makefile
+
+ install:
+-uninstall:
+\ No newline at end of file
++uninstall:
+--- ./nvclock0.8b4/src/gtk/Makefile.in.orig 2008-05-11 12:25:46.000000000 +0200
++++ ./nvclock0.8b4/src/gtk/Makefile.in 2009-04-02 09:12:10.000000000 +0200
+@@ -1,7 +1,6 @@
+-CC=@CC@
+ INSTALL=@INSTALL@
+
+-CFLAGS=@GTK_CFLAGS@ -I../backend -I../nvcontrol -I../..
++CFLAGS+=@GTK_CFLAGS@ -I../backend -I../nvcontrol -I../..
+ HAVE_GTK2=@HAVE_GTK2@
+ HAVE_NVCONTROL=@HAVE_NVCONTROL@
+ libbackend=../backend/libbackend.a
+@@ -34,7 +33,7 @@
+ all: $(PROGRAM)
+
+ nvclock_gtk: $(DEPS) $(OBJECTS)
+- $(CC) -o nvclock_gtk $(OBJECTS) $(libbackend) $(LIBS)
++ $(CC) -o nvclock_gtk $(LDFLAGS) $(OBJECTS) $(libbackend) $(LIBS)
+
+ clean:
+ rm -f nvclock_gtk *.core *.o *.exe
+--- ./nvclock0.8b4/src/Makefile.in.orig 2009-01-03 18:02:54.000000000 +0100
++++ ./nvclock0.8b4/src/Makefile.in 2009-04-02 09:12:24.000000000 +0200
+@@ -1,4 +1,3 @@
+-CC=@CC@
+ INSTALL=@INSTALL@
+
+ nvclock_SOURCES=nvclock.c
+@@ -31,10 +30,10 @@
+
+
+ nvclock: $(DEPS) $(LIB) nvclock.c
+- $(CC) -o nvclock $(nvclock_SOURCES) $(INCLUDES) $(LIBS)
++ $(CC) -o nvclock $(CFLAGS) $(LDFLAGS) $(nvclock_SOURCES) $(INCLUDES) $(LIBS)
+
+ smartdimmer: $(DEPS) $(LIB) smartdimmer.c
+- $(CC) -o smartdimmer $(smartdimmer_SOURCES) $(INCLUDES) $(LIBS)
++ $(CC) -o smartdimmer $(CFLAGS) $(LDFLAGS) $(smartdimmer_SOURCES) $(INCLUDES) $(LIBS)
+
+
+ clean: clean-recursive clean-app
+@@ -50,8 +49,8 @@
+ install: install-recursive install-app
+ install-app:
+ mkdir -p $(bindir)
+- $(INSTALL) -c nvclock $(DESTDIR)$(bindir)/nvclock
+- $(INSTALL) -c smartdimmer $(DESTDIR)$(bindir)/smartdimmer
++ $(INSTALL) -c nvclock $(bindir)/nvclock
++ $(INSTALL) -c smartdimmer $(bindir)/smartdimmer
+
+
+ uninstall: uninstall-recursive uninstall-app
+--- ./nvclock0.8b4/src/nvcontrol/Makefile.in.orig 2005-12-09 20:46:05.000000000 +0100
++++ ./nvclock0.8b4/src/nvcontrol/Makefile.in 2009-04-02 09:07:53.000000000 +0200
+@@ -1,8 +1,7 @@
+-CC=@CC@
+ AR=ar
+ RANLIB=@RANLIB@
+ system=@system@
+-CFLAGS=@X11_CFLAGS@ -I../backend
++CFLAGS+=@X11_CFLAGS@ -I../backend
+ HAVE_X11=@HAVE_NVCONTROL@
+ OBJECTS=libnvcontrol.o nvcontrol.o
+
+@@ -26,4 +25,4 @@
+ rm -f Makefile
+
+ install:
+-uninstall:
+\ No newline at end of file
++uninstall:
+--- ./nvclock0.8b4/src/qt/Makefile.in.orig 2008-05-11 12:25:46.000000000 +0200
++++ ./nvclock0.8b4/src/qt/Makefile.in 2009-04-02 09:11:51.000000000 +0200
+@@ -1,9 +1,8 @@
+-CXX=@CXX@
+ INSTALL=@INSTALL@
+ MOC=@MOC@
+
+ OBJECTS=main.o qt_nvclock.o qt_nvclock.moc.o qt_xfree.o qt_xfree.moc.o
+-CXXFLAGS=@QT_CFLAGS@ -I../backend
++CXXFLAGS+=@QT_CFLAGS@ -I../backend
+ HAVE_NVCONTROL=@HAVE_NVCONTROL@
+ HAVE_QT=@HAVE_QT@
+ libbackend=../backend/libbackend.a
+@@ -32,7 +31,7 @@
+ all: $(PROGRAM)
+
+ nvclock_qt: $(DEPS) qt_nvclock.moc qt_xfree.moc $(OBJECTS)
+- $(CXX) -o nvclock_qt $(CXXFLAGS) $(OBJECTS) $(LIBS)
++ $(CXX) -o nvclock_qt $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS)
+
+ clean:
+ rm -f nvclock_qt *.core *.moc *.o
diff --git a/sys-power/nvclock/files/nvclock-0.8_beta4-headers.patch b/sys-power/nvclock/files/nvclock-0.8_beta4-headers.patch
new file mode 100644
index 000000000000..1ec76eea780e
--- /dev/null
+++ b/sys-power/nvclock/files/nvclock-0.8_beta4-headers.patch
@@ -0,0 +1,99 @@
+bios.c: In function ‘dump_bios’:
+bios.c:909: warning: implicit declaration of function ‘load_bios_pramin’
+bios.c:911: warning: implicit declaration of function ‘load_bios_prom’
+
+diff --git a/src/backend/bios.c b/src/backend/bios.c
+index 3266b57..20fadc8 100644
+--- a/src/backend/bios.c
++++ b/src/backend/bios.c
+@@ -891,6 +891,8 @@ int main(int argc, char **argv)
+
+
+ #else
++int load_bios_pramin(char *data);
++int load_bios_prom(char *data);
+ void dump_bios(const char *filename)
+ {
+ int i;
+
+libc_wrapper.c: In function ‘xf86usleep’:
+libc_wrapper.c:53: warning: implicit declaration of function ‘usleep’
+
+diff --git a/src/backend/libc_wrapper.c b/src/backend/libc_wrapper.c
+index 4787205..9e490cd 100644
+--- a/src/backend/libc_wrapper.c
++++ b/src/backend/libc_wrapper.c
+@@ -25,6 +25,7 @@
+ *
+ */
+
++#include <config.h>
+ #include <stdio.h>
+ #include "xfree.h"
+
+
+nv40.c: In function ‘nv43_get_gpu_temp’:
+nv40.c:393: warning: implicit declaration of function ‘usleep’
+
+diff --git a/src/backend/nv40.c b/src/backend/nv40.c
+index 73472fa..63c9609 100644
+--- a/src/backend/nv40.c
++++ b/src/backend/nv40.c
+@@ -68,6 +68,7 @@
+
+ #include <stdio.h>
+ #include <string.h>
++#include <unistd.h>
+ #include "backend.h"
+
+ /*
+
+banner.c: In function ‘banner_set_text’:
+banner.c:115: warning: format not a string literal and no format arguments
+
+diff --git a/src/gtk/banner.c b/src/gtk/banner.c
+index df2eb55..69851ae 100644
+--- a/src/gtk/banner.c
++++ b/src/gtk/banner.c
+@@ -112,7 +112,7 @@ void banner_set_text(Banner *banner, char *text, int type)
+ if(banner->text)
+ g_free(banner->text);
+
+- banner->text = g_strdup_printf(text);
++ banner->text = g_strdup(text);
+ banner->type = type;
+ /* Refresh the banner */
+ banner_expose(GTK_WIDGET(banner), NULL, banner);
+
+main.c: In function ‘gui_init’:
+main.c:235: warning: implicit declaration of function ‘XOpenDisplay’
+main.c:235: warning: cast to pointer from integer of different size
+
+diff --git a/src/gtk/main.c b/src/gtk/main.c
+index b3bbacb..df7e5b1 100644
+--- a/src/gtk/main.c
++++ b/src/gtk/main.c
+@@ -25,6 +25,7 @@
+
+ #include <stdlib.h>
+ #include <gtk/gtk.h>
++#include <X11/Xlib.h>
+
+ #include "banner.h"
+ #include "interface.h"
+
+smartdimmer.c: In function ‘main’:
+smartdimmer.c:107: warning: implicit declaration of function ‘isdigit’
+
+diff --git a/src/smartdimmer.c b/src/smartdimmer.c
+index 295cd49..769c1bc 100644
+--- a/src/smartdimmer.c
++++ b/src/smartdimmer.c
+@@ -38,6 +38,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <getopt.h>
++#include <ctype.h>
+ #include "nvclock.h"
+
+ /* for command line arguments */
diff --git a/sys-power/nvclock/files/nvclock_confd b/sys-power/nvclock/files/nvclock_confd
new file mode 100644
index 000000000000..ff7f15bdd746
--- /dev/null
+++ b/sys-power/nvclock/files/nvclock_confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/nvclock
+
+# Set the core clock speed after -n and the memory clock speed after -m
+# Check your current speeds by running 'nvclock -s' at the command line
+# so you don't overclock too much and burn out the card
+# Test out your overclocking before adding this to the bootup!
+
+CLOCKOPTS="-s"
+#CLOCKOPTS="-n <corespeed> -m <memspeed>"
diff --git a/sys-power/nvclock/files/nvclock_initd b/sys-power/nvclock/files/nvclock_initd
new file mode 100644
index 000000000000..bcab3b581b23
--- /dev/null
+++ b/sys-power/nvclock/files/nvclock_initd
@@ -0,0 +1,12 @@
+#!/sbin/runscript
+
+depend() {
+ need xdm
+}
+
+start() {
+ ebegin "Setting nvidia card overclock speed"
+ nvclock ${CLOCKOPTS} >/dev/null
+ eend $?
+}
+
diff --git a/sys-power/nvclock/metadata.xml b/sys-power/nvclock/metadata.xml
new file mode 100644
index 000000000000..c9589d3d7648
--- /dev/null
+++ b/sys-power/nvclock/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+ <use>
+ <flag name="gtk">Install the GTK+ based graphical interface</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-power/nvclock/nvclock-0.8_beta4-r4.ebuild b/sys-power/nvclock/nvclock-0.8_beta4-r4.ebuild
new file mode 100644
index 000000000000..0f412d1a35e0
--- /dev/null
+++ b/sys-power/nvclock/nvclock-0.8_beta4-r4.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/nvclock/nvclock-0.8_beta4-r4.ebuild,v 1.1 2010/09/08 05:37:38 jer Exp $
+
+EAPI="2"
+
+inherit eutils autotools toolchain-funcs
+
+MY_P="${PN}${PV/_beta/b}"
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="NVIDIA Overclocking Utility"
+HOMEPAGE="http://www.linuxhardware.org/nvclock/"
+SRC_URI="http://www.linuxhardware.org/nvclock/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="gtk"
+
+RDEPEND="gtk? ( =x11-libs/gtk+-2* )"
+
+src_prepare() {
+ # Bug #240846:
+ epatch "${FILESDIR}"/${P}-flags.patch
+ epatch "${FILESDIR}"/${P}-as-needed.patch
+ epatch "${FILESDIR}"/${P}-headers.patch
+
+ sed -e 's:NV-CONROL:NV-CONTROL:g' -i configure.in
+ sed -i Makefile.in -e "s:/share/doc/nvclock:/share/doc/${PF}:g" || \
+ die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC CXX
+
+ local myconf
+
+ myconf="--bindir=/usr/bin"
+
+ if use gtk; then
+ myconf="${myconf} --enable-nvcontrol"
+ else
+ myconf="${myconf} --disable-nvcontrol"
+ fi
+
+ econf --disable-qt $(use_enable gtk) ${myconf} || die
+}
+
+src_compile() {
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ dodir /usr/bin
+ emake DESTDIR="${D}" install || die
+ #dodoc AUTHORS README
+
+ newinitd "${FILESDIR}"/nvclock_initd nvclock
+ newconfd "${FILESDIR}"/nvclock_confd nvclock
+
+ #insinto /usr/share/applications
+ #doins nvclock.desktop
+ #validate_desktop_entries /usr/share/applications/nvclock.desktop
+}
+
+pkg_postinst() {
+ elog "To enable card overclocking at startup, edit your /etc/conf.d/nvclock"
+ elog "accordingly and then run: rc-update add nvclock default"
+}
diff --git a/sys-power/nvclock/nvclock-9999.ebuild b/sys-power/nvclock/nvclock-9999.ebuild
new file mode 100644
index 000000000000..b15789da0ac9
--- /dev/null
+++ b/sys-power/nvclock/nvclock-9999.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/nvclock/nvclock-9999.ebuild,v 1.1 2010/09/08 05:37:38 jer Exp $
+
+EAPI="2"
+
+inherit autotools cvs eutils toolchain-funcs
+
+ECVS_SERVER="nvclock.cvs.sourceforge.net:/cvsroot/nvclock"
+ECVS_MODULE="nvclock"
+ECVS_USER="anonymous"
+ECVS_PASS=""
+
+DESCRIPTION="NVIDIA Overclocking Utility"
+HOMEPAGE="http://www.linuxhardware.org/nvclock/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="gtk"
+
+RDEPEND="
+ gtk? ( x11-libs/gtk+:2 )
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ eautoreconf
+ sed -i \
+ -e 's|^CC=|CC?=|g' \
+ -e 's|^CFLAGS=|CFLAGS+=|g' \
+ -e '/-o .* /s|-o |$(LDFLAGS) -o |g' \
+ $( find . -name Makefile.in ) \
+ || die "Fixing compiler flags"
+ sed -i src/Makefile.in \
+ -e '/LIBS=@X11_LIBS@/{s|@X11_LIBS@||g;s|-lnvcontrol|& @X11_LIBS@|g}' \
+ || die "Fixing Makefile.in"
+}
+
+src_configure() {
+ tc-export CC
+ econf --disable-qt $(use_enable gtk) || die "econf failed"
+}
+
+src_compile() {
+ # The build fails with -j[N>1]
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ dodir /usr/bin
+ einstall || die "einstall failed"
+ dodoc AUTHORS README
+
+ newinitd "${FILESDIR}"/nvclock_initd nvclock
+ newconfd "${FILESDIR}"/nvclock_confd nvclock
+}
+
+pkg_postinst() {
+ elog "To enable card overclocking at startup, edit your /etc/conf.d/nvclock"
+ elog "accordingly and then run: rc-update add nvclock default"
+}