summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-apps/i2c/ChangeLog9
-rw-r--r--sys-apps/i2c/files/digest-i2c-2.9.01
-rw-r--r--sys-apps/i2c/i2c-2.9.0.ebuild89
3 files changed, 97 insertions, 2 deletions
diff --git a/sys-apps/i2c/ChangeLog b/sys-apps/i2c/ChangeLog
index c342a4cb46d6..c53bd1a17242 100644
--- a/sys-apps/i2c/ChangeLog
+++ b/sys-apps/i2c/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/i2c
-# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/i2c/ChangeLog,v 1.28 2004/12/14 09:16:28 dsd Exp $
+# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/i2c/ChangeLog,v 1.29 2005/01/01 22:12:04 plasmaroo Exp $
+
+*i2c-2.9.0 (01 Jan 2005)
+
+ 01 Jan 2005; <plasmaroo@gentoo.org> +i2c-2.9.0.ebuild:
+ Version bump. Bug #76164.
14 Dec 2004; Daniel Drake <dsd@gentoo.org> i2c-2.8.4.ebuild,
i2c-2.8.7.ebuild, i2c-2.8.8.ebuild:
diff --git a/sys-apps/i2c/files/digest-i2c-2.9.0 b/sys-apps/i2c/files/digest-i2c-2.9.0
new file mode 100644
index 000000000000..7f119e72d5fb
--- /dev/null
+++ b/sys-apps/i2c/files/digest-i2c-2.9.0
@@ -0,0 +1 @@
+MD5 7a70a16ab4e6a612393cce32d92e196e i2c-2.9.0.tar.gz 137761
diff --git a/sys-apps/i2c/i2c-2.9.0.ebuild b/sys-apps/i2c/i2c-2.9.0.ebuild
new file mode 100644
index 000000000000..0b53c02a0d2c
--- /dev/null
+++ b/sys-apps/i2c/i2c-2.9.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/i2c/i2c-2.9.0.ebuild,v 1.1 2005/01/01 22:12:04 plasmaroo Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="I2C Bus support for 2.4.x kernels"
+HOMEPAGE="http://www2.lm-sensors.nu/~lm78/"
+SRC_URI="http://www2.lm-sensors.nu/~lm78/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="${KV}"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND=""
+
+src_compile () {
+ if [ "$LINUX" != "" ]; then
+ einfo "Cross-compiling using:- $LINUX"
+ einfo "Using headers from:- `echo $LINUX/include/linux | sed 's/\/\//\//'`"
+ LINUX=`echo $LINUX | sed 's/build\//build/'`
+ else
+ einfo "You are running:- `uname -r`"
+ check_KV || die "Cannot find kernel in /usr/src/linux"
+ einfo "Using kernel in /usr/src/linux:- ${KV}"
+
+ echo ${KV} | grep -q 2.4.
+ if [ $? == 1 ]; then
+ echo
+ einfo "For 2.5+ series kernels, use the support already in the kernel"
+ einfo "under 'Character devices' -> 'I2C support'."
+ echo
+ einfo "To cross-compile, 'export LINUX=\"/lib/modules/<version>/build\"'"
+ einfo "or symlink /usr/src/linux to another kernel."
+ echo
+ ewarn "Non-2.4 kernel detected; doing nothing..."
+ return
+ else
+ LINUX='/usr/src/linux'
+ fi
+
+ if [ "${KV}" != "`uname -r`" ]; then
+ ewarn "WARNING:- kernels do not match!"
+ fi
+ fi
+
+ echo; einfo "You may safely ignore any errors from compilation"
+ einfo "that contain 'No such file' references."
+ echo '>>> Compiling...'
+
+ emake CC=$(tc-getCC) LINUX=$LINUX clean all
+ if [ $? != 0 ]; then
+ eerror "I2C requires the source of a compatible kernel"
+ eerror "version installed in /usr/src/linux"
+ eerror "(or the environmental variable \$LINUX)"
+ eerror "and kernel I2C *disabled* or *enabled as a module*"
+ die "Error: compilation failed!"
+ fi
+}
+
+src_install() {
+ echo ${KV} | grep -q 2.4.
+ if [ "$?" -eq '0' -o "$LINUX" != '' ]; then
+ emake \
+ CC=$(tc-getCC) \
+ LINUX=$LINUX \
+ LINUX_INCLUDE_DIR=/usr/include/linux \
+ DESTDIR=${D} \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ install || die
+ epause 5 # Show important warnings from the Makefile
+ dodoc CHANGES INSTALL README
+ fi
+}
+
+pkg_postinst() {
+ if echo ${KV} | grep -q 2.4.; then
+ [ -x /usr/sbin/update-modules ] && /usr/sbin/update-modules
+
+ einfo "I2C modules installed ..."
+ echo
+ ewarn "IMPORTANT ... if you are installing this package you need to"
+ ewarn "IMPORTANT ... *disable* kernel I2C support OR *modularize it*"
+ ewarn "IMPORTANT ... if your 2.4.x kernel is patched with such support"
+ echo
+ fi
+}