PKGBUILDs/extra/qt5/PKGBUILD

397 lines
12 KiB
Bash
Raw Normal View History

2013-03-02 01:46:59 +00:00
# $Id: PKGBUILD 179039 2013-03-01 20:22:01Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - removed libfbclient, ibase
# - no x86/neon optimizations
2013-07-07 22:22:28 +00:00
# - restricted makeflags to -j3
# - enabled opengl es2, mesa makedepend for headers
2013-06-07 19:11:41 +00:00
# - added Raspberry Pi patches for armv6h
2013-07-07 22:22:28 +00:00
# - icu makedepend so qtwebkit can build
2013-03-02 01:46:59 +00:00
2013-03-04 01:10:31 +00:00
highmem=1
2013-03-02 01:46:59 +00:00
pkgbase=qt5
pkgname=('qt5-base'
'qt5-declarative'
'qt5-graphicaleffects'
'qt5-imageformats'
'qt5-jsbackend'
'qt5-multimedia'
'qt5-quick1'
2013-07-06 19:22:08 +00:00
'qt5-quickcontrols'
2013-03-02 01:46:59 +00:00
'qt5-script'
2013-07-06 19:22:08 +00:00
'qt5-sensors'
'qt5-serialport'
2013-03-02 01:46:59 +00:00
'qt5-svg'
'qt5-tools'
'qt5-translations'
'qt5-webkit'
2013-07-06 19:22:08 +00:00
'qt5-x11extras'
2013-03-02 01:46:59 +00:00
'qt5-xmlpatterns')
2013-07-06 19:30:48 +00:00
pkgver=5.1.0
2013-08-28 00:38:16 +00:00
pkgrel=2
2013-03-02 01:46:59 +00:00
arch=('i686' 'x86_64')
url='http://qt-project.org/'
2013-08-28 00:38:16 +00:00
license=('GPL3' 'LGPL' 'FDL' 'custom')
2013-03-02 01:46:59 +00:00
makedepends=('libxcb' 'xcb-proto' 'xcb-util' 'xcb-util-image' 'xcb-util-wm' 'xcb-util-keysyms'
'mesa-libgl' 'at-spi2-core' 'alsa-lib' 'gstreamer0.10-base-plugins'
'libjpeg-turbo' 'cups' 'libpulse' 'hicolor-icon-theme' 'desktop-file-utils'
2013-03-26 02:59:39 +00:00
'postgresql-libs' 'libmariadbclient' 'sqlite' 'unixodbc'
2013-03-04 01:10:31 +00:00
'python2' 'ruby' 'gperf' 'libxslt' 'libxcomposite' 'fontconfig'
2013-07-07 00:40:25 +00:00
'libmng' 'openal' 'gtk2' 'mesa' 'libxkbcommon' 'icu')
2013-03-02 01:46:59 +00:00
groups=('qt' 'qt5')
2013-07-07 22:22:28 +00:00
options=('!libtool')
2013-03-02 01:46:59 +00:00
_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
2013-07-06 19:22:08 +00:00
source=("http://download.qt-project.org/official_releases/qt/5.1/${pkgver}/single/${_pkgfqn}.tar.xz"
'assistant.desktop' 'designer.desktop' 'linguist.desktop' 'qdbusviewer.desktop'
'use-python2.patch'
2013-08-28 00:38:16 +00:00
'deppath_gnu.patch' 'rpi.patch' 'undef_B0.patch'
'bison3.patch')
2013-07-06 20:36:03 +00:00
md5sums=('44a507beebef73eb364b5a2ec7bbe090'
2013-07-06 19:22:08 +00:00
'b2897dd6a2967bccf8f10e397aafee55'
'9638a78e502719ef8fe5f8d10d0361a9'
'188da8f4c87316e730ebf1c6217bf5a0'
'322b419b16c75d4de0ee7ad0a246caa1'
'92831f79144d5cb8121915423ba47575'
2013-07-06 20:36:03 +00:00
'21e4389ed0dd9c37e7cb48712d3bff91'
'3f8d2f8fb4e5715f7ce79950fac3c31f'
2013-08-28 00:38:16 +00:00
'8a9ba2d990d8840a2114fcffb9f9d2a4'
'6b162cd2bc104f0ae83ca039401be7bf')
2013-03-02 01:46:59 +00:00
2013-07-06 19:22:08 +00:00
prepare() {
2013-03-02 01:46:59 +00:00
cd ${_pkgfqn}
2013-03-28 19:29:42 +00:00
MAKEFLAGS="-j3"
2013-07-07 22:22:28 +00:00
# Raspberry Pi
if [ "$CARCH" == 'armv6h' ]; then
2013-07-07 22:22:28 +00:00
patch -p1 -i "${srcdir}"/deppath_gnu.patch
patch -p1 -i "${srcdir}"/rpi.patch
patch -p1 -i "${srcdir}"/undef_B0.patch
rbp_config="-device linux-rasp-pi-g++ -eglfs"
export CXXFLAGS=${CXXFLAGS}" -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
fi
2013-03-02 01:46:59 +00:00
sed -i "s|-O2|${CXXFLAGS}|" qtbase/mkspecs/common/{g++,gcc}-base.conf
sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" qtbase/mkspecs/common/gcc-base-unix.conf
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" qtbase/mkspecs/common/gcc-base.conf
# Use python2 for Python 2.x
patch -p1 -i "${srcdir}"/use-python2.patch
sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
$(find . -name '*.py')
2013-08-28 00:38:16 +00:00
# Fix build with bison 3.x
cd qtwebkit
patch -p1 -i "${srcdir}"/bison3.patch
2013-07-06 19:22:08 +00:00
}
build() {
cd ${_pkgfqn}
export QTDIR="${srcdir}"/${_pkgfqn}
export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
2013-07-06 19:22:08 +00:00
PYTHON=/usr/bin/python2 ./configure -confirm-license -opensource \
2013-03-02 01:46:59 +00:00
-prefix /usr \
-bindir /usr/lib/qt/bin \
2013-03-02 01:46:59 +00:00
-docdir /usr/share/doc/qt \
-headerdir /usr/include/qt \
2013-03-02 01:46:59 +00:00
-archdatadir /usr/lib/qt \
-datadir /usr/share/qt \
-sysconfdir /etc/xdg \
-examplesdir /usr/share/doc/qt/examples \
-plugin-sql-{psql,mysql,sqlite,odbc} \
-system-sqlite \
-openssl-linked \
-nomake docs \
-nomake examples \
-nomake tests \
-no-rpath \
-optimized-qmake \
-dbus-linked \
-reduce-relocations \
-no-sse2 \
-no-sse3 \
-no-ssse3 \
-no-sse4.1 \
-no-sse4.2 \
-no-avx \
-no-avx2 \
-no-neon \
2013-06-07 19:11:41 +00:00
-opengl es2 \
$rbp_config
2013-03-02 01:46:59 +00:00
make
}
package_qt5-base() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework'
2013-03-02 01:46:59 +00:00
depends=('libjpeg-turbo' 'xcb-util-keysyms' 'libgl' 'dbus' 'fontconfig' 'systemd'
'xcb-util-wm' 'libxrender' 'libxi' 'sqlite' 'libpng' 'xcb-util-image'
2013-07-06 19:22:08 +00:00
'icu' 'qtchooser' 'libxkbcommon')
2013-03-02 01:46:59 +00:00
optdepends=('postgresql-libs: PostgreSQL driver'
2013-03-25 21:20:48 +00:00
'libmariadbclient: MariaDB driver'
2013-03-02 01:46:59 +00:00
'unixodbc: ODBC driver')
conflicts=('qt')
cd ${_pkgfqn}/qtbase
make INSTALL_ROOT="${pkgdir}" install
cd "${srcdir}"
install -D -m644 ${_pkgfqn}/qtbase/LGPL_EXCEPTION.txt \
${pkgdir}/usr/share/licenses/${pkgbase}/LGPL_EXCEPTION.txt
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
# Fix wrong qmake path in pri file
sed -i "s|${srcdir}/${_pkgfqn}/qtbase|/usr|" \
"${pkgdir}"/usr/lib/qt/mkspecs/modules/qt_lib_bootstrap.pri
# Useful symlinks
install -d "${pkgdir}"/usr/bin
for b in "${pkgdir}"/usr/lib/qt/bin/*; do
ln -s /usr/lib/qt/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
done
2013-03-02 01:46:59 +00:00
}
package_qt5-declarative() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (QtQml, QtQuick)'
2013-03-02 01:46:59 +00:00
depends=('qt5-jsbackend' 'qt5-xmlpatterns')
conflicts=('qt')
cd ${_pkgfqn}/qtdeclarative
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
2013-04-16 21:25:57 +00:00
# Useful symlinks
install -d "${pkgdir}"/usr/bin
for b in "${pkgdir}"/usr/lib/qt/bin/*; do
ln -s /usr/lib/qt/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
done
}
2013-03-02 01:46:59 +00:00
package_qt5-jsbackend() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (QtV8)'
2013-03-02 01:46:59 +00:00
depends=('qt5-base')
cd ${_pkgfqn}/qtjsbackend
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
}
package_qt5-xmlpatterns() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (QtXmlPatterns)'
2013-03-02 01:46:59 +00:00
depends=('qt5-base')
conflicts=('qt')
cd ${_pkgfqn}/qtxmlpatterns
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
2013-04-16 21:25:57 +00:00
# Useful symlinks
install -d "${pkgdir}"/usr/bin
for b in "${pkgdir}"/usr/lib/qt/bin/*; do
ln -s /usr/lib/qt/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
done
2013-03-02 01:46:59 +00:00
}
package_qt5-translations() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (Translations)'
2013-03-02 01:46:59 +00:00
depends=('qt5-base')
conflicts=('qt')
cd ${_pkgfqn}/qttranslations
make INSTALL_ROOT="${pkgdir}" install
}
package_qt5-multimedia() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (QtMultimedia)'
depends=('qt5-declarative' 'libpulse' 'gstreamer0.10-base' 'openal')
2013-03-02 01:46:59 +00:00
conflicts=('qt')
cd ${_pkgfqn}/qtmultimedia
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
}
package_qt5-graphicaleffects() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (QtGraphicalEffects)'
2013-03-02 01:46:59 +00:00
depends=('qt5-declarative')
cd ${_pkgfqn}/qtgraphicaleffects
make INSTALL_ROOT="${pkgdir}" install
}
package_qt5-imageformats() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (Images plugins)'
depends=('qt5-base' 'libtiff' 'libmng')
2013-03-02 01:46:59 +00:00
conflicts=('qt')
cd ${_pkgfqn}/qtimageformats
make INSTALL_ROOT="${pkgdir}" install
}
package_qt5-quick1() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (QtDeclarative)'
2013-03-02 01:46:59 +00:00
depends=('qt5-webkit' 'qt5-script')
conflicts=('qt')
cd ${_pkgfqn}/qtquick1
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
2013-07-06 19:22:08 +00:00
# Useful symlinks
install -d "${pkgdir}"/usr/bin
for b in "${pkgdir}"/usr/lib/qt/bin/*; do
ln -s /usr/lib/qt/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
done
}
package_qt5-quickcontrols() {
pkgdesc='A cross-platform application and UI framework (QtQuick)'
depends=('qt5-declarative')
cd ${_pkgfqn}/qtquickcontrols
make INSTALL_ROOT="${pkgdir}" install
2013-03-02 01:46:59 +00:00
}
package_qt5-script() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (QtScript)'
2013-03-02 01:46:59 +00:00
depends=('qt5-base')
conflicts=('qt')
cd ${_pkgfqn}/qtscript
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
}
2013-07-06 19:22:08 +00:00
package_qt5-sensors() {
pkgdesc='A cross-platform application and UI framework (QtSensors)'
depends=('qt5-declarative')
cd ${_pkgfqn}/qtsensors
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
}
package_qt5-serialport() {
pkgdesc='A cross-platform application and UI framework (QtSerialPort)'
depends=('qt5-base')
cd ${_pkgfqn}/qtserialport
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
}
2013-03-02 01:46:59 +00:00
package_qt5-svg() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (QtSvg)'
2013-03-02 01:46:59 +00:00
depends=('qt5-base')
conflicts=('qt')
cd ${_pkgfqn}/qtsvg
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
}
package_qt5-tools() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (Development Tools, QtHelp)'
2013-07-06 19:22:08 +00:00
depends=('qt5-webkit' 'desktop-file-utils' 'qt5-translations' 'hicolor-icon-theme'
'xdg-utils')
optdepends=('qt5-doc: documentation')
2013-03-02 01:46:59 +00:00
install='qt5-tools.install'
conflicts=('qt')
cd ${_pkgfqn}/qttools
make INSTALL_ROOT="${pkgdir}" install
# install missing icons and desktop files
for icon in src/linguist/linguist/images/icons/linguist-*-32.png ; do
size=$(echo $(basename ${icon}) | cut -d- -f2)
install -p -D -m644 ${icon} \
"${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png"
done
2013-07-06 19:22:08 +00:00
install -D -m644 src/assistant/assistant/images/assistant.png \
2013-03-02 01:46:59 +00:00
"${pkgdir}/usr/share/icons/hicolor/32x32/apps/assistant.png"
2013-07-06 19:22:08 +00:00
install -D -m644 src/assistant/assistant/images/assistant-128.png \
2013-03-02 01:46:59 +00:00
"${pkgdir}/usr/share/icons/hicolor/128x128/apps/assistant.png"
2013-07-06 19:22:08 +00:00
install -D -m644 src/designer/src/designer/images/designer.png \
2013-03-02 01:46:59 +00:00
"${pkgdir}/usr/share/icons/hicolor/128x128/apps/designer.png"
2013-07-06 19:22:08 +00:00
install -D -m644 src/qdbus/qdbusviewer/images/qdbusviewer.png \
"${pkgdir}/usr/share/icons/hicolor/32x32/apps/qdbusviewer.png"
install -D -m644 src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
"${pkgdir}/usr/share/icons/hicolor/128x128/apps/qdbusviewer.png"
2013-03-02 01:46:59 +00:00
install -d "${pkgdir}/usr/share/applications"
2013-07-06 19:22:08 +00:00
install -m644 "${srcdir}"/{linguist,designer,assistant,qdbusviewer}.desktop \
2013-03-02 01:46:59 +00:00
"${pkgdir}/usr/share/applications/"
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
2013-04-16 21:25:57 +00:00
# Useful symlinks
install -d "${pkgdir}"/usr/bin
for b in "${pkgdir}"/usr/lib/qt/bin/*; do
ln -s /usr/lib/qt/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
done
2013-03-02 01:46:59 +00:00
}
package_qt5-webkit() {
2013-03-04 01:10:31 +00:00
pkgdesc='A cross-platform application and UI framework (QtWebKit)'
2013-07-06 19:22:08 +00:00
depends=('qt5-declarative' 'gstreamer0.10-base' 'libxslt' 'libxcomposite' 'qt5-sensors')
2013-03-02 01:46:59 +00:00
cd ${_pkgfqn}/qtwebkit
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
# Fix wrong path in pc file
perl -pi -e "s, -L${srcdir}/?\S+,,g" "${pkgdir}"/usr/lib/pkgconfig/Qt5WebKit.pc
}
2013-07-06 19:22:08 +00:00
package_qt5-x11extras() {
pkgdesc='A cross-platform application and UI framework (QtX11Extras)'
depends=('qt5-base')
cd ${_pkgfqn}/qtx11extras
make INSTALL_ROOT="${pkgdir}" install
# Fix wrong path in prl files
find "${pkgdir}/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
}