2024-04-12 15:53:38 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
|
|
|
|
|
|
use SPC\builder\macos\library\MacOSLibraryBase;
|
|
|
|
|
use SPC\store\FileSystem;
|
2025-06-09 19:32:31 +08:00
|
|
|
use SPC\util\executor\UnixAutoconfExecutor;
|
2024-04-12 15:53:38 +08:00
|
|
|
|
|
|
|
|
trait qdbm
|
|
|
|
|
{
|
|
|
|
|
protected function build(): void
|
|
|
|
|
{
|
2025-06-09 19:32:31 +08:00
|
|
|
$ac = UnixAutoconfExecutor::create($this)->configure();
|
2024-04-12 15:53:38 +08:00
|
|
|
FileSystem::replaceFileRegex($this->source_dir . '/Makefile', '/MYLIBS = libqdbm.a.*/m', 'MYLIBS = libqdbm.a');
|
2025-06-09 19:32:31 +08:00
|
|
|
$ac->make($this instanceof MacOSLibraryBase ? 'mac' : '');
|
2024-04-12 15:53:38 +08:00
|
|
|
$this->patchPkgconfPrefix(['qdbm.pc']);
|
|
|
|
|
}
|
|
|
|
|
}
|