aboutsummaryrefslogtreecommitdiff
path: root/x11/libs/qt4/qt4.SlackBuild
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2008-09-03 03:50:43 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2008-09-03 03:50:43 +0000
commitdda36349496e0987f0ccf4f23929f7870ba11813 (patch)
tree1b469ee961c93e7f3565a52a6c50a0caba9afa9c /x11/libs/qt4/qt4.SlackBuild
parentb1c576dfbc932afc7c1ecc09348df2dcc5ac3fc7 (diff)
downloadslackbuilds-dda36349496e0987f0ccf4f23929f7870ba11813.tar.gz
slackbuilds-dda36349496e0987f0ccf4f23929f7870ba11813.tar.bz2
merging with changes made since 21th May
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1903 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'x11/libs/qt4/qt4.SlackBuild')
-rw-r--r--x11/libs/qt4/qt4.SlackBuild149
1 files changed, 149 insertions, 0 deletions
diff --git a/x11/libs/qt4/qt4.SlackBuild b/x11/libs/qt4/qt4.SlackBuild
new file mode 100644
index 00000000..e331502b
--- /dev/null
+++ b/x11/libs/qt4/qt4.SlackBuild
@@ -0,0 +1,149 @@
+#!/bin/sh
+
+# Slackware build script for Qt 4
+# Written by Aleksandar Samardzic <asamardzic@gmail.com>
+# Modified by Robby Workman <rworkman@slackbuilds.org>
+# Adaptation for slack.sarava.org standard by Rafael Diniz <rafael (at) riseup (dot) net>
+
+PRGNAM=qt4
+VERSION=${VERSION:-4.4.0}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-rd}
+SRC_DIR=${SRC_DIR:=$CWD}/$PRGNAM
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PRGNAM
+REPOS=${REPOS:=$TMP}
+
+# Dowload source if necessary
+SRC="qt-x11-opensource-src-$VERSION.tar.gz"
+URL="ftp://ftp.trolltech.com/qt/source/$SRC"
+
+
+JOBS=${JOBS:-5}
+
+LIBDIR=/usr/lib
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR=/usr/lib64
+fi
+
+set -e
+
+# clean up
+rm -rf "$PKG" 2> /dev/null
+
+# create dirs
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+
+if [ ! -s "$SRC_DIR/$SRC" ]; then
+ wget "$URL" -O "$SRC_DIR/$SRC"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf qt-x11-opensource-src-$VERSION
+tar xvf $SRC_DIR/qt-x11-opensource-src-$VERSION.tar.gz
+cd qt-x11-opensource-src-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
+echo "yes" | ./configure \
+ -prefix $LIBDIR/qt-$VERSION \
+ -libdir $LIBDIR \
+ -nomake examples \
+ -nomake demos
+
+make -j $JOBS
+make install INSTALL_ROOT=$PKG
+
+( cd $PKG/$LIBDIR ; ln -sf qt-$VERSION qt4 )
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+mkdir -p $PKG/usr/bin
+( cd $PKG/usr/bin
+ for file in assistant assistant_adp designer linguist lrelease lupdate moc pixeltool qcollectiongenerator qdbus qdbuscpp2xml qdbusviewer qdbusxml2cpp qhelpconverter qhelpgenerator qmake qt3to4 qtconfig rcc uic uic3 xmlpatterns;
+ do
+ ln -sf $LIBDIR/qt-$VERSION/bin/$file ${file}-qt4 ;
+ done
+)
+
+# mkdir -p $PKG/$LIBDIR/pkgconfig
+# ( cd $PKG/$LIBDIR/pkgconfig
+# for file in Qt3Support.pc QtAssistantClient.pc QtCore.pc \
+# QtDBus.pc QtGui.pc QtNetwork.pc QtOpenGL.pc QtScript.pc \
+# QtSql.pc QtSvg.pc QtTest.pc QtUiTools.pc QtXml.pc ;
+# do
+# ln -sf $LIBDIR/qt-$VERSION/lib/pkgconfig/$file . ;
+# done
+# )
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a GPL_EXCEPTION.TXT GPL_EXCEPTION_ADDENDUM.TXT INSTALL LICENSE.GPL* \
+ LICENSE.QPL OPENSOURCE-NOTICE.TXT README changes-$VERSION \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+( cd $PKG/usr/doc/$PRGNAM-$VERSION ; ln -sf $LIBDIR/qt-$VERSION/doc/html . )
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+qt4: Qt 4 (Qt4 toolkit)
+qt4:
+qt4: Qt 4 sets the standard for high-performance, cross-platform
+qt4: application development. It includes a C++ class library and
+qt4: tools for cross-platform development and internationalization.
+qt4:
+qt4: Homepage: http://trolltech.com/products/qt/
+qt4:
+qt4:
+qt4:
+qt4:
+EODESC
+
+cat << EODESC > "$PKG/install/doinst.sh"
+#!/bin/sh
+# Add /opt/qt4/lib Qt4 library to /etc/ld.so.conf
+# or not?
+
+#if [ -z "$(cat /etc/ld.so.conf | grep "/opt/qt4/lib")" ]; then
+# echo "/opt/qt4/lib" >> /etc/ld.so.conf
+#fi
+EODESC
+
+cd $PKG
+/sbin/makepkg -l y -c n $REPOS/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+
+# Delete source and build directories if requested
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf "$PKG"
+fi