vdr-dvbapi-2.1.1.ebuild 2.5 KB

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