aboutsummaryrefslogtreecommitdiff
path: root/libraries/qt3
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@slackbuilds.org>2011-03-24 23:54:54 -0300
committerRobby Workman <rworkman@slackbuilds.org>2011-03-25 23:26:21 -0500
commit4544e04b263f12baa34c1a57f38839d5a3c4e464 (patch)
treee6cd99d4aaf255e0dbc46ef9e81a2a06b702890f /libraries/qt3
parentd7277dab33344970e645a521bfe7cef240813e9b (diff)
libraries/qt3: Added (dependency, was removed from Slackware 13.37)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'libraries/qt3')
-rw-r--r--libraries/qt3/README12
-rw-r--r--libraries/qt3/doinst.sh9
-rw-r--r--libraries/qt3/profile.d/qt.csh22
-rw-r--r--libraries/qt3/profile.d/qt.sh23
-rw-r--r--libraries/qt3/qt3-libpng14.diff41
-rw-r--r--libraries/qt3/qt3.SlackBuild204
-rw-r--r--libraries/qt3/qt3.info10
-rw-r--r--libraries/qt3/slack-desc19
8 files changed, 340 insertions, 0 deletions
diff --git a/libraries/qt3/README b/libraries/qt3/README
new file mode 100644
index 0000000000000..e1afb37604ae5
--- /dev/null
+++ b/libraries/qt3/README
@@ -0,0 +1,12 @@
+Qt is a complete and well-developed object-oriented framework for
+developing graphical user interface (GUI) applications using C++.
+
+This release is free only for development of free software for the X Window
+System. If you use Qt for developing commercial or other non-free software,
+you must have a professional license. Please see
+http://qt.nokia.com/products/licensing for details on the licensing
+options.
+
+This script builds the older qt3 library that coexists with the newer qt4
+library. It was adapted from the original version from Slackware 13.1 but
+uses the newer PNG and JPEG libraries.
diff --git a/libraries/qt3/doinst.sh b/libraries/qt3/doinst.sh
new file mode 100644
index 0000000000000..d57fb03194ad2
--- /dev/null
+++ b/libraries/qt3/doinst.sh
@@ -0,0 +1,9 @@
+## This was causing problems compiling KDE for unknown reasons.
+## So, we'll symlink the libraries into /opt/kde3 again...
+# Add QT library directory to /etc/ld.so.conf:
+if ! grep /opt/kde3/lib etc/ld.so.conf 1> /dev/null 2> /dev/null ; then
+ echo "/opt/kde3/lib" >> etc/ld.so.conf
+fi
+if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig 2> /dev/null
+fi
diff --git a/libraries/qt3/profile.d/qt.csh b/libraries/qt3/profile.d/qt.csh
new file mode 100644
index 0000000000000..490877c4fe8d8
--- /dev/null
+++ b/libraries/qt3/profile.d/qt.csh
@@ -0,0 +1,22 @@
+#!/bin/csh
+# Environment path variables for the Qt package:
+if ( ! $?QTDIR ) then
+ # It's best to use the generic directory to avoid
+ # compiling in a version-containing path:
+ if ( -d /opt/kde3/lib/qt3 ) then
+ setenv QTDIR /opt/kde3/lib/qt3
+ else
+ # Find the newest Qt directory and set $QTDIR to that:
+ foreach qtd ( /opt/kde3/lib/qt-* )
+ if ( -d $qtd ) then
+ setenv QTDIR $qtd
+ endif
+ end
+ endif
+endif
+set path = ( $path $QTDIR/bin /opt/kde3/bin )
+if ( $?CPLUS_INCLUDE_PATH ) then
+ setenv CPLUS_INCLUDE_PATH $QTDIR/include:$CPLUS_INCLUDE_PATH
+else
+ setenv CPLUS_INCLUDE_PATH $QTDIR/include
+endif
diff --git a/libraries/qt3/profile.d/qt.sh b/libraries/qt3/profile.d/qt.sh
new file mode 100644
index 0000000000000..c4e23bb599eef
--- /dev/null
+++ b/libraries/qt3/profile.d/qt.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Environment variables for the Qt package.
+#
+# It's best to use the generic directory to avoid
+# compiling in a version-containing path:
+if [ -d /opt/kde3/lib/qt3 ]; then
+ QTDIR=/opt/kde3/lib/qt3
+else
+ # Find the newest Qt directory and set $QTDIR to that:
+ for qtd in /opt/kde3/lib/qt-* ; do
+ if [ -d $qtd ]; then
+ QTDIR=$qtd
+ fi
+ done
+fi
+if [ ! "$CPLUS_INCLUDE_PATH" = "" ]; then
+ CPLUS_INCLUDE_PATH=$QTDIR/include:$CPLUS_INCLUDE_PATH
+else
+ CPLUS_INCLUDE_PATH=$QTDIR/include
+fi
+PATH="$PATH:$QTDIR/bin:/opt/kde3/bin"
+export QTDIR
+export CPLUS_INCLUDE_PATH
diff --git a/libraries/qt3/qt3-libpng14.diff b/libraries/qt3/qt3-libpng14.diff
new file mode 100644
index 0000000000000..c568dd0c4d1fb
--- /dev/null
+++ b/libraries/qt3/qt3-libpng14.diff
@@ -0,0 +1,41 @@
+http://groups.google.com/group/lucky.freebsd.ports.bugs/browse_thread/thread/a4a95255567dedfc
+
+System: FreeBSD elch.exwg.net 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #8: Sat Feb 20 21:36:50 CET 2010 c...@elch.exwg.net:/usr/obj/usr/src/sys/CMT amd64
+
+ png-1.4.1
+ qt-3.3.8_11 (upgrading to qt-3.3.8_12)
+
+>Description:
+
+ Build of x11-toolkits/qt33 fails due to the changed struct png_info
+ in libpng-1.4:
+ kernel/qpngio.cpp:162: error: 'struct png_info_struct' has no member named 'trans_values'
+
+>How-To-Repeat:
+ run portupgrade
+>Fix:
+
+ Add x11-toolkits/qt33/files/patch-src-kernel-qpngio.cpp
+ (also available at http://burggraben.net/hacks/patch-src-kernel-qpngio.cpp )
+
+--- src/kernel/qpngio.cpp.orig 2010-03-28 12:55:28.000000000 +0200
++++ src/kernel/qpngio.cpp 2010-03-28 12:56:44.000000000 +0200
+@@ -159,7 +159,7 @@
+ image.setColor( i, qRgba(c,c,c,0xff) );
+ }
+ if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+- const int g = info_ptr->trans_values.gray;
++ const int g = info_ptr->trans_color.gray;
+ if (g < ncols) {
+ image.setAlphaBuffer(TRUE);
+ image.setColor(g, image.color(g) & RGB_MASK);
+@@ -187,7 +187,7 @@
+ info_ptr->palette[i].red,
+ info_ptr->palette[i].green,
+ info_ptr->palette[i].blue,
+- info_ptr->trans[i]
++ info_ptr->trans_alpha[i]
+ )
+ );
+ i++;
+
diff --git a/libraries/qt3/qt3.SlackBuild b/libraries/qt3/qt3.SlackBuild
new file mode 100644
index 0000000000000..0c57f1aca5be3
--- /dev/null
+++ b/libraries/qt3/qt3.SlackBuild
@@ -0,0 +1,204 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+# Copyrught 2010, 2011 Niels Horn, Rio de Janeiro, RJ, Brazil
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# This is based on the original SlackBuild from /extra/kde-compat in
+# Slackware 13.1
+
+# Adapted for SlackBuilds.org by Niels Horn <niels.horn@gmail.com>
+# - moved building from /opt to $TMP
+# - included patch for new libpng (based on work by Stuart Winter)
+# Revision date 2011/03/12
+
+PRGNAM=qt3
+VERSION=${VERSION:-3.3.8b}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRCNAM=qt-x11-free
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+
+# Don't build a devel package (but put a devel SYSTEM on this machine...)
+NODEVEL=true
+
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/qt-x11-free-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+
+# Force CFLAGS in qmake.conf
+sed -i "/QMAKE_CFLAGS_RELEASE/s|-O2|$SLKCFLAGS|" mkspecs/linux-g++/qmake.conf
+
+# Use built-in gif reader
+sed -i "/#define QT_BUILTIN_GIF_READER/s|0|1|" src/kernel/qgif.h
+
+# Fix location of mysql.h
+sed -i "s|mysql\.h|mysql/mysql\.h|" src/sql/drivers/mysql/qsql_mysql.h
+
+# Build with libpng 1.4:
+patch -lp0 < $CWD/qt3-libpng14.diff
+
+# Make sure ownerships and permissions are sane:
+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 {} \;
+
+# And here's what we are currently using. The "yes" agrees to the GPL, so don't run this script if you
+# don't agree. :-)
+echo "yes" | \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ -prefix /opt/kde3/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION \
+ -release \
+ -system-zlib \
+ -system-libpng \
+ -qt-imgfmt-png \
+ -system-libmng \
+ -qt-imgfmt-mng \
+ -system-libjpeg \
+ -qt-imgfmt-jpeg \
+ -qt-gif \
+ -thread \
+ -stl \
+ -no-g++-exceptions \
+ -xft \
+ -plugin-sql-mysql \
+ -plugin-style-cde \
+ -plugin-style-compact \
+ -qt-style-motif \
+ -plugin-style-motifplus \
+ -plugin-style-platinum \
+ -plugin-style-sgi \
+ -plugin-style-windows \
+ -enable-opengl
+
+# We're using '-i' to work around a bug where the build tries to strip html files.
+# Build the important stuff:
+make -i
+
+# Now set QTDIR...
+QTDIR=$PKG/opt/kde3/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION
+
+# ... & point LD_LIBRARY_PATH to the new libs and "make + install" the rest...
+LD_LIBRARY_PATH=$QTDIR/lib make install INSTALL_ROOT=$PKG
+make -i symlinks sub-src sub-tools
+make install INSTALL_ROOT=$PKG
+
+# Link the shared libraries into /opt/kde3/lib
+cd $PKG/opt/kde3/lib${LIBDIRSUFFIX}
+ for file in $PRGNAM-$VERSION/lib/*.so* ; do
+ ln -sf $file .
+ done
+cd -
+
+# Leave these out so as not to interfere with Qt4:
+if [ -z "$NODEVEL" ]; then
+ # Add man pages:
+ mkdir -p $PKG/usr/man
+ cp -a doc/man/* $PKG/usr/man
+ find $PKG/usr/man -type f -exec gzip -9 "{}" \;
+fi
+
+# Put profile.d scripts in package w/ correct lib-path
+mkdir -p $PKG/etc/profile.d
+cat $CWD/profile.d/qt.sh | sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" \
+ > $PKG/etc/profile.d/qt.sh
+cat $CWD/profile.d/qt.csh | sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" \
+ > $PKG/etc/profile.d/qt.csh
+chmod 755 $PKG/etc/profile.d/*
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Make links to the qt3 binaries
+mkdir -p $PKG/opt/kde3/bin
+cd $PKG/opt/kde3/bin
+ for file in assistant designer linguist lrelease lupdate moc qm2ts qmake qtconfig uic ; do
+ ln -sf ../lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/bin/$file .
+ done
+cd -
+
+# Make a link to qt-mt.pc
+mkdir -p $PKG/opt/kde3/lib${LIBDIRSUFFIX}/pkgconfig
+cd $PKG/opt/kde3/lib${LIBDIRSUFFIX}/pkgconfig
+ ln -sf ../$PRGNAM-$VERSION/lib/pkgconfig/qt-mt.pc .
+cd -
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ FAQ INSTALL LICENSE.GPL* LICENSE.QPL MANIFEST PLATFORMS README* changes* \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+
+# Make a link to "qt3" w/o version number
+cd $PKG/opt/kde3/lib${LIBDIRSUFFIX}
+ ln -sf qt3-${VERSION} qt3
+cd -
+
+# This much documentation isn't needed for the compat qt3 package -- look in the
+# source if you need it.
+rm -rf $PKG/opt/kde3/lib${LIBDIRSUFFIX}/qt3/doc
+
+mkdir -p $PKG/install
+cat $CWD/doinst.sh | sed -e "s|/lib|/lib${LIBDIRSUFFIX}|" \
+ > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+
diff --git a/libraries/qt3/qt3.info b/libraries/qt3/qt3.info
new file mode 100644
index 0000000000000..ce566de896eac
--- /dev/null
+++ b/libraries/qt3/qt3.info
@@ -0,0 +1,10 @@
+PRGNAM="qt3"
+VERSION="3.3.8b"
+HOMEPAGE="http://qt.nokia.com/"
+DOWNLOAD="ftp://ftp.qt.nokia.com/qt/source/qt-x11-free-3.3.8b.tar.gz"
+MD5SUM="9f05b4125cfe477cc52c9742c3c09009"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Niels Horn"
+EMAIL="niels.horn@gmail.com"
+APPROVED="rworkman"
diff --git a/libraries/qt3/slack-desc b/libraries/qt3/slack-desc
new file mode 100644
index 0000000000000..5a793a535f66a
--- /dev/null
+++ b/libraries/qt3/slack-desc
@@ -0,0 +1,19 @@
+# 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------------------------------------------------------|
+qt3: Qt3 (a multi-platform C++ graphical user interface toolkit, version 3)
+qt3:
+qt3: Qt is a complete and well-developed object-oriented framework for
+qt3: developing graphical user interface (GUI) applications using C++.
+qt3:
+qt3: This release is free only for development of free software for the X
+qt3: Window System. If you use Qt for developing commercial or other
+qt3: non-free software, you must have a professional license. Please see
+qt3: http://qt.nokia.com/products/licensing for details on the licensing
+qt3: information.
+qt3: