parent
c917ff08c3
commit
f433b25013
|
@ -1,87 +1,25 @@
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from .base import Dependency, ReleaseDownload, MakeBuilder, QMakeBuilder
|
from .base import Dependency, NoopBuilder, NoopSource
|
||||||
|
|
||||||
from kiwixbuild.utils import Remotefile, pj, SkipCommand
|
from kiwixbuild.utils import SkipCommand, colorize
|
||||||
|
|
||||||
|
|
||||||
class Qt(Dependency):
|
class Qt(Dependency):
|
||||||
name = "qt"
|
name = "qt"
|
||||||
|
|
||||||
class Source(ReleaseDownload):
|
Source = NoopSource
|
||||||
name = "qt"
|
|
||||||
source_dir = "qt-5.10.1"
|
|
||||||
archive = Remotefile(
|
|
||||||
"qt-everywhere-src-5.10.1.tar.xz",
|
|
||||||
"",
|
|
||||||
"http://ftp.oregonstate.edu/.1/blfs/conglomeration/qt5/qt-everywhere-src-5.10.1.tar.xz",
|
|
||||||
)
|
|
||||||
|
|
||||||
class Builder(MakeBuilder):
|
class Builder(NoopBuilder):
|
||||||
dependencies = ["icu4c", "zlib"]
|
def build(self):
|
||||||
dynamic_configure_options = ["-shared"]
|
error_msg = f"""WARNING: kiwix-build cannot build {self.name} for you.
|
||||||
static_configure_options = ["-static"]
|
You must install it yourself using official Qt installer or your distribution system."""
|
||||||
|
print(colorize(error_msg, "WARNING"))
|
||||||
@property
|
|
||||||
def all_configure_options(self):
|
|
||||||
yield from self.configure_options
|
|
||||||
if self.buildEnv.configInfo.static:
|
|
||||||
yield from self.static_configure_options
|
|
||||||
else:
|
|
||||||
yield from self.dynamic_configure_options
|
|
||||||
if not self.target.force_native_build:
|
|
||||||
yield from self.buildEnv.configInfo.configure_options
|
|
||||||
yield from ("-prefix", self.buildEnv.install_dir)
|
|
||||||
yield from (
|
|
||||||
"-libdir",
|
|
||||||
pj(self.buildEnv.install_dir, self.buildEnv.libprefix),
|
|
||||||
)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def configure_options(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',
|
|
||||||
]
|
|
||||||
yield "-recheck"
|
|
||||||
yield "-opensource"
|
|
||||||
yield "-confirm-license"
|
|
||||||
yield "-ccache"
|
|
||||||
yield from ("-make", "libs")
|
|
||||||
for module in skip_modules:
|
|
||||||
yield from ("-skip", module)
|
|
||||||
|
|
||||||
|
|
||||||
class QtWebEngine(Dependency):
|
class QtWebEngine(Dependency):
|
||||||
name = "qtwebengine"
|
name = "qtwebengine"
|
||||||
|
|
||||||
Source = Qt.Source
|
Source = NoopSource
|
||||||
|
|
||||||
class Builder(QMakeBuilder):
|
Builder = Qt.Builder
|
||||||
dependencies = ["qt"]
|
|
||||||
subsource_dir = "qtwebengine"
|
|
||||||
|
|
|
@ -56,8 +56,6 @@ base_deps_versions = {
|
||||||
"libaria2": "1.37.0",
|
"libaria2": "1.37.0",
|
||||||
"libmagic": "5.44",
|
"libmagic": "5.44",
|
||||||
"android-ndk": "r21e",
|
"android-ndk": "r21e",
|
||||||
"qt": "5.10.1",
|
|
||||||
"qtwebengine": "5.10.1",
|
|
||||||
"org.kde": "5.15-23.08",
|
"org.kde": "5.15-23.08",
|
||||||
"io.qt.qtwebengine": "5.15-23.08",
|
"io.qt.qtwebengine": "5.15-23.08",
|
||||||
"zim-testing-suite": "0.6.0",
|
"zim-testing-suite": "0.6.0",
|
||||||
|
|
Loading…
Reference in New Issue