Merge pull request #253 from kiwix/libcurl

Add libcurl dependency.
This commit is contained in:
Matthieu Gautier 2018-10-23 15:41:19 +02:00 committed by GitHub
commit 5a97ec28ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 41 additions and 37 deletions

View File

@ -92,6 +92,7 @@ matrix:
- zlib1g-dev - zlib1g-dev
- uuid-dev - uuid-dev
- libctpp2-dev - libctpp2-dev
- libcurl4-openssl-dev
- env: PLATFORM="win32_dyn" - env: PLATFORM="win32_dyn"
addons: &win32_addons addons: &win32_addons
apt: apt:
@ -114,6 +115,7 @@ matrix:
- g++-multilib - g++-multilib
- libc6-dev:i386 - libc6-dev:i386
- libstdc++-6-dev:i386 - libstdc++-6-dev:i386
- libcurl4-openssl-dev:i386
- env: PLATFORM="i586_static" - env: PLATFORM="i586_static"
addons: *i586_addons addons: *i586_addons
- env: PLATFORM="android" - env: PLATFORM="android"

View File

@ -2,7 +2,7 @@ REM ========================================================
REM Install kiwix-lib REM Install kiwix-lib
git clone https://github.com/kiwix/kiwix-lib.git || exit /b 1 git clone https://github.com/kiwix/kiwix-lib.git || exit /b 1
cd kiwix-lib cd kiwix-lib
meson.py . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1 meson . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
cd build cd build
ninja || exit /b 1 ninja || exit /b 1
ninja install || exit /b 1 ninja install || exit /b 1

View File

@ -2,7 +2,7 @@ REM ========================================================
REM Install libzim REM Install libzim
git clone https://github.com/openzim/libzim.git || exit /b 1 git clone https://github.com/openzim/libzim.git || exit /b 1
cd libzim cd libzim
meson.py . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1 meson . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
cd build cd build
ninja || exit /b 1 ninja || exit /b 1
ninja install || exit /b 1 ninja install || exit /b 1

View File

@ -3,7 +3,7 @@ REM Install pugixml
curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/pugixml-1.2-meson.zip || exit /b 1 curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/pugixml-1.2-meson.zip || exit /b 1
7z x pugixml-1.2-meson.zip -o. || exit /b 1 7z x pugixml-1.2-meson.zip -o. || exit /b 1
cd pugixml-1.2-meson cd pugixml-1.2-meson
meson.py . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1 meson . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
cd build cd build
ninja || exit /b 1 ninja || exit /b 1
ninja install || exit /b 1 ninja install || exit /b 1

View File

@ -3,7 +3,7 @@ REM Install zlib
curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/zlib-1.2.11.meson.zip || exit /b 1 curl -fsSL -O http://public.kymeria.fr/KIWIX/windows/zlib-1.2.11.meson.zip || exit /b 1
7z x zlib-1.2.11.meson.zip || exit /b 1 7z x zlib-1.2.11.meson.zip || exit /b 1
cd zlib-1.2.11 cd zlib-1.2.11
meson.py . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1 meson . build --prefix %EXTRA_DIR% --default-library static --buildtype release || exit /b 1
cd build cd build
ninja || exit /b 1 ninja || exit /b 1
ninja install || exit /b 1 ninja install || exit /b 1

View File

