Build xapian with classic autotools on other platform than Windows.
The meson build fails on cross compiliation `win32_*` and on `native_dyn` on Macos (but doesn't fail on `native_static` or `native_mixed`...) On top of that, the fact that xapian-meson build system is fluky on Windows doesn't make me confident. As I will be out for few months, I prefer keep the autotool build system on already working configs.
This commit is contained in:
parent
16654f9563
commit
752bdd18ac
|
@ -3,50 +3,55 @@ from .base import Dependency, GitClone, ReleaseDownload, MakeBuilder, MesonBuild
|
||||||
from kiwixbuild.utils import Remotefile
|
from kiwixbuild.utils import Remotefile
|
||||||
from kiwixbuild._global import neutralEnv
|
from kiwixbuild._global import neutralEnv
|
||||||
|
|
||||||
|
import platform
|
||||||
|
|
||||||
|
|
||||||
class Xapian(Dependency):
|
class Xapian(Dependency):
|
||||||
name = "xapian-core"
|
name = "xapian-core"
|
||||||
|
|
||||||
|
if platform.system() == "Windows":
|
||||||
|
|
||||||
class Source(GitClone):
|
class Source(GitClone):
|
||||||
git_remote = "https://github.com/openzim/xapian-meson.git"
|
git_remote = "https://github.com/openzim/xapian-meson.git"
|
||||||
git_dir = "xapian-core"
|
git_dir = "xapian-core"
|
||||||
|
|
||||||
# class Source(ReleaseDownload):
|
|
||||||
# src_archive = Remotefile(
|
|
||||||
# "xapian-core-1.4.23.tar.xz",
|
|
||||||
# "30d3518172084f310dab86d262b512718a7f9a13635aaa1a188e61dc26b2288c"
|
|
||||||
# )
|
|
||||||
# meson_patch = Remotefile(
|
|
||||||
# "xapian-core-1.4.23-1_patch.zip",
|
|
||||||
# "",
|
|
||||||
# "https://public.kymeria.fr/KIWIX/xapian-core-1.4.23-1_patch.zip"
|
|
||||||
# )
|
|
||||||
# archives = [src_archive, meson_patch]
|
|
||||||
|
|
||||||
# class Builder(MakeBuilder):
|
|
||||||
# configure_options = [
|
|
||||||
# "--disable-sse",
|
|
||||||
# "--disable-backend-chert",
|
|
||||||
# "--disable-backend-remote",
|
|
||||||
# "--disable-documentation"]
|
|
||||||
# configure_env = {'_format_LDFLAGS': "{env.LDFLAGS} -L{buildEnv.install_dir}/{buildEnv.libprefix}",
|
|
||||||
# '_format_CXXFLAGS': "{env.CXXFLAGS} -I{buildEnv.install_dir}/include"}
|
|
||||||
|
|
||||||
class Builder(MesonBuilder):
|
class Builder(MesonBuilder):
|
||||||
configure_options = [
|
configure_options = [
|
||||||
"-Denable-sse=false",
|
"-Denable-sse=false",
|
||||||
"-Denable-backend-chert=false",
|
"-Denable-backend-chert=false",
|
||||||
"-Denable-backend-remote=false"
|
"-Denable-backend-remote=false",
|
||||||
]
|
]
|
||||||
subsource_dir = "xapian-core"
|
subsource_dir = "xapian-core"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_dependencies(cls, configInfo, allDeps):
|
def get_dependencies(cls, configInfo, allDeps):
|
||||||
if neutralEnv("distname") == "Windows":
|
|
||||||
return ["zlib"]
|
return ["zlib"]
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
|
class Source(ReleaseDownload):
|
||||||
|
archive = Remotefile(
|
||||||
|
"xapian-core-1.4.23.tar.xz",
|
||||||
|
"30d3518172084f310dab86d262b512718a7f9a13635aaa1a188e61dc26b2288c",
|
||||||
|
)
|
||||||
|
|
||||||
|
class Builder(MakeBuilder):
|
||||||
|
configure_options = [
|
||||||
|
"--disable-sse",
|
||||||
|
"--disable-backend-chert",
|
||||||
|
"--disable-backend-remote",
|
||||||
|
"--disable-documentation",
|
||||||
|
]
|
||||||
|
configure_env = {
|
||||||
|
"_format_LDFLAGS": "{env.LDFLAGS} -L{buildEnv.install_dir}/{buildEnv.libprefix}",
|
||||||
|
"_format_CXXFLAGS": "{env.CXXFLAGS} -I{buildEnv.install_dir}/include",
|
||||||
|
}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_dependencies(cls, configInfo, allDeps):
|
||||||
deps = ["zlib", "lzma"]
|
deps = ["zlib", "lzma"]
|
||||||
if (
|
if (
|
||||||
configInfo.build in ("win32", "wasm")
|
configInfo.build in ("win32", "win64", "wasm")
|
||||||
or neutralEnv("distname") == "Darwin"
|
or neutralEnv("distname") == "Darwin"
|
||||||
):
|
):
|
||||||
return deps
|
return deps
|
||||||
|
|
Loading…
Reference in New Issue