diff options
author | Andre Barboza <bmg.andre@gmail.com> | 2017-01-05 14:10:19 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-01-06 00:19:59 +0700 |
commit | faaa64aa028360f14521616c98e7b0a292b4848b (patch) | |
tree | a88768c3aff98d675585510c326801be9a4cf5b8 /development | |
parent | b0990af210e4fd6a16e048252159653eca3b38e6 (diff) | |
download | slackbuilds-faaa64aa028360f14521616c98e7b0a292b4848b.tar.gz |
development/qt-creator: Updated for version 4.2.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/qt-creator/README | 23 | ||||
-rw-r--r-- | development/qt-creator/qt-creator.SlackBuild | 71 | ||||
-rw-r--r-- | development/qt-creator/qt-creator.desktop | 2 | ||||
-rw-r--r-- | development/qt-creator/qt-creator.info | 10 | ||||
-rw-r--r-- | development/qt-creator/qt-creator.xml (renamed from development/qt-creator/x-qt-creator.xml) | 0 |
5 files changed, 87 insertions, 19 deletions
diff --git a/development/qt-creator/README b/development/qt-creator/README index 4fc00e10de..c3bafed6fa 100644 --- a/development/qt-creator/README +++ b/development/qt-creator/README @@ -1,7 +1,8 @@ Qt Creator is a Cross-Platform Qt IDE. -The goal of Qt Creator is to provide a cross-platform, complete -Integrated Development Environment (IDE) to develop Qt projects. +The goal of Qt Creator is to provide a cross-platform, +complete Integrated Development Environment (IDE) to develop +Qt projects. NOTES: 1 - This package conflicts with qt-creator2: install @@ -9,12 +10,12 @@ NOTES: 2 - This version of Qt Creator is advised for Qt5. -3 - Before start building/editing your application, you should - configure the Qt kits (both Qt4 and Qt5). +3 - Before start building/editing your application, you + should configure the Qt kits (both Qt4 and Qt5). -4 - QmlDesigner will work properly only if you configure the Qt5 - Kit properly (Tools->Options->Build & Run->Kits) and make - it the Default Kit. +4 - QmlDesigner will work properly only if you configure the + Qt5 Kit properly (Tools->Options->Build & Run->Kits) and + make it the Default Kit. 5 - An old IDE configuration in user home directory (.config/QtProject*) also can lead to strange behavior. @@ -24,3 +25,11 @@ NOTES: To build Qt5 with documentations and examples do as follow: EXAMPLES=yes DOCS=yes ./qt5.SlackBuild + +7 - Clang Code Model requires a newer LLVM version compared + to the official Slackware package. This SlackBuild can + build the required LLVM version and ship this plugin. + Note that the default option is disabled and enabling + Code Model option will significantly increase the build + time. To build Code Model plugin do as follow: + CODE_MODEL=yes ./qt-creator.SlackBuild diff --git a/development/qt-creator/qt-creator.SlackBuild b/development/qt-creator/qt-creator.SlackBuild index bf8f043275..d6290a62f3 100644 --- a/development/qt-creator/qt-creator.SlackBuild +++ b/development/qt-creator/qt-creator.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for qt-creator -# Copyright 2016 Andre Barboza +# Copyright 2016 Andre Barboza, Belo Horizonte - Brazil # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,11 +22,22 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Updated by Andre Barboza <bmg.andre@gmail.com> +# Code Model updates by Andrzej Telszewski <atelszewski@gmail.com> + +# For building -rc or -beta releases, set VERSION to something like: +# VERSION=4.2.0_rc1 or VERSION=4.2.0_beta1 (note the underscore). + PRGNAM=qt-creator -VERSION=${VERSION:-4.1.0} +VERSION=${VERSION:-4.2.0} +SRCVER=$(echo $VERSION | tr _ -) BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +CODE_MODEL=${CODE_MODEL:-no} +LLVM_VERSION=${LLVM_VERSION:-3.9.1} +CLANG_VERSION=${CLANG_VERSION:-3.9.1} + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -59,9 +70,18 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-opensource-src-$VERSION -tar xvf $CWD/$PRGNAM-opensource-src-$VERSION.tar.xz -cd $PRGNAM-opensource-src-$VERSION +rm -rf $PRGNAM-opensource-src-$SRCVER +tar xvf $CWD/$PRGNAM-opensource-src-$SRCVER.tar.xz +cd $PRGNAM-opensource-src-$SRCVER + +# Unpack LLVM if code model is required +if [ "${CODE_MODEL}" == "yes" ]; then + tar xvf $CWD/llvm-$LLVM_VERSION.src.tar.xz + mv llvm-$LLVM_VERSION.src llvm-src + tar xvf $CWD/cfe-$CLANG_VERSION.src.tar.xz -C llvm-src/tools + mv llvm-src/tools/cfe-$CLANG_VERSION.src llvm-src/tools/clang +fi + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -69,7 +89,29 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Adjust docs location. +# LLVM/Clang is used by QTC's Clang Code Model and Clang Static Analyzer. +if [ "${CODE_MODEL}" == "yes" ]; then + # LLVM/Clang temporary (QTC build-time) install directory. + LLVM_INSTALL_ROOT=$(pwd)/llvm-install-root + + # Build and temporarily install LLVM/Clang. + mkdir llvm-src/build + cd llvm-src/build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=$LLVM_INSTALL_ROOT \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Unix Makefiles" \ + -DLLVM_ENABLE_RTTI=ON \ + -DLLVM_TARGETS_TO_BUILD="X86" \ + .. + make + make install + cd - +fi + +# Adjust QTC docs location. sed -i "s|share/doc/qtcreator|doc/$PRGNAM-$VERSION|g" qtcreator.pri sed -i "s|share/doc/qtcreator|doc/$PRGNAM-$VERSION|g" doc/api/qtcreator-documentation.qdoc sed -i "s|share/doc/qtcreator|doc/$PRGNAM-$VERSION|g" src/plugins/coreplugin/icore.cpp @@ -78,7 +120,7 @@ qmake-qt5 qtcreator.pro \ QMAKE_CXXFLAGS="$SLKCFLAGS" \ QTC_PREFIX=/usr \ IDE_LIBRARY_BASENAME=lib$LIBDIRSUFFIX \ - LLVM_INSTALL_DIR=/usr \ + LLVM_INSTALL_DIR=$LLVM_INSTALL_ROOT \ QBS_INSTALL_DIR=/usr make @@ -86,6 +128,19 @@ make install INSTALL_ROOT=$PKG make docs make install_docs INSTALL_ROOT=$PKG +if [ "${CODE_MODEL}" == "yes" ]; then + # Install (bundle) LLVM/Clang components needed for running QTC. + cd $LLVM_INSTALL_ROOT + mkdir -p $PKG/usr/libexec/qtcreator/clang/bin + cp -a bin/clang $PKG/usr/libexec/qtcreator/clang/bin + cp -a bin/$(readlink bin/clang) $PKG/usr/libexec/qtcreator/clang/bin + mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/qtcreator + cp -a lib/libclang.so* $PKG/usr/lib$LIBDIRSUFFIX/qtcreator + mkdir -p $PKG/usr/libexec/qtcreator/clang/lib/clang + cp -a lib/clang/* $PKG/usr/libexec/qtcreator/clang/lib/clang + cd - +fi + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -93,7 +148,7 @@ mkdir -p $PKG/usr/share/applications cat $CWD/qt-creator.desktop > $PKG/usr/share/applications/qt-creator.desktop mkdir -p $PKG/usr/share/mime/packages -cat $CWD/x-qt-creator.xml > $PKG/usr/share/mime/packages/x-qt-creator.xml +cat $CWD/qt-creator.xml > $PKG/usr/share/mime/packages/qt-creator.xml mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a HACKING LICENSE.GPL3-EXCEPT README.md $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/development/qt-creator/qt-creator.desktop b/development/qt-creator/qt-creator.desktop index acd11fb228..c4055882e5 100644 --- a/development/qt-creator/qt-creator.desktop +++ b/development/qt-creator/qt-creator.desktop @@ -9,4 +9,4 @@ Version=1.0 StartupNotify=true Type=Application Terminal=false -MimeType=application/x-qt-creator; +MimeType=application/x-qt-creator;application/x-pyqtc;application/x-uiqml;application/x-qmlproject;application/x-qbs;application/x-qml;application/x-designer;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-python;text/x-moc;text/x-cmake;text/x-qml;text/x-c;text/x-c++; diff --git a/development/qt-creator/qt-creator.info b/development/qt-creator/qt-creator.info index db6379c2f4..622db04881 100644 --- a/development/qt-creator/qt-creator.info +++ b/development/qt-creator/qt-creator.info @@ -1,8 +1,12 @@ PRGNAM="qt-creator" -VERSION="4.1.0" +VERSION="4.2.0" HOMEPAGE="http://wiki.qt.io/Qt_Creator" -DOWNLOAD="http://download.qt.io/official_releases/qtcreator/4.1/4.1.0/qt-creator-opensource-src-4.1.0.tar.xz" -MD5SUM="c90743aad6e222db88e4d52267b82cff" +DOWNLOAD="https://download.qt.io/official_releases/qtcreator/4.2/4.2.0/qt-creator-opensource-src-4.2.0.tar.xz \ + http://llvm.org/releases/3.9.1/llvm-3.9.1.src.tar.xz \ + http://llvm.org/releases/3.9.1/cfe-3.9.1.src.tar.xz" +MD5SUM="798378ff9c2002f1d022f129f2a14856 \ + 3259018a7437e157f3642df80f1983ea \ + 45713ec5c417ed9cad614cd283d786a1" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="qt5 qbs" diff --git a/development/qt-creator/x-qt-creator.xml b/development/qt-creator/qt-creator.xml index 000cf46d08..000cf46d08 100644 --- a/development/qt-creator/x-qt-creator.xml +++ b/development/qt-creator/qt-creator.xml |