Merge pull request #510 from kiwix/aria2-1.36.9

This commit is contained in:
Matthieu Gautier 2021-12-25 18:37:40 +01:00 committed by GitHub
commit 67788c63f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 20 additions and 69 deletions

View File

@ -1,4 +1,4 @@
REM ========================================================
REM Install aria2
curl -fsSL -O https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-64bit-build1.zip || exit /b 1
7z e aria2-1.34.0-win-64bit-build1.zip -o%EXTRA_DIR% aria2-1.34.0-win-64bit-build1\aria2c.exe || exit /b 1
curl -fsSL -O https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0-win-64bit-build1.zip || exit /b 1
7z e aria2-1.36.0-win-64bit-build1.zip -o%EXTRA_DIR% aria2-1.36.0-win-64bit-build1\aria2c.exe || exit /b 1

View File

@ -13,12 +13,15 @@ class AllBaseDependencies(Dependency):
@classmethod
def get_dependencies(cls, platformInfo, allDeps):
base_deps = ['zlib', 'lzma', 'zstd', 'xapian-core', 'pugixml', 'libcurl', 'icu4c', 'mustache', 'libmicrohttpd', 'zim-testing-suite']
# zimtools
# We do not build zimtools at all on "android" and "iOS"
# Add specific dependencies depending of the platform
if platformInfo.build not in ('android', 'iOS'):
# For zimtools
base_deps += ['docoptcpp']
if platformInfo.build != 'win32':
# zimwriterfs
base_deps += ['libmagic', 'gumbo']
if platformInfo.build == 'native' and neutralEnv('distname') != 'Darwin':
# We compile kiwix-desktop only on native and not on `Darwin`
# So we need aria2 only there
base_deps += ['aria2']
return base_deps

View File

@ -10,11 +10,9 @@ 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"]
archive = Remotefile('aria2-1.36.0.tar.xz',
'58d1e7608c12404f0229a3d9a4953d0d00c18040504498b483305bcb3de907a5',
'https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0.tar.xz')
def _post_prepare_script(self, context):
context.try_skip(self.extract_path)

View File

@ -11,10 +11,9 @@ class zstd(Dependency):
name = 'zstd'
class Source(ReleaseDownload):
archive = Remotefile('zstd-1.4.4.tar.gz',
'59ef70ebb757ffe74a7b3fe9c305e2ba3350021a918d168a046c6300aeea9315',
'https://github.com/facebook/zstd/releases/download/v1.4.4/zstd-1.4.4.tar.gz')
patches = ['zstd_meson.patch']
archive = Remotefile('zstd-1.5.1.tar.gz',
'e28b2f2ed5710ea0d3a1ecac3f6a947a016b972b9dd30242369010e5f53d7002',
'https://github.com/facebook/zstd/releases/download/v1.5.1/zstd-1.5.1.tar.gz')
class Builder(MesonBuilder):
subsource_dir = 'build/meson'

View File

@ -1,29 +0,0 @@
diff -ur libaria2-1.33.1/src/a2io.h libaria2-1.33.1.patched/src/a2io.h
--- libaria2-1.33.1/src/a2io.h 2017-11-08 13:39:06.000000000 +0100
+++ libaria2-1.33.1.patched/src/a2io.h 2018-03-27 17:02:45.651414060 +0200
@@ -147,7 +147,7 @@
// # define a2fseek(fp, offset, origin): No fseek64 and not used in aria2
#define a2fstat(fd, buf) fstat64(fd, buf)
// # define a2ftell(fd): No ftell64 and not used in aria2
-#define a2_struct_stat struct stat
+#define a2_struct_stat struct stat64
#define a2stat(path, buf) stat64(path, buf)
#define a2mkdir(path, openMode) mkdir(path, openMode)
#define a2utimbuf utimbuf
diff -ur libaria2-1.33.1/src/crypto_endian.h libaria2-1.33.1.patched/src/crypto_endian.h
--- libaria2-1.33.1/src/crypto_endian.h 2017-11-08 13:39:06.000000000 +0100
+++ libaria2-1.33.1.patched/src/crypto_endian.h 2018-03-27 16:56:55.264371501 +0200
@@ -33,9 +33,13 @@
#define BIG_ENDIAN 4321
#define BYTE_ORDER LITTLE_ENDIAN
#else // ! defined(_WIN32) || defined(__INTEL_COMPILER) || defined (_MSC_VER)
+#if defined(__ANDROID__)
+#include <endian.h>
+#else // defined(__ANDROID__)
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif // HAVE_SYS_PARAM_H
+#endif // defined(__ANDROID__)
#endif // ! defined(_WIN32) || defined(__INTEL_COMPILER) || defined (_MSC_VER)
#if !defined(LITTLE_ENDIAN) || !defined(BIG_ENDIAN) || !defined(BYTE_ORDER) || \

