diff options
author | Piotr Jaroszyński <peper@gentoo.org> | 2007-11-20 20:24:19 +0000 |
---|---|---|
committer | Piotr Jaroszyński <peper@gentoo.org> | 2007-11-20 20:24:19 +0000 |
commit | 6d59b94038a738438479463ba43f0ac0a51f1c3f (patch) | |
tree | f4dac825e683c13de79a97fd2e954f835dca51b1 /media-video | |
parent | Add ~x86-fbsd keyword (diff) | |
download | gentoo-2-6d59b94038a738438479463ba43f0ac0a51f1c3f.tar.gz gentoo-2-6d59b94038a738438479463ba43f0ac0a51f1c3f.tar.bz2 gentoo-2-6d59b94038a738438479463ba43f0ac0a51f1c3f.zip |
Add 169.04 with a patch allowing to run nvidia-setting without :0. Thanks to Tommy Yu <a_korner@hotmail.com> in bug #94240.
(Portage version: 2.1.3.19)
Diffstat (limited to 'media-video')
4 files changed, 222 insertions, 1 deletions
diff --git a/media-video/nvidia-settings/ChangeLog b/media-video/nvidia-settings/ChangeLog index 36cda85d8cf6..c3a14ed9391e 100644 --- a/media-video/nvidia-settings/ChangeLog +++ b/media-video/nvidia-settings/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-video/nvidia-settings # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-settings/ChangeLog,v 1.38 2007/11/12 16:29:06 welp Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-settings/ChangeLog,v 1.39 2007/11/20 20:24:18 peper Exp $ + +*nvidia-settings-169.04 (20 Nov 2007) + + 20 Nov 2007; Piotr Jaroszyński <peper@gentoo.org> + +files/nvidia-settings-169.04-no-display.patch, + +nvidia-settings-169.04.ebuild: + Add 169.04 with a patch allowing to run nvidia-setting without $DISPLAY. + Thanks to Tommy Yu <a_korner@hotmail.com> in bug #94240. 12 Nov 2007; Peter Weller <welp@gentoo.org> nvidia-settings-1.0.20070621.ebuild: diff --git a/media-video/nvidia-settings/files/digest-nvidia-settings-169.04 b/media-video/nvidia-settings/files/digest-nvidia-settings-169.04 new file mode 100644 index 000000000000..ce40457a2adf --- /dev/null +++ b/media-video/nvidia-settings/files/digest-nvidia-settings-169.04 @@ -0,0 +1,3 @@ +MD5 fa954e504cb5b89b400968fcbd86ff27 nvidia-settings-169.04.tar.gz 1288405 +RMD160 678a82a290b7f5ca5385e74405f36e926e308a0f nvidia-settings-169.04.tar.gz 1288405 +SHA256 83c6b760b8322dba96252633d80441d70a8c65e5e172b9db6a73edbdd1eb45fc nvidia-settings-169.04.tar.gz 1288405 diff --git a/media-video/nvidia-settings/files/nvidia-settings-169.04-no-display.patch b/media-video/nvidia-settings/files/nvidia-settings-169.04-no-display.patch new file mode 100644 index 000000000000..6f47d99609e9 --- /dev/null +++ b/media-video/nvidia-settings/files/nvidia-settings-169.04-no-display.patch @@ -0,0 +1,112 @@ +diff -ur nvidia-settings-1.0-old/src/gtk+-2.x/ctkui.c nvidia-settings-1.0/src/gtk+-2.x/ctkui.c +--- nvidia-settings-1.0-old/src/gtk+-2.x/ctkui.c 2007-11-15 01:43:51.000000000 +0100 ++++ nvidia-settings-1.0/src/gtk+-2.x/ctkui.c 2007-11-20 21:07:50.000000000 +0100 +@@ -37,6 +37,11 @@ + gtk_init(argc, argv); + } + ++gboolean ctk_init_check(int *argc, char **argv[]) ++{ ++ return gtk_init_check(argc, argv); ++} ++ + char *ctk_get_display(void) + { + return gdk_get_display(); +diff -ur nvidia-settings-1.0-old/src/gtk+-2.x/ctkui.h nvidia-settings-1.0/src/gtk+-2.x/ctkui.h +--- nvidia-settings-1.0-old/src/gtk+-2.x/ctkui.h 2007-11-15 01:43:51.000000000 +0100 ++++ nvidia-settings-1.0/src/gtk+-2.x/ctkui.h 2007-11-20 21:07:50.000000000 +0100 +@@ -28,9 +28,12 @@ + #include "NvCtrlAttributes.h" + #include "parse.h" + #include "config-file.h" ++#include <gtk/gtk.h> + + void ctk_init(int *argc, char **argv[]); + ++gboolean ctk_init_check(int *argc, char **argv[]); ++ + char *ctk_get_display(void); + + void ctk_main(NvCtrlAttributeHandle **, int, +Only in nvidia-settings-1.0/src/gtk+-2.x: ctkui.h.orig +diff -ur nvidia-settings-1.0-old/src/nvidia-settings.c nvidia-settings-1.0/src/nvidia-settings.c +--- nvidia-settings-1.0-old/src/nvidia-settings.c 2007-11-15 01:43:51.000000000 +0100 ++++ nvidia-settings-1.0/src/nvidia-settings.c 2007-11-20 21:10:31.000000000 +0100 +@@ -22,6 +22,8 @@ + * + */ + ++#include <gtk/gtk.h> ++ + #include "NvCtrlAttributes.h" + + #include "command-line.h" +@@ -44,7 +46,9 @@ + NvCtrlAttributeHandle **vcsc_handles = NULL; + Options *op; + int ret, i, num_screen_handles, num_gpu_handles, num_vcsc_handles; +- ++ char *dpy = NULL; ++ int gui = 0; ++ + /* + * initialize the ui + * +@@ -52,14 +56,21 @@ + * may not even use the gui, but we want the toolkit to have a + * chance to parse the commandline before we do... we should + * investigate gtk_init_check(). ++ * ++ * gui flag used to decide if gtk should be used or not, as ++ * use might just use control the display from a remote console ++ * but for some reason cannot initialize the gtk gui. - TY 2005-05-27 + */ +- +- ctk_init(&argc, &argv); +- ++ ++ ++ if (ctk_init_check(&argc, &argv) == TRUE) { ++ dpy = ctk_get_display(); ++ gui = 1; ++ } ++ + /* parse the commandline */ + +- op = parse_command_line(argc, argv, ctk_get_display()); +- ++ op = parse_command_line(argc, argv, dpy); + /* process any query or assignment commandline options */ + + if (op->num_assignments || op->num_queries) { +@@ -67,6 +78,14 @@ + return ret ? 0 : 1; + } + ++ /* quit here if display is undefineds - TY 2005-05-27 */ ++ ++ if (op->ctrl_display == NULL) { ++ nv_error_msg("Display is undefined, please run `%s --help` " ++ "for usage information.\n", argv[0]); ++ return 1; ++ } ++ + /* initialize the parsed attribute list */ + + p = nv_parsed_attribute_init(); +@@ -165,6 +184,14 @@ + } + + /* pass control to the gui */ ++ /* ++ * if gtk wasn't initiated, exit here. ++ * Using a -c flag without gtk would behave as if using -l - TY 2005-05-27 ++ */ ++ if (gui == 0) { ++ nv_error_msg("Unable to create gui.\n"); ++ return 1; ++ } + + ctk_main(screen_handles, num_screen_handles, + gpu_handles, num_gpu_handles, diff --git a/media-video/nvidia-settings/nvidia-settings-169.04.ebuild b/media-video/nvidia-settings/nvidia-settings-169.04.ebuild new file mode 100644 index 000000000000..77810cb84ad6 --- /dev/null +++ b/media-video/nvidia-settings/nvidia-settings-169.04.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-settings/nvidia-settings-169.04.ebuild,v 1.1 2007/11/20 20:24:18 peper Exp $ + +inherit eutils toolchain-funcs multilib + +MY_P="${PN}-1.0" + +DESCRIPTION="NVIDIA Linux X11 Settings Utility" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="ftp://download.nvidia.com/XFree86/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +IUSE="" + +# xorg-server is used in the depends as nvidia-settings builds against some +# headers in /usr/include/xorg/. +# This also allows us to optimize out a lot of the other dependancies, as +# between gtk and xorg-server, almost all libraries and headers are accounted +# for. +DEPEND=">=x11-libs/gtk+-2 + dev-util/pkgconfig + x11-base/xorg-server + x11-libs/libXt + x11-libs/libXv + x11-proto/xf86driproto + x11-misc/imake + x11-misc/gccmakedep" + +RDEPEND=">=x11-libs/gtk+-2 + x11-base/xorg-server + x11-libs/libXt + x11-drivers/nvidia-drivers" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + + cd "${S}" + # This patch was accepted upstream, so next release shouldn't need it. bug #94240 + epatch "${FILESDIR}/${P}-no-display.patch" + + cd "${S}/src/libXNVCtrl" + einfo "Tweaking libXNVCtrl for build..." + + # This next voodoo is just to work around xmkmf's broken behaviour + # after the Xorg move to /usr (or I think, as I have not messed + # with it in ages). + #ln -snf /usr/include/X11 include + + # Ensure that libNVCtrl.a is actually built + # Regardless of how NormalLibXrandr was built + # (NormalLibXrandr indicates if Xrandr was built as static or not) + # NormalLibXrandr was 'YES' in Xorg-6.8, but is 'NO' in 7.0. + sed -i.orig \ + -e 's,DoNormalLib NormalLibXrandr,DoNormalLib YES,g' \ + Imakefile + + # for a rainy day, when we need a shared libXNVCtrl.so + #-e 'a#define DoSharedLib YES\n' \ +} + +src_compile() { + einfo "Building libXNVCtrl..." + cd "${S}/src/libXNVCtrl" + xmkmf -a || die "Running xmkmf failed!" + make clean || die "Cleaning old libXNVCtrl failed" + emake CDEBUGFLAGS="${CFLAGS}" CC="$(tc-getCC)" all || die "Building libXNVCtrl failed!" + + cd "${S}" + einfo "Building nVidia-Settings..." + emake CC="$(tc-getCC)" || die "Failed to build nvidia-settings" +} + +src_install() { + # Install the executable + exeinto /usr/bin + doexe nvidia-settings + + # Install libXNVCtrl and headers + insinto "/usr/$(get_libdir)" + doins src/libXNVCtrl/libXNVCtrl.a + insinto /usr/include/NVCtrl + doins src/libXNVCtrl/{NVCtrl,NVCtrlLib}.h + + # Install icon and .desktop entry + doicon "${FILESDIR}/icon/${PN}.png" + domenu "${FILESDIR}/icon/${PN}.desktop" + + # Install manpage + doman doc/nvidia-settings.1 + + # Now install documentation + dodoc doc/*.txt +} |