qtpass-1.0.5.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit qmake-utils
  5. DESCRIPTION="multi-platform GUI for pass, the standard unix password manager"
  6. HOMEPAGE="https://qtpass.org/"
  7. SRC_URI="https://github.com/IJHack/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="~x86 ~amd64"
  11. IUSE="+qt5"
  12. DOCS=( FAQ.md README.md CONTRIBUTING.md )
  13. RDEPEND="qt5? (
  14. dev-qt/qtcore:5
  15. dev-qt/qtgui:5[xcb]
  16. dev-qt/qtwidgets:5
  17. dev-qt/qtnetwork:5
  18. )
  19. !qt5? (
  20. dev-qt/qtcore:4
  21. dev-qt/qtgui:4
  22. )
  23. app-admin/pass"
  24. DEPEND="${RDEPEND}
  25. qt5? ( dev-qt/linguist-tools:5 )"
  26. src_prepare() {
  27. # Modify install path
  28. sed -i "s/target.path = \$\$PREFIX/target.path = \$\$PREFIX\/bin/" \
  29. ${PN}.pro \
  30. || die "sed failed to modify install path for ${PN}.pro"
  31. # Backport segfault fix https://github.com/IJHack/qtpass/issues/122
  32. # (ToDo: remove this in 1.0.6)
  33. sed -e "/QtPass = NULL;/{n;d};/startupPhase = true;/a autoclearTimer = NULL;" \
  34. -i mainwindow.cpp || die "sed failed mainwindow.cpp"
  35. epatch_user
  36. }
  37. src_configure() {
  38. if use qt5 ; then
  39. eqmake5 PREFIX="${D}"/usr
  40. else
  41. eqmake4 PREFIX="${D}"/usr
  42. fi
  43. }
  44. src_install() {
  45. default
  46. insinto /usr/share/applications
  47. doins "${PN}.desktop"
  48. newicon artwork/icon.svg "${PN}-icon.svg"
  49. }