Compare commits

..

No commits in common. "1662ac4cf8b5bdbbea2a43e9612a35a1d9bc2e5e" and "875e1d05cd3f2be99a9593ea1664a9f1ee8e7836" have entirely different histories.

7 changed files with 92 additions and 41 deletions

View File

@ -96,7 +96,20 @@
"libssh2",
"nghttp2"
],
"lib-suggests-unix": [
"lib-suggests-linux": [
"libssh2",
"brotli",
"nghttp2",
"nghttp3",
"ngtcp2",
"zstd",
"libcares",
"ldap",
"krb5",
"idn2",
"psl"
],
"lib-suggests-macos": [
"libssh2",
"brotli",
"nghttp2",
@ -106,7 +119,7 @@
"libcares",
"ldap",
"idn2",
"krb5"
"psl"
],
"lib-suggests-windows": [
"brotli",
@ -246,8 +259,8 @@
],
"lib-suggests-unix": [
"libiconv",
"gettext",
"libunistring"
"libunistring",
"gettext"
],
"lib-depends-macos": [
"libiconv",
@ -316,9 +329,6 @@
"lib-suggests": [
"ldap",
"libedit"
],
"frameworks": [
"Kerberos"
]
},
"ldap": {
@ -614,7 +624,7 @@
"libunistring.a"
],
"headers": [
"unistr.h",
"unistring.h",
"unistring/"
]
},
@ -882,6 +892,18 @@
"libpgcommon.lib"
]
},
"psl": {
"source": "libpsl",
"pkg-configs": [
"libpsl"
],
"headers": [
"libpsl.h"
],
"lib-depends": [
"idn2"
]
},
"pthreads4w": {
"source": "pthreads4w",
"static-libs-windows": [

View File

@ -660,6 +660,16 @@
"path": "LICENSE"
}
},
"libpsl": {
"type": "ghrel",
"repo": "rockdaboot/libpsl",
"match": "libpsl.+\\.tar\\.gz",
"prefer-stable": true,
"license": {
"type": "file",
"path": "COPYING"
}
},
"librabbitmq": {
"type": "git",
"url": "https://github.com/alanxz/rabbitmq-c.git",

View File

@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace SPC\builder\linux\library;
class psl extends LinuxLibraryBase
{
use \SPC\builder\unix\library\psl;
public const NAME = 'psl';
}

View File

@ -1,12 +0,0 @@
<?php
declare(strict_types=1);
namespace SPC\builder\macos\library;
class krb5 extends MacOSLibraryBase
{
use \SPC\builder\unix\library\krb5;
public const NAME = 'krb5';
}

View File

@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace SPC\builder\macos\library;
class psl extends MacOSLibraryBase
{
use \SPC\builder\unix\library\psl;
public const NAME = 'psl';
}

View File

@ -16,30 +16,17 @@ trait krb5
$libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(true));
$spc = new SPCConfigUtil($this->builder, ['no_php' => true, 'libs_only_deps' => true]);
$config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs', false));
$extraEnv = [
'CFLAGS' => '-fcommon',
'LIBS' => $config['libs'],
];
if (getenv('SPC_LD_LIBRARY_PATH') && getenv('SPC_LIBRARY_PATH')) {
$extraEnv = [...$extraEnv, ...[
'LD_LIBRARY_PATH' => getenv('SPC_LD_LIBRARY_PATH'),
'LIBRARY_PATH' => getenv('SPC_LIBRARY_PATH'),
]];
}
$args = [
'--disable-nls',
'--disable-rpath',
'--without-system-verto',
];
if (PHP_OS_FAMILY === 'Darwin') {
$extraEnv['LDFLAGS'] = '-framework Kerberos';
$args[] = 'ac_cv_func_secure_getenv=no';
}
UnixAutoconfExecutor::create($this)
->appendEnv($extraEnv)
->appendEnv([
'LIBS' => $config['libs'],
'LDFLAGS' => '-Wl,--allow-multiple-definition',
])
->optionalLib('ldap', '--with-ldap', '--without-ldap')
->optionalLib('libedit', '--with-libedit', '--without-libedit')
->configure(...$args)
->configure(
'--disable-nls',
'--disable-rpath',
)
->make();
$this->patchPkgconfPrefix([
'krb5-gssapi.pc',

View File

@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
namespace SPC\builder\unix\library;
use SPC\util\executor\UnixAutoconfExecutor;
trait psl
{
protected function build(): void
{
UnixAutoconfExecutor::create($this)
->optionalLib('idn2', ...ac_with_args('libidn2', true))
->configure('--disable-nls')
->make();
$this->patchPkgconfPrefix(['libpsl.pc']);
$this->patchLaDependencyPrefix();
}
}