Add osxcross and Qt 5 cross packages for MacOSX

This commit is contained in:
Martchus 2017-07-31 22:27:37 +02:00
parent 09efe13b2c
commit 95fd3a4ed3
26 changed files with 1656 additions and 6 deletions

View File

@ -0,0 +1,50 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_reponame=cpp-utilities
pkgname=apple-darwin-c++utilities
_name=${pkgname#apple-darwin-}
pkgver=4.9.2
pkgrel=1
arch=('any')
pkgdesc='Common C++ classes and routines such as argument parser, IO and conversion utilities (apple-darwin)'
license=('GPL')
depends=('osxcross-git')
optdepends=("$_name-doc: API documentation")
makedepends=('clang')
url="https://github.com/Martchus/${_reponame}"
source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
sha256sums=('cc10db34bfca2d35216203d07b849cf4f43348160fe4891a3a6f624a5a6c23c4')
options=(!buildflags staticlibs !strip !emptydirs)
_architectures='i386-apple-darwin15 x86_64-apple-darwin15'
# NOTE: can not build for x86_64h-apple-darwin15 because libstdc++ is (currently) only availabe for x86_64
[[ $NO_STATIC_LIBS ]] || _configurations='-DENABLE_STATIC_LIBS:BOOL=ON'
[[ $NO_SHARED_LIBS ]] && _configurations+=' -DDISABLE_SHARED_LIBS:BOOL=ON'
build() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
for _arch in ${_architectures}; do
mkdir -p "build-${_arch}" && pushd "build-${_arch}"
/opt/osxcross/bin/${_arch}-cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS='-std=c++14 -foc-use-gcc-libstdc++ -fvisibility=hidden' \
-DCMAKE_INSTALL_PREFIX:PATH="/opt/osxcross/${_arch}" \
-Diconv_DYNAMIC_LIB:FILEPATH='/opt/osxcross/SDK/MacOSX10.11.sdk/usr/lib/libiconv.2.tbd' \
-Diconv_DYNAMIC_INCLUDE_DIR='/opt/osxcross/SDK/MacOSX10.11.sdk/usr/include' \
${_configurations} \
../
make
popd
done
}
package() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
for _arch in ${_architectures}; do
mkdir -p "build-${_arch}" && pushd "build-${_arch}"
make DESTDIR="${pkgdir}" install
make DESTDIR="${pkgdir}" install-binary-strip
popd
done
}

View File

@ -12,6 +12,7 @@ arch=('i686' 'x86_64')
pkgdesc='Common C++ classes and routines such as argument parser, IO and conversion utilities'
license=('GPL')
depends=()
optdepends=("$_name-doc: API documentation")
makedepends=('cmake' 'git')
checkdepends=('cppunit')
provides=("${_name}")

View File

@ -12,7 +12,7 @@ arch=('any')
pkgdesc='Common C++ classes and routines such as argument parser, IO and conversion utilities (mingw-w64)'
license=('GPL')
depends=('mingw-w64-crt' 'mingw-w64-libiconv')
optdepends=("$pkgname-doc: API documentation")
optdepends=("$_name-doc: API documentation")
makedepends=('mingw-w64-gcc' 'mingw-w64-cmake')
url="https://github.com/Martchus/${_reponame}"
source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")

View File

