actions.py 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. def setup():
  11. # Make it build with libtool 1.5
  12. #shelltools.system("rm -rf m4/lt* m4/libtool.m4")
  13. shelltools.system("sed -i '/DEPRECATED/s:^://:' modules/text_renderer/freetype/text_layout.c")
  14. #shelltools.system("export CFLAGS+=-I/usr/include/samba-4.0")
  15. #shelltools.system("export CPPFLAGS+=-I/usr/include/samba-4.0")
  16. #shelltools.system("export CXXFLAGS+=-std=c++11")
  17. shelltools.export("AUTOPOINT", "true")
  18. #shelltools.export("CC", "clang")
  19. #shelltools.export("CXX", "clang++")
  20. shelltools.export("LDFLAGS", "-L/usr/lib -llua")
  21. shelltools.export("CFLAGS", "-I/usr/include/samba-4.0")
  22. shelltools.export("CPPFLAGS", "-I/usr/include/samba-4.0")
  23. shelltools.export("CXXFLAGS", "-I/usr/include/samba-4.0 -std=c++11")
  24. shelltools.export("PKG_CONFIG_PATH", "/usr/lib/ffmpeg4.4/pkgconfig")
  25. shelltools.export("LUAC", "/usr/bin/luac")
  26. shelltools.export("LUA_LIBS", "$(pkg-config --libs lua)")
  27. shelltools.export("RCC", "/usr/bin/rcc")
  28. shelltools.system("./bootstrap")
  29. #autotools.autoreconf("-vfi")
  30. autotools.rawConfigure("\
  31. --prefix=/usr \
  32. --libdir=/usr/lib \
  33. --sysconfdir=/etc \
  34. --with-kde-solid=/usr/share/solid/actions/ \
  35. --with-default-font-family=Sans \
  36. --with-default-monospace-font-family=Monospace \
  37. --with-default-font=/usr/share/fonts/dejavu/DejaVuSans.ttf \
  38. --with-default-monospace-font=/usr/share/fonts/dejavu/DejaVuSansMono.ttf \
  39. --with-x \
  40. BUILDCC=gcc \
  41. LUAC=luac LUA_LIBS='`pkg-config --libs lua`' \
  42. RCC=/usr/bin/rcc \
  43. --disable-asdcp \
  44. --disable-coverage \
  45. --disable-cprof \
  46. --disable-crystalhd \
  47. --disable-decklink \
  48. --disable-goom \
  49. --disable-kai \
  50. --disable-kva \
  51. --disable-maintainer-mode \
  52. --disable-opensles \
  53. --disable-rpi-omxil \
  54. --disable-shine \
  55. --disable-sndio \
  56. --disable-vsxu \
  57. --disable-wasapi \
  58. --disable-altivec \
  59. --disable-dependency-tracking \
  60. --disable-optimizations \
  61. --disable-jack \
  62. --disable-oss \
  63. --disable-opencv \
  64. --disable-rpath \
  65. --disable-static \
  66. --disable-update-check \
  67. --disable-silent-rules \
  68. --disable-mfx \
  69. --enable-ncurses \
  70. --enable-a52 \
  71. --enable-aa \
  72. --enable-alsa \
  73. --enable-archive \
  74. --enable-avcodec \
  75. --enable-avformat \
  76. --enable-postproc \
  77. --enable-bluray \
  78. --enable-dc1394 \
  79. --enable-dbus \
  80. --enable-dca \
  81. --enable-dvbpsi \
  82. --enable-dvdnav \
  83. --enable-dvdread \
  84. --enable-faad \
  85. --enable-fast-install \
  86. --enable-flac \
  87. --enable-freetype \
  88. --enable-fribidi \
  89. --enable-gnutls \
  90. --enable-libcddb \
  91. --enable-libmpeg2 \
  92. --enable-libxml2 \
  93. --enable-lirc \
  94. --enable-libva \
  95. --enable-live555 \
  96. --enable-lua \
  97. --enable-mad \
  98. --enable-mod \
  99. --enable-mpc \
  100. --enable-microdns \
  101. --enable-nls \
  102. --enable-ogg \
  103. --enable-opus \
  104. --enable-png \
  105. --enable-projectm \
  106. --enable-pulse \
  107. --enable-realrtsp \
  108. --enable-screen \
  109. --enable-sftp \
  110. --enable-schroedinger \
  111. --enable-shared \
  112. --enable-smbclient \
  113. --enable-sout \
  114. --enable-speex \
  115. --enable-svg \
  116. --enable-theora \
  117. --enable-twolame \
  118. --enable-upnp \
  119. --enable-v4l2 \
  120. --enable-vlc \
  121. --enable-vcd \
  122. --enable-mtp \
  123. --enable-vlm \
  124. --enable-vorbis \
  125. --enable-x264 \
  126. --enable-x265 \
  127. --enable-aribsub \
  128. --enable-xvideo \
  129. ")
  130. # --enable-freerdp \
  131. #enable-skins2 \ --disable-qt4 \
  132. #shelltools.export("CFLAGS", "%s -fPIC -O2 -Wall -Wextra -DLUA_COMPAT_5_1" % get.CFLAGS())
  133. # for fix unused dependency
  134. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  135. def build():
  136. autotools.make()
  137. def install():
  138. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  139. for icon in ("128x128", "48x48", "32x32", "16x16"):
  140. pisitools.insinto("/usr/share/icons/hicolor/%s/apps/" % icon, "share/icons/%s/vlc*.png" % icon)
  141. pisitools.dodoc("AUTHORS", "THANKS", "NEWS", "README", "COPYING")