On 04/30/2011 06:15 PM, Ilya Chernykh wrote:
On Sunday 01 May 2011 01:57:41 David C. Rankin wrote:
I have finally gotten a few minutes to dive
back into Trinity. To my
chagrin, we have Arch has bumped from gcc 4.5 to gcc 4.6. I am having
problems building Qt3. Adding to the difficulty, the Qt3 build script for
Arch has been through a number of changes lately and I haven't had time to
verify the new build script under gcc 4.5 before the jump to gcc 4.6. So I
am working to understand whether this build failure is gcc related or if it
is a normal screw-up on my end.
See if this can help:
https://api.opensuse.org/public/source/KDE:KDE3/qt3/gcc46.diff
Hah!
It did -- Qt3 is building as we speak. Here is the PKGBUILD I'm using
(including the gcc46.diff). Baho, I don't know why the 'make subtools' works
without the patch, but I guess the parts that need #include <cstddef> aren't
triggered by that make. Here is what I have so far. I'll report back after I
have finished the build and tested it. Then I can catch up on all the changes in
the Trinity packages and what else I can build now :P
# $Id$
# Maintainer: David C. Rankin <drankinatty(a)gmail.com>
#
# All modifications and uses of this file are licensed under
# the software for which this file was made for, should the software
# be under an Open Source License, at least version 1.9, defined
# by the Open Source Initiative. In other cases, this file is automatically
# released to the Public Domain.
#
pkgname=trinity-qt3
pkgver=3.3.8b
pkgrel=1
pkgdesc="The Qt3 gui toolkit - with Trinity patch."
_prefix="/opt/qt"
_patchver=3.3.8c
arch=(i686 x86_64)
license=('GPL')
url="http://www.trolltech.com/products/qt/index.html"
pkgfqn=qt-x11-free-${pkgver}
# install=qt.install
groups=('trinity-bld')
depends=('libjpeg-turbo'
'libmng'
'libmysqlclient'
'libpng'
'libxmu'
'libxcursor'
'libxinerama'
'libxft'
'libxrandr'
'mesa'
'postgresql-libs'
'unixodbc')
makedepends=('cups' 'libxi' 'mysql' 'postgresql'
'unixodbc' 'sqlite3')
optdepends=()
# optdepends=('libmysqlclient' 'postgresql-libs' 'unixodbc')
provides=('trinity-qt3' 'qt3')
conflicts=('qt3' 'qt3-enhanced')
replaces=('trinity-qt3')
# 'ftp://ftp.trolltech.com/qt/source/${pkgfqn}.tar.gz'
#
ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.3.8b.tar.gz
source=(ftp://ftp.trolltech.com/qt/source/${pkgfqn}.tar.gz
qt3-png14.patch
qt-patches.tar.bz2
qt3-png14.patch
eastern_asian_languagues.diff
qt-odbc.patch
gcc46.diff
qt3_3.3.8c.arch.diff)
options=(!libtool)
md5sums=('9f05b4125cfe477cc52c9742c3c09009'
'1dc671df42b9030dbdf68bb61cd3375e'
'2f00e5c0c1e2c2a23dddc982cd79f3e0'
'1dc671df42b9030dbdf68bb61cd3375e'
'616f1f3029cf8375256ad6a406de3549'
'2178ca88dfd75a230918593b30eb0dbe'
'e77192301879b05a4b8ebc35d5c5702b'
'd763bdc087786a45e5e5eec84f5c9896')
# qt-copy-kde-patches come from
http://websvn.kde.org/trunk/qt-copy/patches/
# other qt-patches come from fedora and gentoo
build() {
unset QMAKESPEC
export QTDIR=${srcdir}/$pkgfqn
export PATH=${QTDIR}/bin:${PATH}
export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
export QMAKESPEC=$QTDIR/mkspecs/linux-g++
export CPATH=/usr/include/postgresql/server:/usr/include/mysql
cd ${QTDIR}
# cd ${srcdir}/$pkgfqn
# apply other qt patches and one security fix from debian/gentoo
for i in ../qt-patches/*; do
patch -Np1 -i $i || return 1
done
# fix CJK font/chars select error (FS#11245)
patch -p1 -i ${srcdir}/eastern_asian_languagues.diff || return 1
# fix build problem against new unixODBC
patch -p1 -i ${srcdir}/qt-odbc.patch || return 1
patch -p0 -i ${srcdir}/qt3-png14.patch || return 1
# patch for gcc 4.6
patch -p0 -i ${srcdir}/gcc46.diff || return 1
# patch for qt3_3.3.8c
patch -p0 -i ${srcdir}/qt3_3.3.8c.arch.diff || return 1
# start compiling qt
# baho additions
# # remove runtime library search not needed when installed into /usr
# sed -i '/QMAKE_RPATH/d' mkspecs/linux*/qmake.conf
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
sed -i "s|read acceptance|acceptance=yes|" configure
# remove unwanted mkspecs
rm -rf
mkspecs/{*aix*,*bsd*,cygwin*,dgux*,darwin*,hpux*,hurd*,irix*,lynxos*,macx*,qnx*,reliant*,sco*,solaris*,tru64*,unixware*,win32*}
# set arch if x86_64 build
if [ "$CARCH" = "x86_64" ]; then
export ARCH="-64"
else unset ARCH
fi
# ./configure -prefix /opt/qt -platform linux-g++$ARCH \
# -system-zlib -qt-gif -release -shared -sm -nis -thread -stl \
# -system-lib{png,jpeg,mng} \
# -no-g++-exceptions -plugin-sql-{mysql,psql,sqlite,odbc}
msg "Starting configure..."
./configure -prefix ${_prefix} \
-docdir ${_prefix}/share/doc/qt \
-headerdir ${_prefix}/include/qt \
-plugindir ${_prefix}/lib/qt/plugins \
-datadir ${_prefix}/share/qt \
-translationdir ${_prefix}/share/qt/translations \
-sysconfdir /etc/qt \
-qt-gif \
-system-zlib \
-system-libjpeg \
-plugin-imgfmt-jpeg \
-system-libmng \
-plugin-imgfmt-mng \
-system-libpng \
-plugin-imgfmt-png \
-plugin-sql-mysql \
-plugin-sql-psql \
-plugin-sql-sqlite \
-plugin-sql-odbc \
-no-exceptions \
-thread \
-no-tablet
#-platform linux-g++ \
# fix /opt/qt/lib path
[ "$CARCH" = "x86_64" ] && sed -i
"s|/opt/qt/lib64|/opt/qt/lib|g"
${QTDIR}/src/Makefile
[ "$CARCH" = "x86_64" ] && sed -i
"s|/opt/qt/lib64|/opt/qt/lib|g"
${QTDIR}/tools/designer/designer/Makefile
[ "$CARCH" = "x86_64" ] && sed -i
"s|/opt/qt/lib64|/opt/qt/lib|g"
${QTDIR}/tools/designer/editor/Makefile
[ "$CARCH" = "x86_64" ] && sed -i
"s|/opt/qt/lib64|/opt/qt/lib|g"
${QTDIR}/tools/assistant/lib/Makefile
[ "$CARCH" = "x86_64" ] && sed -i
"s|/opt/qt/lib64|/opt/qt/lib|g"
${QTDIR}/tools/designer/uilib/Makefile
# bahoo make
# make sub-tools
cd ${QTDIR}
make -C qmake || return 1
cd ${QTDIR}/plugins/src/sqldrivers/mysql
${QTDIR}/bin/qmake -o Makefile "INCPATH+=/usr/include/mysql"
"LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro
cd ${QTDIR}/plugins/src/sqldrivers/psql
${QTDIR}/bin/qmake -o Makefile "INCPATH+=/usr/src/include
/usr/include/postgresql/server" "LIBS+=-L/usr/lib -lpq" psql.pro
cd ${QTDIR}
# fix the broken makefiles
#sed -i 's|[[:space:]]*strip.*doc/html.*$|#|g' src/Makefile
make || return 1
}
package() {
msg "Packaging - $pkgname-$pkgver"
cd ${QTDIR}
pkgver=${_patchver}
make INSTALL_ROOT=${pkgdir} install
## Original Qt Build
rm -rf ${pkgdir}${_prefix}/{phrasebooks,templates,translations}
sed -i "s|-L${QTDIR}/lib ||g" ${pkgdir}${_prefix}/lib/*.prl
install -D -m755 qmake/qmake ${pkgdir}${_prefix}/bin/qmake
# Build and install qt.profile
echo "export QTDIR=${_prefix}" > ${srcdir}/qt.profile
echo "export QT_XFT=true" >> ${srcdir}/qt.profile
echo 'export PATH=$PATH:$QTDIR/bin' >> ${srcdir}/qt.profile
echo 'export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$QTDIR/pkgconfig' >>
${srcdir}/qt.profile
install -D -m755 ${srcdir}/qt.profile ${pkgdir}/etc/profile.d/qt3.sh
ln -sf ${_prefix}/bin/qtconfig ${pkgdir}${_prefix}/bin/qt3config
rm -f ${pkgdir}${_prefix}/mkspecs/linux-g++$ARCH/linux-g++$ARCH
# install man pages
mkdir -p ${pkgdir}${_prefix}/man
cp -r ${QTDIR}/doc/man/{man1,man3} ${pkgdir}${_prefix}/man/
# Uncomment to install examples
# cp -v -r ${QTDIR}/examples ${pkgdir}${_prefix}/share/doc/qt
install -d -m755 ${pkgdir}/etc/ld.so.conf.d/
echo "${_prefix}/lib" > ${pkgdir}/etc/ld.so.conf.d/qt3.conf
--
David C. Rankin, J.D.,P.E.