Make R extensable and add a couple of packages for verification.

Added R as a build system so that the create template will have the
correct configure line.
Added a regex for version parsing as the R URLs are a little odd.
This commit is contained in:
Glenn Johnson
2016-04-06 16:44:22 -05:00
parent 8ef9d68542
commit fbabfc593d
5 changed files with 94 additions and 1 deletions

View File

@@ -124,10 +124,12 @@ def __call__(self, stage):
autotools = "configure('--prefix=%s' % prefix)"
cmake = "cmake('.', *std_cmake_args)"
python = "python('setup.py', 'install', '--prefix=%s' % prefix)"
r = "R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)"
config_lines = ((r'/configure$', 'autotools', autotools),
(r'/CMakeLists.txt$', 'cmake', cmake),
(r'/setup.py$', 'python', python))
(r'/setup.py$', 'python', python),
(r'/NAMESPACE$', 'r', r))
# Peek inside the tarball.
tar = which('tar')
@@ -272,6 +274,10 @@ def create(parser, args):
if guesser.build_system == 'python':
name = 'py-%s' % name
# Prepend 'r-' to R package names, by convention.
if guesser.build_system == 'r':
name = 'r-%s' % name
# Create a directory for the new package.
pkg_path = repo.filename_for_package_name(name)
if os.path.exists(pkg_path) and not args.force:

View File

@@ -206,6 +206,9 @@ def parse_version_offset(path):
# e.g. lame-398-1
(r'-((\d)+-\d)', stem),
# e.g. foobar_1.2-3
(r'_((\d+\.)+\d+(-\d+)?)', stem),
# e.g. foobar-4.5.1
(r'-((\d+\.)*\d+)$', stem),