gabedit-2.4.6.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs versionator
  5. MY_PN=${PN/g/G}
  6. MY_PV=$(delete_all_version_separators)
  7. MY_P="${MY_PN}Src${MY_PV}"
  8. DESCRIPTION="GUI for computational chemistry packages"
  9. HOMEPAGE="http://gabedit.sourceforge.net/"
  10. SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
  11. LICENSE="MIT"
  12. SLOT="0"
  13. KEYWORDS="amd64 x86"
  14. IUSE="openmp"
  15. RDEPEND="
  16. dev-libs/glib:2
  17. x11-libs/cairo
  18. x11-libs/gdk-pixbuf:2
  19. x11-libs/gtk+:2
  20. x11-libs/gtkglext
  21. x11-libs/gl2ps
  22. x11-libs/pango
  23. virtual/opengl
  24. virtual/glu"
  25. DEPEND="${RDEPEND}
  26. virtual/pkgconfig"
  27. S=${WORKDIR}/${MY_P}
  28. src_prepare() {
  29. sed -i "/rmdir tmp/d" "${S}"/Makefile || die
  30. sed \
  31. -e "/GTK_DISABLE_DEPRECATED/s:define:undef:g" \
  32. -i "${S}/Config.h" || die
  33. sed -e 's:-g::g' -i Makefile || die
  34. cp "${FILESDIR}"/CONFIG.Gentoo "${S}"/CONFIG
  35. if use openmp && tc-has-openmp; then
  36. cat <<- EOF >> "${S}/CONFIG"
  37. OMPLIB=-fopenmp
  38. OMPCFLAGS=-DENABLE_OMP -fopenmp
  39. EOF
  40. fi
  41. echo "COMMONCFLAGS = ${CFLAGS} -DENABLE_DEPRECATED \$(OMPCFLAGS) \$(DRAWGEOMGL)" >> CONFIG
  42. tc-export CC
  43. }
  44. src_compile() {
  45. emake clean
  46. emake external_gl2ps=1
  47. }
  48. src_install() {
  49. local size
  50. dobin ${PN}
  51. dodoc ChangeLog
  52. for size in 16 24 32 48; do
  53. doicon -s ${size} icons/Gabedit${size}.*
  54. done
  55. }