diff --git a/kiwixbuild/dependencies/__init__.py b/kiwixbuild/dependencies/__init__.py index d2d8681..c7d13e4 100644 --- a/kiwixbuild/dependencies/__init__.py +++ b/kiwixbuild/dependencies/__init__.py @@ -4,6 +4,7 @@ from . import ( all_dependencies, android_ndk, android_sdk, + aria2, armhf, ctpp2, flatpak, diff --git a/kiwixbuild/dependencies/aria2.py b/kiwixbuild/dependencies/aria2.py new file mode 100644 index 0000000..8432058 --- /dev/null +++ b/kiwixbuild/dependencies/aria2.py @@ -0,0 +1,26 @@ +from .base import ( + Dependency, + ReleaseDownload, + MakeBuilder +) + +from kiwixbuild.utils import Remotefile, run_command + +class Aria2(Dependency): + name = "aria2" + + class Source(ReleaseDownload): + archive = Remotefile('aria2-1.34.0.tar.xz', + '3a44a802631606e138a9e172a3e9f5bcbaac43ce2895c1d8e2b46f30487e77a3', + 'https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0.tar.xz') + + patches = ["libaria2_android.patch"] + + def _post_prepare_script(self, context): + context.try_skip(self.extract_path) + command = "autoreconf -i" + run_command(command, self.extract_path, context) + + class Builder(MakeBuilder): + dependencies = ['zlib'] + configure_option = "--disable-libaria2 --without-sqlite3" diff --git a/kiwixbuild/dependencies/kiwix_desktop.py b/kiwixbuild/dependencies/kiwix_desktop.py index 66e810a..5832f4d 100644 --- a/kiwixbuild/dependencies/kiwix_desktop.py +++ b/kiwixbuild/dependencies/kiwix_desktop.py @@ -11,7 +11,7 @@ class KiwixDesktop(Dependency): git_dir = "kiwix-desktop" class Builder(QMakeBuilder): - dependencies = ["qt", "qtwebengine", "kiwix-lib"] + dependencies = ["qt", "qtwebengine", "kiwix-lib", "aria2"] @property def configure_option(self): options = ["PREFIX={}".format(self.buildEnv.install_dir)] diff --git a/kiwixbuild/packages.py b/kiwixbuild/packages.py index 7f64dde..54fb6bd 100644 --- a/kiwixbuild/packages.py +++ b/kiwixbuild/packages.py @@ -28,6 +28,7 @@ PACKAGE_NAME_MAPPERS = { 'zimlib': None, 'file' : ['file-devel'], 'gumbo' : ['gumbo-parser-devel'], + 'aria2': ['aria2'], }, 'fedora_native_static': { 'COMMON': _fedora_common + ['glibc-static', 'libstdc++-static'], @@ -72,6 +73,7 @@ PACKAGE_NAME_MAPPERS = { 'libmicrohttpd': ['libmicrohttpd-dev', 'ccache'], 'qt' : ['libqt5gui5', 'qtbase5-dev', 'qt5-default'], 'qtwebengine' : ['qtwebengine5-dev'], + 'aria2': ['aria2'], }, 'debian_native_static': { 'COMMON': _debian_common + ['libbz2-dev', 'libmagic-dev'], diff --git a/travis/Dockerfile b/travis/Dockerfile index c2c4bda..8535e3b 100644 --- a/travis/Dockerfile +++ b/travis/Dockerfile @@ -33,6 +33,7 @@ RUN \ ctpp2-utils \ libctpp2-dev \ libmicrohttpd-dev \ + aria2 \ # Qt packages libqt5gui5 \ qtbase5-dev \