|
|
6729ff |
From 1124387625c3e24a4e8a100d2db83dec502bfa13 Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Tue, 25 Feb 2014 16:04:24 +0100
|
|
|
6729ff |
Subject: [PATCH 1/3] pidl: Install pidl files corrently.
|
|
|
6729ff |
|
|
|
6729ff |
Globbing is a really bad idea in installtion system. One of them is if
|
|
|
6729ff |
you use patch -b to create a backup, you will end up installing the
|
|
|
6729ff |
backup file too!
|
|
|
6729ff |
|
|
|
6729ff |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Kai Blin <kai@samba.org>
|
|
|
6729ff |
(cherry picked from commit cee11cfa4544425099268cd32393169afb4bb107)
|
|
|
6729ff |
---
|
|
|
6729ff |
pidl/lib/wscript_build | 31 ++++++++++++++++++++++++++++++-
|
|
|
6729ff |
pidl/wscript | 3 ---
|
|
|
6729ff |
2 files changed, 30 insertions(+), 4 deletions(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build
|
|
|
6729ff |
index eb5f1e0..9bddf3f 100644
|
|
|
6729ff |
--- a/pidl/lib/wscript_build
|
|
|
6729ff |
+++ b/pidl/lib/wscript_build
|
|
|
6729ff |
@@ -1,4 +1,33 @@
|
|
|
6729ff |
#!/usr/bin/env python
|
|
|
6729ff |
|
|
|
6729ff |
# install the pidl modules
|
|
|
6729ff |
-bld.INSTALL_WILDCARD('${DATAROOTDIR}/perl5', '**/*.pm', flat=False)
|
|
|
6729ff |
+bld.INSTALL_FILES('${DATAROOTDIR}/perl5',
|
|
|
6729ff |
+ '''
|
|
|
6729ff |
+ Parse/Pidl.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4.pm
|
|
|
6729ff |
+ Parse/Pidl/CUtil.pm
|
|
|
6729ff |
+ Parse/Pidl/Expr.pm
|
|
|
6729ff |
+ Parse/Pidl/Wireshark/Conformance.pm
|
|
|
6729ff |
+ Parse/Pidl/Wireshark/NDR.pm
|
|
|
6729ff |
+ Parse/Pidl/ODL.pm
|
|
|
6729ff |
+ Parse/Pidl/Dump.pm
|
|
|
6729ff |
+ Parse/Pidl/Util.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4/Header.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4/COM/Header.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4/COM/Proxy.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4/COM/Stub.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4/TDR.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4/NDR/Server.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4/NDR/Client.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4/NDR/Parser.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4/Python.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba4/Template.pm
|
|
|
6729ff |
+ Parse/Pidl/IDL.pm
|
|
|
6729ff |
+ Parse/Pidl/Typelist.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba3/ClientNDR.pm
|
|
|
6729ff |
+ Parse/Pidl/Samba3/ServerNDR.pm
|
|
|
6729ff |
+ Parse/Pidl/Compat.pm
|
|
|
6729ff |
+ Parse/Pidl/NDR.pm
|
|
|
6729ff |
+ Parse/Yapp/Driver.pm
|
|
|
6729ff |
+ ''',
|
|
|
6729ff |
+ flat=False)
|
|
|
6729ff |
diff --git a/pidl/wscript b/pidl/wscript
|
|
|
6729ff |
index 7a25734..05d9982 100644
|
|
|
6729ff |
--- a/pidl/wscript
|
|
|
6729ff |
+++ b/pidl/wscript
|
|
|
6729ff |
@@ -26,9 +26,6 @@ def build(bld):
|
|
|
6729ff |
if not bld.CONFIG_SET('HAVE_PERL_MAKEMAKER'):
|
|
|
6729ff |
return
|
|
|
6729ff |
|
|
|
6729ff |
- pidl_src = ['pidl']
|
|
|
6729ff |
- pidl_src.extend(bld.path.ant_glob('lib/**/*.pm').split())
|
|
|
6729ff |
-
|
|
|
6729ff |
pidl_manpages = {
|
|
|
6729ff |
'pidl': 'man1/pidl.${PERLMAN1EXT}',
|
|
|
6729ff |
'lib/Parse/Pidl/NDR.pm': 'man3/Parse::Pidl::NDR.${PERLMAN3EXT}',
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.5.2
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
From b929788024a2d051f0ef5d94b566346147151062 Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Tue, 25 Feb 2014 17:16:37 +0100
|
|
|
6729ff |
Subject: [PATCH 2/3] waf: Add option to specify perl vendor dir.
|
|
|
6729ff |
|
|
|
6729ff |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Kai Blin <kai@samba.org>
|
|
|
6729ff |
|
|
|
6729ff |
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
|
|
|
6729ff |
Autobuild-Date(master): Thu Feb 27 11:48:54 CET 2014 on sn-devel-104
|
|
|
6729ff |
|
|
|
6729ff |
(cherry picked from commit 9b200555fec2e33da9521db388d1839375aa8d83)
|
|
|
6729ff |
---
|
|
|
6729ff |
buildtools/wafadmin/Tools/perl.py | 7 +++++++
|
|
|
6729ff |
pidl/lib/wscript_build | 2 +-
|
|
|
6729ff |
pidl/wscript | 2 ++
|
|
|
6729ff |
3 files changed, 10 insertions(+), 1 deletion(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/buildtools/wafadmin/Tools/perl.py b/buildtools/wafadmin/Tools/perl.py
|
|
|
6729ff |
index a6787a8..90be8d8 100644
|
|
|
6729ff |
--- a/buildtools/wafadmin/Tools/perl.py
|
|
|
6729ff |
+++ b/buildtools/wafadmin/Tools/perl.py
|
|
|
6729ff |
@@ -103,7 +103,14 @@ def check_perl_ext_devel(conf):
|
|
|
6729ff |
else:
|
|
|
6729ff |
conf.env.ARCHDIR_PERL = read_out('print $Config{sitearch}')[0]
|
|
|
6729ff |
|
|
|
6729ff |
+ conf.env.VENDORDIR_PERL = Options.options.perlvendordir
|
|
|
6729ff |
+
|
|
|
6729ff |
def set_options(opt):
|
|
|
6729ff |
opt.add_option("--with-perl-binary", type="string", dest="perlbinary", help = 'Specify alternate perl binary', default=None)
|
|
|
6729ff |
opt.add_option("--with-perl-archdir", type="string", dest="perlarchdir", help = 'Specify directory where to install arch specific files', default=None)
|
|
|
6729ff |
|
|
|
6729ff |
+ opt.add_option("--with-perl-vendordir",
|
|
|
6729ff |
+ type="string",
|
|
|
6729ff |
+ dest="perlvendordir",
|
|
|
6729ff |
+ help="Specify directory where to install perl vendor files",
|
|
|
6729ff |
+ default='${DATAROOTDIR}/perl5/vendor_perl')
|
|
|
6729ff |
diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build
|
|
|
6729ff |
index 9bddf3f..29632d4 100644
|
|
|
6729ff |
--- a/pidl/lib/wscript_build
|
|
|
6729ff |
+++ b/pidl/lib/wscript_build
|
|
|
6729ff |
@@ -1,7 +1,7 @@
|
|
|
6729ff |
#!/usr/bin/env python
|
|
|
6729ff |
|
|
|
6729ff |
# install the pidl modules
|
|
|
6729ff |
-bld.INSTALL_FILES('${DATAROOTDIR}/perl5',
|
|
|
6729ff |
+bld.INSTALL_FILES(bld.env.VENDORDIR_PERL,
|
|
|
6729ff |
'''
|
|
|
6729ff |
Parse/Pidl.pm
|
|
|
6729ff |
Parse/Pidl/Samba4.pm
|
|
|
6729ff |
diff --git a/pidl/wscript b/pidl/wscript
|
|
|
6729ff |
index 05d9982..77abb01 100644
|
|
|
6729ff |
--- a/pidl/wscript
|
|
|
6729ff |
+++ b/pidl/wscript
|
|
|
6729ff |
@@ -8,6 +8,8 @@ def set_options(opt):
|
|
|
6729ff |
|
|
|
6729ff |
def configure(conf):
|
|
|
6729ff |
conf.check_tool('perl')
|
|
|
6729ff |
+ conf.check_perl_ext_devel()
|
|
|
6729ff |
+
|
|
|
6729ff |
# we need a recent version of MakeMaker to get the right man page names
|
|
|
6729ff |
if conf.CHECK_PERL_MANPAGE():
|
|
|
6729ff |
conf.env.PERLMAN1EXT = conf.CHECK_PERL_MANPAGE(section='1')
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.5.2
|
|
|
6729ff |
|
|
|
6729ff |
|
|
|
6729ff |
From bbf583db46d258e9f406b4f4c3d73fe94bf3bfab Mon Sep 17 00:00:00 2001
|
|
|
6729ff |
From: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Date: Thu, 27 Feb 2014 13:14:56 +0100
|
|
|
6729ff |
Subject: [PATCH 3/3] pidl: Make perl(Parse:Yapp:Driver) installation optional.
|
|
|
6729ff |
|
|
|
6729ff |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472
|
|
|
6729ff |
|
|
|
6729ff |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
6729ff |
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
|
|
|
6729ff |
|
|
|
6729ff |
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
|
|
|
6729ff |
Autobuild-Date(master): Thu Feb 27 18:47:03 CET 2014 on sn-devel-104
|
|
|
6729ff |
|
|
|
6729ff |
(cherry picked from commit f0030c619bcf22dbe9eed54b2c0dc9c61f564838)
|
|
|
6729ff |
---
|
|
|
6729ff |
pidl/lib/wscript_build | 6 +++++-
|
|
|
6729ff |
pidl/wscript | 25 ++++++++++++++++++++++++-
|
|
|
6729ff |
2 files changed, 29 insertions(+), 2 deletions(-)
|
|
|
6729ff |
|
|
|
6729ff |
diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build
|
|
|
6729ff |
index 29632d4..09d26eb 100644
|
|
|
6729ff |
--- a/pidl/lib/wscript_build
|
|
|
6729ff |
+++ b/pidl/lib/wscript_build
|
|
|
6729ff |
@@ -28,6 +28,10 @@ bld.INSTALL_FILES(bld.env.VENDORDIR_PERL,
|
|
|
6729ff |
Parse/Pidl/Samba3/ServerNDR.pm
|
|
|
6729ff |
Parse/Pidl/Compat.pm
|
|
|
6729ff |
Parse/Pidl/NDR.pm
|
|
|
6729ff |
- Parse/Yapp/Driver.pm
|
|
|
6729ff |
''',
|
|
|
6729ff |
flat=False)
|
|
|
6729ff |
+
|
|
|
6729ff |
+if not bld.CONFIG_SET('USING_SYSTEM_PARSE_YAPP_DRIVER'):
|
|
|
6729ff |
+ bld.INSTALL_FILES(bld.env.VENDORDIR_PERL,
|
|
|
6729ff |
+ 'Parse/Yapp/Driver.pm',
|
|
|
6729ff |
+ flat=False)
|
|
|
6729ff |
diff --git a/pidl/wscript b/pidl/wscript
|
|
|
6729ff |
index 77abb01..c7b72c4 100644
|
|
|
6729ff |
--- a/pidl/wscript
|
|
|
6729ff |
+++ b/pidl/wscript
|
|
|
6729ff |
@@ -1,6 +1,6 @@
|
|
|
6729ff |
#!/usr/bin/env python
|
|
|
6729ff |
|
|
|
6729ff |
-import os, sys, Logs
|
|
|
6729ff |
+import os, sys, Logs, Options
|
|
|
6729ff |
from samba_utils import MODE_755
|
|
|
6729ff |
|
|
|
6729ff |
def set_options(opt):
|
|
|
6729ff |
@@ -20,6 +20,9 @@ def configure(conf):
|
|
|
6729ff |
conf.find_program('yapp', var='YAPP')
|
|
|
6729ff |
conf.find_program('pod2man', var='POD2MAN')
|
|
|
6729ff |
|
|
|
6729ff |
+ # Check for perl(Parse::Yapp::Driver)
|
|
|
6729ff |
+ check_system_perl_module(conf, "Parse::Yapp::Driver", 1.05)
|
|
|
6729ff |
+
|
|
|
6729ff |
def build(bld):
|
|
|
6729ff |
bld.INSTALL_FILES('${BINDIR}', 'pidl', chmod=MODE_755)
|
|
|
6729ff |
|
|
|
6729ff |
@@ -82,3 +85,23 @@ try this to avoid this message:
|
|
|
6729ff |
$ touch ../pidl/lib/Parse/Pidl/IDL.pm ../pidl/lib/Parse/Pidl/Expr.pm
|
|
|
6729ff |
''')
|
|
|
6729ff |
|
|
|
6729ff |
+def check_system_perl_module(conf, module, version=None):
|
|
|
6729ff |
+ bundle_name = module.replace('::', '_')
|
|
|
6729ff |
+ module_check = module
|
|
|
6729ff |
+ found = False
|
|
|
6729ff |
+
|
|
|
6729ff |
+ # Create module string with version
|
|
|
6729ff |
+ if version:
|
|
|
6729ff |
+ module_check = module + ' ' + str(version)
|
|
|
6729ff |
+
|
|
|
6729ff |
+ # Check if we have to bundle it.
|
|
|
6729ff |
+ if conf.LIB_MUST_BE_BUNDLED(bundle_name.lower()):
|
|
|
6729ff |
+ return False
|
|
|
6729ff |
+
|
|
|
6729ff |
+ # Check for system perl module
|
|
|
6729ff |
+ if not conf.check_perl_module(module_check):
|
|
|
6729ff |
+ return False
|
|
|
6729ff |
+
|
|
|
6729ff |
+ conf.define('USING_SYSTEM_%s' % bundle_name.upper(), 1)
|
|
|
6729ff |
+
|
|
|
6729ff |
+ return True
|
|
|
6729ff |
--
|
|
|
6729ff |
1.8.5.2
|
|
|
6729ff |
|