File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed
src/SPC/builder/unix/library Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,13 @@ trait libxml2
17
17
public function build (): void
18
18
{
19
19
$ cmake = UnixCMakeExecutor::create ($ this )
20
- ->optionalLib ('zlib ' , "-DLIBXML2_WITH_ZLIB=ON -DZLIB_LIBRARY= {$ this ->getLibDir ()}/libz.a -DZLIB_INCLUDE_DIR= {$ this ->getIncludeDir ()}" , '-DLIBXML2_WITH_ZLIB=OFF ' )
20
+ ->optionalLib (
21
+ 'zlib ' ,
22
+ '-DLIBXML2_WITH_ZLIB=ON ' .
23
+ "-DZLIB_LIBRARY= {$ this ->getLibDir ()}/libz.a " .
24
+ "-DZLIB_INCLUDE_DIR= {$ this ->getIncludeDir ()}" ,
25
+ '-DLIBXML2_WITH_ZLIB=OFF ' ,
26
+ )
21
27
->optionalLib ('icu ' , ...cmake_boolean_args ('LIBXML2_WITH_ICU ' ))
22
28
->optionalLib ('xz ' , ...cmake_boolean_args ('LIBXML2_WITH_LZMA ' ))
23
29
->addConfigureArgs (
@@ -35,8 +41,13 @@ public function build(): void
35
41
36
42
FileSystem::replaceFileStr (
37
43
BUILD_LIB_PATH . '/pkgconfig/libxml-2.0.pc ' ,
38
- '-licudata -licui18n -licuuc ' ,
39
- '-licui18n -licuuc -licudata '
44
+ '-lxml2 -liconv ' ,
45
+ '-lxml2 '
46
+ );
47
+ FileSystem::replaceFileStr (
48
+ BUILD_LIB_PATH . '/pkgconfig/libxml-2.0.pc ' ,
49
+ '-lxml2 ' ,
50
+ '-lxml2 -liconv '
40
51
);
41
52
}
42
53
}
Original file line number Diff line number Diff line change @@ -16,13 +16,16 @@ trait tidy
16
16
*/
17
17
protected function build (): void
18
18
{
19
- UnixCMakeExecutor::create ($ this )
19
+ $ cmake = UnixCMakeExecutor::create ($ this )
20
20
->setBuildDir ("{$ this ->source_dir }/build-dir " )
21
21
->addConfigureArgs (
22
22
'-DSUPPORT_CONSOLE_APP=OFF ' ,
23
23
'-DBUILD_SHARED_LIB=OFF '
24
- )
25
- ->build ();
24
+ );
25
+ if (version_compare (get_cmake_version (), '4.0.0 ' , '>= ' )) {
26
+ $ cmake ->addConfigureArgs ('-DCMAKE_POLICY_VERSION_MINIMUM=3.5 ' );
27
+ }
28
+ $ cmake ->build ();
26
29
$ this ->patchPkgconfPrefix (['tidy.pc ' ]);
27
30
}
28
31
}
You can’t perform that action at this time.
0 commit comments