From: Nabil Ghodbane Date: Thu, 26 Jan 2023 13:06:54 +0000 (+0100) Subject: spns #32926: OSCAR prerequisites X-Git-Tag: V9_11_0~123 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b15f504f097f6cd310a8cac45de90f62a214c23a;p=tools%2Fsat_salome.git spns #32926: OSCAR prerequisites --- diff --git a/products/compil_scripts/ffmpeg-2.1.3.sh b/products/compil_scripts/ffmpeg-2.1.3.sh new file mode 100755 index 0000000..75cb9d1 --- /dev/null +++ b/products/compil_scripts/ffmpeg-2.1.3.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +echo "##########################################################################" +echo "ffmpeg" $VERSION +echo "##########################################################################" + +mkdir -p $PRODUCT_INSTALL + +rm -rf $BUILD_DIR +mkdir $BUILD_DIR +cd $BUILD_DIR + +cp -r $SOURCE_DIR/* . + +CONFIGURE_OPTIONS= +CONFIGURE_OPTIONS+=" --prefix=${PRODUCT_INSTALL}" +CONFIGURE_OPTIONS+=" --disable-yasm" +CONFIGURE_OPTIONS+=" --disable-doc" +CONFIGURE_OPTIONS+=" --enable-shared" + +echo +echo "*** configure $CONFIGURE_OPTIONS" +$BUILD_DIR/configure $CONFIGURE_OPTIONS +if [ $? -ne 0 ]; then + echo "ERROR on configure" + exit 1 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ]; then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ]; then + echo "ERROR on make install" + exit 3 +fi + +echo +echo "########## END" diff --git a/products/env_scripts/ffmpeg.py b/products/env_scripts/ffmpeg.py new file mode 100644 index 0000000..866aad9 --- /dev/null +++ b/products/env_scripts/ffmpeg.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path, platform + +def set_env(env, prereq_dir, version): + if platform.system() == "Windows" + pass + else: + env.set("FFMPEG_ROOT_DIR",prereq_dir) + env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib')) + env.prepend('PKG_CONFIG_PATH',os.path.join(prereq_dir, 'lib/pkgconfig')) + +def set_nativ_env(env): + pass + diff --git a/products/ffmpeg.pyconf b/products/ffmpeg.pyconf index 7a8dad0..c36f0d7 100644 --- a/products/ffmpeg.pyconf +++ b/products/ffmpeg.pyconf @@ -1,9 +1,15 @@ # Only used as a native product for dedicated opencv compilation default : { - name : "ffmpeg" - get_source : "system" + name : "ffmpeg" + build_source: "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" depend : [] + build_depend: [] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' system_info : { rpm : ["ffmpeg"] @@ -11,4 +17,17 @@ default : apt : ["ffmpeg"] apt_dev : [] } + environ : + { + env_script : $name + ".py" + } + properties : + { + incremental : "yes" + } +} + +version_2_1_3: +{ + compil_script : "ffmpeg-2.1.3.sh" }