Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.12 #110

Merged
merged 147 commits into from
Aug 8, 2019
Merged

v5.12 #110

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
5b2d79e
Add cross-compilation support
mingwandroid Aug 25, 2017
b6b6c02
Generalized pinning
mingwandroid Aug 25, 2017
1593a1e
Generalized pinning
mingwandroid Aug 26, 2017
33bf58b
Generalize logging
mingwandroid Aug 27, 2017
9e30528
cdts are linux-only
mingwandroid Aug 28, 2017
27791d0
Fix missing selector
mingwandroid Aug 31, 2017
6b1e061
Darwin cross WIP
mingwandroid Aug 31, 2017
0198f73
Go back to -system-freetype, add back jpeg dep
mingwandroid Aug 31, 2017
ec37b25
Cannot use system-freetype due to PlatformSupport library not caring
mingwandroid Aug 31, 2017
8deca0f
More patches, clang 4 compat. this time
mingwandroid Aug 31, 2017
7163957
Qt now builds
mingwandroid Sep 1, 2017
50b9c75
Put back the awful .app renaming and qt.conf stuff
mingwandroid Sep 1, 2017
6cc9c82
Argh, missed a #
mingwandroid Sep 1, 2017
fe0ad31
Use our compilers during configure and test
mingwandroid Sep 4, 2017
ac940fc
.. and add to PATH so our compiler gets found during test
mingwandroid Sep 4, 2017
461888a
Remove pkg-config hack (we do it in pkg-config itself), exit if no ru…
mingwandroid Sep 4, 2017
96fb724
Add ruby build dep
mingwandroid Sep 4, 2017
33601bc
Workaround Qt's terrible mishandling of -isystem
mingwandroid Sep 5, 2017
03f6bfa
Simplify recipe for CB 3
nehaljwani Sep 11, 2017
cbccd53
Switch to regex matching
nehaljwani Sep 19, 2017
c89355f
Bump build number for macOS
nehaljwani Sep 19, 2017
5055807
Undo some conda-forge changes
mingwandroid Sep 20, 2017
9e4d67c
Undo conda-forge badness
mingwandroid Sep 20, 2017
8979194
Fix PATH
mingwandroid Sep 20, 2017
f04df7e
Bump build to sync it with released tarball (on macOS)
mingwandroid Oct 13, 2017
47a79de
Add files needed for test
mingwandroid Oct 16, 2017
2065851
Add exact upstream patch for copy paste bug in qtwebkit
mingwandroid Feb 12, 2018
c460bc5
Fix new qtwebkit copy paste patch so it applies
mingwandroid Feb 12, 2018
c88dedc
We need to merge_build_host
mingwandroid Feb 12, 2018
d83d54a
Add -disable-new-dtags configure option and use it
mingwandroid Feb 12, 2018
264d8f1
Add missing requirements/run
mingwandroid Feb 12, 2018
8b2efcb
Ignore g++/gcc symlinks already existing (for --dirty / --keep-old-work)
mingwandroid Feb 12, 2018
83242d2
Remove conda inspect rubbish
mingwandroid Feb 12, 2018
c5b2bf3
Oops, missed a bit
mingwandroid Feb 12, 2018
fcafbde
(WIP) Update to 3.6.3
mingwandroid Oct 16, 2017
0e41d43
Rewrite 0001-qtwebengine-mac_sdk_min-to-10.9.patch
mingwandroid Oct 16, 2017
846170e
(WIP) Update to 5.6.3
mingwandroid Oct 16, 2017
ea549da
Add exact upstream patch for copy paste bug in qtwebkit
mingwandroid Feb 12, 2018
da65768
Remove patches not needed in qt 5.9.4 and add macOS 10.9 support
mingwandroid Feb 14, 2018
412a6d1
More macOS 10.9 support
mingwandroid Feb 19, 2018
eae446e
Undo macOS 10.9 support, 10.10 is the new minimum
mingwandroid Feb 28, 2018
2582ccb
Force use of /opt/MacOSX10.11.sdk and other fixes
mingwandroid Mar 1, 2018
affb3fd
Add missing_dso_whitetlist for macOS
mingwandroid Mar 1, 2018
045a27f
Add back 0013-NSEnumerator-is-a-non-parameterized-class.patch
mingwandroid Mar 1, 2018
092d34a
Fix typo
mingwandroid Mar 1, 2018
d62c38b
Fix the qdevice.pri sed
mingwandroid Mar 1, 2018
0a18a8b
skip when not vc 14 on Windows
mingwandroid Mar 1, 2018
af4a914
drop unneeded jinja2
mingwandroid Mar 1, 2018
6f748bb
A linux fix for old-ish kernel headers
mingwandroid Mar 1, 2018
43bcdf7
Add WebEngine unix deps
mingwandroid Mar 1, 2018
bff053a
Skip using our libs for now, add info re debugging lack of -I$PREFIX/…
mingwandroid Mar 2, 2018
161aa12
Add old 5.6 disable-new-dtags patch back (needs to be reworked)
mingwandroid Mar 2, 2018
96d904c
Some qtwebengine fixes for linux
mingwandroid Mar 3, 2018
5d277df
More linux work
mingwandroid Mar 3, 2018
3ab7c5c
More Linux fixes
mingwandroid Mar 5, 2018
ed7effb
Test for Qt5WebEngine shared lib on all platforms
mingwandroid Mar 5, 2018
206c487
Start Windows 5.9.4 support
mingwandroid Mar 6, 2018
b7d97d7
Add some fallbacks for xcrun and xcodebuild
mingwandroid Mar 6, 2018
71b1cb5
Windows fixes
mingwandroid Mar 6, 2018
a027cb4
Include xc-avoidance scripts in PREFIX/bin
mingwandroid Mar 6, 2018
b405b11
More Windows fixes
mingwandroid Mar 6, 2018
0209af2
Some more Windows fixes, install Python 2.7 in build, remove the hack…
mingwandroid Mar 7, 2018
4b6efb4
Minor cleanup
mingwandroid Mar 7, 2018
cfc494b
Must merge build and host on Linux due to webengine fun
mingwandroid Mar 9, 2018
a0332cb
Stop skipping any components except wayland
mingwandroid Mar 10, 2018
eb09816
Add run_exports and CoreLocation.framework
mingwandroid Mar 12, 2018
d395e91
Add -ltcg and -reduce-relocations
mingwandroid Mar 13, 2018
f437e08
Optimize for size and improve the flags used for that
mingwandroid Mar 14, 2018
8e1de96
Add placeholder patch for experimenting with -optimize-size on Linux …
mingwandroid Mar 15, 2018
994f88b
No new dtags please
mingwandroid Mar 20, 2018
a3a773c
qtscript: REFERENCED_FROM_ASM for non-GCC compilers
mingwandroid Mar 20, 2018
7c8da1f
Workaround lack of qmake.exe or mkspecs on Windows
mingwandroid Mar 21, 2018
874a9d3
Windows workaround for lack of QMAKE_SPEC/QMAKE_XSPEC
mingwandroid Mar 23, 2018
60ccb57
Add dbus for macOS
mingwandroid Mar 24, 2018
552c449
Add vc feature back
mingwandroid Apr 3, 2018
5cb652a
Update to 5.9.5, use the published md5 sums and include opengl32sw.dl…
mingwandroid Apr 12, 2018
32dd49e
Fix for Windows
mingwandroid Apr 13, 2018
ea1c9d2
We cannot use Python 3 in-build and do not have vc2008 libarchive so …
mingwandroid Apr 13, 2018
4d4aa0a
Actually remove libarchive
mingwandroid Apr 13, 2018
a02b757
We now have a working libarchive for VC9 so can unpack 7zs
mingwandroid Apr 25, 2018
4ae7ec2
Bump build number to build against new deps
mingwandroid May 29, 2018
63f9cf7
Remove the OpenGL dlls
mingwandroid May 29, 2018
676379b
Qt needs a C compiler
mingwandroid Jun 1, 2018
152a0b2
Update to 5.9.6
mingwandroid Jun 11, 2018
5bcfeab
Get rid of the absolutely awful macOS pre/post link scripts
mingwandroid Jun 11, 2018
3b7f79d
Windows fixes
mingwandroid Jun 26, 2018
1bfc646
Bump Qt version for rebuild against new deps
mingwandroid Jul 22, 2018
91846ce
Fix https://github.com/spyder-ide/spyder/issues/7693 (hopefully)
mingwandroid Aug 16, 2018
103ecf9
Use QtCharts in the test
mingwandroid Aug 16, 2018
1c3de8f
Add CDT packages now we use GUI stuff in test
mingwandroid Aug 24, 2018
d754e96
Rebased patches to 5.11.1
mingwandroid Aug 27, 2018
fe201f6
Our pkg-config wrapper needs bash
mingwandroid Aug 27, 2018
bad4e80
WIP attempted fix for missing -lxcb-shm on Linux
mingwandroid Aug 29, 2018
596ed02
(WIP) update to 5.11.2
mingwandroid Sep 21, 2018
1d82235
5.11 updates (probably want to sync recipe with 5.9 someday)
mingwandroid Oct 25, 2018
952347c
First go at fixing some winrt issue
mingwandroid Aug 24, 2018
62ce7ea
Force vs2017
mingwandroid Aug 28, 2018
b77abb3
Fix patch
mingwandroid Aug 28, 2018
fe86687
Fix win-32 build (https://codereview.qt-project.org/#/c/236948/)
mingwandroid Aug 28, 2018
580023a
Fix patch
mingwandroid Aug 28, 2018
68cd80f
Add webengine tests and Windows tests
mingwandroid Aug 30, 2018
0a7a3fd
Missed a bit
mingwandroid Aug 30, 2018
1a34e5d
Fix tests
mingwandroid Aug 30, 2018
1de57ca
Add missing ninja dependency
mingwandroid Sep 2, 2018
673fa98
Add missing file
mingwandroid Sep 3, 2018
f765837
Fix tests
mingwandroid Sep 3, 2018
bd123a8
Fix build on ubuntu, add cups (WIP, broken)
mingwandroid Sep 24, 2018
be0f996
Sync some changes from qt 5.9.x .. cups probably works now
mingwandroid Nov 17, 2018
7e905f5
Update to Qt 5.12.0
mingwandroid Dec 10, 2018
455b2c7
Use macOS 10.12 SDK (may need 10.13?)
mingwandroid Dec 10, 2018
75ed6ae
Lets pretend we are macOS 10.12
mingwandroid Dec 11, 2018
19d6c3b
Some updates
mingwandroid Jan 29, 2019
686b4f9
(WIP) 0009 qtwebengine - Add conda_prefix for 'system' zlib
mingwandroid Jan 30, 2019
f2f998d
webengine 'system' zlib linking fixed (where system == conda package)
mingwandroid Jan 31, 2019
608c41a
webengine 'system' xcb linking fixed (where system == conda package)
mingwandroid Jan 31, 2019
58b7e37
Some fixes for qtwebengine/conda_prefix
mingwandroid Jan 31, 2019
65be43a
WIP updates
mingwandroid Feb 3, 2019
c221223
Update to 5.12.1, remove qtlibinfix on macOS
mingwandroid Feb 4, 2019
2502c78
macOS fixes mostly
mingwandroid Feb 7, 2019
d25e0c1
WIP debugging and stuff for linux
mingwandroid Feb 11, 2019
6b22ae1
Add missing patches
mingwandroid Mar 29, 2019
5cfb325
Whitelist CoreLocation.framework better
mingwandroid May 9, 2019
fa64025
Move llvm deps (qdoc deps) from build to host, not sure why
mingwandroid Jun 3, 2019
d93de4b
Organize patches
isuruf Jul 24, 2019
ffff8ab
Add fixes for cos6
isuruf Jul 24, 2019
0173a57
fix have_sendmmsg
isuruf Jul 24, 2019
e536a3e
Add nss to runtime and merge_build_host
isuruf Jul 25, 2019
f855378
Merge branch 'master' of github.com:conda-forge/qt-feedstock into mas…
isuruf Jul 25, 2019
0d40921
Pin nspr
isuruf Jul 25, 2019
869ab74
Make linter happy
isuruf Jul 25, 2019
34d9e67
nss and nspr only for unix
isuruf Jul 25, 2019
f1458ba
Fix osx check
isuruf Jul 25, 2019
b5ea80d
Reduce diff
isuruf Jul 25, 2019
b24247c
Remove -U release
isuruf Jul 25, 2019
dac1988
Add libclang
isuruf Jul 26, 2019
1dfdd61
Update bld.bat
isuruf Jul 26, 2019
55ddbae
Fix makefile location
isuruf Jul 27, 2019
2ee5e23
debug
isuruf Jul 27, 2019
bc9054d
debug 2
isuruf Jul 27, 2019
e00179f
Install only libclang
isuruf Aug 6, 2019
b907168
Update bld.bat
isuruf Aug 7, 2019
be3e45f
Remove debug stuff
isuruf Aug 7, 2019
5cc18db
Remove gyp stuff as gn is used now
isuruf Aug 7, 2019
48c28a2
Why is LIBRARY_BIN not in PATH ??
isuruf Aug 7, 2019
d6c25b8
Revert "Why is LIBRARY_BIN not in PATH ??"
isuruf Aug 7, 2019
dd0a08e
Add llvmdev and clangdev back in
isuruf Aug 7, 2019
c968d2a
Use C: for more space
isuruf Aug 7, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
win_cxx_compilervs2015vc14:
CONFIG: win_cxx_compilervs2015vc14
CONDA_BLD_PATH: D:\\bld\\
CONDA_BLD_PATH: C:\\bld\\
UPLOAD_PACKAGES: True
steps:
# TODO: Fast finish on azure pipelines?
Expand Down
19 changes: 3 additions & 16 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,7 @@ if not exist %LIBRARY_BIN%\opengl32sw.dll exit /b 1

:: WebEngine (Chromium) specific definitions. Only build this with VS 2015 (no support for python < 3.5)
if "%WEBBACKEND%" == "qtwebengine" (
set "WSDK8=C:\\Program\ Files\ (x86)\\Windows\ Kits\\8.1"
set "WDK=C:\\WinDDK\\7600.16385.1"
set "INCLUDE=%WSDK8%\Include;%WDK%\inc;%INCLUDE%"
if "%ARCH%"=="32" (
set "PATH=%WSDK8%\bin\x86;%WDK$%\bin\x86;%PATH%"
set "LIB=%LIB%;%WSDK8%\Lib\winv6.3\um\x86"
) else (
set "PATH=%WSDK8%\bin\x64;%WDK$%\bin\amd64;%PATH%"
set "LIB=%LIB%;%WSDK8%\Lib\winv6.3\um\x64"
)
set "GYP_DEFINES=windows_sdk_path='%WSDK8%'"
set GYP_MSVS_VERSION=2015
set GYP_GENERATORS=ninja
set GYP_PARALLEL=1
set "WDK_DIR=%WDK%"
set "WindowsSDKDir=%WSDK8%"
echo "Building qtwebengine"
) else (
rmdir /s /q qtwebengine
)
Expand Down Expand Up @@ -107,7 +92,9 @@ echo QT_PATCH_VERSION = %QTVERPAT% >> Makefile
echo CXX = cl>>Makefile
:: This is a hack, CFLAGS_CRT becomes part of CFLAGS_EXTRA, overwriting it.
echo CFLAGS_CRT = -DQT_LIBINFIX=\"%QT_LIBINFIX%\" >> Makefile
echo EXTRA_CXXFLAGS =>>Makefile
isuruf marked this conversation as resolved.
Show resolved Hide resolved
rem This must have a trailing space.
echo QTSRC = %QTSRC% >> Makefile
echo SOURCE_PATH = %QTSRC% >> Makefile
echo INC_PATH = %QTSRC%\include >> Makefile
set tmpl=win32
Expand Down
136 changes: 93 additions & 43 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/bash

# Clean config for dirty builds
# -----------------------------
rm -f .qmake.stash .qmake.cache || true
Expand All @@ -9,7 +7,7 @@ rm -f .qmake.stash .qmake.cache || true
chmod +x configure

# Remove the full path from CXX etc. If we don't do this
# then the full path at build time gets put into
# then the full path at build time gets put into
# mkspecs/qmodule.pri and qmake attempts to use this.
export AR=$(basename ${AR})
export RANLIB=$(basename ${RANLIB})
Expand All @@ -24,6 +22,11 @@ do
unset $x
done

echo PREFIX=${PREFIX}
echo BUILD_PREFIX=${BUILD_PREFIX}
USED_BUILD_PREFIX=${BUILD_PREFIX:-${PREFIX}}
echo USED_BUILD_PREFIX=${BUILD_PREFIX}

MAKE_JOBS=$CPU_COUNT
# You can use this to cut down on the number of modules built. Of course the Qt package will not be of
# much use, but it is useful if you are iterating on e.g. figuring out compiler flags to reduce the
Expand All @@ -37,6 +40,9 @@ if [[ -d qtwebkit ]]; then
QMAKE_CXXFLAGS += -Wno-expansion-to-defined' qtwebkit/Tools/qmake/mkspecs/features/unix/default_pre.prf
fi

# For QDoc
export LLVM_INSTALL_DIR=${USED_BUILD_PREFIX}

# Problems: https://bugreports.qt.io/browse/QTBUG-61158
# (same thing happens for libyuv, it does not pickup the -I$PREFIX/include)
# Something to do with BUILD.gn files and/or ninja
Expand All @@ -60,33 +66,27 @@ if [[ ${HOST} =~ .*linux.* ]]; then

ln -s ${GXX} g++ || true
ln -s ${GCC} gcc || true
# Needed for -ltcg, it we split build and host again, change to ${BUILD_PREFIX}
ln -s ${PREFIX}/bin/${HOST}-gcc-ar gcc-ar || true
# Needed for -ltcg, it we merge build and host again, change to ${PREFIX}
ln -s ${USED_BUILD_PREFIX}/bin/${HOST}-gcc-ar gcc-ar || true
chmod +x g++ gcc gcc-ar
export PATH=${PWD}:${PATH}
export LD=${GXX}
export CC=${GCC}
export CXX=${GXX}

# Horrible hack! We should not `conda install` in build.sh!!!
mkdir -p "${SRC_DIR}/openssl_hack"
conda install --channel conda-forge \
conda create -y --prefix "${SRC_DIR}/openssl_hack" -c https://repo.continuum.io/pkgs/main \
--no-deps --yes --copy --prefix "${SRC_DIR}/openssl_hack" \
openssl=${openssl}
export OPENSSL_LIBS="-L${SRC_DIR}/openssl_hack/lib -lssl -lcrypto"
rm -rf ${PREFIX}/include/openssl

# isuruf: qtwebengine comes bundled with chromium which bundles icu. chromium has a non-default build option to use ICU from system,
# but I don't know how to pass it from qt's build system. So, change the default in chromium to use ICU from system
sed -i "s/use_system_icu = false/use_system_icu = true/g" qtwebengine/src/3rdparty/chromium/third_party/icu/BUILD.gn

# Qt has some braindamaged behaviour around handling compiler system include and lib paths. Basically, if it finds any include dir
# that is a system include dir then it prefixes it with -isystem. Problem is, passing -isystem <blah> causes GCC to forget all the
# other system include paths. The reason that Qt needs to know about these paths is probably due to moc needing to know about them
# so we cannot just elide them altogether. Instead, as soon as Qt sees one system path it needs to add them all as a group, in the
# correct order. This is probably fairly tricky so we work around needing to do that by having them all be present all the time.
#
# Futher, any system dirs that appear from the output from pkg-config (QT_XCB_CFLAGS) can cause incorrect emission ordering so we
# Further, any system dirs that appear from the output from pkg-config (QT_XCB_CFLAGS) can cause incorrect emission ordering so we
# must filter those out too which we do with a pkg-config wrapper.
#
# References:
Expand All @@ -95,22 +95,9 @@ if [[ ${HOST} =~ .*linux.* ]]; then
# https://github.com/qt/qtbase/commit/0b144bc76a368ecc6c5c1121a1b51e888a0621ac
# https://codereview.qt-project.org/#/c/157817/
#
declare -a INCDIRS
INCDIRS=(-I ${PREFIX}/include)
SYSINCDIRS=$(echo "" | ${CXX} -xc++ -E -v - 2>&1 | awk '/#include <...> search starts here:/{flag=1;next}/End of search list./{flag=0}flag')
for SYSINCDIR in ${SYSINCDIRS}; do
INCDIRS+=(-I ${SYSINCDIR})
done
echo "#!/usr/bin/env bash" > ./pkg-config
echo "pc_res=\$(\${PREFIX}/bin/pkg-config \"\$@\")" >> ./pkg-config
echo "res=\$?" >> ./pkg-config
echo "if [[ \${res} != 0 ]]; then" >> ./pkg-config
echo " echo \${pc_res}" >> ./pkg-config
echo " exit \${res}" >> ./pkg-config
echo "fi" >> ./pkg-config
echo "echo \${pc_res} | sed 's/[a-zA-Z0-9_-/\.]*sysroot[a-zA-Z0-9_-/\.]*//g'" >> ./pkg-config
echo "exit 0" >> ./pkg-config
chmod +x ./pkg-config
sed -i "s/-isystem//g" "qtbase/mkspecs/common/gcc-base.conf"
export PKG_CONFIG_LIBDIR=$(${USED_BUILD_PREFIX}/bin/pkg-config --pclibdir)

export PATH=${PWD}:${PATH}
declare -a SKIPS
if [[ ${MINIMAL_BUILD} == yes ]]; then
Expand All @@ -127,16 +114,55 @@ if [[ ${HOST} =~ .*linux.* ]]; then
SKIPS+=(-skip); SKIPS+=(qtlocation)
SKIPS+=(-skip); SKIPS+=(qt3d)
fi
declare -A COS6_MISSING_DEFINES
if [[ ${HOST} == *cos6* ]]; then
COS6_MISSING_DEFINES["SYN_DROPPED"]="3"
COS6_MISSING_DEFINES["BTN_TRIGGER_HAPPY1"]="0x2c0"
COS6_MISSING_DEFINES["BTN_TRIGGER_HAPPY2"]="0x2c1"
COS6_MISSING_DEFINES["BTN_TRIGGER_HAPPY3"]="0x2c2"
COS6_MISSING_DEFINES["BTN_TRIGGER_HAPPY4"]="0x2c3"
COS6_MISSING_DEFINES["BTN_TRIGGER_HAPPY17"]="0x2d0"
COS6_MISSING_DEFINES["INPUT_PROP_POINTER"]="0x00"
COS6_MISSING_DEFINES["INPUT_PROP_DIRECT"]="0x01"
COS6_MISSING_DEFINES["INPUT_PROP_BUTTONPAD"]="0x02"
COS6_MISSING_DEFINES["INPUT_PROP_SEMI_MT"]="0x03"
COS6_MISSING_DEFINES["INPUT_PROP_MAX"]="0x1f"
COS6_MISSING_DEFINES["INPUT_PROP_CNT"]="0x20"
COS6_MISSING_DEFINES["ABS_MT_SLOT"]="0x2f"
COS6_MISSING_DEFINES["ABS_MT_PRESSURE"]="0x3a"
COS6_MISSING_DEFINES["ABS_MT_DISTANCE"]="0x3b"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values need to be checked carefully against /usr/include/linux/input-events-codes.h from a recent linux distro.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I agree it's good to check and that we should, isn't it the case that the Linux kernel promises not to break userspace. That would be what changing any of these values is to my mind?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant when reviewing this PR. I might have made typos.


./configure -prefix $PREFIX \
-libdir $PREFIX/lib \
-bindir $PREFIX/bin \
-headerdir $PREFIX/include/qt \
-archdatadir $PREFIX \
-datadir $PREFIX \
# MAJOR HACK ahead!!!!!!
# The above macros are missing in cos6 and there are a few files that I have to patch to make it work
# Tried giving this as macros to ./configure, but the configure script doesn't pass them to ninja when building chromium.
for key in ${!COS6_MISSING_DEFINES[@]}; do
mv ${BUILD_PREFIX}/${HOST}/sysroot/usr/include/linux/input.h ${BUILD_PREFIX}/${HOST}/sysroot/usr/include/linux/input.h.bak
cp ${BUILD_PREFIX}/${HOST}/sysroot/usr/include/linux/input.h.bak ${BUILD_PREFIX}/${HOST}/sysroot/usr/include/linux/input.h
echo "#ifndef ${key}" >> ${BUILD_PREFIX}/${HOST}/sysroot/usr/include/linux/input.h
echo "#define ${key} ${COS6_MISSING_DEFINES[${key}]}" >> ${BUILD_PREFIX}/${HOST}/sysroot/usr/include/linux/input.h
echo "#endif" >> ${BUILD_PREFIX}/${HOST}/sysroot/usr/include/linux/input.h
done
fi

# ${BUILD_PREFIX}/${HOST}/sysroot/usr/lib64 is because our compilers don't look in sysroot/usr/lib64
# CentOS7 has:
# LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../:/lib/:/usr/lib/
# We have:
# LIBRARY_PATH=/opt/conda/conda-bld/qt_1549795295295/_build_env/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/:/opt/conda/conda-bld/qt_1549795295295/_build_env/bin/../lib/gcc/:/opt/conda/conda-bld/qt_1549795295295/_build_env/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/lib/../lib/:/opt/conda/conda-bld/qt_1549795295295/_build_env/x86_64-conda_cos6-linux-gnu/sysroot/lib/../lib/:/opt/conda/conda-bld/qt_1549795295295/_build_env/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/../lib/:/opt/conda/conda-bld/qt_1549795295295/_build_env/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/lib/:/opt/conda/conda-bld/qt_1549795295295/_build_env/x86_64-conda_cos6-linux-gnu/sysroot/lib/:/opt/conda/conda-bld/qt_1549795295295/_build_env/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/
# .. this is probably my fault.
# Had been trying with:
# -sysroot ${BUILD_PREFIX}/${HOST}/sysroot
# .. but it probably requires changing -L ${BUILD_PREFIX}/${HOST}/sysroot/usr/lib64 to -L /usr/lib64
./configure -prefix ${PREFIX} \
-libdir ${PREFIX}/lib \
-bindir ${PREFIX}/bin \
-headerdir ${PREFIX}/include/qt \
-archdatadir ${PREFIX} \
-datadir ${PREFIX} \
-I ${SRC_DIR}/openssl_hack/include \
-L $PREFIX/lib \
"${INCDIRS[@]}" \
-I ${PREFIX}/include \
-L ${PREFIX}/lib \
-L ${BUILD_PREFIX}/${HOST}/sysroot/usr/lib64 \
-release \
-opensource \
-confirm-license \
Expand All @@ -152,8 +178,7 @@ if [[ ${HOST} =~ .*linux.* ]]; then
-plugin-sql-sqlite \
-qt-pcre \
-qt-xcb \
-qt-xkbcommon \
-xkb-config-root /usr/share/X11/xkb \
-xkbcommon \
-dbus \
-no-linuxfb \
-no-libudev \
Expand All @@ -179,13 +204,13 @@ if [[ ${HOST} =~ .*linux.* ]]; then
# --disable-new-dtags \

if [[ ${MINIMAL_BUILD} != yes ]]; then
LD_LIBRARY_PATH=$PREFIX/lib make -j${MAKE_JOBS} module-qtwebengine || exit 1
CPATH=$PREFIX/include LD_LIBRARY_PATH=$PREFIX/lib make -j${MAKE_JOBS} module-qtwebengine || exit 1
if find . -name "libQt5WebEngine*so" -exec false {} +; then
echo "Did not build qtwebengine, exiting"
exit 1
fi
fi
LD_LIBRARY_PATH=$PREFIX/lib make -j${MAKE_JOBS} || exit 1
CPATH=$PREFIX/include LD_LIBRARY_PATH=$PREFIX/lib make -j${MAKE_JOBS} || exit 1
make install
fi

Expand All @@ -205,6 +230,20 @@ if [[ ${HOST} =~ .*darwin.* ]]; then
export LD=${CXX}
PATH=${PWD}:${PATH}

# Because of the use of Objective-C Generics we need at least MacOSX10.11.sdk
if [[ $(basename $CONDA_BUILD_SYSROOT) != "MacOSX10.12.sdk" ]]; then
echo "WARNING: You asked me to use $CONDA_BUILD_SYSROOT as the MacOS SDK"
echo " But because of the use of Objective-C Generics we need at"
echo " least MacOSX10.12.sdk"
CONDA_BUILD_SYSROOT=/opt/MacOSX10.12.sdk
if [[ ! -d $CONDA_BUILD_SYSROOT ]]; then
echo "ERROR: $CONDA_BUILD_SYSROOT is not a directory"
exit 1
fi
fi

# -qtlibinfix .conda \

./configure -prefix $PREFIX \
-libdir $PREFIX/lib \
-bindir $PREFIX/bin \
Expand Down Expand Up @@ -237,7 +276,7 @@ if [[ ${HOST} =~ .*darwin.* ]]; then
-no-egl \
-no-openssl \
-optimize-size \
-sdk macosx10.10
-sdk macosx10.12

# For quicker turnaround when e.g. checking compilers optimizations
# -skip qtwebsockets -skip qtwebchannel -skip qtwebengine -skip qtsvg -skip qtsensors -skip qtcanvas3d -skip qtconnectivity -skip declarative -skip multimedia -skip qttools -skip qtlocation -skip qt3d
Expand Down Expand Up @@ -278,8 +317,19 @@ popd > /dev/null
cp "${RECIPE_DIR}"/qt.conf "${PREFIX}"/bin/

if [[ ${HOST} =~ .*darwin.* ]]; then
pushd ${PREFIX}
# We built Qt itself with SDK 10.10, but we shouldn't
# force users to also build their Qt apps with SDK 10.10
# https://bugreports.qt.io/browse/QTBUG-41238
sed -i '' 's/macosx.*$/macosx/g' ${PREFIX}/mkspecs/qdevice.pri
sed -i '' 's/macosx.*$/macosx/g' mkspecs/qdevice.pri
# We allow macOS SDK 10.12 while upstream requires 10.13 (as of Qt 5.12.1).
sed -i '' 's/QT_MAC_SDK_VERSION_MIN = 10\..*/QT_MAC_SDK_VERSION_MIN = 10\.12/g' mkspecs/common/macx.conf
# We may want to replace these with \$\${QMAKE_MAC_SDK_PATH}/ instead?
sed -i '' "s|${CONDA_BUILD_SYSROOT}/|/|g" mkspecs/modules/*.pri
CMAKE_FILES=$(find lib/cmake -name "Qt*.cmake")
for CMAKE_FILE in ${CMAKE_FILES}; do
sed -i '' "s|${CONDA_BUILD_SYSROOT}/|\${CMAKE_OSX_SYSROOT}/|g" ${CMAKE_FILE}
done
popd
fi

4 changes: 2 additions & 2 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MACOSX_DEPLOYMENT_TARGET: # [osx]
- '10.12' # [osx]
MACOSX_DEPLOYMENT_TARGET: # [osx]
- '10.12' # [osx]
Loading