tokyocabinet-1.4.48.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="2"
  4. inherit eutils autotools
  5. DESCRIPTION="A library of routines for managing a database"
  6. HOMEPAGE="http://fallabs.com/tokyocabinet/"
  7. SRC_URI="${HOMEPAGE}${P}.tar.gz"
  8. LICENSE="LGPL-2.1"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 hppa ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
  11. IUSE="debug doc examples"
  12. DEPEND="sys-libs/zlib
  13. app-arch/bzip2"
  14. RDEPEND="${DEPEND}"
  15. src_prepare() {
  16. epatch "${FILESDIR}/fix_rpath.patch"
  17. sed -i \
  18. -e "/ldconfig/d" \
  19. -e "/DATADIR/d" Makefile.in || die
  20. # cflags fix - remove -O2 at end of line and -fomit-frame-pointer
  21. sed -i -e 's/-O3"$/"/' configure.in || die
  22. sed -i -e 's/-fomit-frame-pointer//' configure.in || die
  23. # flag only works on x86 derivatives, remove everywhere else
  24. if ! use x86 && ! use amd64; then sed -i -e 's/ -minline-all-stringops//' configure.in; fi
  25. eautoreconf
  26. }
  27. src_configure() {
  28. # we use the "fastest" target without the -O3
  29. econf $(use_enable debug) --enable-off64 --enable-fastest
  30. }
  31. src_install() {
  32. emake DESTDIR="${D}" install || die "Install failed"
  33. if use examples; then
  34. insinto /usr/share/${PF}/example
  35. doins example/* || die "Install failed"
  36. fi
  37. if use doc; then
  38. insinto /usr/share/doc/${PF}
  39. doins -r doc/* || die "Install failed"
  40. fi
  41. }
  42. src_test() {
  43. emake -j1 check || die "Tests failed"
  44. }