Commits

mastbaum committed 3cbd7c6

add files for glew, openal, sndfile, and sfml

Comments (0)

Files changed (4)

+try:
+    from shrinkwrap.install import ShrinkwrapInstall
+except ImportError:
+    import subprocess; subprocess.check_call('pip install shrinkwrap', shell=True)
+    from shrinkwrap.install import ShrinkwrapInstall
+import os
+import glob
+from setuptools import setup
+
+
+version = '1.9.0'
+source_url = 'http://downloads.sourceforge.net/project/glew/glew/%(version)s/glew-%(version)s.tgz' % {'version': version}
+
+
+def installer(self):
+    self.download_and_unpack_tarball(source_url)
+
+    glew_dir = 'glew-' + version
+    os.chdir(glew_dir)
+    self.make(extra_opts=['install', 'GLEW_DEST=%s' % self.virtualenv])
+
+    env_contents = 'export GLEW_ROOT_DIR=%s' % self.virtualenv
+    self.install_env('glew.sh', contents=env_contents)
+
+    # copy libraries to lib if written to lib64
+    lib64_dir = os.path.join(self.virtualenv, 'lib64')
+    if os.path.exists(lib64_dir):
+        os.chdir(lib64_dir)
+        lib_dir = os.path.join(self.virtualenv, 'lib')
+        self.shell('cp -r libGLEW* pkgconfig %s' % lib_dir)
+
+
+setup(
+    name='glew',
+    version=version,
+    author='Andy Mastbaum',
+    author_email='mastbaum@hep.upenn.edu',
+    shrinkwrap_installer=installer,
+    cmdclass={'install': ShrinkwrapInstall},
+)
+try:
+    from shrinkwrap.install import ShrinkwrapInstall
+except ImportError:
+    import subprocess; subprocess.check_call('pip install shrinkwrap', shell=True)
+    from shrinkwrap.install import ShrinkwrapInstall
+from setuptools import setup
+import os
+
+version = '1.14'
+source_url = 'http://kcat.strangesoft.net/openal-releases/openal-soft-%s.tar.bz2' % version
+
+def installer(self):
+    self.download_and_unpack_tarball(source_url)
+
+    openal_dir = 'openal-soft-' + version
+    os.chdir(openal_dir)
+
+    os.chdir('build')
+    config_cmd = 'cmake -DCMAKE_INSTALL_PREFIX=%s ..' % (self.virtualenv)
+    self.shell(config_cmd)
+
+    self.make(extra_opts=['install'])
+
+setup(
+    name='openal',
+    version=version,
+    author='Andy Mastbaum',
+    author_email='mastbaum@hep.upenn.edu',
+    shrinkwrap_installer=installer,
+    shrinkwrap_requires=['cmake'],
+    cmdclass={'install': ShrinkwrapInstall},
+)
+try:
+    from shrinkwrap.install import ShrinkwrapInstall
+except ImportError:
+    import subprocess; subprocess.check_call('pip install shrinkwrap', shell=True)
+    from shrinkwrap.install import ShrinkwrapInstall
+from setuptools import setup
+import os
+
+version = '2.0-rc'
+source_url = 'https://github.com/LaurentGomila/SFML.git'
+
+def installer(self):
+    self.shell('git clone ' + source_url)
+
+    os.chdir('SFML')
+    self.shell('git checkout 2.0-rc')
+
+    config_cmd = 'cmake -DCMAKE_INSTALL_PREFIX=%s' % (self.virtualenv)
+    self.shell(config_cmd)
+
+    self.make(extra_opts=['install'])
+
+setup(
+    name='sfml',
+    version=version,
+    author='Andy Mastbaum',
+    author_email='mastbaum@hep.upenn.edu',
+    shrinkwrap_installer=installer,
+    shrinkwrap_requires=['cmake','glew','openal', 'sndfile'],
+    cmdclass={'install': ShrinkwrapInstall},
+)
+try:
+    from shrinkwrap.install import ShrinkwrapInstall
+except ImportError:
+    import subprocess; subprocess.check_call('pip install shrinkwrap', shell=True)
+    from shrinkwrap.install import ShrinkwrapInstall
+from setuptools import setup
+
+
+version = '1.0.25'
+
+setup(
+    name='sndfile',
+    version=version,
+    author='Andy Mastbaum',
+    author_email='mastbaum@hep.upenn.edu',
+    shrinkwrap_installer='autoconf',
+    shrinkwrap_source_url='http://www.mega-nerd.com/libsndfile/files/libsndfile-%s.tar.gz' % version,
+    cmdclass={'install': ShrinkwrapInstall},
+)