Improve perl handling.

This commit is contained in:
Jelmer Vernooij 2021-04-16 17:30:00 +00:00 committed by Jelmer Vernooij
parent bad2ac3d55
commit df41f85f9e
No known key found for this signature in database
GPG key ID: 579C160D4C9E23E8
3 changed files with 13 additions and 5 deletions

View file

@ -1033,10 +1033,17 @@ def _declared_deps_from_meta_yml(f):
class Make(BuildSystem):
name = "make"
def __init__(self, path):
self.path = path
if os.path.exists(os.path.join(path, 'Makefile.PL')):
self.name = 'makefile.pl'
elif os.path.exists(os.path.join(path, 'Makefile.am')):
self.name = 'automake'
elif any([os.path.exists(os.path.join(path, n))
for n in ['configure.ac', 'configure.in', 'autogen.sh']]):
self.name = 'autoconf'
else:
self.name = "make"
def __repr__(self):
return "%s(%r)" % (type(self).__name__, self.path)
@ -1104,7 +1111,6 @@ class Make(BuildSystem):
else:
raise
def test(self, session, resolver, fixers):
self.setup(session, resolver, fixers)
self._run_make(session, ["check"], fixers)
@ -1502,6 +1508,8 @@ class PerlBuildTiny(BuildSystem):
except UnidentifiedError as e:
if "No such action 'distmeta'" in e.lines:
pass
if "Do not run distmeta. Install Minilla and `minil install` instead." in e.lines:
self.minilla = True
else:
raise
try:

View file

@ -18,7 +18,7 @@
import logging
import subprocess
from .. import UnidentifiedError
from .. import UnidentifiedError
from ..fix_build import run_detecting_problems

View file

@ -608,7 +608,7 @@ def resolve_libtool_req(apt_mgr, req):
def resolve_perl_module_req(apt_mgr, req):
DEFAULT_PERL_PATHS = ["/usr/share/perl5", "/usr/lib/.*/perl5/.*"]
DEFAULT_PERL_PATHS = ["/usr/share/perl5", "/usr/lib/.*/perl5/.*", "/usr/lib/.*/perl-base"]
if req.inc is None:
if req.filename is None: