Added openssl recipe.
This commit is contained in:
@@ -9,7 +9,7 @@ _BUILT_STAMPFILE = '.spp_built'
|
||||
|
||||
Import('env')
|
||||
|
||||
def _autotools_project(env: Environment, project_root: str, config_args: 'list[str]' = [], build_args : 'list[str]' = [], install_args : 'list[str]' = []) -> dict:
|
||||
def _autotools_project(env: Environment, project_root: str, config_args: 'list[str]' = [], build_args : 'list[str]' = [], install_args : 'list[str]' = [], configure_script_path: str = 'configure') -> dict:
|
||||
config = env['BUILD_TYPE']
|
||||
build_dir = os.path.join(project_root, f'build_{config}')
|
||||
install_dir = os.path.join(project_root, f'install_{config}')
|
||||
@@ -28,14 +28,20 @@ def _autotools_project(env: Environment, project_root: str, config_args: 'list[s
|
||||
env = os.environ.copy()
|
||||
env['CFLAGS'] = cflags
|
||||
|
||||
subprocess.run((os.path.join(project_root, 'configure'), '--prefix', install_dir, *config_args), cwd=build_dir, env=env, stdout=sys.stdout, stderr=sys.stderr, check=True)
|
||||
subprocess.run((os.path.join(project_root, configure_script_path), f'--prefix={install_dir}', *config_args), cwd=build_dir, env=env, stdout=sys.stdout, stderr=sys.stderr, check=True)
|
||||
subprocess.run(('make', f'-j{jobs}', *build_args), cwd=build_dir, stdout=sys.stdout, stderr=sys.stderr, check=True)
|
||||
subprocess.run(('make', 'install', *install_args), cwd=build_dir, stdout=sys.stdout, stderr=sys.stderr, check=True)
|
||||
pathlib.Path(install_dir, _BUILT_STAMPFILE).touch()
|
||||
|
||||
libpath = []
|
||||
for lib_folder in ('lib', 'lib64'):
|
||||
full_path = os.path.join(install_dir, lib_folder)
|
||||
if os.path.exists(full_path):
|
||||
libpath.append(full_path)
|
||||
|
||||
return {
|
||||
'install_dir': install_dir,
|
||||
'LIBPATH': [os.path.join(install_dir, 'lib')],
|
||||
'LIBPATH': libpath,
|
||||
'CPPPATH': [os.path.join(install_dir, 'include')]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user