diff options
author | Joseph Ciurej <ciurej1@llnl.gov> | 2020-04-29 00:27:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 09:27:27 +0200 |
commit | c37857f9956a4f07a395e3b7d6e4ed62564e6f0b (patch) | |
tree | 02160bec48f57c4e329df460ad18366efeb1117c /var | |
parent | 6c0d4fb5e5a533bbe5b86711b7e09c3b9f1ca758 (diff) | |
download | spack-c37857f9956a4f07a395e3b7d6e4ed62564e6f0b.tar.gz spack-c37857f9956a4f07a395e3b7d6e4ed62564e6f0b.tar.bz2 spack-c37857f9956a4f07a395e3b7d6e4ed62564e6f0b.tar.xz spack-c37857f9956a4f07a395e3b7d6e4ed62564e6f0b.zip |
openscenegraph: add v3.4.0, v3.4.1; add '+ffmpeg' (#16360)
* openscenegraph: add v3.4.0/3.4.1, update versioning to use git, improve dependency handling (esp. for ffmpeg, opengl)
* openscenegraph: add '+ffmpeg' variant, add 'jasper' dependency, clean up cmake config variables
* openscenegraph: reverted fetches to use checksums to improve reliability
* openscenegraph: add a few more explicit dependencies (e.g. png, tiff, glib).
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/openscenegraph/glibc-jasper.patch | 15 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/openscenegraph/package.py | 37 |
2 files changed, 44 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/openscenegraph/glibc-jasper.patch b/var/spack/repos/builtin/packages/openscenegraph/glibc-jasper.patch new file mode 100644 index 0000000000..d826b8885a --- /dev/null +++ b/var/spack/repos/builtin/packages/openscenegraph/glibc-jasper.patch @@ -0,0 +1,15 @@ +diff --git a/src/osgPlugins/jp2/ReaderWriterJP2.cpp b/src/osgPlugins/jp2/ReaderWriterJP2.cpp +index 7b3c6cc..d949c2c 100644 +--- a/src/osgPlugins/jp2/ReaderWriterJP2.cpp ++++ b/src/osgPlugins/jp2/ReaderWriterJP2.cpp +@@ -15,6 +15,10 @@ + #include <stdio.h> + #include <stdlib.h> + ++#ifndef SIZE_MAX ++#define SIZE_MAX ((size_t)(-1)) ++#endif ++ + extern "C" + { + #include <jasper/jasper.h> diff --git a/var/spack/repos/builtin/packages/openscenegraph/package.py b/var/spack/repos/builtin/packages/openscenegraph/package.py index 5f2646729e..2a6da5dbff 100644 --- a/var/spack/repos/builtin/packages/openscenegraph/package.py +++ b/var/spack/repos/builtin/packages/openscenegraph/package.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - from spack import * @@ -12,41 +11,63 @@ class Openscenegraph(CMakePackage): that's used in a variety of visual simulation applications.""" homepage = "http://www.openscenegraph.org" + git = "https://github.com/openscenegraph/OpenSceneGraph.git" url = "https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.6.4.tar.gz" version('3.6.5', sha256='aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12') version('3.6.4', sha256='81394d1b484c631028b85d21c5535280c21bbd911cb058e8746c87e93e7b9d33') + version('3.4.1', sha256='930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5') + version('3.4.0', sha256='0d5efe12b923130d14a6fce5866675d7625fcfb1c004c9f9b10034b9feb61ac2') version('3.2.3', sha256='a1ecc6524197024834e1277916922b32f30246cb583e27ed19bf3bf889534362') version('3.1.5', sha256='dddecf2b33302076712100af59b880e7647bc595a9a7cc99186e98d6e0eaeb5c') variant('shared', default=True, description='Builds a shared version of the library') + variant('ffmpeg', default=False, description='Builds ffmpeg plugin for audio encoding/decoding') depends_on('cmake@2.8.7:', type='build') + depends_on('qt+opengl') depends_on('qt@4:', when='@3.2:') depends_on('qt@:4', when='@:3.1') - depends_on('zlib') depends_on('libxinerama') depends_on('libxrandr') + depends_on('libpng') + depends_on('jasper') + depends_on('libtiff') + depends_on('glib') + depends_on('zlib') + + depends_on('ffmpeg+avresample', when='+ffmpeg') + # https://github.com/openscenegraph/OpenSceneGraph/issues/167 + depends_on('ffmpeg@:2', when='@:3.4.0+ffmpeg') + + patch('glibc-jasper.patch', when='@3.4%gcc') def cmake_args(self): spec = self.spec shared_status = 'ON' if '+shared' in spec else 'OFF' + opengl_profile = 'GL{0}'.format(spec['gl'].version.up_to(1)) args = [ + # Variant Options # '-DDYNAMIC_OPENSCENEGRAPH={0}'.format(shared_status), '-DDYNAMIC_OPENTHREADS={0}'.format(shared_status), + '-DOPENGL_PROFILE={0}'.format(opengl_profile), + + # General Options # '-DBUILD_OSG_APPLICATIONS=OFF', '-DOSG_NOTIFY_DISABLED=ON', '-DLIB_POSTFIX=', '-DCMAKE_RELWITHDEBINFO_POSTFIX=', + '-DCMAKE_MINSIZEREL_POSTFIX=' ] - if spec.satisfies('@:3.2'): - args.extend([ - '-DZLIB_INCLUDE_DIR={0}'.format(spec['zlib'].prefix.include), - '-DZLIB_LIBRARY={0}/libz.{1}'.format(spec['zlib'].prefix.lib, - dso_suffix), - ]) + + if spec.satisfies('~ffmpeg'): + for ffmpeg_lib in ['libavcodec', 'libavformat', 'libavutil']: + args.extend([ + '-DFFMPEG_{0}_INCLUDE_DIRS='.format(ffmpeg_lib.upper()), + '-DFFMPEG_{0}_LIBRARIES='.format(ffmpeg_lib.upper()), + ]) # NOTE: This is necessary in order to allow OpenSceneGraph to compile # despite containing a number of implicit bool to int conversions. |