qwriter-0.1.9.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="2"
  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"
  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} || die "dobin failed"
  28. newicon images/w.png ${PN}.png || die "newicon failed"
  29. make_desktop_entry ${PN} QWriter ${PN} \
  30. || die "make_desktop_entry failed"
  31. insinto /usr/share/${PN}/languages/
  32. for x in ${LANGS};do
  33. for j in ${LINGUAS};do
  34. if [[ $x == $j ]]; then
  35. doins languages/${PN}_$x.qm \
  36. || die "failed to install $x translation"
  37. fi
  38. done
  39. done
  40. }