Skip to content

Commit 28ae424

Browse files
authored
add extra libs for curl (psl, krb5, unistring, idn2) (#968)
2 parents e2ad31e + f14df19 commit 28ae424

File tree

14 files changed

+351
-121
lines changed

14 files changed

+351
-121
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: 51 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@
104104
"ngtcp2",
105105
"zstd",
106106
"libcares",
107-
"ldap"
107+
"ldap",
108+
"idn2",
109+
"krb5"
108110
],
109111
"lib-suggests-windows": [
110112
"brotli",
@@ -234,6 +236,24 @@
234236
"unicode"
235237
]
236238
},
239+
"idn2": {
240+
"source": "libidn2",
241+
"pkg-configs": [
242+
"libidn2"
243+
],
244+
"headers": [
245+
"idn2.h"
246+
],
247+
"lib-suggests-unix": [
248+
"libiconv",
249+
"gettext",
250+
"libunistring"
251+
],
252+
"lib-depends-macos": [
253+
"libiconv",
254+
"gettext"
255+
]
256+
},
237257
"imagemagick": {
238258
"source": "imagemagick",
239259
"cpp-library": true,
@@ -281,6 +301,26 @@
281301
"jbig_ar.h"
282302
]
283303
},
304+
"krb5": {
305+
"source": "krb5",
306+
"pkg-configs": [
307+
"krb5-gssapi"
308+
],
309+
"headers": [
310+
"krb5.h",
311+
"gssapi/gssapi.h"
312+
],
313+
"lib-depends": [
314+
"openssl"
315+
],
316+
"lib-suggests": [
317+
"ldap",
318+
"libedit"
319+
],
320+
"frameworks": [
321+
"Kerberos"
322+
]
323+
},
284324
"ldap": {
285325
"source": "ldap",
286326
"pkg-configs": [
@@ -568,6 +608,16 @@
568608
"zstd"
569609
]
570610
},
611+
"libunistring": {
612+
"source": "libunistring",
613+
"static-libs-unix": [
614+
"libunistring.a"
615+
],
616+
"headers": [
617+
"unistr.h",
618+
"unistring/"
619+
]
620+
},
571621
"liburing": {
572622
"source": "liburing",
573623
"pkg-configs": [
@@ -974,24 +1024,5 @@
9741024
"zstd.h",
9751025
"zstd_errors.h"
9761026
]
977-
},
978-
"liburing": {
979-
"source": "liburing",
980-
"pkg-configs": [
981-
"liburing",
982-
"liburing-ffi"
983-
],
984-
"static-libs-linux": [
985-
"liburing.a",
986-
"liburing-ffi.a"
987-
],
988-
"headers-linux": [
989-
"liburing/",
990-
"liburing.h"
991-
]
992-
},
993-
"frankenphp": {
994-
"source": "frankenphp",
995-
"type": "target"
9961027
}
9971028
}

config/source.json

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@
305305
"type": "ghtar",
306306
"repo": "php/frankenphp",
307307
"prefer-stable": true,
308-
"provide-pre-built": false,
309308
"license": {
310309
"type": "file",
311310
"path": "LICENSE"
@@ -373,16 +372,6 @@
373372
"path": "LICENSE"
374373
}
375374
},
376-
"frankenphp": {
377-
"type": "ghtar",
378-
"repo": "php/frankenphp",
379-
"prefer-stable": true,
380-
"provide-pre-build": false,
381-
"license": {
382-
"type": "file",
383-
"path": "LICENSE"
384-
}
385-
},
386375
"icu-static-win": {
387376
"type": "url",
388377
"url": "https://dl.static-php.dev/static-php-cli/deps/icu-static-windows-x64/icu-static-windows-x64.zip",
@@ -441,6 +430,16 @@
441430
"path": "COPYING"
442431
}
443432
},
433+
"krb5": {
434+
"type": "ghtagtar",
435+
"repo": "krb5/krb5",
436+
"match": "krb5.+-final",
437+
"prefer-stable": true,
438+
"license": {
439+
"type": "file",
440+
"path": "NOTICE"
441+
}
442+
},
444443
"ldap": {
445444
"type": "filelist",
446445
"url": "https://www.openldap.org/software/download/OpenLDAP/openldap-release/",
@@ -599,6 +598,15 @@
599598
"path": "source/COPYING"
600599
}
601600
},
601+
"libidn2": {
602+
"type": "filelist",
603+
"url": "https://ftp.gnu.org/gnu/libidn/",
604+
"regex": "/href=\"(?<file>libidn2-(?<version>[^\"]+)\\.tar\\.gz)\"/",
605+
"license": {
606+
"type": "file",
607+
"path": "COPYING.LESSERv3"
608+
}
609+
},
602610
"libjpeg": {
603611
"type": "ghtar",
604612
"repo": "libjpeg-turbo/libjpeg-turbo",
@@ -700,6 +708,16 @@
700708
"path": "LICENSE.md"
701709
}
702710
},
711+
"libunistring": {
712+
"type": "filelist",
713+
"url": "https://ftp.gnu.org/gnu/libunistring/",
714+
"regex": "/href=\"(?<file>libunistring-(?<version>[^\"]+)\\.tar\\.gz)\"/",
715+
"provide-pre-built": true,
716+
"license": {
717+
"type": "file",
718+
"path": "COPYING.LIB"
719+
}
720+
},
703721
"liburing": {
704722
"type": "ghtar",
705723
"repo": "axboe/liburing",
@@ -713,6 +731,7 @@
713731
"type": "git",
714732
"url": "https://github.com/static-php/libuuid.git",
715733
"rev": "master",
734+
"provide-pre-built": true,
716735
"license": {
717736
"type": "file",
718737
"path": "COPYING"
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\macos\library;
6+
7+
class idn2 extends MacOSLibraryBase
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\macos\library;
6+
7+
class krb5 extends MacOSLibraryBase
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\macos\library;
6+
7+
class libunistring extends MacOSLibraryBase
8+
{
9+
use \SPC\builder\unix\library\libunistring;
10+
11+
public const NAME = 'libunistring';
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',

0 commit comments

Comments
 (0)