Skip to content

Commit 54ceca8

Browse files
committed
add extra libs for curl (psl, krb5, unistring, idn2)
1 parent 4ae4165 commit 54ceca8

File tree

12 files changed

+342
-103
lines changed

12 files changed

+342
-103
lines changed

composer.lock

Lines changed: 90 additions & 86 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/lib.json

Lines changed: 67 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,30 @@
9191
"libssh2",
9292
"nghttp2"
9393
],
94-
"lib-suggests-unix": [
94+
"lib-suggests-linux": [
95+
"libssh2",
96+
"brotli",
97+
"nghttp2",
98+
"nghttp3",
99+
"ngtcp2",
100+
"zstd",
101+
"libcares",
102+
"ldap",
103+
"krb5",
104+
"idn2",
105+
"psl"
106+
],
107+
"lib-suggests-macos": [
95108
"libssh2",
96109
"brotli",
97110
"nghttp2",
98111
"nghttp3",
99112
"ngtcp2",
100113
"zstd",
101114
"libcares",
102-
"ldap"
115+
"ldap",
116+
"idn2",
117+
"psl"
103118
],
104119
"lib-suggests-windows": [
105120
"brotli",
@@ -936,6 +951,56 @@
936951
"libiconv"
937952
]
938953
},
954+
"krb5": {
955+
"source": "krb5",
956+
"pkg-configs": [
957+
"krb5-gssapi"
958+
],
959+
"headers": [
960+
"krb5.h",
961+
"gssapi/gssapi.h"
962+
]
963+
},
964+
"libunistring": {
965+
"source": "libunistring",
966+
"static-libs-unix": [
967+
"libunistring.a"
968+
],
969+
"headers": [
970+
"unistring.h",
971+
"unistring/"
972+
]
973+
},
974+
"idn2": {
975+
"source": "libidn2",
976+
"pkg-configs": [
977+
"libidn2"
978+
],
979+
"headers": [
980+
"idn2.h"
981+
],
982+
"lib-suggests-linux": [
983+
"libiconv",
984+
"libunistring",
985+
"gettext"
986+
],
987+
"lib-depends-macos": [
988+
"libiconv",
989+
"gettext"
990+
]
991+
},
992+
"psl": {
993+
"source": "libpsl",
994+
"pkg-configs": [
995+
"libpsl"
996+
],
997+
"headers": [
998+
"libpsl.h"
999+
],
1000+
"lib-depends": [
1001+
"idn2"
1002+
]
1003+
},
9391004
"zlib": {
9401005
"source": "zlib",
9411006
"static-libs-unix": [
@@ -970,21 +1035,6 @@
9701035
"zstd_errors.h"
9711036
]
9721037
},
973-
"liburing": {
974-
"source": "liburing",
975-
"pkg-configs": [
976-
"liburing",
977-
"liburing-ffi"
978-
],
979-
"static-libs-linux": [
980-
"liburing.a",
981-
"liburing-ffi.a"
982-
],
983-
"headers-linux": [
984-
"liburing/",
985-
"liburing.h"
986-
]
987-
},
9881038
"frankenphp": {
9891039
"source": "frankenphp",
9901040
"type": "target"

config/source.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,46 @@
11711171
"path": "LICENSE"
11721172
}
11731173
},
1174+
"krb5": {
1175+
"type": "ghtagtar",
1176+
"repo": "krb5/krb5",
1177+
"match": "krb5.+-final",
1178+
"prefer-stable": true,
1179+
"license": {
1180+
"type": "file",
1181+
"path": "NOTICE"
1182+
}
1183+
},
1184+
"libunistring": {
1185+
"type": "filelist",
1186+
"url": "https://ftp.gnu.org/gnu/libunistring/",
1187+
"regex": "/href=\"(?<file>libunistring-(?<version>[^\"]+)\\.tar\\.gz)\"/",
1188+
"prefer-stable": true,
1189+
"license": {
1190+
"type": "file",
1191+
"path": "COPYING.LIB"
1192+
}
1193+
},
1194+
"libidn2": {
1195+
"type": "filelist",
1196+
"url": "https://ftp.gnu.org/gnu/libidn/",
1197+
"regex": "/href=\"(?<file>libidn2-(?<version>[^\"]+)\\.tar\\.gz)\"/",
1198+
"prefer-stable": true,
1199+
"license": {
1200+
"type": "file",
1201+
"path": "COPYING"
1202+
}
1203+
},
1204+
"libpsl": {
1205+
"type": "ghrel",
1206+
"repo": "rockdaboot/libpsl",
1207+
"match": "libpsl.+\\.tar\\.gz",
1208+
"prefer-stable": true,
1209+
"license": {
1210+
"type": "file",
1211+
"path": "COPYING"
1212+
}
1213+
},
11741214
"zlib": {
11751215
"type": "ghrel",
11761216
"repo": "madler/zlib",
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SPC\builder\linux\library;
6+
7+
class idn2 extends LinuxLibraryBase
8+
{
9+
use \SPC\builder\unix\library\idn2;
10+
11+
public const NAME = 'idn2';
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SPC\builder\linux\library;
6+
7+
class krb5 extends LinuxLibraryBase
8+
{
9+
use \SPC\builder\unix\library\krb5;
10+
11+
public const NAME = 'krb5';
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SPC\builder\linux\library;
6+
7+
class libunistring extends LinuxLibraryBase
8+
{
9+
use \SPC\builder\unix\library\libunistring;
10+
11+
public const NAME = 'libunistring';
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SPC\builder\linux\library;
6+
7+
class psl extends LinuxLibraryBase
8+
{
9+
use \SPC\builder\unix\library\psl;
10+
11+
public const NAME = 'psl';
12+
}

src/SPC/builder/unix/library/curl.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ protected function build(): void
2323
->optionalLib('zstd', ...cmake_boolean_args('CURL_ZSTD'))
2424
->optionalLib('idn2', ...cmake_boolean_args('USE_LIBIDN2'))
2525
->optionalLib('psl', ...cmake_boolean_args('CURL_USE_LIBPSL'))
26+
->optionalLib('krb5', ...cmake_boolean_args('CURL_USE_GSSAPI'))
27+
->optionalLib('idn2', ...cmake_boolean_args('CURL_USE_IDN2'))
2628
->optionalLib('libcares', '-DENABLE_ARES=ON')
2729
->addConfigureArgs(
2830
'-DBUILD_CURL_EXE=OFF',
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SPC\builder\unix\library;
6+
7+
use SPC\util\executor\UnixAutoconfExecutor;
8+
9+
trait idn2
10+
{
11+
protected function build(): void
12+
{
13+
UnixAutoconfExecutor::create($this)
14+
->configure(
15+
'--disable-nls',
16+
'--disable-doc',
17+
'--enable-year2038',
18+
'--disable-rpath'
19+
)
20+
->optionalLib('libiconv', "--with-libiconv-prefix={$this->getBuildRootPath()}")
21+
->optionalLib('libunistring', "--with-libunistring-prefix={$this->getBuildRootPath()}")
22+
->optionalLib('gettext', "--with-libnintl-prefix={$this->getBuildRootPath()}")
23+
->make();
24+
$this->patchPkgconfPrefix(['libidn2.pc']);
25+
$this->patchLaDependencyPrefix();
26+
}
27+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SPC\builder\unix\library;
6+
7+
use SPC\util\executor\UnixAutoconfExecutor;
8+
9+
trait krb5
10+
{
11+
protected function build(): void
12+
{
13+
$this->source_dir .= '/src';
14+
shell()->cd($this->source_dir)->exec('autoreconf -if');
15+
UnixAutoconfExecutor::create($this)
16+
->appendEnv(['LDFLAGS' => '-Wl,--allow-multiple-definition'])
17+
->configure()
18+
->make();
19+
$this->patchPkgconfPrefix([
20+
'krb5-gssapi.pc',
21+
'krb5.pc',
22+
'kadm-server.pc',
23+
'kadm-client.pc',
24+
'kdb.pc',
25+
'mit-krb5-gssapi.pc',
26+
'mit-krb5.pc',
27+
'gssrpc.pc',
28+
]);
29+
}
30+
}

0 commit comments

Comments
 (0)