Skip to content

[RPI] - install_dependencies.sh #8359

@dimitre

Description

@dimitre

There are two parts of the script scripts/linux/debian/install_dependencies.sh that in my opinion can be removed.
I'm opening here so we can discuss before PR.

This one alters linux: section of ofxOpenCv addon_config.mk without necessity
RPI uses linuxaarch64: section so any difference (if needed today) can be handled by its own section

addons_dir="$(readlink -f "$ROOT/../../../addons")"
$(pkg-config opencv4 --exists)
exit_code=$?
if [ $exit_code != 0 ]; then
	echo "Updating ofxOpenCV to use openCV3"
	sed -i -E 's/ADDON_PKG_CONFIG_LIBRARIES =(.*)opencv4(.*)$/ADDON_PKG_CONFIG_LIBRARIES =\1opencv\2/' "$addons_dir/ofxOpenCv/addon_config.mk"
else
	echo "Updating ofxOpenCV to use openCV4"
	sed -i -E 's/ADDON_PKG_CONFIG_LIBRARIES =(.*)opencv\s/ADDON_PKG_CONFIG_LIBRARIES =\1opencv4 /g' "$addons_dir/ofxOpenCv/addon_config.mk"
	sed -i -E 's/ADDON_PKG_CONFIG_LIBRARIES =(.*)opencv$/ADDON_PKG_CONFIG_LIBRARIES =\1opencv4/g' "$addons_dir/ofxOpenCv/addon_config.mk"
fi

and the other is this

if [ "$OS_CODENAME" = "7 (wheezy)" ]; then
    echo "detected wheezy, installing g++4.8 for c++11 compatibility"
    apt-get install g++-4.8
	echo "setting gcc-${CXX_VER} as default compiler"
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 1 --force
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 1 --force
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions