grace-5.1.25.ebuild 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. FORTRAN_NEEDED=fortran
  5. inherit eutils fortran-2 toolchain-funcs
  6. DESCRIPTION="Motif based XY-plotting tool"
  7. HOMEPAGE="http://plasma-gate.weizmann.ac.il/Grace/"
  8. SRC_URI="
  9. http://pkgs.fedoraproject.org/cgit/grace.git/plain/grace.png
  10. https://dev.gentoo.org/~jlec/distfiles/${PN}.png.tar
  11. ftp://plasma-gate.weizmann.ac.il/pub/${PN}/src/stable/${P}.tar.gz"
  12. SLOT="0"
  13. LICENSE="GPL-2 LGPL-2"
  14. KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
  15. IUSE="fftw fortran jpeg netcdf png"
  16. DEPEND="
  17. media-libs/t1lib
  18. media-libs/tiff:0
  19. sys-libs/zlib
  20. >=x11-libs/motif-2.3:0
  21. x11-libs/xbae
  22. fftw? ( sci-libs/fftw:2.1= )
  23. jpeg? ( virtual/jpeg:0 )
  24. netcdf? ( sci-libs/netcdf )
  25. png? ( media-libs/libpng:0= )"
  26. RDEPEND="${DEPEND}
  27. x11-misc/xdg-utils"
  28. PATCHES=(
  29. # move tmpnam to mkstemp (adapted from debian)
  30. "${FILESDIR}"/${PN}-5.1.22-mkstemp.patch
  31. # fix configure instead of aclocal.m4
  32. "${FILESDIR}"/${PN}-5.1.21-netcdf.patch
  33. # fix for missing defines when fortran is disabled
  34. "${FILESDIR}"/${PN}-5.1.21-fortran.patch
  35. # fix a leak (from freebsd)
  36. "${FILESDIR}"/${PN}-5.1.22-dlmodule.patch
  37. "${FILESDIR}"/${PN}-5.1.22-ldflags.patch
  38. )
  39. pkg_setup() {
  40. fortran-2_pkg_setup
  41. }
  42. src_prepare() {
  43. default
  44. # don't strip if not asked for
  45. sed -i \
  46. -e 's:$(INSTALL_PROGRAM) -s:$(INSTALL_PROGRAM):g' \
  47. {auxiliary,grconvert,src}/Makefile || die
  48. sed -i \
  49. -e 's:$(GRACE_HOME)/bin:$(PREFIX)/bin:g' \
  50. -e "s:\$(GRACE_HOME)/lib:\$(PREFIX)/$(get_libdir):g" \
  51. -e 's:$(GRACE_HOME)/include:$(PREFIX)/include:g' \
  52. -e 's:$(PREFIX)/man:$(PREFIX)/share/man:g' \
  53. Makefile */Makefile || die "sed failed"
  54. sed -i \
  55. -e 's:bin/grconvert:grconvert:' \
  56. -e 's:auxiliary/fdf2fit:fdf2fit:' \
  57. gracerc || die
  58. }
  59. src_configure() {
  60. tc-export CC AR
  61. # the configure script just produces a basic Make.conf
  62. # and a config.h
  63. econf \
  64. --disable-pdfdrv \
  65. --disable-xmhtml \
  66. --without-bundled-xbae \
  67. --without-bundled-t1lib \
  68. --enable-grace-home="${EPREFIX}"/usr/share/${PN} \
  69. --with-helpviewer="xdg-open %s" \
  70. --with-editor="xdg-open %s" \
  71. --with-printcmd="lpr" \
  72. --x-includes="${EPREFIX}"/usr/include \
  73. --x-libraries="${EPREFIX}"/usr/$(get_libdir) \
  74. $(use_with fftw) \
  75. $(use_enable fortran f77-wrapper) \
  76. $(use_enable netcdf) \
  77. $(use_enable jpeg jpegdrv) \
  78. $(use_enable png pngdrv) \
  79. $(use_with fortran f77 $(tc-getFC))
  80. }
  81. src_install() {
  82. default
  83. dosym ../../${PN}/examples /usr/share/doc/${PF}/examples
  84. dosym ../../${PN}/doc /usr/share/doc/${PF}/html
  85. doman "${ED%/}"/usr/share/doc/${PF}/html/*.1
  86. rm -f "${ED%/}"/usr/share/doc/${PF}/html/*.1 || die
  87. domenu "${FILESDIR}"/${PN}.desktop
  88. doicon "${WORKDIR}"/${PN}.png
  89. }