# Maintainer: Donald Carr #set -o errexit #set -o xtrace # Uncomment for a debug build #_qmake_args="CONFIG+=debug" _building=true pkgname=qtcreator-prerelease _pkgvermajmin=4.4 pkgver=${_pkgvermajmin}.0 _verpostfix="" pkgrel=3 _pkgver=${pkgver} _urlbase="https://download.qt.io/official_releases" if [[ -n $_verpostfix ]]; then _pkgver=${_pkgver}-${_verpostfix} _urlbase="https://download.qt.io/development_releases" fi _filename=qt-creator-opensource-src-${_pkgver} pkgdesc='Qt Creator prerelease/latest' arch=('x86_64') url='http://qt.io/ide' license=('GPL') provides=('qtcreator' 'qbs') conflicts=('qtcreator' 'qbs') depends=('qt5-tools' 'qt5-declarative' 'qt5-script' 'qt5-quickcontrols' 'qt5-quickcontrols2' 'qt5-webengine' 'clang' 'llvm') optdepends=('qbs' 'qt5-doc: integrated Qt documentation' 'qt5-examples: welcome page examples' 'qt5-translations: for other languages' 'gdb: debugger' 'cmake: cmake project support' 'openssh-askpass: ssh support' 'git: git support' 'mercurial: mercurial support' 'bzr: bazaar support' 'valgrind: analyze support') makedepends=('qbs' 'clang' 'qt5-base') source=("${_urlbase}/qtcreator/${_pkgvermajmin}/${_pkgver}/${_filename}.tar.xz") sha256sums=('8c97d40a98ceb5dcff7f56668b0942d7a31821439fa76022c0145775c55a6202') _qmake_cmd=qmake _tmp_dir=$(mktemp -d) _qbs_settings="--settings-dir ${_tmp_dir}" _qbs_profile="sysqtprofile" _qbs_args="profile:${_qbs_profile}" if [[ -z ${startdir} ]]; then _building=false fi prepare() { cd ${srcdir}/${_filename} patch -p1 < ${startdir}/0001-Remove-Qt-Creator-making-several-hostile-platform-as.patch } build() { set -o nounset local src_dir=${srcdir}/${_filename} [[ -d build ]] && rm -r build qbs ${_qbs_settings} -d build -f ${src_dir} --all-products project.withAutotests:false profile:${_qbs_profile} release set +o nounset } package() { set -o nounset local _src_dir=${srcdir}/${_filename} local _pkg_dir=${pkgdir}/usr/ qbs install ${_qbs_settings} -d build -f ${_src_dir} --install-root ${_pkg_dir} --all-products project.withAutotests:false profile:${_qbs_profile} release # Workaround for FS#40583 mv "${pkgdir}"/usr/bin/qtcreator "${pkgdir}"/usr/bin/qtcreator-bin echo "#!/bin/sh" > "${pkgdir}"/usr/bin/qtcreator echo "QT_LOGGING_TO_CONSOLE=1 qtcreator-bin \$@" >> "${pkgdir}"/usr/bin/qtcreator chmod +x "${pkgdir}"/usr/bin/qtcreator install -Dm644 ${srcdir}/${_filename}/LICENSE.GPL3-EXCEPT ${pkgdir}/usr/share/licenses/qtcreator/LICENSE.GPL3-EXCEPT rm -Rf ${_tmp_dir} set +o nounset } if $_building; then qbs setup-qt ${_qbs_settings} /usr/bin/qmake ${_qbs_profile} fi