+++ /dev/null
-From af5353c68481d64ebe56e4d10f8ab8502ffcd172 Mon Sep 17 00:00:00 2001
-From: Christian Ruppert <idl0r@gentoo.org>
-Date: Sat, 20 Apr 2013 22:40:28 +0200
-Subject: [PATCH] Make Jansson optional
-
-
-Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
----
- src/Makefile | 17 ++++++++++++-----
- src/src.mk | 2 ++
- utils.mk | 2 ++
- 3 files changed, 16 insertions(+), 5 deletions(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index c5da53a..cb9d173 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -59,11 +59,15 @@ ifndef VDPAU_CFLAGS
- endif
- endif
-
--ifndef JANSSON_CFLAGS
-- JANSSON_CFLAGS = -Wno-cast-qual
-- ifeq ($(TARGET_ARCH),armv7l)
-- JANSSON_CFLAGS += -Wno-unused-but-set-variable
-+ifeq ($(USE_EXTERNAL_JANSSON),0)
-+ ifndef JANSSON_CFLAGS
-+ JANSSON_CFLAGS = -Wno-cast-qual
-+ ifeq ($(TARGET_ARCH),armv7l)
-+ JANSSON_CFLAGS += -Wno-unused-but-set-variable
-+ endif
- endif
-+else
-+ LIBS += -ljansson
- endif
-
- ##############################################################################
-@@ -153,7 +157,9 @@ CFLAGS += -I $(XCONFIG_PARSER_DIR)/..
- CFLAGS += -I libXNVCtrlAttributes
- CFLAGS += -I xpm_data
- CFLAGS += -I gtk+-2.x
-+ifeq ($(USE_EXTERNAL_JANSSON),0)
- CFLAGS += -I jansson
-+endif
- CFLAGS += -I $(COMMON_UTILS_DIR)
- CFLAGS += -I $(VIRTUAL_RESOLUTIONS_DIR)
- CFLAGS += -I $(OUTPUTDIR)
-@@ -162,8 +168,9 @@ CFLAGS += -DPROGRAM_NAME=\"nvidia-setttings\"
-
- $(call BUILD_OBJECT_LIST,$(GTK_SRC)): CFLAGS += $(GTK_CFLAGS)
-
-+ifeq ($(USE_EXTERNAL_JANSSON),0)
- $(call BUILD_OBJECT_LIST,$(JANSSON_SRC)): CFLAGS += $(JANSSON_CFLAGS)
--
-+endif
-
- ##############################################################################
- # build rules
-diff --git a/src/src.mk b/src/src.mk
-index 327b41b..0ffd7d6 100644
---- a/src/src.mk
-+++ b/src/src.mk
-@@ -276,6 +276,7 @@ NVIDIA_SETTINGS_EXTRA_DIST += $(GTK_EXTRA_DIST)
- #
- # files in the src/jansson directory of nvidia-settings
- #
-+ifeq ($(USE_EXTERNAL_JANSSON),0)
- JANSSON_SRC += jansson/load.c
- JANSSON_SRC += jansson/value.c
- JANSSON_SRC += jansson/pack_unpack.c
-@@ -297,6 +298,7 @@ JANSSON_EXTRA_DIST += jansson/hashtable.h
- JANSSON_EXTRA_DIST += jansson/jansson_private.h
-
- NVIDIA_SETTINGS_EXTRA_DIST += $(JANSSON_EXTRA_DIST)
-+endif
-
- NVIDIA_SETTINGS_DIST_FILES += $(NVIDIA_SETTINGS_SRC)
- NVIDIA_SETTINGS_DIST_FILES += $(NVIDIA_SETTINGS_EXTRA_DIST)
-diff --git a/utils.mk b/utils.mk
-index 54b76d6..29e06a9 100644
---- a/utils.mk
-+++ b/utils.mk
-@@ -74,6 +74,8 @@ CHMOD ?= chmod
- NV_AUTO_DEPEND ?= 1
- NV_VERBOSE ?= 0
-
-+USE_EXTERNAL_JANSSON ?= 0
-+
- ifndef TARGET_OS
- TARGET_OS := $(shell uname)
- endif
---
-1.8.1.5
-
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="NVIDIA Linux X11 Settings Utility"
-HOMEPAGE="http://www.nvidia.com/"
-SRC_URI="ftp://download.nvidia.com/XFree86/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="-* amd64 x86 ~x86-fbsd"
-IUSE="examples"
-
-COMMON_DEPEND="x11-libs/libX11
- x11-libs/libXext
- x11-libs/libXxf86vm
- x11-libs/gtk+:2
- x11-libs/gdk-pixbuf[X]
- media-libs/mesa
- x11-libs/pango[X]
- x11-libs/libXv
- x11-libs/libXrandr
- dev-libs/glib:2
- dev-libs/jansson"
-
-RDEPEND="
- >=x11-drivers/nvidia-drivers-302.17
- ${COMMON_DEPEND}
- x11-libs/libvdpau"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- x11-proto/xproto"
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-319.12-jansson.patch
-}
-
-src_compile() {
- einfo "Building libXNVCtrl..."
- emake -C src/libXNVCtrl/ clean # NVidia ships pre-built archives :(
- emake -C src/libXNVCtrl/ \
- CC="$(tc-getCC)" \
- AR="$(tc-getAR)" \
- RANLIB="$(tc-getRANLIB)" \
- libXNVCtrl.a
-
- einfo "Building nvidia-settings..."
- emake -C src/ \
- CC="$(tc-getCC)" \
- LD="$(tc-getLD)" \
- STRIP_CMD="$(type -P true)" \
- NV_VERBOSE=1 \
- USE_EXTERNAL_JANSSON=1
-}
-
-src_install() {
- emake -C src/ DESTDIR="${D}" PREFIX=/usr USE_EXTERNAL_JANSSON=1 install
-
- insinto /usr/$(get_libdir)
- doins src/libXNVCtrl/libXNVCtrl.a
-
- insinto /usr/include/NVCtrl
- doins src/libXNVCtrl/*.h
-
-# doicon doc/${PN}.png # Installed through nvidia-drivers
- make_desktop_entry ${PN} "NVIDIA X Server Settings" ${PN} Settings
-
- # bug 412569 - Installed through nvidia-drivers
-# rm -rf "${D}"/usr/share/man
-
- dodoc doc/*.txt
-
- if use examples; then
- docinto examples/
- dodoc samples/*.c
- dodoc samples/README
- fi
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="NVIDIA Linux X11 Settings Utility"
-HOMEPAGE="http://www.nvidia.com/"
-SRC_URI="ftp://download.nvidia.com/XFree86/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
-IUSE="examples"
-
-COMMON_DEPEND="x11-libs/libX11
- x11-libs/libXext
- x11-libs/libXxf86vm
- x11-libs/gtk+:2
- x11-libs/gdk-pixbuf[X]
- media-libs/mesa
- x11-libs/pango[X]
- x11-libs/libXv
- x11-libs/libXrandr
- dev-libs/glib:2
- dev-libs/jansson"
-
-RDEPEND="
- >=x11-drivers/nvidia-drivers-302.17
- ${COMMON_DEPEND}
- x11-libs/libvdpau"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- x11-proto/xproto"
-
-src_compile() {
- einfo "Building libXNVCtrl..."
- emake -C src/ \
- CC="$(tc-getCC)" \
- AR="$(tc-getAR)" \
- RANLIB="$(tc-getRANLIB)" \
- build-xnvctrl
-
- einfo "Building nvidia-settings..."
- emake -C src/ \
- CC="$(tc-getCC)" \
- LD="$(tc-getLD)" \
- STRIP_CMD="$(type -P true)" \
- NV_VERBOSE=1 \
- NV_USE_BUNDLED_LIBJANSSON=0
-}
-
-src_install() {
- emake -C src/ DESTDIR="${D}" PREFIX=/usr NV_USE_BUNDLED_LIBJANSSON=0 install
-
- insinto /usr/$(get_libdir)
- doins src/libXNVCtrl/libXNVCtrl.a
-
- insinto /usr/include/NVCtrl
- doins src/libXNVCtrl/*.h
-
-# doicon doc/${PN}.png # Installed through nvidia-drivers
- make_desktop_entry ${PN} "NVIDIA X Server Settings" ${PN} Settings
-
- # bug 412569 - Installed through nvidia-drivers
-# rm -rf "${D}"/usr/share/man
-
- dodoc doc/*.txt
-
- if use examples; then
- docinto examples/
- dodoc samples/*.c
- dodoc samples/README
- fi
-}