sg-1.5.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. AUTOTOOLS_AUTORECONF=true
  5. inherit autotools-utils multilib
  6. DESCRIPTION="Socket Graphics tool for displaying polygons"
  7. HOMEPAGE="http://fetk.org/codes/sg/index.html"
  8. SRC_URI="http://www.fetk.org/codes/download/${P}.tar.gz"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
  11. LICENSE="GPL-2"
  12. IUSE="doc static-libs"
  13. RDEPEND="
  14. dev-libs/maloc
  15. virtual/glu
  16. x11-libs/libXaw
  17. x11-libs/motif
  18. || (
  19. ( media-libs/mesa x11-libs/libGLw )
  20. media-libs/opengl-apple
  21. )"
  22. DEPEND="
  23. ${RDEPEND}
  24. doc? (
  25. media-gfx/graphviz
  26. app-doc/doxygen
  27. )"
  28. S="${WORKDIR}"/${PN}
  29. PATCHES=(
  30. "${FILESDIR}"/1.4-opengl.patch
  31. "${FILESDIR}"/1.4-doc.patch
  32. )
  33. src_prepare() {
  34. rm src/{gl,glu,glw} -rf || die
  35. sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
  36. autotools-utils_src_prepare
  37. }
  38. src_configure() {
  39. local sg_include
  40. local sg_lib
  41. local myeconfargs
  42. sg_include="${EPREFIX}"/usr/include
  43. sg_lib="${EPREFIX}"/usr/$(get_libdir)
  44. export FETK_LIBRARY="${sg_lib}"
  45. export FETK_MOTIF_LIBRARY="${sg_lib}"
  46. export FETK_GL_LIBRARY="${sg_lib}"
  47. export FETK_GLU_LIBRARY="${sg_lib}"
  48. export FETK_GLW_LIBRARY="${sg_lib}"
  49. export FETK_INCLUDE="${sg_include}"
  50. export FETK_GLW_INCLUDE="${sg_include}"
  51. export FETK_GLU_INCLUDE="${sg_include}"
  52. export FETK_GL_INCLUDE="${sg_include}"/GL
  53. export FETK_MOTIF_INCLUDE="${sg_include}"
  54. use doc || myeconfargs+=( --with-doxygen= --with-dot= )
  55. myeconfargs+=( --enable-glforce --enable-gluforce --enable-glwforce )
  56. myeconfargs+=(
  57. --docdir="${EPREFIX}"/usr/share/doc/${PF}
  58. --disable-triplet
  59. )
  60. autotools-utils_src_configure
  61. }