# unpack
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
-# apply patch (if there's any)
local patch_sources=1
+local patch_config=1
+
+# apply patch for sources (if there's any)
if [ "${patch_sources}" = "1" ] ; then
( test -f patches/${PRODUCT}.patch && cp patches/${PRODUCT}.patch ${PRODUCT_SRC_DIR} && cd ${PRODUCT_SRC_DIR} && patch -p1 < ${PRODUCT}.patch )
fi
+# patch pb on automake 1.12 and newer with obsolete AM_C_PROTOTYPES macro
+if [ "${patch_config}" = "1" ] ; then
+ ( cd ${PRODUCT_SRC_DIR} && sed -i "s%AM_C_PROTOTYPES%#AM_C_PROTOTYPES%g" configure.ac )
+fi
# to generate environment scripts
try_preinstalled
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
cd ${PRODUCT_SRC_DIR}
-export CASROOT=${PRODUCT_SRC_DIR}
# build_configure
echo " +++++++++++ build_configure"
-check_job ${PRODUCT_DIR}/BUILDCONFIGURE.LOG ./build_configure
+check_job ${PRODUCT_DIR}/BUILD_CONFIGURE.LOG ./build_configure
# configure
# other options
flags="$flags --disable-debug --enable-production"
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} $flags
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${flags}
# make
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
used gcc=$GCC
EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install-strip
+check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install
# fix libGL dependencies
-
echo " +++++++++++ fix libGL dependencies"
-
-cd ${PRODUCT_DIR}/lib
-
-gllibdir="`where_gl_libs`"
-if [ "$gllibdir" != "" ] ; then
- 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
+cd ${PRODUCT_DIR}/lib && fix_gl_libs
#du -sk ${PRODUCT_SRC_DIR} > ${PRODUCT_DIR}/size.log
cd ${PRODUCT_DIR};