From 69c33da0bcf1384e9527e7c5461321d933ee07c9 Mon Sep 17 00:00:00 2001 From: MiguelRocha Date: Mon, 4 May 2020 15:51:21 +0100 Subject: [PATCH 1/2] Now kiwix-build retrives docopt from a commit that has pkgconfig support. --- kiwixbuild/dependencies/docoptcpp.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kiwixbuild/dependencies/docoptcpp.py b/kiwixbuild/dependencies/docoptcpp.py index e63453e..32e1361 100644 --- a/kiwixbuild/dependencies/docoptcpp.py +++ b/kiwixbuild/dependencies/docoptcpp.py @@ -1,6 +1,6 @@ from .base import ( Dependency, - ReleaseDownload, + GitClone, CMakeBuilder) from kiwixbuild.utils import Remotefile @@ -10,10 +10,10 @@ from kiwixbuild.utils import Remotefile class docoptcpp(Dependency): name = 'docoptcpp' - class Source(ReleaseDownload): - archive = Remotefile('v0.6.2.tar.gz', - 'c05542245232420d735c7699098b1ea130e3a92bade473b64baf876cdf098a17', - 'https://github.com/docopt/docopt.cpp/archive/v0.6.2.tar.gz') + class Source(GitClone): + git_remote = "https://github.com/docopt/docopt.cpp.git" + git_dir = "docopt.cpp" + git_ref = "3dd23e3280f213bacefdf5fcb04857bf52e90917" class Builder(CMakeBuilder): make_install_target = 'install' From e72589a850c2f757112d387b34d0679e021d3c15 Mon Sep 17 00:00:00 2001 From: MiguelRocha Date: Wed, 6 May 2020 13:00:08 +0100 Subject: [PATCH 2/2] Added a flag to force kiwix build to not do fast_clone - Docopt cannot do fast_clone cause it is getting a specific commit id. This will be changed when a new release is available. --- kiwixbuild/dependencies/base.py | 3 ++- kiwixbuild/dependencies/docoptcpp.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kiwixbuild/dependencies/base.py b/kiwixbuild/dependencies/base.py index 0015c19..3ed677d 100644 --- a/kiwixbuild/dependencies/base.py +++ b/kiwixbuild/dependencies/base.py @@ -132,6 +132,7 @@ class ReleaseDownload(Source): class GitClone(Source): base_git_ref = "master" + force_full_clone = False @property def release_git_ref(self): @@ -156,7 +157,7 @@ class GitClone(Source): return self.base_git_ref def _git_init(self, context): - if option('fast_clone'): + if option('fast_clone') and self.force_full_clone == False: command = "git clone --depth=1 --branch {} {} {}".format( self.git_ref, self.git_remote, self.source_dir) run_command(command, neutralEnv('source_dir'), context) diff --git a/kiwixbuild/dependencies/docoptcpp.py b/kiwixbuild/dependencies/docoptcpp.py index 32e1361..0c8e64e 100644 --- a/kiwixbuild/dependencies/docoptcpp.py +++ b/kiwixbuild/dependencies/docoptcpp.py @@ -13,6 +13,7 @@ class docoptcpp(Dependency): class Source(GitClone): git_remote = "https://github.com/docopt/docopt.cpp.git" git_dir = "docopt.cpp" + force_full_clone = True git_ref = "3dd23e3280f213bacefdf5fcb04857bf52e90917" class Builder(CMakeBuilder):