setools-4.0.1.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2016 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 ~arm64 ~mips 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. app-arch/bzip2:=
  22. dev-libs/libpcre:=
  23. X? (
  24. dev-python/PyQt5
  25. )"
  26. DEPEND="${RDEPEND}
  27. >=dev-lang/swig-2.0.12:0
  28. sys-devel/bison
  29. sys-devel/flex
  30. >=sys-libs/libsepol-2.5
  31. test? (
  32. python_targets_python2_7? ( dev-python/mock[${PYTHON_USEDEP}] )
  33. dev-python/tox[${PYTHON_USEDEP}]
  34. )"
  35. python_prepare_all() {
  36. sed -i "s/'-Werror', //" "${S}"/setup.py || die "failed to remove Werror"
  37. use X || local PATCHES=( "${FILESDIR}"/setools-4.0.1-remove-gui.patch )
  38. distutils-r1_python_prepare_all
  39. }
  40. python_test() {
  41. esetup.py test
  42. }