Support universal builds
Hopefully adequately documented in the README
This commit is contained in:
@@ -32,7 +32,7 @@ module.exports = async function(hakEnv, moduleInfo) {
|
||||
|
||||
async function buildOpenSslWin(hakEnv, moduleInfo) {
|
||||
const version = moduleInfo.cfg.dependencies.openssl;
|
||||
const openSslDir = path.join(moduleInfo.moduleDotHakDir, `openssl-${version}`);
|
||||
const openSslDir = path.join(moduleInfo.moduleTargetDotHakDir, `openssl-${version}`);
|
||||
|
||||
const openSslArch = hakEnv.getTargetArch() === 'x64' ? 'VC-WIN64A' : 'VC-WIN32';
|
||||
|
||||
@@ -134,7 +134,7 @@ async function buildOpenSslWin(hakEnv, moduleInfo) {
|
||||
|
||||
async function buildSqlCipherWin(hakEnv, moduleInfo) {
|
||||
const version = moduleInfo.cfg.dependencies.sqlcipher;
|
||||
const sqlCipherDir = path.join(moduleInfo.moduleDotHakDir, `sqlcipher-${version}`);
|
||||
const sqlCipherDir = path.join(moduleInfo.moduleTargetDotHakDir, `sqlcipher-${version}`);
|
||||
const buildDir = path.join(sqlCipherDir, 'bld');
|
||||
|
||||
await mkdirp(buildDir);
|
||||
@@ -171,7 +171,7 @@ async function buildSqlCipherWin(hakEnv, moduleInfo) {
|
||||
|
||||
async function buildSqlCipherUnix(hakEnv, moduleInfo) {
|
||||
const version = moduleInfo.cfg.dependencies.sqlcipher;
|
||||
const sqlCipherDir = path.join(moduleInfo.moduleDotHakDir, `sqlcipher-${version}`);
|
||||
const sqlCipherDir = path.join(moduleInfo.moduleTargetDotHakDir, `sqlcipher-${version}`);
|
||||
|
||||
const args = [
|
||||
'--prefix=' + moduleInfo.depPrefix + '',
|
||||
|
||||
@@ -62,9 +62,10 @@ async function getSqlCipher(hakEnv, moduleInfo) {
|
||||
await bob;
|
||||
}
|
||||
|
||||
// Extract the tarball to per-target directories, then we avoid cross-contaiminating archs
|
||||
await tar.x({
|
||||
file: sqlCipherTarball,
|
||||
cwd: moduleInfo.moduleDotHakDir,
|
||||
cwd: moduleInfo.moduleTargetDotHakDir,
|
||||
});
|
||||
|
||||
if (hakEnv.isWin()) {
|
||||
@@ -124,6 +125,6 @@ async function getOpenSsl(hakEnv, moduleInfo) {
|
||||
console.log("extracting " + openSslTarball + " in " + moduleInfo.moduleDotHakDir);
|
||||
await tar.x({
|
||||
file: openSslTarball,
|
||||
cwd: moduleInfo.moduleDotHakDir,
|
||||
cwd: moduleInfo.moduleTargetDotHakDir,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user