Merge branch 'qt-osx' of git://github.com/mathstuf/spack into mathstuf-qt-osx
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
--- a/configure.ac 2016-08-16 11:57:34.000000000 -0400
|
||||
+++ b/configure.ac 2016-08-16 11:57:36.000000000 -0400
|
||||
@@ -3357,11 +3357,11 @@
|
||||
enable_compile_warnings=yes)
|
||||
AS_IF([test "x$enable_compile_warnings" = xyes], [
|
||||
CC_CHECK_FLAGS_APPEND([GLIB_WARN_CFLAGS], [CFLAGS], [\
|
||||
-Wall -Wstrict-prototypes -Werror=declaration-after-statement \
|
||||
-Werror=missing-prototypes -Werror=implicit-function-declaration \
|
||||
- -Werror=pointer-arith -Werror=init-self -Werror=format-security \
|
||||
- -Werror=format=2 -Werror=missing-include-dirs])
|
||||
+ -Werror=pointer-arith -Werror=init-self \
|
||||
+ -Werror=missing-include-dirs])
|
||||
])
|
||||
AC_SUBST(GLIB_WARN_CFLAGS)
|
||||
|
||||
#
|
@@ -23,6 +23,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Glib(Package):
|
||||
@@ -38,14 +39,20 @@ class Glib(Package):
|
||||
version('2.48.1', '67bd3b75c9f6d5587b457dc01cdcd5bb')
|
||||
version('2.42.1', '89c4119e50e767d3532158605ee9121a')
|
||||
|
||||
depends_on('autoconf', type='build')
|
||||
depends_on('automake', type='build')
|
||||
depends_on('libtool', type='build')
|
||||
depends_on('pkg-config', type='build')
|
||||
depends_on('libffi')
|
||||
depends_on('zlib')
|
||||
depends_on('pkg-config', type='build')
|
||||
depends_on('gettext')
|
||||
depends_on('pcre+utf', when='@2.48:')
|
||||
|
||||
# The following patch is needed for gcc-6.1
|
||||
patch('g_date_strftime.patch', when='@2.42.1')
|
||||
# Clang doesn't seem to acknowledge the pragma lines to disable the -Werror
|
||||
# around a legitimate usage.
|
||||
patch('no-Werror=format-security.patch')
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle glib's version-based custom URLs."""
|
||||
@@ -53,6 +60,16 @@ def url_for_version(self, version):
|
||||
return url + '/%s/glib-%s.tar.xz' % (version.up_to(2), version)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
autoreconf = which("autoreconf")
|
||||
autoreconf("--install", "--verbose", "--force",
|
||||
"-I", "config",
|
||||
"-I", os.path.join(spec['pkg-config'].prefix,
|
||||
"share", "aclocal"),
|
||||
"-I", os.path.join(spec['automake'].prefix,
|
||||
"share", "aclocal"),
|
||||
"-I", os.path.join(spec['libtool'].prefix,
|
||||
"share", "aclocal"),
|
||||
)
|
||||
configure("--prefix=%s" % prefix)
|
||||
make()
|
||||
make("install", parallel=False)
|
||||
|
@@ -39,6 +39,7 @@ class Pixman(Package):
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix,
|
||||
"--disable-mmx",
|
||||
"--disable-gtk")
|
||||
make()
|
||||
make("install")
|
||||
|
@@ -24,6 +24,7 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
class Qt(Package):
|
||||
@@ -48,19 +49,24 @@ class Qt(Package):
|
||||
variant('mesa', default=False, description="Depend on mesa.")
|
||||
variant('gtk', default=False, description="Build with gtkplus.")
|
||||
variant('examples', default=False, description="Build examples.")
|
||||
variant('dbus', default=False, description="Build with D-Bus support.")
|
||||
|
||||
patch('qt3krell.patch', when='@3.3.8b+krellpatch')
|
||||
|
||||
# https://github.com/xboxdrv/xboxdrv/issues/188
|
||||
patch('btn_trigger_happy.patch', when='@5.7.0:')
|
||||
|
||||
patch('qt4-corewlan-new-osx.patch', when='@4')
|
||||
patch('qt4-pcre-include-conflict.patch', when='@4')
|
||||
patch('qt4-el-capitan.patch', when='@4')
|
||||
|
||||
# Use system openssl for security.
|
||||
# depends_on("openssl")
|
||||
depends_on("openssl")
|
||||
|
||||
depends_on("gtkplus", when='+gtk')
|
||||
depends_on("libxml2")
|
||||
depends_on("zlib")
|
||||
depends_on("dbus", when='@4:')
|
||||
depends_on("dbus", when='@4:+dbus')
|
||||
depends_on("libtiff")
|
||||
depends_on("libpng@1.2.56", when='@3')
|
||||
depends_on("libpng", when='@4:')
|
||||
@@ -72,11 +78,11 @@ class Qt(Package):
|
||||
# depends_on("flex", type='build')
|
||||
# depends_on("bison", type='build')
|
||||
# depends_on("ruby", type='build')
|
||||
# depends_on("icu4c")
|
||||
depends_on("icu4c")
|
||||
|
||||
# OpenGL hardware acceleration
|
||||
depends_on("mesa", when='@4:+mesa')
|
||||
depends_on("libxcb")
|
||||
depends_on("libxcb", when=sys.platform != 'darwin')
|
||||
|
||||
def url_for_version(self, version):
|
||||
# URL keeps getting more complicated with every release
|
||||
@@ -144,7 +150,7 @@ def patch(self):
|
||||
|
||||
@property
|
||||
def common_config_args(self):
|
||||
common_arg_list = [
|
||||
config_args = [
|
||||
'-prefix', self.prefix,
|
||||
'-v',
|
||||
'-opensource',
|
||||
@@ -153,7 +159,6 @@ def common_config_args(self):
|
||||
'-shared',
|
||||
'-confirm-license',
|
||||
'-openssl-linked',
|
||||
'-dbus-linked',
|
||||
'-optimized-qmake',
|
||||
'-no-openvg',
|
||||
'-no-pch',
|
||||
@@ -162,9 +167,47 @@ def common_config_args(self):
|
||||
]
|
||||
|
||||
if '~examples' in self.spec:
|
||||
common_arg_list.extend(['-nomake', 'examples'])
|
||||
config_args.extend(['-nomake', 'examples'])
|
||||
|
||||
return common_arg_list
|
||||
if '@4' in self.spec:
|
||||
config_args.append('-no-phonon')
|
||||
|
||||
if '+dbus' in self.spec:
|
||||
config_args.append('-dbus-linked')
|
||||
else:
|
||||
config_args.append('-no-dbus')
|
||||
|
||||
if '@5:' in self.spec and sys.platform == 'darwin':
|
||||
config_args.extend([
|
||||
'-no-xinput2',
|
||||
'-no-xcb-xlib',
|
||||
'-no-pulseaudio',
|
||||
'-no-alsa',
|
||||
'-no-gtkstyle',
|
||||
])
|
||||
|
||||
if '@4' in self.spec and sys.platform == 'darwin':
|
||||
sdkpath = which('xcrun')('--show-sdk-path',
|
||||
# XXX(macos): the 10.11 SDK fails to configure.
|
||||
'--sdk', 'macosx10.9',
|
||||
output=str)
|
||||
config_args.extend([
|
||||
'-sdk', sdkpath.strip(),
|
||||
])
|
||||
use_clang_platform = False
|
||||
if self.spec.compiler.name == 'clang' and \
|
||||
str(self.spec.compiler.version).endwith('-apple'):
|
||||
use_clang_platform = True
|
||||
# No one uses gcc-4.2.1 anymore; this is clang.
|
||||
if self.spec.compiler.name == 'gcc' and \
|
||||
str(self.spec.compiler.version) == '4.2.1':
|
||||
use_clang_platform = True
|
||||
if use_clang_platform:
|
||||
config_args.extend([
|
||||
'-platform', 'unsupported/macx-clang',
|
||||
])
|
||||
|
||||
return config_args
|
||||
|
||||
# Don't disable all the database drivers, but should
|
||||
# really get them into spack at some point.
|
||||
@@ -185,25 +228,31 @@ def configure(self):
|
||||
configure('-fast',
|
||||
'-no-webkit',
|
||||
'{0}-gtkstyle'.format('' if '+gtk' in self.spec else '-no'),
|
||||
'-arch', str(self.spec.architecture.target),
|
||||
*self.common_config_args)
|
||||
|
||||
@when('@5.0:5.6')
|
||||
def configure(self):
|
||||
configure('-no-eglfs',
|
||||
'-no-directfb',
|
||||
'-qt-xcb',
|
||||
'{0}-gtkstyle'.format('' if '+gtk' in self.spec else '-no'),
|
||||
'-skip', 'qtwebkit',
|
||||
*self.common_config_args)
|
||||
|
||||
@when('@5.7:')
|
||||
def configure(self):
|
||||
args = self.common_config_args
|
||||
|
||||
if not sys.platform == 'darwin':
|
||||
args.extend([
|
||||
'-qt-xcb',
|
||||
])
|
||||
|
||||
configure('-no-eglfs',
|
||||
'-no-directfb',
|
||||
'-qt-xcb',
|
||||
'{0}-gtk'.format('' if '+gtk' in self.spec else '-no'),
|
||||
'-skip', 'webengine',
|
||||
*self.common_config_args)
|
||||
*args)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
self.configure()
|
||||
|
@@ -0,0 +1,16 @@
|
||||
diff -Nr -U5 qt-everywhere-opensource-src-4.8.6/src/plugins/bearer/corewlan/corewlan.pro qt-everywhere-opensource-src-4.8.6.corewlan-new-osx/src/plugins/bearer/corewlan/corewlan.pro
|
||||
--- qt-everywhere-opensource-src-4.8.6/src/plugins/bearer/corewlan/corewlan.pro 2014-04-10 14:37:12.000000000 -0400
|
||||
+++ qt-everywhere-opensource-src-4.8.6.corewlan-new-osx/src/plugins/bearer/corewlan/corewlan.pro 2015-12-02 12:21:34.608585392 -0500
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
QT = core network
|
||||
LIBS += -framework Foundation -framework SystemConfiguration
|
||||
|
||||
contains(QT_CONFIG, corewlan) {
|
||||
- isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10\.[67]\.sdk") {
|
||||
+ isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, ".*MacOSX10\.([6789]|1[01])\.sdk") {
|
||||
LIBS += -framework CoreWLAN -framework Security
|
||||
}
|
||||
}
|
||||
|
||||
HEADERS += qcorewlanengine.h \
|
31
var/spack/repos/builtin/packages/qt/qt4-el-capitan.patch
Normal file
31
var/spack/repos/builtin/packages/qt/qt4-el-capitan.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 27aa46933bb32a88c310fe5918a49a3f34d65dfe Mon Sep 17 00:00:00 2001
|
||||
From: Mike McQuaid <mike@mikemcquaid.com>
|
||||
Date: Sun, 13 Sep 2015 11:55:59 +0100
|
||||
Subject: [PATCH] Fix El Capitan build.
|
||||
|
||||
---
|
||||
src/gui/painting/qpaintengine_mac.cpp | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp
|
||||
index 4aa0668..63b646d 100644
|
||||
--- a/src/gui/painting/qpaintengine_mac.cpp
|
||||
+++ b/src/gui/painting/qpaintengine_mac.cpp
|
||||
@@ -340,13 +340,7 @@ CGColorSpaceRef QCoreGraphicsPaintEngine::macDisplayColorSpace(const QWidget *wi
|
||||
}
|
||||
|
||||
// Get the color space from the display profile.
|
||||
- CGColorSpaceRef colorSpace = 0;
|
||||
- CMProfileRef displayProfile = 0;
|
||||
- CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile);
|
||||
- if (err == noErr) {
|
||||
- colorSpace = CGColorSpaceCreateWithPlatformColorSpace(displayProfile);
|
||||
- CMCloseProfile(displayProfile);
|
||||
- }
|
||||
+ CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(displayID);
|
||||
|
||||
// Fallback: use generic DeviceRGB
|
||||
if (colorSpace == 0)
|
||||
--
|
||||
2.3.8 (Apple Git-58)
|
||||
|
@@ -0,0 +1,16 @@
|
||||
diff -U5 -Nru qt-everywhere-opensource-src-4.8.6/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.h qt-everywhere-opensource-src-4.8.6.pcre/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.h
|
||||
--- qt-everywhere-opensource-src-4.8.6/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.h 2014-04-10 14:37:12.000000000 -0400
|
||||
+++ qt-everywhere-opensource-src-4.8.6.pcre/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.h 2016-08-29 15:30:02.216546252 -0400
|
||||
@@ -32,11 +32,11 @@
|
||||
|
||||
#include "MacroAssembler.h"
|
||||
#include "RegexPattern.h"
|
||||
#include <UString.h>
|
||||
|
||||
-#include <pcre.h>
|
||||
+#include <pcre/pcre.h>
|
||||
struct JSRegExp; // temporary, remove when fallback is removed.
|
||||
|
||||
#if CPU(X86) && !COMPILER(MSVC)
|
||||
#define YARR_CALL __attribute__ ((regparm (3)))
|
||||
#else
|
Reference in New Issue
Block a user