-
-
Save swiftgeek/38bcf0761876de66d12f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id: PKGBUILD 227559 2014-12-12 12:47:55Z andrea $ | |
# Maintainer: Andrea Scarpino <andrea@archlinux.org> | |
pkgbase=qt5 | |
pkgname=('qt5-base') | |
pkgver=5.4.0 | |
pkgrel=1 | |
arch=('i686' 'x86_64') | |
url='http://qt-project.org/' | |
license=('GPL3' 'LGPL' 'FDL' 'custom') | |
makedepends=('libxcb' 'xcb-proto' 'xcb-util' 'xcb-util-image' 'xcb-util-wm' 'xcb-util-keysyms' | |
'mesa' 'at-spi2-core' 'alsa-lib' 'gst-plugins-base-libs' 'gstreamer0.10-base-plugins' | |
'libjpeg-turbo' 'cups' 'libpulse' 'hicolor-icon-theme' 'desktop-file-utils' | |
'postgresql-libs' 'libmariadbclient' 'sqlite' 'unixodbc' 'libfbclient' 'libmng' | |
'python2' 'ruby' 'gperf' 'libxslt' 'libxcomposite' 'fontconfig' 'bluez-libs' | |
'openal' 'gtk2' 'libxkbcommon-x11' 'mtdev' 'harfbuzz' 'libwebp' 'leveldb' | |
'geoclue' 'pciutils' 'nss' 'gstreamer0.10-bad') | |
groups=('qt' 'qt5') | |
_pkgfqn="qt-everywhere-opensource-src-${pkgver}" | |
source=("http://download.qt-project.org/official_releases/qt/${pkgver%.*}/${pkgver}/single/${_pkgfqn}.tar.xz" | |
'assistant.desktop' 'designer.desktop' 'linguist.desktop' 'qdbusviewer.desktop') | |
md5sums=('21843b00ecde8956217faab391bc007b' | |
'b2897dd6a2967bccf8f10e397aafee55' | |
'9638a78e502719ef8fe5f8d10d0361a9' | |
'188da8f4c87316e730ebf1c6217bf5a0' | |
'322b419b16c75d4de0ee7ad0a246caa1') | |
prepare() { | |
cd ${_pkgfqn} | |
# Use python2 for Python 2.x | |
find . -name '*.py' -exec sed -i \ | |
's|#![ ]*/usr/bin/python$|&2|;s|#![ ]*/usr/bin/env python$|&2|' {} + | |
# There are still a lot of relative calls which need a workaround | |
mkdir "${srcdir}"/python2-path | |
ln -s /usr/bin/python2 "${srcdir}"/python2-path/python | |
} | |
build() { | |
cd ${_pkgfqn} | |
export QTDIR="${srcdir}"/${_pkgfqn} | |
export LD_LIBRARY_PATH="${QTDIR}"/qtbase/lib:"${QTDIR}"/qttools/lib:"${LD_LIBRARY_PATH}" | |
export QT_PLUGIN_PATH="${QTDIR}"/qtbase/plugins | |
export PATH="${srcdir}/python2-path:$PATH" | |
[[ "${CARCH}" = "i686" ]] && SSE2="-no-sse2" | |
PYTHON=/usr/bin/python2 ./configure -confirm-license -opensource \ | |
-prefix /usr \ | |
-bindir /usr/lib/qt/bin \ | |
-docdir /usr/share/doc/qt \ | |
-headerdir /usr/include/qt \ | |
-archdatadir /usr/lib/qt \ | |
-datadir /usr/share/qt \ | |
-sysconfdir /etc/xdg \ | |
-examplesdir /usr/share/doc/qt/examples \ | |
-plugin-sql-{psql,mysql,sqlite,odbc,ibase} \ | |
-system-sqlite \ | |
-openssl-linked \ | |
-nomake examples \ | |
-no-rpath \ | |
-dbus-linked \ | |
-system-harfbuzz \ | |
-journald \ | |
-reduce-relocations ${SSE2} | |
make | |
# Fix paths | |
find "${QTDIR}" -name Makefile -exec sed -i "s|/usr/lib/qt/bin/qdoc|${QTDIR}/qtbase/bin/qdoc|g" {} + | |
find "${QTDIR}" -name Makefile.qmake-docs -exec sed -i "s|/usr/lib/qt/bin/qdoc|${QTDIR}/qtbase/bin/qdoc|g" {} + | |
find "${QTDIR}" -name Makefile -exec sed -i "s|/usr/lib/qt/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" {} + | |
find "${QTDIR}" -name Makefile.qmake-docs -exec sed -i "s|/usr/lib/qt/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" {} + | |
sed -i "s|/usr/lib/qt/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" qtwebkit/Source/Makefile.api | |
make docs | |
} | |
package_qt5-base() { | |
pkgdesc='A cross-platform application and UI framework' | |
depends=('libjpeg-turbo' 'xcb-util-keysyms' 'libgl' 'dbus' 'fontconfig' 'systemd' | |
'xcb-util-wm' 'libxrender' 'libxi' 'sqlite' 'xcb-util-image' 'icu' | |
'qtchooser') | |
optdepends=('postgresql-libs: PostgreSQL driver' | |
'libmariadbclient: MariaDB driver' | |
'unixodbc: ODBC driver' | |
'libfbclient: Firebird/iBase driver' | |
'mtdev: evdev plugin' | |
'libxkbcommon-x11: xcb plugin' | |
'libsm: xcb plugin' | |
'gtk2: GTK2 plugin') | |
conflicts=('qt') | |
options=('staticlibs') #libQt5PlatformSupport builds static only | |
cd ${_pkgfqn}/qtbase | |
make INSTALL_ROOT="${pkgdir}" install | |
install -D -m644 LGPL_EXCEPTION.txt \ | |
"${pkgdir}"/usr/share/licenses/${pkgname}/LGPL_EXCEPTION.txt | |
# 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 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment