app-laptop/nvidiabl: bump to vn. 0.87, ebuild by maintainer
authorIan Delaney <idella4@gentoo.org>
Thu, 14 Jan 2016 02:21:27 +0000 (10:21 +0800)
committerIan Delaney <idella4@gentoo.org>
Thu, 14 Jan 2016 02:27:06 +0000 (10:27 +0800)
The ebuild has changes of minor style tweaks only from the ebuild
submitted via the gentoo bug in Comment 11 in the gentoo bug, namely
- reduction of DESCRIPTION to a single line
- removal of redundant RESTRICT="test"

Gentoo bug: #557422

Package-Manager: portage-2.2.26

app-laptop/nvidiabl/Manifest
app-laptop/nvidiabl/files/nvidiabl-0.87-linux-4.0.patch [new file with mode: 0644]
app-laptop/nvidiabl/nvidiabl-0.87.ebuild [new file with mode: 0644]

index 76a124acede6e208d50f7d642faa069ace391572..afe730708caf1c7abb092b58048031b60dc5b39b 100644 (file)
@@ -1 +1,2 @@
+DIST nvidiabl-0.87.tar.gz 36563463 SHA256 a5a035520cce17ef1b6b2f98eb6ad10ef7d4d3e55dd2f12b6b961fabc05c5e35 SHA512 778f8b9e7d6d8e9ecbeef745bf3602e56b38757791d7b49ebf3326758117487f7494e232aaa9354b91fd17ee3578c80278e0e60175b274b1a1a93e952dc0dfe5 WHIRLPOOL 3ebca47463ccc1059a3d7dd109479ee9c9bce4332da8ac25aaf14fd8630b72b6620e8941a69fd7e2e734739f894362efff75ace05692a3c402a8981601dd3c36
 DIST v0.83.tar.gz 448594 SHA256 0ea79770c02ae297fb6d660ee28ecf7a7acc346de0a55e3231ce499d4184db0f SHA512 cbf4f042acb9005c25d8d008973220f4d42fe890bfd86a34b72c0e56129dfcdcad2383acacf048e5e9da33aaf759053cdadeddac9e0946ae49a8a29ed03447dd WHIRLPOOL 4d1e13ffe1bed36ffee1c498c6384a9ff3fcc561e3aa443c15106baa9711523b8798f0283e42d6365afa57f8d7b4a394835bbea2eb8c6d41a8910c38d661012b
diff --git a/app-laptop/nvidiabl/files/nvidiabl-0.87-linux-4.0.patch b/app-laptop/nvidiabl/files/nvidiabl-0.87-linux-4.0.patch
new file mode 100644 (file)
index 0000000..b466bcb
--- /dev/null
@@ -0,0 +1,23 @@
+From dee67fbf8eeec1651dbee3c2045ce6a93da949dc Mon Sep 17 00:00:00 2001
+From: Thomas Wucher <mail@thomaswucher.de>
+Date: Tue, 14 Apr 2015 08:41:09 +0200
+Subject: [PATCH] Replace strnicmp by stncasecmp to fix build on Linux 4.0
+
+---
+ nvidiabl-module.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nvidiabl-module.c b/nvidiabl-module.c
+index b789ea4..b306579 100644
+--- a/nvidiabl-module.c
++++ b/nvidiabl-module.c
+@@ -214,7 +214,7 @@ static int __init nvidiabl_init(void)
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
+       
+       for (iii = 0 ; iii < sizeof(backlight_type_ids) ; iii++) {
+-              if (strnicmp(bl_type, backlight_type_ids[iii].id, sizeof(bl_type)) == 0) {
++              if (strncasecmp(bl_type, backlight_type_ids[iii].id, sizeof(bl_type)) == 0) {
+                       props.type = backlight_type_ids[iii].type;
+                       printk(KERN_INFO "nvidiabl: backlight type is %s\n", backlight_type_ids[iii].id);
+               }
+
diff --git a/app-laptop/nvidiabl/nvidiabl-0.87.ebuild b/app-laptop/nvidiabl/nvidiabl-0.87.ebuild
new file mode 100644 (file)
index 0000000..d7dfb9e
--- /dev/null
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit linux-mod eutils
+
+DESCRIPTION="Linux driver for setting the backlight brightness on laptops using NVIDIA GPU"
+HOMEPAGE="https://github.com/guillaumezin/nvidiabl"
+SRC_URI="https://github.com/guillaumezin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+pkg_setup() {
+       CONFIG_CHECK="FB_BACKLIGHT"
+       ERROR_FB_BACKLIGHT="Your kernel does not support FB_BACKLIGHT. To enable you
+it you can enable any frame buffer with backlight control or nouveau.
+Note that you cannot use FB_NVIDIA with nvidia's proprietary driver"
+       linux-mod_pkg_setup
+}
+
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-linux-4.0.patch
+}
+
+src_compile() {
+       BUILD_PARAMS="KVER=${KV_FULL}"
+       BUILD_TARGETS="modules"
+       MODULE_NAMES="nvidiabl()"
+
+       MAKEOPTS+=" V=1"
+       linux-mod_src_compile
+}