Changeset View
Standalone View
build_files/build_environment/install_deps.sh
| Context not available. | |||||
| #### Install on ARCH-like #### | #### Install on ARCH-like #### | ||||
| get_package_version_ARCH() { | get_package_version_ARCH() { | ||||
| pacman -Si $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/' | pacman -Si $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+?(([0-9]+\.?)+).*/\1/' | ||||
| } | } | ||||
| check_package_ARCH() { | check_package_ARCH() { | ||||
| Context not available. | |||||
| _packages="base-devel git cmake \ | _packages="base-devel git cmake \ | ||||
| libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \ | libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \ | ||||
| $OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl fftw \ | $OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl fftw \ | ||||
| libxml2 yaml-cpp tinyxml" | libxml2 yaml-cpp tinyxml python-requests" | ||||
| OPENJPEG_USE=true | OPENJPEG_USE=true | ||||
| VORBIS_USE=true | VORBIS_USE=true | ||||
| Context not available. | |||||
| THEORA_USE=true | THEORA_USE=true | ||||
| if [ "$WITH_ALL" = true ]; then | if [ "$WITH_ALL" = true ]; then | ||||
| # No libspacenav in official arch repos... | _packages="$_packages jack libspnav jemalloc" | ||||
| _packages="$_packages jack" | |||||
| fi | fi | ||||
| PRINT "" | PRINT "" | ||||
| Context not available. | |||||
| install_packages_ARCH python | install_packages_ARCH python | ||||
| clean_Python | clean_Python | ||||
| PRINT "" | PRINT "" | ||||
| if [ "$WITH_NUMPY" = true ]; then | if [ "$NUMPY_SKIP" = true ]; then | ||||
| if [ "$NUMPY_SKIP" = true ]; then | WARNING "Skipping NumPy installation, as requested..." | ||||
| WARNING "Skipping NumPy installation, as requested..." | else | ||||
| else | check_package_version_ge_ARCH python-numpy $NUMPY_VERSION_MIN | ||||
| check_package_version_ge_ARCH python-numpy $NUMPY_VERSION_MIN | if [ $? -eq 0 ]; then | ||||
| if [ $? -eq 0 ]; then | install_packages_ARCH python-numpy | ||||
| install_packages_ARCH python-numpy | else | ||||
| else | WARNING "Sorry, using python package but no valid numpy package available!" \ | ||||
| WARNING "Sorry, using python package but no valid numpy package available!" \ | " Use --build-numpy to force building of both Python and NumPy." | ||||
mont29: This change is bad and unneeded imho (it’s assuming WITH_NUMPY is always True). | |||||
ejnersanAuthorUnsubmitted Not Done Inline ActionsThere is no "WITH_NUMPY" variable, causing python-numpy to never be installed in any case. Also by default "NUMPY_SKIP" is false. Doing it this way is consistent with DEB/RPM and it works. ejnersan: There is no "WITH_NUMPY" variable, causing python-numpy to never be installed in any case. Also… | |||||
mont29Unsubmitted Not Done Inline ActionsYou are right, sorry (probably a leftover from older code...). mont29: You are right, sorry (probably a leftover from older code...). | |||||
| " Use --build-numpy to force building of both Python and NumPy." | |||||
| fi | |||||
| fi | fi | ||||
| fi | fi | ||||
| else | else | ||||
| Context not available. | |||||
| fi | fi | ||||
| fi | fi | ||||
| PRINT "" | PRINT "" | ||||
| _do_compile_ocio=false | _do_compile_ocio=false | ||||
| if [ "$OCIO_SKIP" = true ]; then | if [ "$OCIO_SKIP" = true ]; then | ||||
| Context not available. | |||||
| INFO "Forced OpenColorIO building, as requested..." | INFO "Forced OpenColorIO building, as requested..." | ||||
| _do_compile_ocio=true | _do_compile_ocio=true | ||||
| else | else | ||||
| # XXX Always force build of own OCIO, until linux distro guys update their package to default libyaml-cpp ver (0.5)! | check_package_version_ge_ARCH opencolorio $OCIO_VERSION_MIN | ||||
| #check_package_version_ge_ARCH opencolorio $OCIO_VERSION_MIN | if [ $? -eq 0 ]; then | ||||
| #if [ $? -eq 0 ]; then | install_packages_ARCH opencolorio | ||||
| #install_packages_ARCH opencolorio yaml-cpp tinyxml | clean_OCIO | ||||
| #clean_OCIO | else | ||||
| #else | |||||
| _do_compile_ocio=true | _do_compile_ocio=true | ||||
| #fi | fi | ||||
| fi | fi | ||||
| if [ "$_do_compile_ocio" = true ]; then | if [ "$_do_compile_ocio" = true ]; then | ||||
| install_packages_ARCH yaml-cpp tinyxml | |||||
| compile_OCIO | compile_OCIO | ||||
| fi | fi | ||||
| Context not available. | |||||
| INFO "Forced OpenImageIO building, as requested..." | INFO "Forced OpenImageIO building, as requested..." | ||||
| compile_OIIO | compile_OIIO | ||||
| else | else | ||||
| check_package_version_ge_lt_ARCH openimageio $OIIO_VERSION_MIN $OIIO_VERSION_MAX | check_package_version_ge_ARCH openimageio $OIIO_VERSION_MIN | ||||
mont29Unsubmitted Not Done Inline ActionsWhy change this? version is very sensitive and important here. mont29: Why change this? version is very sensitive and important here. | |||||
ejnersanAuthorUnsubmitted Not Done Inline ActionsYou are right, I'll revert this. ejnersan: You are right, I'll revert this. | |||||
| if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
| install_packages_ARCH openimageio | install_packages_ARCH openimageio | ||||
| clean_OIIO | clean_OIIO | ||||
| Context not available. | |||||
| INFO "Forced LLVM building, as requested..." | INFO "Forced LLVM building, as requested..." | ||||
| _do_compile_llvm=true | _do_compile_llvm=true | ||||
| else | else | ||||
| check_package_version_match_ARCH clang $LLVM_VERSION | check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN | ||||
mont29Unsubmitted Not Done Inline ActionsWhy change this? version is very sensitive and important here. mont29: Why change this? version is very sensitive and important here. | |||||
ejnersanAuthorUnsubmitted Not Done Inline ActionsSee comment. ejnersan: See comment. | |||||
| if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
| install_packages_ARCH llvm clang | install_packages_ARCH llvm clang | ||||
| have_llvm=true | have_llvm=true | ||||
| LLVM_VERSION=`check_package_version_ge_ARCH clang $LLVM_VERSION_MIN` | LLVM_VERSION=`get_package_version_ARCH llvm` | ||||
| LLVM_VERSION_FOUND=$LLVM_VERSION | LLVM_VERSION_FOUND=$LLVM_VERSION | ||||
| clean_LLVM | clean_LLVM | ||||
| else | else | ||||
| Context not available. | |||||
| INFO "Forced OpenSubdiv building, as requested..." | INFO "Forced OpenSubdiv building, as requested..." | ||||
| _do_compile_osd=true | _do_compile_osd=true | ||||
| else | else | ||||
| # No package currently? Just build for now! | check_package_version_ge_ARCH opensubdiv $OSD_VERSION_MIN | ||||
| _do_compile_osd=true | if [ $? -eq 0 ]; then | ||||
| install_packages_ARCH opensubdiv | |||||
| clean_OSD | |||||
| else | |||||
| _do_compile_osd=true | |||||
| fi | |||||
| fi | fi | ||||
| if [ "$_do_compile_osd" = true ]; then | if [ "$_do_compile_osd" = true ]; then | ||||
Not Done Inline ActionsAll I know is that the warnings are now suppressed, and DEB/RPM also has this "g" ejnersan: All I know is that the warnings are now suppressed, and DEB/RPM also has this "g" | |||||
| Context not available. | |||||
| } | } | ||||
| print_info_ffmpeglink_ARCH() { | print_info_ffmpeglink_ARCH() { | ||||
| pacman -Ql $_packages | grep -e ".*\/lib[^\/]\+\.so$" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", $0)); nlines++ }' | pacman -Ql $_packages | grep -e ".*\/lib[^\/]\+\.so$" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", "g", $0)); nlines++ }' | ||||
mont29Unsubmitted Not Done Inline ActionsWhat’s the reason of removing 'g' global flag here? mont29: What’s the reason of removing 'g' global flag here? | |||||
ejnersanAuthorUnsubmitted Not Done Inline ActionsIf I didn't add this, these warnings appears: gawk: cmd. line:1: (FILENAME=- FNR=1) warning: gensub: third argument <something> treated as 1 ejnersan: If I didn't add this, these warnings appears:
gawk: cmd. line:1: (FILENAME=- FNR=1) warning… | |||||
mont29Unsubmitted Not Done Inline ActionsUuuh… this is pretty suspicious, official gawk doc lists that "g" flag as supported... or maybe arch is using a new, not yet official release of gawk that changed that? mont29: Uuuh… this is pretty suspicious, [official gawk doc](https://www.gnu. | |||||
| } | } | ||||
| print_info_ffmpeglink() { | print_info_ffmpeglink() { | ||||
| Context not available. | |||||
| _buildargs="$_buildargs $_1 $_2" | _buildargs="$_buildargs $_1 $_2" | ||||
| fi | fi | ||||
| if [ -d $INST/ocio ]; then | if [ "$OCIO_SKIP" = false ]; then | ||||
| _1="-D WITH_OPENCOLORIO=ON" | _1="-D WITH_OPENCOLORIO=ON" | ||||
| _2="-D OPENCOLORIO_ROOT_DIR=$INST/ocio" | |||||
| PRINT " $_1" | PRINT " $_1" | ||||
| PRINT " $_2" | _buildargs="$_buildargs $_1" | ||||
| _buildargs="$_buildargs $_1 $_2" | if [ -d $INST/ocio ]; then | ||||
| _1="-D OPENCOLORIO_ROOT_DIR=$INST/ocio" | |||||
| PRINT " $_1" | |||||
| _buildargs="$_buildargs $_1" | |||||
| fi | |||||
| fi | fi | ||||
| if [ -d $INST/openexr ]; then | if [ -d $INST/openexr ]; then | ||||
| Context not available. | |||||
| _buildargs="$_buildargs $_1 $_2" | _buildargs="$_buildargs $_1 $_2" | ||||
| fi | fi | ||||
| if [ -d $INST/osd ]; then | if [ "$OSD_SKIP" = false ]; then | ||||
| _1="-D WITH_OPENSUBDIV=ON" | _1="-D WITH_OPENSUBDIV=ON" | ||||
| _2="-D OPENSUBDIV_ROOT_DIR=$INST/osd" | |||||
| PRINT " $_1" | PRINT " $_1" | ||||
| PRINT " $_2" | _buildargs="$_buildargs $_1" | ||||
| _buildargs="$_buildargs $_1 $_2" | if [ -d $INST/osd ]; then | ||||
| _1="-D OPENSUBDIV_ROOT_DIR=$INST/osd" | |||||
| PRINT " $_1" | |||||
| _buildargs="$_buildargs $_1" | |||||
| fi | |||||
| fi | fi | ||||
| if [ "$WITH_OPENCOLLADA" = true ]; then | if [ "$WITH_OPENCOLLADA" = true ]; then | ||||
| Context not available. | |||||
This change is bad and unneeded imho (it’s assuming WITH_NUMPY is always True).