From 30e500f78d0f14f6e000a74065bf07de321334f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 24 Jun 2024 10:28:28 +0200 Subject: [PATCH] fix: error when building libtiff --- src/SPC/builder/unix/library/libtiff.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/SPC/builder/unix/library/libtiff.php b/src/SPC/builder/unix/library/libtiff.php index 08e6e7eb..4c93acea 100644 --- a/src/SPC/builder/unix/library/libtiff.php +++ b/src/SPC/builder/unix/library/libtiff.php @@ -15,14 +15,20 @@ trait libtiff */ protected function build(): void { - shell()->cd($this->source_dir) + $shell = shell()->cd($this->source_dir) ->exec( './configure ' . '--enable-static --disable-shared ' . '--disable-cxx ' . '--prefix=' - ) - ->exec('make clean') + ); + + // TODO: Remove this check when https://gitlab.com/libtiff/libtiff/-/merge_requests/635 will be merged and released + if (file_exists($this->source_dir . '/html')) { + $shell->exec('make clean'); + } + + $shell ->exec("make -j{$this->builder->concurrency}") ->exec('make install DESTDIR=' . BUILD_ROOT_PATH); $this->patchPkgconfPrefix(['libtiff-4.pc']);