From e6567407683c5591b1906d47cd9a9d44625a3bd9 Mon Sep 17 00:00:00 2001 From: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Date: Tue, 15 Nov 2016 09:54:55 -0500 Subject: [PATCH] make-ring: bump qt5 version for OSX We used qt 5.5.1 since 5.6 was causing errors in the OSX client. Problem is the 5.5.1 compilation is broken on macOS 10.12 Sierra, This patch separates the brew unlink process from the install/link process. It gives the opportunity to be more expressive in the unlink process, in particular we can unlink all the qt5 versions. Tuleap: #1362 Change-Id: Iacfc5de47c2f799391a7cbbb40f38f86c5a4bc32 --- make-ring.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/make-ring.py b/make-ring.py index 8663a578..e1212669 100755 --- a/make-ring.py +++ b/make-ring.py @@ -37,10 +37,14 @@ APT_INSTALL_SCRIPT = [ 'apt-get install -y %(packages)s --ignore-missing' ] +BREW_UNLINK_SCRIPT = [ + 'brew unlink %(packages)s' +] + BREW_INSTALL_SCRIPT = [ 'brew update', 'brew install -y %(packages)s', - 'brew link --force gettext' + 'brew link --force --overwrite %(packages)s' ] RPM_INSTALL_SCRIPT = [ @@ -142,10 +146,15 @@ ARCH_LINUX_DEPENDENCIES = [ ] OSX_DEPENDENCIES = [ - 'autoconf', 'autoconf-archive', 'cmake', 'gettext', 'pkg-config', 'homebrew/versions/qt55', + 'autoconf', 'cmake', 'gettext', 'pkg-config', 'qt5', 'libtool', 'yasm', 'automake' ] +OSX_DEPENDENCIES_UNLINK = [ + 'autoconf*', 'cmake*', 'gettext*', 'pkg-config*', 'qt*', 'qt@5.*', + 'libtool*', 'yasm*', 'automake*' +] + UNINSTALL_SCRIPT = [ 'make -C daemon uninstall', 'xargs rm < lrc/build-global/install_manifest.txt', @@ -203,6 +212,10 @@ def run_dependencies(args): ) elif args.distribution == "OSX": + execute_script( + BREW_UNLINK_SCRIPT, + {"packages": ' '.join(OSX_DEPENDENCIES_UNLINK)} + ) execute_script( BREW_INSTALL_SCRIPT, {"packages": ' '.join(OSX_DEPENDENCIES)} @@ -240,7 +253,7 @@ def run_install(args): if args.global_install: install_args += ' -g' if args.distribution == "OSX": - proc= subprocess.Popen("brew --prefix homebrew/versions/qt55", shell=True, stdout=subprocess.PIPE) + proc= subprocess.Popen("brew --prefix qt5", shell=True, stdout=subprocess.PIPE) qt5dir = proc.stdout.read() os.environ['CMAKE_PREFIX_PATH'] = str(qt5dir.decode('ascii')) install_args += " -c client-macosx" -- GitLab