actions.py 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import shelltools
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import qt5
  10. from pisi.actionsapi import get
  11. def setup():
  12. shelltools.system("mkdir .git")
  13. # pisitools.dosed(".qmake.conf", "5.15.10", "5.15.7")
  14. #shelltools.unlinkDir("src/3rdparty")
  15. #shelltools.move("../qtwebengine-chromium-*", "src/3rdparty")
  16. #shelltools.system("mkdir src/3rdparty/chromium/.git")
  17. #shelltools.system("patch -p1 < qtwebengine-5.15.7-build_fixes-1.patch")
  18. shelltools.system("patch -p1 < qtwebengine-everywhere-src-5.15.5-TRUE.patch")
  19. shelltools.system("sed -i 's/NINJAJOBS/NINJA_JOBS/' src/core/gn_run.pro")
  20. #shelltools.copy("qtwebengine-release.sh", "%s/qtwebengine-release.sh" % get.workDIR())
  21. #shelltools.cd("%s" % get.workDIR())
  22. #shelltools.system("sh ./qtwebengine-release.sh")
  23. #shelltools.cd("qtwebengine-everywhere-opensource-src-%s" % get.srcVERSION())
  24. # Disable jumbo build https://bugreports.qt.io/browse/QTBUG-88657 gcc10
  25. shelltools.system("sed -i 's|use_jumbo_build=true|use_jumbo_build=false|' -i src/buildtools/config/common.pri")
  26. #shelltools.system("sh ./qtwebengine-release.sh")
  27. #shelltools.system("git submodule init")
  28. #shelltools.system("git submodule update")
  29. shelltools.makedirs("build")
  30. shelltools.cd("build")
  31. #shelltools.export("QT5LINK", "/usr/lib/qt5/bin")
  32. #shelltools.export("QT5DIR", "/usr/lib/qt5")
  33. #shelltools.export("CFLAGS", "%s -I/usr/lib/sqlite3.16.2" % get.CFLAGS())
  34. #shelltools.system("qmake WEBENGINE_CONFIG+=use_proprietary_codecs WEBENGINE_CONFIG+=use_system_icu WEBENGINE_CONFIG+=use_system_protobuf WEBENGINE_CONFIG+=use_system_ffmpeg qtwebengine.pro")
  35. #pisitools.ldflags.add("-Wl,--no-keep-memory ")
  36. #shelltools.export("NINJAJOBS", "-j 4")
  37. shelltools.system("qmake .. -- -proprietary-codecs \
  38. -system-ffmpeg \
  39. -system-webp \
  40. -system-opus \
  41. -spellchecker \
  42. -webengine-icu \
  43. -webengine-kerberos \
  44. -webengine-webrtc-pipewire")
  45. #qt5.configure("..")
  46. def build():
  47. shelltools.cd("build")
  48. qt5.make()
  49. def install():
  50. shelltools.cd("build")
  51. qt5.install("INSTALL_ROOT=%s" % get.installDIR())
  52. #I hope qtchooser will manage this issue
  53. #for bin in shelltools.ls("%s/usr/lib/qt5/bin" % get.installDIR()):
  54. #pisitools.dosym("/usr/lib/qt5/bin/%s" % bin, "/usr/bin/%s-qt5" % bin)
  55. shelltools.cd("..")
  56. pisitools.dodoc("LICENSE*")