-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #720 from kiwix/no_qt_compile
- Loading branch information
Showing
2 changed files
with
10 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,25 @@ | ||
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): | ||
name = "qt" | ||
|
||
class Source(ReleaseDownload): | ||
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", | ||
) | ||
Source = NoopSource | ||
|
||
class Builder(MakeBuilder): | ||
dependencies = ["icu4c", "zlib"] | ||
dynamic_configure_options = ["-shared"] | ||
static_configure_options = ["-static"] | ||
|
||
@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 Builder(NoopBuilder): | ||
def build(self): | ||
error_msg = f"""WARNING: kiwix-build cannot build {self.name} for you. | ||
You must install it yourself using official Qt installer or your distribution system.""" | ||
print(colorize(error_msg, "WARNING")) | ||
|
||
|
||
class QtWebEngine(Dependency): | ||
name = "qtwebengine" | ||
|
||
Source = Qt.Source | ||
Source = NoopSource | ||
|
||
class Builder(QMakeBuilder): | ||
dependencies = ["qt"] | ||
subsource_dir = "qtwebengine" | ||
Builder = Qt.Builder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters