Add qt(webengine) dependency.
Add qt dependency and QMakeBuilder.
This commit is contained in:
parent
63003d5bce
commit
cf8f303362
|
@ -138,7 +138,11 @@ class BuildEnv:
|
||||||
pj(self.install_dir, self.libprefix)
|
pj(self.install_dir, self.libprefix)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
env['QMAKE_CXXFLAGS'] = " ".join(['-I'+pj(self.install_dir, 'include'), env['QMAKE_CXXFLAGS']])
|
||||||
env['CPPFLAGS'] = " ".join(['-I'+pj(self.install_dir, 'include'), env['CPPFLAGS']])
|
env['CPPFLAGS'] = " ".join(['-I'+pj(self.install_dir, 'include'), env['CPPFLAGS']])
|
||||||
|
env['QMAKE_LFLAGS'] = " ".join(['-L'+pj(self.install_dir, 'lib'),
|
||||||
|
'-L'+pj(self.install_dir, self.libprefix),
|
||||||
|
env['QMAKE_LFLAGS']])
|
||||||
env['LDFLAGS'] = " ".join(['-L'+pj(self.install_dir, 'lib'),
|
env['LDFLAGS'] = " ".join(['-L'+pj(self.install_dir, 'lib'),
|
||||||
'-L'+pj(self.install_dir, self.libprefix),
|
'-L'+pj(self.install_dir, self.libprefix),
|
||||||
env['LDFLAGS']])
|
env['LDFLAGS']])
|
||||||
|
|
|
@ -19,6 +19,7 @@ from . import (
|
||||||
libmicrohttpd,
|
libmicrohttpd,
|
||||||
libzim,
|
libzim,
|
||||||
lzma,
|
lzma,
|
||||||
|
qt,
|
||||||
pugixml,
|
pugixml,
|
||||||
uuid,
|
uuid,
|
||||||
xapian,
|
xapian,
|
||||||
|
|
|
@ -369,6 +369,30 @@ class CMakeBuilder(MakeBuilder):
|
||||||
run_command(command, self.build_path, context, env=env, buildEnv=self.buildEnv, cross_env_only=True)
|
run_command(command, self.build_path, context, env=env, buildEnv=self.buildEnv, cross_env_only=True)
|
||||||
|
|
||||||
|
|
||||||
|
class QMakeBuilder(MakeBuilder):
|
||||||
|
qmake_target = ""
|
||||||
|
def _configure(self, context):
|
||||||
|
context.try_skip(self.build_path)
|
||||||
|
cross_option = ""
|
||||||
|
command = ("qmake {configure_option}"
|
||||||
|
" {source_path}"
|
||||||
|
" {cross_option}")
|
||||||
|
command = command.format(
|
||||||
|
configure_option=self.configure_option,
|
||||||
|
source_path=self.source_path,
|
||||||
|
cross_option=cross_option
|
||||||
|
)
|
||||||
|
run_command(command, self.build_path, context, buildEnv=self.buildEnv, cross_env_only=True)
|
||||||
|
|
||||||
|
def _install(self, context):
|
||||||
|
context.try_skip(self.build_path)
|
||||||
|
command = "make {make_install_target} {make_option}".format(
|
||||||
|
make_install_target=self.make_install_target,
|
||||||
|
make_option=self.make_option
|
||||||
|
)
|
||||||
|
run_command(command, self.build_path, context, buildEnv=self.buildEnv)
|
||||||
|
|
||||||
|
|
||||||
class MesonBuilder(Builder):
|
class MesonBuilder(Builder):
|
||||||
configure_option = ""
|
configure_option = ""
|
||||||
test_option = ""
|
test_option = ""
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
from .base import (
|
||||||
|
Dependency,
|
||||||
|
ReleaseDownload,
|
||||||
|
MakeBuilder,
|
||||||
|
QMakeBuilder)
|
||||||
|
|
||||||
|
from kiwixbuild.utils import Remotefile, pj, SkipCommand
|
||||||
|
|
||||||
|
|
||||||
|
class Qt(Dependency):
|
||||||
|
name = 'qt'
|
||||||
|
|
||||||
|
class Source(ReleaseDownload):
|
||||||
|
name = "qt"
|
||||||
|
source_dir = "qt-5.10.1"
|
||||||
|
archive = Remotefile('qt-everywhere-src-5.10.1.tar.xz',
|
||||||
|
'',
|
||||||
|
'http://ftp1.nluug.nl/languages/qt/archive/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz')
|
||||||
|
|
||||||
|
class Builder(MakeBuilder):
|
||||||
|
dependencies = ['icu4c', 'zlib']
|
||||||
|
configure_option_template = "{dep_options} {static_option} {env_option} -prefix {install_dir} -libdir {libdir}"
|
||||||
|
dynamic_configure_option = "-shared"
|
||||||
|
static_configure_option = "-static"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def configure_option(self):
|
||||||
|
skip_modules = [
|
||||||
|
'qt3d',
|
||||||
|
'qtcanvas3d',
|
||||||
|
'qtcharts',
|
||||||
|
'qtconnectivity',
|
||||||
|
'qtdatavis3d',
|
||||||
|
# 'qtdeclarative',
|
||||||
|
'qtdoc',
|
||||||
|
'qtgamepad',
|
||||||
|
'qtgraphicaleffects',
|
||||||
|
'qtlocation',
|
||||||
|
'qtmultimedia',
|
||||||
|
'qtnetworkauth',
|
||||||
|
'qtpurchasing',
|
||||||
|
# 'qtquickcontrols',
|
||||||
|
'qtquickcontrols2',
|
||||||
|
'qtremoteobjects',
|
||||||
|
'qtscript',
|
||||||
|
'qtscxml',
|
||||||
|
'qtsensors',
|
||||||
|
'qtserialbus',
|
||||||
|
'qtserialport',
|
||||||
|
'qtspeech',
|
||||||
|
'qtvirtualkeyboard',
|
||||||
|
'qtwayland',
|
||||||
|
'qtwebglplugin',
|
||||||
|
'qtwebsockets',
|
||||||
|
# 'qtwebview',
|
||||||
|
]
|
||||||
|
skip_modules = " ".join("-skip {}".format(m) for m in skip_modules)
|
||||||
|
options = "-recheck -opensource -confirm-license -ccache -make libs {}".format(skip_modules)
|
||||||
|
return options
|
||||||
|
|
||||||
|
class QtWebEngine(Dependency):
|
||||||
|
name = "qtwebengine"
|
||||||
|
|
||||||
|
Source = Qt.Source
|
||||||
|
|
||||||
|
class Builder(QMakeBuilder):
|
||||||
|
dependencies = ['qt']
|
||||||
|
subsource_dir = "qtwebengine"
|
|
@ -57,7 +57,9 @@ PACKAGE_NAME_MAPPERS = {
|
||||||
'uuid': ['uuid-dev'],
|
'uuid': ['uuid-dev'],
|
||||||
'ctpp2': ['libctpp2-dev'],
|
'ctpp2': ['libctpp2-dev'],
|
||||||
'ctpp2c': ['ctpp2-utils'],
|
'ctpp2c': ['ctpp2-utils'],
|
||||||
'libmicrohttpd': ['libmicrohttpd-dev', 'ccache']
|
'libmicrohttpd': ['libmicrohttpd-dev', 'ccache'],
|
||||||
|
'qt' : ['libqt5gui5', 'qtbase5-dev', 'qt5-default'],
|
||||||
|
'qtwebengine' : ['qtwebengine5-dev']
|
||||||
},
|
},
|
||||||
'debian_native_static': {
|
'debian_native_static': {
|
||||||
'COMMON': _debian_common + ['libbz2-dev', 'libmagic-dev'],
|
'COMMON': _debian_common + ['libbz2-dev', 'libmagic-dev'],
|
||||||
|
|
|
@ -27,5 +27,7 @@ base_deps_versions = {
|
||||||
'libaria2' : '1.33.1',
|
'libaria2' : '1.33.1',
|
||||||
'libmagic' : '5.33',
|
'libmagic' : '5.33',
|
||||||
'android-sdk' : 'r25.2.3',
|
'android-sdk' : 'r25.2.3',
|
||||||
'android-ndk' : 'r13b'
|
'android-ndk' : 'r13b',
|
||||||
|
'qt' : '5.10.1',
|
||||||
|
'qtwebengine' : '5.10.1',
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue