Skip to content
Snippets Groups Projects
Commit 303f22dc authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Dockerfile: FROM testing-20211220-slim with gcc-11 and spack v0.17.1

parent 709ceb49
Branches
Tags
1 merge request!239Dockerfile: FROM testing-20211220-slim with gcc-11 and spack v0.17.1
Showing
with 87 additions and 2222 deletions
...@@ -9,7 +9,9 @@ variables: ...@@ -9,7 +9,9 @@ variables:
AFTERBURNER_VERSION: "v0.1.2" AFTERBURNER_VERSION: "v0.1.2"
## Spack github version ## Spack github version
SPACK_VERSION: "a68abc15c5b1b8266130f765d1bee6290e71fa7c" SPACK_VERSION: "e974b44e8673ded449ce4a3ed5844398b68e81a2"
## Space-separated list of spack cherry-picks
SPACK_CHERRYPICKS: "0ab5828d0dfe2182ad108b7e7c56772303065f6e a294acfb73839c9782aff976953a969fb44e161e f181b6fef6da3b576b267799d9c47fa5c8ade67a"
## We need to enable Docker Buildkit to use cache mounts and better ## We need to enable Docker Buildkit to use cache mounts and better
## build performance overal ## build performance overal
...@@ -204,7 +206,8 @@ jug_dev:default: ...@@ -204,7 +206,8 @@ jug_dev:default:
-t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:builder-${INTERNAL_TAG} -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:builder-${INTERNAL_TAG}
--target=builder --target=builder
-f containers/jug/dev.Dockerfile -f containers/jug/dev.Dockerfile
--build-arg SPACK_VERSION=${SPACK_VERSION} --build-arg SPACK_VERSION="${SPACK_VERSION}"
--build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}"
--build-arg CACHE_BUST=${PACKAGE_HASH} --build-arg CACHE_BUST=${PACKAGE_HASH}
--build-arg INTERNAL_TAG=${INTERNAL_TAG} --build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD) --build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD)
...@@ -212,7 +215,8 @@ jug_dev:default: ...@@ -212,7 +215,8 @@ jug_dev:default:
## now build our image ## now build our image
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} ${CACHE_FLAG} - docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} ${CACHE_FLAG}
-f containers/jug/dev.Dockerfile -f containers/jug/dev.Dockerfile
--build-arg SPACK_VERSION=${SPACK_VERSION} --build-arg SPACK_VERSION="${SPACK_VERSION}"
--build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}"
--build-arg CACHE_BUST=${PACKAGE_HASH} --build-arg CACHE_BUST=${PACKAGE_HASH}
--build-arg INTERNAL_TAG=${INTERNAL_TAG} --build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD) --build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Minimal container based on Debian Testing for up-to-date packages. # Minimal container based on Debian Testing for up-to-date packages.
# Very lightweight container with a minimal build environment # Very lightweight container with a minimal build environment
FROM amd64/debian:testing-20210408-slim FROM amd64/debian:testing-20211220-slim
LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="debian_base" \ name="debian_base" \
march="amd64" march="amd64"
...@@ -23,51 +23,52 @@ ENV CLICOLOR_FORCE=1 \ ...@@ -23,51 +23,52 @@ ENV CLICOLOR_FORCE=1 \
RUN --mount=type=cache,target=/var/cache/apt \ RUN --mount=type=cache,target=/var/cache/apt \
rm -f /etc/apt/apt.conf.d/docker-clean \ rm -f /etc/apt/apt.conf.d/docker-clean \
&& apt-get -yqq update \ && apt-get -yqq update \
&& apt-get -yqq upgrade \
&& apt-get -yqq install --no-install-recommends \ && apt-get -yqq install --no-install-recommends \
bc \
ca-certificates \ ca-certificates \
clang-format \
clang-tidy \
curl \ curl \
file \ file \
build-essential \ build-essential \
g++-10 \ g++-11 \
gcc-10 \ gcc-11 \
gdb \ gdb \
gfortran-10 \ gfortran-11 \
ghostscript \
git \ git \
gnupg2 \ gnupg2 \
gv \
iproute2 \ iproute2 \
iputils-ping \ iputils-ping \
iputils-tracepath \ iputils-tracepath \
less \
libcbor-xs-perl \ libcbor-xs-perl \
libjson-xs-perl \ libjson-xs-perl \
libyaml-cpp-dev \
locales \ locales \
lua-posix \ lua-posix \
make \ make \
unzip \
nano \ nano \
vim-nox \
less \
clang-format \
clang-tidy \
openssh-client \ openssh-client \
wget \
ghostscript \
gv \
poppler-utils \
parallel \ parallel \
bc \ poppler-utils \
time \ time \
unzip \
valgrind \ valgrind \
libyaml-cpp-dev \ vim-nox \
wget \
&& localedef -i en_US -f UTF-8 en_US.UTF-8 \ && localedef -i en_US -f UTF-8 en_US.UTF-8 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 \ && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 \ && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 \
&& update-alternatives --install /usr/bin/gfortran gfortran \ && update-alternatives --install /usr/bin/gfortran gfortran \
/usr/bin/gfortran-10 100 \ /usr/bin/gfortran-11 100 \
&& cc --version \ && cc --version \
&& curl -L \ && curl -L \
"https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" \ "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" \
| bash \ | bash \
&& sed -i "s/bullseye/buster/" \ && sed -i "s/bookworm/buster/" \
/etc/apt/sources.list.d/runner_gitlab-runner.list \ /etc/apt/sources.list.d/runner_gitlab-runner.list \
&& apt-get -yqq update \ && apt-get -yqq update \
&& apt-get -yqq install --no-install-recommends \ && apt-get -yqq install --no-install-recommends \
......
...@@ -15,20 +15,22 @@ RUN --mount=type=cache,target=/var/cache/apt \ ...@@ -15,20 +15,22 @@ RUN --mount=type=cache,target=/var/cache/apt \
python3 \ python3 \
python3-pip \ python3-pip \
python3-setuptools \ python3-setuptools \
tcl \ python-is-python3 \
uuid-dev \
libfcgi-dev \
x11proto-xext-dev \
&& pip3 install boto3 \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
## Setup spack ## Setup spack
## parts: ## parts:
ENV SPACK_ROOT=/opt/spack ENV SPACK_ROOT=/opt/spack
ARG SPACK_VERSION="develop" ARG SPACK_VERSION="develop"
ARG SPACK_CHERRYPICKS=""
RUN echo "Part 1: regular spack install (as in containerize)" \ RUN echo "Part 1: regular spack install (as in containerize)" \
&& git clone https://github.com/spack/spack.git /tmp/spack-staging \ && git clone https://github.com/spack/spack.git /tmp/spack-staging \
&& cd /tmp/spack-staging && git checkout $SPACK_VERSION && cd - \ && cd /tmp/spack-staging \
&& git checkout $SPACK_VERSION \
&& if [ -n "$SPACK_CHERRYPICKS" ] ; then \
git cherry-pick -n $SPACK_CHERRYPICKS ; \
fi \
&& cd - \
&& mkdir -p $SPACK_ROOT/opt/spack \ && mkdir -p $SPACK_ROOT/opt/spack \
&& cp -r /tmp/spack-staging/bin $SPACK_ROOT/bin \ && cp -r /tmp/spack-staging/bin $SPACK_ROOT/bin \
&& cp -r /tmp/spack-staging/etc $SPACK_ROOT/etc \ && cp -r /tmp/spack-staging/etc $SPACK_ROOT/etc \
...@@ -75,10 +77,13 @@ RUN --mount=type=cache,target=/var/cache/spack-mirror \ ...@@ -75,10 +77,13 @@ RUN --mount=type=cache,target=/var/cache/spack-mirror \
## Setup our custom environment and package overrides ## Setup our custom environment and package overrides
COPY spack $SPACK_ROOT/eic-spack COPY spack $SPACK_ROOT/eic-spack
RUN echo "repos:" > $SPACK_ROOT/etc/spack/repos.yaml \ RUN spack repo add --scope site "$SPACK_ROOT/eic-spack" \
&& echo " - $SPACK_ROOT/eic-spack" >> $SPACK_ROOT/etc/spack/repos.yaml \
&& mkdir /opt/spack-environment \ && mkdir /opt/spack-environment \
&& mv $SPACK_ROOT/eic-spack/spack.yaml /opt/spack-environment/spack.yaml && cd /opt/spack-environment \
&& mv $SPACK_ROOT/eic-spack/spack.yaml . \
&& rm -r /usr/local \
&& spack env activate . \
&& spack concretize
## This variable will change whenevery either spack.yaml or our spack package ## This variable will change whenevery either spack.yaml or our spack package
## overrides change, triggering a rebuild ## overrides change, triggering a rebuild
...@@ -89,9 +94,16 @@ ARG CACHE_BUST="hash" ...@@ -89,9 +94,16 @@ ARG CACHE_BUST="hash"
RUN --mount=type=cache,target=/var/cache/spack-mirror \ RUN --mount=type=cache,target=/var/cache/spack-mirror \
cd /opt/spack-environment \ cd /opt/spack-environment \
&& ls /var/cache/spack-mirror \ && ls /var/cache/spack-mirror \
&& rm -r /usr/local \
&& spack env activate . \ && spack env activate . \
&& status=0 \
&& spack install -j64 --no-check-signature \ && spack install -j64 --no-check-signature \
|| spack install -j64 --no-check-signature \
|| ( status=$? \
&& spack buildcache create -ua -d /var/cache/spack-mirror \
$(spack find --format {name}/{hash}) \
&& spack buildcache update-index -d /var/cache/spack-mirror \
&& exit $status \
) \
&& spack clean -a && spack clean -a
## Optional, normally commented out: ## Optional, normally commented out:
...@@ -142,24 +154,33 @@ RUN cd /opt/spack-environment \ ...@@ -142,24 +154,33 @@ RUN cd /opt/spack-environment \
| sed "s?LD_LIBRARY_PATH=?&/lib/x86_64-linux-gnu:?" \ | sed "s?LD_LIBRARY_PATH=?&/lib/x86_64-linux-gnu:?" \
| sed '/MANPATH/ s/;$/:;/' \ | sed '/MANPATH/ s/;$/:;/' \
> /etc/profile.d/z10_spack_environment.sh \ > /etc/profile.d/z10_spack_environment.sh \
&& cd /opt/spack-environment \ && cd /opt/spack-environment && spack env activate . \
&& echo -n "" \ && echo -n "" \
&& echo "Add extra environment variables for Jug, Podio and Gaudi" \ && echo "Add extra environment variables for Jug, Podio and Gaudi" \
&& spack env activate . \ && echo "export PODIO=$(spack location -i podio);" \
&& export PODIO=`spack find -p podio \
| grep software \
| awk '{print $2}'` \
&& echo "export PODIO=${PODIO};" \
>> /etc/profile.d/z10_spack_environment.sh \ >> /etc/profile.d/z10_spack_environment.sh \
&& cd /opt/spack-environment && spack env activate . \
&& echo -n "" \ && echo -n "" \
&& echo "Installing additional python packages" \ && echo "Installing additional python packages" \
&& pip install --trusted-host pypi.org \ && pip install --trusted-host pypi.org \
--trusted-host files.pythonhosted.org \ --trusted-host files.pythonhosted.org \
--no-cache-dir \ --no-cache-dir \
ipython matplotlib scipy yapf pandas pycairo pyyaml lxml \ awkward \
jupyter jupyterlab uproot pyunfold seaborn stashcp awkward \ boto3 \
ipython \
jupyter \
jupyterlab \
lmfit \ lmfit \
lxml \
matplotlib \
pandas \
pycairo \
pyunfold \
pyyaml \
scipy \
seaborn \
stashcp \
uproot \
yapf \
&& echo -n "" \ && echo -n "" \
&& echo "Executing cmake patch for dd4hep 16.1" \ && echo "Executing cmake patch for dd4hep 16.1" \
&& sed -i "s/FIND_PACKAGE(Python/#&/" /usr/local/cmake/DD4hepBuild.cmake && sed -i "s/FIND_PACKAGE(Python/#&/" /usr/local/cmake/DD4hepBuild.cmake
......
...@@ -24,7 +24,7 @@ spack: ...@@ -24,7 +24,7 @@ spack:
- opencascade@7.4.0p1 - opencascade@7.4.0p1
- pkg-config@0.29.2 - pkg-config@0.29.2
- podio@0.14 build_type=RelWithDebInfo - podio@0.14 build_type=RelWithDebInfo
- pythia8@8303 +fastjet - pythia8@8.306 +fastjet
- python@3.9.6 - python@3.9.6
- py-numpy@1.20.1 - py-numpy@1.20.1
- py-pip@20.2 - py-pip@20.2
...@@ -38,5 +38,5 @@ spack: ...@@ -38,5 +38,5 @@ spack:
concretization: together concretization: together
packages: packages:
all: all:
compiler: [gcc@10.3.0] compiler: [gcc]
view: /usr/local view: /usr/local
diff --git a/Core/src/Geometry/CylinderVolumeBuilder.cpp b/Core/src/Geometry/CylinderVolumeBuilder.cpp
index eba6f8617..950c5286b 100644
--- a/Core/src/Geometry/CylinderVolumeBuilder.cpp
+++ b/Core/src/Geometry/CylinderVolumeBuilder.cpp
@@ -542,6 +542,7 @@ Acts::VolumeConfig Acts::CylinderVolumeBuilder::analyzeContent(
double zMaxD = center.z() + 0.5 * thickness;
lConfig.rMin =
std::min(lConfig.rMin, rMinD - m_cfg.layerEnvelopeR.first);
+ lConfig.rMin = std::max(0.0, lConfig.rMin);
lConfig.rMax =
std::max(lConfig.rMax, rMaxD + m_cfg.layerEnvelopeR.second);
lConfig.zMin = std::min(lConfig.zMin, zMinD - m_cfg.layerEnvelopeZ);
@@ -576,4 +577,4 @@ Acts::VolumeConfig Acts::CylinderVolumeBuilder::analyzeContent(
// and return what you have
return lConfig;
-}
\ No newline at end of file
+}
diff --git a/Plugins/DD4hep/src/DD4hepLayerBuilder.cpp b/Plugins/DD4hep/src/DD4hepLayerBuilder.cpp
index 4d1695abf..455481538 100644
--- a/Plugins/DD4hep/src/DD4hepLayerBuilder.cpp
+++ b/Plugins/DD4hep/src/DD4hepLayerBuilder.cpp
@@ -128,6 +128,7 @@ const Acts::LayerVector Acts::DD4hepLayerBuilder::endcapLayers(
std::abs(zMax - pl.max(Acts::binZ))};
pl.envelope[Acts::binR] = {std::abs(rMin - pl.min(Acts::binR)),
std::abs(rMax - pl.max(Acts::binR))};
+ pl.extent.ranges[Acts::binR] = {rMin, rMax};
}
} else {
throw std::logic_error(
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Acts(CMakePackage, CudaPackage):
"""
A Common Tracking Software (Acts)
This project contains an experiment-independent set of track reconstruction
tools. The main philosophy is to provide high-level track reconstruction
modules that can be used for any tracking detector. The description of the
tracking detector's geometry is optimized for efficient navigation and
quick extrapolation of tracks. Converters for several common geometry
description languages exist. Having a highly performant, yet largely
customizable implementation of track reconstruction algorithms was a
primary objective for the design of this toolset. Additionally, the
applicability to real-life HEP experiments plays major role in the
development process. Apart from algorithmic code, this project also
provides an event data model for the description of track parameters and
measurements.
Key features of this project include: tracking geometry description which
can be constructed from TGeo, DD4Hep, or GDML input, simple and efficient
event data model, performant and highly flexible algorithms for track
propagation and fitting, basic seed finding algorithms.
"""
homepage = "https://acts.web.cern.ch/ACTS/"
git = "https://github.com/acts-project/acts.git"
list_url = "https://github.com/acts-project/acts/releases/"
maintainers = ['HadrienG2']
tags = ['hep']
# Supported Acts versions
version('main', branch='main')
version('master', branch='main', deprecated=True) # For compatibility
version('14.1.0', commit='e883ab6acfe5033509ad1c27e8e2ba980dfa59f6', submodules=True)
version('14.0.0', commit='f902bef81b60133994315c13f7d32d60048c79d8', submodules=True)
version('13.0.0', commit='ad05672e48b693fd37156f1ad62ed57aa82f858c', submodules=True)
version('12.0.1', commit='a80d1ef995d8cdd4190cc09cb249276a3e0161f4', submodules=True)
version('12.0.0', commit='e0aa4e7dcb70df025576e050b6e652a2f736454a', submodules=True)
version('11.0.0', commit='eac3def261f65b343af6d8ce4bc40443ac57b57e')
version('10.0.0', commit='9bfe0b83f277f686408b896a84d2b9b53610f623')
version('9.02.0', commit='c438ee490e94eaf1c854a336ef54f398da637a48')
version('9.01.0', commit='bf8fd4c03dd94f497d8501df510d8f6a48434afd')
version('9.00.1', commit='7d59bc508d898d2cb67ba05a7150a978b9fcc32d')
version('9.00.0', commit='e6e3092bf3a9411aac7c11a24d7586abddb75d59')
version('8.03.0', commit='601c0a18b6738cae81c3e23422cfeb3ec7bddce9')
version('8.02.0', commit='f25cf639915fc2ac65b03882ad3eb11fb037ed00')
version('8.01.0', commit='ccc8c77bbc011f3adc020c565a509815be0ea029')
version('8.00.0', commit='50c972823144c007b406ae12d7ca25a1e0c35532')
version('7.00.0', commit='e663df7ab023bdb5ef206202efc2e54ccb71d416')
version('6.00.0', commit='a5cf04acd4b1a2c625e0826189109472a3392558')
version('5.00.0', commit='df77b91a7d37b8db6ed028a4d737014b5ad86bb7')
version('4.01.0', commit='c383bf434ef69939b47e840e0eac0ba632e6af9f')
version('4.00.0', commit='ed64b4b88d366b63adc4a8d1afe5bc97aa5751eb')
version('3.00.0', commit='e20260fccb469f4253519d3f0ddb3191b7046db3')
version('2.00.0', commit='8708eae2b2ccdf57ab7b451cfbba413daa1fc43c')
version('1.02.1', commit='f6ebeb9a28297ba8c54fd08b700057dd4ff2a311')
version('1.02.0', commit='e69b95acc9a264e63aded7d1714632066e090542')
version('1.01.0', commit='836fddd02c3eff33825833ff97d6abda5b5c20a0')
version('1.00.0', commit='ec9ce0bcdc837f568d42a12ddf3fc9c80db62f5d')
version('0.32.0', commit='a4cedab7e727e1327f2835db29d147cc86b21054')
version('0.31.0', commit='cfbd901555579a2f32f4efe2b76a7048442b42c3')
version('0.30.0', commit='a71ef0a9c742731611645214079884585a92b15e')
version('0.29.0', commit='33aa3e701728112e8908223c4a7fd521907c8ea4')
version('0.28.0', commit='55626b7401eeb93fc562e79bcf385f0ad0ac48bf')
version('0.27.1', commit='8ba3010a532137bc0ab6cf83a38b483cef646a01')
version('0.27.0', commit='f7b1a1c27d5a95d08bb67236ad0e117fcd1c679f')
version('0.26.0', commit='cf542b108b31fcc349fc18fb0466f889e4e42aa6')
version('0.25.2', commit='76bf1f3e4be51d4d27126b473a2caa8d8a72b320')
version('0.25.1', commit='6e8a1ea6d2c7385a78e3e190efb2a8a0c1fa957f')
version('0.25.0', commit='0aca171951a214299e8ff573682b1c5ecec63d42')
version('0.24.0', commit='ef4699c8500bfea59a5fe88bed67fde2f00f0adf')
version('0.23.0', commit='dc443dd7e663bc4d7fb3c1e3f1f75aaf57ffd4e4')
version('0.22.1', commit='ca1b8b1645db6b552f44c48d2ff34c8c29618f3a')
version('0.22.0', commit='2c8228f5843685fc0ae69a8b95dd8fc001139efb')
version('0.21.0', commit='10b719e68ddaca15b28ac25b3daddce8c0d3368d')
version('0.20.0', commit='1d37a849a9c318e8ca4fa541ef8433c1f004637b')
version('0.19.0', commit='408335636486c421c6222a64372250ef12544df6')
version('0.18.0', commit='d58a68cf75b52a5e0f563bc237f09250aa9da80c')
version('0.17.0', commit='0789f654ff484b013fd27e5023cf342785ea8d97')
version('0.16.0', commit='b3d965fe0b8ae335909d79114ef261c6b996773a')
version('0.15.0', commit='267c28f69c561e64369661a6235b03b5a610d6da')
version('0.14.0', commit='38d678fcb205b77d60326eae913fbb1b054acea1')
version('0.13.0', commit='b33f7270ddbbb33050b7ec60b4fa255dc2bfdc88')
version('0.12.1', commit='a8b3d36e7c6cb86487637589e0eff7bbe626054a')
version('0.12.0', commit='f9cda77299606d78c889fb1db2576c1971a271c4')
version('0.11.1', commit='c21196cd6c3ecc6da0f14d0a9ef227a274be584b')
version('0.11.0', commit='22bcea1f19adb0021ca61b843b95cfd2462dd31d')
version('0.10.5', commit='b6f7234ca8f18ee11e57709d019c14bf41cf9b19')
version('0.10.4', commit='42cbc359c209f5cf386e620b5a497192c024655e')
version('0.10.3', commit='a3bb86b79a65b3d2ceb962b60411fd0df4cf274c')
version('0.10.2', commit='64cbf28c862d8b0f95232b00c0e8c38949d5015d')
version('0.10.1', commit='0692dcf7824efbc504fb16f7aa00a50df395adbc')
version('0.10.0', commit='30ef843cb00427f9959b7de4d1b9843413a13f02')
version('0.09.5', commit='12b11fe8b0d428ccb8e92dda7dc809198f828672')
version('0.09.4', commit='e5dd9fbe179201e70347d1a3b9fa1899c226798f')
version('0.09.3', commit='a8f31303ee8720ed2946bfe2d59e81d0f70e307e')
version('0.09.2', commit='4e1f7fa73ffe07457080d787e206bf6466fe1680')
version('0.09.1', commit='69c451035516cb683b8f7bc0bab1a25893e9113d')
version('0.09.0', commit='004888b0a412f5bbaeef2ffaaeaf2aa182511494')
version('0.08.2', commit='c5d7568714e69e7344582b93b8d24e45d6b81bf9')
version('0.08.1', commit='289bdcc320f0b3ff1d792e29e462ec2d3ea15df6')
version('0.08.0', commit='99eedb38f305e3a1cd99d9b4473241b7cd641fa9')
# Variants that affect the core Acts library
variant('benchmarks', default=False, description='Build the performance benchmarks')
variant('examples', default=False, description='Build the examples')
variant('integration_tests', default=False, description='Build the integration tests')
variant('unit_tests', default=False, description='Build the unit tests')
variant('log_failure_threshold', default='MAX', description='Log level above which examples should auto-crash')
# Variants that enable / disable Acts plugins
variant('autodiff', default=False, description='Build the auto-differentiation plugin')
variant('dd4hep', default=False, description='Build the DD4hep plugin')
variant('digitization', default=False, description='Build the geometric digitization plugin')
variant('fatras', default=False, description='Build the FAst TRAcking Simulation package')
variant('fatras_geant4', default=False, description='Build Geant4 Fatras package')
variant('identification', default=False, description='Build the Identification plugin')
variant('json', default=False, description='Build the Json plugin')
variant('legacy', default=False, description='Build the Legacy package')
# FIXME: Cannot build ONNX plugin as Spack doesn't have an ONNX runtime
# FIXME: Cannot build SyCL plugin yet as Spack doesn't have SyCL support
variant('tgeo', default=False, description='Build the TGeo plugin')
variant('alignment', default=False, description='Build the alignment package')
# Variants that only affect Acts examples for now
variant('geant4', default=False, description='Build the Geant4-based examples')
variant('hepmc3', default=False, description='Build the HepMC3-based examples')
variant('pythia8', default=False, description='Build the Pythia8-based examples')
variant('python', default=False, description='Build python bindings for the examples')
variant('analysis', default=False, description='Build analysis applications in the examples')
## Temporary patch for ACTS
## https://github.com/acts-project/acts/issues/1015
patch('https://patch-diff.githubusercontent.com/raw/acts-project/acts/pull/1015.patch',
sha256='52f6fe981d04daaeebb68579974b25766a32a3f149b851599ae7dc6b5be38a35',
when='@13.0.0')
## Another temporary patch for ACTS to fix issue with vertexing API
## https://github.com/acts-project/acts/pull/1058
patch('https://patch-diff.githubusercontent.com/raw/acts-project/acts/pull/1058.patch',
sha256='edad00c3712d34cdce3cbc70e96365861076504023d3f9b7c3c4a240ff0d4c89',
when='@13.0.0')
## Temporary patch for ACTS to address
## https://github.com/acts-project/acts/issues/822
patch('acts-822.patch', when='@8.02.0p1')
patch('acts-822.patch', when='@8.03.0p1')
# Build dependencies
# FIXME: Use spack's autodiff package once there is one
# FIXME: Use spack's vecmem package once there is one
# (https://github.com/acts-project/acts/pull/998)
depends_on('boost @1.62:1.69 +program_options +test', when='@:0.10.3')
depends_on('boost @1.71: +filesystem +program_options +test', when='@0.10.4:')
depends_on('cmake @3.14:', type='build')
depends_on('dd4hep @1.11:', when='+dd4hep')
depends_on('dd4hep @1.11: +geant4', when='+dd4hep +geant4')
depends_on('eigen @3.3.7:')
depends_on('geant4', when='+fatras_geant4')
depends_on('geant4', when='+geant4')
depends_on('hepmc3 @3.2.1:', when='+hepmc3')
depends_on('heppdt', when='+hepmc3 @:4.0')
depends_on('intel-tbb @2020.1:', when='+examples')
depends_on('nlohmann-json @3.9.1:', when='@0.14: +json')
depends_on('pythia8', when='+pythia8')
depends_on('python', when='+python')
depends_on('py-pytest', when='+python +unit_tests')
depends_on('root @6.10: cxxstd=14', when='+tgeo @:0.8.0')
depends_on('root @6.20: cxxstd=17', when='+tgeo @0.8.1:')
# Some variant combinations do not make sense
conflicts('+autodiff', when='@:1.01')
conflicts('+benchmarks', when='@:0.15')
conflicts('+dd4hep', when='-tgeo')
conflicts('+examples', when='@:0.22')
conflicts('+examples', when='-digitization')
conflicts('+examples', when='-fatras')
conflicts('+examples', when='-identification')
conflicts('+examples', when='-json')
conflicts('+examples', when='-tgeo')
conflicts('+fatras', when='@:0.15')
conflicts('+geant4', when='@:0.22')
conflicts('+geant4', when='-examples')
conflicts('+hepmc3', when='@:0.22')
conflicts('+hepmc3', when='-examples')
conflicts('+pythia8', when='@:0.22')
conflicts('+pythia8', when='-examples')
conflicts('+python', when='@:13')
conflicts('+python', when='-examples')
conflicts('+tgeo', when='-identification')
conflicts('+alignment', when='@:12')
conflicts('%gcc@:7', when='@0.23:')
def cmake_args(self):
spec = self.spec
def cmake_variant(cmake_label, spack_variant):
enabled = spec.satisfies('+' + spack_variant)
return "-DACTS_BUILD_{0}={1}".format(cmake_label, enabled)
def example_cmake_variant(cmake_label, spack_variant):
enabled = spec.satisfies('+examples +' + spack_variant)
return "-DACTS_BUILD_EXAMPLES_{0}={1}".format(cmake_label, enabled)
def plugin_label(plugin_name):
if spec.satisfies('@0.33:'):
return "PLUGIN_" + plugin_name
else:
return plugin_name + "_PLUGIN"
def plugin_cmake_variant(plugin_name, spack_variant):
return cmake_variant(plugin_label(plugin_name), spack_variant)
integration_tests_label = "INTEGRATIONTESTS"
unit_tests_label = "UNITTESTS"
legacy_plugin_label = "LEGACY_PLUGIN"
if spec.satisfies('@:0.15'):
integration_tests_label = "INTEGRATION_TESTS"
unit_tests_label = "TESTS"
if spec.satisfies('@:0.32'):
legacy_plugin_label = "LEGACY"
args = [
plugin_cmake_variant("AUTODIFF", "autodiff"),
cmake_variant("BENCHMARKS", "benchmarks"),
plugin_cmake_variant("CUDA", "cuda"),
plugin_cmake_variant("DD4HEP", "dd4hep"),
plugin_cmake_variant("DIGITIZATION", "digitization"),
cmake_variant("EXAMPLES", "examples"),
example_cmake_variant("DD4HEP", "dd4hep"),
example_cmake_variant("GEANT4", "geant4"),
example_cmake_variant("HEPMC3", "hepmc3"),
example_cmake_variant("PYTHIA8", "pythia8"),
example_cmake_variant("PYTHON_BINDINGS", "python"),
cmake_variant("ANALYSIS_APPS", "analysis"),
cmake_variant("FATRAS", "fatras"),
cmake_variant("FATRAS_GEANT4", "fatras_geant4"),
plugin_cmake_variant("IDENTIFICATION", "identification"),
cmake_variant(integration_tests_label, "integration_tests"),
plugin_cmake_variant("JSON", "json"),
cmake_variant(unit_tests_label, "unit_tests"),
cmake_variant(legacy_plugin_label, "legacy"),
plugin_cmake_variant("TGEO", "tgeo"),
cmake_variant("ALIGNMENT", "alignment")
]
log_failure_threshold = spec.variants['log_failure_threshold'].value
args.append("-DACTS_LOG_FAILURE_THRESHOLD={0}".format(log_failure_threshold))
cuda_arch = spec.variants['cuda_arch'].value
if cuda_arch != 'none':
args.append('-DCUDA_FLAGS=-arch=sm_{0}'.format(cuda_arch[0]))
if 'root' in spec:
cxxstd = spec['root'].variants['cxxstd'].value
args.append("-DCMAKE_CXX_STANDARD={0}".format(cxxstd))
# FIXME: Once we can use spack's autodiff package, set
# ACTS_USE_SYSTEM_AUTODIFF too.
if spec.satisfies('@0.33: +json'):
args.append("-DACTS_USE_SYSTEM_NLOHMANN_JSON=ON")
elif spec.satisfies('@0.14.0: +json'):
args.append("-DACTS_USE_BUNDLED_NLOHMANN_JSON=OFF")
return args
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d800190..121fa7fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,7 @@ ENDIF()
#############################################################
ENABLE_LANGUAGE(CXX)
+ENABLE_LANGUAGE(C)
# Set C++ standard
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard used for compiling")
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import * from spack import *
from spack.pkg.builtin.dd4hep import Dd4hep as BuiltinDd4hep
class Dd4hep(CMakePackage): class Dd4hep(BuiltinDd4hep):
"""DD4hep is a software framework for providing a complete solution for
full detector description (geometry, materials, visualization, readout,
alignment, calibration, etc.) for the full experiment life cycle
(detector concept development, detector optimization, construction,
operation). It offers a consistent description through a single source
of detector information for simulation, reconstruction, analysis, etc.
It distributed under the LGPLv3 License."""
homepage = "https://dd4hep.web.cern.ch/dd4hep/"
url = "https://github.com/AIDASoft/DD4hep/archive/v01-12-01.tar.gz"
git = "https://github.com/AIDASoft/DD4hep.git"
maintainers = ['vvolkl', 'drbenmorgan']
tags = ['hep']
version('master', branch='master')
version('1.18', sha256='1e909a42b969dfd966224fa8ab1eca5aa05136baf3c00a140f2f6d812b497152')
version('1.17p1', sha256='036a9908aaf1e13eaf5f2f43b6f5f4a8bdda8183ddc5befa77a4448dbb485826')
version('1.17', sha256='036a9908aaf1e13eaf5f2f43b6f5f4a8bdda8183ddc5befa77a4448dbb485826')
version('1.16.1', sha256='c8b1312aa88283986f89cc008d317b3476027fd146fdb586f9f1fbbb47763f1a')
version('1.16', sha256='ea9755cd255cf1b058e0e3cd743101ca9ca5ff79f4c60be89f9ba72b1ae5ec69')
version('1.15', sha256='992a24bd4b3dfaffecec9d1c09e8cde2c7f89d38756879a47b23208242f4e352')
version('1.14.1', sha256='5b5742f1e23c2b36d3174cca95f810ce909c0eb66f3d6d7acb0ba657819e6717')
version('1.14', sha256='b603aa3c0db8dda392253aa71fa4a0f0c3c9715d47df0b895d45c1e8849f4895')
version('1.13.1', sha256='83fa70cd74ce93b2f52f098388dff58d179f05ace5b50aea3f408bb8abf7cb73')
version('1.13', sha256='0b1f9d902ebe21a9178c1e41204c066b29f68c8836fd1d03a9ce979811ddb295')
version('1.12.1', sha256='85e8c775ec03c499ce10911e228342e757c81ce9ef2a9195cb253b85175a2e93')
version('1.12', sha256='133a1fb8ce0466d2482f3ebb03e60b3bebb9b2d3e33d14ba15c8fbb91706b398')
version('1.11.2', sha256='96a53dd26cb8df11c6dae54669fbc9cc3c90dd47c67e07b24be9a1341c95abc4')
version('1.11.1', sha256='d7902dd7f6744bbda92f6e303ad5a3410eec4a0d2195cdc86f6c1167e72893f0')
version('1.11', sha256='25643296f15f9d11ad4ad550b7c3b92e8974fc56f1ee8e4455501010789ae7b6')
version('1.10', sha256='1d6b5d1c368dc8bcedd9c61b7c7e1a44bad427f8bd34932516aff47c88a31d95')
generator = 'Ninja'
# Workarounds for various TBB issues in DD4hep v1.11
# See https://github.com/AIDASoft/DD4hep/pull/613 .
patch('tbb-workarounds.patch', when='@1.11')
patch('tbb2.patch', when='@1.12.1')
# Workaround for failing build file generation in some cases
# See https://github.com/spack/spack/issues/24232
patch('cmake_language.patch', when='@:1.16.1')
# hack to fix refcount underflow
patch('refcount_underflow.patch', when='@1.17:')
patch('pdg.patch', when='@1.17:')
# custom hash for the 2021-07-27 version, needed to include # custom hash for the 2021-07-27 version, needed to include
# https://github.com/AIDASoft/DD4hep/pull/849 # https://github.com/AIDASoft/DD4hep/pull/849
# https://github.com/AIDASoft/DD4hep/pull/851 # https://github.com/AIDASoft/DD4hep/pull/851
patch('2021-07-27.patch', when='@1.17p1') patch('2021-07-27.patch', when='@1.17')
# patch for https://github.com/AIDASoft/DD4hep/issues/862 # patch for https://github.com/AIDASoft/DD4hep/issues/862
patch('0001-do-not-change-momentum-in-getParticleDirection.patch', when='@1.17p1:1.18') patch('0001-do-not-change-momentum-in-getParticleDirection.patch', when='@1.17:1.18')
# hack to fix refcount underflow
variant('xercesc', default=False, description="Enable 'Detector Builders' based on XercesC") patch('refcount_underflow.patch', when='@1.17:')
variant('geant4', default=False, description="Enable the simulation part based on Geant4") patch('pdg.patch', when='@1.17:')
variant('assimp', default=False, description="Enable CAD interface based on Assimp")
variant('hepmc3', default=False, description="Enable build with hepmc3")
variant('lcio', default=False, description="Enable build with lcio")
variant('edm4hep', default=True, description="Enable build with edm4hep")
variant('geant4units', default=False, description="Use geant4 units throughout")
variant('debug', default=False,
description="Enable debug build flag - adds extra info in"
" some places in addtion to the debug build type")
depends_on('cmake @3.12:', type='build')
depends_on('ninja', type='build')
depends_on('boost @1.49:')
depends_on('root @6.08: +gdml +math +opengl +python +x')
extends('python')
depends_on('xerces-c', when='+xercesc')
depends_on('geant4@10.2.2:', when='+geant4')
depends_on('assimp@5.0.2:', when='+assimp')
depends_on('hepmc3', when="+hepmc3")
depends_on('lcio', when="+lcio")
depends_on('edm4hep', when="+edm4hep")
# See https://github.com/AIDASoft/DD4hep/pull/771
conflicts('^cmake@3.16:3.17.0', when='@1.15',
msg='cmake version with buggy FindPython breaks dd4hep cmake config')
def cmake_args(self):
spec = self.spec
cxxstd = spec['root'].variants['cxxstd'].value
# root can be built with cxxstd=11, but dd4hep requires 14
if cxxstd == "11":
cxxstd = "14"
args = [
self.define_from_variant('DD4HEP_USE_EDM4HEP', 'edm4hep'),
self.define_from_variant('DD4HEP_USE_XERCESC', 'xercesc'),
self.define_from_variant('DD4HEP_USE_GEANT4', 'geant4'),
self.define_from_variant('DD4HEP_USE_LCIO', 'lcio'),
self.define_from_variant('DD4HEP_USE_HEPMC3', 'hepmc3'),
self.define_from_variant('DD4HEP_USE_GEANT4_UNITS', 'geant4units'),
self.define_from_variant('DD4HEP_BUILD_DEBUG', 'debug'),
# Downloads assimp from github and builds it on the fly.
# However, with spack it is preferrable to have a proper external
# dependency, so we disable it.
self.define('DD4HEP_LOAD_ASSIMP', False),
"-DCMAKE_CXX_STANDARD={0}".format(cxxstd),
"-DBUILD_TESTING={0}".format(self.run_tests),
"-DBOOST_ROOT={0}".format(spec['boost'].prefix),
"-DBoost_NO_BOOST_CMAKE=ON",
"-DPYTHON_EXECUTABLE={0}".format(spec['python'].command.path),
]
return args
def setup_run_environment(self, env):
# used p.ex. in ddsim to find DDDetectors dir
env.set("DD4hepINSTALL", self.prefix)
env.set("DD4HEP", self.prefix.examples)
env.set("DD4hep_DIR", self.prefix)
env.set("DD4hep_ROOT", self.prefix)
def url_for_version(self, version):
# remove extra patch qualifiers
if version[-2] == 'p':
version=version[:-2]
# dd4hep releases are dashes and padded with a leading zero
# the patch version is omitted when 0
# so for example v01-12-01, v01-12 ...
base_url = self.url.rsplit('/', 1)[0]
if len(version) == 1:
major = version[0]
minor, patch = 0, 0
elif len(version) == 2:
major, minor = version
patch = 0
else:
major, minor, patch = version
# By now the data is normalized enough to handle it easily depending
# on the value of the patch version
if patch == 0:
version_str = 'v%02d-%02d.tar.gz' % (major, minor)
else:
version_str = 'v%02d-%02d-%02d.tar.gz' % (major, minor, patch)
return base_url + '/' + version_str
diff --git a/DDDigi/CMakeLists.txt b/DDDigi/CMakeLists.txt
index e6fb1096..88eb5c92 100644
--- a/DDDigi/CMakeLists.txt
+++ b/DDDigi/CMakeLists.txt
@@ -34,12 +34,10 @@ target_include_directories(DDDigi
FIND_PACKAGE(TBB QUIET)
if(TBB_FOUND)
- dd4hep_print( "|++> TBB_INCLUDE_DIR --> ${TBB_INCLUDE_DIR}")
- dd4hep_print( "|++> TBB_LIBRARY --> ${TBB_LIBRARY}")
+ dd4hep_print( "|++> TBB_IMPORTED_TARGETS --> ${TBB_IMPORTED_TARGETS}")
dd4hep_print( "|++> TBB found. DDDigi will run multi threaded.")
target_compile_definitions(DDDigi PUBLIC DD4HEP_USE_TBB)
- target_link_libraries(DDDigi ${TBB_LIBRARY})
- target_include_directories(DDDigi ${TBB_INCLUDE_DIRS})
+ target_link_libraries(DDDigi PUBLIC ${TBB_IMPORTED_TARGETS})
else()
dd4hep_print( "|++> TBB not found. DDDigi will only work single threaded.")
endif()
diff --git a/DDDigi/src/DigiKernel.cpp b/DDDigi/src/DigiKernel.cpp
index d62c6694..f2c2e86c 100644
--- a/DDDigi/src/DigiKernel.cpp
+++ b/DDDigi/src/DigiKernel.cpp
@@ -91,7 +91,7 @@ public:
DigiEventAction* action = 0;
Wrapper(DigiContext& c, DigiEventAction* a)
: context(c), action(a) {}
- Wrapper(Wrapper&& copy) = delete;
+ Wrapper(Wrapper&& copy) = default;
Wrapper(const Wrapper& copy) = default;
Wrapper& operator=(Wrapper&& copy) = delete;
Wrapper& operator=(const Wrapper& copy) = delete;
@@ -111,7 +111,7 @@ class DigiKernel::Processor {
DigiKernel& kernel;
public:
Processor(DigiKernel& k) : kernel(k) {}
- Processor(Processor&& l) = delete;
+ Processor(Processor&& l) = default;
Processor(const Processor& l) = default;
void operator()() const {
int todo = 1;
diff --git a/DDDigi/src/DigiKernel.cpp b/DDDigi/src/DigiKernel.cpp
index f2c2e86c..f168ef9b 100644
--- a/DDDigi/src/DigiKernel.cpp
+++ b/DDDigi/src/DigiKernel.cpp
@@ -273,7 +273,7 @@ void DigiKernel::submit(const DigiAction::Actors<DigiEventAction>& actions, Digi
if ( parallel ) {
tbb::task_group que;
for ( auto* i : actions )
- que.run(Wrapper(context, *i));
+ que.run(Wrapper(context, i));
que.wait();
goto print_stamp;
}
https://github.com/MethodicalAcceleratorDesign/MAD-X.git
...@@ -7,78 +7,24 @@ from spack import * ...@@ -7,78 +7,24 @@ from spack import *
class Madx(CMakePackage): class Madx(CMakePackage):
""" """MAD-X (Methodical Accelerator Design) is an application
for designing particle accelerators."""
"""
homepage = "https://github.com/MethodicalAcceleratorDesign/MAD-X" homepage = "https://github.com/MethodicalAcceleratorDesign/MAD-X"
url = "https://github.com/MethodicalAcceleratorDesign/MAD-X/archive/refs/tags/5.07.00.tar.gz"
git = "https://github.com/MethodicalAcceleratorDesign/MAD-X.git" git = "https://github.com/MethodicalAcceleratorDesign/MAD-X.git"
maintainers = ['tpersson']
tags = ['hep'] maintainers = ['wdconinc']
# Supported MAD-X versions # Supported MAD-X versions
version('master', branch='master') version('master', branch='master')
version('5.06.1', commit='f3764bceefb802f6b2a3c35d7d961adf6718d377') version('5.07.00', sha256='77c0ec591dc3ea76cf57c60a5d7c73b6c0d66cca1fa7c4eb25a9071e8fc67e60')
version('5.06.01', sha256='cd2cd9f12463530950dab1c9a26730bb7c38f378c13afb7223fb9501c71a84be')
#variant('benchmarks', default=False, description='Build the performance benchmarks')
#variant('examples', default=False, description='Build the examples')
#variant('integration_tests', default=False, description='Build the integration tests')
#variant('unit_tests', default=False, description='Build the unit tests')
#variant('autodiff', default=False, description='Build the auto-differentiation plugin')
#variant('dd4hep', default=False, description='Build the DD4hep plugin')
#variant('digitization', default=False, description='Build the geometric digitization plugin')
#variant('fatras', default=False, description='Build the FAst TRAcking Simulation package')
#variant('identification', default=False, description='Build the Identification plugin')
#variant('json', default=False, description='Build the Json plugin')
#variant('legacy', default=False, description='Build the Legacy package')
## FIXME: Cannot build ONNX plugin as Spack doesn't have an ONNX runtime
## FIXME: Cannot build SyCL plugin yet as Spack doesn't have SyCL support
#variant('tgeo', default=False, description='Build the TGeo plugin')
# Variants that only affect Acts examples for now # patch for gcc-11 to avoid error due to variable shadowing
#variant('geant4', default=False, description='Build the Geant4-based examples') patch('https://github.com/MethodicalAcceleratorDesign/MAD-X/commit/e7a434290df675b894f70026ce0c7c217330cce5.patch',
#variant('hepmc3', default=False, description='Build the HepMC3-based examples') sha256='ba9d00692250ab1eeeb7235a4ba7d899ecbbb4588f3ec08afc22d228dc1ea437',
#variant('pythia8', default=False, description='Build the Pythia8-based examples') when='@:5.07.00')
depends_on("libx11") depends_on("libx11")
depends_on("zlib") depends_on("zlib")
# Build dependencies
# FIXME: Use spack's autodiff package once there is one
#depends_on('boost @1.62:1.69.99 +program_options +test', when='@:0.10.3')
#depends_on('boost @1.69: +filesystem +program_options +test', when='@0.10.4:')
#depends_on('cmake @3.11:', type='build')
#depends_on('dd4hep @1.10:', when='+dd4hep')
#depends_on('dd4hep @1.10: +geant4', when='+dd4hep +geant4')
#depends_on('eigen @3.2.9:', type='build')
#depends_on('geant4', when='+geant4')
#depends_on('hepmc3@3.1:', when='+hepmc3')
#depends_on('heppdt', when='+hepmc3')
#depends_on('intel-tbb', when='+examples')
#depends_on('nlohmann-json @3.2.0:', when='@0.14: +json')
#depends_on('pythia8', when='+pythia8')
#depends_on('root @6.10: cxxstd=14', when='+tgeo @:0.8.0')
#depends_on('root @6.10: cxxstd=17', when='+tgeo @0.8.1:')
## Some variant combinations do not make sense
#conflicts('+autodiff', when='@:1.01')
#conflicts('+benchmarks', when='@:0.15')
#conflicts('+dd4hep', when='-tgeo')
#conflicts('+examples', when='@:0.22')
#conflicts('+examples', when='-digitization')
#conflicts('+examples', when='-fatras')
#conflicts('+examples', when='-identification')
#conflicts('+examples', when='-json')
#conflicts('+examples', when='-tgeo')
#conflicts('+fatras', when='@:0.15')
#conflicts('+geant4', when='@:0.22')
#conflicts('+geant4', when='-examples')
#conflicts('+hepmc3', when='@:0.22')
#conflicts('+hepmc3', when='-examples')
#conflicts('+pythia8', when='@:0.22')
#conflicts('+pythia8', when='-examples')
#conflicts('+tgeo', when='-identification')
#conflicts('%gcc@:7', when='@0.23:')
diff --git a/qtlocation/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp b/qtlocation/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp
index d475c38..c1710a6 100644
--- a/qtlocation/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp
+++ b/qtlocation/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp
@@ -5,6 +5,7 @@
#include <unicode/ushape.h>
#include <memory>
+#include <stdexcept>
namespace mbgl {
diff --git a/qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp b/qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp
index 97bfe91..30125a8 100644
--- a/qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp
+++ b/qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp
@@ -1,4 +1,5 @@
#include <mbgl/util/convert.hpp>
+#include <cstdint>
namespace mbgl {
namespace util {
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.operating_systems.mac_os import macos_version
import llnl.util.tty as tty
import itertools
import os
import sys
MACOS_VERSION = macos_version() if sys.platform == 'darwin' else None
class Qt(Package):
"""Qt is a comprehensive cross-platform C++ application framework."""
homepage = 'http://qt.io'
# Alternative location 'http://download.qt.io/official_releases/qt/'
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 = 3
maintainers = ['sethrj']
phases = ['configure', 'build', 'install']
version('5.14.2', sha256='c6fcd53c744df89e7d3223c02838a33309bd1c291fcb6f9341505fe99f7f19fa')
version('5.14.1', sha256='6f17f488f512b39c2feb57d83a5e0a13dcef32999bea2e2a8f832f54a29badb8')
version('5.14.0', sha256='be9a77cd4e1f9d70b58621d0753be19ea498e6b0da0398753e5038426f76a8ba')
version('5.13.1', sha256='adf00266dc38352a166a9739f1a24a1e36f1be9c04bf72e16e142a256436974e')
version('5.12.7', sha256='873783a0302129d98a8f63de9afe4520fb5f8d5316be8ad7b760c59875cd8a8d')
version('5.12.5', sha256='a2299e21db7767caf98242767bffb18a2a88a42fee2d6a393bedd234f8c91298')
version('5.12.2', sha256='59b8cb4e728450b21224dcaaa40eb25bafc5196b6988f2225c394c6b7f881ff5')
version('5.11.3', sha256='859417642713cee2493ee3646a7fee782c9f1db39e41d7bb1322bba0c5f0ff4d')
version('5.11.2', sha256='c6104b840b6caee596fa9a35bc5f57f67ed5a99d6a36497b6fe66f990a53ca81')
version('5.10.0', sha256='936d4cf5d577298f4f9fdb220e85b008ae321554a5fcd38072dc327a7296230e')
version('5.9.1', sha256='7b41a37d4fe5e120cdb7114862c0153f86c07abbec8db71500443d2ce0c89795')
version('5.9.0', sha256='f70b5c66161191489fc13c7b7eb69bf9df3881596b183e7f6d94305a39837517')
version('5.8.0', sha256='9dc5932307ae452855863f6405be1f7273d91173dcbe4257561676a599bd58d3')
version('5.7.1', sha256='c86684203be61ae7b33a6cf33c23ec377f246d697bd9fb737d16f0ad798f89b7')
version('5.7.0', sha256='4661905915d6265243e17fe59852930a229cf5b054ce5af5f48b34da9112ab5f')
version('5.5.1', sha256='c7fad41a009af1996b62ec494e438aedcb072b3234b2ad3eeea6e6b1f64be3b3')
version('5.4.2', sha256='cfc768c55f0a0cd232bed914a9022528f8f2e50cb010bf0e4f3f62db3dfa17bd')
version('5.4.0', sha256='1739633424bde3d89164ae6ff1c5c913be38b9997e451558ef873aac4bbc408a')
version('5.3.2', sha256='c8d3fd2ead30705c6673c5e4af6c6f3973346b4fb2bd6079c7be0943a5b0282d')
version('5.2.1', sha256='84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1')
version('4.8.7', sha256='e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0')
version('4.8.6', sha256='8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c')
version('4.8.5', sha256='eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138')
version('3.3.8b', sha256='1b7a1ff62ec5a9cb7a388e2ba28fda6f960b27f27999482ebeceeadb72ac9f6e')
variant('debug', default=False,
description="Build debug version.")
variant('gtk', default=False,
description="Build with gtkplus.")
variant('webkit', default=False,
description="Build the Webkit extension")
variant('examples', default=False,
description="Build examples.")
variant('framework', default=bool(MACOS_VERSION),
description="Build as a macOS Framework package.")
variant('tools', default=True,
description="Build tools, including Qt Designer.")
variant('dbus', default=False,
description="Build with D-Bus support.")
variant('phonon', default=False,
description="Build with phonon support.")
variant('opengl', default=False,
description="Build with OpenGL support.")
variant('sql', default=True,
description="Build with SQL support.")
variant('shared', default=True,
description='Build shared libraries.')
variant('ssl', default=True,
description="Build with OpenSSL support.")
variant('freetype', default='spack', description='Freetype2 support',
values=('spack', 'qt', 'none'), multi=False)
# Patches for gcc10
patch('gcc10.patch', when=('%gcc@10:'))
# Patches for qt@3
patch('qt3-accept.patch', when='@3')
patch('qt3-headers.patch', when='@3')
# Patches for qt@4
patch('qt4-configure-gcc.patch', when='@4:4.8.6 %gcc')
patch('qt4-87-configure-gcc.patch', when='@4.8.7 %gcc')
patch('qt4-tools.patch', when='@4+tools')
patch('qt4-mac.patch', when='@4.8.7 platform=darwin')
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925811
patch("qt4-qforeach.patch", when="@4 %gcc@9:")
# Patches for qt@4:
# https://github.com/spack/spack/issues/1517
patch('qt4-pcre.patch', when='@4')
patch('qt5-pcre.patch', when='@5:')
# https://bugreports.qt.io/browse/QTBUG-74196
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89585
patch('qt4-asm-volatile.patch', when='@4')
patch('qt5-asm-volatile.patch', when='@5.0.0:5.12.1')
# Patches for qt@5
# https://bugreports.qt.io/browse/QTBUG-74219
patch('qt5-btn_trigger_happy.patch', when='@5.7:5.12')
# https://bugreports.qt.io/browse/QTBUG-57656
patch('qt5-8-framework.patch', when='@5.8.0 +framework')
# https://bugreports.qt.io/browse/QTBUG-58038
patch('qt5-8-freetype.patch', when='@5.8.0 freetype=spack')
# https://codereview.qt-project.org/c/qt/qtbase/+/245425
patch('https://github.com/qt/qtbase/commit/a52d7861edfb5956de38ba80015c4dd0b596259b.patch',
sha256='c49b228c27e3ad46ec3af4bac0e9985af5b5b28760f238422d32e14f98e49b1e',
working_dir='qtbase',
when='@5.10:5.12.0 %gcc@9:')
# https://github.com/Homebrew/homebrew-core/pull/5951
patch('qt5-restore-pc-files.patch', when='@5.9:5.11 platform=darwin')
# https://github.com/spack/spack/issues/14400
patch('qt5-11-intel-overflow.patch', when='@5.11 %intel')
patch('qt5-12-intel-overflow.patch', when='@5.12:5.14.0 %intel')
# https://bugreports.qt.io/browse/QTBUG-78937
patch('qt5-12-configure.patch', when='@5.12')
# Build-only dependencies
depends_on("pkgconfig", type='build')
depends_on("flex", when='+webkit', type='build')
depends_on("bison", when='+webkit', type='build')
depends_on("python", when='@5.7.0:', type='build')
# Dependencies, then variant- and version-specific dependencies
depends_on("icu4c")
depends_on("jpeg")
depends_on("libmng")
depends_on("libtiff")
depends_on("libxml2")
depends_on("zlib")
depends_on("freetype", when='freetype=spack')
depends_on("gperf", when='+webkit')
depends_on("gtkplus", when='+gtk')
depends_on("openssl", when='+ssl')
depends_on("sqlite+column_metadata", when='+sql', type=('build', 'run'))
depends_on("libpng@1.2.57", when='@3')
depends_on("libsm", when='@3')
depends_on("pcre+multibyte", when='@5.0:5.8')
depends_on("inputproto", when='@:5.8')
depends_on("openssl@:1.0.999", when='@4:5.9+ssl')
depends_on("glib", when='@4:')
depends_on("libpng", when='@4:')
depends_on("dbus", when='@4:+dbus')
depends_on("gl", when='@4:+opengl')
depends_on("harfbuzz", when='@5:')
depends_on("double-conversion", when='@5.7:')
depends_on("pcre2+multibyte", when='@5.9:')
# gcc@4 is not supported as of Qt@5.14
# https://doc.qt.io/qt-5.14/supported-platforms.html
conflicts('%gcc@:4.99', when='@5.14:')
# Non-macOS dependencies and special macOS constraints
if MACOS_VERSION is None:
depends_on("fontconfig", when='freetype=spack')
depends_on("libsm")
depends_on("libx11")
depends_on("libxcb")
depends_on("libxkbcommon")
depends_on("xcb-util-image")
depends_on("xcb-util-keysyms")
depends_on("xcb-util-renderutil")
depends_on("xcb-util-wm")
depends_on("libxext")
depends_on("libxrender")
conflicts('+framework',
msg="QT cannot be built as a framework except on macOS.")
else:
conflicts('platform=darwin', when='@4.8.6',
msg="QT 4 for macOS is only patched for 4.8.7")
use_xcode = True
# Mapping for compilers/systems in the QT 'mkspecs'
compiler_mapping = {'intel': ('icc',),
'apple-clang': ('clang-libc++', 'clang'),
'clang': ('clang-libc++', 'clang'),
'gcc': ('g++',)}
platform_mapping = {'darwin': 'macx'}
def url_for_version(self, version):
# URL keeps getting more complicated with every release
url = self.list_url
if version >= Version('4.0'):
url += str(version.up_to(2)) + '/'
else:
url += str(version.up_to(1)) + '/'
if version >= Version('4.8'):
url += str(version) + '/'
if version >= Version('5'):
url += 'single/'
url += 'qt-'
if version >= Version('4.6'):
url += 'everywhere-'
elif version >= Version('2.1'):
url += 'x11-'
if version >= Version('5.10.0'):
url += 'src-'
elif version >= Version('4.0'):
url += 'opensource-src-'
elif version >= Version('3'):
url += 'free-'
# 5.9 only has xz format. From 5.2.1 -> 5.8.0 .gz or .xz were possible
if version >= Version('5.9'):
url += str(version) + '.tar.xz'
else:
url += str(version) + '.tar.gz'
return url
def setup_build_environment(self, env):
env.set('MAKEFLAGS', '-j{0}'.format(make_jobs))
def setup_run_environment(self, env):
env.set('QTDIR', self.prefix)
def setup_dependent_build_environment(self, env, dependent_spec):
env.set('QTDIR', self.prefix)
def setup_dependent_package(self, module, dependent_spec):
module.qmake = Executable(join_path(self.spec.prefix.bin, 'qmake'))
def get_mkspec(self):
"""Determine the mkspecs root directory and QT platform.
"""
spec = self.spec
cname = spec.compiler.name
pname = spec.architecture.platform
# Transform spack compiler name to a list of possible QT compilers
cnames = self.compiler_mapping.get(cname, [cname])
# Transform platform name to match those in QT
pname = self.platform_mapping.get(pname, pname)
qtplat = None
mkspec_dir = 'qtbase/mkspecs' if spec.satisfies('@5:') else 'mkspecs'
for subdir, cname in itertools.product(('', 'unsupported/'), cnames):
platdirname = "".join([subdir, pname, "-", cname])
tty.debug("Checking for platform '{0}' in {1}".format(
platdirname, mkspec_dir))
if os.path.exists(os.path.join(mkspec_dir, platdirname)):
qtplat = platdirname
break
else:
tty.warn("No matching QT platform was found in {0} "
"for platform '{1}' and compiler {2}".format(
mkspec_dir, pname, ",".join(cnames)))
return (mkspec_dir, qtplat)
@when('@4 platform=darwin')
def patch(self):
ogl = self.spec['opengl'] if '+opengl' in self.spec else None
deployment_target = str(MACOS_VERSION.up_to(2))
patches = {
'MACOSX_DEPLOYMENT_TARGET': deployment_target,
'PREFIX': self.prefix,
'OPENGL_INCDIR': ogl.prefix.include if ogl else "",
'OPENGL_LIBS': ogl.libs.ld_flags if ogl else "",
}
def repl(match):
# Replace the original config variable value with the one chosen
# here if it is mentioned in 'patches'; otherwise return the
# original value.
return patches.get(match.group(1), match.group(0))
files_to_filter = [
"configure",
"mkspecs/common/mac.conf",
"mkspecs/common/unix.conf",
"mkspecs/common/gcc-base-macx.conf",
"mkspecs/common/gcc-base.conf",
"qmake/generators/unix/unixmake.cpp",
"qmake/qmake.pri",
"src/tools/bootstrap/bootstrap.pro"
]
if '%clang' in self.spec or '%apple-clang' in self.spec:
files_to_filter += [
"mkspecs/unsupported/macx-clang-libc++/qmake.conf",
"mkspecs/common/clang.conf"
]
elif '%gcc' in self.spec:
files_to_filter += [
"mkspecs/common/g++-macx.conf",
"mkspecs/darwin-g++/qmake.conf"
]
# Filter inserted configure variables
filter_file(r'@([a-zA-Z0-9_]+)@', repl, *files_to_filter)
# Remove debug build
files_to_filter = [
"src/3rdparty/webkit/Source/WebKit.pri",
"src/3rdparty/webkit/Source/WebKit/qt/declarative/declarative.pro",
"src/imports/qimportbase.pri",
"src/plugins/qpluginbase.pri",
"src/qbase.pri",
"tools/designer/src/components/lib/lib.pro",
"tools/designer/src/lib/lib.pro",
"tools/designer/src/plugins/activeqt/activeqt.pro",
"tools/designer/src/plugins/plugins.pri",
"tools/designer/src/uitools/uitools.pro",
]
filter_file(r'(\+=.*)debug_and_release', r'\1', *files_to_filter)
@when('@4: %gcc') # *NOT* darwin/mac gcc
def patch(self):
(mkspec_dir, platform) = self.get_mkspec()
def conf(name):
return os.path.join(mkspec_dir, 'common', name + '.conf')
# Fix qmake compilers in the default mkspec
filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc', conf('g++-base'))
filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++', conf('g++-base'))
# Don't error out on undefined symbols
filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ',
conf('g++-unix'))
if self.spec.satisfies('@4'):
# Necessary to build with GCC 6 and other modern compilers
# http://stackoverflow.com/questions/10354371/
with open(conf('gcc-base'), 'a') as f:
f.write("QMAKE_CXXFLAGS += -std=gnu++98\n")
f.write("QMAKE_CXXFLAGS += -fcommon\n")
f.write("QMAKE_CFLAGS += -fcommon\n")
@when('@4: %intel')
def patch(self):
(mkspec_dir, platform) = self.get_mkspec()
conf_file = os.path.join(mkspec_dir, platform, "qmake.conf")
# Intel's `ar` equivalent might not be in the path: replace it with
# explicit
xiar = os.path.join(os.path.dirname(self.compiler.cc), 'xiar')
filter_file(r'\bxiar\b', xiar, conf_file)
if self.spec.satisfies('@4'):
with open(conf_file, 'a') as f:
f.write("QMAKE_CXXFLAGS += -std=gnu++98\n")
@when('@4 %clang')
def patch(self):
(mkspec_dir, platform) = self.get_mkspec()
conf_file = os.path.join(mkspec_dir, platform, "qmake.conf")
with open(conf_file, 'a') as f:
f.write("QMAKE_CXXFLAGS += -std=gnu++98\n")
@property
def common_config_args(self):
# incomplete list is here http://doc.qt.io/qt-5/configure-options.html
config_args = [
'-prefix', self.prefix,
'-v',
'-opensource',
'-{0}opengl'.format('' if '+opengl' in self.spec else 'no-'),
'-{0}'.format('debug' if '+debug' in self.spec else 'release'),
'-confirm-license',
'-optimized-qmake',
'-no-pch',
]
if self.spec.variants['freetype'].value == 'spack':
config_args.extend([
'-system-freetype'
])
config_args.extend(
self.spec['freetype'].headers.include_flags.split()
)
if not MACOS_VERSION:
config_args.append('-fontconfig')
elif self.spec.variants['freetype'].value == 'qt':
config_args.append('-qt-freetype')
else:
config_args.append('-no-freetype')
if '+ssl' in self.spec:
openssl = self.spec['openssl']
config_args.extend([
'-openssl-linked',
openssl.libs.search_flags,
openssl.headers.include_flags,
])
else:
config_args.append('-no-openssl')
if '+sql' in self.spec:
sqlite = self.spec['sqlite']
config_args.extend([
'-system-sqlite',
'-R', sqlite.prefix.lib,
])
else:
comps = ['db2', 'ibase', 'oci', 'tds', 'mysql', 'odbc', 'psql',
'sqlite', 'sqlite2']
config_args.extend("-no-sql-" + component for component in comps)
if '+shared' in self.spec:
config_args.append('-shared')
else:
config_args.append('-static')
if self.spec.satisfies('@5:'):
pcre = self.spec['pcre'] if self.spec.satisfies('@5.0:5.8') \
else self.spec['pcre2']
harfbuzz = self.spec['harfbuzz']
config_args.extend([
'-system-harfbuzz',
harfbuzz.libs.search_flags,
harfbuzz.headers.include_flags,
'-system-pcre',
pcre.libs.search_flags,
pcre.headers.include_flags
])
if self.spec.satisfies('@5.7:'):
dc = self.spec['double-conversion']
config_args.extend([
'-system-doubleconversion',
dc.libs.search_flags,
dc.headers.include_flags
])
if '@:5.7.1' in self.spec:
config_args.append('-no-openvg')
else:
# FIXME: those could work for other versions
png = self.spec['libpng']
config_args.append('-system-libpng')
if not png.external:
config_args.extend([
png.libs.search_flags,
png.headers.include_flags
])
jpeg = self.spec['jpeg']
config_args.append('-system-libjpeg')
if not jpeg.external:
config_args.extend([
jpeg.libs.search_flags,
jpeg.headers.include_flags,
])
zlib = self.spec['zlib']
config_args.append('-system-zlib')
if not zlib.external:
config_args.extend([
zlib.libs.search_flags,
zlib.headers.include_flags
])
if '@:5.7.0' in self.spec:
config_args.extend([
# NIS is deprecated in more recent glibc,
# but qt-5.7.1 does not recognize this option
'-no-nis',
])
if '~examples' in self.spec:
config_args.extend(['-nomake', 'examples'])
if '~tools' in self.spec:
config_args.extend(['-nomake', 'tools'])
if '+dbus' in self.spec:
dbus = self.spec['dbus'].prefix
config_args.append('-dbus-linked')
config_args.append('-I%s/dbus-1.0/include' % dbus.lib)
config_args.append('-I%s/dbus-1.0' % dbus.include)
config_args.append('-L%s' % dbus.lib)
else:
config_args.append('-no-dbus')
if MACOS_VERSION:
config_args.append('-{0}framework'.format(
'' if '+framework' in self.spec else 'no-'))
(_, qtplat) = self.get_mkspec()
if qtplat is not None:
config_args.extend(['-platform', qtplat])
return config_args
@when('@3')
def configure(self, spec, prefix):
# A user reported that this was necessary to link Qt3 on ubuntu.
# However, if LD_LIBRARY_PATH is not set the qt build fails, check
# and set LD_LIBRARY_PATH if not set, update if it is set.
if os.environ.get('LD_LIBRARY_PATH'):
os.environ['LD_LIBRARY_PATH'] += os.pathsep + os.getcwd() + '/lib'
else:
os.environ['LD_LIBRARY_PATH'] = os.pathsep + os.getcwd() + '/lib'
configure('-prefix', prefix,
'-v',
'-thread',
'-shared',
'-release',
'-fast')
@when('@4')
def configure(self, spec, prefix):
config_args = self.common_config_args
config_args.extend([
'-fast',
'-no-declarative-debug',
'-{0}gtkstyle'.format('' if '+gtk' in spec else 'no-'),
'-{0}webkit'.format('' if '+webkit' in spec else 'no-'),
'-{0}phonon'.format('' if '+phonon' in spec else 'no-'),
'-arch', str(spec.target.family),
'-xmlpatterns',
])
# Disable phonon backend until gstreamer is setup as dependency
if '+phonon' in self.spec:
config_args.append('-no-phonon-backend')
if '~examples' in self.spec:
config_args.extend(['-nomake', 'demos'])
if MACOS_VERSION:
sdkpath = which('xcrun')('--show-sdk-path', output=str).strip()
config_args.extend([
'-cocoa',
'-sdk', sdkpath])
configure(*config_args)
@when('@5')
def configure(self, spec, prefix):
config_args = self.common_config_args
version = self.version
config_args.extend([
'-no-eglfs',
'-no-directfb',
'-{0}gtk{1}'.format(
'' if '+gtk' in spec else 'no-',
'' if version >= Version('5.7') else 'style')
])
if MACOS_VERSION:
config_args.extend([
'-no-xcb-xlib',
'-no-pulseaudio',
'-no-alsa',
])
if version < Version('5.12'):
config_args.append('-no-xinput2')
else:
# Linux-only QT5 dependencies
config_args.append('-system-xcb')
if '~webkit' in spec:
config_args.extend([
'-skip',
'webengine' if version >= Version('5.7') else 'qtwebkit',
])
if spec.satisfies('@5.7'):
config_args.extend(['-skip', 'virtualkeyboard'])
if version >= Version('5.8'):
# relies on a system installed wayland, i.e. no spack package yet
# https://wayland.freedesktop.org/ubuntu16.04.html
# https://wiki.qt.io/QtWayland
config_args.extend(['-skip', 'wayland'])
if version >= Version('5.10') and '~opengl' in spec:
config_args.extend([
'-skip', 'webglplugin',
'-skip', 'qt3d',
])
if version >= Version('5.14') and '~opengl' in spec:
config_args.extend([
'-skip', 'qtquick3d',
])
configure(*config_args)
def build(self, spec, prefix):
make()
def install(self, spec, prefix):
make("install")
--- qt-x11-free-3.3.8b/configure 2008-01-15 13:09:15.000000000 -0600
+++ qt-x11-free-3.3.8b-fixes/configure 2015-07-08 15:49:03.379560633 -0500
@@ -2339,7 +2339,7 @@
else
echo "Do you accept the terms of the $TheLicense? \c"
fi
- read acceptance
+ acceptance=yes
echo
if [ "$acceptance" = yes ]; then
break
@@ -2397,7 +2397,7 @@
else
echo "Do you accept the terms of $affix license? \c"
fi
- read acceptance
+ acceptance=yes
echo
if [ "$acceptance" = "yes" ]; then
break
@@ -2443,7 +2443,7 @@
else
echo "Do you accept the terms of the license? \c"
fi
- read acceptance
+ acceptance=yes
echo
if [ "$acceptance" = "yes" ]; then
break
@@ -2524,7 +2524,7 @@
else
echo "Do you accept the terms of the $Platform License? \c"
fi
- read acceptance
+ acceptance=yes
echo
if [ "$acceptance" = "yes" ]; then
break
--- a/src/tools/qmap.h 2008-01-16 06:09:13.000000000 +1100
+++ b/src/tools/qmap.h 2018-01-07 11:32:38.720893324 +1100
@@ -52,6 +52,7 @@
#ifndef QT_NO_STL
#include <iterator>
#include <map>
+#include <stddef.h>
#endif
//#define QT_CHECK_MAP_RANGE
--- a/src/tools/qvaluelist.h 2008-01-16 06:09:13.000000000 +1100
+++ b/src/tools/qvaluelist.h 2018-01-07 11:33:03.393206961 +1100
@@ -50,6 +50,7 @@
#ifndef QT_NO_STL
#include <iterator>
#include <list>
+#include <stddef.h>
#endif
//#define QT_CHECK_VALUELIST_RANGE
--- qt-x11-free-3.3.8b/src/tools/qvaluevector.h 2008-01-15 13:09:13.000000000 -0600
+++ qt-x11-free-3.3.8b-fixes/src/tools/qvaluevector.h 2015-07-08 15:47:34.758565247 -0500
@@ -47,6 +47,7 @@
#ifndef QT_NO_STL
#include <vector>
+#include <cstddef>
#endif
template <class T>
--- a/configure.orig 2018-09-18 07:02:33.866633000 +1000
+++ b/configure 2018-09-18 07:05:21.935194000 +1000
@@ -7708,7 +7708,7 @@
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
- 4*)
+ [4-8]*)
;;
3.4*)
canBuildQtXmlPatterns="no"
@@ -7729,7 +7729,7 @@
*-g++*)
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
- 5*|4*|3.4*)
+ [4-8]*|3.4*)
;;
3.3*)
canBuildWebKit="no"
From 97ec1d1882a83c23c91f0f7daea48e05858d8c32 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Mon, 28 Jan 2019 14:33:12 -0800
Subject: [PATCH] Fix build with GCC 8.3
Qualifiers in the asm statement are not allowed in the global scope. I
thought they were necessary for LTO, but I the commit to this file that
added them predates my work on setting up LTO for GCC.
Change-Id: Id98140e1c2f0426cabbefffd157e23e5ece67a49
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
**BACKPORTED** for use in QT4 by Omar Padron <omar.padron@kitware.com>
---
.../JavaScriptCore/jit/JITStubs.cpp | 48 +++++++++----------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
index 1abdf8b..9f60761 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp 2019-05-30 10:25:30.712979194 -0400
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp 2019-05-30 10:24:29.666340851 -0400
@@ -116,7 +116,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedEBX) == 0x3c, JITStackFrame_s
COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x50, JITStackFrame_code_offset_matches_ctiTrampoline);
-asm volatile (
+asm (
".text\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
@@ -138,7 +138,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -154,7 +154,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
@@ -179,7 +179,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedRBX) == 0x48, JITStackFrame_s
COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x90, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x80, JITStackFrame_code_offset_matches_ctiTrampoline);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
SYMBOL_STRING(ctiTrampoline) ":" "\n"
@@ -206,7 +206,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -222,7 +222,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
@@ -242,7 +242,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#error "JIT_STUB_ARGUMENT_VA_LIST not supported on ARMv7."
#endif
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
@@ -269,7 +269,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"bx lr" "\n"
);
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
@@ -287,7 +287,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"bx lr" "\n"
);
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
@@ -305,7 +305,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
SYMBOL_STRING(ctiTrampoline) ":" "\n"
@@ -323,7 +323,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"mov pc, lr" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -418,7 +418,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x38, JITStackFrame_
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x30, JITStackFrame_code_offset_matches_ctiTrampoline);
COMPILE_ASSERT(offsetof(struct JITStackFrame, savedEBX) == 0x1c, JITStackFrame_stub_argument_space_matches_ctiTrampoline);
-asm volatile (
+asm (
".text\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
@@ -440,7 +440,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -456,7 +456,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
@@ -480,7 +480,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x48, JITStackFrame_code_offset_matches_ctiTrampoline);
COMPILE_ASSERT(offsetof(struct JITStackFrame, savedRBX) == 0x78, JITStackFrame_stub_argument_space_matches_ctiTrampoline);
-asm volatile (
+asm (
".text\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
@@ -515,7 +515,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -531,7 +531,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
@@ -551,7 +551,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#error "JIT_STUB_ARGUMENT_VA_LIST not supported on ARMv7."
#endif
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
@@ -578,7 +578,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"bx lr" "\n"
);
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
@@ -596,7 +596,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"bx lr" "\n"
);
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
@@ -614,7 +614,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)
-asm volatile (
+asm (
".text\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
@@ -632,7 +632,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"mov pc, lr" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -1024,7 +1024,7 @@ static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalD
extern "C" { \
rtype JITStubThunked_##op(STUB_ARGS_DECLARATION); \
}; \
- asm volatile ( \
+ asm ( \
".text" "\n" \
".align 2" "\n" \
".globl " SYMBOL_STRING(cti_##op) "\n" \
@@ -1053,7 +1053,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, thunkReturnAddress) == THUNK_RETUR
extern "C" { \
rtype JITStubThunked_##op(STUB_ARGS_DECLARATION); \
}; \
- asm volatile ( \
+ asm ( \
".globl " SYMBOL_STRING(cti_##op) "\n" \
HIDE_SYMBOL(cti_##op) "\n" \
SYMBOL_STRING(cti_##op) ":" "\n" \
--- a/configure.orig 2018-09-18 07:02:33.866633000 +1000
+++ b/configure 2018-09-18 07:05:21.935194000 +1000
@@ -7708,7 +7708,7 @@
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
- 4*)
+ [4-8]*)
;;
3.4*)
canBuildQtXmlPatterns="no"
@@ -7729,7 +7729,7 @@
*-g++*)
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
- 4*|3.4*)
+ [4-8]*|3.4*)
;;
3.3*)
canBuildWebKit="no"
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)
diff -r -u a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm 2015-05-07 10:14:43.000000000 -0400
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm 2019-03-20 09:30:22.000000000 -0400
@@ -73,6 +73,9 @@
**
****************************************************************************/
+// Needed for macOS 10.13 (High Sierra)
+#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 1
+
#include <private/qcore_mac_p.h>
#include <qaction.h>
#include <qwidget.h>
diff -r -u a/src/gui/text/qfontengine_coretext.mm b/src/gui/text/qfontengine_coretext.mm
--- a/src/gui/text/qfontengine_coretext.mm 2015-05-07 10:14:43.000000000 -0400
+++ b/src/gui/text/qfontengine_coretext.mm 2019-03-20 09:30:22.000000000 -0400
@@ -886,7 +886,7 @@
QFixed QCoreTextFontEngine::emSquareSize() const
{
- return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
+ return QFixed(int(CTFontGetUnitsPerEm(ctfont)));
}
QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const
diff -r -u a/config.tests/unix/compile.test b/config.tests/unix/compile.test
--- a/config.tests/unix/compile.test 2015-05-07 10:14:42.000000000 -0400
+++ b/config.tests/unix/compile.test 2019-03-20 09:30:21.000000000 -0400
@@ -73,7 +73,7 @@
rm -f "$EXE" "${EXE}.exe"
echo "QT_BUILD_TREE = $OUTDIR" > "$OUTDIR/$TEST/.qmake.cache"
-"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release app_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CFLAGS*=$CXXFLAGS" "QMAKE_CFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_OBJECTIVE_CFLAGS*=$CXXFLAGS" "QMAKE_OBJECTIVE_CFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_OBJECTIVE_CXXFLAGS*=$CXXFLAGS" "QMAKE_OBJECTIVE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
if [ "$VERBOSE" = "yes" ]; then
$MAKE
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/configure qt-everywhere-opensource-src-4.8.7/configure
--- qt-everywhere-opensource-src-4.8.7.orig/configure 2019-04-04 15:44:58.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/configure 2019-04-04 16:50:38.000000000 -0400
@@ -3472,9 +3472,8 @@
# auto-detect support for -Xarch on the mac
if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
- CFG_MAC_XARCH=no
- else
- CFG_MAC_XARCH=yes
+ echo >&2 "error: -Xarch flag support is required to build on macOS."
+ exit 1
fi
fi
@@ -5013,8 +5012,8 @@
# Avoid overriding the default configuration settings when building with clang/libc++
;;
*)
- # For all other configurations require a minimum of 10.5
- echo "export MACOSX_DEPLOYMENT_TARGET = 10.5" >> "$mkfile"
+ # For all other configurations require a minimum of 10.13
+ echo "export MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@" >> "$mkfile"
;;
esac
@@ -5025,20 +5024,11 @@
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
- if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
- X86_CFLAGS="-arch i386"
- X86_LFLAGS="-arch i386"
- EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
- EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
- EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
- fi
- if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
- PPC_CFLAGS="-arch ppc"
- PPC_LFLAGS="-arch ppc"
- EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
- EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
- EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
- fi
+ ARCH_CFLAGS="-arch x86_64"
+ ARCH_LFLAGS="-arch x86_64"
+ EXTRA_CFLAGS="$ARCH_CFLAGS $EXTRA_CFLAGS"
+ EXTRA_CXXFLAGS="$ARCH_CFLAGS $EXTRA_CXXFLAGS"
+ EXTRA_LFLAGS="$EXTRA_LFLAGS $ARCH_LFLAGS"
if [ '!' -z "$CFG_SDK" ]; then
echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
@@ -7224,19 +7214,7 @@
# set the global Mac deployment target. This is overridden on an arch-by-arch basis
# in some cases, see code further down
-case "$PLATFORM,$CFG_MAC_COCOA" in
-*macx-clang-libc++,yes)
- # Avoid overriding the default configuration setting when building with clang/libc++
- ;;
-macx*,yes)
- # Cocoa
- QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
- ;;
-macx*,no)
- # gcc, Carbon
- QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
- ;;
-esac
+QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET @MACOSX_DEPLOYMENT_TARGET@
# disable Qt 3 support on VxWorks, Symbian and INTEGRITY
case "$XPLATFORM" in
@@ -7515,7 +7493,6 @@
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
fi
-
if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
#On Mac we implicitly link against libz, so we
#never use the 3rdparty stuff.
@@ -7975,39 +7952,19 @@
QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
fi
-# On Mac, set the minimum deployment target for the different architechtures
-# using the Xarch compiler option when supported (10.5 and up). On 10.4 the
-# deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
-# env. variable.
+# On Mac, set the minimum deployment target for the different architectures
if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ]; then
case "$PLATFORM" in
*macx-clang-libc++)
# Avoid overriding the default settings when building clang/libc++.
;;
*)
- if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
- QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
- fi
- if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
- QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
- fi
if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
- QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
- fi
- if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
- QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
+ QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
+ QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
+ QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
+ QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
+ QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
fi
;;
esac
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/clang.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/clang.conf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/clang.conf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/clang.conf 2019-04-04 15:59:33.000000000 -0400
@@ -2,8 +2,8 @@
# Qmake configuration for Clang on Linux and Mac
#
-QMAKE_CC = clang
-QMAKE_CXX = clang++
+QMAKE_CC = cc
+QMAKE_CXX = c++
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/g++-base.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/g++-base.conf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/g++-base.conf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/g++-base.conf 2019-04-04 15:59:15.000000000 -0400
@@ -8,14 +8,14 @@
# you can use the manual test in tests/manual/mkspecs.
#
-QMAKE_CC = gcc
+QMAKE_CC = cc
QMAKE_LINK_C = $$QMAKE_CC
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g
-QMAKE_CXX = g++
+QMAKE_CXX = c++
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/gcc-base-macx.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/gcc-base-macx.conf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/gcc-base-macx.conf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/gcc-base-macx.conf 2019-04-04 15:47:55.000000000 -0400
@@ -29,12 +29,21 @@
QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_OBJECTIVE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS
+QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS
QMAKE_OBJECTIVE_CFLAGS_X86 = $$QMAKE_CFLAGS_X86
QMAKE_OBJECTIVE_CFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64
QMAKE_OBJECTIVE_CFLAGS_PPC = $$QMAKE_CFLAGS_PPC
QMAKE_OBJECTIVE_CFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64
+QMAKE_OBJECTIVE_CXXFLAGS = $$QMAKE_CXXFLAGS
+QMAKE_OBJECTIVE_CXXFLAGS_WARN_ON = $$QMAKE_CXXFLAGS_WARN_ON
+QMAKE_OBJECTIVE_CXXFLAGS_WARN_OFF = $$QMAKE_CXXFLAGS_WARN_OFF
+QMAKE_OBJECTIVE_CXXFLAGS_DEBUG = $$QMAKE_CXXFLAGS_DEBUG
+QMAKE_OBJECTIVE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE
+QMAKE_OBJECTIVE_CXXFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS
+QMAKE_OBJECTIVE_CXXFLAGS_X86 = $$QMAKE_CXXFLAGS_X86
+QMAKE_OBJECTIVE_CXXFLAGS_X86_64 = $$QMAKE_CXXFLAGS_X86_64
+
QMAKE_LFLAGS_X86 += $$QMAKE_CFLAGS_X86
QMAKE_LFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64
QMAKE_LFLAGS_PPC += $$QMAKE_CFLAGS_PPC
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/gcc-base.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/gcc-base.conf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/gcc-base.conf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/gcc-base.conf 2019-04-04 16:00:32.000000000 -0400
@@ -42,7 +42,7 @@
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS += -std=gnu++98 $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/mac.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/mac.conf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/mac.conf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/mac.conf 2019-04-04 15:50:20.000000000 -0400
@@ -9,15 +9,14 @@
QMAKE_LIBDIR =
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
-QMAKE_INCDIR_OPENGL = /System/Library/Frameworks/OpenGL.framework/Headers \
- /System/Library/Frameworks/AGL.framework/Headers/
+QMAKE_INCDIR_OPENGL = @OPENGL_INCDIR@
QMAKE_FIX_RPATH = install_name_tool -id
QMAKE_LFLAGS_RPATH =
QMAKE_LIBS_DYNLOAD =
-QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
+QMAKE_LIBS_OPENGL = @OPENGL_LIBS@
QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL
QMAKE_LIBS_THREAD =
@@ -38,7 +37,6 @@
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = test -d
QMAKE_MKDIR = mkdir -p
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 # overridden to 10.5 for Cocoa on the compiler command line
-
+QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@
include(unix.conf)
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/debug.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/debug.prf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/debug.prf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/debug.prf 2019-04-04 15:47:55.000000000 -0400
@@ -3,6 +3,7 @@
QMAKE_CFLAGS += $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_DEBUG
+QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_DEBUG
QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG
!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(debug, release)
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/default_post.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/default_post.prf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/default_post.prf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/default_post.prf 2019-04-04 15:47:55.000000000 -0400
@@ -1,5 +1,5 @@
load(default_post)
-!no_objective_c:CONFIG += objective_c
+!no_objective_c:CONFIG += split_sources objective_c objective_cxx
# Pick a suitable default architecture for qmake-based applications.
# If the Qt package contains one of x86 and x86_64, pick that one. If it
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/objective_c.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/objective_c.prf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/objective_c.prf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/objective_c.prf 2019-04-04 15:47:55.000000000 -0400
@@ -1,23 +1,18 @@
-
-for(source, SOURCES) {
- contains(source,.*\\.mm?$) {
- warning(Objective-C source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES)
- SOURCES -= $$source
- OBJECTIVE_SOURCES += $$source
- }
-}
+# Add compiler directives for Objective C (.m) only
+#
+# OBJECTIVE_C_SOURCES has already been set in "split_sources"
isEmpty(QMAKE_OBJECTIVE_CC):QMAKE_OBJECTIVE_CC = $$QMAKE_CC
OBJECTIVE_C_OBJECTS_DIR = $$OBJECTS_DIR
isEmpty(OBJECTIVE_C_OBJECTS_DIR):OBJECTIVE_C_OBJECTS_DIR = .
-isEmpty(QMAKE_EXT_OBJECTIVE_C):QMAKE_EXT_OBJECTIVE_C = .mm .m
+isEmpty(QMAKE_EXT_OBJECTIVE_C):QMAKE_EXT_OBJECTIVE_C = .m
objective_c.dependency_type = TYPE_C
objective_c.variables = QMAKE_OBJECTIVE_CFLAGS
-objective_c.commands = $$QMAKE_OBJECTIVE_CC -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+objective_c.commands = $$QMAKE_OBJECTIVE_CC -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
objective_c.output = $$OBJECTIVE_C_OBJECTS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
-objective_c.input = OBJECTIVE_SOURCES
+objective_c.input = OBJECTIVE_C_SOURCES
objective_c.name = Compile ${QMAKE_FILE_IN}
silent:objective_c.commands = @echo objective-c ${QMAKE_FILE_IN} && $$objective_c.commands
QMAKE_EXTRA_COMPILERS += objective_c
diff -N -r -u qt-orig/mkspecs/features/mac/objective_cxx.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/objective_cxx.prf
--- qt-orig/mkspecs/features/mac/objective_cxx.prf 1969-12-31 19:00:00.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/objective_cxx.prf 2019-03-29 09:52:51.000000000 -0400
@@ -0,0 +1,18 @@
+# Add compiler directives for Objective C (.mm) only
+#
+# OBJECTIVE_CXX_SOURCES has already been set in "split_sources"
+
+isEmpty(QMAKE_OBJECTIVE_CXX):QMAKE_OBJECTIVE_CXX = $$QMAKE_CC
+
+OBJECTIVE_CXX_OBJECTS_DIR = $$OBJECTS_DIR
+isEmpty(OBJECTIVE_CXX_OBJECTS_DIR):OBJECTIVE_CXX_OBJECTS_DIR = .
+isEmpty(QMAKE_EXT_OBJECTIVE_CXX):QMAKE_EXT_OBJECTIVE_CXX = .mm
+
+objective_cxx.dependency_type = TYPE_C
+objective_cxx.variables = QMAKE_OBJECTIVE_CXXFLAGS
+objective_cxx.commands = $$QMAKE_OBJECTIVE_CXX -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CXXFLAGS) $(DEFINES) $(INCPATH) -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+objective_cxx.output = $$OBJECTIVE_CXX_OBJECTS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
+objective_cxx.input = OBJECTIVE_CXX_SOURCES
+objective_cxx.name = Compile ${QMAKE_FILE_IN}
+silent:objective_cxx.commands = @echo objective-cxx ${QMAKE_FILE_IN} && $$objective_cxx.commands
+QMAKE_EXTRA_COMPILERS += objective_cxx
diff -N -r -u qt-orig/mkspecs/features/mac/split_sources.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/split_sources.prf
--- qt-orig/mkspecs/features/mac/split_sources.prf 1969-12-31 19:00:00.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/split_sources.prf 2019-03-29 09:52:51.000000000 -0400
@@ -0,0 +1,52 @@
+# move Objective C and C++ files from SOURCES to OBJECTIVE_SOURCES
+
+for(source, SOURCES) {
+ contains(source,.*\\.m$) {
+ warning(Objective-C source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES)
+ SOURCES -= $$source
+ OBJECTIVE_SOURCES += $$source
+ } else {
+ contains(source,.*\\.mm$) {
+ warning(Objective-C++ source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES)
+ SOURCES -= $$source
+ OBJECTIVE_SOURCES += $$source
+ }
+ }
+}
+
+# move C and C++ files from OBJECTIVE_SOURCES to SOURCES
+
+for(source, OBJECTIVE_SOURCES) {
+ contains(source,.*\\.c$) {
+ warning(C source \'$$source\' found in SOURCES but should be in SOURCES)
+ OBJECTIVE_SOURCES -= $$source
+ SOURCES += $$source
+ } else {
+ contains(source,.*\\.cc$) {
+ warning(C++ source \'$$source\' found in SOURCES but should be in SOURCES)
+ OBJECTIVE_SOURCES -= $$source
+ SOURCES += $$source
+ } else {
+ contains(source,.*\\.cpp$) {
+ warning(C++ source \'$$source\' found in SOURCES but should be in SOURCES)
+ OBJECTIVE_SOURCES -= $$source
+ SOURCES += $$source
+ }
+ }
+ }
+}
+
+# split Objective C and C++ sources into their own variables
+
+for(source, OBJECTIVE_SOURCES) {
+ contains(source,.*\\.mm$) {
+ OBJECTIVE_CXX_SOURCES += $$source
+ } else {
+ contains(source,.*\\.m$) {
+ OBJECTIVE_C_SOURCES += $$source
+ } else {
+ warning(Source \'$$source\' was found in OBJECTIVE_SOURCES but its file extension is not a typical objective C (\'.m\') or C++ (\'.mm\') extension; assuming Objective C.)
+ OBJECTIVE_C_SOURCES += $$source
+ }
+ }
+}
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/sdk.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/sdk.prf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/sdk.prf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/sdk.prf 2019-04-04 15:47:55.000000000 -0400
@@ -2,6 +2,7 @@
!macx-xcode:!macx-pbuilder {
QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK
QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_MAC_SDK
+ QMAKE_OBJECTIVE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK
QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK
QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK
}
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/x86.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/x86.prf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/x86.prf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/x86.prf 2019-04-04 15:47:55.000000000 -0400
@@ -2,6 +2,7 @@
} else {
QMAKE_CFLAGS += $$QMAKE_CFLAGS_X86
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_X86
+ QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_X86
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_X86
QMAKE_LFLAGS += $$QMAKE_LFLAGS_X86
}
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/x86_64.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/x86_64.prf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/mac/x86_64.prf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/mac/x86_64.prf 2019-04-04 15:47:55.000000000 -0400
@@ -2,6 +2,7 @@
} else {
QMAKE_CFLAGS += $$QMAKE_CFLAGS_X86_64
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_X86_64
+ QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_X86_64
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_X86_64
QMAKE_LFLAGS += $$QMAKE_LFLAGS_X86_64
}
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/release.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/release.prf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/release.prf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/release.prf 2019-04-04 15:47:55.000000000 -0400
@@ -2,6 +2,7 @@
QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_RELEASE
+QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_RELEASE
QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
-!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(release, debug)
\ No newline at end of file
+!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(release, debug)
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/unix/hide_symbols.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/unix/hide_symbols.prf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/unix/hide_symbols.prf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/unix/hide_symbols.prf 2019-04-04 15:47:55.000000000 -0400
@@ -1,4 +1,5 @@
QMAKE_CFLAGS += $$QMAKE_CFLAGS_HIDESYMS
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_HIDESYMS
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_HIDESYMS
+QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_HIDESYMS
QMAKE_LFLAGS += $$QMAKE_LFLAGS_HIDESYMS
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/warn_off.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/warn_off.prf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/warn_off.prf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/warn_off.prf 2019-04-04 15:47:55.000000000 -0400
@@ -1,4 +1,5 @@
CONFIG -= warn_on
QMAKE_CFLAGS += $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_WARN_OFF
-QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_OFF
\ No newline at end of file
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_OFF
+QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_WARN_OFF
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/warn_on.prf qt-everywhere-opensource-src-4.8.7/mkspecs/features/warn_on.prf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/features/warn_on.prf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/features/warn_on.prf 2019-04-04 15:47:55.000000000 -0400
@@ -2,4 +2,4 @@
QMAKE_CFLAGS += $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_WARN_ON
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_ON
-
+QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_WARN_ON
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/unsupported/macx-clang/qmake.conf qt-everywhere-opensource-src-4.8.7/mkspecs/unsupported/macx-clang/qmake.conf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/unsupported/macx-clang/qmake.conf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/unsupported/macx-clang/qmake.conf 2019-04-04 16:10:40.000000000 -0400
@@ -13,6 +13,13 @@
include(../../common/gcc-base-macx.conf)
include(../../common/clang.conf)
+QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@
+
+QMAKE_CFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
+QMAKE_CXXFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
+QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
+QMAKE_LFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
+
QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/mkspecs/unsupported/macx-clang-libc++/qmake.conf qt-everywhere-opensource-src-4.8.7/mkspecs/unsupported/macx-clang-libc++/qmake.conf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/unsupported/macx-clang-libc++/qmake.conf 2015-05-07 10:14:42.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/unsupported/macx-clang-libc++/qmake.conf 2019-04-04 16:10:36.000000000 -0400
@@ -13,10 +13,11 @@
include(../../common/gcc-base-macx.conf)
include(../../common/clang.conf)
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 # Libc++ is available from 10.7 onwards
+QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@
QMAKE_CFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
QMAKE_CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
+QMAKE_OBJECTIVE_CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
QMAKE_LFLAGS += -stdlib=libc++ -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/qmake/qmake.pri qt-everywhere-opensource-src-4.8.7/qmake/qmake.pri
--- qt-everywhere-opensource-src-4.8.7.orig/qmake/qmake.pri 2019-04-04 15:46:06.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/qmake/qmake.pri 2019-04-04 15:47:55.000000000 -0400
@@ -135,7 +135,7 @@
SOURCES += qfilesystemengine_unix.cpp qfilesystemiterator_unix.cpp qfsfileengine_unix.cpp
mac {
SOURCES += qcore_mac.cpp qsettings_mac.cpp
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported)
+ QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@
LIBS += -framework ApplicationServices
}
} else:win32 {
diff -r -u qt-everywhere-opensource-src-4.8.7.orig/src/tools/bootstrap/bootstrap.pro qt-everywhere-opensource-src-4.8.7/src/tools/bootstrap/bootstrap.pro
--- qt-everywhere-opensource-src-4.8.7.orig/src/tools/bootstrap/bootstrap.pro 2019-04-04 16:54:09.000000000 -0400
+++ qt-everywhere-opensource-src-4.8.7/src/tools/bootstrap/bootstrap.pro 2019-04-04 16:54:16.000000000 -0400
@@ -103,7 +103,7 @@
else:win32:SOURCES += ../../corelib/tools/qlocale_win.cpp
macx: {
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported)
+ QMAKE_MACOSX_DEPLOYMENT_TARGET = @QMAKE_MACOSX_DEPLOYMENT_TARGET@
SOURCES += ../../corelib/kernel/qcore_mac.cpp
LIBS += -framework CoreServices -framework ApplicationServices
}
diff -r -u a/tools/macdeployqt/shared/shared.cpp b/tools/macdeployqt/shared/shared.cpp
--- a/tools/macdeployqt/shared/shared.cpp 2015-05-07 10:14:40.000000000 -0400
+++ b/tools/macdeployqt/shared/shared.cpp 2019-03-20 09:30:21.000000000 -0400
@@ -141,7 +141,7 @@
state = DylibName;
continue;
} else if (part < parts.count() && parts.at(part).endsWith(".framework")) {
- info.installName += "/" + (qtPath + "lib/").simplified();
+ info.installName += "/" + (qtPath + "Frameworks/").simplified();
info.frameworkDirectory = info.installName;
state = FrameworkName;
continue;
diff -r -u a/tools/qtconfig/main.cpp b/tools/qtconfig/main.cpp
--- a/tools/qtconfig/main.cpp 2015-05-07 10:14:41.000000000 -0400
+++ b/tools/qtconfig/main.cpp 2019-03-20 09:30:22.000000000 -0400
@@ -51,6 +51,13 @@
{
Q_INIT_RESOURCE(qtconfig);
+ const QByteArray graphicsSystem = qgetenv("QT_GRAPHICSSYSTEM");
+ if (graphicsSystem.isNull() || graphicsSystem.isEmpty()) {
+ // force native graphics mode unless the user set one via QT_GRAPHICSSYSTEM.
+ // We have to use QT_GRAPHICSSYSTEM because that will override any previous
+ // settings stored in our own settings store.
+ qputenv("QT_GRAPHICSSYSTEM", "Native");
+ }
QApplication app(argc, argv);
QTranslator translator;
diff -r -u a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp
--- a/tools/qtconfig/mainwindow.cpp 2015-05-07 10:14:41.000000000 -0400
+++ b/tools/qtconfig/mainwindow.cpp 2019-03-20 09:30:22.000000000 -0400
@@ -227,6 +227,7 @@
connect(ui->rtlExtensionsCheckBox, SIGNAL(toggled(bool)), SLOT(somethingModified()));
connect(ui->inputStyleCombo, SIGNAL(activated(int)), SLOT(somethingModified()));
connect(ui->inputMethodCombo, SIGNAL(activated(int)), SLOT(somethingModified()));
+ connect(ui->graphicsSystemCombo, SIGNAL(activated(int)), SLOT(somethingModified()));
connect(ui->guiStyleCombo, SIGNAL(activated(QString)), SLOT(styleSelected(QString)));
connect(ui->familySubstitutionCombo, SIGNAL(activated(QString)), SLOT(substituteSelected(QString)));
connect(ui->tunePaletteButton, SIGNAL(clicked()), SLOT(tunePalette()));
@@ -416,7 +417,26 @@
ui->inputMethodCombo->hide();
ui->inputMethodLabel->hide();
#endif
-
+#ifdef Q_OS_MAC
+ ui->graphicsSystemCombo->setToolTip(tr("Select the graphicsssystem to be used by default.\n"
+ "Native: use native CoreGraphics rendering\n"
+ "Raster: use raster graphics\n"
+ "OpenGL: use OpenGL (experimental!)\n"
+ "Raster mode is the preferred default except on Mac OS 10.14 and newer where it causes flickering.\n"
+ "Use Native rendering on those newer OS versions (or if you experience other graphics glitches).\n"
+ "Note that Raster mode is not compatible with certain built-in widget styles like CDE or Plastique."));
+ QStringList graphicsSystems;
+ QString defaultGraphicsSystem = settings.value(QLatin1String("DefaultGraphicsSystem"), QLatin1String("(unset)")).toString();
+
+ graphicsSystems << "(unset)" << "Native" << "Raster" << "OpenGL";
+ ui->graphicsSystemCombo->addItems(graphicsSystems);
+ if (!defaultGraphicsSystem.isNull() && !defaultGraphicsSystem.isEmpty()) {
+ ui->graphicsSystemCombo->setCurrentIndex(graphicsSystems.indexOf(QRegExp(defaultGraphicsSystem, Qt::CaseInsensitive)));
+ }
+#else
+ ui->graphicsSystemLabel->hide();
+ ui->graphicsSystemCombo->hide();
+#endif
ui->fontEmbeddingCheckBox->setChecked(settings.value(QLatin1String("embedFonts"), true)
.toBool());
fontpaths = settings.value(QLatin1String("fontPath")).toStringList();
@@ -573,6 +593,13 @@
#if defined(Q_WS_X11) && !defined(QT_NO_XIM)
settings.setValue(QLatin1String("DefaultInputMethod"), ui->inputMethodCombo->currentText());
#endif
+#ifdef Q_OS_MAC
+ if (ui->graphicsSystemCombo->currentIndex() > 0) {
+ settings.setValue(QLatin1String("DefaultGraphicsSystem"), ui->graphicsSystemCombo->currentText());
+ } else {
+ settings.remove(QLatin1String("DefaultGraphicsSystem"));
+ }
+#endif
QString audioSink = settings.value(QLatin1String("audiosink"), QLatin1String("Auto")).toString();
QString videoMode = settings.value(QLatin1String("videomode"), QLatin1String("Auto")).toString();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment