vdr-graphtft-0.3.7.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. vdr-plugin-2_src_prepare
  42. vdr_remove_i18n_include graphtft.h setup.h
  43. # UINT64_C is needed by ffmpeg headers
  44. append-cxxflags -D__STDC_CONSTANT_MACROS
  45. if has_version ">=media-video/vdr-1.7.33"; then
  46. sed -i dspitems.c \
  47. -e "s:int timerMatch = 0:eTimerMatch timerMatch = tmNone:"
  48. fi
  49. }
  50. src_compile() {
  51. vdr-plugin-2_src_compile
  52. if use graphtft-fe; then
  53. cd "${S}"/graphtft-fe
  54. emake
  55. fi
  56. }
  57. src_install() {
  58. vdr-plugin-2_src_install
  59. dodoc "${S}"/documents/{README,HISTORY,HOWTO.Themes,INSTALL}
  60. if use graphtft-fe; then
  61. cd "${S}"/graphtft-fe && dobin graphtft-fe
  62. doinit graphtft-fe
  63. fi
  64. }
  65. pkg_postinst() {
  66. vdr-plugin-2_pkg_postinst
  67. if use graphtft-fe; then
  68. echo
  69. elog "Graphtft-fe user:"
  70. elog "Edit /etc/conf.d/vdr.graphtft"
  71. elog "/etc/init.d/graphtft-fe start"
  72. echo
  73. fi
  74. }