blob: 63f21e775737d803ec6a6635ab30b5cb1591092d [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From efc1b02144f23fdf84dbc5ff15307815e0f2a425 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Wed, 14 Sep 2016 11:11:35 +0800
4Subject: [PATCH] talloc: Add configure options for packages
5
6Add configure options for the following packages:
7 - acl
8 - attr
9 - libaio
10 - libbsd
11 - libcap
12 - valgrind
13
14Upstream-Status: Inappropriate [oe deterministic build specific]
15
16Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
17
18Modified to apply to version 2.1.10.
19
20Signed-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
28Index: talloc-2.1.11/lib/replace/system/wscript_configure
29===================================================================
30--- talloc-2.1.11.orig/lib/replace/system/wscript_configure
31+++ talloc-2.1.11/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
44Index: talloc-2.1.11/lib/replace/wscript
45===================================================================
46--- talloc-2.1.11.orig/lib/replace/wscript
47+++ talloc-2.1.11/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@@ -267,21 +317,21 @@ def configure(conf):
133 conf.CHECK_FUNCS('prctl dirname basename')
134
135 strlcpy_in_bsd = False
136-
137- # libbsd on some platforms provides strlcpy and strlcat
138- if not conf.CHECK_FUNCS('strlcpy strlcat'):
139- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
140+ if Options.options.enable_libbsd:
141+ # libbsd on some platforms provides strlcpy and strlcat
142+ if not conf.CHECK_FUNCS('strlcpy strlcat'):
143+ if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
144 checklibc=True):
145- strlcpy_in_bsd = True
146- if not conf.CHECK_FUNCS('getpeereid'):
147- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
148- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
149- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
150- if not conf.CHECK_FUNCS('setproctitle_init'):
151- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
152+ strlcpy_in_bsd = True
153+ if not conf.CHECK_FUNCS('getpeereid'):
154+ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
155+ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
156+ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
157+ if not conf.CHECK_FUNCS('setproctitle_init'):
158+ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
159
160- if not conf.CHECK_FUNCS('closefrom'):
161- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
162+ if not conf.CHECK_FUNCS('closefrom'):
163+ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
164
165 conf.CHECK_CODE('''
166 struct ucred cred;
167Index: talloc-2.1.11/wscript
168===================================================================
169--- talloc-2.1.11.orig/wscript
170+++ talloc-2.1.11/wscript
171@@ -32,7 +32,12 @@ def set_options(opt):
172 opt.add_option('--enable-talloc-compat1',
173 help=("Build talloc 1.x.x compat library [False]"),
174 action="store_true", dest='TALLOC_COMPAT1', default=False)
175-
176+ opt.add_option('--with-valgrind',
177+ help=("enable use of valgrind"),
178+ action="store_true", dest='enable_valgrind')
179+ opt.add_option('--without-valgrind',
180+ help=("disable use of valgrind"),
181+ action="store_false", dest='enable_valgrind', default=False)
182
183 def configure(conf):
184 conf.RECURSE('lib/replace')