diff options
author | Martchus | 2017-08-09 22:24:26 +0200 |
---|---|---|
committer | Martchus | 2017-08-09 22:24:26 +0200 |
commit | 120bb19dffaad5c818595feaf36e1ca3ebe1de82 (patch) | |
tree | 792e107a36bdcda4ea7f6769b2e8dbacde6ba716 | |
download | aur-120bb19dffaad5c818595feaf36e1ca3ebe1de82.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | 0002-Ensure-static-plugins-are-exported.patch | 22 | ||||
-rw-r--r-- | 0003-Prevent-exporting-QML-parser-symbols-on-static-build.patch | 37 | ||||
-rw-r--r-- | PKGBUILD | 82 |
4 files changed, 167 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c5d2a8480677 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +# Generated by mksrcinfo v8 +# Wed Aug 9 20:24:26 UTC 2017 +pkgbase = apple-darwin-qt5-declarative + pkgdesc = Classes for QML and JavaScript languages (apple-darwin) + pkgver = 5.9.1 + pkgrel = 1 + url = https://www.qt.io/ + arch = i686 + arch = x86_64 + groups = apple-darwin-qt5 + license = GPL3 + license = LGPL3 + license = FDL + license = custom + makedepends = clang + makedepends = python + depends = apple-darwin-qt5-base + options = !strip + options = !buildflags + options = staticlibs + source = https://download.qt.io/official_releases/qt/5.9/5.9.1/submodules/qtdeclarative-opensource-src-5.9.1.tar.xz + sha256sums = d2fe6c9c1a9f19af6e96553c6d75366ab8f397bc232acd67d31476955fee94ff + sha256sums = d93731901616f494b5474cf78ec938c4c7e9e79a088457275b97f1f65cc82fe3 + +pkgname = apple-darwin-qt5-declarative + diff --git a/0002-Ensure-static-plugins-are-exported.patch b/0002-Ensure-static-plugins-are-exported.patch new file mode 100644 index 000000000000..1f199c061074 --- /dev/null +++ b/0002-Ensure-static-plugins-are-exported.patch @@ -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 + diff --git a/0003-Prevent-exporting-QML-parser-symbols-on-static-build.patch b/0003-Prevent-exporting-QML-parser-symbols-on-static-build.patch new file mode 100644 index 000000000000..d1bd0b185dd8 --- /dev/null +++ b/0003-Prevent-exporting-QML-parser-symbols-on-static-build.patch @@ -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 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..abd0cdacb9a9 --- /dev/null +++ b/PKGBUILD @@ -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' {} \; +} |