Backport upstream CVS fix to allow lm-sensors-2.9.0 to play nice with 2.4 kernels.
authorTim Yamin <plasmaroo@gentoo.org>
Mon, 3 Jan 2005 21:58:44 +0000 (21:58 +0000)
committerTim Yamin <plasmaroo@gentoo.org>
Mon, 3 Jan 2005 21:58:44 +0000 (21:58 +0000)
sys-apps/i2c/ChangeLog
sys-apps/i2c/files/i2c-2.9.0.fix.patch [new file with mode: 0644]
sys-apps/i2c/i2c-2.9.0.ebuild

index c53bd1a17242e7920a3a7621d11e191fbc17a9bd..ad101a261cc43bef95a606d3add5c9bdb5b76236 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for sys-apps/i2c
 # 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 $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/i2c/ChangeLog,v 1.30 2005/01/03 21:58:44 plasmaroo Exp $
+
+  03 Jan 2005; <plasmaroo@gentoo.org> i2c-2.9.0.ebuild,
+  +files/i2c-2.9.0.fix.patch:
+  Backport upstream CVS fix to allow lm-sensors-2.9.0 to play nice with
+  2.4 kernels.
 
 *i2c-2.9.0 (01 Jan 2005)
 
diff --git a/sys-apps/i2c/files/i2c-2.9.0.fix.patch b/sys-apps/i2c/files/i2c-2.9.0.fix.patch
new file mode 100644 (file)
index 0000000..3cadae7
--- /dev/null
@@ -0,0 +1,60 @@
+--- i2c-2.9.0/kernel/Module.mk 8 Dec 2004 21:03:57
++++ i2c-2.9.0.1/kernel/Module.mk       3 Jan 2005 17:08:11
+@@ -26,17 +26,21 @@
+ # We will only include those modules which are not already built into this
+ # kernel.
+ KERNELTARGETS :=
++KERNELINCLUDES :=
+ ifneq ($(shell if grep -q '^CONFIG_I2C=y' $(LINUX)/.config; then echo 1; fi),1)
+ KERNELTARGETS += $(MODULE_DIR)/i2c-core.o
++KERNELINCLUDES += $(MODULE_DIR)/i2c.h $(MODULE_DIR)/i2c-id.h
+ endif
+ ifneq ($(shell if grep -q '^CONFIG_I2C_CHARDEV=y' $(LINUX)/.config; then echo 1; fi),1)
+ KERNELTARGETS += $(MODULE_DIR)/i2c-dev.o
+ endif
+ ifneq ($(shell if grep -q '^CONFIG_I2C_ALGOBIT=y' $(LINUX)/.config; then echo 1; fi),1)
+ KERNELTARGETS += $(MODULE_DIR)/i2c-algo-bit.o
++KERNELINCLUDES += $(MODULE_DIR)/i2c-algo-bit.h
+ endif
+ ifneq ($(shell if grep -q '^CONFIG_I2C_ALGOBITHS=y' $(LINUX)/.config; then echo 1; fi),1)
+ KERNELTARGETS += $(MODULE_DIR)/i2c-algo-biths.o
++KERNELINCLUDES += $(MODULE_DIR)/i2c-algo-biths.h
+ endif
+ ifneq ($(shell if grep -q '^CONFIG_I2C_PHILIPSPAR=y' $(LINUX)/.config; then echo 1; fi),1)
+ ifeq ($(shell if grep -q '^CONFIG_PARPORT=[my]' $(LINUX)/.config; then echo 1; fi),1)
+@@ -51,13 +55,16 @@
+ endif
+ ifneq ($(shell if grep -q '^CONFIG_I2C_ALGOPCF=y' $(LINUX)/.config; then echo 1; fi),1)
+ KERNELTARGETS += $(MODULE_DIR)/i2c-algo-pcf.o
++KERNELINCLUDES += $(MODULE_DIR)/i2c-algo-pcf.h
+ endif
+ # will not build outside kernel tree 
+ ifneq ($(shell if grep -q '^CONFIG_I2C_ELEKTOR=y' $(LINUX)/.config; then echo 1; fi),1)
+ #KERNELTARGETS += $(MODULE_DIR)/i2c-elektor.o
++#KERNELINCLUDES += $(MODULE_DIR)/i2c-pcf8584.h
+ endif
+ ifneq ($(shell if grep -q '^CONFIG_I2C_PROC=y' $(LINUX)/.config; then echo 1; fi),1)
+ KERNELTARGETS += $(MODULE_DIR)/i2c-proc.o
++KERNELINCLUDES += $(MODULE_DIR)/i2c-proc.h
+ endif
+ ifneq ($(shell if grep -q '^CONFIG_I2C_PPORT=y' $(LINUX)/.config; then echo 1; fi),1)
+ KERNELTARGETS += $(MODULE_DIR)/i2c-pport.o
+@@ -75,6 +82,7 @@
+ #
+ #ifneq ($(shell if grep -q '^CONFIG_I2C_ALGO8XX=y' $(LINUX)/.config; then echo 1; fi),1)
+ #KERNELTARGETS += $(MODULE_DIR)/i2c-algo-8xx.o
++#KERNELINCLUDES += $(MODULE_DIR)/i2c-algo-8xx.h
+ #endif
+ #ifneq ($(shell if grep -q '^CONFIG_I2C_RPXLITE=y' $(LINUX)/.config; then echo 1; fi),1)
+ #KERNELTARGETS += $(MODULE_DIR)/i2c-rpx.o
+@@ -103,6 +111,10 @@
+         done ; \
+         $(RMDIR) $(DESTDIR)$(MODPREF)/misc 2> /dev/null || true ; \
+       fi
++      if [ -n "$(KERNELINCLUDES)" ] ; then \
++        $(MKDIR) $(DESTDIR)$(LINUX_INCLUDE_DIR) ; \
++        $(INSTALL) -m 644 $(KERNELINCLUDES) $(DESTDIR)$(LINUX_INCLUDE_DIR) ; \
++      fi
+ install :: install-kernel
+ 
+ clean-kernel:
index 0b53c02a0d2c2207eeb5dec1107f704a6cf097a0..b633f22580693820897b0faa2957f69b98101853 100644 (file)
@@ -1,6 +1,6 @@
 # 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 $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/i2c/i2c-2.9.0.ebuild,v 1.2 2005/01/03 21:58:44 plasmaroo Exp $
 
 inherit eutils toolchain-funcs
 
@@ -15,6 +15,11 @@ IUSE=""
 
 DEPEND=""
 
+src_unpack () {
+       unpack ${A}
+       epatch ${FILESDIR}/${P}.fix.patch
+}
+
 src_compile ()  {
        if [ "$LINUX" != "" ]; then
                einfo "Cross-compiling using:- $LINUX"