waf: Add option to specify perl vendor dir.
authorAndreas Schneider <asn@samba.org>
Tue, 25 Feb 2014 16:16:37 +0000 (17:16 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 27 Feb 2014 10:48:54 +0000 (11:48 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb 27 11:48:54 CET 2014 on sn-devel-104

buildtools/wafadmin/Tools/perl.py
pidl/lib/wscript_build
pidl/wscript

index a6787a86ecfa86d41593fb01c561e145d6825738..90be8d89aa5fecfe8abb103f62adc46072729de7 100644 (file)
@@ -103,7 +103,14 @@ def check_perl_ext_devel(conf):
        else:
                conf.env.ARCHDIR_PERL = read_out('print $Config{sitearch}')[0]
 
+       conf.env.VENDORDIR_PERL = Options.options.perlvendordir
+
 def set_options(opt):
        opt.add_option("--with-perl-binary", type="string", dest="perlbinary", help = 'Specify alternate perl binary', default=None)
        opt.add_option("--with-perl-archdir", type="string", dest="perlarchdir", help = 'Specify directory where to install arch specific files', default=None)
 
+       opt.add_option("--with-perl-vendordir",
+                      type="string",
+                      dest="perlvendordir",
+                      help="Specify directory where to install perl vendor files",
+                      default='${DATAROOTDIR}/perl5/vendor_perl')
index 9bddf3f39c89097fe0043e4c98c1f9d8fc37d1cb..29632d4d99b8286529703493301c42843a5c4f95 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 # install the pidl modules
-bld.INSTALL_FILES('${DATAROOTDIR}/perl5',
+bld.INSTALL_FILES(bld.env.VENDORDIR_PERL,
                   '''
                   Parse/Pidl.pm
                   Parse/Pidl/Samba4.pm
index 05d9982adfecf44c79f44fd28e26dcb735c6561e..77abb019de9bd5675c37ad1c8d3f969dc51a0b6d 100644 (file)
@@ -8,6 +8,8 @@ def set_options(opt):
 
 def configure(conf):
     conf.check_tool('perl')
+    conf.check_perl_ext_devel()
+
     # we need a recent version of MakeMaker to get the right man page names
     if conf.CHECK_PERL_MANPAGE():
         conf.env.PERLMAN1EXT = conf.CHECK_PERL_MANPAGE(section='1')