Skip to content
Snippets Groups Projects
Commit a3f1ae8c authored by Todd Gamblin's avatar Todd Gamblin Committed by GitHub
Browse files

Merge pull request #1041 from adamjstewart/features/matplotlib

Matplotlib Python package overhaul
parents a9a29d20 bc64990b
No related branches found
No related tags found
No related merge requests found
Showing
with 233 additions and 175 deletions
...@@ -26,29 +26,14 @@ ...@@ -26,29 +26,14 @@
class Imagemagick(Package): class Imagemagick(Package):
"""ImageMagick is a image processing library""" """ImageMagick is a software suite to create, edit, compose,
homepage = "http://www.imagemagic.org" or convert bitmap images."""
# ------------------------------------------------------------------------- homepage = "http://www.imagemagick.org"
# ImageMagick does not keep around anything but *-10 versions, so url = "https://github.com/ImageMagick/ImageMagick/archive/7.0.2-7.tar.gz"
# this URL may change. If you want the bleeding edge, you can
# uncomment it and see if it works but you may need to try to version('7.0.2-7', 'c59cdc8df50e481b2bd1afe09ac24c08')
# fetch a newer version (-6, -7, -8, -9, etc.) or you can stick version('7.0.2-6', 'aa5689129c39a5146a3212bf5f26d478')
# wtih the older, stable, archived -10 versions below.
#
# TODO: would be nice if spack had a way to recommend avoiding a
# TODO: bleeding edge version, but not comment it out.
# -------------------------------------------------------------------------
# version('6.9.0-6', 'c1bce7396c22995b8bdb56b7797b4a1b',
# url="http://www.imagemagick.org/download/ImageMagick-6.9.0-6.tar.bz2")
# -------------------------------------------------------------------------
# *-10 versions are archived, so these versions should fetch reliably.
# -------------------------------------------------------------------------
version(
'6.8.9-10',
'aa050bf9785e571c956c111377bbf57c',
url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download")
depends_on('jpeg') depends_on('jpeg')
depends_on('libtool', type='build') depends_on('libtool', type='build')
...@@ -56,8 +41,14 @@ class Imagemagick(Package): ...@@ -56,8 +41,14 @@ class Imagemagick(Package):
depends_on('freetype') depends_on('freetype')
depends_on('fontconfig') depends_on('fontconfig')
depends_on('libtiff') depends_on('libtiff')
depends_on('ghostscript')
def url_for_version(self, version):
return "https://github.com/ImageMagick/ImageMagick/archive/{0}.tar.gz".format(version)
def install(self, spec, prefix): def install(self, spec, prefix):
configure("--prefix=%s" % prefix) configure('--prefix={0}'.format(prefix))
make() make()
make("install") make('check')
make('install')
...@@ -26,16 +26,20 @@ ...@@ -26,16 +26,20 @@
class Ghostscript(Package): class Ghostscript(Package):
"""an interpreter for the PostScript language and for PDF. """ """An interpreter for the PostScript language and for PDF."""
homepage = "http://ghostscript.com/" homepage = "http://ghostscript.com/"
url = "http://downloads.ghostscript.com/public/old-gs-releases/ghostscript-9.18.tar.gz" url = "http://downloads.ghostscript.com/public/old-gs-releases/ghostscript-9.18.tar.gz"
version('9.18', '33a47567d7a591c00a253caddd12a88a') version('9.18', '33a47567d7a591c00a253caddd12a88a')
parallel = False parallel = False
depends_on('libtiff')
def install(self, spec, prefix): def install(self, spec, prefix):
configure("--prefix=%s" % prefix, "--enable-shared") configure('--prefix={0}'.format(prefix),
'--with-system-libtiff')
make() make()
make("install") make('install')
...@@ -32,10 +32,10 @@ class Pcre(Package): ...@@ -32,10 +32,10 @@ class Pcre(Package):
homepage = "http://www.pcre.org""" homepage = "http://www.pcre.org"""
url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2" url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2"
version('8.36', 'b767bc9af0c20bc9c1fe403b0d41ad97') version('8.39', 'e3fca7650a0556a2647821679d81f585')
version('8.38', '00aabbfe56d5a48b270f999b508c5ad2') version('8.38', '00aabbfe56d5a48b270f999b508c5ad2')
patch("intel.patch") patch("intel.patch", when='@8.38')
variant('utf', default=True, variant('utf', default=True,
description='Enable support for UTF-8/16/32, ' description='Enable support for UTF-8/16/32, '
......
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class PyCycler(Package):
"""Composable style cycles."""
homepage = "http://matplotlib.org/cycler/"
url = "https://github.com/matplotlib/cycler/archive/v0.10.0.tar.gz"
version('0.10.0', '83dd0df7810e838b59e4dd9fa6e2d198')
extends('python')
depends_on('py-setuptools', type='build')
depends_on('py-six', type=nolink)
def install(self, spec, prefix):
setup_py('install', '--prefix={0}'.format(prefix))
...@@ -27,55 +27,73 @@ ...@@ -27,55 +27,73 @@
class PyMatplotlib(Package): class PyMatplotlib(Package):
"""Python plotting package.""" """matplotlib is a python 2D plotting library which produces publication
quality figures in a variety of hardcopy formats and interactive
environments across platforms."""
homepage = "https://pypi.python.org/pypi/matplotlib" homepage = "https://pypi.python.org/pypi/matplotlib"
url = "https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.2.tar.gz" url = "https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.2.tar.gz"
version('1.4.2', '7d22efb6cce475025733c50487bd8898') version('1.5.1', 'f51847d8692cb63df64cd0bd0304fd20')
version('1.4.3', '86af2e3e3c61849ac7576a6f5ca44267') version('1.4.3', '86af2e3e3c61849ac7576a6f5ca44267')
version('1.4.2', '7d22efb6cce475025733c50487bd8898')
variant('gui', default=False, description='Enable GUI') variant('gui', default=False, description='Enable GUI')
variant('ipython', default=False, description='Enable ipython support') variant('ipython', default=False, description='Enable ipython support')
# Python 2.7, 3.4, or 3.5
extends('python', ignore=r'bin/nosetests.*$|bin/pbr$') extends('python', ignore=r'bin/nosetests.*$|bin/pbr$')
depends_on('py-setuptools', type='build') # Required dependencies
depends_on('py-numpy@1.6:', type=nolink)
depends_on('py-setuptools', type='build')
depends_on('py-dateutil@1.1:', type=nolink)
depends_on('py-pyparsing', type=nolink)
depends_on('libpng@1.2:')
depends_on('py-pytz', type=nolink)
depends_on('freetype@2.3:')
depends_on('py-cycler@0.9:', type=nolink)
# Optional GUI framework
depends_on('tk@8.3:', when='+gui') # not 8.6.0 or 8.6.1
depends_on('qt', when='+gui')
depends_on('py-pyside', when='+gui', type=nolink) depends_on('py-pyside', when='+gui', type=nolink)
depends_on('py-ipython', when='+ipython', type=nolink) # TODO: Add more GUI dependencies
depends_on('py-pyparsing', type=nolink)
depends_on('py-six', type=nolink)
depends_on('py-dateutil', type=nolink)
depends_on('py-pytz', type=nolink)
depends_on('py-nose', type=nolink)
depends_on('py-numpy', type=nolink)
depends_on('py-mock', type=nolink)
depends_on('py-pbr', type=nolink)
depends_on('py-funcsigs', type=nolink)
# Optional external programs
# ffmpeg/avconv or mencoder
depends_on('ImageMagick')
# Optional dependencies
depends_on('py-pillow', type=nolink)
depends_on('pkg-config', type='build') depends_on('pkg-config', type='build')
depends_on('freetype') depends_on('py-ipython', when='+ipython')
depends_on('qt', when='+gui')
depends_on('bzip2') # Testing dependencies
depends_on('tcl', when='+gui') depends_on('py-nose') # type='test'
depends_on('tk', when='+gui') depends_on('py-mock') # type='test'
depends_on('qhull')
# Required libraries that ship with matplotlib
# depends_on('agg@2.4:')
depends_on('qhull@2012.1:')
# depends_on('ttconv')
depends_on('py-six@1.9.0:', type=nolink)
def install(self, spec, prefix): def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix) setup_py('build')
setup_py('install', '--prefix={0}'.format(prefix))
if str(self.version) in ['1.4.2', '1.4.3']: if '+gui' in spec:
# hack to fix configuration file # Set backend in matplotlib configuration file
config_file = None config_file = None
for p, d, f in os.walk(prefix.lib): for p, d, f in os.walk(prefix.lib):
for file in f: for file in f:
if file.find('matplotlibrc') != -1: if file.find('matplotlibrc') != -1:
config_file = join_path(p, 'matplotlibrc') config_file = join_path(p, 'matplotlibrc')
print config_file if not config_file:
if config_file is None: raise InstallError('Could not find matplotlibrc')
raise InstallError('could not find config file')
filter_file(r'backend : pyside', kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
'backend : Qt4Agg', rc = FileFilter(config_file)
config_file) rc.filter('^backend.*', 'backend : Qt4Agg', **kwargs)
filter_file(r'#backend.qt4 : PyQt4', rc.filter('^#backend.qt4.*', 'backend.qt4 : PySide', **kwargs)
'backend.qt4 : PySide',
config_file)
...@@ -31,13 +31,16 @@ class PyPyside(Package): ...@@ -31,13 +31,16 @@ class PyPyside(Package):
homepage = "https://pypi.python.org/pypi/pyside" homepage = "https://pypi.python.org/pypi/pyside"
url = "https://pypi.python.org/packages/source/P/PySide/PySide-1.2.2.tar.gz" url = "https://pypi.python.org/packages/source/P/PySide/PySide-1.2.2.tar.gz"
version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d') version('1.2.4', '3cb7174c13bd45e3e8f77638926cb8c0') # rpath problems
version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d', preferred=True)
depends_on('cmake', type='build') depends_on('cmake', type='build')
extends('python') extends('python')
depends_on('py-setuptools', type='build') depends_on('py-setuptools', type='build')
depends_on('qt@:4') depends_on('qt@4.5:4.9')
depends_on('libxml2@2.6.32:')
depends_on('libxslt@1.1.19:')
def patch(self): def patch(self):
"""Undo PySide RPATH handling and add Spack RPATH.""" """Undo PySide RPATH handling and add Spack RPATH."""
...@@ -58,12 +61,23 @@ def patch(self): ...@@ -58,12 +61,23 @@ def patch(self):
# PySide tries to patch ELF files to remove RPATHs # PySide tries to patch ELF files to remove RPATHs
# Disable this and go with the one we set. # Disable this and go with the one we set.
filter_file( if self.spec.satisfies('@1.2.4:'):
r'^\s*rpath_cmd\(pyside_path, srcpath\)', rpath_file = 'setup.py'
r'#rpath_cmd(pyside_path, srcpath)', else:
'pyside_postinstall.py') rpath_file = 'pyside_postinstall.py'
filter_file(r'(^\s*)(rpath_cmd\(.*\))', r'\1#\2', rpath_file)
# TODO: rpath handling for PySide 1.2.4 still doesn't work.
# PySide can't find the Shiboken library, even though it comes
# bundled with it and is installed in the same directory.
# PySide does not provide official support for
# Python 3.5, but it should work fine
filter_file("'Programming Language :: Python :: 3.4'",
"'Programming Language :: Python :: 3.4',\r\n "
"'Programming Language :: Python :: 3.5'",
"setup.py")
def install(self, spec, prefix): def install(self, spec, prefix):
python('setup.py', 'install', setup_py('install', '--prefix=%s' % prefix, '--jobs=%s' % make_jobs)
'--prefix=%s' % prefix,
'--jobs=%s' % make_jobs)
...@@ -133,6 +133,8 @@ def install(self, spec, prefix): ...@@ -133,6 +133,8 @@ def install(self, spec, prefix):
# TODO: Once better testing support is integrated, add the following tests # TODO: Once better testing support is integrated, add the following tests
# https://wiki.python.org/moin/TkInter # https://wiki.python.org/moin/TkInter
# #
# Note: Only works if ForwardX11Trusted is enabled, i.e. `ssh -Y`
#
# if '+tk' in spec: # if '+tk' in spec:
# env['TK_LIBRARY'] = join_path(spec['tk'].prefix.lib, # env['TK_LIBRARY'] = join_path(spec['tk'].prefix.lib,
# 'tk{0}'.format(spec['tk'].version.up_to(2))) # 'tk{0}'.format(spec['tk'].version.up_to(2)))
......
...@@ -37,16 +37,13 @@ class Qhull(Package): ...@@ -37,16 +37,13 @@ class Qhull(Package):
homepage = "http://www.qhull.org" homepage = "http://www.qhull.org"
version('7.2.0', 'e6270733a826a6a7c32b796e005ec3dc', version('2015.2', 'e6270733a826a6a7c32b796e005ec3dc',
url="http://www.qhull.org/download/qhull-2015-src-7.2.0.tgz") url="http://www.qhull.org/download/qhull-2015-src-7.2.0.tgz")
version('1.0', 'd0f978c0d8dfb2e919caefa56ea2953c', version('2012.1', 'd0f978c0d8dfb2e919caefa56ea2953c',
url="http://www.qhull.org/download/qhull-2012.1-src.tgz") url="http://www.qhull.org/download/qhull-2012.1-src.tgz")
# https://github.com/qhull/qhull/pull/5 depends_on('cmake@2.6:', type='build')
patch('qhull-iterator.patch', when='@1.0')
depends_on('cmake', type='build')
def install(self, spec, prefix): def install(self, spec, prefix):
with working_dir('spack-build', create=True): with working_dir('spack-build', create=True):
......
From 93f4b306c54bb5be7724dcc19c6e747b62ac76dd Mon Sep 17 00:00:00 2001
From: Ben Boeckel <mathstuf@gmail.com>
Date: Thu, 28 May 2015 11:12:25 -0400
Subject: [PATCH] iterator: use the header
Standard libraries are doing funky things with inline namespaces which
make these declarations impossible to get right. Just include the
header.
---
src/libqhullcpp/QhullIterator.h | 3 +--
src/libqhullcpp/QhullLinkedList.h | 5 +----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/libqhullcpp/QhullIterator.h b/src/libqhullcpp/QhullIterator.h
index 9dde894..49f3a3b 100644
--- a/src/libqhullcpp/QhullIterator.h
+++ b/src/libqhullcpp/QhullIterator.h
@@ -14,10 +14,9 @@ extern "C" {
}
#include <assert.h>
+#include <iterator>
#include <string>
#include <vector>
-//! Avoid dependence on <iterator>
-namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; }
namespace orgQhull {
diff --git a/src/libqhullcpp/QhullLinkedList.h b/src/libqhullcpp/QhullLinkedList.h
index d828ac6..00b9008 100644
--- a/src/libqhullcpp/QhullLinkedList.h
+++ b/src/libqhullcpp/QhullLinkedList.h
@@ -9,10 +9,7 @@
#ifndef QHULLLINKEDLIST_H
#define QHULLLINKEDLIST_H
-namespace std {
- struct bidirectional_iterator_tag;
- struct random_access_iterator_tag;
-}//std
+#include <iterator>
#include "QhullError.h"
extern "C" {
--- a/qtgamepad/src/plugins/gamepads/evdev/qevdevgamepadbackend.cpp 2016-08-08 11:34:44.517184658 -0500
+++ b/qtgamepad/src/plugins/gamepads/evdev/qevdevgamepadbackend.cpp 2016-08-08 11:36:42.371995567 -0500
@@ -262,10 +262,10 @@
m_buttonsMap[BTN_TR2] = QGamepadManager::ButtonR2;
m_buttonsMap[BTN_THUMB] = m_buttonsMap[BTN_THUMBL] = QGamepadManager::ButtonL3;
m_buttonsMap[BTN_THUMBR] = QGamepadManager::ButtonR3;
- m_buttonsMap[BTN_TRIGGER_HAPPY1] = QGamepadManager::ButtonLeft;
- m_buttonsMap[BTN_TRIGGER_HAPPY2] = QGamepadManager::ButtonRight;
- m_buttonsMap[BTN_TRIGGER_HAPPY3] = QGamepadManager::ButtonUp;
- m_buttonsMap[BTN_TRIGGER_HAPPY4] = QGamepadManager::ButtonDown;
+ m_buttonsMap[0x2c0] = QGamepadManager::ButtonLeft;
+ m_buttonsMap[0x2c1] = QGamepadManager::ButtonRight;
+ m_buttonsMap[0x2c2] = QGamepadManager::ButtonUp;
+ m_buttonsMap[0x2c3] = QGamepadManager::ButtonDown;
if (m_productId)
m_backend->saveSettings(m_productId, QVariant());
...@@ -29,7 +29,11 @@ ...@@ -29,7 +29,11 @@
class Qt(Package): class Qt(Package):
"""Qt is a comprehensive cross-platform C++ application framework.""" """Qt is a comprehensive cross-platform C++ application framework."""
homepage = 'http://qt.io' homepage = 'http://qt.io'
url = 'http://download.qt.io/archive/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz'
list_url = 'http://download.qt.io/archive/qt/'
list_depth = 4
version('5.7.0', '9a46cce61fc64c20c3ac0a0e0fa41b42')
version('5.5.1', '59f0216819152b77536cf660b015d784') version('5.5.1', '59f0216819152b77536cf660b015d784')
version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5') version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5')
version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6') version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6')
...@@ -40,17 +44,18 @@ class Qt(Package): ...@@ -40,17 +44,18 @@ class Qt(Package):
# Add patch for compile issues with qt3 found with use in the # Add patch for compile issues with qt3 found with use in the
# OpenSpeedShop project # OpenSpeedShop project
variant('krellpatch', default=False, variant('krellpatch', default=False, description="Build with openspeedshop based patch.")
description="Build with openspeedshop based patch.")
variant('mesa', default=False, description="Depend on mesa.") variant('mesa', default=False, description="Depend on mesa.")
variant('gtk', default=False, description="Build with gtkplus.") variant('gtk', default=False, description="Build with gtkplus.")
patch('qt3krell.patch', when='@3.3.8b+krellpatch') patch('qt3krell.patch', when='@3.3.8b+krellpatch')
# https://github.com/xboxdrv/xboxdrv/issues/188
patch('btn_trigger_happy.patch', when='@5.7.0:')
# Use system openssl for security. # Use system openssl for security.
# depends_on("openssl") # depends_on("openssl")
depends_on("glib")
depends_on("gtkplus", when='+gtk') depends_on("gtkplus", when='+gtk')
depends_on("libxml2") depends_on("libxml2")
depends_on("zlib") depends_on("zlib")
...@@ -73,29 +78,33 @@ class Qt(Package): ...@@ -73,29 +78,33 @@ class Qt(Package):
depends_on("libxcb") depends_on("libxcb")
def url_for_version(self, version): def url_for_version(self, version):
url = "http://download.qt.io/archive/qt/" # URL keeps getting more complicated with every release
url = self.list_url
if version >= Version('4.0'):
url += version.up_to(2) + '/'
else:
url += version.up_to(1) + '/'
if version >= Version('4.8'):
url += str(version) + '/'
if version >= Version('5'): if version >= Version('5'):
url += "%s/%s/single/qt-everywhere-opensource-src-%s.tar.gz" % \ url += 'single/'
(version.up_to(2), version, version)
elif version >= Version('4.8'): url += 'qt-'
url += "%s/%s/qt-everywhere-opensource-src-%s.tar.gz" % \
(version.up_to(2), version, version) if version >= Version('4.6'):
elif version >= Version('4.6'): url += 'everywhere-'
url += "%s/qt-everywhere-opensource-src-%s.tar.gz" % \
(version.up_to(2), version)
elif version >= Version('4.0'):
url += "%s/qt-x11-opensource-src-%s.tar.gz" % \
(version.up_to(2), version)
elif version >= Version('3'):
url += "%s/qt-x11-free-%s.tar.gz" % \
(version.up_to(1), version)
elif version >= Version('2.1'): elif version >= Version('2.1'):
url += "%s/qt-x11-%s.tar.gz" % \ url += 'x11-'
(version.up_to(1), version)
else: if version >= Version('4.0'):
url += "%s/qt-%s.tar.gz" % \ url += 'opensource-src-'
(version.up_to(1), version) elif version >= Version('3'):
url += 'free-'
url += str(version) + '.tar.gz'
return url return url
...@@ -107,27 +116,34 @@ def setup_dependent_environment(self, spack_env, run_env, dspec): ...@@ -107,27 +116,34 @@ def setup_dependent_environment(self, spack_env, run_env, dspec):
def patch(self): def patch(self):
if self.spec.satisfies('@4'): if self.spec.satisfies('@4'):
qmake_conf = 'mkspecs/common/g++-base.conf' # Fix qmake compilers in the default mkspec
qmake_unix_conf = 'mkspecs/common/g++-unix.conf' filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc',
elif self.spec.satisfies('@5'): 'mkspecs/common/g++-base.conf')
qmake_conf = 'qtbase/mkspecs/common/g++-base.conf' filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++',
qmake_unix_conf = 'qtbase/mkspecs/common/g++-unix.conf' 'mkspecs/common/g++-base.conf')
else:
return # Necessary to build with GCC 6 and other modern compilers
# http://stackoverflow.com/questions/10354371/
# Fix qmake compilers in the default mkspec filter_file('(^QMAKE_CXXFLAGS .*)', r'\1 -std=gnu++98',
filter_file(r'^QMAKE_COMPILER *=.*$', 'mkspecs/common/gcc-base.conf')
'QMAKE_COMPILER = cc', qmake_conf)
filter_file(r'^QMAKE_CC *=.*$', filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ',
'QMAKE_CC = cc', qmake_conf) 'mkspecs/common/g++-unix.conf')
filter_file(r'^QMAKE_CXX *=.*$', elif self.spec.satisfies('@5:'):
'QMAKE_CXX = c++', qmake_conf) # Fix qmake compilers in the default mkspec
filter_file(r'^QMAKE_LFLAGS_NOUNDEF *\+?=.*$', filter_file('^QMAKE_COMPILER .*', 'QMAKE_COMPILER = cc',
'QMAKE_LFLAGS_NOUNDEF =', qmake_unix_conf) 'qtbase/mkspecs/common/g++-base.conf')
filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc',
'qtbase/mkspecs/common/g++-base.conf')
filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++',
'qtbase/mkspecs/common/g++-base.conf')
filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ',
'qtbase/mkspecs/common/g++-unix.conf')
@property @property
def common_config_args(self): def common_config_args(self):
config_args = [ return [
'-prefix', self.prefix, '-prefix', self.prefix,
'-v', '-v',
'-opensource', '-opensource',
...@@ -144,19 +160,12 @@ def common_config_args(self): ...@@ -144,19 +160,12 @@ def common_config_args(self):
'-no-nis' '-no-nis'
] ]
if '+gtk' in self.spec:
config_args.append('-gtkstyle')
else:
config_args.append('-no-gtkstyle')
return config_args
# Don't disable all the database drivers, but should # Don't disable all the database drivers, but should
# really get them into spack at some point. # really get them into spack at some point.
@when('@3') @when('@3')
def configure(self): def configure(self):
# An user report that this was necessary to link Qt3 on ubuntu # A user reported that this was necessary to link Qt3 on ubuntu
os.environ['LD_LIBRARY_PATH'] = os.getcwd() + '/lib' os.environ['LD_LIBRARY_PATH'] = os.getcwd() + '/lib'
configure('-prefix', self.prefix, configure('-prefix', self.prefix,
'-v', '-v',
...@@ -169,18 +178,27 @@ def configure(self): ...@@ -169,18 +178,27 @@ def configure(self):
def configure(self): def configure(self):
configure('-fast', configure('-fast',
'-no-webkit', '-no-webkit',
'{0}-gtkstyle'.format('' if '+gtk' in self.spec else '-no'),
*self.common_config_args) *self.common_config_args)
@when('@5') @when('@5.0:5.6')
def configure(self): def configure(self):
configure('-no-eglfs', configure('-no-eglfs',
'-no-directfb', '-no-directfb',
'-qt-xcb', '-qt-xcb',
# If someone wants to get a webkit build working, be my '{0}-gtkstyle'.format('' if '+gtk' in self.spec else '-no'),
# guest!
'-skip', 'qtwebkit', '-skip', 'qtwebkit',
*self.common_config_args) *self.common_config_args)
@when('@5.7:')
def configure(self):
configure('-no-eglfs',
'-no-directfb',
'-qt-xcb',
'{0}-gtk'.format('' if '+gtk' in self.spec else '-no'),
'-skip', 'webengine',
*self.common_config_args)
def install(self, spec, prefix): def install(self, spec, prefix):
self.configure() self.configure()
make() make()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment