mirror of
https://github.com/kiwix/kiwix-build.git
synced 2025-09-24 04:53:29 -04:00
Add dependency libaria2.
libaria2 needs a lot of dependencies to handle all protocol. So this is a basic compilation of libaria2 : No tls(https), no metalink and no bit-torrent.
This commit is contained in:
parent
067ac0d832
commit
98b2ab5efd
@ -89,3 +89,4 @@ addons:
|
|||||||
- gcc-mingw-w64-base
|
- gcc-mingw-w64-base
|
||||||
- mingw-w64-tools
|
- mingw-w64-tools
|
||||||
- default-jdk
|
- default-jdk
|
||||||
|
- autopoint
|
||||||
|
@ -193,6 +193,26 @@ class MicroHttpd(Dependency):
|
|||||||
configure_option = "--disable-https --without-libgcrypt --without-libcurl"
|
configure_option = "--disable-https --without-libgcrypt --without-libcurl"
|
||||||
|
|
||||||
|
|
||||||
|
class Aria2(Dependency):
|
||||||
|
name = "libaria2"
|
||||||
|
dependencies = ['zlib']
|
||||||
|
|
||||||
|
class Source(ReleaseDownload):
|
||||||
|
archive = Remotefile('libaria2-1.33.1.tar.gz',
|
||||||
|
'0616f11ef3ddd0c74be74ea2536be62ce168b99e3d6a35dea9d166b9cab9fbd1',
|
||||||
|
'https://github.com/aria2/aria2/archive/release-1.33.1.tar.gz')
|
||||||
|
|
||||||
|
patches = ["libaria2_android.patch"]
|
||||||
|
|
||||||
|
def _post_prepare_script(self, context):
|
||||||
|
context.try_skip(self.extract_path)
|
||||||
|
command = "autoreconf -i"
|
||||||
|
self.buildEnv.run_command(command, self.extract_path, context)
|
||||||
|
|
||||||
|
class Builder(MakeBuilder):
|
||||||
|
configure_option = "--enable-libaria2 --disable-ssl --disable-bittorent --disable-metalink"
|
||||||
|
|
||||||
|
|
||||||
class Gumbo(Dependency):
|
class Gumbo(Dependency):
|
||||||
name = "gumbo"
|
name = "gumbo"
|
||||||
|
|
||||||
@ -323,7 +343,7 @@ class Kiwixlib(Dependency):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def dependencies(self):
|
def dependencies(self):
|
||||||
base_dependencies = ["pugixml", "libzim", "zlib", "lzma"]
|
base_dependencies = ["pugixml", "libzim", "zlib", "lzma", "libaria2"]
|
||||||
if ( self.buildEnv.platform_info.build != 'android'
|
if ( self.buildEnv.platform_info.build != 'android'
|
||||||
and self.buildEnv.distname != 'Darwin'):
|
and self.buildEnv.distname != 'Darwin'):
|
||||||
base_dependencies += ['ctpp2c', 'ctpp2']
|
base_dependencies += ['ctpp2c', 'ctpp2']
|
||||||
@ -394,7 +414,7 @@ class AllBaseDependencies(Dependency):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def dependencies(self):
|
def dependencies(self):
|
||||||
base_deps = ['zlib', 'lzma', 'xapian-core', 'gumbo', 'pugixml', 'libmicrohttpd']
|
base_deps = ['zlib', 'lzma', 'xapian-core', 'gumbo', 'pugixml', 'libmicrohttpd', 'libaria2']
|
||||||
if self.buildEnv.platform_info.build != 'native':
|
if self.buildEnv.platform_info.build != 'native':
|
||||||
base_deps += ["icu4c_cross-compile"]
|
base_deps += ["icu4c_cross-compile"]
|
||||||
else:
|
else:
|
||||||
|
@ -10,7 +10,7 @@ main_project_versions = {
|
|||||||
|
|
||||||
# This is the "version" of the whole base_deps_versions dict.
|
# This is the "version" of the whole base_deps_versions dict.
|
||||||
# Change this when you change base_deps_versions.
|
# Change this when you change base_deps_versions.
|
||||||
base_deps_meta_version = '0'
|
base_deps_meta_version = '1'
|
||||||
|
|
||||||
|
|
||||||
base_deps_versions = {
|
base_deps_versions = {
|
||||||
@ -24,4 +24,5 @@ base_deps_versions = {
|
|||||||
'gumbo' : '0.10.1',
|
'gumbo' : '0.10.1',
|
||||||
'icu4c' : '58.2',
|
'icu4c' : '58.2',
|
||||||
'Gradle' : '3.4',
|
'Gradle' : '3.4',
|
||||||
|
'libaria2' : '1.33.1'
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,8 @@ REMOTE_PREFIX = 'http://download.kiwix.org/dev/'
|
|||||||
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
|
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
|
|
||||||
_fedora_common = ['automake', 'cmake', 'git', 'subversion', 'ccache', 'pkgconfig', 'gcc-c++']
|
_fedora_common = ['automake', 'cmake', 'git', 'subversion', 'ccache', 'pkgconfig', 'gcc-c++', 'gettext-devel']
|
||||||
_debian_common = ['automake', 'cmake', 'git', 'subversion', 'ccache', 'pkg-config', 'gcc']
|
_debian_common = ['automake', 'cmake', 'git', 'subversion', 'ccache', 'pkg-config', 'gcc', 'autopoint']
|
||||||
PACKAGE_NAME_MAPPERS = {
|
PACKAGE_NAME_MAPPERS = {
|
||||||
'fedora_native_dyn': {
|
'fedora_native_dyn': {
|
||||||
'COMMON': _fedora_common,
|
'COMMON': _fedora_common,
|
||||||
|
29
patches/libaria2_android.patch
Normal file
29
patches/libaria2_android.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
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) || \
|
Loading…
x
Reference in New Issue
Block a user