(app-crypt/gnupg, dev-libs/libgcrypt): Automake 1.14
[portage-overlay.git] / net-fs / samba / files / samba-4.1.14-libsystemd.patch
1 From 0f9b06ade820ce165015526220569db81e00150b Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
3 Date: Sat, 3 Jan 2015 18:59:48 +0100
4 Subject: [PATCH] Support libsystemd, renamed from libsystemd-daemon
5
6 ---
7  lib/util/wscript_build | 2 +-
8  wscript                | 4 ++++
9  2 files changed, 5 insertions(+), 1 deletion(-)
10
11 diff --git a/lib/util/wscript_build b/lib/util/wscript_build
12 index f161f96..6b6b511 100755
13 --- a/lib/util/wscript_build
14 +++ b/lib/util/wscript_build
15 @@ -10,7 +10,7 @@ bld.SAMBA_LIBRARY('samba-util',
16                      server_id.c dprintf.c parmlist.c bitmap.c pidfile.c
17                      tevent_debug.c util_process.c memcache.c''',
18                    deps='DYNCONFIG',
19 -                  public_deps='talloc tevent execinfo uid_wrapper pthread LIBCRYPTO charset util_setid systemd-daemon',
20 +                  public_deps='talloc tevent execinfo uid_wrapper pthread LIBCRYPTO charset util_setid systemd systemd-daemon',
21                    public_headers='debug.h attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h samba_util.h string_wrappers.h',
22                    header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ],
23                    local_include=False,
24 diff --git a/wscript b/wscript
25 index f389f90..3c4fa21 100644
26 --- a/wscript
27 +++ b/wscript
28 @@ -183,9 +183,12 @@ def configure(conf):
29                 conf.env['ENABLE_PIE'] = True
30  
31      if Options.options.enable_systemd != False:
32 +        conf.check_cfg(package='libsystemd', args='--cflags --libs',
33 +                       msg='Checking for libsystemd', uselib_store="SYSTEMD")
34          conf.check_cfg(package='libsystemd-daemon', args='--cflags --libs',
35                         msg='Checking for libsystemd-daemon', uselib_store="SYSTEMD-DAEMON")
36          conf.CHECK_HEADERS('systemd/sd-daemon.h', lib='systemd-daemon')
37 +        conf.CHECK_LIB('systemd', shlib=True)
38          conf.CHECK_LIB('systemd-daemon', shlib=True)
39  
40      if conf.CONFIG_SET('HAVE_SYSTEMD_SD_DAEMON_H'):
41 @@ -193,6 +196,7 @@ def configure(conf):
42          conf.env['ENABLE_SYSTEMD'] = True
43      else:
44          conf.SET_TARGET_TYPE('systemd-daemon', 'EMPTY')
45 +        conf.SET_TARGET_TYPE('systemd', 'EMPTY')
46          conf.undefine('HAVE_SYSTEMD')
47  
48      conf.SAMBA_CONFIG_H('include/config.h')
49 -- 
50 2.2.1
51