wxmaxima-15.08.2.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. WX_GTK_VER="3.0"
  5. inherit eutils gnome2-utils wxwidgets fdo-mime
  6. DESCRIPTION="Graphical frontend to Maxima, using the wxWidgets toolkit"
  7. HOMEPAGE="http://andrejv.github.io/wxmaxima/"
  8. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="amd64 ppc x86"
  12. DEPEND="
  13. dev-libs/libxml2:2
  14. x11-libs/wxGTK:${WX_GTK_VER}"
  15. RDEPEND="${DEPEND}
  16. media-fonts/jsmath
  17. sci-visualization/gnuplot[wxwidgets]
  18. sci-mathematics/maxima"
  19. src_prepare() {
  20. local i
  21. # consistent package names
  22. sed -e "s:\${datadir}/wxMaxima:\${datadir}/${PN}:g" \
  23. -i Makefile.in data/Makefile.in test/Makefile.in || die "sed failed"
  24. sed -e 's:share/wxMaxima:share/wxmaxima:g' \
  25. -i src/wxMaxima.cpp src/wxMaximaFrame.cpp src/Dirstructure.cpp src/Dirstructure.h \
  26. || die "sed failed"
  27. # correct gettext behavior
  28. if [[ -n "${LINGUAS+x}" ]] ; then
  29. for i in $(cd "${S}"/locales ; echo *.mo) ; do
  30. if ! has ${i%.mo} ${LINGUAS} ; then
  31. sed -i \
  32. -e "/^WXMAXIMA_LINGUAS/s# ${i%.mo}##" \
  33. -e "/^WXWIN_LINGUAS/s# ${i%.mo}##" \
  34. locales/Makefile.in || die
  35. fi
  36. done
  37. fi
  38. }
  39. src_configure() {
  40. econf \
  41. --enable-printing \
  42. --with-wx-config=${WX_CONFIG}
  43. }
  44. src_install () {
  45. default
  46. doicon -s 128 data/wxmaxima.png
  47. make_desktop_entry wxmaxima wxMaxima wxmaxima
  48. dosym /usr/share/${PN}/README /usr/share/doc/${PF}/README
  49. }
  50. pkg_preinst() {
  51. gnome2_icon_savelist
  52. }
  53. pkg_postinst() {
  54. gnome2_icon_cache_update
  55. fdo-mime_desktop_database_update
  56. }
  57. pkg_postrm() {
  58. gnome2_icon_cache_update
  59. fdo-mime_desktop_database_update
  60. }