4 if [ -z "$QTDIR" ]; then
7 ver=`grep "QT_VERSION_STR" ${QTDIR}/include/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'`
8 if [ "$ver" == "3.3.3" ] ; then
16 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
17 #$DELIM ${PRODUCT_TYPE} $DELIM
18 export QTDIR=\${INSTALL_ROOT}/${PRODUCT}
19 export PATH=\${QTDIR}/bin:\$PATH
20 export LD_LIBRARY_PATH=\${QTDIR}/lib:\${LD_LIBRARY_PATH}
23 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
24 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
27 # looks for the native product and collects it's environment (used by make_env())
29 qtdir="`find_in_path libqt-mt.so.3.3.3 ${LD_LIBRARY_PATH}`"
30 if [ -z "${qtdir}" ] ; then
31 qtdir="`find_in_path libqt-mt.so.3.3.3 /usr/lib/qt3`"
33 if [ -n "${qtdir}" ] ; then
34 qtdir=`cd ${qtdir}/..; pwd`
35 moc="`find_in_path moc ${qtdir}/bin`"
36 uic="`find_in_path uic ${qtdir}/bin`"
37 if [ -n "${moc}" ] && [ -n "${uic}" ] ; then
38 tmp="\${QTDIR}/bin ${qtdir}/bin \${PATH} ${PATH}";
39 path=`sort_path ${tmp}`
40 tmp="\${QTDIR}/lib ${qtdir}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
41 ld_library_path=`sort_path ${tmp}`
42 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
43 #$DELIM ${PRODUCT_TYPE} $DELIM
46 export LD_LIBRARY_PATH=${ld_library_path}
49 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
57 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
63 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
64 source ${INSTALL_WORK}/$SHRC
66 makedir ${PRODUCT_DIR}
68 check_jb tar xfz ${SOURCE_DIR}/qt-3.3.3.tar.gz -C ${INSTALL_WORK}
71 mv -f configure configure-orig
72 sed -e "s%read acceptance%acceptance=yes%" configure-orig > configure
75 export QTDIR=${PRODUCT_WORK}
76 export LD_LIBRARY_PATH=${QTDIR}/lib:$LD_LIBRARY_PATH
79 QT_FLAGS="-release -thread -shared -qt-gif -platform linux-g++"
80 # use system graphics libraries
81 QT_FLAGS=$QT_FLAGS" -system-libjpeg -system-libpng -system-libmng -qt-imgfmt-jpeg -qt-imgfmt-png -qt-imgfmt-mng -lpng -lmng -ljpeg"
84 check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure $QT_FLAGS -prefix ${PRODUCT_DIR}
86 sed -e "s%^all: symlinks src-qmake src-moc sub-src sub-tools sub-tutorial sub-examples%all: symlinks src-qmake src-moc sub-src sub-tools%g" Makefile > _Makefile
87 mv -f _Makefile Makefile
90 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
93 # small trick: INSTALL_ROOT is used inside qt-3.3.3 installation
94 # so it should be set to empty string
95 export INSTALL_ROOT_BACKUP=$INSTALL_ROOT
96 export INSTALL_ROOT=""
97 check_job ${PRODUCT_DIR}/MAKE.LOG make
98 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
99 export INSTALL_ROOT=$INSTALL_ROOT_BACKUP
101 for b in `ls ${PRODUCT_WORK}/bin`; do
102 if [ ! -e ${PRODUCT_DIR}/bin/$b ] || [ -h ${PRODUCT_DIR}/bin/$b ]; then
103 if [ -h ${PRODUCT_DIR}/bin/$b ]; then
104 rm -f ${PRODUCT_DIR}/bin/$b
106 cp -f ${PRODUCT_WORK}/bin/$b ${PRODUCT_DIR}/bin/$b
109 #rm -rf ${PRODUCT_DIR}/doc
111 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
112 rm -fr ${PRODUCT_WORK}
118 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
119 source ${INSTALL_WORK}/$SHRC
121 check_jb tar xfz ${SOURCE_DIR}/qt-3.3.3.tar.gz -C ${INSTALL_ROOT}
123 cd ${PRODUCT_DIR}/lib
124 sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libqt-mt.la > libqt-mt.la.new
125 mv -f libqt-mt.la.new libqt-mt.la
126 cd ${PRODUCT_DIR}/lib/pkgconfig
127 sed -e "s%^prefix=\(.*\)%prefix=${PRODUCT_DIR}%g" qt-mt.pc > qt-mt.pc.new
128 mv -f qt-mt.pc.new qt-mt.pc
134 export INSTALL_WORK=$2;
135 export SOURCE_DIR=$3;
136 export INSTALL_ROOT=$4;
137 export PRODUCT_SEQUENCE=$5;
138 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="qt" ; fi
139 export PRODUCT="qt-3.3.3"
140 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
141 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}