logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

freeglut-3.2.1-r1.ebuild (1671B)


  1. # Copyright 1999-2022 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. CMAKE_ECLASS=cmake
  5. inherit cmake-multilib
  6. DESCRIPTION="A free OpenGL utility toolkit, the open-sourced alternative to the GLUT library"
  7. HOMEPAGE="http://freeglut.sourceforge.net/"
  8. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  9. LICENSE="MIT"
  10. SLOT="0"
  11. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
  12. IUSE="debug static-libs wayland-only gles2-only"
  13. RDEPEND="
  14. !wayland-only? (
  15. >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
  16. >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
  17. >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
  18. >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
  19. >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
  20. >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
  21. )
  22. wayland-only? (
  23. media-libs/mesa[egl(+),${MULTILIB_USEDEP}]
  24. dev-libs/wayland[${MULTILIB_USEDEP}]
  25. x11-libs/libxkbcommon[${MULTILIB_USEDEP}]
  26. )
  27. !gles2-only? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
  28. gles2-only? ( media-libs/mesa[gles1,gles2,${MULTILIB_USEDEP}] )
  29. "
  30. DEPEND="${RDEPEND}
  31. !wayland-only? ( x11-base/xorg-proto )"
  32. BDEPEND="virtual/pkgconfig"
  33. PATCHES=(
  34. "${FILESDIR}"/${PN}-3.2.1-gcc10-fno-common.patch
  35. "${FILESDIR}"/${PN}-3.2.1-opengl-cmake.patch
  36. )
  37. HTML_DOCS=( doc/. )
  38. src_configure() {
  39. local mycmakeargs=(
  40. "-DFREEGLUT_BUILD_DEMOS=OFF"
  41. "-DFREEGLUT_BUILD_STATIC_LIBS=$(usex static-libs ON OFF)"
  42. "-DFREEGLUT_WAYLAND=$(usex wayland-only ON OFF)"
  43. "-DFREEGLUT_GLES=$(usex gles2-only ON OFF)"
  44. )
  45. cmake-multilib_src_configure
  46. }
  47. multilib_src_install() {
  48. cmake_src_install
  49. cp "${D}"/usr/$(get_libdir)/pkgconfig/{,free}glut.pc
  50. }