@ -10,12 +10,14 @@ shopt -s nullglob
if ! [[ $1 ]]; then
echo 'No Qt repo specified - must be specified like eg. base or multimedia.'
echo "Usage: $0 repo [variant=mingw-w64]"
exit -1
fi
pkg="qt5-$1"
repo="qt$1"
dest="${DEFAULT_PKGBUILDS_DIR}/${pkg}/mingw-w64"
variant="${2:-mingw-w64}"
dest="${DEFAULT_PKGBUILDS_DIR}/${pkg}/${variant}"
wd="${QT_GIT_REPOS_DIR}/${repo}"
if ! [[ -d $wd ]]; then
@ -23,7 +25,7 @@ if ! [[ -d $wd ]]; then
exit -2
fi
if ! [[ -d $dest ]]; then
echo "\$DEFAULT_PKGBUILDS_DIR/$pkg/mingw-w64 is no directory."
echo "\$DEFAULT_PKGBUILDS_DIR/$pkg/${variant} is no directory."
exit -3
fi
@ -49,15 +51,15 @@ for patch in "${patches[@]}"; do
done
pushd "$wd" > /dev/null
git checkout "${pkgver}-mingw-w64"
git checkout "${pkgver}-${variant}"
remote=
for maybe_remote in 'martchus' 'upstream'; do
for maybe_remote in 'origin' 'upstream' 'martchus'; do
if git remote get-url $maybe_remote; then
remote=$maybe_remote
break
fi
done
git format-patch "${remote}/${pkgver}" --output-directory "$dest"
git format-patch "v${pkgver}" --output-directory "$dest"
popd > /dev/null
new_patches=("$dest"/*.patch)

View File

@ -0,0 +1,49 @@
From 2248baf52ef79c73a99230ab1363fca0f1059588 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 28 Jul 2017 23:11:35 +0200
Subject: [PATCH] Use GCC from Git checkout
---
build_gcc.sh | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/build_gcc.sh b/build_gcc.sh
index 1eb07b8..1b7c782 100755
--- a/build_gcc.sh
+++ b/build_gcc.sh
@@ -27,8 +27,6 @@ fi
# GCC mirror
GCC_MIRROR="ftp://ftp.fu-berlin.de/unix/languages/gcc"
-require wget
-
pushd $OSXCROSS_BUILD_DIR &>/dev/null
function remove_locks()
@@ -40,21 +38,9 @@ source $BASE_DIR/tools/trap_exit.sh
if [ ! -f "have_gcc_${GCC_VERSION}_${OSXCROSS_TARGET}" ]; then
-pushd $OSXCROSS_TARBALL_DIR &>/dev/null
-if [[ $GCC_VERSION != *-* ]]; then
- wget -c "$GCC_MIRROR/releases/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2"
-else
- wget -c "$GCC_MIRROR/snapshots/$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2"
-fi
-popd &>/dev/null
-
-echo "cleaning up ..."
-rm -rf gcc* 2>/dev/null
-
-extract "$OSXCROSS_TARBALL_DIR/gcc-$GCC_VERSION.tar.bz2" 1
-echo ""
+ln -s "$GCC_CHECKOUT" gcc-$GCC_VERSION
-pushd gcc*$GCC_VERSION* &>/dev/null
+pushd gcc-$GCC_VERSION &>/dev/null
rm -f $OSXCROSS_TARGET_DIR/bin/*-gcc*
rm -f $OSXCROSS_TARGET_DIR/bin/*-g++*
--
2.13.3

View File

@ -0,0 +1,144 @@
# Maintainer: Martchus <martchus@gmx.net>
# Contributor: emersion <contact@emersion.fr>
# This package contains a cross toolchain to compile for MacOSX. It bundles:
# * MacOSX 10.11 SDK
# * wrapper for Clang provided by osxcross
# * wrapper and toolchain file for using Clang with CMake
# * GCC toolchain (including libstdc++) which is built using the script provided by osxcross
# Note that GCC is only available for i386, x86_64 but not for x86_64h
# * symlinks for ccache, so it will be used when cross compiling if it is enabled in /etc/makepkg.conf
# Difference between this package and osxcross-git maintained by emersion in the AUR:
# * osxcross-git does not stick to a particular commit
# * osxcross-git does not provide GCC toolchain (only Clang wrapper)
# * osxcross-git does not provide CMake toolchain file
# * osxcross-git violates "package etiquette" by putting stuff under /usr/local/osxcross (this package
# uses /opt/osxcross)
# * osxcross-git will likely not work for building other apple-darwin-* packages provided
# by me, such as apple-darwin-qt5-base (so if you want to build these, use my this package)
# * osxcross-git does not provide symlinks for ccache
pkgname=apple-darwin-osxcross
_pkgname=osxcross
# There's no official release of osxcross yet, so let's just stick to a Git revision
_osxcrosscommit=a0c5314
# Use the same GCC and isl version as used by regular gcc package
_gccver=7.1.1
_gcccommit=d791474f3fc2133fa0c310e566988b0cbdff321e
_islver=0.18
pkgver=272.$_osxcrosscommit
pkgrel=1
pkgdesc='OS X cross toolchain for Linux, FreeBSD and NetBSD'
arch=('x86_64')
url='https://github.com/tpoechtrager/osxcross'
license=('MIT')
depends=()
makedepends=('git' 'libxml2' 'clang>=3.2')
optdepends=('clang>=3.2: Use Clang (rather than GCC)'
'llvm: Link Time Optimization support and ld64 -bitcode_bundle support'
'uuid: ld64 -random_uuid support'
'xar: ld64 -bitcode_bundle support')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+https://github.com/tpoechtrager/${_pkgname}.git#commit=${_osxcrosscommit}"
'https://s3.dockerproject.org/darwin/v2/MacOSX10.11.sdk.tar.xz'
'apple-darwin-cmake.sh'
'toolchain-apple-darwin.cmake'
'0001-Use-GCC-from-Git-checkout.patch'
"git+https://gcc.gnu.org/git/gcc.git#commit=${_gcccommit}"
"http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2"
'Revert-eeb6872bf.patch')
sha256sums=('SKIP'
'694a66095a3514328e970b14978dc78c0f4d170e590fa7b2c3d3674b75f0b713'
'fc3c25980c6d8e32721217b43b7ae272d309a67c94a5ddd105c668d0ea7eb91e'
'fa4a430ef0ce168cfbeef4660a67ad08c3e1508ae89ab78b1ea14bb2f6709cb2'
'34ddb0fb6c08bc19ded7f608264696d7972601b635ee7ece548005286b4ba884'
'SKIP'
'6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b'
'c537bce5e9aa2b6fcdec3c1e7f94017633cb5ff5af59beda699262be3c06cca5')
noextract=('MacOSX10.11.sdk.tar.xz')
options=('!strip')
_architectures='i386-apple-darwin15 x86_64-apple-darwin15 x86_64h-apple-darwin15'
#pkgver() {
# cd "$srcdir/$_pkgname"
# echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
#}
prepare() {
cd "${srcdir}/gcc"
msg2 'Prepare GCC (using same steps as in regular GCC package)'
# link isl for in-tree build
ln -s ../isl-${_islver} isl
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
# Arch Linux installs x86_64 libraries /lib
[[ $CARCH == "x86_64" ]] && sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80717
git apply ../Revert-eeb6872bf.patch
msg2 'Prepare osxcross'
cd "$srcdir/$_pkgname"
git apply ../0001-Use-GCC-from-Git-checkout.patch
sed -i -e 's|-march=native||g' build_clang.sh wrapper/build.sh
# create symlink to SDK file so osxcross can find it
pushd tarballs && ln -sf ../../MacOSX10.11.sdk.tar.xz MacOSX10.11.sdk.tar.xz && popd
}
build() {
cd "$srcdir/$_pkgname"
export UNATTENDED=yes
export OSX_VERSION_MIN=10.5
export ENABLE_FORTRAN=1
export GCC_VERSION="$_gccver"
export GCC_CHECKOUT="${srcdir}/gcc"
msg2 'Build osxcross'
./build.sh
msg2 'Build GCC (using build script provided by osxcross)'
./build_gcc.sh
msg2 'Build toolchain file and wrapper for CMake'
cd "$srcdir"
for _arch in ${_architectures}; do
sed "s|@TRIPLE@|${_arch}|g" toolchain-apple-darwin.cmake > toolchain-${_arch}.cmake
sed "s|@TRIPLE@|${_arch}|g" apple-darwin-cmake.sh > ${_arch}-cmake
done
# TODO: Also create a wrapper and a toolchain file for GCC
}
package() {
cd "$srcdir/$_pkgname"
# install everything under /opt/osxcross since the toolchain and SKD don't fit well in the regular fs structure
mkdir -p $pkgdir/opt
cp -r target $pkgdir/opt/osxcross
install -d "${pkgdir}"/opt/osxcross/share/apple-darwin
# install files for CMake and ccache
cd "$srcdir"
for _arch in ${_architectures}; do
# install toolchain file and wrapper for CMake
install -t "${pkgdir}"/opt/osxcross/share/apple-darwin -m 644 toolchain-${_arch}.cmake
install -t "${pkgdir}"/opt/osxcross/bin -m 755 ${_arch}-cmake
# add symlinks for ccache
local ccachedir="${pkgdir}/opt/osxcross/lib/ccache/bin"
mkdir -p "${ccachedir}"
pushd "${ccachedir}"
for app in clang clang++ gcc g++; do
ln -s /usr/bin/ccache ./${_arch}-${app}
done
popd
done
}

View File

@ -0,0 +1,82 @@
commit 43d83a70267a9e5c456d28de8e7348820446b712
Author: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
Date: Tue May 16 07:50:42 2017 +0200
Revert "Prevent LTO wrappers to process a recursive execution"
This reverts commit eeb6872bfdfd1e71b27de6f62a5f5c08a2efb015.
diff --git a/gcc/file-find.c b/gcc/file-find.c
index b072a4993d76..b5a1fe8494e8 100644
--- a/gcc/file-find.c
+++ b/gcc/file-find.c
@@ -208,38 +208,3 @@ prefix_from_string (const char *p, struct path_prefix *pprefix)
}
free (nstore);
}
-
-void
-remove_prefix (const char *prefix, struct path_prefix *pprefix)
-{
- struct prefix_list *remove, **prev, **remove_prev = NULL;
- int max_len = 0;
-
- if (pprefix->plist)
- {
- prev = &pprefix->plist;
- for (struct prefix_list *pl = pprefix->plist; pl->next; pl = pl->next)
- {
- if (strcmp (prefix, pl->prefix) == 0)
- {
- remove = pl;
- remove_prev = prev;
- continue;
- }
-
- int l = strlen (pl->prefix);
- if (l > max_len)
- max_len = l;
-
- prev = &pl;
- }
-
- if (remove_prev)
- {
- *remove_prev = remove->next;
- free (remove);
- }
-
- pprefix->max_len = max_len;
- }
-}
diff --git a/gcc/file-find.h b/gcc/file-find.h
index 8f49a3af273e..407feba26e74 100644
--- a/gcc/file-find.h
+++ b/gcc/file-find.h
@@ -41,7 +41,6 @@ extern void find_file_set_debug (bool);
extern char *find_a_file (struct path_prefix *, const char *, int);
extern void add_prefix (struct path_prefix *, const char *);
extern void add_prefix_begin (struct path_prefix *, const char *);
-extern void remove_prefix (const char *prefix, struct path_prefix *);
extern void prefix_from_env (const char *, struct path_prefix *);
extern void prefix_from_string (const char *, struct path_prefix *);
diff --git a/gcc/gcc-ar.c b/gcc/gcc-ar.c
index 78d2fc1ad306..d5d80e042e5a 100644
--- a/gcc/gcc-ar.c
+++ b/gcc/gcc-ar.c
@@ -194,14 +194,6 @@ main (int ac, char **av)
#ifdef CROSS_DIRECTORY_STRUCTURE
real_exe_name = concat (target_machine, "-", PERSONALITY, NULL);
#endif
- /* Do not search original location in the same folder. */
- char *exe_folder = lrealpath (av[0]);
- exe_folder[strlen (exe_folder) - strlen (lbasename (exe_folder))] = '\0';
- char *location = concat (exe_folder, PERSONALITY, NULL);
-
- if (access (location, X_OK) == 0)
- remove_prefix (exe_folder, &path);
-
exe_name = find_a_file (&path, real_exe_name, X_OK);
if (!exe_name)
{

View File

@ -0,0 +1,19 @@
#!/bin/sh
prefix=/opt/osxcross/SDK/MacOSX10.11.sdk/usr
additional_args=" \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
-DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
-DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
-DCMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES:PATH=${prefix}/include \
-DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH=${prefix}/include \
-DLIB_INSTALL_DIR:PATH=${prefix}/lib \
-DSYSCONF_INSTALL_DIR:PATH=${prefix}/etc \
-DSHARE_INSTALL_DIR:PATH=${prefix}/share \
-DCMAKE_TOOLCHAIN_FILE=/opt/osxcross/share/apple-darwin/toolchain-@TRIPLE@.cmake"
[[ ! $PREVENT_FORCING_SHARED_LIBS ]] &&
additional_args+=' -DBUILD_SHARED_LIBS:BOOL=ON' ||
additional_args+=' -DBUILD_SHARED_LIBS:BOOL=OFF'
PATH="/opt/osxcross/bin:${prefix}/bin:$PATH" cmake $additional_args "$@"

View File

@ -0,0 +1,22 @@
set (CMAKE_SYSTEM_NAME Darwin)
# specify the cross compiler
set (CMAKE_C_COMPILER @TRIPLE@-clang)
set (CMAKE_CXX_COMPILER @TRIPLE@-clang++)
# where is the target environment
set (CMAKE_FIND_ROOT_PATH /opt/osxcross/@TRIPLE@;/opt/osxcross/SDK/MacOSX10.11.sdk/usr)
# search for programs in the build host directories
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
# Make sure Qt can be detected by CMake
set (QT_BINARY_DIR /opt/osxcross/bin /opt/osxcross/@TRIPLE@/lib/qt/bin)
set (QT_INCLUDE_DIRS_NO_SYSTEM ON)
set (CMAKE_AR:FILEPATH @TRIPLE@-ar)
set (CMAKE_RANLIB:FILEPATH @TRIPLE@-ranlib)

View File

@ -0,0 +1,76 @@
From 83b2cce640be5314e768d121fd0b407245325c0d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 30 Jul 2017 02:00:34 +0200
Subject: [PATCH 1/8] Enable cross compilation with osxcross
Change-Id: I1d4044991b34165314acaf729ec503f83ca9d5ab
---
mkspecs/common/clang.conf | 4 ++--
mkspecs/common/g++-base.conf | 4 ++--
mkspecs/common/mac.conf | 16 ++++++++++------
3 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
index e003b947aa..0fb84bc1b3 100644
--- a/mkspecs/common/clang.conf
+++ b/mkspecs/common/clang.conf
@@ -4,8 +4,8 @@
QMAKE_COMPILER = gcc clang llvm # clang pretends to be gcc
-QMAKE_CC = clang
-QMAKE_CXX = clang++
+QMAKE_CC = $${CROSS_COMPILE}clang
+QMAKE_CXX = $${CROSS_COMPILE}clang++
QMAKE_LINK_C = $$QMAKE_CC
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
diff --git a/mkspecs/common/g++-base.conf b/mkspecs/common/g++-base.conf
index c42c46b0ec..5b584e4fd5 100644
--- a/mkspecs/common/g++-base.conf
+++ b/mkspecs/common/g++-base.conf
@@ -10,12 +10,12 @@
QMAKE_COMPILER = gcc
-QMAKE_CC = gcc
+QMAKE_CC = $${CROSS_COMPILE}gcc
QMAKE_LINK_C = $$QMAKE_CC
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
-QMAKE_CXX = g++
+QMAKE_CXX = $${CROSS_COMPILE}g++
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
index 5208379f9a..b237530775 100644
--- a/mkspecs/common/mac.conf
+++ b/mkspecs/common/mac.conf
@@ -33,12 +33,16 @@ QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
QMAKE_LIBS_THREAD =
-QMAKE_ACTOOL = actool
+QMAKE_ACTOOL = $${CROSS_COMPILE}actool
-QMAKE_DSYMUTIL = dsymutil
-QMAKE_STRIP = strip
+QMAKE_DSYMUTIL = $${CROSS_COMPILE}dsymutil
+QMAKE_STRIP = $${CROSS_COMPILE}strip
QMAKE_STRIPFLAGS_LIB += -S -x
-QMAKE_AR = ar cq
-QMAKE_RANLIB = ranlib -s
-QMAKE_NM = nm -P
+QMAKE_AR = $${CROSS_COMPILE}ar cq
+QMAKE_RANLIB = $${CROSS_COMPILE}ranlib -s
+QMAKE_NM = $${CROSS_COMPILE}nm -P
+
+!isEmpty(CROSS_COMPILE_CFLAGS) {
+ QMAKE_CXXFLAGS += -fpch-preprocess
+}
--
2.13.4

View File

@ -0,0 +1,39 @@
From be78c416c070a8a87fe8f449a717c5a7b800f683 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 30 Jul 2017 21:17:41 +0200
Subject: [PATCH 2/8] Allow overriding stdlib under MacOS
---
mkspecs/common/clang-mac.conf | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/mkspecs/common/clang-mac.conf b/mkspecs/common/clang-mac.conf
index cbae2e6262..bdf855fed2 100644
--- a/mkspecs/common/clang-mac.conf
+++ b/mkspecs/common/clang-mac.conf
@@ -6,8 +6,20 @@ QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvm.clang.1_0
-QMAKE_CXXFLAGS += -stdlib=libc++
-QMAKE_LFLAGS += -stdlib=libc++
+# Use libc++ by default under MacOS/Clang
+isEmpty(QMAKE_MACOSX_STDLIB) {
+ QMAKE_MACOSX_STDLIB = libc++
+}
+isEqual(QMAKE_MACOSX_STDLIB, libstdc++) {
+ # To enable libstdc++, passing -stdlib=XXX is not enough - at least under osxcross the stdheaders are otherwise not found
+ # It is also required to disable GCC extensions by defining __STRICT_ANSI__ because not all GCC extensions are supported by Clang
+ QMAKE_CXXFLAGS += -D__STRICT_ANSI__ -foc-use-gcc-libstdc++
+ QMAKE_LFLAGS += -D__STRICT_ANSI__ -foc-use-gcc-libstdc++
+} else {
+ QMAKE_CXXFLAGS += -stdlib=$${QMAKE_MACOSX_STDLIB}
+ QMAKE_LFLAGS += -stdlib=$${QMAKE_MACOSX_STDLIB}
+}
+
QMAKE_AR_LTCG = libtool -static -o
QMAKE_CFLAGS_APPLICATION_EXTENSION = -fapplication-extension
--
2.13.4

View File

@ -0,0 +1,59 @@
From 5ea2e056ca85c35e717279d3ea15678f8f569ee0 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 30 Jul 2017 22:26:38 +0200
Subject: [PATCH 3/8] Remove error handling for Xcode detection
* Don't know where this Xcode stuff under osxcross is
* So just get rid of the error messages by removing
the error handling
* Let's see what this will break :-)
---
mkspecs/features/mac/default_pre.prf | 32 --------------------------------
1 file changed, 32 deletions(-)
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
index e21e749ee9..1157a6ae05 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -1,38 +1,6 @@
CONFIG = asset_catalogs rez $$CONFIG
load(default_pre)
-isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
- # Get path of Xcode's Developer directory
- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null")
- isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \
- error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.")
-
- # Make sure Xcode path is valid
- !exists($$QMAKE_XCODE_DEVELOPER_PATH): \
- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
-
- # Make sure Xcode is set up properly
- isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
- error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")
-}
-
-isEmpty(QMAKE_XCODE_VERSION) {
- # Extract Xcode version using xcodebuild
- xcode_version = $$system("/usr/bin/xcodebuild -version")
- QMAKE_XCODE_VERSION = $$member(xcode_version, 1)
- isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.")
- unset(xcode_version)
-}
-
-isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) {
- QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist
- exists($$QMAKE_XCODE_PREFERENCES_FILE): \
- QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null")
-
- !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \
- cache(QMAKE_TARGET_BUNDLE_PREFIX)
-}
-
QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon
# Make the default debug info format for static debug builds
--
2.13.4

