actions.py 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. --prefix=/usr \
  38. --with-x \
  39. "
  40. if get.buildTYPE() == "emul32":
  41. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  42. options += " --with-wine64=%s/work/wine-%s/build-wine \
  43. --libdir=/usr/lib32 \
  44. " % (get.pkgDIR(), get.srcVERSION())
  45. shelltools.system("mkdir build-wine")
  46. shelltools.cd("build-wine")
  47. shelltools.system(". ../configure %s" %options)
  48. elif get.ARCH() == "x86_64":
  49. options += " --enable-win64 \
  50. --libdir=/usr/lib \
  51. "
  52. shelltools.system("mkdir build-wine")
  53. shelltools.cd("build-wine")
  54. shelltools.system(". ../configure %s" %options)
  55. def build():
  56. shelltools.cd("build-wine")
  57. autotools.make()
  58. def install():
  59. # We need especially specify libdir and dlldir prefixes. Otherwise the
  60. # 32bit parts overwrite the 64bit files under /usr/lib
  61. shelltools.cd("build-wine")
  62. if get.buildTYPE() == "emul32":
  63. autotools.install("LDCONFIG=/bin/true UPDATE_DESKTOP_DATABASE=/bin/true prefix=%s/usr libdir=%s/usr/lib32 dlldir=%s/usr/lib32/wine" % (get.installDIR(), get.installDIR(), get.installDIR()))
  64. else:
  65. autotools.install("LDCONFIG=/bin/true UPDATE_DESKTOP_DATABASE=/bin/true prefix=%s/usr libdir=%s/usr/lib dlldir=%s/usr/lib/wine" % (get.installDIR(), get.installDIR(), get.installDIR()))
  66. shelltools.cd("..")
  67. pisitools.dodoc("ANNOUNCE*", "AUTHORS", "COPYING.LIB", "LICENSE*", "README*", "documentation/README-*")