actions.py 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/licenses/gpl.txt
  5. from pisi.actionsapi import autotools
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import get
  9. WorkDir = "wine-%s" % get.srcVERSION()
  10. def setup():
  11. shelltools.system("install=wine.keyring")
  12. # For 32bit machines:
  13. # * It get compiled with the normal options below. The emul32 are ignored
  14. # on 32bit machines. Nothing is added to options variable.
  15. #
  16. # For 64bit machines:
  17. # * First we compile for 64bit with the option --enable-win64. These build
  18. # files are stored in the normal "work" dir
  19. # * In the second run (for emul32 buildType), the 32bit part is compiled
  20. # with the spesific libdir and the --with-wine64 options that is pointing
  21. # to the 64bit files that was compiled in the first step (files in the work)
  22. #
  23. # More info can be obtained here: http://wiki.winehq.org/Wine64
  24. #shelltools.export("CPPFLAGS", "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0")
  25. #shelltools.system("make -C ./wine-staging-%s/patches DESTDIR=$(pwd) install" %get.srcVERSION())
  26. #pisitools.flags.add("-fno-omit-frame-pointer")
  27. #shelltools.system("sed -i 's|OpenCL/opencl.h|CL/opencl.h|g' configure*")
  28. autotools.autoreconf("-vif")
  29. options = "--without-capi \
  30. --without-oss \
  31. --without-opencl \
  32. --without-gstreamer \
  33. --without-hal \
  34. --with-dbus \
  35. --with-opengl \
  36. --with-alsa \
  37. --with-x \
  38. "
  39. if get.buildTYPE() == "emul32":
  40. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  41. options += " --with-wine64=%s/work/wine-%s/build-wine \
  42. --libdir=/usr/lib32 \
  43. " % (get.pkgDIR(), get.srcVERSION())
  44. shelltools.system("mkdir build-wine")
  45. shelltools.cd("build-wine")
  46. shelltools.system(". ../configure %s" %options)
  47. elif get.ARCH() == "x86_64":
  48. options += " --enable-win64 \
  49. --libdir=/usr/lib \
  50. "
  51. shelltools.system("mkdir build-wine")
  52. shelltools.cd("build-wine")
  53. shelltools.system(". ../configure %s" %options)
  54. def build():
  55. shelltools.cd("build-wine")
  56. autotools.make()
  57. def install():
  58. # We need especially specify libdir and dlldir prefixes. Otherwise the
  59. # 32bit parts overwrite the 64bit files under /usr/lib
  60. shelltools.cd("build-wine")
  61. if get.buildTYPE() == "emul32":
  62. autotools.install("UPDATE_DESKTOP_DATABASE=/bin/true libdir=%s/usr/lib32 dlldir=%s/usr/lib32/wine" % (get.installDIR(), get.installDIR()))
  63. else:
  64. autotools.install("UPDATE_DESKTOP_DATABASE=/bin/true libdir=%s/usr/lib dlldir=%s/usr/lib/wine" % (get.installDIR(), get.installDIR()))
  65. shelltools.cd("..")
  66. pisitools.dodoc("ANNOUNCE", "AUTHORS", "COPYING.LIB", "LICENSE*", "README", "documentation/README.*")