diff options
author | Larry Hajali <larryhaja[at]gmail[dot]com> | 2015-12-30 08:18:19 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-12-30 08:18:19 +0700 |
commit | 4f03d0744e601f4a952609749baa8d6a8f1688d5 (patch) | |
tree | 2119ba95c68205cdb760a4a02d893698e1dcf3bc /graphics/qcad | |
parent | bf5c978716c54681b215e021c73c467ed0a60573 (diff) | |
download | slackbuilds-4f03d0744e601f4a952609749baa8d6a8f1688d5.tar.gz |
graphics/qcad: Updated for version 3.12.4.8.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/qcad')
-rw-r--r-- | graphics/qcad/README | 6 | ||||
-rw-r--r-- | graphics/qcad/qcad.SlackBuild | 50 | ||||
-rw-r--r-- | graphics/qcad/qcad.info | 6 |
3 files changed, 43 insertions, 19 deletions
diff --git a/graphics/qcad/README b/graphics/qcad/README index 2f1c41e12b..0837ac6dac 100644 --- a/graphics/qcad/README +++ b/graphics/qcad/README @@ -3,4 +3,8 @@ dimensions (2D). With QCAD you can create technical drawings such as plans for buildings, interiors, mechanical parts or schematics and diagrams. QCAD works on Windows, Mac OS X and Linux. -Optional dependency: libqsqlpsql +Optional dependency: libqsqlpsql and qt5 + +To build qt5 version of qcad run the slackbuild with QT5=yes. + + # QT5=yes ./qcad.SlackBuild diff --git a/graphics/qcad/qcad.SlackBuild b/graphics/qcad/qcad.SlackBuild index b4cdc5d3f6..0af254919b 100644 --- a/graphics/qcad/qcad.SlackBuild +++ b/graphics/qcad/qcad.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=qcad -VERSION=${VERSION:-3.12.1.0} +VERSION=${VERSION:-3.12.4.8} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -69,8 +69,17 @@ 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 {} \; -qmake QMAKE_CFLAGS+="$SLKCFLAGS" QMAKE_CXXFLAGS+="$SLKCFLAGS" \ - CONFIG+=release -o Makefile $PRGNAM.pro + +# Build with Qt5/Qt4. Default is Qt4. +if [ "${QT5:-no}" == "yes" ]; then + qmake-qt5 QMAKE_CFLAGS+="$SLKCFLAGS" QMAKE_CXXFLAGS+="$SLKCFLAGS" \ + CONFIG+=release -o Makefile $PRGNAM.pro + QTDIRECTORY="qt5" +else + qmake QMAKE_CFLAGS+="$SLKCFLAGS" QMAKE_CXXFLAGS+="$SLKCFLAGS" \ + CONFIG+=release -o Makefile $PRGNAM.pro + QTDIRECTORY="qt" +fi make @@ -80,23 +89,33 @@ cp -ar examples fonts libraries linetypes patterns plugins scripts ts $PKG/usr/s cp release/* $PKG/usr/share/$PRGNAM install -m 0755 $CWD/$PRGNAM.sh $PKG/usr/bin/$PRGNAM -# Don't repackage libraries that already come with qt4. -rm -f $PKG/usr/share/$PRGNAM/plugins/designer/libqwebview.so \ +# Don't repackage libraries that already come with Qt4/Qt5. +rm -f $PKG/usr/share/$PRGNAM/plugins/designer/{libqwebview.so,readme.txt} \ $PKG/usr/share/$PRGNAM/plugins/sqldrivers/* \ - $PKG/usr/share/$PRGNAM/plugins/imageformats/* \ - $PKG/usr/share/$PRGNAM/plugins/codecs/* + $PKG/usr/share/$PRGNAM/plugins/imageformats/* -ln -s /usr/lib${LIBDIRSUFFIX}/qt/plugins/designer/libqwebview.so \ +ln -s /usr/lib${LIBDIRSUFFIX}/${QTDIRECTORY}/plugins/designer/libqwebview.so \ $PKG/usr/share/$PRGNAM/plugins/designer/libqwebview.so -for i in /usr/lib${LIBDIRSUFFIX}/qt/plugins/imageformats/*.so; do +for i in /usr/lib${LIBDIRSUFFIX}/${QTDIRECTORY}/plugins/imageformats/*.so; do ln -s $i $PKG/usr/share/$PRGNAM/plugins/imageformats/$(basename $i) done -for i in /usr/lib${LIBDIRSUFFIX}/qt/plugins/sqldrivers/*.so; do +for i in /usr/lib${LIBDIRSUFFIX}/${QTDIRECTORY}/plugins/sqldrivers/*.so; do ln -s $i $PKG/usr/share/$PRGNAM/plugins/sqldrivers/$(basename $i) done -for i in /usr/lib${LIBDIRSUFFIX}/qt/plugins/codecs/*; do - ln -s $i $PKG/usr/share/$PRGNAM/plugins/codecs/$(basename $i) -done + +if [ "$QT5" == "yes" ]; then + rm -rf $PKG/usr/share/$PRGNAM/plugins/codecs \ + $PKG/usr/share/$PRGNAM/plugins/printsupport/readme.txt + for i in /usr/lib${LIBDIRSUFFIX}/${QTDIRECTORY}/plugins/printsupport/*; do + ln -s $i $PKG/usr/share/$PRGNAM/plugins/printsupport/$(basename $i) + done +else + rm -rf $PKG/usr/share/$PRGNAM/plugins/codecs/* \ + $PKG/usr/share/$PRGNAM/plugins/printsupport + for i in /usr/lib${LIBDIRSUFFIX}/${QTDIRECTORY}/plugins/codecs/*; do + ln -s $i $PKG/usr/share/$PRGNAM/plugins/codecs/$(basename $i) + done +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 @@ -106,12 +125,13 @@ install -m 0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications for i in 16 32 48 64 96 128; do convert scripts/${PRGNAM}_icon.png -resize ${i}x${i}! $PRGNAM-$i.png - install -D -m 0644 $PRGNAM-$i.png $PKG/usr/share/icons/hicolor/${i}x${i}/$PRGNAM.png + install -D -m 0644 $PRGNAM-$i.png $PKG/usr/share/icons/hicolor/${i}x${i}/apps/$PRGNAM.png done # A little clean up. find $PKG \( -name "*\.pro" -o -name "*\.pri" -o -name "*\.a" \ - -o -name "*\.ts" \) -exec rm -f '{}' \; + -o -name "*\.ts" -o -name "\.gitignore" \) -exec rm -f '{}' \; +find $PKG -type d -empty -delete mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a *.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/graphics/qcad/qcad.info b/graphics/qcad/qcad.info index 4128d1ac0a..14243e22e1 100644 --- a/graphics/qcad/qcad.info +++ b/graphics/qcad/qcad.info @@ -1,8 +1,8 @@ PRGNAM="qcad" -VERSION="3.12.1.0" +VERSION="3.12.4.8" HOMEPAGE="http://www.qcad.org/en/" -DOWNLOAD="https://github.com/qcad/qcad/archive/v3.12.1.0.tar.gz" -MD5SUM="6c2d9cf35b9d62af88d5b779bc03687b" +DOWNLOAD="https://github.com/qcad/qcad/archive/v3.12.4.8.tar.gz" +MD5SUM="89b92dbbbad554bfbb210313241ac728" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" |