git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] meson: allow customize perl installation path

From
Patrick Steinhardt <ps@pks.im>
Date
Apr 25, 2025, 06:25 UTC
Message-ID
<aAsq4g_ddLZlKpVg@pks.im>
In-Reply-To
<80a2a6ce7c6b05323cf931cdc20d4decb6270002.1745507677.git.congdanhqx@gmail.com>
On Thu, Apr 24, 2025 at 10:16:18PM +0700, Đoàn Trần Công Danh wrote:
Show 12 quoted lines
> 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.

Show 20 quoted lines
>    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
Previous: Đoàn Trần Công DanhNext: Đoàn Trần Công Danh
Message 2 of 4 in “meson: allow customize perl installation path”
  1. meson: allow customize perl installation pathĐoàn Trần Công Danh, Apr 24, 2025
  2. Patrick SteinhardtApr 25, 2025
  3. meson: allow customize perl installation pathĐoàn Trần Công Danh, May 8, 2025
  4. Junio C HamanoMay 8, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.