Skip to content

Commit 2ef64e4

Browse files
committed
add libjxl #755
1 parent 6c18862 commit 2ef64e4

File tree

6 files changed

+73
-2
lines changed

6 files changed

+73
-2
lines changed

config/lib.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@
240240
"zstd",
241241
"xz",
242242
"libzip",
243-
"libxml2"
243+
"libxml2",
244+
"libjxl"
244245
]
245246
},
246247
"imap": {
@@ -419,6 +420,20 @@
419420
"zlib"
420421
]
421422
},
423+
"libjxl": {
424+
"source": "libjxl",
425+
"static-libs-unix": [
426+
"libjxl.a",
427+
"libjxl_dec.a"
428+
],
429+
"lib-depends": [
430+
"brotli",
431+
"libgif",
432+
"libjpeg",
433+
"libpng",
434+
"libwebp"
435+
]
436+
},
422437
"liblz4": {
423438
"source": "liblz4",
424439
"static-libs-unix": [

config/source.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,14 @@
553553
"path": "LICENSE.md"
554554
}
555555
},
556+
"libjxl": {
557+
"type": "ghtar",
558+
"repo": "libjxl/libjxl",
559+
"license": {
560+
"type": "file",
561+
"path": "LICENSE"
562+
}
563+
},
556564
"liblz4": {
557565
"type": "ghrel",
558566
"repo": "lz4/lz4",
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 libjxl extends LinuxLibraryBase
8+
{
9+
use \SPC\builder\unix\library\libjxl;
10+
11+
public const NAME = 'libjxl';
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 libjxl extends MacOSLibraryBase
8+
{
9+
use \SPC\builder\unix\library\libjxl;
10+
11+
public const NAME = 'libjxl';
12+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ protected function build(): void
3232
->optionalLib('zstd', ...ac_with_args('zstd'))
3333
->optionalLib('freetype', ...ac_with_args('freetype'))
3434
->optionalLib('bzip2', ...ac_with_args('bzlib'))
35+
->optionalLib('libjxl', ...ac_with_args('jxl'))
3536
->addConfigureArgs(
3637
'--disable-openmp',
37-
'--without-jxl',
3838
'--without-x',
3939
);
4040

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SPC\builder\unix\library;
6+
7+
use SPC\util\executor\UnixCMakeExecutor;
8+
9+
trait libjxl
10+
{
11+
protected function build(): void
12+
{
13+
UnixCMakeExecutor::create($this)
14+
->addConfigureArgs('-DJPEGXL_ENABLE_TOOLS=OFF')
15+
->addConfigureArgs('-DJPEGXL_ENABLE_EXAMPLES=OFF')
16+
->addConfigureArgs('-DJPEGXL_ENABLE_MANPAGES=OFF')
17+
->addConfigureArgs('-DJPEGXL_ENABLE_BENCHMARK=OFF')
18+
->addConfigureArgs('-DJPEGXL_ENABLE_PLUGINS=OFF')
19+
->addConfigureArgs('-DJPEGXL_ENABLE_SJPEG=OFF')
20+
->addConfigureArgs('-DJPEGXL_STATIC=ON')
21+
->addConfigureArgs('-DBUILD_TESTING=OFF')
22+
->build();
23+
}
24+
}

0 commit comments

Comments
 (0)