diff --git a/config/pkg/lib/libxml2.yml b/config/pkg/lib/libxml2.yml index db88e8b1..7e86b5af 100644 --- a/config/pkg/lib/libxml2.yml +++ b/config/pkg/lib/libxml2.yml @@ -10,9 +10,8 @@ libxml2: license: MIT depends@unix: - libiconv - suggests@unix: - - xz - zlib + - xz headers: - libxml2 pkg-configs: diff --git a/src/Package/Library/libxml2.php b/src/Package/Library/libxml2.php index 7c35d685..3f8b3e71 100644 --- a/src/Package/Library/libxml2.php +++ b/src/Package/Library/libxml2.php @@ -17,17 +17,13 @@ class libxml2 public function buildForLinux(LibraryPackage $lib): void { UnixCMakeExecutor::create($lib) - ->optionalPackage( - 'zlib', - '-DLIBXML2_WITH_ZLIB=ON ' . - "-DZLIB_LIBRARY={$lib->getLibDir()}/libz.a " . - "-DZLIB_INCLUDE_DIR={$lib->getIncludeDir()}", - '-DLIBXML2_WITH_ZLIB=OFF', - ) - ->optionalPackage('xz', ...cmake_boolean_args('LIBXML2_WITH_LZMA')) ->addConfigureArgs( '-DLIBXML2_WITH_ICONV=ON', '-DIconv_IS_BUILT_IN=OFF', + '-DLIBXML2_WITH_ZLIB=ON', + "-DZLIB_LIBRARY={$lib->getLibDir()}/libz.a", + "-DZLIB_INCLUDE_DIR={$lib->getIncludeDir()}", + '-DLIBXML2_WITH_LZMA=ON', '-DLIBXML2_WITH_ICU=OFF', // optional, but discouraged: https://gitlab.gnome.org/GNOME/libxml2/-/blob/master/README.md '-DLIBXML2_WITH_PYTHON=OFF', '-DLIBXML2_WITH_PROGRAMS=OFF', diff --git a/src/StaticPHP/Artifact/ArtifactCache.php b/src/StaticPHP/Artifact/ArtifactCache.php index dcd75ef7..2cdd0d0a 100644 --- a/src/StaticPHP/Artifact/ArtifactCache.php +++ b/src/StaticPHP/Artifact/ArtifactCache.php @@ -19,6 +19,7 @@ class ArtifactCache * dirname?: string, * extract: null|'&custom'|string, * hash: null|string, + * time: int, * downloader: null|string * }, * binary: array{ @@ -29,6 +30,7 @@ class ArtifactCache * dirname?: string, * extract: null|'&custom'|string, * hash: null|string, + * time: int, * version?: null|string, * downloader: null|string * } @@ -108,6 +110,7 @@ class ArtifactCache 'filename' => $download_result->filename, 'extract' => $download_result->extract, 'hash' => sha1_file(DOWNLOAD_PATH . '/' . $download_result->filename), + 'time' => time(), 'version' => $download_result->version, 'config' => $download_result->config, 'downloader' => $download_result->downloader, @@ -119,6 +122,7 @@ class ArtifactCache 'filename' => $download_result->filename, 'extract' => $download_result->extract, 'hash' => sha1_file(DOWNLOAD_PATH . '/' . $download_result->filename), + 'time' => time(), 'version' => $download_result->version, 'config' => $download_result->config, 'downloader' => $download_result->downloader, @@ -130,6 +134,7 @@ class ArtifactCache 'dirname' => $download_result->dirname, 'extract' => $download_result->extract, 'hash' => trim(exec('cd ' . escapeshellarg(DOWNLOAD_PATH . '/' . $download_result->dirname) . ' && ' . SPC_GIT_EXEC . ' rev-parse HEAD')), + 'time' => time(), 'version' => $download_result->version, 'config' => $download_result->config, 'downloader' => $download_result->downloader, @@ -141,6 +146,7 @@ class ArtifactCache 'dirname' => $download_result->dirname, 'extract' => $download_result->extract, 'hash' => null, + 'time' => time(), 'version' => $download_result->version, 'config' => $download_result->config, 'downloader' => $download_result->downloader,