Add autoconf executor

This commit is contained in:
crazywhalecc
2025-06-09 19:32:31 +08:00
committed by Jerry Ma
parent 684b5d4534
commit 720251458f
34 changed files with 437 additions and 454 deletions

View File

@@ -7,6 +7,7 @@ namespace SPC\builder\unix\library;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
use SPC\store\FileSystem;
use SPC\util\executor\UnixAutoconfExecutor;
trait libacl
{
@@ -29,14 +30,11 @@ trait libacl
*/
protected function build(): void
{
shell()->cd($this->source_dir)->initializeEnv($this)
->appendEnv(['CFLAGS' => "-I{$this->getIncludeDir()}", 'LDFLAGS' => "-L{$this->getLibDir()}"])
UnixAutoconfExecutor::create($this)
->exec('libtoolize --force --copy')
->exec('./autogen.sh || autoreconf -if')
->exec('./configure --prefix= --enable-static --disable-shared --disable-tests --disable-nls --with-pic')
->exec("make -j {$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
->configure('--disable-nls', '--disable-tests')
->make();
$this->patchPkgconfPrefix(['libacl.pc'], PKGCONF_PATCH_PREFIX);
}
}