commit
428fe7efa0
|
@ -9,8 +9,8 @@ RUN \
|
|||
apt install -q -y --no-install-recommends \
|
||||
# Base build tools
|
||||
build-essential \
|
||||
# gcc-5 \
|
||||
# g++-5 \
|
||||
gcc-4.8 \
|
||||
g++-4.8 \
|
||||
automake \
|
||||
libtool \
|
||||
cmake \
|
||||
|
@ -37,8 +37,8 @@ RUN \
|
|||
libmagic-dev \
|
||||
zlib1g-dev \
|
||||
uuid-dev \
|
||||
ctpp2-utils \
|
||||
libctpp2-dev \
|
||||
# ctpp2-utils \
|
||||
# libctpp2-dev \
|
||||
libmicrohttpd-dev \
|
||||
# Qt packages
|
||||
libqt5gui5 \
|
||||
|
@ -73,6 +73,7 @@ RUN \
|
|||
mv ninja /home/travis/.local/bin ;\
|
||||
rm ninja-linux.zip
|
||||
ENV PATH="/home/travis/.local/bin:${PATH}"
|
||||
ENV CC=gcc-4.8 CXX=g++-4.8 QMAKE_CC=gcc-4.8 QMAKE_CXX=g++-4.8
|
||||
|
||||
COPY . kiwix-build/
|
||||
RUN sudo chown -R travis:travis /home/travis/kiwix-build
|
||||
|
|
|
@ -37,10 +37,12 @@ class Builder:
|
|||
steps = list(remove_duplicates(steps))
|
||||
|
||||
if option('build_nodeps'):
|
||||
src_targetDef = ('source', targetDef[1])
|
||||
add_target_step(src_targetDef, self._targets[src_targetDef])
|
||||
add_target_step(targetDef, self._targets[targetDef])
|
||||
else:
|
||||
for dep in steps:
|
||||
if option('build_deps_only') and dep == targetDef:
|
||||
if option('build_deps_only') and dep[1] == targetDef[1]:
|
||||
continue
|
||||
add_target_step(dep, self._targets[dep])
|
||||
self.instanciate_steps()
|
||||
|
|
|
@ -371,14 +371,26 @@ class CMakeBuilder(MakeBuilder):
|
|||
|
||||
class QMakeBuilder(MakeBuilder):
|
||||
qmake_target = ""
|
||||
|
||||
@property
|
||||
def env_option(self):
|
||||
options = ""
|
||||
if 'QMAKE_CC' in os.environ:
|
||||
options += 'QMAKE_CC={} '.format(os.environ['QMAKE_CC'])
|
||||
if 'QMAKE_CXX' in os.environ:
|
||||
options += 'QMAKE_CXX={} '.format(os.environ['QMAKE_CXX'])
|
||||
return options
|
||||
|
||||
def _configure(self, context):
|
||||
context.try_skip(self.build_path)
|
||||
cross_option = ""
|
||||
command = ("qmake {configure_option}"
|
||||
" {env_option}"
|
||||
" {source_path}"
|
||||
" {cross_option}")
|
||||
command = command.format(
|
||||
configure_option=self.configure_option,
|
||||
env_option=self.env_option,
|
||||
source_path=self.source_path,
|
||||
cross_option=cross_option
|
||||
)
|
||||
|
|
|
@ -5,13 +5,13 @@ from .base import (
|
|||
|
||||
class KiwixDesktop(Dependency):
|
||||
name = "kiwix-desktop"
|
||||
dependencies = ["qt", "qtwebengine", "kiwix-lib"]
|
||||
|
||||
class Source(GitClone):
|
||||
git_remote = "https://github.com/kiwix/kiwix-desktop.git"
|
||||
git_dir = "kiwix-desktop"
|
||||
|
||||
class Builder(QMakeBuilder):
|
||||
dependencies = ["qt", "qtwebengine", "kiwix-lib"]
|
||||
@property
|
||||
def configure_option(self):
|
||||
options = ["PREFIX={}".format(self.buildEnv.install_dir)]
|
||||
|
|
|
@ -14,6 +14,7 @@ class Xapian(Dependency):
|
|||
class Source(ReleaseDownload):
|
||||
archive = Remotefile('xapian-core-1.4.5.tar.xz',
|
||||
'85b5f952de9df925fd13e00f6e82484162fd506d38745613a50b0a2064c6b02b')
|
||||
patches = ['xapian_sys_types.patch']
|
||||
|
||||
class Builder(MakeBuilder):
|
||||
configure_option = "--disable-sse --disable-backend-inmemory --disable-documentation"
|
||||
|
|
|
@ -55,8 +55,8 @@ PACKAGE_NAME_MAPPERS = {
|
|||
'COMMON': _debian_common + ['libbz2-dev', 'libmagic-dev'],
|
||||
'zlib': ['zlib1g-dev'],
|
||||
'uuid': ['uuid-dev'],
|
||||
'ctpp2': ['libctpp2-dev'],
|
||||
'ctpp2c': ['ctpp2-utils'],
|
||||
#'ctpp2': ['libctpp2-dev'],
|
||||
#'ctpp2c': ['ctpp2-utils'],
|
||||
'libmicrohttpd': ['libmicrohttpd-dev', 'ccache'],
|
||||
'qt' : ['libqt5gui5', 'qtbase5-dev', 'qt5-default'],
|
||||
'qtwebengine' : ['qtwebengine5-dev']
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
diff -ur xapian-core-1.4.5/backends/glass/glass_dbcheck.h xapian-core-1.4.5.patched/backends/glass/glass_dbcheck.h
|
||||
--- xapian-core-1.4.5/backends/glass/glass_dbcheck.h 2017-10-16 04:32:24.000000000 +0200
|
||||
+++ xapian-core-1.4.5.patched/backends/glass/glass_dbcheck.h 2018-06-13 14:55:58.574898188 +0200
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "xapian/types.h"
|
||||
|
||||
-#include <cstring> // For size_t.
|
||||
+#include <sys/types.h> // For size_t and off_t.
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
#include <vector>
|
|
@ -10,7 +10,7 @@ main_project_versions = {
|
|||
|
||||
# This is the "version" of the whole base_deps_versions dict.
|
||||
# Change this when you change base_deps_versions.
|
||||
base_deps_meta_version = '7'
|
||||
base_deps_meta_version = '8'
|
||||
|
||||
|
||||
base_deps_versions = {
|
||||
|
|
|
@ -62,7 +62,11 @@ Generated at {date}
|
|||
date=date.today().isoformat()))
|
||||
|
||||
|
||||
def run_kiwix_build(target, platform, build_deps_only=False, make_release=False, make_dist=False):
|
||||
def run_kiwix_build(target, platform,
|
||||
build_deps_only=False,
|
||||
target_only=False,
|
||||
make_release=False,
|
||||
make_dist=False):
|
||||
command = ['kiwix-build']
|
||||
command.append(target)
|
||||
command.append('--hide-progress')
|
||||
|
@ -76,6 +80,8 @@ def run_kiwix_build(target, platform, build_deps_only=False, make_release=False,
|
|||
command.extend(['--target-platform', platform])
|
||||
if build_deps_only:
|
||||
command.append('--build-deps-only')
|
||||
if target_only:
|
||||
command.append('--build-nodeps')
|
||||
if make_release:
|
||||
command.append('--make-release')
|
||||
if make_dist:
|
||||
|
@ -276,7 +282,8 @@ for target in TARGETS:
|
|||
|
||||
run_kiwix_build(target,
|
||||
platform=PLATFORM,
|
||||
make_release=make_release)
|
||||
make_release=make_release,
|
||||
target_only=True)
|
||||
if target == 'kiwix-desktop':
|
||||
create_app_image()
|
||||
if make_release and PLATFORM == 'native_dyn':
|
||||
|
|
Loading…
Reference in New Issue