diff options
Diffstat (limited to 'arch/3.5.13/trinity-base/trinity-qt3')
-rw-r--r-- | arch/3.5.13/trinity-base/trinity-qt3/PKGBUILD | 169 | ||||
-rw-r--r-- | arch/3.5.13/trinity-base/trinity-qt3/qt-patches.tar.bz2 | bin | 0 -> 13639 bytes | |||
-rw-r--r-- | arch/3.5.13/trinity-base/trinity-qt3/qt3.install | 12 |
3 files changed, 181 insertions, 0 deletions
diff --git a/arch/3.5.13/trinity-base/trinity-qt3/PKGBUILD b/arch/3.5.13/trinity-base/trinity-qt3/PKGBUILD new file mode 100644 index 000000000..c5e79d43b --- /dev/null +++ b/arch/3.5.13/trinity-base/trinity-qt3/PKGBUILD @@ -0,0 +1,169 @@ +# Maintainer: Pawel 'l0ner' Soltys <pwslts@gmail.com> +# Contributor: Calvin Morrison <MutantTurkey@gmail.com> + +pkgname=trinity-qt3 +pkgver=3.8.8.d +pkgrel=5 +pkgdesc="The Qt3 gui toolkit - with Trinity upstream" +arch=('i686' 'x86_64') +url="http://trinitydesktop.org" +license=('GPL') +groups=('trinity-base') +depends=('libpng' 'libjpeg' 'libxmu' 'libxcursor' 'libxinerama' 'mesa' + 'libxft' 'libxrandr') +makedepends=('mysql' 'postgresql' 'sqlite3' 'unixodbc' 'libmng' 'libxi') + # cups [add for cups support, add -cups to ./configure opts] +optdepends=('libmysqlclient' 'postgresql-libs' 'unixodbc') +provides=('qt3' 'qt3-enhanced') +replaces=('qt3-enhanced' 'qt3') +options=('libtool' '!emptydirs') +install='qt3.install' +source=('http://mirror.ets.kth.se/trinity/releases/3.5.13/dependencies/qt3-3.3.8.d.tar.gz' + 'qt-patches.tar.bz2') +md5sums=('78dc675e84aed595375449818cbb589a' + 'de4d95f8d236ecc85bad4876efd8fdf0') + +_prefix="/opt/qt3" + +build() { + msg "Patching source code..." + + cd $srcdir/qt3 + + # apply other qt patches from debian/gentoo and kde + for patch in $srcdir/qt-patches/*.patch; do + _p=`basename $patch` + msg "Applying patch $_p.." + patch -Np0 -i $patch + done + + msg "Setting enviroment variables..." + export QTDIR="${srcdir}/qt3/" + export PATH=${QTDIR}/bin:${PATH} + export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH} + export QMAKESPEC=$QTDIR/mkspecs/linux-g++ + + if [ "$CARCH" = "x86_64" ]; then + export ARCH="-64" + else unset ARCH + fi + + cd "${srcdir}/qt3" + + 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..." + #make -C qmake || return 1 + ./configure \ + -prefix ${_prefix} \ + -platform linux-g++${ARCH} \ + -sysconfdir /etc/qt \ + -release \ + -sm \ + -nis \ + -stl \ + -no-g++-exceptions \ + -thread \ + -shared \ + -dlopen-opengl \ + -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 + # 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/tools/designer/designer/Makefile + [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/tools/designer/editor/Makefile + [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/tools/assistant/lib/Makefile + [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/tools/designer/uilib/Makefile + + msg "Building - $pkgname..." + + # build sql plugins + cd "${srcdir}"/qt3 + make -C qmake + cd "${srcdir}"/qt3/plugins/src/sqldrivers/mysql + "${srcdir}"/qt3/bin/qmake -o Makefile "INCPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.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 + + # fix the broken makefiles + # sed -i 's|[[:space:]]*strip.*doc/html.*$|#|g' src/Makefile + + # build rest + make + +} + +package() { + msg "Packaging - $pkgname-$pkgver" + cd "$srcdir/qt3" + + make INSTALL_ROOT="$pkgdir" install + + msg "Cleaning package..." + + 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 + + # Build ld.so.conf file + install -d -m755 ${pkgdir}/etc/ld.so.conf.d/ + echo "${_prefix}/lib" >> ${pkgdir}/etc/ld.so.conf.d/qt3.conf + + # Build and install qt.profile + install -d -m755 ${pkgdir}/etc/profile.d/ + echo "export QTDIR=${_prefix}" > ${pkgdir}/etc/profile.d/qt3.sh + echo "export QT_XFT=true" >> ${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 + + # ln -sf $_prefix/bin/qtconfig "${pkgdir}"$_prefix/bin/qt3config + + # install man pages + install -d -m755 "${pkgdir}"$_prefix/man + cp -r "${srcdir}"/qt3/doc/man/{man1,man3} "${pkgdir}"$_prefix/man/ + + # libtoolslay + find $startdir/pkg -name '*.la' -exec rm {} \; + + # Arch64 fix + #if [ "$CARCH" = "x86_64" ]; then + # [ -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 + +} diff --git a/arch/3.5.13/trinity-base/trinity-qt3/qt-patches.tar.bz2 b/arch/3.5.13/trinity-base/trinity-qt3/qt-patches.tar.bz2 Binary files differnew file mode 100644 index 000000000..4794e9291 --- /dev/null +++ b/arch/3.5.13/trinity-base/trinity-qt3/qt-patches.tar.bz2 diff --git a/arch/3.5.13/trinity-base/trinity-qt3/qt3.install b/arch/3.5.13/trinity-base/trinity-qt3/qt3.install new file mode 100644 index 000000000..2a8dc4c98 --- /dev/null +++ b/arch/3.5.13/trinity-base/trinity-qt3/qt3.install @@ -0,0 +1,12 @@ +post_install() { + ldconfig &> /dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} + |