Fixed SQLite build on Linux.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
import glob
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
@@ -46,11 +47,29 @@ def _git_cook(env: Environment, repo: dict) -> dict:
|
||||
}
|
||||
else:
|
||||
checkout_root = repo['checkout_root']
|
||||
build_result = env.AutotoolsProject(checkout_root)
|
||||
build_result = env.AutotoolsProject(checkout_root, skip_steps=('install',))
|
||||
|
||||
# the install script seems borked, do the install manually
|
||||
include_dir = os.path.join(build_result['install_dir'], 'include')
|
||||
lib_dir = os.path.join(build_result['install_dir'], 'lib')
|
||||
os.makedirs(include_dir, exist_ok=True)
|
||||
os.makedirs(lib_dir, exist_ok=True)
|
||||
|
||||
for ext in ('*.a', '*.so'):
|
||||
lib_files = glob.glob(os.path.join(build_result['build_dir'], ext))
|
||||
for lib_file in lib_files:
|
||||
out_path = os.path.join(lib_dir, os.path.basename(lib_file))
|
||||
if not os.path.exists(out_path):
|
||||
shutil.copy(lib_file, out_path)
|
||||
for h_file in ('sqlite3.h',):
|
||||
out_path = os.path.join(include_dir, h_file)
|
||||
if not os.path.exists(out_path):
|
||||
in_path = os.path.join(build_result['build_dir'], h_file)
|
||||
shutil.copy(in_path, out_path)
|
||||
|
||||
return {
|
||||
'LIBPATH': build_result['LIBPATH'],
|
||||
'CPPPATH': build_result['CPPPATH'],
|
||||
'LIBS': ['sqlite3']
|
||||
'LIBS': [env.FindLib('sqlite3', paths=build_result['LIBPATH'])]
|
||||
}
|
||||
|
||||
env.GitRecipe(
|
||||
|
||||
Reference in New Issue
Block a user