Compile zim-tools dependencies on Windows github CI.

This commit is contained in:
Matthieu Gautier 2024-08-26 11:04:50 +02:00
parent d08c6095a3
commit a7f42fcc99
2 changed files with 7 additions and 3 deletions

View File

@ -22,7 +22,7 @@ BUILD_DEF = """
| manylinux | aarch64_mixed | BP | | | | | linux-aarch64-manylinux | | | manylinux | aarch64_mixed | BP | | | | | linux-aarch64-manylinux | |
---------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------
# On Windows, we build only libzim for now. And only native_mixed as xapian doesn't compile as dll # On Windows, we build only libzim for now. And only native_mixed as xapian doesn't compile as dll
| windows | native_static | Bd | d | | d | | win-x86_64 | win-x86_64-static | | windows | native_static | Bd | d | d | d | | win-x86_64 | win-x86_64-static |
| windows | native_dyn | Bd | | | | | win-x86_64 | win-x86_64-dyn | | windows | native_dyn | Bd | | | | | win-x86_64 | win-x86_64-dyn |
| windows | native_mixed | BPd | d | | | Bd | win-x86_64 | win-x86_64-mixed | | windows | native_mixed | BPd | d | | | Bd | win-x86_64 | win-x86_64-mixed |
---------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -1,4 +1,5 @@
from .base import Dependency, GitClone, MesonBuilder from .base import Dependency, GitClone, MesonBuilder
from kiwixbuild._global import neutralEnv
class ZimTools(Dependency): class ZimTools(Dependency):
@ -13,14 +14,17 @@ class ZimTools(Dependency):
@classmethod @classmethod
def get_dependencies(cls, configInfo, allDeps): def get_dependencies(cls, configInfo, allDeps):
base_deps = ["libzim", "docoptcpp", "mustache"] base_deps = ["libzim", "docoptcpp", "mustache"]
if configInfo.build != "win32": if configInfo.build != "win32" and neutralEnv("distname") != "Windows":
base_deps += ["libmagic", "gumbo"] base_deps += ["libmagic", "gumbo"]
return base_deps return base_deps
@property @property
def configure_options(self): def configure_options(self):
# We don't build zimwriterfs on win32, and so we don't have magic # We don't build zimwriterfs on win32, and so we don't have magic
if self.buildEnv.configInfo.build != "win32": if (
self.buildEnv.configInfo.build != "win32"
and neutralEnv("distname") != "Windows"
):
yield f"-Dmagic-install-prefix={self.buildEnv.install_dir}" yield f"-Dmagic-install-prefix={self.buildEnv.install_dir}"
if self.buildEnv.configInfo.static: if self.buildEnv.configInfo.static:
yield "-Dstatic-linkage=true" yield "-Dstatic-linkage=true"