diff --git a/src/SPC/builder/Extension.php b/src/SPC/builder/Extension.php index 459f5f02..6666c429 100644 --- a/src/SPC/builder/Extension.php +++ b/src/SPC/builder/Extension.php @@ -414,6 +414,7 @@ class Extension // prepare configure args shell()->cd($this->source_dir) ->setEnv($env) + ->appendEnv($this->getExtraEnv()) ->exec(BUILD_BIN_PATH . '/phpize'); if ($this->patchBeforeSharedConfigure()) { @@ -422,6 +423,7 @@ class Extension shell()->cd($this->source_dir) ->setEnv($env) + ->appendEnv($this->getExtraEnv()) ->exec( './configure ' . $this->getUnixConfigureArg(true) . ' --with-php-config=' . BUILD_BIN_PATH . '/php-config ' . @@ -441,6 +443,7 @@ class Extension shell()->cd($this->source_dir) ->setEnv($env) + ->appendEnv($this->getExtraEnv()) ->exec('make clean') ->exec('make -j' . $this->builder->concurrency) ->exec('make install'); @@ -577,4 +580,9 @@ class Extension } return $deps; } + + protected function getExtraEnv(): array + { + return []; + } } diff --git a/src/SPC/builder/extension/pgsql.php b/src/SPC/builder/extension/pgsql.php index a70c1fb7..12545fd6 100644 --- a/src/SPC/builder/extension/pgsql.php +++ b/src/SPC/builder/extension/pgsql.php @@ -57,4 +57,11 @@ class pgsql extends Extension } return '--with-pgsql=' . BUILD_ROOT_PATH; } + + protected function getExtraEnv(): array + { + return [ + 'CFLAGS' => '-Wno-int-conversion -Wno-implicit-function-declaration' + ]; + } }