sockets doesn't install header?!

This commit is contained in:
henderkes
2025-05-17 22:40:30 +07:00
parent 05e9129a66
commit c1e91e1ccb
5 changed files with 44 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace SPC\builder\extension;
use SPC\builder\Extension;
use SPC\util\CustomExt;
#[CustomExt('sockets')]
class sockets extends Extension
{
public function patchBeforeConfigure(): bool
{
if (file_exists(BUILD_INCLUDE_PATH . 'php/ext/sockets/php_sockets.h')) {
return false;
}
copy(SOURCE_PATH . '/php-src/ext/sockets/php_sockets.h', BUILD_INCLUDE_PATH . 'php/ext/sockets/php_sockets.h');
return true;
}
}