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())
30 if [ -d /usr/share/qt3/lib ] ; then
31 qtdir="`find_in_path libqt-mt.so.3.3.3 /usr/share/qt3/lib`"
33 if [ -z "${qtdir}" ] && [ -d /usr/lib/qt3/lib ] ; then
34 qtdir="`find_in_path libqt-mt.so.3.3.3 /usr/lib/qt3/lib`"
36 if [ -z "${qtdir}" ] ; then
37 qtdir="`find_in_path libqt-mt.so.3.3.3 /usr/lib`"
39 if [ -z "${qtdir}" ] ; then
40 qtdir="`find_in_path libqt-mt.so.3.3.3 ${LD_LIBRARY_PATH}`"
42 if [ -n "${qtdir}" ] ; then
43 qtdir=`cd ${qtdir}/..; pwd`
44 moc="`find_in_path moc ${qtdir}/bin`"
45 uic="`find_in_path uic ${qtdir}/bin`"
46 if [ -n "${moc}" ] && [ -n "${uic}" ] ; then
47 tmp="\${QTDIR}/bin ${qtdir}/bin \${PATH} ${PATH}";
48 path=`sort_path ${tmp}`
49 tmp="\${QTDIR}/lib ${qtdir}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
50 ld_library_path=`sort_path ${tmp}`
51 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
52 #$DELIM ${PRODUCT_TYPE} $DELIM
55 export LD_LIBRARY_PATH=${ld_library_path}
58 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
66 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
72 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
73 source ${INSTALL_WORK}/$SHRC
75 makedir ${PRODUCT_DIR}
77 check_jb tar xfz ${SOURCE_DIR}/qt-3.3.3.tar.gz -C ${INSTALL_WORK}
80 mv -f configure configure-orig
81 sed -e "s%read acceptance%acceptance=yes%" configure-orig > configure
84 export QTDIR=${PRODUCT_WORK}
85 export LD_LIBRARY_PATH=${QTDIR}/lib:$LD_LIBRARY_PATH
88 QT_FLAGS="-release -thread -shared -qt-gif -platform linux-g++"
89 # use system graphics libraries
90 QT_FLAGS=$QT_FLAGS" -system-libjpeg -system-libpng -system-libmng -qt-imgfmt-jpeg -qt-imgfmt-png -qt-imgfmt-mng -lpng -lmng -ljpeg"
93 check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure $QT_FLAGS -prefix ${PRODUCT_DIR}
95 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
96 mv -f _Makefile Makefile
99 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
102 # small trick: INSTALL_ROOT is used inside qt-3.3.3 installation
103 # so it should be set to empty string
104 export INSTALL_ROOT_BACKUP=$INSTALL_ROOT
105 export INSTALL_ROOT=""
106 check_job ${PRODUCT_DIR}/MAKE.LOG make
107 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
108 export INSTALL_ROOT=$INSTALL_ROOT_BACKUP
110 for b in `ls ${PRODUCT_WORK}/bin`; do
111 if [ ! -e ${PRODUCT_DIR}/bin/$b ] || [ -h ${PRODUCT_DIR}/bin/$b ]; then
112 if [ -h ${PRODUCT_DIR}/bin/$b ]; then
113 rm -f ${PRODUCT_DIR}/bin/$b
115 cp -f ${PRODUCT_WORK}/bin/$b ${PRODUCT_DIR}/bin/$b
118 #rm -rf ${PRODUCT_DIR}/doc
120 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
121 cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
127 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
128 source ${INSTALL_WORK}/$SHRC
130 check_jb tar xfz ${SOURCE_DIR}/qt-3.3.3.tar.gz -C ${INSTALL_ROOT}
132 cd ${PRODUCT_DIR}/lib
133 sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libqt-mt.la > libqt-mt.la.new
134 mv -f libqt-mt.la.new libqt-mt.la
135 cd ${PRODUCT_DIR}/lib/pkgconfig
136 sed -e "s%^prefix=\(.*\)%prefix=${PRODUCT_DIR}%g" qt-mt.pc > qt-mt.pc.new
137 mv -f qt-mt.pc.new qt-mt.pc
143 export INSTALL_WORK=$2;
144 export SOURCE_DIR=$3;
145 export INSTALL_ROOT=$4;
146 export PRODUCT_SEQUENCE=$5;
147 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="qt" ; fi
148 export PRODUCT="qt-3.3.3"
149 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
150 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}