mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
system/tp_smapi: Updated for version 0.41.
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
This commit is contained in:
parent
38b8da0114
commit
f19e89515b
7 changed files with 14 additions and 67 deletions
|
@ -10,11 +10,9 @@ It thus cannot be guaranteed to work, and may cause arbitrary damage
|
||||||
(especially to models on which it wasn't tested).
|
(especially to models on which it wasn't tested).
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
* There's a patch (patches/tp_smapi-0.40-x200-x200s-support.patch) to
|
* The source code of this package is from a tp_smapi fork:
|
||||||
add axis inversion handling for thinkpads x200 and x200s but since
|
https://github.com/evgeni/tp_smapi
|
||||||
this patch *does not* come from upstream its not applied by default
|
|
||||||
so use it at your own risk. Edit the SlackBuild to apply it.
|
|
||||||
|
|
||||||
* It's highly recommended to read the following links:
|
* It's highly recommended to read the following links:
|
||||||
http://www.thinkwiki.org/wiki/Tp_smapi
|
http://www.thinkwiki.org/wiki/Tp_smapi
|
||||||
http://wiki.archlinux.org/index.php/Tp_smapi
|
http://wiki.archlinux.org/index.php/Tp_smapi
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
diff -urN tp_smapi-0.40.orig/thinkpad_ec.c tp_smapi-0.40/thinkpad_ec.c
|
|
||||||
--- tp_smapi-0.40.orig/thinkpad_ec.c 2008-12-16 08:03:06.000000000 +0300
|
|
||||||
+++ tp_smapi-0.40/thinkpad_ec.c 2010-11-22 18:16:54.000000000 +0300
|
|
||||||
@@ -88,7 +88,11 @@
|
|
||||||
#define TPC_PREFETCH_JUNK (INITIAL_JIFFIES+1) /* Ignore prefetch */
|
|
||||||
|
|
||||||
/* Locking: */
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
|
|
||||||
static DECLARE_MUTEX(thinkpad_ec_mutex);
|
|
||||||
+#else
|
|
||||||
+static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Kludge in case the ACPI DSDT reserves the ports we need. */
|
|
||||||
static int force_io; /* Willing to do IO to ports we couldn't reserve? */
|
|
||||||
diff -urN tp_smapi-0.40.orig/tp_smapi.c tp_smapi-0.40/tp_smapi.c
|
|
||||||
--- tp_smapi-0.40.orig/tp_smapi.c 2008-12-16 08:03:06.000000000 +0300
|
|
||||||
+++ tp_smapi-0.40/tp_smapi.c 2010-11-22 18:17:29.000000000 +0300
|
|
||||||
@@ -109,7 +109,11 @@
|
|
||||||
#define SMAPI_PORT2 0x4F /* fixed port, meaning unclear */
|
|
||||||
static unsigned short smapi_port; /* APM control port, normally 0xB2 */
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
|
|
||||||
static DECLARE_MUTEX(smapi_mutex);
|
|
||||||
+#else
|
|
||||||
+static DEFINE_SEMAPHORE(smapi_mutex);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* find_smapi_port - read SMAPI port from NVRAM
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/hdaps.c
|
|
||||||
+++ b/hdaps.c
|
|
||||||
@@ -750,6 +750,8 @@
|
|
||||||
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60s", HDAPS_ORIENT_INVERT_Y),
|
|
||||||
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),
|
|
||||||
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X61", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),
|
|
||||||
+ HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X200", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_XY),
|
|
||||||
+ HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X200s", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_XY),
|
|
||||||
{ .ident = NULL }
|
|
||||||
};
|
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PRGNAM=tp_smapi
|
PRGNAM=tp_smapi
|
||||||
VERSION=0.40
|
VERSION=0.41
|
||||||
BUILD=${BUILD:-4}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
KERNEL=${KERNEL:-"$(uname -r)"}
|
KERNEL=${KERNEL:-"$(uname -r)"}
|
||||||
|
@ -61,7 +61,7 @@ rm -rf $PKG
|
||||||
mkdir -p $TMP $PKG $OUTPUT
|
mkdir -p $TMP $PKG $OUTPUT
|
||||||
cd $TMP
|
cd $TMP
|
||||||
rm -rf $PRGNAM-$VERSION
|
rm -rf $PRGNAM-$VERSION
|
||||||
tar xvf $CWD/$PRGNAM-$VERSION.tgz
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||||
cd $PRGNAM-$VERSION
|
cd $PRGNAM-$VERSION
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
chmod -R u+w,go+r-w,a-s .
|
chmod -R u+w,go+r-w,a-s .
|
||||||
|
@ -71,16 +71,6 @@ find . \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||||
-exec chmod 644 {} \;
|
-exec chmod 644 {} \;
|
||||||
|
|
||||||
# Thanks to debian, gentoo and arch guys for this patches :)
|
|
||||||
# Fix tp_smapi build in kernel version >= 2.6.37
|
|
||||||
# http://sourceforge.net/tracker/index.php?func=detail&aid=3153602&group_id=1212&atid=101212
|
|
||||||
patch -p1 < $CWD/patches/tp_smapi-0.40-2.6.37.patch
|
|
||||||
|
|
||||||
# Adds axis inversion handling for x200 and x200s
|
|
||||||
# https://aur.archlinux.org/packages.php?ID=3985
|
|
||||||
# This patch *does not* come from upstream, so use it at your own risk.
|
|
||||||
# patch -p1 < $CWD/patches/tp_smapi-0.40-x200-x200s-support.patch
|
|
||||||
|
|
||||||
( case "$ARCH" in
|
( case "$ARCH" in
|
||||||
i?86) ARCH=x86 ;;
|
i?86) ARCH=x86 ;;
|
||||||
esac
|
esac
|
||||||
|
@ -101,8 +91,8 @@ install -m 0664 thinkpad_ec.ko tp_smapi.ko \
|
||||||
# We're not going to install these with a .new extension, because we don't
|
# We're not going to install these with a .new extension, because we don't
|
||||||
# want them to be present if the package is removed.
|
# want them to be present if the package is removed.
|
||||||
mkdir -p $PKG/etc/modprobe.d
|
mkdir -p $PKG/etc/modprobe.d
|
||||||
cat $CWD/modprobe.tp_smapi.conf > $PKG/etc/modprobe.d/tp_smapi.conf
|
cat $CWD/modprobe.d/tp_smapi.conf > $PKG/etc/modprobe.d/tp_smapi.conf
|
||||||
cat $CWD/modprobe.thinkpad_ec.conf > $PKG/etc/modprobe.d/thinkpad_ec.conf
|
cat $CWD/modprobe.d/thinkpad_ec.conf > $PKG/etc/modprobe.d/thinkpad_ec.conf
|
||||||
|
|
||||||
# Make hdaps kernel module from this package be prefered over hdaps in kernel-module package.
|
# Make hdaps kernel module from this package be prefered over hdaps in kernel-module package.
|
||||||
mkdir -p $PKG/etc/depmod.d
|
mkdir -p $PKG/etc/depmod.d
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
PRGNAM="tp_smapi"
|
PRGNAM="tp_smapi"
|
||||||
VERSION="0.40"
|
VERSION="0.41"
|
||||||
HOMEPAGE="http://tpctl.sourceforge.net"
|
HOMEPAGE="https://github.com/evgeni/tp_smapi"
|
||||||
DOWNLOAD="http://downloads.sourceforge.net/tpctl/tp_smapi-0.40.tgz"
|
DOWNLOAD="https://github.com/downloads/evgeni/tp_smapi/tp_smapi-0.41.tar.gz"
|
||||||
MD5SUM="f4eb8bb4d4413a5ae65aa7d77f4112c0"
|
MD5SUM="63c683415c764568f6bf17c7eabe4752"
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
MAINTAINER="Antonio Hernández Blas"
|
MAINTAINER="Antonio Hernández Blas"
|
||||||
EMAIL="hba.nihilismus@gmail.com"
|
EMAIL="hba.nihilismus@gmail.com"
|
||||||
APPROVED="rworkman"
|
APPROVED="rworkman,Erik Hanson"
|
||||||
|
|
Loading…
Reference in a new issue