export PYTHONROOT=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PYTHONHOME=\$PYTHONROOT
export PYTHON_ROOT_DIR=\${PYTHONROOT}
-export PATH=\${PYTHONROOT}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${PYTHONROOT}/lib:\${LD_LIBRARY_PATH}
export PYTHON_VERSION=$PY_LIBVERSION
export PYTHON_INCLUDE=\${PYTHONROOT}/include/python\${PYTHON_VERSION}
+export PATH=\${PYTHONROOT}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${PYTHONROOT}/lib:\${LD_LIBRARY_PATH}
export PYTHONPATH=\${PYTHONROOT}/lib/python\${PYTHON_VERSION}:\${PYTHONPATH}
##
EOF
export PYTHON_ARCHIVE_PREFIX=""
PYTHON_CONFIGURE_OPTIONS="--with-threads --enable-shared --with-libs=-lstdc++ --without-pymalloc"
+if test `uname -m` = "x86_64" ; then
+ PYTHON_CONFIGURE_OPTIONS="${PYTHON_CONFIGURE_OPTIONS} CFLAGS=-m64 CXXFLAGS=-m64"
+fi
### --with-pydebug ### (for debug)
-tcl_dir=`where_tcl`
-tk_dir=`where_tk`
INCDIR=
LIBDIR=
+tcl_dir=`where_tcl`
if [ "${tcl_dir}" != "" ] ; then
- source ${tk_dir}/tclConfig.sh
+ source ${tcl_dir}/tclConfig.sh
INCDIR="${TCL_INCLUDE_SPEC}"
LIBDIR="-L${TCL_PACKAGE_PATH}"
fi
+#tk_dir=`where_tk`
#if [ "${tk_dir}" != "" ] ; then
+# source ${tk_dir}/tkConfig.sh
# INCDIR="${INCDIR} ${TK_INCLUDE_SPEC}"
# LIBDIR="${LIBDIR} -L${TCL_PACKAGE_PATH}"
#fi
-if test `uname -m` = "x86_64" ; then
- PYTHON_CONFIGURE_OPTIONS="${PYTHON_CONFIGURE_OPTIONS} CFLAGS=-m64 CXXFLAGS=-m64"
-fi
-
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} $PYTHON_CONFIGURE_OPTIONS CPPFLAGS="${INCDIR}" LDFLAGS="${LIBDIR}"
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${PYTHON_CONFIGURE_OPTIONS} CPPFLAGS="${INCDIR}" LDFLAGS="${LIBDIR}"
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
}
where_gl_libs(){
+local d
+local libdir
# search libGL.so* file and correct libGL.la in the same directory
for d in /usr/X11R6/lib64 /usr/lib64 /usr/X11R6/lib /usr/lib ; do
if [ "`ls ${d}/libGL.so* 2>/dev/null`" ] && [ -f ${d}/libGL.la ]; then
return 1
}
+fix_gl_libs(){
+ local gllibdir="`where_gl_libs`"
+ if [ "$gllibdir" != "" ] ; then
+#VSR: 02/04/2013 - next block is commented as it seems to be wrong :( libGL.la should not be ever mentioned
+# if [ -f ${gllibdir}/libGL.la ] ; then
+# libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"`
+# if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then
+# str_to_replace="${gllibdir}/libGL.la"
+# fi
+# fi
+ if [ "$str_to_replace" == "" ] ; then
+ str_to_replace="-L${gllibdir} -lGL"
+ fi
+
+ la_files=`find . -name "*.la"`
+ for la_file in ${la_files} XXX ; do
+ if [ "${la_file}" = "XXX" ] ; then continue; fi
+ grep -e "libGL.la" ${la_file} >& /dev/null || grep -e "-lGL\b" ${la_file} >& /dev/null &&
+ sed -e "s%-lGL\b%%g" \
+ -e "s%[^[:space:]']*libGL.la[[:space:]]%%g" \
+ -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \
+ ${la_file} > ${la_file}.new && \
+ mv -f ${la_file}.new ${la_file}
+ done
+ fi
+}
+
modif_la_files(){
ldir=$1
if [ -z "$ldir" ] || [ ! -d "$ldir" ]; then return 1; fi
#$DELIM ${PRODUCT_TYPE} $DELIM
export QTDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export QT_ROOT_DIR=\${QTDIR}
+export QT_PLUGIN_PATH=\${QTDIR}/plugins
export PATH=\${QTDIR}/bin:\$PATH
export LD_LIBRARY_PATH=\${QTDIR}/lib:\${LD_LIBRARY_PATH}
-export QT_PLUGIN_PATH=\${QTDIR}/plugins
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
# check that we need a patch for problem with gstreamer (note that it does not always help!)
pkg-config --libs gstreamer-app-0.10 >& /dev/null
if [ "$?" != "0" ] ; then
- echo -n ".. Patching Qt sources: fix problem with gstreamer detection (WebKit)..." && \
- cd ${PRODUCT_SRC_DIR}/src/3rdparty/webkit/Source/WebCore && \
- sed -i "s%glib-2.0 gio-2.0 gstreamer-0.10%glib-2.0 gio-2.0 '\\\\'gstreamer-0.10 >= 0.10.28\\\\''%g" features.pri >& /dev/null
+ cd ${PRODUCT_SRC_DIR}/src/3rdparty/webkit/Source/WebCore
+ sed -i "s%glib-2.0 gio-2.0 gstreamer-0.10%glib-2.0 gio-2.0 '\\\\'gstreamer-0.10 >= 0.10.28\\\\''%g" features.pri
fi
fi
# patch binaries
local patch_webkit_deps=1
if [ "${patch_webkit_deps}" = "1" ] ; then
- echo -n ".. Patching Qt binaries: fix wrong dependencies in libQtWebKit..." && \
- cd ${PRODUCT_DIR}/lib && \
- sed -i "s% -L../../WebCore/release%%g;s% -L../../JavaScriptCore/release%%g;s% -lwebcore%%g;s% -ljscore%%g" libQtWebKit.la >& /dev/null
+ cd ${PRODUCT_DIR}/lib
+ sed -i "s% -L../../WebCore/release%%g;s% -L../../JavaScriptCore/release%%g;s% -lwebcore%%g;s% -ljscore%%g" libQtWebKit.la >& /dev/null
fi
# to generate environment scripts
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
export TCLHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${TCL_LIBVERSION} \${TCLHOME}/lib/tk${TK_LIBVERSION}"
export PATH=\${TCLHOME}/bin:\${PATH}
export LD_LIBRARY_PATH=\${TCLHOME}/lib:\${LD_LIBRARY_PATH}
-export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${TCL_LIBVERSION} \${TCLHOME}/lib/tk${TK_LIBVERSION}"
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})