setools-4.1.0.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
  5. inherit distutils-r1
  6. DESCRIPTION="Policy Analysis Tools for SELinux"
  7. HOMEPAGE="https://github.com/TresysTechnology/setools/wiki"
  8. if [[ ${PV} == 9999 ]] ; then
  9. inherit git-r3
  10. EGIT_REPO_URI="https://github.com/TresysTechnology/setools.git"
  11. else
  12. SRC_URI="https://github.com/TresysTechnology/setools/archive/${PV}.tar.gz -> ${P}.tar.gz"
  13. KEYWORDS="~amd64 ~x86"
  14. fi
  15. LICENSE="GPL-2 LGPL-2.1"
  16. SLOT="0"
  17. IUSE="X debug test"
  18. RDEPEND="${PYTHON_DEPS}
  19. >=sys-libs/libselinux-2.4:=[${PYTHON_USEDEP}]
  20. >=dev-python/networkx-1.8[${PYTHON_USEDEP}]
  21. dev-libs/libpcre:=
  22. X? (
  23. dev-python/PyQt5[gui,widgets]
  24. )"
  25. DEPEND="${RDEPEND}
  26. >=dev-lang/swig-2.0.12:0
  27. sys-devel/bison
  28. sys-devel/flex
  29. >=sys-libs/libsepol-2.5
  30. test? (
  31. python_targets_python2_7? ( dev-python/mock[${PYTHON_USEDEP}] )
  32. dev-python/tox[${PYTHON_USEDEP}]
  33. )"
  34. python_prepare_all() {
  35. sed -i "s/'-Werror', //" "${S}"/setup.py || die "failed to remove Werror"
  36. use X || local PATCHES=( "${FILESDIR}"/setools-4.1.0-remove-gui.patch )
  37. distutils-r1_python_prepare_all
  38. }
  39. python_test() {
  40. esetup.py test
  41. }