alock-1.0.0.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils toolchain-funcs
  5. # we need this since there are no tagged releases yet
  6. DESCRIPTION="locks the local X display until a password is entered"
  7. HOMEPAGE="http://darkshed.net/projects/alock
  8. https://github.com/mgumz/alock"
  9. SRC_URI="https://github.com/mgumz/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  10. LICENSE="MIT"
  11. SLOT="0"
  12. KEYWORDS="amd64 ppc x86"
  13. IUSE="doc imlib pam"
  14. DEPEND="x11-libs/libX11
  15. x11-libs/libXext
  16. x11-libs/libXpm
  17. x11-libs/libXrender
  18. x11-libs/libXcursor
  19. imlib? ( media-libs/imlib2[X] )
  20. pam? ( virtual/pam )
  21. doc? ( app-text/asciidoc )"
  22. RDEPEND="${DEPEND}"
  23. src_prepare() {
  24. epatch "${FILESDIR}"/implicit_pointer_conversion_fix_amd64.patch
  25. epatch "${FILESDIR}"/check-setuid.patch
  26. epatch "${FILESDIR}"/tidy-printf.patch
  27. epatch "${FILESDIR}"/fix-aliasing.patch
  28. epatch "${FILESDIR}"/no-xf86misc.patch
  29. eapply_user
  30. }
  31. src_configure() {
  32. tc-export CC
  33. econf \
  34. --prefix=/usr \
  35. --with-all \
  36. $(use_with pam) \
  37. $(use_with imlib imlib2)
  38. }
  39. src_compile() {
  40. # xmlto isn't required, so set to 'true' as dummy program
  41. # alock.1 is suitable for a manpage
  42. emake XMLTO=true
  43. }
  44. src_install() {
  45. dobin src/alock
  46. if use doc; then
  47. # We need to generate the manpage...
  48. a2x -d manpage -f manpage ./"${PN}".txt || die "a2x conversion failed."
  49. doman alock.1
  50. dodoc {CHANGELOG,README,TODO}.txt
  51. fi
  52. insinto /usr/share/alock/xcursors
  53. doins contrib/xcursor-*
  54. insinto /usr/share/alock/bitmaps
  55. doins bitmaps/*
  56. if ! use pam; then
  57. # Sets suid so alock can correctly work with shadow
  58. fperms 4755 /usr/bin/alock
  59. fi
  60. }