diff options
author | Andrej Shadura <andrewsh@debian.org> | 2021-01-31 18:09:33 +0100 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2021-01-31 18:09:33 +0100 |
commit | 5dd3a249d95f46ee34637492e6aaa10549a51be2 (patch) | |
tree | 80e223e4eeb439ff9b9558e27d366bf1a22b8a36 | |
parent | 0cdec09dd234aae6b6fba7c449ed91a6b3d13925 (diff) |
Create a home directory and set MKCOMPILERSETTINGS=yes for mkc 0.36+
mkc 0.36+ probes the compiler and stores the result in the home
directory. DH 13+ pre-creates it, but previous compat levels do not.
-rw-r--r-- | debian/mkcmake.pm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/debian/mkcmake.pm b/debian/mkcmake.pm index 791a51a..1a9c196 100644 --- a/debian/mkcmake.pm +++ b/debian/mkcmake.pm @@ -7,7 +7,7 @@ package Debian::Debhelper::Buildsystem::mkcmake; use strict; -use Debian::Debhelper::Dh_Lib qw(compat escape_shell clean_jobserver_makeflags dpkg_architecture_value); +use Debian::Debhelper::Dh_Lib qw(compat escape_shell clean_jobserver_makeflags dpkg_architecture_value install_dir generated_file); use base 'Debian::Debhelper::Buildsystem::makefile'; sub DESCRIPTION { @@ -54,6 +54,8 @@ sub do_make { @root_cmd = gain_root_cmd(); } + $ENV{MKCOMPILERSETTINGS}='yes'; + my @opts; my $prefix = "/usr"; push @opts, "PREFIX=${prefix}"; @@ -114,6 +116,18 @@ sub check_auto_buildable { sub new { my $class=shift; my $this=$class->SUPER::new(@_); + + # dh creates and sets HOME automatically for compat 13+ + if (compat(12)) { + my $cwd = Cwd::getcwd(); + my $home_dir = join('/', $cwd, generated_file('_source', 'home', 0)); + my @paths = ( + $home_dir, + ); + install_dir(@paths); + $ENV{'HOME'} = $home_dir; + } + $this->{makecmd} = "mkcmake"; return $this; } |