2023-07-26 00:08:20 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\macos\library;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* gmp is a template library class for unix
|
|
|
|
|
*/
|
|
|
|
|
class libmemcached extends MacOSLibraryBase
|
|
|
|
|
{
|
|
|
|
|
public const NAME = 'libmemcached';
|
|
|
|
|
|
2023-08-20 19:51:45 +08:00
|
|
|
public function build(): void
|
2023-07-26 00:08:20 +08:00
|
|
|
{
|
|
|
|
|
$rootdir = BUILD_ROOT_PATH;
|
|
|
|
|
|
|
|
|
|
shell()->cd($this->source_dir)
|
|
|
|
|
->exec('chmod +x configure')
|
|
|
|
|
->exec(
|
|
|
|
|
"{$this->builder->configure_env} ./configure " .
|
|
|
|
|
'--enable-static --disable-shared ' .
|
|
|
|
|
'--disable-sasl ' .
|
|
|
|
|
"--prefix={$rootdir}"
|
|
|
|
|
)
|
|
|
|
|
->exec('make clean')
|
|
|
|
|
->exec('sed -ie "s/-Werror//g" ' . $this->source_dir . '/Makefile')
|
|
|
|
|
->exec("make -j{$this->builder->concurrency}")
|
|
|
|
|
->exec('make install');
|
|
|
|
|
}
|
|
|
|
|
}
|