summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-07-14 17:29:52 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2015-09-07 14:41:47 +0000
commitb150ef7dbb9d079d94434db51fef070820a98bcb (patch)
tree2f9e21d50ed9d10259f71f00c46d103608333143
parentbf9f0ffabd5bfdc0b6fb06f065389a7971e007e2 (diff)
downloadmorph-b150ef7dbb9d079d94434db51fef070820a98bcb.tar.gz
Make ExtUtilsMakeMakerBuildSystem be more standard
Install to default locations rather than overriding. Change-Id: Ieccd06afdf623eee0d09b8d29d40d147dc8c5e7c
-rw-r--r--morphlib/buildsystem.py29
1 files changed, 19 insertions, 10 deletions
diff --git a/morphlib/buildsystem.py b/morphlib/buildsystem.py
index 933f9b91..141b4a55 100644
--- a/morphlib/buildsystem.py
+++ b/morphlib/buildsystem.py
@@ -192,28 +192,37 @@ class PythonDistutilsBuildSystem(BuildSystem):
class ExtUtilsMakeMakerBuildSystem(BuildSystem):
- '''The Perl cpan build system.'''
+ '''The Perl cpan build system.
+
+ To install perl distributions into the correct location in our chroot
+ we need to set PREFIX to <destdir>/<prefix> in the configure-commands.
+
+ The mapping between PREFIX and the final installation
+ directories is complex and depends upon the configuration of perl
+ see,
+ https://metacpan.org/pod/distribution/perl/INSTALL#Installation-Directories
+ and ExtUtil::MakeMaker's documentation for more details.
+
+ '''
name = 'cpan'
def __init__(self):
BuildSystem.__init__(self)
+
self.configure_commands = [
- 'perl Makefile.PL INSTALLDIRS=perl '
- 'INSTALLARCHLIB="$PREFIX/lib/perl" '
- 'INSTALLPRIVLIB="$PREFIX/lib/perl" '
- 'INSTALLBIN="$PREFIX/bin" '
- 'INSTALLSCRIPT="$PREFIX/bin" '
- 'INSTALLMAN1DIR="$PREFIX/share/man/man1" '
- 'INSTALLMAN3DIR="$PREFIX/share/man/man3"',
+ 'perl Makefile.PL PREFIX=$DESTDIR$PREFIX',
]
self.build_commands = [
'make',
]
self.test_commands = [
+ # FIXME: we ought to run tests by default,
+ # and use chunk morphs to disable for special cases
+ # 'make test',
]
self.install_commands = [
- 'make DESTDIR="$DESTDIR" install',
+ 'make install',
]
self.strip_commands = [_STRIP_COMMAND]
@@ -279,7 +288,7 @@ class QMakeBuildSystem(BuildSystem):
for x in file_list:
if x.endswith(indicator):
return True
-
+
return False
build_systems = [