vdr-graphtft-0.3.7-r1.ebuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit vdr-plugin-2 flag-o-matic
  5. RESTRICT="test"
  6. DESCRIPTION="VDR plugin: GraphTFT"
  7. HOMEPAGE="http://www.vdr-wiki.de/wiki/index.php/Graphtft-plugin"
  8. SRC_URI="http://www.jwendel.de/vdr/${P}.tar.bz2"
  9. KEYWORDS="~amd64 ~x86"
  10. SLOT="0"
  11. LICENSE="GPL-2 LGPL-2.1"
  12. IUSE_THEMES="+theme_deepblue theme_avp theme_deeppurple theme_poetter"
  13. IUSE="${IUSE_THEMES} directfb graphtft-fe imagemagick touchscreen"
  14. DEPEND=">=media-video/vdr-1.7.27[graphtft]
  15. media-libs/imlib2[png,jpeg]
  16. gnome-base/libgtop
  17. >=virtual/ffmpeg-0.4.8_p20090201
  18. imagemagick? ( media-gfx/imagemagick[png,jpeg,cxx] )
  19. directfb? ( dev-libs/DirectFB )
  20. graphtft-fe? ( media-libs/imlib2[png,jpeg,X] )"
  21. RDEPEND="${DEPEND}"
  22. PDEPEND="theme_deepblue? ( =x11-themes/vdrgraphtft-deepblue-0.3.1 )
  23. theme_avp? ( =x11-themes/vdrgraphtft-avp-0.3.1 )
  24. theme_deeppurple? ( =x11-themes/vdrgraphtft-deeppurple-0.3.2 )
  25. theme_poetter? ( =x11-themes/vdrgraphtft-poetter-0.3.2 )"
  26. PATCHES=("${FILESDIR}/${P}_gentoo.diff"
  27. "${FILESDIR}/${P}_makefile.diff"
  28. "${FILESDIR}/${P}_gcc-4.4.x.diff")
  29. src_prepare() {
  30. # remove untranslated Language
  31. rm "${S}"/po/{ca_ES,cs_CZ,da_DK,el_GR,es_ES,et_EE,fr_FR,hr_HR,hu_HU,nl_NL,nn_NO,pl_PL,pt_PT,ro_RO,ru_RU,sl_SI,sv_SE,tr_TR}.po
  32. sed -i Makefile -e "s: WITH_X_COMM = 1:#WITH_X_COMM = 1:"
  33. ! use touchscreen && sed -i Makefile \
  34. -e "s:WITH_TOUCH = 1:#WITH_TOUCH = 1:"
  35. use graphtft-fe && sed -i Makefile \
  36. -e "s:#WITH_X_COMM:WITH_X_COMM:"
  37. # libav9 support
  38. sed -i \
  39. -e 's:avcodec.h>:avcodec.h>\n#include <libavutil/mem.h>:' \
  40. imlibrenderer/dvbrenderer/mpeg2encoder.c || die
  41. # libav10 support, wrt bug 519448
  42. sed -i \
  43. -e "s:CODEC_ID_MPEG1VIDEO:AV_CODEC_ID_MPEG1VIDEO:" \
  44. -e "s:avcodec_alloc_frame:av_frame_alloc:" \
  45. imlibrenderer/dvbrenderer/mpeg2encoder.c || die
  46. vdr-plugin-2_src_prepare
  47. vdr_remove_i18n_include graphtft.h setup.h
  48. # UINT64_C is needed by ffmpeg headers
  49. append-cxxflags -D__STDC_CONSTANT_MACROS
  50. if has_version ">=media-video/vdr-1.7.33"; then
  51. sed -i dspitems.c \
  52. -e "s:int timerMatch = 0:eTimerMatch timerMatch = tmNone:"
  53. fi
  54. }
  55. src_compile() {
  56. vdr-plugin-2_src_compile
  57. if use graphtft-fe; then
  58. cd "${S}"/graphtft-fe
  59. emake
  60. fi
  61. }
  62. src_install() {
  63. vdr-plugin-2_src_install
  64. dodoc "${S}"/documents/{README,HISTORY,HOWTO.Themes,INSTALL}
  65. if use graphtft-fe; then
  66. cd "${S}"/graphtft-fe && dobin graphtft-fe
  67. doinit graphtft-fe
  68. fi
  69. }
  70. pkg_postinst() {
  71. vdr-plugin-2_pkg_postinst
  72. if use graphtft-fe; then
  73. echo
  74. elog "Graphtft-fe user:"
  75. elog "Edit /etc/conf.d/vdr.graphtft"
  76. elog "/etc/init.d/graphtft-fe start"
  77. echo
  78. fi
  79. }