4 pkgdesc="LD_PRELOAD hack with helper scripts to make gtk and qt-only programs use KDE file dialogs."
6 url="http://www.kde-apps.org/content/show.php?content=36077"
8 depends=('kdelibs3' 'qt3')
9 makedepends=('pkgconfig' 'automoc4' 'cmake' 'gettext')
11 source=(http://home.freeuk.com/cpdrummond/KGtk-${pkgver}.tar.bz2 kfmclient const.patch)
12 md5sums=('b456046727f0120734410573d75c47e0'
13 '6fdecfadd501a388aeb9ad5efa442b01'
14 '40b1ff8b469af58a8664b8197902343d')
17 cd $srcdir/KGtk-${pkgver}
19 patch -Np1 -i ../const.patch || return 1
21 for f in */*-wrapper.cmake; do sed -i 's|LD_PRELOAD=@CMAKE_INSTALL_PREFIX@/lib/kgtk/lib|LD_PRELOAD=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@/kgtk/lib|' ${f}; done
23 mkdir -p $srcdir/build3
26 export PATH=/opt/kde/bin:/opt/qt/bin:$PATH
28 export KDEDIR=/opt/kde
30 cmake ../KGtk-${pkgver} -DCMAKE_INSTALL_PREFIX=/opt/kde -DKGTK_KDE3=true -DKGTK_GTK2=true -DKGTK_QT3=true || return 1
32 make DESTDIR=$pkgdir install || return 1
36 mkdir -p $pkgdir/opt/kde/lib/kgtk || return 1
37 cp kfmclient $pkgdir/opt/kde/lib/kgtk/kfmclient || return 1
38 chmod +x $pkgdir/opt/kde/lib/kgtk/kfmclient || return 1
40 sed -i 's#LD_PRELOAD=#PATH="/opt/kde/lib/kgtk:$PATH"; LD_PRELOAD=#' $pkgdir/opt/kde/bin/kqt3-wrapper