CHANGELOG 2005-08-17
[hdw-linux/hdw-linux.git] / packages / x11 / qt / qt
1 # hdw - linux qt package
2 #
3 # author: hackbard@hackdaworld.dyndns.org
4 #
5 # [V] 3.3.4
6 # [S] 3-4
7 # [D] qt-x11-free-3.3.4.tar.bz2 ftp://ftp.trolltech.com/qt/source/
8
9 pre_install()   {
10         # where is qt stuff
11         export QTDIR=`pwd`
12         export PATH="$PATH:$QTDIR/bin"
13         export LD_LIBRARY_PATH="$QTDIR/lib"
14         
15         # modify configure, so it is none interactive
16         sed 's/read acceptance/acceptance="yes"/' configure > configure_tmp
17         mv -vf configure_tmp configure ; chmod 755 configure
18
19         # adjust qmake.conf directories (use ' instead of " to not eval $QTDIR)
20         sed -i -e 's:$(QTDIR)/include:&/qt:' -e 's:$(QTDIR)/lib:&/qt:' \
21                 mkspecs/linux*/qmake.conf
22                 }
23
24 confopt="-prefix $prefix -headerdir $prefix/include/qt -docdir $docdir"
25 confopt="$confopt -plugindir $prefix/lib/qt/plugins -datadir $prefix/share/qt"
26 confopt="$confopt -translationdir $prefix/share/qt/translation"
27 confopt="$confopt -sysconfdir $sysconfdir/qt"
28 confopt="$confopt -thread -no-exceptions"
29 confopt="$confopt -system-zlib -system-libpng -system-libjpeg -qt-gif"
30 confopt="$confopt -plugin-imgfmt-mng -plugin-imgfmt-png"
31
32 build_main()    {
33         ./configure $confopt
34         find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib@@g"
35         make $make_conf
36         make $install_conf install
37                 }
38
39 post_install()  {
40         # compatibility symlinks
41         for i in $prefix/lib/libqt-mt.so*; do
42                 ln -svf $i ${i/-mt}
43         done
44         # documentation
45         mkdir -p $docdir
46         cp -v -r doc/man $prefix/man
47         cp -v -r examples $docdir
48         # profile
49         cat > $root/etc/profile.d/qt <<-EOP
50 QTDIR=$prefix
51 PATH="\$PATH:\$QTDIR/bin"
52 MANDIR="\$MANPATH:\$QTDIR/man"
53 export QTDIR PATH MANPATH
54 EOP
55                 }