biew-6.1.0-r3.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils flag-o-matic toolchain-funcs versionator
  5. MY_P=${PN}-$(replace_all_version_separators "")
  6. DESCRIPTION="A portable viewer of binary files, hexadecimal and disassembler modes"
  7. HOMEPAGE="http://beye.sourceforge.net/"
  8. SRC_URI="mirror://sourceforge/beye/${PV}/${MY_P}-src.tar.bz2"
  9. S=${WORKDIR}/${MY_P}
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="amd64 x86"
  13. IUSE="gpm cpu_flags_x86_mmx cpu_flags_x86_sse"
  14. REQUIRED_USE="cpu_flags_x86_mmx cpu_flags_x86_sse"
  15. RDEPEND="gpm? ( sys-libs/gpm )"
  16. DEPEND="${RDEPEND}"
  17. pkg_setup() {
  18. append-flags -mmmx -msse #362043
  19. }
  20. src_prepare() {
  21. epatch "${FILESDIR}/${PN}-610-fix_localedep-1.patch"
  22. epatch "${FILESDIR}/${PN}-610-portable_configure-1.patch"
  23. epatch "${FILESDIR}/${PN}-610-crash.patch"
  24. sed -i -e 's^man/man1/biew.1^share/man/man1/biew.1^' makefile || die "Failed to edit makefile."
  25. }
  26. src_configure() {
  27. if use gpm; then
  28. append-cppflags -DHAVE_MOUSE
  29. else
  30. append-cppflags -UHAVE_MOUSE
  31. fi
  32. ./configure --datadir=/usr/share/${PN} \
  33. --prefix=/usr \
  34. --cc="$(tc-getCC)" \
  35. --ld="$(tc-getCC)" \
  36. --ar="$(tc-getAR) -rcu" \
  37. --as="$(tc-getAS)" \
  38. --ranlib="$(tc-getRANLIB)" || die "configure failed."
  39. }
  40. src_compile() {
  41. emake LDFLAGS="${LDFLAGS}"
  42. }
  43. src_install() {
  44. emake DESTDIR="${D}" install
  45. dodoc doc/{biew_en,release,unix}.txt
  46. }
  47. pkg_postinst() {
  48. elog
  49. elog "Note: if you are upgrading from <=dev-util/biew-6.1.0 you will need"
  50. elog "to change the paths in the setup dialog (F9) from /usr/share/ to"
  51. elog "/usr/share/biew/ Alternatively, you can delete ~/.biewrc and it will"
  52. elog "automatically determine the correct locations on the next run."
  53. elog
  54. }