1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
import os
from spack import *
class Qt(Package):
"""Qt is a comprehensive cross-platform C++ application framework."""
homepage = "http://qt.io"
version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb',
url="http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz")
# Use system openssl for security.
#depends_on("openssl")
depends_on("glib")
depends_on("gtkplus")
depends_on("libxml2")
depends_on("zlib")
depends_on("dbus")
depends_on("libtiff")
depends_on("libpng")
depends_on("libmng")
depends_on("jpeg")
def setup_dependent_environment(self, module, spec, dep_spec):
"""Dependencies of Qt find it using the QTDIR environment variable."""
os.environ['QTDIR'] = self.prefix
def patch(self):
# Fix qmake compilers in the default mkspec
qmake_conf = 'mkspecs/common/g++-base.conf'
filter_file(r'^QMAKE_CC *=.*$', 'QMAKE_CC = cc', qmake_conf)
filter_file(r'^QMAKE_CXX *=.*$', 'QMAKE_CXX = c++', qmake_conf)
def install(self, spec, prefix):
configure('-v',
'-confirm-license',
'-opensource',
'-prefix', prefix,
'-openssl-linked',
'-dbus-linked',
'-fast',
'-optimized-qmake',
'-no-pch',
# phonon required for py-pyqt
# '-no-phonon',
# '-no-phonon-backend',
'-no-openvg')
make()
make("install")
|