On Thu, Apr 24, 2025 at 10:16:18PM +0700, Đoàn Trần Công Danh wrote: > diff --git a/meson.build b/meson.build > index 223384b130b62..830deb9a069a6 100644 > --- a/meson.build > +++ b/meson.build > @@ -1826,14 +1826,19 @@ if perl_features_enabled > perl_header_template = 'perl/header_templates/runtime_prefix.template.pl' > endif > > + perllibdir = get_option('perllibdir') > + if perllibdir == '' > + perllibdir = get_option('datadir') / 'perl5' > + endif Makes sense. We try to do the "right thing" by default, but let the users override the location. > perl_header = configure_file( > input: perl_header_template, > output: 'GIT-PERL-HEADER', > configuration: { > 'GITEXECDIR_REL': get_option('libexecdir') / 'git-core', > - 'PERLLIBDIR_REL': get_option('datadir') / 'perl5', > + 'PERLLIBDIR_REL': perllibdir, > 'LOCALEDIR_REL': get_option('datadir') / 'locale', > - 'INSTLIBDIR': get_option('datadir') / 'perl5', > + 'INSTLIBDIR': perllibdir, > 'PATHSEP': pathsep, > }, > ) > diff --git a/meson_options.txt b/meson_options.txt > index 78d172a74019a..43f3f2d234a8e 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -1,3 +1,8 @@ > +# Configuration for Git installation > + Pedantic nit: let's drop this empty newline, we don't have it for any of the other sections, either. > +option('perllibdir', type: 'string', value: '', > + description: 'Directory to install perl lib to. Default to <datadir>/perl5') s/perl lib/the Perl library/ s/Default/Defaults/ The remainder of this patch looks good to me, thanks! Patrick