@ -15,7 +15,7 @@ from . import (
kiwix_desktop, kiwix_desktop,
kiwix_lib, kiwix_lib,
kiwix_tools, kiwix_tools,
libaria2, libcurl,
libmagic, libmagic,
libmicrohttpd, libmicrohttpd,
libzim, libzim,

View File

@ -12,7 +12,7 @@ class AllBaseDependencies(Dependency):
class Builder(NoopBuilder): class Builder(NoopBuilder):
@classmethod @classmethod
def get_dependencies(cls, platformInfo, allDeps): def get_dependencies(cls, platformInfo, allDeps):
base_deps = ['zlib', 'lzma', 'xapian-core', 'pugixml', 'libaria2', 'icu4c'] base_deps = ['zlib', 'lzma', 'xapian-core', 'pugixml', 'libcurl', 'icu4c']
# zimwriterfs # zimwriterfs
if platformInfo.build not in ('android', 'win32'): if platformInfo.build not in ('android', 'win32'):
base_deps += ['libmagic', 'gumbo'] base_deps += ['libmagic', 'gumbo']

View File

@ -14,7 +14,7 @@ class Kiwixlib(Dependency):
class Builder(MesonBuilder): class Builder(MesonBuilder):
@classmethod @classmethod
def get_dependencies(cls, platformInfo, allDeps): def get_dependencies(cls, platformInfo, allDeps):
base_dependencies = ["pugixml", "libzim", "zlib", "lzma", "libaria2", "icu4c"] base_dependencies = ["pugixml", "libzim", "zlib", "lzma", "libcurl", "icu4c"]
if (platformInfo.build != 'android' and if (platformInfo.build != 'android' and
neutralEnv('distname') != 'Darwin'): neutralEnv('distname') != 'Darwin'):
base_dependencies += ['ctpp2c', 'ctpp2'] base_dependencies += ['ctpp2c', 'ctpp2']

View File

@ -1,26 +0,0 @@
from .base import (
Dependency,
ReleaseDownload,
MakeBuilder
)
from kiwixbuild.utils import Remotefile, run_command
class Aria2(Dependency):
name = "libaria2"
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"
run_command(command, self.extract_path, context)
class Builder(MakeBuilder):
dependencies = ['zlib']
configure_option = "--enable-libaria2 --disable-ssl --disable-bittorent --disable-metalink --without-sqlite3 --without-libxml2 --without-libexpat"

View File

@ -0,0 +1,21 @@
import os
from .base import (
Dependency,
ReleaseDownload,
MakeBuilder,
)
from kiwixbuild.utils import Remotefile, pj, Defaultdict, SkipCommand, run_command
from kiwixbuild._global import get_target_step
class LibCurl(Dependency):
name = "libcurl"
class Source(ReleaseDownload):
name = "libcurl"
archive = Remotefile('curl-7.61.0.tar.xz',
'ef6e55192d04713673b4409ccbcb4cb6cd723137d6e10ca45b0c593a454e1720',
'https://curl.haxx.se/download/curl-7.61.0.tar.xz')
Builder = MakeBuilder

View File

@ -16,6 +16,7 @@ PACKAGE_NAME_MAPPERS = {
'zimlib': None, 'zimlib': None,
'file' : ['file-devel'], 'file' : ['file-devel'],
'gumbo' : ['gumbo-parser-devel'], 'gumbo' : ['gumbo-parser-devel'],
'libcurl' : ['libcurl-devel'],
}, },
'fedora_native_static': { 'fedora_native_static': {
'COMMON': _fedora_common + ['glibc-static', 'libstdc++-static'], 'COMMON': _fedora_common + ['glibc-static', 'libstdc++-static'],
@ -25,6 +26,7 @@ PACKAGE_NAME_MAPPERS = {
}, },
'fedora_i586_dyn': { 'fedora_i586_dyn': {
'COMMON': _fedora_common + ['glibc-devel.i686', 'libstdc++-devel.i686'], 'COMMON': _fedora_common + ['glibc-devel.i686', 'libstdc++-devel.i686'],
'libcurl': ['libcurl-devel.i686'],
}, },
'fedora_i586_static': { 'fedora_i586_static': {
'COMMON': _fedora_common + ['glibc-devel.i686'], 'COMMON': _fedora_common + ['glibc-devel.i686'],
@ -34,6 +36,7 @@ PACKAGE_NAME_MAPPERS = {
'zlib': ['mingw32-zlib'], 'zlib': ['mingw32-zlib'],
'lzma': ['mingw32-xz-libs'], 'lzma': ['mingw32-xz-libs'],
'libmicrohttpd': ['mingw32-libmicrohttpd'], 'libmicrohttpd': ['mingw32-libmicrohttpd'],
'libcurl': ['mingw32-curl'],
}, },
'fedora_win32_static': { 'fedora_win32_static': {
'COMMON': _fedora_common + ['mingw32-gcc-c++', 'mingw32-bzip2-static', 'mingw32-win-iconv-static', 'mingw32-winpthreads-static', 'wine'], 'COMMON': _fedora_common + ['mingw32-gcc-c++', 'mingw32-bzip2-static', 'mingw32-win-iconv-static', 'mingw32-winpthreads-static', 'wine'],
@ -41,6 +44,7 @@ PACKAGE_NAME_MAPPERS = {
'lzma': ['mingw32-xz-libs-static'], 'lzma': ['mingw32-xz-libs-static'],
'libmicrohttpd': None, # ['mingw32-libmicrohttpd-static'] packaging dependecy seems buggy, and some static lib are name libfoo.dll.a and 'libmicrohttpd': None, # ['mingw32-libmicrohttpd-static'] packaging dependecy seems buggy, and some static lib are name libfoo.dll.a and
# gcc cannot found them. # gcc cannot found them.
'libcurl': ['mingw32-curl-static'],
}, },
'fedora_armhf_static': { 'fedora_armhf_static': {
'COMMON': _fedora_common 'COMMON': _fedora_common
@ -59,7 +63,8 @@ PACKAGE_NAME_MAPPERS = {
'ctpp2c': ['ctpp2-utils'], 'ctpp2c': ['ctpp2-utils'],
'libmicrohttpd': ['libmicrohttpd-dev', 'ccache'], 'libmicrohttpd': ['libmicrohttpd-dev', 'ccache'],
'qt' : ['libqt5gui5', 'qtbase5-dev', 'qt5-default'], 'qt' : ['libqt5gui5', 'qtbase5-dev', 'qt5-default'],
'qtwebengine' : ['qtwebengine5-dev'] 'qtwebengine' : ['qtwebengine5-dev'],
'libcurl': ['libcurl4-openssl-dev'],
}, },
'debian_native_static': { 'debian_native_static': {
'COMMON': _debian_common + ['libbz2-dev', 'libmagic-dev'], 'COMMON': _debian_common + ['libbz2-dev', 'libmagic-dev'],
@ -67,12 +72,15 @@ PACKAGE_NAME_MAPPERS = {
'uuid': ['uuid-dev'], 'uuid': ['uuid-dev'],
'ctpp2': ['libctpp2-dev'], 'ctpp2': ['libctpp2-dev'],
'ctpp2c': ['ctpp2-utils'], 'ctpp2c': ['ctpp2-utils'],
'libcurl': ['libcurl4-openssl-dev'],
}, },
'debian_i586_dyn': { 'debian_i586_dyn': {
'COMMON': _debian_common + ['libc6-dev:i386', 'libstdc++-6-dev:i386', 'gcc-multilib', 'g++-multilib'], 'COMMON': _debian_common + ['libc6-dev:i386', 'libstdc++-6-dev:i386', 'gcc-multilib', 'g++-multilib'],
'libcurl': ['libcurl4-openssl-dev:i386'],
}, },
'debian_i586_static': { 'debian_i586_static': {
'COMMON': _debian_common + ['libc6-dev:i386', 'libstdc++-6-dev:i386', 'gcc-multilib', 'g++-multilib'], 'COMMON': _debian_common + ['libc6-dev:i386', 'libstdc++-6-dev:i386', 'gcc-multilib', 'g++-multilib'],
'libcurl': ['libcurl4-openssl-dev:i386'],
}, },
'debian_win32_dyn': { 'debian_win32_dyn': {
'COMMON': _debian_common + ['g++-mingw-w64-i686', 'gcc-mingw-w64-i686', 'gcc-mingw-w64-base', 'mingw-w64-tools'], 'COMMON': _debian_common + ['g++-mingw-w64-i686', 'gcc-mingw-w64-i686', 'gcc-mingw-w64-base', 'mingw-w64-tools'],

View File

@ -35,7 +35,7 @@ release_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 = '11' base_deps_meta_version = '12'
base_deps_versions = { base_deps_versions = {

View File

@ -33,6 +33,7 @@ RUN \
ctpp2-utils \ ctpp2-utils \
libctpp2-dev \ libctpp2-dev \
libmicrohttpd-dev \ libmicrohttpd-dev \
libcurl4-openssl-dev \
# Qt packages # Qt packages
libqt5gui5 \ libqt5gui5 \
qtbase5-dev \ qtbase5-dev \

View File

@ -4,8 +4,6 @@ set -e
if [[ "$TRAVIS_OS_NAME" == "osx" ]] if [[ "$TRAVIS_OS_NAME" == "osx" ]]
then then
brew update
brew upgrade python3
pip3 install pillow pip3 install pillow
pip3 install . pip3 install .