diff options
Diffstat (limited to 'meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch')
-rw-r--r-- | meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch | 193 |
1 files changed, 193 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch b/meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch new file mode 100644 index 000000000..ffe253b63 --- /dev/null +++ b/meta-networking/recipes-support/libldb/libldb/options-1.3.1.patch | |||
@@ -0,0 +1,193 @@ | |||
1 | From a4da3ab4d76013aaa731d43d52ccca1ebd37c395 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Wed, 21 Sep 2016 10:06:39 +0800 | ||
4 | Subject: [PATCH 1/1] ldb: 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 | lib/replace/system/wscript_configure | 6 ++- | ||
19 | lib/replace/wscript | 94 +++++++++++++++++++++++++++--------- | ||
20 | wscript | 7 +++ | ||
21 | 3 files changed, 83 insertions(+), 24 deletions(-) | ||
22 | |||
23 | diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure | ||
24 | index 2035474..10f9ae7 100644 | ||
25 | --- a/lib/replace/system/wscript_configure | ||
26 | +++ b/lib/replace/system/wscript_configure | ||
27 | @@ -1,6 +1,10 @@ | ||
28 | #!/usr/bin/env python | ||
29 | |||
30 | -conf.CHECK_HEADERS('sys/capability.h') | ||
31 | +import Options | ||
32 | + | ||
33 | +if Options.options.enable_libcap: | ||
34 | + conf.CHECK_HEADERS('sys/capability.h') | ||
35 | + | ||
36 | conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r') | ||
37 | |||
38 | # solaris varients of getXXent_r | ||
39 | diff --git a/lib/replace/wscript b/lib/replace/wscript | ||
40 | index 2f94d49..68b2d3a 100644 | ||
41 | --- a/lib/replace/wscript | ||
42 | +++ b/lib/replace/wscript | ||
43 | @@ -23,6 +23,41 @@ def set_options(opt): | ||
44 | opt.PRIVATE_EXTENSION_DEFAULT('') | ||
45 | opt.RECURSE('buildtools/wafsamba') | ||
46 | |||
47 | + opt.add_option('--with-acl', | ||
48 | + help=("Enable use of acl"), | ||
49 | + action="store_true", dest='enable_acl') | ||
50 | + opt.add_option('--without-acl', | ||
51 | + help=("Disable use of acl"), | ||
52 | + action="store_false", dest='enable_acl', default=False) | ||
53 | + | ||
54 | + opt.add_option('--with-attr', | ||
55 | + help=("Enable use of attr"), | ||
56 | + action="store_true", dest='enable_attr') | ||
57 | + opt.add_option('--without-attr', | ||
58 | + help=("Disable use of attr"), | ||
59 | + action="store_false", dest='enable_attr', default=False) | ||
60 | + | ||
61 | + opt.add_option('--with-libaio', | ||
62 | + help=("Enable use of libaio"), | ||
63 | + action="store_true", dest='enable_libaio') | ||
64 | + opt.add_option('--without-libaio', | ||
65 | + help=("Disable use of libaio"), | ||
66 | + action="store_false", dest='enable_libaio', default=False) | ||
67 | + | ||
68 | + opt.add_option('--with-libbsd', | ||
69 | + help=("Enable use of libbsd"), | ||
70 | + action="store_true", dest='enable_libbsd') | ||
71 | + opt.add_option('--without-libbsd', | ||
72 | + help=("Disable use of libbsd"), | ||
73 | + action="store_false", dest='enable_libbsd', default=False) | ||
74 | + | ||
75 | + opt.add_option('--with-libcap', | ||
76 | + help=("Enable use of libcap"), | ||
77 | + action="store_true", dest='enable_libcap') | ||
78 | + opt.add_option('--without-libcap', | ||
79 | + help=("Disable use of libcap"), | ||
80 | + action="store_false", dest='enable_libcap', default=False) | ||
81 | + | ||
82 | @Utils.run_once | ||
83 | def configure(conf): | ||
84 | conf.RECURSE('buildtools/wafsamba') | ||
85 | @@ -32,12 +67,25 @@ def configure(conf): | ||
86 | conf.DEFINE('HAVE_LIBREPLACE', 1) | ||
87 | conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) | ||
88 | |||
89 | - conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h') | ||
90 | - conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h') | ||
91 | + conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h') | ||
92 | + conf.CHECK_HEADERS('compat.h ctype.h dustat.h') | ||
93 | conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h') | ||
94 | - conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h') | ||
95 | - conf.CHECK_HEADERS('shadow.h sys/acl.h') | ||
96 | - conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h') | ||
97 | + conf.CHECK_HEADERS('locale.h ndir.h pwd.h') | ||
98 | + conf.CHECK_HEADERS('shadow.h') | ||
99 | + conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h') | ||
100 | + | ||
101 | + if Options.options.enable_acl: | ||
102 | + conf.CHECK_HEADERS('acl/libacl.h sys/acl.h') | ||
103 | + | ||
104 | + if Options.options.enable_attr: | ||
105 | + conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h') | ||
106 | + | ||
107 | + if Options.options.enable_libaio: | ||
108 | + conf.CHECK_HEADERS('libaio.h') | ||
109 | + | ||
110 | + if Options.options.enable_libcap: | ||
111 | + conf.CHECK_HEADERS('sys/capability.h') | ||
112 | + | ||
113 | conf.CHECK_HEADERS('port.h') | ||
114 | conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h') | ||
115 | conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h') | ||
116 | @@ -73,7 +121,9 @@ def configure(conf): | ||
117 | |||
118 | conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H') | ||
119 | |||
120 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | ||
121 | + if Options.options.enable_valgrind: | ||
122 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | ||
123 | + | ||
124 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') | ||
125 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') | ||
126 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') | ||
127 | @@ -266,22 +316,20 @@ def configure(conf): | ||
128 | |||
129 | conf.CHECK_FUNCS('prctl dirname basename') | ||
130 | |||
131 | - strlcpy_in_bsd = False | ||
132 | - | ||
133 | - # libbsd on some platforms provides strlcpy and strlcat | ||
134 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): | ||
135 | - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | ||
136 | - checklibc=True): | ||
137 | - strlcpy_in_bsd = True | ||
138 | - if not conf.CHECK_FUNCS('getpeereid'): | ||
139 | - conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
140 | - if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): | ||
141 | - conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
142 | - if not conf.CHECK_FUNCS('setproctitle_init'): | ||
143 | - conf.CHECK_FUNCS_IN('setproctitle_init', '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 | + if not conf.CHECK_FUNCS('setproctitle_init'): | ||
157 | + conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
158 | + | ||
159 | + if not conf.CHECK_FUNCS('closefrom'): | ||
160 | + conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | ||
161 | |||
162 | conf.CHECK_CODE(''' | ||
163 | struct ucred cred; | ||
164 | @@ -632,7 +680,7 @@ removeea setea | ||
165 | # look for a method of finding the list of network interfaces | ||
166 | for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']: | ||
167 | bsd_for_strlcpy = '' | ||
168 | - if strlcpy_in_bsd: | ||
169 | + if Options.options.enable_libbsd: | ||
170 | bsd_for_strlcpy = ' bsd' | ||
171 | if conf.CHECK_CODE(''' | ||
172 | #define %s 1 | ||
173 | diff --git a/wscript b/wscript | ||
174 | index 8ae5be3..a178cc4 100644 | ||
175 | --- a/wscript | ||
176 | +++ b/wscript | ||
177 | @@ -31,6 +31,13 @@ def set_options(opt): | ||
178 | opt.RECURSE('lib/replace') | ||
179 | opt.tool_options('python') # options for disabling pyc or pyo compilation | ||
180 | |||
181 | + opt.add_option('--with-valgrind', | ||
182 | + help=("enable use of valgrind"), | ||
183 | + action="store_true", dest='enable_valgrind') | ||
184 | + opt.add_option('--without-valgrind', | ||
185 | + help=("disable use of valgrind"), | ||
186 | + action="store_false", dest='enable_valgrind', default=False) | ||
187 | + | ||
188 | def configure(conf): | ||
189 | conf.RECURSE('lib/tdb') | ||
190 | conf.RECURSE('lib/tevent') | ||
191 | -- | ||
192 | 2.16.2 | ||
193 | |||