Merge pull request #440 from kiwix/add_docoptcpp_dep
This commit is contained in:
commit
acf66e36af
|
@ -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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from .base import (
|
||||
Dependency,
|
||||
ReleaseDownload,
|
||||
GitClone,
|
||||
CMakeBuilder)
|
||||
|
||||
from kiwixbuild.utils import Remotefile
|
||||
|
@ -10,10 +10,11 @@ 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"
|
||||
force_full_clone = True
|
||||
git_ref = "3dd23e3280f213bacefdf5fcb04857bf52e90917"
|
||||
|
||||
class Builder(CMakeBuilder):
|
||||
make_install_target = 'install'
|
||||
|
|
Loading…
Reference in New Issue