PKGBUILDs/extra/qt5-declarative/PKGBUILD
2016-12-05 02:49:01 +00:00

63 lines
1.9 KiB
Bash

# $Id: PKGBUILD 240297 2015-06-03 10:22:03Z fyan $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - upstream patch for AArch64
pkgname=qt5-declarative
_qtver=5.7.0
pkgver=${_qtver/-/}
pkgrel=3.1
arch=('i686' 'x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
pkgdesc='Classes for QML and JavaScript languages'
depends=('qt5-xmlpatterns')
makedepends=('python2' 'cmake')
groups=('qt' 'qt5')
conflicts=('qtchooser')
_pkgfqn="${pkgname/5-/}-opensource-src-${_qtver}"
source=("http://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz" qt5-declarative-gcc6.patch
0001-V4-Align-stack-on-16-byte-boundaries-in-the-YarrJIT.patch)
md5sums=('0d9e461aa54dba4793253fa2eb501f9b'
'fb2a2a118b356a0a4635111f2e0b0ee6'
'8fc2535cf40f3b8023461b4ca86d07f1')
prepare() {
mkdir -p build
# Use python2 for Python 2.x
find -name '*.pro' -o -name '*.pri' | xargs sed -i -e 's|python -c|python2 -c|g' -e 's|python \$|python2 \$|g'
# Fix i686 segfaults with GCC 6 https://bugreports.qt.io/browse/QTBUG-52057 (Fedora patch)
cd ${_pkgfqn}
patch -p1 -i ../qt5-declarative-gcc6.patch
patch -p1 -i ../0001-V4-Align-stack-on-16-byte-boundaries-in-the-YarrJIT.patch
}
build() {
cd build
export PYTHON=python2
qmake ../${_pkgfqn}
make
}
package() {
cd build
make INSTALL_ROOT="$pkgdir" install
# Symlinks for backwards compatibility
for b in "$pkgdir"/usr/bin/*; do
ln -s /usr/bin/$(basename $b) "$pkgdir"/usr/bin/$(basename $b)-qt5
done
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$pkgdir/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
install -d "$pkgdir"/usr/share/licenses
ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
}