Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 109234
Collapse All | Expand All

(-)usr/portage/net-wireless/ndiswrapper/files/ndiswrapper-1.2-fix-makefile-kobj.patch (+70 lines)
Line 0 Link Here
1
Index: ndiswrapper-1.2/driver/Makefile
2
===================================================================
3
--- ndiswrapper-1.2.orig/driver/Makefile
4
+++ ndiswrapper-1.2/driver/Makefile
5
@@ -8,6 +8,10 @@ DISTFILES=divdi3.c hal.c iw_ndis.c iw_nd
6
 
7
 KVERS ?= $(shell uname -r)
8
 KSRC  ?= /lib/modules/$(KVERS)/build
9
+#Try to guess
10
+KOBJ  ?= $(KBUILD_OUTPUT)
11
+#Fallback
12
+KOBJ  ?= $(KSRC)
13
 
14
 KPSUB := $(shell echo $(KVERS) |  sed -e 's/\([^\.]*\)\.\([^\.]*\)\..*/\1\2/')
15
 
16
@@ -16,11 +20,11 @@ INST_DIR := $(DESTDIR)/lib/modules/$(KVE
17
 
18
 SRC_DIR=$(shell pwd)
19
 
20
--include $(KSRC)/.config
21
+-include $(KOBJ)/.config
22
 
23
-CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \
24
+CFLAGS += $(shell [ -f $(KOBJ)/include/linux/modversions.h ] && \
25
 		  echo -DEXPORT_SYMTAB -DMODVERSIONS \
26
-		  -include $(KSRC)/include/linux/modversions.h)
27
+		  -include $(KOBJ)/include/linux/modversions.h)
28
 
29
 ifdef DEBUG
30
 CFLAGS += -DDEBUG=$(DEBUG) -g -DDEBUG_TIMER 
31
@@ -152,10 +156,11 @@ gen_exports: ndis_exports.h hal_exports.
32
 			 misc_funcs_exports.h usb_exports.h wrapper_exports.h
33
 
34
 prereq_check:
35
-	@ if [ ! -f $(KSRC)/include/linux/version.h ]; then \
36
-		echo "Can't find kernel sources in $(KSRC);"; \
37
+	@ if [ ! -f $(KOBJ)/include/linux/version.h ]; then \
38
+		echo "Can't find compiled kernel sources in $(KOBJ);"; \
39
 		echo "  give the path to kernel sources with KSRC=<path>\
40
-		       argument to make";\
41
+		       argument to make. " \
42
+		echo "If using KBUILD_OUTPUT, pass the used value in environment"; \
43
 		exit 1;\
44
 	  fi
45
 
46
@@ -184,8 +189,12 @@ obj-m := ndiswrapper.o 
47
 
48
 ndiswrapper-objs := $(OBJS)
49
 
50
+KBUILD_OUT_OPT=
51
+ifneq ($(KOBJ),)
52
+KBUILD_OUT_OPT="O=$(KOBJ)"
53
+endif
54
 default:
55
-	$(MAKE) -C $(KSRC) SUBDIRS=$(SRC_DIR) \
56
+	$(MAKE) $(KBUILD_OUT_OPT) -C $(KSRC) SUBDIRS=$(SRC_DIR) \
57
 		NDISWRAPPER_VERSION=$(NDISWRAPPER_VERSION) \
58
 		EXTRA_VERSION=$(EXTRA_VERSION) modules
59
 
60
@@ -193,8 +202,8 @@ endif
61
 
62
 stack_check:
63
 	  @ if [ "x$(CONFIG_X86_64)" = "x" -a $(KPSUB) -eq 26 ]; then \
64
-		   if grep -q CONFIG_4KSTACKS $(KSRC)/.config; then \
65
-			  if grep -q "CONFIG_4KSTACKS=y" $(KSRC)/.config; then \
66
+		   if grep -q CONFIG_4KSTACKS $(KOBJ)/.config; then \
67
+			  if grep -q "CONFIG_4KSTACKS=y" $(KOBJ)/.config; then \
68
 				echo; echo; \
69
 			  	echo "*** WARNING: "\
70
 					 "Kernel is compiled with 4K stack size option"\
(-)usr/portage/net-wireless/ndiswrapper/ndiswrapper-1.2.ebuild (+1 lines)
Lines 28-33 src_unpack() { Link Here
28
28
29
	cd ${S}
29
	cd ${S}
30
	epatch ${FILESDIR}/${P}-suspend2.patch || die "suspend2 patch failed"
30
	epatch ${FILESDIR}/${P}-suspend2.patch || die "suspend2 patch failed"
31
	epatch ${FILESDIR}/${P}-fix-makefile-kobj.patch || die "kbuild output patch failed"
31
32
32
	einfo "The only kernels that will work are gentoo-sources, vanilla-sources, and suspend2-sources."
33
	einfo "The only kernels that will work are gentoo-sources, vanilla-sources, and suspend2-sources."
33
	einfo "No other kernels are supported. Kernels like the mm kernels will NOT work."
34
	einfo "No other kernels are supported. Kernels like the mm kernels will NOT work."
(-)usr/portage/net-wireless/ndiswrapper/Manifest (-11 / +2 lines)
Lines 1-15 Link Here
1
-----BEGIN PGP SIGNED MESSAGE-----
1
MD5 2f23f7a03663f91b912ee253c14ebbf5 ndiswrapper-1.2.ebuild 2617
2
Hash: SHA1
3
4
MD5 8da029b75194bf52d7bda5550cb43a60 ChangeLog 6414
2
MD5 8da029b75194bf52d7bda5550cb43a60 ChangeLog 6414
5
MD5 82add84ad0d2f8b69058e245396e3e89 metadata.xml 507
3
MD5 82add84ad0d2f8b69058e245396e3e89 metadata.xml 507
6
MD5 cac3ca22dc7de36f7b39637624d8a8c8 ndiswrapper-1.2.ebuild 2532
7
MD5 fd2f66ff609bafcd303be1db969e9185 files/digest-ndiswrapper-1.2 67
4
MD5 fd2f66ff609bafcd303be1db969e9185 files/digest-ndiswrapper-1.2 67
5
MD5 9385e7c4f999a2a7927fc3b13f0dd4a0 files/ndiswrapper-1.2-fix-makefile-kobj.patch 2321
8
MD5 9cf5a13dc78b9840d419f0656d1dd920 files/ndiswrapper-1.2-suspend2.patch 553
6
MD5 9cf5a13dc78b9840d419f0656d1dd920 files/ndiswrapper-1.2-suspend2.patch 553
9
-----BEGIN PGP SIGNATURE-----
10
Version: GnuPG v1.4.2 (GNU/Linux)
11
12
iD8DBQFDDrKnBtvusYtCZMsRAqN5AJ47kJJgszSS3RzPKRbMsA99WLcEQwCePtPr
13
7osL1KU0aoUJy0pRggq0kEw=
14
=X/hC
15
-----END PGP SIGNATURE-----

Return to bug 109234