diff options
-rwxr-xr-x | dh_elpa.in | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -42,6 +42,7 @@ List of files to be installed into I<package> as an elpa package. =cut init(options => { + "elisp-directory=s@" => \$dh{ELISP_DIRECTORIES}, "byte-compile!" => \$dh{BYTECOMPILE}, "fix-autoload-date!" => \$dh{FIXAUTOLOADDATE}, }); @@ -60,6 +61,15 @@ to one that is found by the emacs package system. =over 4 +=item B<--elisp-directory> I<path> + +Pass an extra path (e.g. for a non elpa-* dependency) to byte +compilation. This option may be repeated to specify multiple directories. + +=back + +=over 4 + =item B<--fix-autoload-date>, B<--no--fix-autoload-date> Enable (default) or disable munging the dates in Emacs generated @@ -199,6 +209,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my $helper_version = '@HELPER_VERSION@'; my @extra_args = ( $tempdir ); + my @elisp_dirs = (); + + if (defined $dh{ELISP_DIRECTORIES}) { + foreach my $dir (@{$dh{ELISP_DIRECTORIES}}) { + push @elisp_dirs, '-l', $dir; + } + } if ($dh{FIXAUTOLOADDATE}) { push @extra_args, get_source_date_epoch(); @@ -217,7 +234,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { '--eval',"(add-to-list 'package-directory-list \"$dhelpadir\")", '--eval',"(add-to-list 'package-directory-list \"$elpadir\")", qw{-f package-initialize -l dh-elpa.el}, - qw{-f dhelpa-batch-install-file}, "$tmp/$elpadir", $pkg_file, @extra_args); + qw{-f dhelpa-batch-install-file}, @elisp_dirs, "$tmp/$elpadir", $pkg_file, @extra_args); } else { my $stagedir = "$tempdir/$elpapkg"; File::Path::make_path $stagedir || @@ -234,6 +251,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { '--eval',"(add-to-list 'package-directory-list \"$elpadir\")", qw{-f package-initialize -l dh-elpa.el}, qw{-f dhelpa-batch-install-directory}, + @elisp_dirs, "$tmp/$elpadir", $stagedir, @extra_args); } |