vdr-dvbapi-2.2.2.ebuild 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit vdr-plugin-2
  5. DESCRIPTION="VDR Plugin: allows connect VDR to OScam"
  6. HOMEPAGE="https://github.com/manio/vdr-plugin-dvbapi"
  7. SRC_URI="https://github.com/manio/vdr-plugin-dvbapi/archive/v${PV}.tar.gz -> vdr-dvbapi-${PV}.tar.gz"
  8. KEYWORDS="~amd64 ~x86"
  9. SLOT="0"
  10. LICENSE="GPL-2"
  11. IUSE="cpu_flags_x86_3dnow cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2"
  12. DEPEND=">=media-video/vdr-2.1.4"
  13. RDEPEND="${DEPEND}"
  14. S="${WORKDIR}/vdr-plugin-dvbapi-${PV}"
  15. DOCS="HISTORY INSTALL README FFdecsa/docs"
  16. src_prepare() {
  17. vdr-plugin-2_src_prepare
  18. # respect the system CXXFLAGS
  19. sed -e "s:FLAGS:CXXFLAGS:" -i FFdecsa/Makefile
  20. # Prepare flags for FFdeCSA
  21. if [ -n "${VDR_DVBAPI_PARALLEL}" ]; then
  22. PARALLEL="${VDR_DVBAPI_PARALLEL}"
  23. else
  24. # [32/64] Core2 (SSSE3) achieves best results with SSE2 & SSE
  25. # [64] Athlon64 (SSE2) does much better with 64_LONG
  26. # [32] Athlon64 (SSE2) does best with MMX
  27. # [32] Pentium4 & Atom (SSE2) work best with SSE2 & SSE
  28. # [32] AthlonXP (SSE) has MMX faster
  29. # To avoid parsing -march=, we use ugly assumption that Intels don't
  30. # have 3dnow and AMDs do. SSE achieves good results only on Intel CPUs,
  31. # and LONG is best on 64-bit AMD CPUs.
  32. if ! use cpu_flags_x86_3dnow && use cpu_flags_x86_sse2; then
  33. PARALLEL=PARALLEL_128_SSE2
  34. elif ! use cpu_flags_x86_3dnow && use cpu_flags_x86_sse; then
  35. PARALLEL=PARALLEL_128_SSE
  36. elif use amd64; then
  37. PARALLEL=PARALLEL_64_LONG
  38. elif use cpu_flags_x86_mmx; then
  39. PARALLEL=PARALLEL_64_MMX
  40. else
  41. # fallback values:
  42. # PARALLEL_32_INT fails with gcc4.4 on x86&amd64
  43. # PARALLEL_64_2INT fails with gcc4.4 on x86
  44. # PARALLEL_128_4INT seems to be the fastest non-failing fallback
  45. PARALLEL=PARALLEL_128_4INT
  46. fi
  47. ewarn "VDR_DVBAPI_PARALLEL in your system make.conf is not set, guessing value from USEflags (${PARALLEL})."
  48. ewarn "This setting may be suboptimal, so you'll probably want to tweak it yourself."
  49. ewarn "\n\tRun the script ${WORKDIR}/extra/FFdecsa-benchmark.sh"
  50. ewarn "\tand add the output parameter from PARALLEL= to your system make.conf"
  51. ewarn "\tVDR_DVBAPI_PARALLEL= your parameter"
  52. fi
  53. export PARALLEL
  54. }
  55. pkg_postinst() {
  56. vdr-plugin-2_pkg_postinst
  57. elog "This software might be illegal in some countries or violate"
  58. elog "rules of your DVB provider"
  59. elog "Please respect these rules.\n"
  60. elog "We do not offer support of any kind"
  61. elog "Asking for keys or for installation help will be ignored by gentoo developers!\n"
  62. }