add readline support

This commit is contained in:
crazywhalecc
2023-04-30 15:43:08 +08:00
parent b3296842b7
commit 2d597ed690
15 changed files with 54 additions and 19 deletions

View File

@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace SPC\builder\linux\library;
/**
* gmp is a template library class for unix
*/
class ncurses extends LinuxLibraryBase
{
use \SPC\builder\unix\library\ncurses;
public const NAME = 'ncurses';
}

View File

@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace SPC\builder\linux\library;
/**
* gmp is a template library class for unix
*/
class readline extends LinuxLibraryBase
{
use \SPC\builder\unix\library\readline;
public const NAME = 'readline';
}

View File

@@ -17,7 +17,7 @@ trait ncurses
'--with-curses-h ' .
'--enable-pc-files ' .
'--enable-echo ' .
'--enable-widec ' .
// '--enable-widec ' .
'--with-normal ' .
'--with-ticlib ' .
'--without-tests ' .

View File

@@ -82,6 +82,9 @@ class SourcePatcher
if ($event = $builder->getExt('event')) {
$patch[] = ['event check', '/-levent_openssl/', $event->getLibFilesString()];
}
if ($readline = $builder->getExt('readline')) {
$patch[] = ['readline patch', '/-lncurses/', $readline->getLibFilesString()];
}
$patch[] = ['disable capstone', '/have_capstone="yes"/', 'have_capstone="no"'];
foreach ($patch as $item) {
logger()->info('Patching configure: ' . $item[0]);