meson: allow customize perl installation path

Some distros, notably Fedora, want to install non-core Perl libraries
into specific directory, namely /usr/share/perl5/vendor_perl.

The Makefile build system allows this by overriding perllibdir variable,
let's make meson works on par with our Makefile.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Đoàn Trần Công Danh
2025-05-08 15:24:40 +07:00
committed by Junio C Hamano
parent a2955b34f4
commit 5463c1d4f6
10 changed files with 19 additions and 10 deletions

View File

@@ -3,6 +3,6 @@ test_dependencies += custom_target(
output: 'Address.pm',
command: generate_perl_command,
install: true,
install_dir: get_option('datadir') / 'perl5/FromCPAN/Mail',
install_dir: perllibdir / 'FromCPAN/Mail',
depends: [git_version_file],
)

View File

@@ -3,7 +3,7 @@ test_dependencies += custom_target(
output: 'Error.pm',
command: generate_perl_command,
install: true,
install_dir: get_option('datadir') / 'perl5/FromCPAN',
install_dir: perllibdir / 'FromCPAN',
depends: [git_version_file],
)

View File

@@ -3,6 +3,6 @@ test_dependencies += custom_target(
output: 'Address.pm',
command: generate_perl_command,
install: true,
install_dir: get_option('datadir') / 'perl5/Git/LoadCPAN/Mail',
install_dir: perllibdir / 'Git/LoadCPAN/Mail',
depends: [git_version_file],
)

View File

@@ -3,7 +3,7 @@ test_dependencies += custom_target(
output: 'Error.pm',
command: generate_perl_command,
install: true,
install_dir: get_option('datadir') / 'perl5/Git/LoadCPAN',
install_dir: perllibdir / 'Git/LoadCPAN',
depends: [git_version_file],
)

View File

@@ -3,6 +3,6 @@ test_dependencies += custom_target(
output: 'YAML.pm',
command: generate_perl_command,
install: true,
install_dir: get_option('datadir') / 'perl5/Git/SVN',
install_dir: perllibdir / 'Git/SVN',
depends: [git_version_file],
)

View File

@@ -13,7 +13,7 @@ foreach source : [
output: source,
command: generate_perl_command,
install: true,
install_dir: get_option('datadir') / 'perl5/Git/SVN',
install_dir: perllibdir / 'Git/SVN',
depends: [git_version_file],
)
endforeach

View File

@@ -10,7 +10,7 @@ foreach source : [
output: source,
command: generate_perl_command,
install: true,
install_dir: get_option('datadir') / 'perl5/Git',
install_dir: perllibdir / 'Git',
depends: [git_version_file],
)
endforeach

View File

@@ -3,7 +3,7 @@ test_dependencies += custom_target(
output: 'Git.pm',
command: generate_perl_command,
install: true,
install_dir: get_option('datadir') / 'perl5',
install_dir: perllibdir,
depends: [git_version_file],
)