thin-provisioning-tools-0.5.3.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit autotools eutils flag-o-matic
  5. DESCRIPTION="A suite of tools for thin provisioning on Linux"
  6. HOMEPAGE="https://github.com/jthornber/thin-provisioning-tools"
  7. SRC_URI="https://github.com/jthornber/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
  11. IUSE="static test"
  12. LIB_DEPEND="dev-libs/expat[static-libs(+)]
  13. dev-libs/libaio[static-libs(+)]"
  14. RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
  15. # || ( ) is a non-future proof workaround for Portage unefficiency wrt #477050
  16. DEPEND="${RDEPEND}
  17. static? ( ${LIB_DEPEND} )
  18. test? (
  19. || ( dev-lang/ruby:2.9 dev-lang/ruby:2.8 dev-lang/ruby:2.7 dev-lang/ruby:2.6 dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 dev-lang/ruby:2.0 dev-lang/ruby:1.9 )
  20. >=dev-cpp/gmock-1.6
  21. >=dev-cpp/gtest-1.6
  22. dev-util/cucumber
  23. dev-util/aruba
  24. )
  25. dev-libs/boost"
  26. src_prepare() {
  27. sed -i -e '/^INSTALL_PROGRAM/s:-s::' Makefile.in || die
  28. sed -i \
  29. -e '/^unit-tests\/unit_tests:/s:lib/libgmock.a::' \
  30. -e '/-lgmock/s:$: -lgtest:' \
  31. unit-tests/Makefile.in || die #493440
  32. epatch_user
  33. eautoreconf
  34. }
  35. src_configure() {
  36. use static && append-ldflags -static
  37. econf \
  38. --prefix="${EPREFIX}"/ \
  39. --bindir="${EPREFIX}"/sbin \
  40. --with-optimisation='' \
  41. $(use_enable test testing)
  42. }
  43. src_compile() {
  44. MAKEOPTS+=" V="
  45. default
  46. }
  47. src_test() {
  48. emake unit-test
  49. }
  50. src_install() {
  51. emake DESTDIR="${D}" DATADIR="${ED}/usr/share" install
  52. dodoc README.md TODO.org
  53. }