View File

@ -0,0 +1,41 @@
From 9301437563029764ce405330fe148b759769b27c Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Tue, 1 Aug 2017 00:34:32 +0200
Subject: [PATCH 4/8] Fix build errors under 32-bit MacOS
Fix build errors like
`no known conversion from 'CGRect' to 'const _NSRect &'`
under 32-bit MacOS
---
src/plugins/platforms/cocoa/cocoa.pro | 2 ++
src/widgets/styles/styles.pri | 1 +
2 files changed, 3 insertions(+)
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index 62935210be..ce4795fb0e 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -104,6 +104,8 @@ qtHaveModule(widgets) {
QT += widgets-private printsupport-private
}
+DEFINES += NS_BUILD_32_LIKE_64
+
OTHER_FILES += cocoa.json
# Acccessibility debug support
diff --git a/src/widgets/styles/styles.pri b/src/widgets/styles/styles.pri
index 481123f0d4..c72d75b407 100644
--- a/src/widgets/styles/styles.pri
+++ b/src/widgets/styles/styles.pri
@@ -43,6 +43,7 @@ qtConfig(style-mac) {
styles/qmacstyle_mac_p_p.h
OBJECTIVE_SOURCES += styles/qmacstyle_mac.mm
LIBS_PRIVATE += -framework Carbon
+ DEFINES += NS_BUILD_32_LIKE_64
}
qtConfig(style-windowsvista) {
--
2.13.4

View File

@ -0,0 +1,33 @@
From a39d7239989f1efeba81a608ada1a028c3e73c46 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:01:14 +0200
Subject: [PATCH 5/8] Prevent debug library names in pkg-config files
qmake generates the pkgconfig .pc files two times, once for the
release build and once for the debug build (which we're not actually
building in this package). For both generations the exact same
pkgconfig file name is used. This causes references to the debug
build ending up in the .pc files which are unwanted
Prevent this from happening by giving the pkgconfig .pc
files for the debug build an unique file name.
---
qmake/generators/makefile.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index a1f3352aa3..56f0a3b703 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -3160,6 +3160,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
if (dot != -1)
ret = ret.left(dot);
}
+ if (project->isActiveConfig("debug")) {
+ ret += "d";
+ }
ret += Option::pkgcfg_ext;
QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
if(!subdir.isEmpty()) {
--
2.13.4

View File

@ -0,0 +1,274 @@
From c54e1cb52eab4c008cc7301d56e2dcb3b314819d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:32:00 +0200
Subject: [PATCH 6/8] Pull dependencies of static libraries in CMake modules
When doing a static build of Qt, the dependencies of the Qt
libraries and plugins itself must be specified when linking
the final application.
---
.../features/data/cmake/Qt5BasicConfig.cmake.in | 149 ++++++++++++++++-----
.../features/data/cmake/Qt5PluginTarget.cmake.in | 11 +-
qmake/generators/makefile.cpp | 7 +
3 files changed, 129 insertions(+), 38 deletions(-)
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 17da8b979e..f11d17b94b 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -55,35 +55,52 @@ but not all the files it references.
endmacro()
!!IF !equals(TEMPLATE, aux)
-macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_CONFIG LIB_LOCATION IMPLIB_LOCATION)
+ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${TARGET_CONFIG})
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
!!ELSE
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
!!ENDIF
+
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES)
+ set(_list_sep \";\")
+ endif()
+ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ \"INTERFACE_LINK_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_list_sep}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${TARGET_CONFIG}_LIB_DEPENDENCIES}\"
+ \"IMPORTED_LOCATION_${TARGET_CONFIG}\" ${imported_location}
+!!IF !isEmpty(CMAKE_LIB_SONAME)
+ \"IMPORTED_SONAME_${TARGET_CONFIG}\" \"$${CMAKE_LIB_SONAME}\"
+!!ENDIF
+ # For backward compatibility with CMake < 2.8.12
+ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_list_sep}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${TARGET_CONFIG}_LIB_DEPENDENCIES}\"
+ )
+!!ELSE
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
+ \"INTERFACE_LINK_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
+ \"IMPORTED_LOCATION_${TARGET_CONFIG}\" ${imported_location}
!!IF !isEmpty(CMAKE_LIB_SONAME)
- \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
+ \"IMPORTED_SONAME_${TARGET_CONFIG}\" \"$${CMAKE_LIB_SONAME}\"
!!ENDIF
# For backward compatibility with CMake < 2.8.12
- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
+ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
)
+!!ENDIF
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ELSE
- set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ set(imported_implib \"IMPORTED_IMPLIB_${TARGET_CONFIG}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
+ \"IMPORTED_IMPLIB_${TARGET_CONFIG}\" ${imported_implib}
)
endif()
!!ENDIF
@@ -227,13 +244,48 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!IF !isEmpty(CMAKE_STATIC_TYPE)
add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
+ macro(_process_prl_file PRL_FILE_LOCATION CONFIGURATION)
+ if (EXISTS \"${PRL_FILE_LOCATION}\")
+ file(STRINGS \"${PRL_FILE_LOCATION}\" prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE\")
+ string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings})
+ string(REGEX REPLACE \"\\\\$\\\\$\\\\[QT_INSTALL_LIBS\\\\]\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" static_depends \"${static_depends}\")
+ string(REPLACE \"-framework;\" \"-framework \" static_depends \"${static_depends}\")
+ if (_Qt5$${CMAKE_MODULE_NAME}_STATIC_${CONFIGURATION}_LIB_DEPENDENCIES)
+ set(_list_sep \";\")
+ endif()
+ set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${CONFIGURATION}_LIB_DEPENDENCIES \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${CONFIGURATION}_LIB_DEPENDENCIES}${_list_sep}${static_depends}\")
+ endif()
+ endmacro()
+
+ macro(_process_plugin_prl_file PRL_FILE_LOCATION CONFIGURATION LIB_DIRECTORY LIB_LOCATION)
+ # First add the (static) plugin itself ...
+ if (_Qt5$${CMAKE_MODULE_NAME}_STATIC_${CONFIGURATION}_LIB_DEPENDENCIES)
+ set(_list_sep \";\")
+ endif()
+ set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${CONFIGURATION}_LIB_DEPENDENCIES \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${CONFIGURATION}_LIB_DEPENDENCIES}${_list_sep}${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/${LIB_DIRECTORY}/${LIB_LOCATION}\")
+ # .. then its dependencies.
+ _process_prl_file(${PRL_FILE_LOCATION} ${CONFIGURATION})
+ endmacro()
+
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ _process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG)
!!ELSE
+ _process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG)
+!!ENDIF
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ _process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE)
+!!ELSE
+ _process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE)
+!!ENDIF
+
+!!ELSE // !isEmpty(CMAKE_STATIC_TYPE)
!!IF equals(TEMPLATE, aux)
add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
!!ELSE
add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
!!ENDIF
-!!ENDIF
+!!ENDIF // !isEmpty(CMAKE_STATIC_TYPE)
+
!!IF !equals(TEMPLATE, aux)
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
@@ -245,6 +297,56 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINE})
+ # Find plugin targets
+ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/*Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
+ unset(pluginTargets)
+ if(pluginTargetsMaybe)
+ foreach(pluginTarget ${pluginTargetsMaybe})
+ file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS)
+ if(matched)
+ list(APPEND pluginTargets ${pluginTarget})
+ endif()
+ endforeach()
+ endif()
+
+ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties TARGET_NAME PLUGIN_TARGET_NAME PLUGIN_NAME CONFIG PLUGIN_LOCATION)
+ set_property(TARGET ${PLUGIN_TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${CONFIG})
+
+!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+!!ELSE
+ set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+!!ENDIF
+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+ set_target_properties(${PLUGIN_TARGET_NAME} PROPERTIES
+ \"IMPORTED_LOCATION_${CONFIG}\" ${imported_location}
+ )
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ set_property(TARGET ${TARGET_NAME} APPEND PROPERTY STATIC_PLUGINS ${PLUGIN_NAME})
+ get_filename_component(_PLUGIN_DIR ${PLUGIN_LOCATION} PATH)
+ get_filename_component(_PLUGIN_DIR_NAME ${_PLUGIN_DIR} NAME)
+ get_filename_component(_PLUGIN_NAME ${PLUGIN_LOCATION} NAME)
+ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/\\\\1.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME})
+ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION})
+ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/\\\\1.static.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME})
+ endif()
+ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION})
+ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/lib\\\\1.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME})
+ endif()
+ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION})
+ message(FATAL_ERROR "The prl file containing dependencies of static plugin ${PLUGIN_TARGET_NAME} of ${TARGET_NAME} could not be found.")
+ endif()
+ _process_plugin_prl_file(${PLUGIN_PRL_FILE_LOCATION} ${CONFIG} \"lib/qt/plugins\" ${PLUGIN_LOCATION})
+!!ENDIF
+
+ endmacro()
+
+ if(pluginTargets)
+ foreach(pluginTarget ${pluginTargets})
+ include(${pluginTarget})
+ endforeach()
+ endif()
+
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE)
foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR})
@@ -336,9 +438,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ELSE
\"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
!!ENDIF
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
endif()
+!!ENDIF // CMAKE_STATIC_TYPE
+
+
!!ENDIF // CMAKE_RELEASE_TYPE
!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
@@ -349,29 +453,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
)
!!ENDIF // TEMPLATE != aux
- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
-
- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
-
-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
-!!ELSE
- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
-!!ENDIF
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
- set_target_properties(Qt5::${Plugin} PROPERTIES
- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
- )
- endmacro()
-
- if (pluginTargets)
- foreach(pluginTarget ${pluginTargets})
- include(${pluginTarget})
- endforeach()
- endif()
-
-
!!IF !isEmpty(CMAKE_MODULE_EXTRAS)
include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
!!ENDIF
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
index 5baf0fdb10..ec5f3cc437 100644
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
@@ -1,11 +1,14 @@
-
-add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
+# Some Qt modules also load plugin target in extra config, so check whether the target already exists
+if(NOT TARGET Qt5::$$CMAKE_PLUGIN_NAME)
+ add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
!!ENDIF
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
!!ENDIF
list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
+
+endif()
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 56f0a3b703..40af76cc84 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -998,6 +998,13 @@ MakefileGenerator::writePrlFile(QTextStream &t)
for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it)
t << qv(project->values((*it).toKey()));
t << endl;
+ t << "QMAKE_PRL_LIBS_FOR_CMAKE = ";
+ QString sep;
+ for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it) {
+ t << sep << project->values((*it).toKey()).join(';').replace('\\', "\\\\");
+ sep = ';';
+ }
+ t << endl;
}
}
--
2.13.4

View File

@ -0,0 +1,41 @@
From b9322fe12b92b92853659e43061bce5198a602e2 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Thu, 3 Aug 2017 11:13:15 +0200
Subject: [PATCH 7/8] Fix finding gl.h when cross compiling with osxcross
* Make sure find_path ignores the CMAKE_FIND_ROOT_PATH
because paths are "sysrootified" in sdk.prf anyways
* Add directory of gl.h in "MacOSX10.11.sdk" to search
paths
---
mkspecs/common/mac.conf | 1 +
src/gui/Qt5GuiConfigExtras.cmake.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
index b237530775..6f3b1b2d37 100644
--- a/mkspecs/common/mac.conf
+++ b/mkspecs/common/mac.conf
@@ -18,6 +18,7 @@ QMAKE_LIBDIR =
# sdk.prf will prefix the proper SDK sysroot
QMAKE_INCDIR_OPENGL = \
+ /System/Library/Frameworks/OpenGL.framework/Versions/A \
/System/Library/Frameworks/OpenGL.framework/Headers \
/System/Library/Frameworks/AGL.framework/Headers/
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
index 07869efd7d..8c3afe4b51 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -57,6 +57,7 @@ set(Qt5Gui_OPENGL_LIBRARIES Qt5::Gui_GLESv2)
set(_GL_INCDIRS $$CMAKE_GL_INCDIRS)
find_path(_qt5gui_OPENGL_INCLUDE_DIR $$CMAKE_GL_HEADER_NAME
PATHS ${_GL_INCDIRS}
+ NO_CMAKE_FIND_ROOT_PATH
)
if (NOT _qt5gui_OPENGL_INCLUDE_DIR)
message(FATAL_ERROR \"Failed to find \\\"$$CMAKE_GL_HEADER_NAME\\\" in \\\"${_GL_INCDIRS}\\\".\")
--
2.13.4

View File

@ -0,0 +1,35 @@
From 3381229855389d88f3599a4e1f1a42ac0f1b86e5 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 6 Aug 2017 20:14:11 +0200
Subject: [PATCH 8/8] Prevent error when qmlimportscanner not available
When using `make qmake_all` the qmlimportscanner is not
built when creating Makefiles for targets depending on
QML so the error must be ignored.
BTW: Using `make qmake_all` is required to fix Makefiles
using sed because qmake fails to set library search paths
for host standard library correctly.
Not sure why this error does not occur when cross
compiling static Qt for Windows.
---
mkspecs/features/qt.prf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 3ccbbe7061..c547c89910 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -305,7 +305,7 @@ contains(all_qt_module_deps, qml): \
#message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
JSON = $$system($$QMLIMPORTSCANNER $$system_quote($$_PRO_FILE_PWD_) $$IMPORTPATHS)
- parseJson(JSON, IMPORTS)| error("Failed to parse qmlimportscanner output.")
+ parseJson(JSON, IMPORTS)#| error("Failed to parse qmlimportscanner output.")
!isEmpty(IMPORTS._KEYS_) {
# add import plugins to LIBS line
--
2.13.4

View File

@ -0,0 +1,200 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
# All patches are managed at https://github.com/Martchus/qtbase
pkgname=apple-darwin-qt5-base
pkgver=5.9.1
pkgrel=1
pkgdesc='A cross-platform application and UI framework (apple-darwin)'
arch=('i686' 'x86_64')
url='https://www.qt.io/'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
depends=('apple-darwin-osxcross')
groups=('apple-darwin-qt5')
optdepends=()
makedepends=('clang')
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs')
_pkgfqn="qtbase-opensource-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/submodules/${_pkgfqn}.tar.xz"
'0001-Enable-cross-compilation-with-osxcross.patch'
'0002-Allow-overriding-stdlib-under-MacOS.patch'
'0003-Remove-error-handling-for-Xcode-detection.patch'
'0004-Fix-build-errors-under-32-bit-MacOS.patch'
'0005-Prevent-debug-library-names-in-pkg-config-files.patch'
'0006-Pull-dependencies-of-static-libraries-in-CMake-modul.patch'
'0007-Fix-finding-gl.h-when-cross-compiling-with-osxcross.patch'
'0008-Prevent-error-when-qmlimportscanner-not-available.patch')
sha256sums=('bc9a21e9f6fff9629019fdf9f989f064751d5073c3a28dc596def92f4d4275c6'
'f5b474fc11f929c8e1563136c6b53d09c9e405ebf5a7940a63dc13f00d3e2bbd'
'a51749efb16b81f5e272a0864a6e2583942998bca1fe397c0e4205b269c97ae4'
'73d314dad7a93073140ee9d868e1071a107b1afdecc67cb67d85a91391452a82'
'96db51e0cac5ee455931f404fd72ff13b1bab6174034f0dd9460d43d94e970f0'
'b665c7ee5b4bf603dd7a224d5d72d2fb669d9c7ec40b47cebe3ab3392c523b36'
'571acd36daf587c44af728e0d63531ceb44e987b572c37bf98a379af13a77b84'
'f0e75b20c059af982091093a3e7f13e9099e6568210bf753c3cc84fa9181a4f1'
'56b75af151978d8a25c658a6accded13d3ddc16b21a3524abb08e40a52cbe113')
_osxcrossprefix='/opt/osxcross'
# Disable 32-bit build ...
#_architectures='x86_64-apple-darwin15 i386-apple-darwin15'
_architectures='x86_64-apple-darwin15'
# ... because it fails to compile "src/plugins/platforms/cocoa/qcocoahelpers.mm":
# /opt/osxcross/bin/i386-apple-darwin15-clang++ -c -pipe -D__STRICT_ANSI__ -foc-use-gcc-libstdc++ -g -Og -fPIC -std=c++1y -arch i386 -isysroot /opt/osxcross/bin/../SDK/MacOSX10.11.sdk -mmacosx-version-min=10.5 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -fPIC -DNS_BUILD_32_LIKE_64 -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_ACCESSIBILITY_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_GRAPHICS_SUPPORT_LIB -DQT_CLIPBOARD_SUPPORT_LIB -DQT_CGL_SUPPORT_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/src/plugins/platforms/cocoa -I. -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtAccessibilitySupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtAccessibilitySupport/5.9.1 -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtAccessibilitySupport/5.9.1/QtAccessibilitySupport -I../../../../include -I../../../../include/QtAccessibilitySupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtThemeSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtThemeSupport/5.9.1 -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtThemeSupport/5.9.1/QtThemeSupport -I../../../../include/QtThemeSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtFontDatabaseSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtFontDatabaseSupport/5.9.1 -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtFontDatabaseSupport/5.9.1/QtFontDatabaseSupport -I../../../../include/QtFontDatabaseSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtGraphicsSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtGraphicsSupport/5.9.1 -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtGraphicsSupport/5.9.1/QtGraphicsSupport -I../../../../include/QtGraphicsSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtPrintSupport/5.9.1 -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtPrintSupport/5.9.1/QtPrintSupport -I../../../../include/QtPrintSupport/5.9.1 -I../../../../include/QtPrintSupport/5.9.1/QtPrintSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtWidgets/5.9.1 -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtWidgets/5.9.1/QtWidgets -I../../../../include/QtWidgets/5.9.1 -I../../../../include/QtWidgets/5.9.1/QtWidgets -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtGui/5.9.1 -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtGui/5.9.1/QtGui -I../../../../include/QtGui/5.9.1 -I../../../../include/QtGui/5.9.1/QtGui -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtClipboardSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtClipboardSupport/5.9.1 -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtClipboardSupport/5.9.1/QtClipboardSupport -I../../../../include/QtClipboardSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtCglSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtCglSupport/5.9.1 -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtCglSupport/5.9.1/QtCglSupport -I../../../../include/QtCglSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtPrintSupport -I../../../../include/QtPrintSupport -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtWidgets -I../../../../include/QtWidgets -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtGui -I../../../../include/QtGui -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtCore/5.9.1 -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtCore/5.9.1/QtCore -I../../../../include/QtCore/5.9.1 -I../../../../include/QtCore/5.9.1/QtCore -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/include/QtCore -I../../../../include/QtCore -I.moc/debug -I/opt/osxcross/SDK/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/opt/osxcross/SDK/MacOSX10.11.sdk/System/Library/Frameworks/AGL.framework/Headers -I/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/mkspecs/macx-clang -o .obj/debug/qcocoahelpers.o /build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/src/plugins/platforms/cocoa/qcocoahelpers.mm
# /build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/src/plugins/platforms/cocoa/qcocoahelpers.mm:312:9: error: use of undeclared identifier
# '_okButton'
# _okButton.target = panelDelegate;
# ^
#/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/src/plugins/platforms/cocoa/qcocoahelpers.mm:314:9: error: use of undeclared identifier
# '_cancelButton'
# _cancelButton = [self createButtonWithTitle:"Cancel"];
# ^
#/build/apple-darwin-qt5-base/src/qtbase-opensource-src-5.9.1/src/plugins/platforms/cocoa/qcocoahelpers.mm:315:9: error: use of undeclared identifier
# '_cancelButton'; did you mean 'NSCancelButton'?
# _cancelButton.action = @selector(onCancelClicked);
# ^~~~~~~~~~~~~
# NSCancelButton
patch() {
local input_found=
local patch_file=
for arg in $@; do
if [[ $input_found ]]; then
patch_file="$arg"
break
fi
[[ $arg == -i ]] && input_found=1
done
msg2 "Applying patch $patch_file"
/usr/bin/patch $@
}
prepare() {
cd "${srcdir}/${_pkgfqn}"
# Apply patches; further descriptions can be found in patch files itself
for patch in "$srcdir/"*.patch; do
patch -p1 -i "$patch"
done
# Some Xcode tools for SDK detection are not available under osxcross (at least I don't know where to get them)
# Hence the SDK info must be provided manually
msg2 "Setting SDK info"
sed -i '1s;^;QMAKE_MAC_SDK.macosx.Path = '"$(${_osxcrossprefix}/bin/xcrun --sdk macosx --show-sdk-path)"'\
QMAKE_MAC_SDK.macosx.SDKVersion = '"$(${_osxcrossprefix}/bin/xcrun --sdk macosx --show-sdk-version)"'\
QMAKE_MAC_SDK.macosx.PlatformPath = '"${_osxcrossprefix}"'\n;' 'mkspecs/features/mac/sdk.prf'
}
init_osxcross() {
# add osxcross toolchain to path
export PATH="${_osxcrossprefix}/bin:$PATH"
# enable use of ccache (if installed)
[[ -f /usr/bin/ccache ]] && \
export PATH="${_osxcrossprefix}/lib/ccache/bin:$PATH"
}
build() {
cd "${srcdir}/${_pkgfqn}"
# Do not set any flags here, flags are configured via mkspec
# Setting flags here is not appropriate as it does not allow to
# distinguish between flags for native compiler and cross compiler
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
unset PKG_CONFIG_PATH
init_osxcross
for _arch in ${_architectures}; do
# To prevent conflicts with the mingw-w64-qt4 package we have
# to put tools in a dedicated folder
# The last device option allows using ccache though the use of
# pre-compile header
# (sloppiness must be set to pch_defines,time_macros in ccache config)
# For simplicity, this package only includes a static build so far
# (no 2 variants like mingw-w64-qt5-base/mingw-w64-qt5-base-static available)
# It uses the native MacOS API ("-securetransport") rather than OpenSSL
# MySQL and PostgreSQL are disabled, because needed packages are not available
# yet, for the same reason bundled freetype2 and harfbuzz are used
local qt_configure_args="\
-static \
-xplatform macx-clang \
-securetransport \
-optimized-qmake \
-verbose \
-opensource \
-confirm-license \
-force-debug-info \
-sql-sqlite \
-no-glib \
-no-icu \
-nomake examples \
-make tools \
-hostprefix ${_osxcrossprefix}/${_arch} \
-hostdatadir ${_osxcrossprefix}/${_arch}/lib/qt \
-hostbindir ${_osxcrossprefix}/${_arch}/lib/qt/bin \
-prefix ${_osxcrossprefix}/${_arch} \
-bindir ${_osxcrossprefix}/${_arch}/bin \
-archdatadir ${_osxcrossprefix}/${_arch}/lib/qt \
-datadir ${_osxcrossprefix}/${_arch}/share/qt \
-docdir ${_osxcrossprefix}/${_arch}/share/doc/qt \
-examplesdir ${_osxcrossprefix}/${_arch}/share/qt/examples \
-headerdir ${_osxcrossprefix}/${_arch}/include/qt \
-libdir ${_osxcrossprefix}/${_arch}/lib \
-plugindir ${_osxcrossprefix}/${_arch}/lib/qt/plugins \
-sysconfdir ${_osxcrossprefix}/${_arch}/etc \
-translationdir ${_osxcrossprefix}/${_arch}/share/qt/translations \
QMAKE_APPLE_DEVICE_ARCHS=${_arch%%-*} \
QMAKE_MACOSX_DEPLOYMENT_TARGET=10.5 \
-device-option CROSS_COMPILE=${_arch}- \
-device-option QMAKE_MACOSX_STDLIB=libstdc++ \
-device-option CROSS_COMPILE_CFLAGS=-fpch-preprocess"
# Disable debug build (unless APPLE_DARWIN_QT_DEBUG_BUILD is defined)
[[ $APPLE_DARWIN_QT_DEBUG_BUILD ]] \
&& qt_configure_args+=' -debug_and_release' \
|| qt_configure_args+=' -release'
mkdir -p ../build-${_arch} && pushd ../build-${_arch}
../${_pkgfqn}/configure $qt_configure_args
make
popd
done
}
package() {
init_osxcross
for _arch in ${_architectures}; do
cd "$srcdir/${_pkgfqn}"
make install -C ../build-${_arch} INSTALL_ROOT="${pkgdir}"
# Create symlinks for tools
mkdir -p "${pkgdir}/${_osxcrossprefix}/bin"
for tool in qmake moc rcc uic qdbuscpp2xml qdbusxml2cpp qdoc syncqt.pl; do
ln -s "../${_arch}/lib/qt/bin/${tool}" "${pkgdir}/${_osxcrossprefix}/bin/${_arch}-${tool}-qt5"
done
# Remove doc
rm -rf "${pkgdir}/${_osxcrossprefix}/${_arch}/share"
# Strip the binaries, remove debug libraries
strip --strip-all "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/qt/bin/"*[!.pl]
strip -g "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/libQt5Bootstrap.a"
# TODO: Still not sure which kind of binaries (shared/static lib, application) should be stripped how
find "${pkgdir}/${_osxcrossprefix}" -name "*.dylib" -a -not -iname '*_debug*' -exec ${_osxcrossprefix}/bin/${_arch}-strip -S -x {} \;
find "${pkgdir}/${_osxcrossprefix}" -name '*.a' -a -not -iname '*_debug.a' -a -not -iname '*DevTools.a' -a -not -iname '*Bootstrap.a' -exec ${_osxcrossprefix}/bin/${_arch}-strip -S -x {} \;
[[ $APPLE_DARWIN_QT_DEBUG_BUILD ]] || find "${pkgdir}/${_osxcrossprefix}" -iname '*_debug*' -exec rm {} \;
done
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$pkgdir/${_osxcrossprefix}" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
}

View File

@ -0,0 +1,22 @@
From d974e620811a07888c0205d5ca7940c6d1f9be5b Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 23 Oct 2016 01:18:13 +0200
Subject: [PATCH 2/3] Ensure static plugins are exported
---
src/qml/Qt5QmlConfigExtras.cmake.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qml/Qt5QmlConfigExtras.cmake.in b/src/qml/Qt5QmlConfigExtras.cmake.in
index 9ddb9885c..9775d85e0 100644
--- a/src/qml/Qt5QmlConfigExtras.cmake.in
+++ b/src/qml/Qt5QmlConfigExtras.cmake.in
@@ -1,4 +1,4 @@
-file(GLOB _qt5qml_other_plugins "${CMAKE_CURRENT_LIST_DIR}/Qt5Qml_*Factory.cmake")
+file(GLOB _qt5qml_other_plugins "${CMAKE_CURRENT_LIST_DIR}/*Qt5Qml_*Factory.cmake")
foreach(_other_plugin ${_qt5qml_other_plugins})
include(${_other_plugin} OPTIONAL)
--
2.13.2

View File

@ -0,0 +1,37 @@
From 6a34e383816f0ef74241980e7d712fd51974b40d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sat, 4 Feb 2017 01:59:59 +0100
Subject: [PATCH 3/3] Prevent exporting QML parser symbols on static build
---
src/qml/parser/qqmljsglobal_p.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qml/parser/qqmljsglobal_p.h b/src/qml/parser/qqmljsglobal_p.h
index 0e195994b..8aa451e9d 100644
--- a/src/qml/parser/qqmljsglobal_p.h
+++ b/src/qml/parser/qqmljsglobal_p.h
@@ -56,9 +56,9 @@
# define QT_QML_BEGIN_NAMESPACE
# define QT_QML_END_NAMESPACE
-# ifdef QDECLARATIVEJS_BUILD_DIR
+# if defined(QDECLARATIVEJS_BUILD_DIR) && !defined(QT_STATIC)
# define QML_PARSER_EXPORT Q_DECL_EXPORT
-# elif QML_BUILD_STATIC_LIB
+# elif defined(QML_BUILD_STATIC_LIB) || defined(QT_STATIC)
# define QML_PARSER_EXPORT
# else
# define QML_PARSER_EXPORT Q_DECL_IMPORT
@@ -68,7 +68,7 @@
# define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
# define QT_QML_END_NAMESPACE QT_END_NAMESPACE
# ifndef QT_STATIC
-# if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
+# if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB) || defined(QT_STATIC)
// QmlDevTools is a static library
# define QML_PARSER_EXPORT
# elif defined(QT_BUILD_QML_LIB)
--
2.13.2

View File

@ -0,0 +1,82 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_qt_module=qtdeclarative
pkgname='apple-darwin-qt5-declarative'
pkgver=5.9.1
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="Classes for QML and JavaScript languages (apple-darwin)"
depends=('apple-darwin-qt5-base')
makedepends=('clang' 'python')
options=('!strip' '!buildflags' 'staticlibs')
groups=('apple-darwin-qt5')
license=('GPL3' 'LGPL3' 'FDL' 'custom')
url='https://www.qt.io/'
_pkgfqn="${_qt_module}-opensource-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/submodules/${_pkgfqn}.tar.xz")
sha256sums=('d2fe6c9c1a9f19af6e96553c6d75366ab8f397bc232acd67d31476955fee94ff'
'd93731901616f494b5474cf78ec938c4c7e9e79a088457275b97f1f65cc82fe3')
_architectures='x86_64-apple-darwin15'
_configurations+=('CONFIG+=static')
_osxcrossprefix='/opt/osxcross'
init_osxcross() {
# add osxcross toolchain to path
export PATH="${_osxcrossprefix}/bin:$PATH"
# enable use of ccache (if installed)
[[ -f /usr/bin/ccache ]] && \
export PATH="${_osxcrossprefix}/lib/ccache/bin:$PATH"
}
build() {
cd "${srcdir}/${_pkgfqn}"
init_osxcross
for _arch in ${_architectures}; do
for _config in "${_configurations[@]}"; do
msg2 "Building ${_config##*=} version for ${_arch}"
mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=}
${_osxcrossprefix}/bin/${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config}
# Search paths for host standard library (/usr/lib) and for Qt5Bootstrap (/usr/$_arch/lib) are not set correctly by qmake
# hence we need insert those paths manually
make qmake_all
find ./src/qmldevtools -type f -iname 'Makefile' -exec sed -i "s|-L$_osxcrossprefix/$_arch/lib -lQt5Bootstrap|-L/usr/lib $_osxcrossprefix/$_arch/lib/libQt5Bootstrap.a|g" {} \;
find . -type f -iname 'Makefile' -exec sed -i "s|-L$PWD/lib -L$_osxcrossprefix/$_arch/lib -lQt5Bootstrap|-L/usr/lib -L$PWD/lib $_osxcrossprefix/$_arch/lib/libQt5Bootstrap.a|g" {} \;
find . -type f -iname 'Makefile' -exec sed -i "s|-L$_osxcrossprefix/$_arch/lib -lQt5Bootstrap|-L/usr/lib $_osxcrossprefix/$_arch/lib/libQt5Bootstrap.a|g" {} \;
[ ${_config##*=} == 'shared' ] && local _ext='so' || local _ext='a'
find . -type f -iname 'Makefile' -exec sed -i "s|-L$PWD/lib -lQt5QmlDevTools|-L/usr/lib -L$PWD/lib ${srcdir}/${_pkgfqn}/build-${_arch}-${_config##*=}/lib/libQt5QmlDevTools.${_ext}|g" {} \;
find . -type f -iname 'Makefile' -exec sed -i "s|-lQt5QmlDevTools|-L/usr/lib ${srcdir}/${_pkgfqn}/build-${_arch}-${_config##*=}/lib/libQt5QmlDevTools.${_ext}|g" {} \;
make
popd
done
done
}
package() {
cd "${srcdir}/${_pkgfqn}"
init_osxcross
for _arch in ${_architectures}; do
for _config in "${_configurations[@]}"; do
pushd build-${_arch}-${_config##*=}
make INSTALL_ROOT="$pkgdir" install
# Strip the binaries, remove debug libraries
find "${pkgdir}/${_osxcrossprefix}" -name "*.dylib" -a -not -iname '*_debug*' -exec ${_osxcrossprefix}/bin/${_arch}-strip -S -x {} \;
find "${pkgdir}/${_osxcrossprefix}" -name '*.a' -a -not -iname '*_debug.a' -a -not -iname '*DevTools.a' -a -not -iname '*Bootstrap.a' -exec ${_osxcrossprefix}/bin/${_arch}-strip -S -x {} \;
[[ $APPLE_DARWIN_QT_DEBUG_BUILD ]] || \
find "${pkgdir}/${_osxcrossprefix}" -iname '*_debug*' -exec rm {} \;
[[ -d "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/qt/bin/" ]] && \
find "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \;
find "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/" -iname "*DevTools.a" -exec strip -g {} \;
popd
done
done
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$pkgdir/${_osxcrossprefix}" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
}

View File

@ -0,0 +1,75 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_qt_module=qtimageformats
pkgname='apple-darwin-qt5-imageformats'
pkgver=5.9.1
pkgrel=1
arch=('any')
pkgdesc="Plugins for additional image formats: TIFF, MNG, TGA, WBMP (apple-darwin)"
depends=('apple-darwin-qt5-base')
# these dependencies will enable further functionality
#depends+=('apple-darwin-jasper') # for JPEG-2000 Part-1
#depends+=('apple-darwin-libmng') # for MNG
#depends+=('apple-darwin-libwebp') # for WebP
makedepends=('clang')
options=('!strip' '!buildflags' 'staticlibs')
groups=('apple-darwin-qt5')
license=('GPL3' 'LGPL' 'FDL' 'custom')
url='https://www.qt.io/'
_pkgfqn="${_qt_module}-opensource-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/submodules/${_pkgfqn}.tar.xz")
sha256sums=('79fee307310a66100bd3d907ea69bd039dcd727c15f27e990167e7a27d1b8a47')
_architectures='x86_64-apple-darwin15'
_configurations+=('CONFIG+=static')
_osxcrossprefix='/opt/osxcross'
init_osxcross() {
# add osxcross toolchain to path
export PATH="${_osxcrossprefix}/bin:$PATH"
# enable use of ccache (if installed)
[[ -f /usr/bin/ccache ]] && \
export PATH="${_osxcrossprefix}/lib/ccache/bin:$PATH"
}
build() {
cd "${srcdir}/${_pkgfqn}"
init_osxcross
for _arch in ${_architectures}; do
for _config in "${_configurations[@]}"; do
msg2 "Building ${_config##*=} version for ${_arch}"
mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=}
${_osxcrossprefix}/bin/${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_debug_config}
make
popd
done
done
}
package() {
cd "${srcdir}/${_pkgfqn}"
init_osxcross
for _arch in ${_architectures}; do
for _config in "${_configurations[@]}"; do
pushd build-${_arch}-${_config##*=}
make INSTALL_ROOT="$pkgdir" install
# Strip the binaries, remove debug libraries
find "${pkgdir}/${_osxcrossprefix}" -name "*.dylib" -a -not -iname '*_debug*' -exec ${_osxcrossprefix}/bin/${_arch}-strip -S -x {} \;
find "${pkgdir}/${_osxcrossprefix}" -name '*.a' -a -not -iname '*_debug.a' -a -not -iname '*Bootstrap.a' -exec ${_osxcrossprefix}/bin/${_arch}-strip -S -x {} \;
[[ $APPLE_DARWIN_QT_DEBUG_BUILD ]] || \
find "${pkgdir}/${_osxcrossprefix}" -iname '*_debug*' -exec rm {} \;
[[ -d "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/qt/bin/" ]] && \
find "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \;
find "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/" -iname "*DevTools.a" -exec strip -g {} \;
popd
done
done
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$pkgdir/${_osxcrossprefix}" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
}

View File

@ -0,0 +1,71 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_qt_module=qtsvg
pkgname='apple-darwin-qt5-svg'
pkgver=5.9.1
pkgrel=1
arch=('any')
pkgdesc="Classes for displaying the contents of SVG files (apple-darwin)"
depends=('apple-darwin-qt5-base')
makedepends=('clang')
options=('!strip' '!buildflags' 'staticlibs')
groups=('apple-darwin-qt5')
license=('GPL3' 'LGPL' 'FDL' 'custom')
url='https://www.qt.io/'
_pkgfqn="${_qt_module}-opensource-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/submodules/${_pkgfqn}.tar.xz")
sha256sums=('99f294f874b13553e4ed49cd9465580ad0c9b92e29cdfa47b2e4096835c1e2e5')
_architectures='x86_64-apple-darwin15'
_configurations+=('CONFIG+=static')
_osxcrossprefix='/opt/osxcross'
init_osxcross() {
# add osxcross toolchain to path
export PATH="${_osxcrossprefix}/bin:$PATH"
# enable use of ccache (if installed)
[[ -f /usr/bin/ccache ]] && \
export PATH="${_osxcrossprefix}/lib/ccache/bin:$PATH"
}
build() {
cd "${srcdir}/${_pkgfqn}"
init_osxcross
for _arch in ${_architectures}; do
for _config in "${_configurations[@]}"; do
msg2 "Building ${_config##*=} version for ${_arch}"
mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=}
${_osxcrossprefix}/bin/${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_debug_config}
make
popd
done
done
}
package() {
cd "${srcdir}/${_pkgfqn}"
init_osxcross
for _arch in ${_architectures}; do
for _config in "${_configurations[@]}"; do
pushd build-${_arch}-${_config##*=}
make INSTALL_ROOT="$pkgdir" install
# Strip the binaries, remove debug libraries
find "${pkgdir}/${_osxcrossprefix}" -name "*.dylib" -a -not -iname '*_debug*' -exec ${_osxcrossprefix}/bin/${_arch}-strip -S -x {} \;
find "${pkgdir}/${_osxcrossprefix}" -name '*.a' -a -not -iname '*_debug.a' -a -not -iname '*Bootstrap.a' -exec ${_osxcrossprefix}/bin/${_arch}-strip -S -x {} \;
[[ $APPLE_DARWIN_QT_DEBUG_BUILD ]] || \
find "${pkgdir}/${_osxcrossprefix}" -iname '*_debug*' -exec rm {} \;
[[ -d "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/qt/bin/" ]] && \
find "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \;
find "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/" -iname "*DevTools.a" -exec strip -g {} \;
popd
done
done
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$pkgdir/${_osxcrossprefix}" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
}

View File

@ -0,0 +1,42 @@
From 74188cdf0f85a90bf86f251480d6a41b7ea61be2 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 25 Sep 2016 21:44:42 +0200
Subject: [PATCH] Fix linguist macro
- Prevent CMake appending extra 'Qt5::lupdate'/'Qt5::lrelease' to
command line when invoking lupdate/lrelease
- Achieved by resolveing the IMPORTED_LOCATION manually
---
src/linguist/Qt5LinguistToolsMacros.cmake | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake
index 6013cc6e..2e797326 100644
--- a/src/linguist/Qt5LinguistToolsMacros.cmake
+++ b/src/linguist/Qt5LinguistToolsMacros.cmake
@@ -71,8 +71,10 @@ function(QT5_CREATE_TRANSLATION _qm_files)
file(WRITE ${_ts_lst_file} "${_lst_file_srcs}")
endif()
+
+ get_target_property(LUPDATE_LOC ${Qt5_LUPDATE_EXECUTABLE} IMPORTED_LOCATION)
add_custom_command(OUTPUT ${_ts_file}
- COMMAND ${Qt5_LUPDATE_EXECUTABLE}
+ COMMAND ${LUPDATE_LOC}
ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file}
DEPENDS ${_my_sources} ${_ts_lst_file} VERBATIM)
endforeach()
@@ -93,8 +95,9 @@ function(QT5_ADD_TRANSLATION _qm_files)
set(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm")
endif()
+ get_target_property(LRELEASE_LOC ${Qt5_LRELEASE_EXECUTABLE} IMPORTED_LOCATION)
add_custom_command(OUTPUT ${qm}
- COMMAND ${Qt5_LRELEASE_EXECUTABLE}
+ COMMAND ${LRELEASE_LOC}
ARGS ${_abs_FILE} -qm ${qm}
DEPENDS ${_abs_FILE} VERBATIM
)
--
2.13.2

View File

@ -0,0 +1,95 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_qt_module=qttools
pkgname="apple-darwin-qt5-tools"
pkgver=5.9.1
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="A cross-platform application and UI framework (Development Tools, QtHelp; apple-darwin)"
depends=('apple-darwin-qt5-declarative')
makedepends=('clang')
options=('!strip' '!buildflags' 'staticlibs')
groups=('apple-darwin-qt5')
license=('GPL3' 'LGPL3' 'FDL' 'custom')
url='https://www.qt.io/'
_pkgfqn="${_qt_module}-opensource-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/submodules/${_pkgfqn}.tar.xz"
'0001-Fix-linguist-macro.patch')
sha256sums=('c4eb56cf24a75661b8317b566be37396c90357b4f6730ef12b8c97a7079ca0e8'
'de1f0114b723d07f1c7a2c11c15e8c5b05852c690e3a36d3f65f3a411fd81127')
_architectures='x86_64-apple-darwin15'
_configurations+=('CONFIG+=static')
_osxcrossprefix='/opt/osxcross'
prepare() {
cd "${srcdir}/${_pkgfqn}"
# Apply patches; further descriptions can be found in patch files itself
for patch in "$srcdir/"*.patch; do
patch -p1 -i "$patch"
done
}
init_osxcross() {
# add osxcross toolchain to path
export PATH="${_osxcrossprefix}/bin:$PATH"
# enable use of ccache (if installed)
[[ -f /usr/bin/ccache ]] && \
export PATH="${_osxcrossprefix}/lib/ccache/bin:$PATH"
}
build() {
cd "${srcdir}/${_pkgfqn}"
init_osxcross
for _arch in ${_architectures}; do
for _config in "${_configurations[@]}"; do
msg2 "Building ${_config##*=} version for ${_arch}"
mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=}
${_osxcrossprefix}/bin/${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config}
# Search paths for host standard library (/usr/lib) and for Qt5Bootstrap (/usr/$_arch/lib) are not set correctly by qmake
# hence we need insert those paths manually
make qmake_all
find . -type f -iname 'Makefile' -exec sed -i "s|-L$_osxcrossprefix/$_arch/lib -lQt5QmlDevTools -lQt5Bootstrap|-L/usr/lib $_osxcrossprefix/$_arch/lib/libQt5QmlDevTools.a $_osxcrossprefix/$_arch/lib/libQt5Bootstrap.a|g" {} \;
find . -type f -iname 'Makefile' -exec sed -i "s|-L$_osxcrossprefix/$_arch/lib -lQt5QmlDevTools|-L/usr/lib $_osxcrossprefix/$_arch/lib/libQt5QmlDevTools.a|g" {} \;
find . -type f -iname 'Makefile' -exec sed -i "s|-L$_osxcrossprefix/$_arch/lib -lQt5Bootstrap|-L/usr/lib $_osxcrossprefix/$_arch/lib/libQt5Bootstrap.a|g" {} \;
make
popd
done
done
}
package() {
cd "${srcdir}/${_pkgfqn}"
init_osxcross
for _arch in ${_architectures}; do
for _config in "${_configurations[@]}"; do
pushd build-${_arch}-${_config##*=}
make INSTALL_ROOT="$pkgdir" install
# Strip the binaries, remove debug libraries
find "${pkgdir}/${_osxcrossprefix}" -name "*.dylib" -a -not -iname '*_debug*' -exec ${_osxcrossprefix}/bin/${_arch}-strip -S -x {} \;
find "${pkgdir}/${_osxcrossprefix}" -name '*.a' -a -not -iname '*_debug.a' -a -not -iname '*DevTools.a' -a -not -iname '*Bootstrap.a' -exec ${_osxcrossprefix}/bin/${_arch}-strip -S -x {} \;
[[ $APPLE_DARWIN_QT_DEBUG_BUILD ]] || \
find "${pkgdir}/${_osxcrossprefix}" -iname '*_debug*' -exec rm {} \;
[[ -d "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/qt/bin/" ]] && \
find "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \;
find "${pkgdir}/${_osxcrossprefix}/${_arch}/lib/" -iname "*DevTools.a" -exec strip -g {} \;
# Create symlinks for tools
mkdir -p "${pkgdir}/${_osxcrossprefix}/bin"
for tool in lconvert lupdate lrelease; do
ln -s "../${_arch}/lib/qt/bin/${tool}" "${pkgdir}/${_osxcrossprefix}/bin/${_arch}-${tool}-qt5"
done
popd
done
done
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$pkgdir/${_osxcrossprefix}" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
}

View File

@ -0,0 +1,59 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_qt_module=qttranslations
pkgname='apple-darwin-qt5-translations'
pkgver=5.9.1
pkgrel=1
arch=('any')
pkgdesc="A cross-platform application and UI framework (translations, apple-darwin)"
depends=('apple-darwin-qt5-base')
makedepends=('clang' 'apple-darwin-qt5-tools')
options=('!strip' '!buildflags' 'staticlibs')
groups=('apple-darwin-qt5')
license=('GPL3' 'LGPL3' 'FDL' 'custom')
url='https://www.qt.io/'
_pkgfqn="${_qt_module}-opensource-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/submodules/${_pkgfqn}.tar.xz")
sha256sums=('4a12528a14ed77f31672bd7469cad30624e7b672f241b8f19ad59510298eb269')
_architectures='x86_64-apple-darwin15'
_configurations+=('CONFIG+=static')
_osxcrossprefix='/opt/osxcross'
init_osxcross() {
# add osxcross toolchain to path
export PATH="${_osxcrossprefix}/bin:$PATH"
# enable use of ccache (if installed)
[[ -f /usr/bin/ccache ]] && \
export PATH="${_osxcrossprefix}/lib/ccache/bin:$PATH"
}
build() {
cd "${srcdir}/${_pkgfqn}"
init_osxcross
for _arch in ${_architectures}; do
for _config in "${_configurations[@]}"; do
msg2 "Building ${_config##*=} version for ${_arch}"
mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=}
${_osxcrossprefix}/bin/${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_debug_config}
make
popd
done
done
}
package() {
cd "${srcdir}/${_pkgfqn}"
init_osxcross
for _arch in ${_architectures}; do
for _config in "${_configurations[@]}"; do
pushd build-${_arch}-${_config##*=}
make INSTALL_ROOT="$pkgdir" install
popd
done
done
}