Compare commits

...

7 Commits

Author SHA1 Message Date
henderkes
1662ac4cf8 framework! 2025-11-19 15:20:05 +01:00
henderkes
1e09017549 frameworks? 2025-11-19 14:49:37 +01:00
henderkes
84e9f13688 framework? 2025-11-19 14:48:10 +01:00
henderkes
2b0a0bdad9 fix cs 2025-11-19 13:54:45 +01:00
henderkes
e8d1970f55 secure_getenv not available on macos 2025-11-19 13:54:17 +01:00
henderkes
6861e9c2c7 append ld_library_path for musl toolchain 2025-11-19 11:59:09 +01:00
henderkes
376b8e7569 remove psl 2025-11-19 10:48:24 +01:00
7 changed files with 41 additions and 92 deletions

View File

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

View File

@ -660,16 +660,6 @@
"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

@ -1,12 +0,0 @@
<?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

@ -0,0 +1,12 @@
<?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

@ -1,12 +0,0 @@
<?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,17 +16,30 @@ 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([
'LIBS' => $config['libs'],
'LDFLAGS' => '-Wl,--allow-multiple-definition',
])
->appendEnv($extraEnv)
->optionalLib('ldap', '--with-ldap', '--without-ldap')
->optionalLib('libedit', '--with-libedit', '--without-libedit')
->configure(
'--disable-nls',
'--disable-rpath',
)
->configure(...$args)
->make();
$this->patchPkgconfPrefix([
'krb5-gssapi.pc',

View File

@ -1,20 +0,0 @@
<?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();
}
}