qt3: removed no-rpath patch

- cleaned up and commented
   - removed default ./configure options
   - added documentation build
   - changed make to make sub-tools so we don't build examples and tutorials
      change it back to make to get them
   - added unset _p patch so we free the variables after we don't need them anymore
   - removed libtool slay
   - moved libmng from makedepends to depends. Since we are using it, it is
      more like runtime dependency, than build-only optdep.
   - fixed another typo in patches (001-qiconview-rebuildcontainer.patch)
   - added accidentaly removed qt-unixodbc.patch
   - added postgresql and mysql include and library location to ./configure options
      those should probably be detected automatically. fix needed.
   - added links to tools provided by qt3 with naming scheme qt3* so we can run
      them with qt4 installed.
   - changed optdepends from libs to full packages
   - added optdepens descriptions
   - changed builddepds from full packages to libraries
   - added post-install message about new naming scheme of the provided tools.
pull/3/head
Pawel "l0ner" Soltys 13 years ago
parent ead369ac94
commit 021036598a

@ -9,11 +9,19 @@ arch=('i686' 'x86_64')
url="http://trinitydesktop.org" url="http://trinitydesktop.org"
license=('GPL') license=('GPL')
groups=('trinity-base') groups=('trinity-base')
depends=('libpng' 'libjpeg' 'libxmu' 'libxcursor' 'libxinerama' 'mesa' depends=('libpng' 'libjpeg' 'libxmu' 'libmng'
'libxft' 'libxrandr') 'libxcursor' 'libxinerama' 'mesa' 'libxft' 'libxrandr')
makedepends=('mysql' 'postgresql' 'sqlite3' 'unixodbc' 'libmng' 'libxi') makedepends=('libxi'
# cups [add for cups support, add -cups to ./configure opts] 'libmysqlclient' 'postgresql-libs' 'unixodbc' 'libcups')
optdepends=('libmysqlclient' 'postgresql-libs' 'unixodbc') #'mysql' 'postgresql' 'sqlite3' 'unixodbc' 'libxi' 'cups')
# cups - add for cups support
# cups is enabled by default in ./configure
# remove -no-cups if you want cups support in qt3
optdepends=('cups: The CUPS Printing System - for printing support'
'postgresql: A sophisticated object-relational DBMS - databse support'
'unixodbc: ODBC API for linux - databse support'
'mysql: A fast SQL database server - databse support'
#'libmysqlclient' 'postgresql-libs' 'unixodbc' 'cups')
provides=('qt3' 'qt3-enhanced') provides=('qt3' 'qt3-enhanced')
replaces=('qt3-enhanced' 'qt3') replaces=('qt3-enhanced' 'qt3')
options=('libtool' '!emptydirs') options=('libtool' '!emptydirs')
@ -21,21 +29,40 @@ install='qt3.install'
source=('http://mirror.ets.kth.se/trinity/releases/3.5.13/dependencies/qt3-3.3.8.d.tar.gz' source=('http://mirror.ets.kth.se/trinity/releases/3.5.13/dependencies/qt3-3.3.8.d.tar.gz'
'qt-patches.tar.bz2') 'qt-patches.tar.bz2')
md5sums=('78dc675e84aed595375449818cbb589a' md5sums=('78dc675e84aed595375449818cbb589a'
'de4d95f8d236ecc85bad4876efd8fdf0') '4091a624930738779f76764f4cb6ac5f')
_prefix="/opt/qt3" _prefix="/opt/qt3"
build() { build() {
msg "Patching source code..."
cd $srcdir/qt3 cd $srcdir/qt3
# apply other qt patches from debian/gentoo and kde msg "Patching source code..."
# apply qt patches from debian/gentoo and kde
for patch in $srcdir/qt-patches/*.patch; do for patch in $srcdir/qt-patches/*.patch; do
_p=`basename $patch` _p=`basename $patch`
msg "Applying patch $_p.." msg "Applying patch $_p.."
patch -Np0 -i $patch patch -Np0 -i $patch
done done
unset _p patch
# Originally this was done in a patch but probably it's a bad idea
# Besides we need the rpath, since we don't install qt in the default
# system dirs. If we would install into default /usr hierarchy
# we would uncomment this. See Beyond Linux From Scratch book
# for more info.
# sed -i '/QMAKE_RPATH/d' mkspecs/linux*/qmake.conf
# These are probably arch-specific. They were present in old qt3
# PKGBULD, they were present in kdemod3 PKGBUILD, they are present
# here.
sed -i 's|-cp -P -f|-cp -L -f|' qmake/Makefile.unix
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++/qmake.conf
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-32/qmake.conf
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-64/qmake.conf
sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
# auto license acceptance
sed -i "s|read acceptance|acceptance=yes|" configure
msg "Setting enviroment variables..." msg "Setting enviroment variables..."
export QTDIR="${srcdir}/qt3/" export QTDIR="${srcdir}/qt3/"
@ -44,50 +71,42 @@ build() {
export QMAKESPEC=$QTDIR/mkspecs/linux-g++ export QMAKESPEC=$QTDIR/mkspecs/linux-g++
if [ "$CARCH" = "x86_64" ]; then if [ "$CARCH" = "x86_64" ]; then
export ARCH="-64" export ARCH="-64"
else unset ARCH else unset ARCH
fi fi
cd "${srcdir}/qt3" # Remove useless to us mkspecs
rm -rf mkspecs/{*aix*,*bsd*,cygwin*,dgux*,darwin*,hpux*,hurd*,irix*,lynxos*,macx*,qnx*,reliant*,sco*,solaris*,tru64*,unixware*,win32*} rm -rf mkspecs/{*aix*,*bsd*,cygwin*,dgux*,darwin*,hpux*,hurd*,irix*,lynxos*,macx*,qnx*,reliant*,sco*,solaris*,tru64*,unixware*,win32*}
sed -i 's|-cp -P -f|-cp -L -f|' qmake/Makefile.unix
rm -rf doc/html examples tutorial
sed -i "s|sub-tutorial sub-examples||" Makefile
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++/qmake.conf
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-32/qmake.conf
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-64/qmake.conf
sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
# auto license acceptance
sed -i "s|read acceptance|acceptance=yes|" configure
msg "Starting configure..." msg "Starting configure..."
#make -C qmake || return 1
./configure \ ./configure \
-prefix ${_prefix} \ -prefix ${_prefix} \
-platform linux-g++${ARCH} \
-sysconfdir /etc/qt \ -sysconfdir /etc/qt \
-release \ -I/usr/include/mysql \
-sm \ -I/usr/include/postgresql/server \
-nis \ -lpq \
-stl \ -lmysqlclient \
-no-g++-exceptions \ -L/usr/lib/mysql \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-plugin-imgfmt-png \
-plugin-imgfmt-jpeg \
-plugin-imgfmt-mng \
-plugin-sql-mysql \
-plugin-sql-psql \
-plugin-sql-sqlite \
-plugin-sql-odbc \
-platform linux-g++${ARCH} \
-no-exceptions \
-thread \ -thread \
-shared \
-dlopen-opengl \ -dlopen-opengl \
-no-ipv6 \ -no-ipv6
-system-zlib \
-{system-lib,plugin-imgfmt-}{png,jpeg,mng} \
-qt-gif \
-xinerama \
-xcursor \
-xrender \
-xft \
-plugin-sql-{mysql,psql,sqlite,odbc}
# 64bit fixes pulled from extras/qt3 PKGBUILD # 64bit fixes pulled from extras/qt3 PKGBUILD
# this is Arch-specific
# fix /opt/qt/lib path # fix /opt/qt/lib path
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/src/Makefile [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/src/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/tools/designer/designer/Makefile [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/tools/designer/designer/Makefile
@ -98,20 +117,19 @@ build() {
msg "Building - $pkgname..." msg "Building - $pkgname..."
# build sql plugins # build sql plugins
cd "${srcdir}"/qt3 # do we need this, I don't think so.
make -C qmake #cd "${srcdir}"/qt3
cd "${srcdir}"/qt3/plugins/src/sqldrivers/mysql #make -C qmake
"${srcdir}"/qt3/bin/qmake -o Makefile "INCPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro #cd "${srcdir}"/qt3/plugins/src/sqldrivers/mysql
cd "${srcdir}"/qt3/plugins/src/sqldrivers/psql #"${srcdir}"/qt3/bin/qmake -o Makefile "INCPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro
"${srcdir}"/qt3/bin/qmake -o Makefile "INCPATH+=/usr/src/include /usr/include/postgresql/server" "LIBS+=-L/usr/lib -lpq" psql.pro #cd "${srcdir}"/qt3/plugins/src/sqldrivers/psql
#"${srcdir}"/qt3/bin/qmake -o Makefile "INCPATH+=/usr/src/include /usr/include/postgresql/server" "LIBS+=-L/usr/lib -lpq" psql.pro
cd "${srcdir}"/qt3 cd "${srcdir}"/qt3
# fix the broken makefiles # build rest, but without tutorials and examples
# sed -i 's|[[:space:]]*strip.*doc/html.*$|#|g' src/Makefile # of you want them, remove sub-tools
make sub-tools
# build rest
make
} }
@ -121,24 +139,24 @@ package() {
make INSTALL_ROOT="$pkgdir" install make INSTALL_ROOT="$pkgdir" install
msg "Cleaning package..." # install qmake
rm -rf "${pkgdir}"$_prefix/{phrasebooks,templates,translations}
sed -i "s|-L${srcdir}/qt3/lib ||g" "${pkgdir}"$_prefix/lib/*.prl
rm -f "${pkgdir}"${_prefix}/mkspecs/linux-g++$ARCH/linux-g++$ARCH
# Fix issues with GCC4
sed -i 's/\(char\*\)/const char*/g' $pkgdir$_prefix/include/*.h
# Fix the mess we did fixing issues with GCC4
sed -i 's/const u char/const uchar/g' $pkgdir$_prefix/include/*.h
sed -i 's/u const char/const uchar/g' $pkgdir$_prefix/include/*.h
sed -i 's/const const/const/g' $pkgdir$_prefix/include/*.h
sed -i 's/uconst/ unsigned /g' $pkgdir$_prefix/include/*.h
sed -ie 's/define QTIMER_H/&\n#include "qglobal.h"/g' $pkgdir$_prefix/include/qtimer.h
install -D -m755 qmake/qmake "${pkgdir}"$_prefix/bin/qmake install -D -m755 qmake/qmake "${pkgdir}"$_prefix/bin/qmake
# install doc pages which are missed by make install
install -d -m755 "${pkgdir}"$_prefix/doc/
cp -r "${srcdir}"/qt3/doc "${pkgdir}"$_prefix/doc
# install link the apps provided by qt3 so we don't collide with
# qt4 and can run them.
ln -sf $_prefix/bin/assistant "${pkgdir}"$_prefix/bin/qt3assistant
ln -sf $_prefix/bin/designer "${pkgdir}"$_prefix/bin/qt3designer
ln -sf $_prefix/bin/linguist "${pkgdir}"$_prefix/bin/qt3linguist
ln -sf $_prefix/bin/lrelease "${pkgdir}"$_prefix/bin/qt3lrelease
ln -sf $_prefix/bin/lupdate "${pkgdir}"$_prefix/bin/qt3lupdate
ln -sf $_prefix/bin/moc "${pkgdir}"$_prefix/bin/qt3moc
ln -sf $_prefix/bin/qmake "${pkgdir}"$_prefix/bin/qt3qmake
ln -sf $_prefix/bin/qtconfig "${pkgdir}"$_prefix/bin/qt3config
# Build ld.so.conf file # Build ld.so.conf file
install -d -m755 ${pkgdir}/etc/ld.so.conf.d/ install -d -m755 ${pkgdir}/etc/ld.so.conf.d/
echo "${_prefix}/lib" >> ${pkgdir}/etc/ld.so.conf.d/qt3.conf echo "${_prefix}/lib" >> ${pkgdir}/etc/ld.so.conf.d/qt3.conf
@ -150,20 +168,25 @@ package() {
echo "export PATH+=:${_prefix}/bin" >> ${pkgdir}/etc/profile.d/qt3.sh echo "export PATH+=:${_prefix}/bin" >> ${pkgdir}/etc/profile.d/qt3.sh
echo "export PKG_CONFIG_PATH+=:${_prefix}/pkgconfig" >> ${pkgdir}/etc/profile.d/qt3.sh echo "export PKG_CONFIG_PATH+=:${_prefix}/pkgconfig" >> ${pkgdir}/etc/profile.d/qt3.sh
# ln -sf $_prefix/bin/qtconfig "${pkgdir}"$_prefix/bin/qt3config msg "Cleaning package..."
# install man pages #rm -rf "${pkgdir}"$_prefix/{phrasebooks,templates,translations}
install -d -m755 "${pkgdir}"$_prefix/man
cp -r "${srcdir}"/qt3/doc/man/{man1,man3} "${pkgdir}"$_prefix/man/
# libtoolslay # remove any link to the compiled libraries present in
find $startdir/pkg -name '*.la' -exec rm {} \; # $srcdir, which won't be present in non-building system.
sed -i "s|-L${srcdir}/qt3/lib ||g" "${pkgdir}"$_prefix/lib/*.prl
#rm -f "${pkgdir}"${_prefix}/mkspecs/linux-g++$ARCH/linux-g++$ARCH
# Fix issues with GCC4
sed -i 's/\(char\*\)/const char*/g' $pkgdir$_prefix/include/*.h
# Fix the mess we did fixing issues with GCC4
sed -i 's/const u char/const uchar/g' $pkgdir$_prefix/include/*.h
sed -i 's/u const char/const uchar/g' $pkgdir$_prefix/include/*.h
sed -i 's/const const/const/g' $pkgdir$_prefix/include/*.h
sed -i 's/uconst/ unsigned /g' $pkgdir$_prefix/include/*.h
# Arch64 fix # missing include "qglobal.h" in include/qtimer.h fix
#if [ "$CARCH" = "x86_64" ]; then sed -ie 's/define QTIMER_H/&\n#include "qglobal.h"/g' $pkgdir$_prefix/include/qtimer.h
# [ -d $pkgdir$_prefix/mkspecs/linux-g++ ] || mkdir $pkgdir$_prefix/mkspecs/linux-g++
# cd $pkgdir$_prefix/mkspecs/linux-g++
# ln -s -v ../linux-g++-64/* .
#fi
} }

@ -1,12 +1,19 @@
post_install() { post_install() {
ldconfig &> /dev/null ldconfig &> /dev/null
echo "Note that the tools provided by this package (assistant, designer,"
echo "linguist, lrelease, lupdate, moc, qmake and qtconfig) have been"
echo "renamet to qt3<toolname> to ensure compatibility with Qt4 and should"
echo "be run through new command scheme."
echo "\nIn order to update PATH to include Qt3 binaries location, You should"
echo "reboot your system. Before you do that you can access Qt3 bin path by"
echo "sourcing /etc/profile.d/qt3.sh"
} }
post_upgrade() { post_upgrade() {
post_install ldconfig &> /dev/null
} }
post_remove() { post_remove() {
post_install ldconfig &> /dev/null
} }

Loading…
Cancel
Save