freemat-4.2.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils cmake-utils fdo-mime
  5. MY_PN=FreeMat
  6. MY_P=${MY_PN}-${PV}
  7. DESCRIPTION="Environment for rapid engineering and scientific processing"
  8. HOMEPAGE="http://freemat.sourceforge.net/"
  9. SRC_URI="mirror://sourceforge/freemat/${MY_P}-Source.tar.gz"
  10. IUSE="volpack vtk"
  11. LICENSE="GPL-2"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. RDEPEND="dev-libs/libpcre
  15. media-libs/portaudio
  16. sci-libs/arpack
  17. sci-libs/fftw:3.0
  18. sci-libs/matio
  19. sci-libs/umfpack
  20. sys-libs/ncurses:0=
  21. virtual/glu
  22. virtual/lapack
  23. virtual/libffi
  24. virtual/opengl
  25. dev-qt/qtgui:4
  26. dev-qt/qtopengl:4
  27. dev-qt/qtsvg:4
  28. dev-qt/qtwebkit:4
  29. volpack? ( media-libs/volpack )
  30. vtk? ( sci-libs/vtk )"
  31. DEPEND="${RDEPEND}
  32. dev-lang/python
  33. virtual/pkgconfig"
  34. S="${WORKDIR}/${MY_P}-Source"
  35. src_prepare(){
  36. epatch \
  37. "${FILESDIR}"/${PN}-4.1-fixes.patch \
  38. "${FILESDIR}"/${PN}-4.1-python3.patch \
  39. "${FILESDIR}"/${P}-use_llvm.patch
  40. rm -f CMakeCache.txt
  41. find . -type f -name '*.moc.cpp' -exec rm -f {} \;
  42. find . -type f -name 'add.so' -exec rm -f {} \;
  43. }
  44. src_configure() {
  45. mycmakeargs+=(
  46. -DFORCE_SYSTEM_LIBS=ON
  47. -DUSE_LLVM=OFF
  48. -DUSE_ITK=OFF
  49. -DFFI_INCLUDE_DIR="$(pkg-config --cflags-only-I libffi | sed -e s/-I//)"
  50. $(cmake-utils_use_with volpack VOLPACK)
  51. $(cmake-utils_use_with vtk VTK)
  52. )
  53. cmake-utils_src_configure
  54. }
  55. src_install() {
  56. cmake-utils_src_install -j1
  57. dodoc ChangeLog
  58. newicon images/freemat_small_mod_64.png ${PN}.png
  59. make_desktop_entry FreeMat FreeMat
  60. }
  61. pkg_postinst() {
  62. fdo-mime_desktop_database_update
  63. elog "Before using ${MY_PN}, do (as a normal user)"
  64. elog "FreeMat -i ${EROOT}usr/share/${MY_P}"
  65. elog "Then start ${MY_PN}, choose Tools -> Path Tool,"
  66. elog "select ${EROOT}usr/share/${MY_P}/toolbox and Add With Subfolders"
  67. }
  68. pkg_postrm() {
  69. fdo-mime_desktop_database_update
  70. }