1 |
robbat2 13/12/01 19:06:19 |
2 |
|
3 |
Modified: ChangeLog linux-mod.eclass |
4 |
Log: |
5 |
MODULES_OPTIONAL_USE makes it possible to optionally use linux-mod without introducing dependencies on virtual/linux-sources or virtual/modutils where unwanted. |
6 |
|
7 |
Revision Changes Path |
8 |
1.1074 eclass/ChangeLog |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1074&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1074&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1073&r2=1.1074 |
13 |
|
14 |
Index: ChangeLog |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
17 |
retrieving revision 1.1073 |
18 |
retrieving revision 1.1074 |
19 |
diff -p -w -b -B -u -u -r1.1073 -r1.1074 |
20 |
--- ChangeLog 30 Nov 2013 17:57:11 -0000 1.1073 |
21 |
+++ ChangeLog 1 Dec 2013 19:06:19 -0000 1.1074 |
22 |
@@ -1,6 +1,11 @@ |
23 |
# ChangeLog for eclass directory |
24 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1073 2013/11/30 17:57:11 floppym Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1074 2013/12/01 19:06:19 robbat2 Exp $ |
27 |
+ |
28 |
+ 01 Dec 2013; Robin H. Johnson <robbat2@g.o> linux-mod.eclass: |
29 |
+ MODULES_OPTIONAL_USE makes it possible to optionally use linux-mod without |
30 |
+ introducing dependencies on virtual/linux-sources or virtual/modutils where |
31 |
+ unwanted. |
32 |
|
33 |
30 Nov 2013; Mike Gilbert <floppym@g.o> python-r1.eclass, |
34 |
python-single-r1.eclass: |
35 |
|
36 |
|
37 |
|
38 |
1.114 eclass/linux-mod.eclass |
39 |
|
40 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/linux-mod.eclass?rev=1.114&view=markup |
41 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/linux-mod.eclass?rev=1.114&content-type=text/plain |
42 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/linux-mod.eclass?r1=1.113&r2=1.114 |
43 |
|
44 |
Index: linux-mod.eclass |
45 |
=================================================================== |
46 |
RCS file: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v |
47 |
retrieving revision 1.113 |
48 |
retrieving revision 1.114 |
49 |
diff -p -w -b -B -u -u -r1.113 -r1.114 |
50 |
--- linux-mod.eclass 24 Aug 2013 11:07:23 -0000 1.113 |
51 |
+++ linux-mod.eclass 1 Dec 2013 19:06:19 -0000 1.114 |
52 |
@@ -1,6 +1,6 @@ |
53 |
-# Copyright 1999-2012 Gentoo Foundation |
54 |
+# Copyright 1999-2013 Gentoo Foundation |
55 |
# Distributed under the terms of the GNU General Public License v2 |
56 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.113 2013/08/24 11:07:23 ssuominen Exp $ |
57 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.114 2013/12/01 19:06:19 robbat2 Exp $ |
58 |
|
59 |
# @ECLASS: linux-mod.eclass |
60 |
# @MAINTAINER: |
61 |
@@ -18,6 +18,11 @@ |
62 |
# A Couple of env vars are available to effect usage of this eclass |
63 |
# These are as follows: |
64 |
|
65 |
+# @ECLASS-VARIABLE: MODULES_OPTIONAL_USE |
66 |
+# @DESCRIPTION: |
67 |
+# A string containing the USE flag to use for making this eclass optional |
68 |
+# The recommended non-empty value is 'modules' |
69 |
+ |
70 |
# @ECLASS-VARIABLE: KERNEL_DIR |
71 |
# @DESCRIPTION: |
72 |
# A string containing the directory of the target kernel sources. The default value is |
73 |
@@ -127,10 +132,12 @@ EXPORT_FUNCTIONS pkg_setup pkg_preinst p |
74 |
|
75 |
IUSE="kernel_linux" |
76 |
SLOT="0" |
77 |
-RDEPEND="kernel_linux? ( virtual/modutils )" |
78 |
+RDEPEND="${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} kernel_linux? ( virtual/modutils ) ${MODULES_OPTIONAL_USE:+)}" |
79 |
DEPEND="${RDEPEND} |
80 |
+ ${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} |
81 |
sys-apps/sed |
82 |
- kernel_linux? ( virtual/linux-sources )" |
83 |
+ kernel_linux? ( virtual/linux-sources ) |
84 |
+ ${MODULES_OPTIONAL_USE:+)}" |
85 |
|
86 |
# eclass utilities |
87 |
# ---------------------------------- |
88 |
@@ -140,6 +147,7 @@ check_vermagic() { |
89 |
|
90 |
local curr_gcc_ver=$(gcc -dumpversion) |
91 |
local tmpfile old_chost old_gcc_ver result=0 |
92 |
+ [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return |
93 |
|
94 |
tmpfile=`find "${KV_DIR}/" -iname "*.o.cmd" -exec grep usr/lib/gcc {} \; -quit` |
95 |
tmpfile=${tmpfile//*usr/lib} |
96 |
@@ -344,6 +352,7 @@ get-KERNEL_CC() { |
97 |
# At the end the documentation specified with MODULESD_<modulename>_DOCS is installed. |
98 |
generate_modulesd() { |
99 |
debug-print-function ${FUNCNAME} $* |
100 |
+ [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return |
101 |
|
102 |
local currm_path currm currm_t t myIFS myVAR |
103 |
local module_docs module_enabled module_aliases \ |
104 |
@@ -542,6 +551,7 @@ find_module_params() { |
105 |
# in the kernel and sets the object extension KV_OBJ. |
106 |
linux-mod_pkg_setup() { |
107 |
debug-print-function ${FUNCNAME} $* |
108 |
+ [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return |
109 |
|
110 |
local is_bin="${MERGE_TYPE}" |
111 |
|
112 |
@@ -605,6 +615,7 @@ strip_modulenames() { |
113 |
# Look at the description of these variables for more details. |
114 |
linux-mod_src_compile() { |
115 |
debug-print-function ${FUNCNAME} $* |
116 |
+ [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return |
117 |
|
118 |
local modulename libdir srcdir objdir i n myABI="${ABI}" |
119 |
set_arch_to_kernel |
120 |
@@ -670,6 +681,7 @@ linux-mod_src_compile() { |
121 |
# Look at the description of these variables for more details. |
122 |
linux-mod_src_install() { |
123 |
debug-print-function ${FUNCNAME} $* |
124 |
+ [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return |
125 |
|
126 |
local modulename libdir srcdir objdir i n |
127 |
|
128 |
@@ -700,6 +712,7 @@ linux-mod_src_install() { |
129 |
# It checks what to do after having merged the package. |
130 |
linux-mod_pkg_preinst() { |
131 |
debug-print-function ${FUNCNAME} $* |
132 |
+ [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return |
133 |
|
134 |
[ -d "${D}lib/modules" ] && UPDATE_DEPMOD=true || UPDATE_DEPMOD=false |
135 |
[ -d "${D}lib/modules" ] && UPDATE_MODULEDB=true || UPDATE_MODULEDB=false |
136 |
@@ -711,6 +724,7 @@ linux-mod_pkg_preinst() { |
137 |
# database (if ${D}/lib/modules is created)" |
138 |
linux-mod_pkg_postinst() { |
139 |
debug-print-function ${FUNCNAME} $* |
140 |
+ [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return |
141 |
|
142 |
${UPDATE_DEPMOD} && update_depmod; |
143 |
${UPDATE_MODULEDB} && update_moduledb; |
144 |
@@ -722,5 +736,6 @@ linux-mod_pkg_postinst() { |
145 |
# call /sbin/depmod because the modules are still installed. |
146 |
linux-mod_pkg_postrm() { |
147 |
debug-print-function ${FUNCNAME} $* |
148 |
+ [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return |
149 |
remove_moduledb; |
150 |
} |