csvfix-1.3.ebuild 966 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit eutils toolchain-funcs versionator
  5. MY_PV="$(delete_all_version_separators)"
  6. DESCRIPTION="A stream editor for manipulating CSV files"
  7. HOMEPAGE="https://code.google.com/p/csvfix/"
  8. SRC_URI="https://dev.gentoo.org/~radhermit/dist/${P}.tar.bz2
  9. doc? ( https://csvfix.googlecode.com/files/CSVfix_man_html_${MY_PV}0.zip )"
  10. LICENSE="MIT"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="doc"
  14. RDEPEND="dev-libs/expat"
  15. DEPEND="${RDEPEND}
  16. doc? ( app-arch/unzip )"
  17. src_prepare() {
  18. epatch "${FILESDIR}"/${P}-make.patch
  19. epatch "${FILESDIR}"/${PN}-1.10a-tests.patch
  20. edos2unix $(find csvfix/tests -type f)
  21. }
  22. src_compile() {
  23. emake CC="$(tc-getCXX)" AR="$(tc-getAR)" lin
  24. }
  25. src_test() {
  26. cd ${PN}/tests
  27. chmod +x run1 runtests
  28. ./runtests || die "tests failed"
  29. }
  30. src_install() {
  31. dobin csvfix/bin/csvfix
  32. use doc && dohtml -r "${WORKDIR}"/${PN}${MY_PV}/*
  33. }