diff options
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-support/libldb/libldb/ldb-Add-configure-options-for-packages.patch | 177 | ||||
-rw-r--r-- | meta-networking/recipes-support/libldb/libldb_1.1.27.bb | 14 |
2 files changed, 190 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/libldb/libldb/ldb-Add-configure-options-for-packages.patch b/meta-networking/recipes-support/libldb/libldb/ldb-Add-configure-options-for-packages.patch new file mode 100644 index 000000000..93bd4578e --- /dev/null +++ b/meta-networking/recipes-support/libldb/libldb/ldb-Add-configure-options-for-packages.patch | |||
@@ -0,0 +1,177 @@ | |||
1 | From 49dde22e798fd7f39fd59250036c0ae1fe2b9152 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] 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 | 85 ++++++++++++++++++++++++++++-------- | ||
20 | wscript | 7 +++ | ||
21 | 3 files changed, 80 insertions(+), 18 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 145300d..8218fa5 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 | @@ -248,17 +298,18 @@ def configure(conf): | ||
128 | |||
129 | conf.CHECK_FUNCS('prctl dirname basename') | ||
130 | |||
131 | - # libbsd on some platforms provides strlcpy and strlcat | ||
132 | - if not conf.CHECK_FUNCS('strlcpy strlcat'): | ||
133 | - conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | ||
134 | - checklibc=True) | ||
135 | - if not conf.CHECK_FUNCS('getpeereid'): | ||
136 | - conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
137 | - if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): | ||
138 | - conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
139 | - | ||
140 | - if not conf.CHECK_FUNCS('closefrom'): | ||
141 | - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | ||
142 | + if Options.options.enable_libbsd: | ||
143 | + # libbsd on some platforms provides strlcpy and strlcat | ||
144 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): | ||
145 | + conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', | ||
146 | + checklibc=True) | ||
147 | + if not conf.CHECK_FUNCS('getpeereid'): | ||
148 | + conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
149 | + if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): | ||
150 | + conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') | ||
151 | + | ||
152 | + if not conf.CHECK_FUNCS('closefrom'): | ||
153 | + conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') | ||
154 | |||
155 | conf.CHECK_CODE(''' | ||
156 | struct ucred cred; | ||
157 | diff --git a/wscript b/wscript | ||
158 | index 2af8571..059408b 100755 | ||
159 | --- a/wscript | ||
160 | +++ b/wscript | ||
161 | @@ -29,6 +29,13 @@ def set_options(opt): | ||
162 | opt.RECURSE('lib/replace') | ||
163 | opt.tool_options('python') # options for disabling pyc or pyo compilation | ||
164 | |||
165 | + opt.add_option('--with-valgrind', | ||
166 | + help=("enable use of valgrind"), | ||
167 | + action="store_true", dest='enable_valgrind') | ||
168 | + opt.add_option('--without-valgrind', | ||
169 | + help=("disable use of valgrind"), | ||
170 | + action="store_false", dest='enable_valgrind', default=False) | ||
171 | + | ||
172 | def configure(conf): | ||
173 | conf.RECURSE('lib/tdb') | ||
174 | conf.RECURSE('lib/tevent') | ||
175 | -- | ||
176 | 2.8.3 | ||
177 | |||
diff --git a/meta-networking/recipes-support/libldb/libldb_1.1.27.bb b/meta-networking/recipes-support/libldb/libldb_1.1.27.bb index 7b6e6e3c6..f4370efcd 100644 --- a/meta-networking/recipes-support/libldb/libldb_1.1.27.bb +++ b/meta-networking/recipes-support/libldb/libldb_1.1.27.bb | |||
@@ -3,14 +3,26 @@ HOMEPAGE = "http://ldb.samba.org" | |||
3 | SECTION = "libs" | 3 | SECTION = "libs" |
4 | LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+" | 4 | LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+" |
5 | 5 | ||
6 | DEPENDS += "libaio libbsd libtdb libtalloc libtevent popt" | 6 | DEPENDS += "libtdb libtalloc libtevent popt" |
7 | RDEPENDS_pyldb += "python" | 7 | RDEPENDS_pyldb += "python" |
8 | 8 | ||
9 | SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \ | 9 | SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \ |
10 | file://do-not-import-target-module-while-cross-compile.patch \ | 10 | file://do-not-import-target-module-while-cross-compile.patch \ |
11 | file://ldb-Add-configure-options-for-packages.patch \ | ||
11 | " | 12 | " |
12 | 13 | ||
14 | PACKAGECONFIG ??= "\ | ||
15 | ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ | ||
16 | ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ | ||
17 | " | ||
18 | PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" | ||
19 | PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" | ||
13 | PACKAGECONFIG[ldap] = ",,openldap" | 20 | PACKAGECONFIG[ldap] = ",,openldap" |
21 | PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio" | ||
22 | PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd" | ||
23 | PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" | ||
24 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" | ||
25 | |||
14 | SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}" | 26 | SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}" |
15 | 27 | ||
16 | LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \ | 28 | LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \ |