summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-11-30 01:31:56 -0600
committerGitHub <noreply@github.com>2020-11-30 08:31:56 +0100
commita2d156902baad2c96bcf7fd823e2f3f9dd80c226 (patch)
tree7416dd5667781c4b6c5a5bee71f841d0782d745b
parent08c9a6e2b0cba62dcedec4a2a00024704dda2001 (diff)
downloadspack-a2d156902baad2c96bcf7fd823e2f3f9dd80c226.tar.gz
spack-a2d156902baad2c96bcf7fd823e2f3f9dd80c226.tar.bz2
spack-a2d156902baad2c96bcf7fd823e2f3f9dd80c226.tar.xz
spack-a2d156902baad2c96bcf7fd823e2f3f9dd80c226.zip
freeglut: prevent linking to system deps (#20161)
-rw-r--r--var/spack/repos/builtin/packages/freeglut/package.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/freeglut/package.py b/var/spack/repos/builtin/packages/freeglut/package.py
index b28808f957..6226eb9385 100644
--- a/var/spack/repos/builtin/packages/freeglut/package.py
+++ b/var/spack/repos/builtin/packages/freeglut/package.py
@@ -12,13 +12,29 @@ class Freeglut(CMakePackage, SourceforgePackage):
homepage = "http://freeglut.sourceforge.net/"
sourceforge_mirror_path = "freeglut/freeglut-3.2.1.tar.gz"
+
version('3.2.1', sha256='d4000e02102acaf259998c870e25214739d1f16f67f99cb35e4f46841399da68')
version('3.0.0', sha256='2a43be8515b01ea82bcfa17d29ae0d40bd128342f0930cd1f375f1ff999f76a2')
- patch('common-gcc10.patch', when="@3.2.1: %gcc@10.0:")
+
+ depends_on('pkgconfig', type='build')
depends_on('gl')
depends_on('glu')
depends_on('libx11')
depends_on('libxrandr')
depends_on('libxi')
+ depends_on('libxxf86vm')
depends_on('xrandr')
depends_on('inputproto')
+
+ patch('common-gcc10.patch', when="@3.2.1: %gcc@10.0:")
+
+ def cmake_args(self):
+ return [
+ '-DFREEGLUT_BUILD_DEMOS=OFF',
+ '-DOPENGL_gl_LIBRARY=' + self.spec['gl'].libs[0],
+ '-DOPENGL_glu_LIBRARY=' + self.spec['glu'].libs[0],
+ '-DX11_X11_LIB=' + self.spec['libx11'].libs[0],
+ '-DX11_Xrandr_LIB=' + self.spec['libxrandr'].libs[0],
+ '-DX11_Xi_LIB=' + self.spec['libxi'].libs[0],
+ '-DX11_Xxf86vm_LIB=' + self.spec['libxxf86vm'].libs[0],
+ ]