diff --git a/config/lib.json b/config/lib.json index c1e871a5..500ebe3d 100644 --- a/config/lib.json +++ b/config/lib.json @@ -18,7 +18,7 @@ "ncurses": { "source": "ncurses", "static-libs-unix": [ - "libncursesw.a" + "libncurses.a" ] }, "readline": { diff --git a/src/SPC/builder/linux/library/ncurses.php b/src/SPC/builder/linux/library/ncurses.php new file mode 100644 index 00000000..92d63f44 --- /dev/null +++ b/src/SPC/builder/linux/library/ncurses.php @@ -0,0 +1,15 @@ +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]); diff --git a/src/globals/tests/bcmath.php b/src/globals/tests/bcmath.php index 4888f854..bad5f8f6 100644 --- a/src/globals/tests/bcmath.php +++ b/src/globals/tests/bcmath.php @@ -4,5 +4,4 @@ declare(strict_types=1); -bcscale(3); -exit(bcdiv('105', '6.55957') === '16.007' ? 0 : 1); +assert(function_exists('bcscale')); diff --git a/src/globals/tests/bz2.php b/src/globals/tests/bz2.php index 440d5613..7550bee1 100644 --- a/src/globals/tests/bz2.php +++ b/src/globals/tests/bz2.php @@ -3,4 +3,6 @@ declare(strict_types=1); $str = 'This is bz2 extension test'; -exit(bzdecompress(bzcompress($str, 9)) === $str ? 0 : 1); +assert(function_exists('bzdecompress')); +assert(function_exists('bzcompress')); +assert(bzdecompress(bzcompress($str, 9)) === $str); diff --git a/src/globals/tests/calendar.php b/src/globals/tests/calendar.php index 857f6658..fe7fc6e6 100644 --- a/src/globals/tests/calendar.php +++ b/src/globals/tests/calendar.php @@ -1,7 +1,6 @@ loadHtml("
Hello"); -exit($doc->getElementById('app')->nodeValue === 'Hello' ? 0 : 1); +assert($doc->getElementById('app')->nodeValue === 'Hello'); diff --git a/src/globals/tests/filter.php b/src/globals/tests/filter.php index ec5fb591..6857bca0 100644 --- a/src/globals/tests/filter.php +++ b/src/globals/tests/filter.php @@ -2,4 +2,4 @@ declare(strict_types=1); -exit(function_exists('filter_var') ? 0 : 1); +assert(function_exists('filter_var')); diff --git a/src/globals/tests/gd.php b/src/globals/tests/gd.php index e73e7df4..2696a4a1 100644 --- a/src/globals/tests/gd.php +++ b/src/globals/tests/gd.php @@ -2,6 +2,8 @@ declare(strict_types=1); +assert(function_exists('gd_info')); $info = gd_info(); -$true = ($true ?? true) && ($info['PNG Support'] ?? false); -exit($true ? 0 : 1); +assert($info['PNG Support'] ?? false); +assert($info['GIF Create Support'] ?? false); +assert($info['GIF Read Support'] ?? false); diff --git a/src/globals/tests/redis.php b/src/globals/tests/redis.php index 840aa955..76a971b2 100644 --- a/src/globals/tests/redis.php +++ b/src/globals/tests/redis.php @@ -2,4 +2,4 @@ declare(strict_types=1); -exit(class_exists('\\Redis') ? 0 : 1); +assert(class_exists('\\Redis')); diff --git a/src/globals/tests/zip.php b/src/globals/tests/zip.php index 368d6da7..3c5bf3da 100644 --- a/src/globals/tests/zip.php +++ b/src/globals/tests/zip.php @@ -2,4 +2,4 @@ declare(strict_types=1); -exit(class_exists('\\ZipArchive') ? 0 : 1); +assert(class_exists('\\ZipArchive')); diff --git a/src/globals/tests/zlib.php b/src/globals/tests/zlib.php index e73f3e8e..92158dc2 100644 --- a/src/globals/tests/zlib.php +++ b/src/globals/tests/zlib.php @@ -2,4 +2,4 @@ declare(strict_types=1); -exit(function_exists('gzcompress') ? 0 : 1); +assert(function_exists('gzcompress'));