PKGBUILDs/extra/qt3/PKGBUILD

137 lines
5.6 KiB
Bash
Raw Normal View History

2012-02-08 15:33:01 +00:00
# $Id: PKGBUILD 149356 2012-02-07 05:40:02Z eric $
2011-12-22 07:10:14 +00:00
# Maintainer: Eric Bélanger <eric@archlinux.org>
2011-01-21 04:44:51 +00:00
2011-12-22 07:10:14 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2011-01-21 04:44:51 +00:00
# - added arm.patch to fix compiling on ARM with GCC >= 4
# Source: http://lists.trolltech.com/qt-embedded-interest/2007-03/msg00003.html
2012-11-24 17:34:15 +00:00
# ALARM: Michael Stevens
# - replaces arm.patch with arm_no_packed.patch
# As of GCC-4.7 there is no way to get a reference to a packed ushort.
# Therefore we need to replace the 'ushort &unicode()' with 'ushort *unicodep()' breaking the exsting API
2011-01-21 04:44:51 +00:00
pkgname=qt3
2012-02-08 15:33:01 +00:00
pkgver=3.3.8b
2012-10-14 16:45:24 +00:00
pkgrel=2
2012-02-08 15:33:01 +00:00
epoch=1
2011-05-17 03:02:54 +00:00
pkgdesc="The QT3 gui toolkit"
arch=('i686' 'x86_64')
2011-01-21 04:44:51 +00:00
url="http://www.trolltech.com/products/qt/index.html"
2011-12-22 07:10:14 +00:00
license=('GPL')
2012-10-14 16:45:24 +00:00
depends=('libpng' 'libxmu' 'libxcursor' 'libxinerama' 'libxft'
2011-05-17 03:02:54 +00:00
'libxrandr' 'libmng')
2012-10-14 16:45:24 +00:00
makedepends=('mysql' 'postgresql' 'unixodbc' 'sqlite3' 'mesa')
2011-01-21 04:44:51 +00:00
optdepends=('libmysqlclient' 'postgresql-libs' 'unixodbc')
2011-12-22 07:10:14 +00:00
options=('!libtool')
install=qt.install
2012-02-08 15:33:01 +00:00
source=(ftp://ftp.trolltech.com/qt/source/qt-x11-free-${pkgver}.tar.gz
qt.profile qt3-png15.patch qt-copy-kde-patches.tar.bz2 qt-patches.tar.bz2
2012-11-24 17:34:15 +00:00
eastern_asian_languagues.diff qt-odbc.patch gcc-4.6.patch arm_no_packed.patch)
2012-02-08 15:33:01 +00:00
sha1sums=('745def6250dc7f337dbb265e20bf38dcb41fd854'
2011-12-22 07:10:14 +00:00
'd2e257a9011208b2cb81b9cf47915b9a2f9dab83'
2012-02-06 15:38:55 +00:00
'3d19510c46016a1a211d97bf8f82b01498b1b33c'
2012-02-08 15:33:01 +00:00
'33418e5b117458af23c72cdbffc0c339bc34bdc4'
2011-12-22 07:10:14 +00:00
'116afa0e737bdf27ea27f9b3653aeb56db9ec151'
'40c7b8f06a21f809ddeb8b5560e9da63ccac6a17'
'1346320614f6f86fbeb10b9fbad721dea29f5b61'
'd9b83b8f6f9c8bd98d290dc1d0e9913a00b62c3f'
2012-11-24 17:34:15 +00:00
'43565c3b33c5d6f7adb217e4afea49adb48f6c97')
2011-01-21 04:44:51 +00:00
# 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
2011-12-22 07:10:14 +00:00
export QTDIR="${srcdir}"/qt-x11-free-${pkgver}
2011-01-21 04:44:51 +00:00
export PATH=${QTDIR}/bin:${PATH}
export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
export QMAKESPEC=$QTDIR/mkspecs/linux-g++
2011-12-22 07:10:14 +00:00
cd "${srcdir}"/qt-x11-free-${pkgver}
2011-01-21 04:44:51 +00:00
# apply qt patches from kde.org
for i in ../qt-copy-kde-patches/*; do
2012-02-08 15:33:01 +00:00
patch -p0 -i $i
2011-01-21 04:44:51 +00:00
done
# apply other qt patches and one security fix from debian/gentoo
for i in ../qt-patches/*; do
2012-02-08 15:33:01 +00:00
patch -p1 -i $i
2011-01-21 04:44:51 +00:00
done
# fix CJK font/chars select error (FS#11245)
2011-05-17 03:02:54 +00:00
patch -p1 -i "${srcdir}"/eastern_asian_languagues.diff
2011-01-21 04:44:51 +00:00
# fix build problem against new unixODBC
2011-05-17 03:02:54 +00:00
patch -p1 -i "${srcdir}"/qt-odbc.patch
# fix build with gcc 4.6.0
patch -p1 -i "${srcdir}"/gcc-4.6.patch
2012-02-08 15:33:01 +00:00
patch -p0 -i "${srcdir}"/qt3-png15.patch
2011-05-17 03:02:54 +00:00
# Arch Linux ARM patch
2012-11-24 17:34:15 +00:00
patch -p1 -i ${srcdir}/arm_no_packed.patch
2011-01-21 04:44:51 +00:00
# start compiling qt
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*}
if [ "$CARCH" = "x86_64" ]; then
export ARCH="-64"
else unset ARCH
fi
2011-05-17 03:02:54 +00:00
./configure -prefix /opt/qt \
-platform linux-g++$ARCH \
-system-zlib \
-qt-gif \
-release \
-shared \
-sm \
-nis \
-thread \
-stl \
2011-01-21 04:44:51 +00:00
-system-lib{png,jpeg,mng} \
2011-05-17 03:02:54 +00:00
-no-g++-exceptions \
-plugin-sql-{mysql,psql,sqlite,odbc}
2011-01-21 04:44:51 +00:00
# fix /opt/qt/lib path
2011-12-22 07:10:14 +00:00
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/src/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/designer/designer/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/designer/editor/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/assistant/lib/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/designer/uilib/Makefile
2011-05-17 03:02:54 +00:00
2011-12-22 07:10:14 +00:00
cd "${srcdir}"/qt-x11-free-${pkgver}
2011-05-17 03:02:54 +00:00
make -C qmake
2011-12-22 07:10:14 +00:00
cd "${srcdir}"/qt-x11-free-${pkgver}/plugins/src/sqldrivers/mysql
"${srcdir}"/qt-x11-free-${pkgver}/bin/qmake -o Makefile "INCPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro
cd "${srcdir}"/qt-x11-free-${pkgver}/plugins/src/sqldrivers/psql
"${srcdir}"/qt-x11-free-${pkgver}/bin/qmake -o Makefile "INCPATH+=/usr/src/include /usr/include/postgresql/server" "LIBS+=-L/usr/lib -lpq" psql.pro
2011-05-17 03:02:54 +00:00
2011-12-22 07:10:14 +00:00
cd "${srcdir}"/qt-x11-free-${pkgver}
2011-01-21 04:44:51 +00:00
# fix the broken makefiles
#sed -i 's|[[:space:]]*strip.*doc/html.*$|#|g' src/Makefile
2011-05-17 03:02:54 +00:00
make
}
package() {
2011-12-22 07:10:14 +00:00
cd "${srcdir}"/qt-x11-free-${pkgver}
2011-05-17 03:02:54 +00:00
make INSTALL_ROOT="${pkgdir}" install
rm -rf "${pkgdir}"/opt/qt/{phrasebooks,templates,translations}
2011-12-22 07:10:14 +00:00
sed -i "s|-L${srcdir}/qt-x11-free-${pkgver}/lib ||g" "${pkgdir}"/opt/qt/lib/*.prl
2011-05-17 03:02:54 +00:00
install -D -m755 qmake/qmake "${pkgdir}"/opt/qt/bin/qmake
install -D -m755 "${srcdir}"/qt.profile "${pkgdir}"/etc/profile.d/qt3.sh
ln -sf /opt/qt/bin/qtconfig "${pkgdir}"/opt/qt/bin/qt3config
rm -f "${pkgdir}"/opt/qt/mkspecs/linux-g++$ARCH/linux-g++$ARCH
2011-01-21 04:44:51 +00:00
# install man pages
2011-05-17 03:02:54 +00:00
install -d -m755 "${pkgdir}"/opt/qt/man
2011-12-22 07:10:14 +00:00
cp -r "${srcdir}"/qt-x11-free-${pkgver}/doc/man/{man1,man3} "${pkgdir}"/opt/qt/man/
2011-01-21 04:44:51 +00:00
2011-05-17 03:02:54 +00:00
install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
echo '/opt/qt/lib' > "${pkgdir}"/etc/ld.so.conf.d/qt3.conf
2011-01-21 04:44:51 +00:00
}