mpeg-tools-1.5b-r5.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. MY_PN=mpeg_encode
  6. DESCRIPTION="Tools for MPEG video"
  7. HOMEPAGE="http://bmrc.berkeley.edu/research/mpeg/mpeg_encode.html"
  8. SRC_URI="ftp://mm-ftp.cs.berkeley.edu/pub/multimedia/mpeg/encode/${MY_PN}-${PV}-src.tar.gz"
  9. LICENSE="BSD"
  10. SLOT="0"
  11. KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
  12. IUSE=""
  13. RDEPEND="x11-libs/libX11
  14. virtual/jpeg:0"
  15. DEPEND="${RDEPEND}"
  16. S=${WORKDIR}/${MY_PN}
  17. src_prepare() {
  18. cd "${WORKDIR}"
  19. epatch "${FILESDIR}"/${P}-build.patch
  20. epatch "${FILESDIR}"/${P}-64bit_fixes.patch
  21. epatch "${FILESDIR}"/${P}-tempfile-convert.patch
  22. epatch "${FILESDIR}"/${P}-as-needed.patch
  23. epatch "${FILESDIR}"/${P}-powerpc.patch
  24. cd "${S}"
  25. rm -r jpeg
  26. epatch "${FILESDIR}"/${P}-jpeg.patch
  27. epatch "${FILESDIR}"/${P}-tempfile-mpeg-encode.patch
  28. epatch "${FILESDIR}"/${P}-tempfile-tests.patch
  29. # don't include malloc.h, but use stdlib.h instead
  30. sed -i -e 's:#include <malloc.h>:#include <stdlib.h>:' \
  31. convert/*.c convert/mtv/*.c *.c headers/*.h || die
  32. }
  33. src_compile() {
  34. emake CC="$(tc-getCC)"
  35. emake -C convert CC="$(tc-getCC)"
  36. emake -C convert/mtv CC="$(tc-getCC)"
  37. }
  38. src_install() {
  39. dobin mpeg_encode
  40. doman docs/*.1
  41. dodoc BUGS CHANGES README TODO VERSION
  42. dodoc docs/EXTENSIONS docs/INPUT.FORMAT docs/*.param docs/param-summary
  43. docinto examples
  44. dodoc examples/*
  45. cd ../convert
  46. dobin eyuvtojpeg jmovie2jpeg mpeg_demux mtv/movieToVid
  47. newdoc README README.convert
  48. newdoc mtv/README README.mtv
  49. }
  50. pkg_postinst() {
  51. if [[ -z $(best_version media-libs/netpbm) ]]; then
  52. elog "If you are looking for eyuvtoppm or ppmtoeyuv, please"
  53. elog "emerge the netpbm package. It has updated versions."
  54. fi
  55. }