fi
done
+# modify pkgconfig
+if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then
+ cd ${PRODUCT_DIR}/lib/pkgconfig
+ for l in X `find . -name "*.pc"`; do
+ if [ "${l}" != "X" ] ; then
+ sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
+ fi
+ done
+fi
+
# to generate environment scripts
try_preinstalled
}
cd ${PRODUCT_DIR}/lib/pkgconfig
for l in X `find . -name "*.pc"`; do
if [ "${l}" != "X" ] ; then
- sed -i "s%prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
+ sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
fi
done
fi
+# modify config file
+sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${PRODUCT_DIR}/bin/freetype-config
# to generate environment script for sources
try_preinstalled
cd ${PRODUCT_DIR}/lib/pkgconfig
for l in X `find . -name "*.pc"`; do
if [ "${l}" != "X" ] ; then
- sed -i "s%prefix=.*%prefix=${PRODUCT_DIR}%g;s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${FREETYPEDIR}/lib%g;s%-I[^[:space:]]*/freetype[^[:space:]]*/include%-I${FREETYPEDIR}/include%g" ${l}
+ sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g;s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${FREETYPEDIR}/lib%g;s%-I[^[:space:]]*/freetype[^[:space:]]*/include%-I${FREETYPEDIR}/include%g" ${l}
fi
done
fi
fi
done
+# modify pkgconfig
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}
+ sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
fi
done
cd ${PRODUCT_DIR}/lib/pkgconfig
for l in X `find . -name "*.pc"`; do
if [ "${l}" != "X" ] ; then
- sed -i "s%prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
+ sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
fi
done
+# modify config files
+sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${PRODUCT_DIR}/bin/xml2-config
+sed -i "s%XML2_LIBDIR=.*%XML2_LIBDIR=\"${PRODUCT_DIR}/lib\"%g;s%XML2_INCLUDEDIR=.*%XML2_INCLUDEDIR=\"${PRODUCT_DIR}/include/libxml2\"%g" ${PRODUCT_DIR}/lib/xml2Conf.sh
# to generate environment scripts
try_preinstalled
cd ${PRODUCT_DIR}/lib/pkgconfig
for l in X `find . -name "*.pc"`; do
if [ "${l}" != "X" ] ; then
- sed -i "s%prefix=.*%prefix=${PRODUCT_DIR}%g;s%prefix=.*%libdir=${PRODUCT_DIR}/lib%g" ${l}
+ sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g;s%prefix=.*%libdir=${PRODUCT_DIR}/lib%g" ${l}
sed -i "s%Libs: -L[^[:space:]]*/lib%Libs: -L${PRODUCT_DIR}/lib%g" ${l}
fi
done
cd ${PRODUCT_DIR}/lib/pkgconfig
for l in X `find . -name "*.pc"`; do
if [ "${l}" != "X" ] ; then
- sed -i "s%prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
+ sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
fi
done
-e "s%[[:space:]]\(-L\)\?[^[:space:]]*qt-x11-opensource-src-${QT_REF_VERSION}% \1${PRODUCT_DIR}%g" \
-e "s%moc_location=.*%moc_location=${PRODUCT_DIR}/bin/moc%g" \
-e "s%uic_location=.*%uic_location=${PRODUCT_DIR}/bin/uic%g" \
+ -e "s%rcc_location=.*%uic_location=${PRODUCT_DIR}/bin/rcc%g" \
+ -e "s%lupdate_location=.*%uic_location=${PRODUCT_DIR}/bin/lupdate%g" \
+ -e "s%lrelease_location=.*%uic_location=${PRODUCT_DIR}/bin/lrelease%g" \
${l} > ${l}_
chmod -f --reference=${l} ${l}_ ; mv -f ${l}_ ${l}
fi
done
+# modify qt prl files
+cd ${PRODUCT_DIR}/lib
+for l in X `find . -name "*.prl"`; do
+ if [ "${l}" != "X" ] ; then
+ sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*qt-${QT_REF_VERSION}% \1${PRODUCT_DIR}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*qt-x11-opensource-src-${QT_REF_VERSION}% \1${PRODUCT_DIR}%g" ${l}
+ fi
+done
+# modify qt mkspecs
+cd ${PRODUCT_DIR}/mkspecs
+sed -i "s%QMAKE_RPATHDIR += \".*\"%QMAKE_RPATHDIR += \"${PRODUCT_DIR}/lib\"%g" qconfig.pri
+
# generate qt.conf file
cat > ${PRODUCT_DIR}/bin/qt.conf <<EOF
cd ${PRODUCT_DIR}
test `uname -m` = "x86_64" && test ! -e lib64 && ln -s lib lib64
+# modify pkgconfig
+if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then
+ cd ${PRODUCT_DIR}/lib/pkgconfig
+ for l in X `find . -name "*.pc"`; do
+ if [ "${l}" != "X" ] ; then
+ sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g;s%exec_prefix=.*%exec_prefix=${PRODUCT_DIR}%g;s%libdir=.*%libdir=${PRODUCT_DIR}/lib%g" ${l}
+ fi
+ done
+fi
+
# to generate environment scripts
try_preinstalled
}