|
Server : LiteSpeed System : Linux srv104790275 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64 User : dewac4139 ( 1077) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/perl5/Debian/Debhelper/Buildsystem/ |
Upload File : |
# A debhelper build system class for handling ninja based projects.
#
# Copyright: © 2017 Michael Biebl
# License: GPL-2+
package Debian::Debhelper::Buildsystem::ninja;
use strict;
use warnings;
use Debian::Debhelper::Dh_Lib qw(%dh dpkg_architecture_value);
use parent qw(Debian::Debhelper::Buildsystem);
sub DESCRIPTION {
"Ninja (build.ninja)"
}
sub new {
my $class=shift;
my $this=$class->SUPER::new(@_);
$this->{buildcmd} = "ninja";
return $this;
}
sub check_auto_buildable {
my $this=shift;
my ($step) = @_;
if (-e $this->get_buildpath("build.ninja"))
{
# This is always called in the source directory, but generally
# Ninja files are created (or live) in the build directory.
return 1;
}
return 0;
}
sub build {
my $this=shift;
my %options = (
update_env => {
'LC_ALL' => 'C.UTF-8',
}
);
if (!$dh{QUIET}) {
unshift @_, "-v";
}
if ($this->get_parallel() > 0) {
unshift @_, "-j" . $this->get_parallel();
}
$this->doit_in_builddir(\%options, $this->{buildcmd}, @_);
}
sub test {
my $this=shift;
my %options = (
update_env => {
'LC_ALL' => 'C.UTF-8',
}
);
if ($this->get_parallel() > 0) {
$options{update_env}{MESON_TESTTHREADS} = $this->get_parallel();
}
$this->doit_in_builddir(\%options, $this->{buildcmd}, "test", @_);
}
sub install {
my $this=shift;
my $destdir=shift;
my %options = (
update_env => {
'LC_ALL' => 'C.UTF-8',
'DESTDIR' => $destdir,
}
);
$this->doit_in_builddir(\%options, $this->{buildcmd}, "install", @_);
}
sub clean {
my $this=shift;
if (!$this->rmdir_builddir()) {
my %options = (
update_env => {
'LC_ALL' => 'C.UTF-8',
}
);
$this->doit_in_builddir(\%options, $this->{buildcmd}, "clean", @_);
}
}
1