View File

@ -1,20 +0,0 @@
diff -ur zstd-1.4.4/build/meson/meson.build zstd-1.4.4.patched/build/meson/meson.build
--- zstd-1.4.4/build/meson/meson.build 2019-11-04 21:54:32.000000000 +0400
+++ zstd-1.4.4.patched/build/meson/meson.build 2020-04-07 13:59:26.012106549 +0400
@@ -68,6 +68,7 @@
# Built-in options
use_debug = get_option('debug')
buildtype = get_option('buildtype')
+default_library_type = get_option('default_library')
# Custom options
debug_level = get_option('debug_level')
@@ -121,7 +122,7 @@
if use_multi_thread
msvc_compile_flags += '/MP'
endif
- if enable_static_runtime
+ if use_static_runtime
msvc_compile_flags += '/MT'
endif
add_project_arguments(msvc_compile_flags, language: ['c', 'cpp'])

View File

@ -39,12 +39,12 @@ release_versions = {
# This is the "version" of the whole base_deps_versions dict.
# Change this when you change base_deps_versions.
base_deps_meta_version = '74'
base_deps_meta_version = '75'
base_deps_versions = {
'zlib' : '1.2.8',
'lzma' : '5.2.4',
'zstd' : '1.4.4',
'zstd' : '1.5.1',
'docoptcpp' : '0.6.2',
'uuid' : '1.43.4',
'xapian-core' : '1.4.18',
@ -53,7 +53,7 @@ base_deps_versions = {
'libmicrohttpd' : '0.9.72',
'gumbo' : '0.10.1',
'icu4c' : '58.2',
'libaria2' : '1.33.1',
'libaria2' : '1.36.0',
'libmagic' : '5.35',
'android-sdk' : 'r25.2.3',
'android-ndk' : 'r13b',

View File

@ -31,9 +31,9 @@ mkdir -p $APPDIR/usr/share/applications
cp $DESKTOPFILE $APPDIR/usr/share/applications/kiwix-desktop.desktop
# get the aria2
wget --continue https://github.com/q3aql/aria2-static-builds/releases/download/v1.34.0/aria2-1.34.0-linux-gnu-64bit-build1.tar.bz2
mkdir -p $APPDIR/usr/bin/ && tar -C $APPDIR/usr/bin/ -xf aria2-1.34.0-linux-gnu-64bit-build1.tar.bz2 aria2-1.34.0-linux-gnu-64bit-build1/aria2c --strip-components=1
mkdir -p $APPDIR/etc/ssl/certs/ && tar -C $APPDIR/etc/ssl/certs/ -xf aria2-1.34.0-linux-gnu-64bit-build1.tar.bz2 aria2-1.34.0-linux-gnu-64bit-build1/ca-certificates.crt --strip-components=1
wget --continue https://github.com/q3aql/aria2-static-builds/releases/download/v1.36.0/aria2-1.36.0-linux-gnu-64bit-build1.tar.bz2
mkdir -p $APPDIR/usr/bin/ && tar -C $APPDIR/usr/bin/ -xf aria2-1.36.0-linux-gnu-64bit-build1.tar.bz2 aria2-1.36.0-linux-gnu-64bit-build1/aria2c --strip-components=1
mkdir -p $APPDIR/etc/ssl/certs/ && tar -C $APPDIR/etc/ssl/certs/ -xf aria2-1.36.0-linux-gnu-64bit-build1.tar.bz2 aria2-1.36.0-linux-gnu-64bit-build1/ca-certificates.crt --strip-components=1
# Get linuxdeployqt
wget --continue https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage