updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / eclipse-qt-eclipse-integration / PKGBUILD
blobe771c98172ad1d87f7aac703a929a0cb41f59dcf
1 # Contributor: marc.weidinger@gmail.com
2 # Contributor: Tanguy BouzĂ©loc <the.zauron@gmail.com>
3 pkgname=eclipse-qt-eclipse-integration
4 pkgver=1.5.1
5 pkgrel=1
6 pkgdesc="Qt Eclipse integration for C++"
7 arch=('i686' 'x86_64')
8 url="http://www.qtsoftware.com/developer/eclipse-integration"
9 license=('LGPL')
10 depends=('qt=4.5.1' 'eclipse>=3.4' 'eclipse-cdt>=4.0')
11 makedepends=('apache-ant' 'java-environment')
12 conflicts=('eclipse-qt4')
13 _qtver=4.5.1
14 _qtpkgfqn="qt-x11-opensource-src-${_qtver}"
15 _qtpkgurl="ftp://ftp.qtsoftware.com/qt/source/${_qtpkgfqn}.tar.bz2"
16 _qtpkgsum='afc43e566341cf3e5ed0bcb974f0c3b2'
17 install=${pkgname}.install
18 [ $CARCH = "i686" ] && {
19     source=("http://dist.trolltech.com/developer/download/qt-eclipse-integration-linux.x86-${pkgver}-src.tar.gz" "${_qtpkgurl}")
20     md5sums=('b540286381a974355e99ad48a482c395' "${_qtpkgsum}")
21     _pltfrm="linux.x86"
22 } || {
23     source=("http://dist.trolltech.com/developer/download/qt-eclipse-integration-linux.x86_64-${pkgver}-src.tar.gz" "${_qtpkgurl}")
24     md5sums=('648f35ee4ae0c8044e3d885b2dfc77b1' "${_qtpkgsum}")
25     _pltfrm="linux.x86_64"
29 build() {
30   _blt=${pkgname:8}-${_pltfrm}-${pkgver}
31   cd $srcdir/${_blt}
33   export QTDIR=/usr
34   export JAVADIR=${JAVA_HOME}
35   export ECLIPSEDIR=/usr/share/eclipse
37   sed -i 's|\(^.*grep "org\[.\]eclipse\[.\]cdt.*jar".*$\)|#makepkg_edit#\1|' build.sh
38   # Ensure $QTDIR does not point to Qt3:
39   ${QTDIR}/bin/qmake --version | egrep '[^\.]4' >/dev/null || { 
40       echo '$QTDIR might not point to a Qt4 build'; return 1;
41   }
43   patch com.trolltech.qtcppproject/build.xml ${startdir}/include_dropins.patch || return 1
45   # qswt requires designer private headers
46   mkdir -p qswt/designer/QtDesigner/private
47   cp ${srcdir}/${_qtpkgfqn}/tools/designer/src/lib/shared/*_p.h qswt/designer/QtDesigner/private
49   ./build.sh || return 1
51   mkdir -p ${pkgdir}/${ECLIPSEDIR}/dropins/eclipse 
52   cp -R ${srcdir}/${_blt}/eclipse/plugins ${pkgdir}/${ECLIPSEDIR}/dropins/eclipse/.
53   cp -R ${srcdir}/${_blt}/eclipse/features ${pkgdir}/${ECLIPSEDIR}/dropins/eclipse/.
54   chmod -R +r,go-w ${pkgdir}/${ECLIPSEDIR}/dropins/eclipse/*
55   install -m644 -D LICENSE.TXT ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.TXT