texstudio-2.12.2.ebuild 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit fdo-mime gnome2-utils prefix qmake-utils
  5. DESCRIPTION="Free cross-platform LaTeX editor (fork from texmakerX)"
  6. HOMEPAGE="http://texstudio.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/${PN}/${PN}/TeXstudio%20${PV}/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
  11. IUSE="video"
  12. COMMON_DEPEND="
  13. app-text/hunspell:=
  14. app-text/poppler[qt5]
  15. >=dev-libs/quazip-0.7.2[qt5]
  16. dev-qt/designer:5
  17. dev-qt/qtcore:5
  18. dev-qt/qtconcurrent:5
  19. dev-qt/qtgui:5
  20. dev-qt/qtnetwork:5
  21. dev-qt/qtprintsupport:5
  22. dev-qt/qtscript:5
  23. dev-qt/qtsingleapplication[qt5,X]
  24. dev-qt/qtsvg:5
  25. dev-qt/qttest:5
  26. dev-qt/qtwidgets:5
  27. dev-qt/qtxml:5
  28. sys-libs/zlib
  29. x11-libs/libX11
  30. x11-libs/libXext
  31. video? ( media-libs/phonon[qt5] )"
  32. RDEPEND="${COMMON_DEPEND}
  33. app-text/ghostscript-gpl
  34. app-text/psutils
  35. media-libs/netpbm
  36. virtual/latex-base"
  37. DEPEND="${COMMON_DEPEND}
  38. virtual/pkgconfig"
  39. S=${WORKDIR}/${PN}${PV}
  40. src_prepare() {
  41. default
  42. find hunspell quazip utilities/poppler-data qtsingleapplication -delete || die
  43. if use video; then
  44. sed "/^PHONON/s:$:true:g" -i ${PN}.pro || die
  45. fi
  46. sed \
  47. -e '/qtsingleapplication.pri/d' \
  48. -i ${PN}.pro || die
  49. cp "${FILESDIR}"/texmakerx_my.pri ${PN}.pri || die
  50. eprefixify ${PN}.pri
  51. # fix build with quazip-0.7.2 - bug 597930
  52. sed -i ${PN}.pro -e "s|include/quazip|&5|" || die
  53. sed -i ${PN}.pri -i ${PN}.pro -e "s/-lquazip/&5/" || die
  54. }
  55. src_configure() {
  56. eqmake5 USE_SYSTEM_HUNSPELL=1 USE_SYSTEM_QUAZIP=1
  57. }
  58. src_install() {
  59. local i
  60. for i in 16x16 22x22 32x32 48x48 64x64 128x128; do
  61. newicon -s ${i} utilities/${PN}${i}.png ${PN}.png
  62. done
  63. emake DESTDIR="${D}" INSTALL_ROOT="${ED}" install
  64. }
  65. pkg_preinst() {
  66. gnome2_icon_savelist
  67. }
  68. pkg_postinst() {
  69. fdo-mime_desktop_database_update
  70. gnome2_icon_cache_update
  71. }
  72. pkg_postrm() {
  73. fdo-mime_desktop_database_update
  74. gnome2_icon_cache_update
  75. }