check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
# modify pyqtconfig.py file
+PYQT_CONFIGURE_OPTIONS="-b ${PRODUCT_DIR} -d ${PRODUCT_DIR} -v ${PRODUCT_DIR}/sip"
+
+if [ -n "${PYTHONROOT}" ] && [ -n "${QTDIR}" ] ; then
+ python_version=`python -V 2>&1 | awk '{print $2}' | awk -F. '{printf("0x%02d%02d%02d",$1,$2,$3)}'`
+ qt_version=`grep "QT_VERSION_STR" ${QTDIR}/include/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'`
+
cd ${PRODUCT_DIR}
-sed -e "s%\('pyqt_bin_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" pyqtconfig.py > pyqtconfig.py.1
-sed -e "s%\('pyqt_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" pyqtconfig.py.1 > pyqtconfig.py
-sed -e "s%\('pyqt_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g" pyqtconfig.py > pyqtconfig.py.1
-mv pyqtconfig.py.1 pyqtconfig.py
+sed -e "s%\('pyqt_bin_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" pyqtconfig.py > pyqtconfig.py.1
+sed -e "s%\('pyqt_config_args':[[:space:]]*\).*%\1'${PYQT_CONFIGURE_OPTIONS}',%g" pyqtconfig.py.1 > pyqtconfig.py
+sed -e "s%\('pyqt_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" pyqtconfig.py > pyqtconfig.py.1
+sed -e "s%\('pyqt_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g" pyqtconfig.py.1 > pyqtconfig.py
+sed -e "s%\('qt_dir':[[:space:]]*\).*%\1'${QTDIR}',%g" pyqtconfig.py > pyqtconfig.py.1
+sed -e "s%\('qt_inc_dir':[[:space:]]*\).*%\1'${QTDIR}/include',%g" pyqtconfig.py.1 > pyqtconfig.py
+sed -e "s%\('qt_lib_dir':[[:space:]]*\).*%\1'${QTDIR}/lib',%g" pyqtconfig.py > pyqtconfig.py.1
+sed -e "s%\('INCDIR_QT':[[:space:]]*\).*%\1'${QTDIR}/include',%g" pyqtconfig.py.1 > pyqtconfig.py
+sed -e "s%\('LIBDIR_QT':[[:space:]]*\).*%\1'${QTDIR}/lib',%g" pyqtconfig.py > pyqtconfig.py.1
+sed -e "s%\('MOC':[[:space:]]*\).*%\1'${QTDIR}/bin/moc',%g" pyqtconfig.py.1 > pyqtconfig.py
+rm -f pyqtconfig.py.1
+
+fi
+
+
# to generate environment script for sources
try_preinstalled
fi
done
+cd ${PRODUCT_DIR}/lib/pkgconfig
+for l in X `find . -name "*.pc"`; do
+ if [ "${l}" != "X" ] ; then
+ sed -e "s%prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} > ${l}_
+ chmod -f --reference=${l} ${l}_ ; mv -f ${l}_ ${l}
+ fi
+done
+
# to generate environment scripts
try_preinstalled
}
chmod 755 $l
done
+cd ${PRODUCT_DIR}/lib/pkgconfig
+for l in X `find . -name "*.pc"`; do
+ if [ "${l}" != "X" ] ; then
+ sed -e "s%prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} > ${l}_
+ chmod -f --reference=${l} ${l}_ ; mv -f ${l}_ ${l}
+ fi
+done
+
# to generate environment scripts
try_preinstalled
}
ln -sf ${PRODUCT_DIR} ${INST_ROOT}/omni
cd ${PRODUCT_DIR}/bin
-sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
-mv -f _omniidl omniidl
-chmod a+x omniidl
-sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
-mv -f _omniidlrun.py omniidlrun.py
-chmod a+x omniidlrun.py
+for l in omniidl omniidlrun.py ; do
+ sed -e "s%#\!.*python%#\!/usr/bin/env python%" \
+ -e "s%\"[^[:space:]]*${PRODUCT}\([^[:space:]]*\)\"%\"${PRODUCT_DIR}\1\"%" \
+ ${l} > _${l}
+ mv -f _${l} ${l}
+ chmod a+x ${l}
+done
+
+cd ${PRODUCT_DIR}/lib
+for l in X `find . -name "*_idl.py"`; do
+ if [ "${l}" != "X" ] ; then
+ lname=`basename ${l} | sed -e "s%_idl.py$%%g"`".idl"
+ sed -e "s%\(omniORB.openModule(.*,[[:space:]]*r\"\)[^[:space:]]*${PRODUCT}\([^[:space:]]*/${lname}\"\)%\1${PRODUCT_DIR}\2%g" ${l} > ${l}_
+ chmod -f --reference=${l} ${l}_ ; mv -f ${l}_ ${l}
+ fi
+done
+
+cd ${PRODUCT_DIR}/lib/pkgconfig
+for l in X `find . -name "*.pc"`; do
+ if [ "${l}" != "X" ] ; then
+ sed -e "s%prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} > ${l}_
+ chmod -f --reference=${l} ${l}_ ; mv -f ${l}_ ${l}
+ fi
+done
# to generate environment script for sources
try_preinstalled
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+if test `uname -m` = "x86_64" ; then
+ SIP_CONFIGURE_OPTIONS="-b ${PRODUCT_DIR}/bin -d ${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages -e ${PRODUCT_DIR}/include/python${PYTHON_VERSION} -v ${PRODUCT_DIR}/sip -p linux-g++-64"
+else
+ SIP_CONFIGURE_OPTIONS="-b ${PRODUCT_DIR}/bin -d ${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages -e ${PRODUCT_DIR}/include/python${PYTHON_VERSION} -v ${PRODUCT_DIR}/sip"
+fi
+
# modify sipconfig.py file
if [ -n "${PYTHONROOT}" ] && [ -n "${QTDIR}" ] ; then
sed -e "s%\('default_bin_dir':[[:space:]]*\).*%\1'${PYTHONROOT}/bin',%g" sipconfig.py > sipconfig.py.1
sed -e "s%\('default_mod_dir':[[:space:]]*\).*%\1'${PYTHONROOT}/lib/python${PYTHON_VERSION}/site-packages',%g" sipconfig.py.1 > sipconfig.py
sed -e "s%\('default_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g" sipconfig.py > sipconfig.py.1
- sed -e "s%\('sip_bin':[[:space:]]*\).*%\1'${PRODUCT_DIR}/bin/sip',%g" sipconfig.py.1 > sipconfig.py
- sed -e "s%\('sip_inc_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/include/python${PYTHON_VERSION}',%g" sipconfig.py > sipconfig.py.1
- sed -e "s%\('sip_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages',%g" sipconfig.py.1 > sipconfig.py
- sed -e "s%\('qt_dir':[[:space:]]*\).*%\1'${QTDIR}',%g" sipconfig.py > sipconfig.py.1
- sed -e "s%\('qt_version':[[:space:]]*\).*%\1${qt_version},%g" sipconfig.py.1 > sipconfig.py
- sed -e "s%\('qt_inc_dir':[[:space:]]*\).*%\1'${QTDIR}/include',%g" sipconfig.py > sipconfig.py.1
- sed -e "s%\('qt_lib_dir':[[:space:]]*\).*%\1'${QTDIR}/lib',%g" sipconfig.py.1 > sipconfig.py
- sed -e "s%\('INCDIR_QT':[[:space:]]*\).*%\1'${QTDIR}/include',%g" sipconfig.py > sipconfig.py.1
- sed -e "s%\('LIBDIR_QT':[[:space:]]*\).*%\1'${QTDIR}/lib',%g" sipconfig.py.1 > sipconfig.py
- sed -e "s%\('MOC':[[:space:]]*\).*%\1'${QTDIR}/bin/moc',%g" sipconfig.py > sipconfig.py.1
+ sed -e "s%\('sip_bin':[[:space:]]*\).*%\1'${PRODUCT_DIR}/bin/sip',%g" sipconfig.py.1 > sipconfig.py
+ sed -e "s%\('sip_config_args':[[:space:]]*\).*%\1'${SIP_CONFIGURE_OPTIONS}',%g" sipconfig.py > sipconfig.py.1
+ sed -e "s%\('sip_inc_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/include/python${PYTHON_VERSION}',%g" sipconfig.py.1 > sipconfig.py
+ sed -e "s%\('sip_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages',%g" sipconfig.py > sipconfig.py.1
+ sed -e "s%\('qt_dir':[[:space:]]*\).*%\1'${QTDIR}',%g" sipconfig.py.1 > sipconfig.py
+ sed -e "s%\('qt_version':[[:space:]]*\).*%\1${qt_version},%g" sipconfig.py > sipconfig.py.1
+ sed -e "s%\('qt_inc_dir':[[:space:]]*\).*%\1'${QTDIR}/include',%g" sipconfig.py.1 > sipconfig.py
+ sed -e "s%\('qt_lib_dir':[[:space:]]*\).*%\1'${QTDIR}/lib',%g" sipconfig.py > sipconfig.py.1
+ sed -e "s%\('INCDIR_QT':[[:space:]]*\).*%\1'${QTDIR}/include',%g" sipconfig.py.1 > sipconfig.py
+ sed -e "s%\('LIBDIR_QT':[[:space:]]*\).*%\1'${QTDIR}/lib',%g" sipconfig.py > sipconfig.py.1
+ sed -e "s%\('MOC':[[:space:]]*\).*%\1'${QTDIR}/bin/moc',%g" sipconfig.py.1 > sipconfig.py
+ sed -e "s%\('py_conf_inc_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/Python-2.4.4/include/python2.4',%g" sipconfig.py > sipconfig.py.1
sed -e "s%\('py_inc_dir':[[:space:]]*\).*%\1'${PYTHONROOT}/include/python${PYTHON_VERSION}',%g" sipconfig.py.1 > sipconfig.py
sed -e "s%\('py_lib_dir':[[:space:]]*\).*%\1'${PYTHONROOT}/lib/python${PYTHON_VERSION}/config',%g" sipconfig.py > sipconfig.py.1
sed -e "s%\('py_version':[[:space:]]*\).*%\1${python_version},%g" sipconfig.py.1 > sipconfig.py