diff options
Diffstat (limited to 'meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch')
-rw-r--r-- | meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch | 180 |
1 files changed, 180 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch b/meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch new file mode 100644 index 000000000..35f8eaf7d --- /dev/null +++ b/meta-networking/recipes-support/libtalloc/libtalloc/options-2.1.10.patch | |||
@@ -0,0 +1,180 @@ | |||
1 | From efc1b02144f23fdf84dbc5ff15307815e0f2a425 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Wed, 14 Sep 2016 11:11:35 +0800 | ||
4 | Subject: [PATCH] talloc: Add configure options for packages | ||
5 | |||
6 | Add configure options for the following packages: | ||
7 | - acl | ||
8 | - attr | ||
9 | - libaio | ||
10 | - libbsd | ||
11 | - libcap | ||
12 | - valgrind | ||
13 | |||
14 | Upstream-Status: Inappropriate [oe deterministic build specific] | ||
15 | |||
16 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
17 | |||
18 | Modified to apply to version 2.1.10. | ||
19 | |||
20 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
21 | |||
22 | --- | ||
23 | lib/replace/system/wscript_configure | 6 ++- | ||
24 | lib/replace/wscript | 85 ++++++++++++++++++++++++++++-------- | ||
25 | wscript | 7 ++- | ||
26 | 3 files changed, 79 insertions(+), 19 deletions(-) | ||
27 | |||
28 | diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure | ||
29 | index 2035474..10f9ae7 100644 | ||
30 | --- a/lib/replace/system/wscript_configure | ||
31 | +++ b/lib/replace/system/wscript_configure | ||
32 | @@ -1,6 +1,10 @@ | ||
33 | #!/usr/bin/env python | ||
34 | |||
35 | -conf.CHECK_HEADERS('sys/capability.h') | ||
36 | +import Options | ||
37 | + | ||
38 | +if Options.options.enable_libcap: | ||
39 | + conf.CHECK_HEADERS('sys/capability.h') | ||
40 | + | ||
41 | conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r') | ||
42 | |||
43 | # solaris varients of getXXent_r | ||
44 | diff --git a/lib/replace/wscript b/lib/replace/wscript | ||
45 | index fc43e1a..12d2a70 100644 | ||
46 | --- a/lib/replace/wscript | ||
47 | +++ b/lib/replace/wscript | ||
48 | @@ -23,6 +23,41 @@ def set_options(opt): | ||
49 | opt.PRIVATE_EXTENSION_DEFAULT('') | ||
50 | opt.RECURSE('buildtools/wafsamba') | ||
51 | |||
52 | + opt.add_option('--with-acl', | ||
53 | + help=("Enable use of acl"), | ||
54 | + action="store_true", dest='enable_acl') | ||
55 | + opt.add_option('--without-acl', | ||
56 | + help=("Disable use of acl"), | ||
57 | + action="store_false", dest='enable_acl', default=False) | ||
58 | + | ||
59 | + opt.add_option('--with-attr', | ||
60 | + help=("Enable use of attr"), | ||
61 | + action="store_true", dest='enable_attr') | ||
62 | + opt.add_option('--without-attr', | ||
63 | + help=("Disable use of attr"), | ||
64 | + action="store_false", dest='enable_attr', default=False) | ||
65 | + | ||
66 | + opt.add_option('--with-libaio', | ||
67 | + help=("Enable use of libaio"), | ||
68 | + action="store_true", dest='enable_libaio') | ||
69 | + opt.add_option('--without-libaio', | ||
70 | + help=("Disable use of libaio"), | ||
71 | + action="store_false", dest='enable_libaio', default=False) | ||
72 | + | ||
73 | + opt.add_option('--with-libbsd', | ||
74 | + help=("Enable use of libbsd"), | ||
75 | + action="store_true", dest='enable_libbsd') | ||
76 | + opt.add_option('--without-libbsd', | ||
77 | + help=("Disable use of libbsd"), | ||
78 | + action="store_false", dest='enable_libbsd', default=False) | ||
79 | + | ||
80 | + opt.add_option('--with-libcap', | ||
81 | + help=("Enable use of libcap"), | ||
82 | + action="store_true", dest='enable_libcap') | ||
83 | + opt.add_option('--without-libcap', | ||
84 | + help=("Disable use of libcap"), | ||
85 | + action="store_false", dest='enable_libcap', default=False) | ||
86 | + | ||
87 | @Utils.run_once | ||
88 | def configure(conf): | ||
89 | conf.RECURSE('buildtools/wafsamba') | ||
90 | @@ -32,12 +67,25 @@ def configure(conf): | ||
91 | conf.DEFINE('HAVE_LIBREPLACE', 1) | ||
92 | conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) | ||
93 | |||
94 | - conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h') | ||
95 | - conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h') | ||
96 | + conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h') | ||
97 | + conf.CHECK_HEADERS('compat.h ctype.h dustat.h') | ||
98 | conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h') | ||
99 | - conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h') | ||
100 | - conf.CHECK_HEADERS('shadow.h sys/acl.h') | ||
101 | - conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h') | ||
102 | + conf.CHECK_HEADERS('locale.h ndir.h pwd.h') | ||
103 | + conf.CHECK_HEADERS('shadow.h') | ||
104 | + conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h') | ||
105 | + | ||
106 | + if Options.options.enable_acl: | ||
107 | + conf.CHECK_HEADERS('acl/libacl.h sys/acl.h') | ||
108 | + | ||
109 | + if Options.options.enable_attr: | ||
110 | + conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h') | ||
111 | + | ||
112 | + if Options.options.enable_libaio: | ||
113 | + conf.CHECK_HEADERS('libaio.h') | ||
114 | + | ||
115 | + if Options.options.enable_libcap: | ||
116 | + conf.CHECK_HEADERS('sys/capability.h') | ||
117 | + | ||
118 | conf.CHECK_HEADERS('port.h') | ||
119 | conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h') | ||
120 | conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h') | ||
121 | @@ -73,7 +121,9 @@ def configure(conf): | ||
122 | |||
123 | conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H') | ||
124 | |||
125 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | ||
126 | + if Options.options.enable_valgrind: | ||
127 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | ||
128 | + | ||
129 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') | ||
130 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') | ||
131 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') | ||
132 | @@ -248,17 +298,18 @@ def configure(conf): | ||
133 | |||
134 | conf.CHECK_FUNCS('prctl dirname basename') | ||
135 | |||
136 | - # libbsd on some platforms provides strlcpy and strlcat | ||
137 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): | ||
138 | - conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | ||
139 | - checklibc=True) | ||
140 | - if not conf.CHECK_FUNCS('getpeereid'): | ||
141 | - conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
142 | - if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): | ||
143 | - conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
144 | - | ||
145 | - if not conf.CHECK_FUNCS('closefrom'): | ||
146 | - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | ||
147 | + if Options.options.enable_libbsd: | ||
148 | + # libbsd on some platforms provides strlcpy and strlcat | ||
149 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): | ||
150 | + conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | ||
151 | + checklibc=True) | ||
152 | + if not conf.CHECK_FUNCS('getpeereid'): | ||
153 | + conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
154 | + if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): | ||
155 | + conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
156 | + | ||
157 | + if not conf.CHECK_FUNCS('closefrom'): | ||
158 | + conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | ||
159 | |||
160 | conf.CHECK_CODE(''' | ||
161 | struct ucred cred; | ||
162 | --- a/wscript | ||
163 | +++ b/wscript | ||
164 | @@ -32,7 +32,12 @@ def set_options(opt): | ||
165 | opt.add_option('--enable-talloc-compat1', | ||
166 | help=("Build talloc 1.x.x compat library [False]"), | ||
167 | action="store_true", dest='TALLOC_COMPAT1', default=False) | ||
168 | - | ||
169 | + opt.add_option('--with-valgrind', | ||
170 | + help=("enable use of valgrind"), | ||
171 | + action="store_true", dest='enable_valgrind') | ||
172 | + opt.add_option('--without-valgrind', | ||
173 | + help=("disable use of valgrind"), | ||
174 | + action="store_false", dest='enable_valgrind', default=False) | ||
175 | |||
176 | def configure(conf): | ||
177 | conf.RECURSE('lib/replace') | ||
178 | -- | ||
179 | 2.8.3 | ||
180 | |||