mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
add libxslt compile command
This commit is contained in:
parent
238fd7fc74
commit
6c49d35aec
@ -449,9 +449,13 @@
|
||||
},
|
||||
"xsl": {
|
||||
"type": "builtin",
|
||||
"arg-type": "with",
|
||||
"arg-type": "with-prefix",
|
||||
"lib-depends": [
|
||||
"libxslt"
|
||||
],
|
||||
"ext-depends": [
|
||||
"xml",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"yaml": {
|
||||
|
||||
@ -293,6 +293,16 @@
|
||||
"pthreads4w"
|
||||
]
|
||||
},
|
||||
"libxslt": {
|
||||
"source": "libxslt",
|
||||
"static-libs-unix": [
|
||||
"libxslt.a",
|
||||
"libexslt.a"
|
||||
],
|
||||
"lib-depends": [
|
||||
"libxml2"
|
||||
]
|
||||
},
|
||||
"libyaml": {
|
||||
"source": "libyaml",
|
||||
"static-libs-unix": [
|
||||
|
||||
@ -16,15 +16,6 @@
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"libxslt": {
|
||||
"type": "filelist",
|
||||
"url": "https://download.gnome.org/sources/libxslt/1.1/",
|
||||
"regex": "/href=\"(?<file>libxslt-(?<version>[^\"]+)\\.tar\\.xz)\"/",
|
||||
"license": {
|
||||
"type": "text",
|
||||
"text": "TODO"
|
||||
}
|
||||
},
|
||||
"brotli": {
|
||||
"type": "ghtar",
|
||||
"repo": "google/brotli",
|
||||
@ -263,6 +254,15 @@
|
||||
"path": "Copyright"
|
||||
}
|
||||
},
|
||||
"libxslt": {
|
||||
"type": "filelist",
|
||||
"url": "https://download.gnome.org/sources/libxslt/1.1/",
|
||||
"regex": "/href=\"(?<file>libxslt-(?<version>[^\"]+)\\.tar\\.xz)\"/",
|
||||
"license": {
|
||||
"type": "text",
|
||||
"text": "TODO"
|
||||
}
|
||||
},
|
||||
"libyaml": {
|
||||
"type": "ghrel",
|
||||
"repo": "yaml/libyaml",
|
||||
|
||||
15
src/SPC/builder/linux/library/libxslt.php
Normal file
15
src/SPC/builder/linux/library/libxslt.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\linux\library;
|
||||
|
||||
/**
|
||||
* gmp is a template library class for unix
|
||||
*/
|
||||
class libxslt extends LinuxLibraryBase
|
||||
{
|
||||
use \SPC\builder\unix\library\libxslt;
|
||||
|
||||
public const NAME = 'libxslt';
|
||||
}
|
||||
15
src/SPC/builder/macos/library/libxslt.php
Normal file
15
src/SPC/builder/macos/library/libxslt.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\macos\library;
|
||||
|
||||
/**
|
||||
* gmp is a template library class for unix
|
||||
*/
|
||||
class libxslt extends MacOSLibraryBase
|
||||
{
|
||||
use \SPC\builder\unix\library\libxslt;
|
||||
|
||||
public const NAME = 'libxslt';
|
||||
}
|
||||
35
src/SPC/builder/unix/library/libxslt.php
Normal file
35
src/SPC/builder/unix/library/libxslt.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\unix\library;
|
||||
|
||||
use SPC\exception\FileSystemException;
|
||||
use SPC\exception\RuntimeException;
|
||||
|
||||
trait libxslt
|
||||
{
|
||||
/**
|
||||
* @throws FileSystemException
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
protected function build(): void
|
||||
{
|
||||
shell()->cd($this->source_dir)
|
||||
->exec(
|
||||
"{$this->builder->configure_env} ./configure " .
|
||||
'--enable-static --disable-shared ' .
|
||||
'--without-python ' .
|
||||
'--without-mem-debug ' .
|
||||
'--without-crypto ' .
|
||||
'--without-debug ' .
|
||||
'--without-debugger ' .
|
||||
'--with-libxml-prefix=' . escapeshellarg(BUILD_ROOT_PATH) . ' ' .
|
||||
'--prefix='
|
||||
)
|
||||
->exec('make clean')
|
||||
->exec("make -j{$this->builder->concurrency}")
|
||||
->exec('make install DESTDIR=' . escapeshellarg(BUILD_ROOT_PATH));
|
||||
$this->patchPkgconfPrefix(['libexslt.pc']);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user