meson_tools.patch 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. diff -Nuar a/libpisiyap/gui/pisiyapui.py b/libpisiyap/gui/pisiyapui.py
  2. --- a/libpisiyap/gui/pisiyapui.py 2016-05-16 15:49:45.000000000 +0300
  3. +++ b/libpisiyap/gui/pisiyapui.py 2018-05-17 01:45:14.000000000 +0300
  4. @@ -315,6 +315,8 @@
  5. self.gridLayout_9.addWidget(self.pyTools, 2, 3, 1, 1)
  6. self.sconsTools = QRadioButton(self.tab_5)
  7. self.gridLayout_9.addWidget(self.sconsTools, 2, 5, 1, 1)
  8. + self.mesonTools = QRadioButton(self.tab_5)
  9. + self.gridLayout_9.addWidget(self.mesonTools, 4, 5, 1, 1)
  10. spacerItem20 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
  11. self.gridLayout_9.addItem(spacerItem20, 1, 3, 1, 1)
  12. spacerItem21 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
  13. @@ -504,6 +506,8 @@
  14. self.pyTools.setText(self.tr("Python Tools"))
  15. self.sconsTools.setToolTip(self.tr("Select this option if the package is built with scons tools"))
  16. self.sconsTools.setText(self.tr("SCons Tools"))
  17. + self.mesonTools.setToolTip(self.tr("Select this option if the package is built with meson tools"))
  18. + self.mesonTools.setText(self.tr("Meson Tools"))
  19. self.backBut_3.setText(self.tr("Back"))
  20. self.nextBut_3.setText(self.tr("Next"))
  21. self.pisiyapTab.setTabText(self.pisiyapTab.indexOf(self.tab_5), "actions.py")
  22. diff -Nuar a/libpisiyap/pisiyap.py b/libpisiyap/pisiyap.py
  23. --- a/libpisiyap/pisiyap.py 2016-05-16 15:49:45.000000000 +0300
  24. +++ b/libpisiyap/pisiyap.py 2018-05-17 01:28:06.000000000 +0300
  25. @@ -292,6 +292,8 @@
  26. actionspy = actions.pyTools
  27. elif self.ui.sconsTools.isChecked():
  28. actionspy = actions.sconsTools
  29. + elif self.ui.mesonTools.isChecked():
  30. + actionspy = actions.mesonTools
  31. actionsPy = file(os.path.join(packageDir, 'actions.py'), 'w')
  32. actionsPy.write(actionspy)
  33. diff -Nuar a/libpisiyap/templates/actions.py b/libpisiyap/templates/actions.py
  34. --- a/libpisiyap/templates/actions.py 2016-05-16 15:49:45.000000000 +0300
  35. +++ b/libpisiyap/templates/actions.py 2018-05-17 01:21:05.000000000 +0300
  36. @@ -175,3 +175,31 @@
  37. pisitools.dodoc("AUTHORS", "BUGS", "ChangeLog", "COPYING", "NEWS", "README")
  38. '''
  39. +
  40. +mesonTools = u'''#!/usr/bin/env python
  41. +# -*- coding: utf-8 -*-
  42. +#
  43. +# Licensed under the GNU General Public License, version 3.
  44. +# See the file http://www.gnu.org/licenses/gpl.txt
  45. +
  46. +from pisi.actionsapi import autotools
  47. +from pisi.actionsapi import pisitools
  48. +from pisi.actionsapi import shelltools
  49. +from pisi.actionsapi import get
  50. +
  51. +def setup():
  52. + shelltools.makedirs("build")
  53. + shelltools.cd("build")
  54. + shelltools.system("meson .. --prefix=/usr")
  55. +
  56. +def build():
  57. + shelltools.cd("build")
  58. + shelltools.system("ninja")
  59. +
  60. +def install():
  61. + shelltools.cd("build")
  62. + shelltools.system("DESTDIR=%s ninja install" % get.installDIR())
  63. +
  64. + shelltools.cd("..")
  65. + pisitools.dodoc("AUTHORS", "BUGS", "ChangeLog", "COPYING", "NEWS", "README")
  66. +'''