mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
add tidy support
This commit is contained in:
parent
2e24976b71
commit
04f100da8b
@ -278,11 +278,6 @@
|
|||||||
"sqlite"
|
"sqlite"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rar": {
|
|
||||||
"type": "external",
|
|
||||||
"source": "rar",
|
|
||||||
"cpp-extension": true
|
|
||||||
},
|
|
||||||
"pgsql": {
|
"pgsql": {
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
@ -311,6 +306,11 @@
|
|||||||
"aspell"
|
"aspell"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"rar": {
|
||||||
|
"type": "external",
|
||||||
|
"source": "rar",
|
||||||
|
"cpp-extension": true
|
||||||
|
},
|
||||||
"readline": {
|
"readline": {
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
@ -435,7 +435,7 @@
|
|||||||
},
|
},
|
||||||
"tidy": {
|
"tidy": {
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with",
|
"arg-type": "with-prefix",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
"tidy"
|
"tidy"
|
||||||
]
|
]
|
||||||
|
|||||||
@ -483,6 +483,12 @@
|
|||||||
"sqlite3ext.h"
|
"sqlite3ext.h"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"tidy": {
|
||||||
|
"source": "tidy",
|
||||||
|
"static-libs-unix": [
|
||||||
|
"libtidy.a"
|
||||||
|
]
|
||||||
|
},
|
||||||
"xz": {
|
"xz": {
|
||||||
"source": "xz",
|
"source": "xz",
|
||||||
"static-libs-unix": [
|
"static-libs-unix": [
|
||||||
|
|||||||
@ -51,16 +51,6 @@
|
|||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rar": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/static-php/php-rar.git",
|
|
||||||
"path": "php-src/ext/rar",
|
|
||||||
"rev": "issue-php82",
|
|
||||||
"license": {
|
|
||||||
"type": "file",
|
|
||||||
"path": "LICENSE"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ext-glfw": {
|
"ext-glfw": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/mario-deluna/php-glfw",
|
"url": "https://github.com/mario-deluna/php-glfw",
|
||||||
@ -412,6 +402,16 @@
|
|||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rar": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/static-php/php-rar.git",
|
||||||
|
"path": "php-src/ext/rar",
|
||||||
|
"rev": "issue-php82",
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": "LICENSE"
|
||||||
|
}
|
||||||
|
},
|
||||||
"readline": {
|
"readline": {
|
||||||
"type": "filelist",
|
"type": "filelist",
|
||||||
"url": "https://ftp.gnu.org/pub/gnu/readline/",
|
"url": "https://ftp.gnu.org/pub/gnu/readline/",
|
||||||
@ -469,6 +469,15 @@
|
|||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"tidy": {
|
||||||
|
"type": "url",
|
||||||
|
"url": "https://github.com/htacg/tidy-html5/archive/refs/tags/5.8.0.tar.gz",
|
||||||
|
"filename": "tidy-html5.tgz",
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": "README/LICENSE.md"
|
||||||
|
}
|
||||||
|
},
|
||||||
"xlswriter": {
|
"xlswriter": {
|
||||||
"type": "url",
|
"type": "url",
|
||||||
"url": "https://pecl.php.net/get/xlswriter",
|
"url": "https://pecl.php.net/get/xlswriter",
|
||||||
|
|||||||
12
src/SPC/builder/macos/library/tidy.php
Normal file
12
src/SPC/builder/macos/library/tidy.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\macos\library;
|
||||||
|
|
||||||
|
class tidy extends MacOSLibraryBase
|
||||||
|
{
|
||||||
|
use \SPC\builder\unix\library\tidy;
|
||||||
|
|
||||||
|
public const NAME = 'tidy';
|
||||||
|
}
|
||||||
32
src/SPC/builder/unix/library/tidy.php
Normal file
32
src/SPC/builder/unix/library/tidy.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\unix\library;
|
||||||
|
|
||||||
|
use SPC\exception\FileSystemException;
|
||||||
|
use SPC\exception\RuntimeException;
|
||||||
|
use SPC\store\FileSystem;
|
||||||
|
|
||||||
|
trait tidy
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @throws RuntimeException
|
||||||
|
* @throws FileSystemException
|
||||||
|
*/
|
||||||
|
protected function build(): void
|
||||||
|
{
|
||||||
|
FileSystem::resetDir($this->source_dir . '/build-dir');
|
||||||
|
shell()->cd($this->source_dir . '/build-dir')
|
||||||
|
->exec(
|
||||||
|
'cmake ' .
|
||||||
|
"{$this->builder->makeCmakeArgs()} " .
|
||||||
|
'-DBUILD_SHARED_LIB=OFF ' .
|
||||||
|
'-DSUPPORT_CONSOLE_APP=OFF ' .
|
||||||
|
'..'
|
||||||
|
)
|
||||||
|
->exec("cmake --build . -j {$this->builder->concurrency}")
|
||||||
|
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
|
||||||
|
$this->patchPkgconfPrefix(['tidy.pc']);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user