qwriter-0.1.9-r2.ebuild 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. LANGS="ru"
  5. inherit eutils qt4-r2
  6. MY_P="${P}-src"
  7. DESCRIPTION="Advanced text editor with syntax highlighting"
  8. HOMEPAGE="http://qt-apps.org/content/show.php/QWriter?content=106377"
  9. #upstream failed to provide a sane url
  10. SRC_URI="https://qwriter.googlecode.com/files/${MY_P}.tar.gz"
  11. LICENSE="GPL-3"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. IUSE=""
  15. DEPEND="dev-qt/qtgui:4
  16. x11-libs/qscintilla:=[qt4(-)]"
  17. RDEPEND="${DEPEND}"
  18. S="${WORKDIR}/${MY_P}"
  19. src_prepare() {
  20. sed -i "s:languages:/usr/share/${PN}/languages:" src/MainWindow.cpp \
  21. || die "failed to fix translation path"
  22. # gcc-4.7. Bug #425252
  23. epatch "${FILESDIR}"/${P}-gcc47.patch
  24. qt4-r2_src_prepare
  25. }
  26. src_install() {
  27. dobin bin/${PN}
  28. newicon images/w.png ${PN}.png
  29. make_desktop_entry ${PN} QWriter ${PN}
  30. insinto /usr/share/${PN}/languages/
  31. for x in ${LANGS};do
  32. for j in ${LINGUAS};do
  33. if [[ $x == $j ]]; then
  34. doins languages/${PN}_$x.qm
  35. fi
  36. done
  37. done
  38. }