mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 08:15:39 +08:00
refactor to pkg-config and add some add-on libs for gd
This commit is contained in:
20
src/SPC/builder/unix/library/zlib.php
Normal file
20
src/SPC/builder/unix/library/zlib.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\unix\library;
|
||||
|
||||
trait zlib
|
||||
{
|
||||
protected function build()
|
||||
{
|
||||
[,,$destdir] = SEPARATED_PATH;
|
||||
|
||||
shell()->cd($this->source_dir)
|
||||
->exec("{$this->builder->configure_env} ./configure --static --prefix=")
|
||||
->exec('make clean')
|
||||
->exec("make -j{$this->builder->concurrency}")
|
||||
->exec("make install DESTDIR={$destdir}");
|
||||
$this->patchPkgconfPrefix(['zlib.pc']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user