1 # Contributor: marc.weidinger@gmail.com
2 # Contributor: Tanguy Bouzéloc <the.zauron@gmail.com>
3 pkgname=eclipse-qt-eclipse-integration
6 pkgdesc="Qt Eclipse integration for C++"
8 url="http://www.qtsoftware.com/developer/eclipse-integration"
10 depends=('qt=4.5.1' 'eclipse>=3.4' 'eclipse-cdt>=4.0')
11 makedepends=('apache-ant' 'java-environment')
12 conflicts=('eclipse-qt4')
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}")
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"
30 _blt=${pkgname:8}-${_pltfrm}-${pkgver}
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;
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