Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
|
|
|
|
|
|
|
# A shell script installing/building all needed dependencies to build Blender, for some Linux distributions.
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
##### Args and Help Handling #####
|
|
|
|
|
2012-12-01 18:07:45 +00:00
|
|
|
# Parse command line!
|
|
|
|
ARGS=$( \
|
|
|
|
getopt \
|
|
|
|
-o s:i:t:h \
|
2015-11-23 15:42:46 +01:00
|
|
|
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,with-all,with-opencollada,\
|
2015-11-23 21:03:22 +01:00
|
|
|
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,\
|
2015-11-17 14:30:48 +01:00
|
|
|
force-all,force-python,force-numpy,force-boost,force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,\
|
2015-08-11 22:08:01 +02:00
|
|
|
force-ffmpeg,force-opencollada,\
|
2015-11-23 19:54:25 +01:00
|
|
|
build-all,build-python,build-numpy,build-boost,build-ocio,build-openexr,build-oiio,build-llvm,build-osl,build-osd,\
|
|
|
|
build-ffmpeg,build-opencollada,\
|
2015-08-11 22:08:01 +02:00
|
|
|
skip-python,skip-numpy,skip-boost,skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,\
|
2015-11-23 20:28:34 +01:00
|
|
|
skip-ffmpeg,skip-opencollada \
|
2012-12-01 18:07:45 +00:00
|
|
|
-- "$@" \
|
|
|
|
)
|
|
|
|
|
2015-09-22 09:45:01 +02:00
|
|
|
COMMANDLINE=$@
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
DISTRO=""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
RPM=""
|
2012-11-12 19:39:09 +00:00
|
|
|
SRC="$HOME/src/blender-deps"
|
2012-11-15 17:31:18 +00:00
|
|
|
INST="/opt/lib"
|
2013-05-24 14:31:57 +00:00
|
|
|
TMP="/tmp"
|
2012-11-12 19:39:09 +00:00
|
|
|
CWD=$PWD
|
2014-09-28 15:47:03 +02:00
|
|
|
INFO_PATH=$CWD
|
2015-10-03 16:20:03 +02:00
|
|
|
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-12-05 11:58:38 +00:00
|
|
|
# Do not install some optional, potentially conflicting libs by default...
|
|
|
|
WITH_ALL=false
|
2012-11-19 11:12:30 +00:00
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
# Do not yet enable opencollada, use --with-opencollada (or --with-all) option to try it.
|
|
|
|
WITH_OPENCOLLADA=false
|
|
|
|
|
2014-02-27 10:01:05 +01:00
|
|
|
THREADS=$(nproc)
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-12-01 18:07:45 +00:00
|
|
|
COMMON_INFO="\"Source code of dependencies needed to be compiled will be downloaded and extracted into '\$SRC'.
|
|
|
|
Built libs of dependencies needed to be compiled will be installed into '\$INST'.
|
2012-12-03 17:53:01 +00:00
|
|
|
Please edit \\\$SRC and/or \\\$INST variables at the beginning of this script,
|
2012-12-01 18:07:45 +00:00
|
|
|
or use --source/--install options, if you want to use other paths!
|
2012-11-19 11:12:30 +00:00
|
|
|
|
2012-12-01 18:07:45 +00:00
|
|
|
Number of threads for building: \$THREADS (automatically detected, use --threads=<nbr> to override it).
|
2012-12-05 11:58:38 +00:00
|
|
|
Full install: \$WITH_ALL (use --with-all option to enable it).
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
Building OpenCOLLADA: \$WITH_OPENCOLLADA (use --with-opencollada option to enable it).
|
2013-05-29 18:57:36 +00:00
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
Example:
|
|
|
|
Full install without OpenCOLLADA: --with-all --skip-opencollada
|
|
|
|
|
2012-12-03 12:04:15 +00:00
|
|
|
Use --help to show all available options!\""
|
|
|
|
|
|
|
|
ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
|
|
|
-h, --help
|
|
|
|
Show this message and exit.
|
|
|
|
|
2015-11-23 15:42:46 +01:00
|
|
|
--show-deps
|
|
|
|
Show main dependencies of Blender (including officially supported versions) and exit.
|
|
|
|
|
2012-12-03 12:04:15 +00:00
|
|
|
-s <path>, --source=<path>
|
|
|
|
Use a specific path where to store downloaded libraries sources (defaults to '\$SRC').
|
|
|
|
|
|
|
|
-i <path>, --install=<path>
|
|
|
|
Use a specific path where to install built libraries (defaults to '\$INST').
|
|
|
|
|
2013-05-24 14:31:57 +00:00
|
|
|
--tmp=<path>
|
|
|
|
Use a specific temp path (defaults to '\$TMP').
|
|
|
|
|
2014-09-19 15:12:25 +02:00
|
|
|
--info=<path>
|
|
|
|
Use a specific info path (to store BUILD_NOTES.txt, defaults to '\$INFO_PATH').
|
|
|
|
|
2012-12-03 12:04:15 +00:00
|
|
|
-t n, --threads=n
|
|
|
|
Use a specific number of threads when building the libraries (auto-detected as '\$THREADS').
|
|
|
|
|
2014-10-14 21:16:58 -03:00
|
|
|
--no-sudo
|
2014-04-04 22:36:28 +02:00
|
|
|
Disable use of sudo (this script won't be able to do much though, will just print needed packages...).
|
|
|
|
|
2012-12-05 11:58:38 +00:00
|
|
|
--with-all
|
|
|
|
By default, a number of optional and not-so-often needed libraries are not installed.
|
|
|
|
This option will try to install them, at the cost of potential conflicts (depending on
|
|
|
|
how your package system is set…).
|
|
|
|
Note this option also implies all other (more specific) --with-foo options below.
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--with-opencollada
|
|
|
|
Build and install the OpenCOLLADA libraries.
|
|
|
|
|
2014-05-01 09:25:29 +02:00
|
|
|
--ver-ocio=<ver>
|
2014-04-06 17:50:50 +02:00
|
|
|
Force version of OCIO library.
|
|
|
|
|
2014-05-01 09:25:29 +02:00
|
|
|
--ver-oiio=<ver>
|
2014-04-06 17:50:50 +02:00
|
|
|
Force version of OIIO library.
|
|
|
|
|
2014-05-01 09:25:29 +02:00
|
|
|
--ver-llvm=<ver>
|
2014-04-06 17:50:50 +02:00
|
|
|
Force version of LLVM library.
|
|
|
|
|
2014-05-01 09:25:29 +02:00
|
|
|
--ver-osl=<ver>
|
2014-04-06 17:50:50 +02:00
|
|
|
Force version of OSL library.
|
|
|
|
|
2015-11-23 21:03:22 +01:00
|
|
|
--ver-osd=<ver>
|
|
|
|
Force version of OSD library.
|
|
|
|
|
2014-04-06 17:50:50 +02:00
|
|
|
Note about the --ver-foo options:
|
|
|
|
It may not always work as expected (some libs are actually checked out from a git rev...), yet it might help
|
|
|
|
to fix some build issues (like LLVM mismatch with the version used by your graphic system).
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
--build-all
|
|
|
|
Force the build of all possible libraries.
|
|
|
|
|
|
|
|
--build-python
|
|
|
|
Force the build of Python.
|
|
|
|
|
|
|
|
--build-numpy
|
|
|
|
Force the build of NumPy.
|
|
|
|
|
|
|
|
--build-boost
|
|
|
|
Force the build of Boost.
|
|
|
|
|
|
|
|
--build-ocio
|
|
|
|
Force the build of OpenColorIO.
|
|
|
|
|
|
|
|
--build-openexr
|
|
|
|
Force the build of OpenEXR.
|
|
|
|
|
|
|
|
--build-oiio
|
|
|
|
Force the build of OpenImageIO.
|
|
|
|
|
|
|
|
--build-llvm
|
|
|
|
Force the build of LLVM.
|
|
|
|
|
|
|
|
--build-osl
|
|
|
|
Force the build of OpenShadingLanguage.
|
|
|
|
|
|
|
|
--build-osd
|
|
|
|
Force the build of OpenSubdiv.
|
|
|
|
|
|
|
|
--build-opencollada
|
|
|
|
Force the build of OpenCOLLADA.
|
|
|
|
|
|
|
|
--build-ffmpeg
|
|
|
|
Force the build of FFMpeg.
|
|
|
|
|
|
|
|
Note about the --build-foo options:
|
|
|
|
* They force the script to prefer building dependencies rather than using available packages.
|
|
|
|
This may make things simpler and allow working around some distribution bugs, but on the other hand it will
|
|
|
|
use much more space on your hard drive.
|
|
|
|
* Please be careful with the Blender building options if you have both 'official' dev packages and
|
|
|
|
install_deps' built ones on your system, by default CMake will prefer official packages, which may lead to
|
|
|
|
linking issues. Please ensure your CMake configuration always uses all correct library paths.
|
|
|
|
* If the “force-built” library is a dependency of others, it will force the build
|
|
|
|
of those libraries as well (e.g. --build-boost also implies --build-oiio and --build-osl...).
|
|
|
|
|
2012-12-03 13:28:35 +00:00
|
|
|
--force-all
|
|
|
|
Force the rebuild of all built libraries.
|
|
|
|
|
2012-12-03 12:04:15 +00:00
|
|
|
--force-python
|
|
|
|
Force the rebuild of Python.
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--force-numpy
|
|
|
|
Force the rebuild of NumPy.
|
|
|
|
|
2012-12-03 12:04:15 +00:00
|
|
|
--force-boost
|
|
|
|
Force the rebuild of Boost.
|
|
|
|
|
|
|
|
--force-ocio
|
|
|
|
Force the rebuild of OpenColorIO.
|
|
|
|
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
--force-openexr
|
|
|
|
Force the rebuild of OpenEXR.
|
|
|
|
|
2012-12-03 12:04:15 +00:00
|
|
|
--force-oiio
|
|
|
|
Force the rebuild of OpenImageIO.
|
|
|
|
|
|
|
|
--force-llvm
|
|
|
|
Force the rebuild of LLVM.
|
|
|
|
|
|
|
|
--force-osl
|
|
|
|
Force the rebuild of OpenShadingLanguage.
|
|
|
|
|
2015-08-08 14:12:02 +02:00
|
|
|
--force-osd
|
|
|
|
Force the rebuild of OpenSubdiv.
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--force-opencollada
|
|
|
|
Force the rebuild of OpenCOLLADA.
|
|
|
|
|
2012-12-03 12:04:15 +00:00
|
|
|
--force-ffmpeg
|
|
|
|
Force the rebuild of FFMpeg.
|
|
|
|
|
|
|
|
Note about the --force-foo options:
|
|
|
|
* They obviously only have an effect if those libraries are built by this script
|
2012-12-03 17:53:01 +00:00
|
|
|
(i.e. if there is no available and satisfactory package)!
|
|
|
|
* If the “force-rebuilt” library is a dependency of others, it will force the rebuild
|
2012-12-03 13:28:35 +00:00
|
|
|
of those libraries too (e.g. --force-boost will also rebuild oiio and osl...).
|
2012-12-03 17:53:01 +00:00
|
|
|
|
|
|
|
--skip-python
|
|
|
|
Unconditionally skip Python installation/building.
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--skip-numpy
|
|
|
|
Unconditionally skip NumPy installation/building.
|
|
|
|
|
2012-12-03 17:53:01 +00:00
|
|
|
--skip-boost
|
|
|
|
Unconditionally skip Boost installation/building.
|
|
|
|
|
|
|
|
--skip-ocio
|
|
|
|
Unconditionally skip OpenColorIO installation/building.
|
|
|
|
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
--skip-openexr
|
|
|
|
Unconditionally skip OpenEXR installation/building.
|
|
|
|
|
2012-12-03 17:53:01 +00:00
|
|
|
--skip-oiio
|
|
|
|
Unconditionally skip OpenImageIO installation/building.
|
|
|
|
|
|
|
|
--skip-llvm
|
|
|
|
Unconditionally skip LLVM installation/building.
|
|
|
|
|
|
|
|
--skip-osl
|
|
|
|
Unconditionally skip OpenShadingLanguage installation/building.
|
|
|
|
|
2015-08-08 14:12:02 +02:00
|
|
|
--skip-osd
|
|
|
|
Unconditionally skip OpenSubdiv installation/building.
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--skip-opencollada
|
|
|
|
Unconditionally skip OpenCOLLADA installation/building.
|
|
|
|
|
2012-12-03 17:53:01 +00:00
|
|
|
--skip-ffmpeg
|
2015-11-23 19:54:25 +01:00
|
|
|
Unconditionally skip FFMpeg installation/building.\""
|
2012-11-19 11:12:30 +00:00
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
##### Main Vars #####
|
|
|
|
|
2015-11-23 15:42:46 +01:00
|
|
|
DO_SHOW_DEPS=false
|
|
|
|
|
2014-04-04 22:36:28 +02:00
|
|
|
SUDO="sudo"
|
|
|
|
|
2015-12-09 14:33:41 +01:00
|
|
|
PYTHON_VERSION="3.5.1"
|
2015-11-25 11:58:00 +01:00
|
|
|
PYTHON_VERSION_MIN="3.5"
|
2015-11-23 19:54:25 +01:00
|
|
|
PYTHON_FORCE_BUILD=false
|
2012-12-01 18:07:45 +00:00
|
|
|
PYTHON_FORCE_REBUILD=false
|
2012-12-03 17:53:01 +00:00
|
|
|
PYTHON_SKIP=false
|
2012-11-15 17:31:18 +00:00
|
|
|
|
2015-11-25 11:58:00 +01:00
|
|
|
NUMPY_VERSION="1.10.1"
|
2014-04-22 10:08:39 +02:00
|
|
|
NUMPY_VERSION_MIN="1.8"
|
2015-11-23 19:54:25 +01:00
|
|
|
NUMPY_FORCE_BUILD=false
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
NUMPY_FORCE_REBUILD=false
|
|
|
|
NUMPY_SKIP=false
|
|
|
|
|
2015-11-25 14:10:01 +01:00
|
|
|
BOOST_VERSION="1.55.0"
|
2012-11-15 17:31:18 +00:00
|
|
|
BOOST_VERSION_MIN="1.49"
|
2015-11-23 19:54:25 +01:00
|
|
|
BOOST_FORCE_BUILD=false
|
2012-12-01 18:07:45 +00:00
|
|
|
BOOST_FORCE_REBUILD=false
|
2012-12-03 17:53:01 +00:00
|
|
|
BOOST_SKIP=false
|
2012-11-15 17:31:18 +00:00
|
|
|
|
2014-07-25 12:52:40 +02:00
|
|
|
OCIO_VERSION="1.0.9"
|
2012-11-15 17:31:18 +00:00
|
|
|
OCIO_VERSION_MIN="1.0"
|
2015-11-23 19:54:25 +01:00
|
|
|
OCIO_FORCE_BUILD=false
|
2012-12-01 18:07:45 +00:00
|
|
|
OCIO_FORCE_REBUILD=false
|
2012-12-03 17:53:01 +00:00
|
|
|
OCIO_SKIP=false
|
2012-11-15 17:31:18 +00:00
|
|
|
|
2015-02-03 19:56:28 +01:00
|
|
|
OPENEXR_VERSION="2.2.0"
|
2013-12-08 18:25:37 +01:00
|
|
|
OPENEXR_VERSION_MIN="2.0.1"
|
2015-02-03 19:56:28 +01:00
|
|
|
ILMBASE_VERSION="2.2.0"
|
2015-11-23 15:42:46 +01:00
|
|
|
ILMBASE_VERSION_MIN="2.2"
|
2015-11-23 19:54:25 +01:00
|
|
|
OPENEXR_FORCE_BUILD=false
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
OPENEXR_FORCE_REBUILD=false
|
|
|
|
OPENEXR_SKIP=false
|
|
|
|
_with_built_openexr=false
|
|
|
|
|
2015-02-03 19:56:28 +01:00
|
|
|
OIIO_VERSION="1.4.16"
|
2014-05-01 09:25:29 +02:00
|
|
|
OIIO_VERSION_MIN="1.4.0"
|
2015-11-17 20:38:01 +01:00
|
|
|
OIIO_VERSION_MAX="1.5.0" # Not supported by current OSL...
|
2015-11-23 19:54:25 +01:00
|
|
|
OIIO_FORCE_BUILD=false
|
2012-12-01 18:07:45 +00:00
|
|
|
OIIO_FORCE_REBUILD=false
|
2012-12-03 17:53:01 +00:00
|
|
|
OIIO_SKIP=false
|
2012-11-15 17:31:18 +00:00
|
|
|
|
2014-07-25 12:43:05 +02:00
|
|
|
LLVM_VERSION="3.4"
|
|
|
|
LLVM_VERSION_MIN="3.4"
|
2012-11-18 17:27:29 +00:00
|
|
|
LLVM_VERSION_FOUND=""
|
2015-11-23 19:54:25 +01:00
|
|
|
LLVM_FORCE_BUILD=false
|
2012-12-01 18:07:45 +00:00
|
|
|
LLVM_FORCE_REBUILD=false
|
2012-12-03 17:53:01 +00:00
|
|
|
LLVM_SKIP=false
|
2012-11-15 17:31:18 +00:00
|
|
|
|
|
|
|
# OSL needs to be compiled for now!
|
2015-02-03 19:56:28 +01:00
|
|
|
OSL_VERSION="1.5.11"
|
2013-08-22 06:05:40 +00:00
|
|
|
OSL_VERSION_MIN=$OSL_VERSION
|
2015-11-23 19:54:25 +01:00
|
|
|
OSL_FORCE_BUILD=false
|
2012-12-01 18:07:45 +00:00
|
|
|
OSL_FORCE_REBUILD=false
|
2012-12-03 17:53:01 +00:00
|
|
|
OSL_SKIP=false
|
2012-11-15 17:31:18 +00:00
|
|
|
|
2015-08-08 14:12:02 +02:00
|
|
|
# OpenSubdiv needs to be compiled for now
|
|
|
|
OSD_VERSION="3.0.2"
|
|
|
|
OSD_VERSION_MIN=$OSD_VERSION
|
2015-11-23 19:54:25 +01:00
|
|
|
OSD_FORCE_BUILD=false
|
2015-08-08 14:12:02 +02:00
|
|
|
OSD_FORCE_REBUILD=false
|
|
|
|
OSD_SKIP=false
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
# Version??
|
|
|
|
OPENCOLLADA_VERSION="1.3"
|
2015-11-23 19:54:25 +01:00
|
|
|
OPENCOLLADA_FORCE_BUILD=true # no package!
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
OPENCOLLADA_FORCE_REBUILD=false
|
|
|
|
OPENCOLLADA_SKIP=false
|
|
|
|
|
2014-07-25 12:43:05 +02:00
|
|
|
FFMPEG_VERSION="2.1.5"
|
|
|
|
FFMPEG_VERSION_MIN="2.1.5"
|
2015-11-23 19:54:25 +01:00
|
|
|
FFMPEG_FORCE_BUILD=false
|
2012-12-01 18:07:45 +00:00
|
|
|
FFMPEG_FORCE_REBUILD=false
|
2012-12-03 17:53:01 +00:00
|
|
|
FFMPEG_SKIP=false
|
2012-11-13 16:42:36 +00:00
|
|
|
_ffmpeg_list_sep=";"
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# FFMPEG optional libs.
|
|
|
|
VORBIS_USE=false
|
|
|
|
VORBIS_DEV=""
|
2013-09-27 13:56:16 +00:00
|
|
|
OGG_USE=false
|
|
|
|
OGG_DEV=""
|
2012-11-15 17:31:18 +00:00
|
|
|
THEORA_USE=false
|
|
|
|
THEORA_DEV=""
|
|
|
|
XVID_USE=false
|
|
|
|
XVID_DEV=""
|
|
|
|
X264_USE=false
|
|
|
|
X264_DEV=""
|
2012-11-17 17:58:15 +00:00
|
|
|
X264_VERSION_MIN=0.118
|
2012-11-15 17:31:18 +00:00
|
|
|
VPX_USE=false
|
|
|
|
VPX_VERSION_MIN=0.9.7
|
|
|
|
VPX_DEV=""
|
|
|
|
MP3LAME_USE=false
|
|
|
|
MP3LAME_DEV=""
|
|
|
|
OPENJPEG_USE=false
|
|
|
|
OPENJPEG_DEV=""
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-11-13 10:49:55 +00:00
|
|
|
# Switch to english language, else some things (like check_package_DEB()) won't work!
|
|
|
|
LANG_BACK=$LANG
|
|
|
|
LANG=""
|
|
|
|
export LANG
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
##### Generic Helpers #####
|
2012-12-01 18:07:45 +00:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
BLACK=$(tput setaf 0)
|
|
|
|
RED=$(tput setaf 1)
|
|
|
|
GREEN=$(tput setaf 2)
|
|
|
|
YELLOW=$(tput setaf 3)
|
|
|
|
LIME_YELLOW=$(tput setaf 190)
|
|
|
|
POWDER_BLUE=$(tput setaf 153)
|
|
|
|
BLUE=$(tput setaf 4)
|
|
|
|
MAGENTA=$(tput setaf 5)
|
|
|
|
CYAN=$(tput setaf 6)
|
|
|
|
WHITE=$(tput setaf 7)
|
|
|
|
BRIGHT=$(tput bold)
|
|
|
|
NORMAL=$(tput sgr0)
|
|
|
|
BLINK=$(tput blink)
|
|
|
|
REVERSE=$(tput smso)
|
|
|
|
UNDERLINE=$(tput smul)
|
|
|
|
|
2012-12-01 18:07:45 +00:00
|
|
|
_echo() {
|
|
|
|
if [ "X$1" = "X-n" ]; then
|
|
|
|
shift; printf "%s" "$@"
|
|
|
|
else
|
|
|
|
printf "%s\n" "$@"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
ERROR() {
|
2013-12-14 15:50:13 +01:00
|
|
|
_echo "${BRIGHT}${RED}ERROR! ${NORMAL}${RED}$@${NORMAL}"
|
|
|
|
}
|
|
|
|
|
|
|
|
WARNING() {
|
|
|
|
_echo "${BRIGHT}${YELLOW}WARNING! ${NORMAL}${YELLOW}$@${NORMAL}"
|
2012-11-12 19:39:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
INFO() {
|
2013-12-14 15:50:13 +01:00
|
|
|
_echo "${GREEN}$@${NORMAL}"
|
|
|
|
}
|
|
|
|
|
|
|
|
PRINT() {
|
2012-12-01 18:07:45 +00:00
|
|
|
_echo "$@"
|
2012-11-12 19:39:09 +00:00
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
##### Args Handling #####
|
|
|
|
|
2012-12-01 18:07:45 +00:00
|
|
|
# Finish parsing the commandline args.
|
|
|
|
eval set -- "$ARGS"
|
|
|
|
while true; do
|
|
|
|
case $1 in
|
|
|
|
-s|--source)
|
|
|
|
SRC="$2"; shift; shift; continue
|
|
|
|
;;
|
|
|
|
-i|--install)
|
|
|
|
INST="$2"; shift; shift; continue
|
|
|
|
;;
|
2013-05-24 14:31:57 +00:00
|
|
|
--tmp)
|
|
|
|
TMP="$2"; shift; shift; continue
|
|
|
|
;;
|
2014-09-19 15:12:25 +02:00
|
|
|
--info)
|
|
|
|
INFO_PATH="$2"; shift; shift; continue
|
|
|
|
;;
|
2012-12-01 18:07:45 +00:00
|
|
|
-t|--threads)
|
|
|
|
THREADS="$2"; shift; shift; continue
|
|
|
|
;;
|
|
|
|
-h|--help)
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
|
|
|
PRINT "USAGE:"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$COMMON_INFO"`"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$ARGUMENTS_INFO"`"
|
|
|
|
PRINT ""
|
2012-12-01 18:07:45 +00:00
|
|
|
exit 0
|
|
|
|
;;
|
2015-11-23 15:42:46 +01:00
|
|
|
--show-deps)
|
|
|
|
# We have to defer...
|
|
|
|
DO_SHOW_DEPS=true; shift; continue
|
|
|
|
;;
|
2014-04-04 22:36:28 +02:00
|
|
|
--no-sudo)
|
|
|
|
PRINT ""
|
|
|
|
WARNING "--no-sudo enabled, this script might not be able to do much..."
|
|
|
|
PRINT ""
|
|
|
|
SUDO=""; shift; continue
|
|
|
|
;;
|
2012-12-05 11:58:38 +00:00
|
|
|
--with-all)
|
|
|
|
WITH_ALL=true; shift; continue
|
|
|
|
;;
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--with-opencollada)
|
|
|
|
WITH_OPENCOLLADA=true; shift; continue
|
|
|
|
;;
|
2014-04-06 17:50:50 +02:00
|
|
|
--ver-ocio)
|
|
|
|
OCIO_VERSION="$2"
|
|
|
|
OCIO_VERSION_MIN=$OCIO_VERSION
|
|
|
|
shift; shift; continue
|
|
|
|
;;
|
|
|
|
--ver-oiio)
|
|
|
|
OIIO_VERSION="$2"
|
|
|
|
OIIO_VERSION_MIN=$OIIO_VERSION
|
|
|
|
shift; shift; continue
|
|
|
|
;;
|
|
|
|
--ver-llvm)
|
|
|
|
LLVM_VERSION="$2"
|
|
|
|
LLVM_VERSION_MIN=$LLVM_VERSION
|
|
|
|
shift; shift; continue
|
|
|
|
;;
|
|
|
|
--ver-osl)
|
|
|
|
OSL_VERSION="$2"
|
|
|
|
OSL_VERSION_MIN=$OSL_VERSION
|
|
|
|
shift; shift; continue
|
|
|
|
;;
|
2015-11-23 19:54:25 +01:00
|
|
|
--ver-osd)
|
2015-08-08 14:12:02 +02:00
|
|
|
OSD_VERSION="$2"
|
|
|
|
OSD_VERSION_MIN=$OSD_VERSION
|
|
|
|
shift; shift; continue
|
|
|
|
;;
|
2015-11-23 19:54:25 +01:00
|
|
|
--build-all)
|
|
|
|
PYTHON_FORCE_BUILD=true
|
|
|
|
NUMPY_FORCE_BUILD=true
|
|
|
|
BOOST_FORCE_BUILD=true
|
|
|
|
OCIO_FORCE_BUILD=true
|
|
|
|
OPENEXR_FORCE_BUILD=true
|
|
|
|
OIIO_FORCE_BUILD=true
|
|
|
|
LLVM_FORCE_BUILD=true
|
|
|
|
OSL_FORCE_BUILD=true
|
|
|
|
OSD_FORCE_BUILD=true
|
|
|
|
OPENCOLLADA_FORCE_BUILD=true
|
|
|
|
FFMPEG_FORCE_BUILD=true
|
|
|
|
shift; continue
|
|
|
|
;;
|
|
|
|
--build-python)
|
|
|
|
PYTHON_FORCE_BUILD=true
|
|
|
|
NUMPY_FORCE_BUILD=true
|
|
|
|
shift; continue
|
|
|
|
;;
|
|
|
|
--build-numpy)
|
|
|
|
PYTHON_FORCE_BUILD=true
|
|
|
|
NUMPY_FORCE_BUILD=true
|
|
|
|
shift; continue
|
|
|
|
;;
|
|
|
|
--build-boost)
|
|
|
|
BOOST_FORCE_BUILD=true; shift; continue
|
|
|
|
;;
|
|
|
|
--build-ocio)
|
|
|
|
OCIO_FORCE_BUILD=true; shift; continue
|
|
|
|
;;
|
|
|
|
--build-openexr)
|
|
|
|
OPENEXR_FORCE_BUILD=true; shift; continue
|
|
|
|
;;
|
|
|
|
--build-oiio)
|
2015-11-23 21:03:22 +01:00
|
|
|
OIIO_FORCE_BUILD=true; shift; continue
|
2015-11-23 19:54:25 +01:00
|
|
|
;;
|
|
|
|
--build-llvm)
|
2015-11-23 21:03:22 +01:00
|
|
|
LLVM_FORCE_BUILD=true; shift; continue
|
2015-11-23 19:54:25 +01:00
|
|
|
;;
|
|
|
|
--build-osl)
|
|
|
|
OSL_FORCE_BUILD=true; shift; continue
|
|
|
|
;;
|
|
|
|
--build-osd)
|
|
|
|
OSD_FORCE_BUILD=true; shift; continue
|
|
|
|
;;
|
|
|
|
--build-opencollada)
|
|
|
|
OPENCOLLADA_FORCE_BUILD=true; shift; continue
|
|
|
|
;;
|
|
|
|
--build-ffmpeg)
|
|
|
|
FFMPEG_FORCE_BUILD=true; shift; continue
|
|
|
|
;;
|
2012-12-03 13:28:35 +00:00
|
|
|
--force-all)
|
|
|
|
PYTHON_FORCE_REBUILD=true
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
NUMPY_FORCE_REBUILD=true
|
2012-12-03 13:28:35 +00:00
|
|
|
BOOST_FORCE_REBUILD=true
|
|
|
|
OCIO_FORCE_REBUILD=true
|
2013-12-11 17:50:26 +01:00
|
|
|
OPENEXR_FORCE_REBUILD=true
|
2012-12-03 13:28:35 +00:00
|
|
|
OIIO_FORCE_REBUILD=true
|
|
|
|
LLVM_FORCE_REBUILD=true
|
|
|
|
OSL_FORCE_REBUILD=true
|
2015-08-08 14:12:02 +02:00
|
|
|
OSD_FORCE_REBUILD=true
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
OPENCOLLADA_FORCE_REBUILD=true
|
2012-12-03 13:28:35 +00:00
|
|
|
FFMPEG_FORCE_REBUILD=true
|
|
|
|
shift; continue
|
|
|
|
;;
|
2012-12-01 18:07:45 +00:00
|
|
|
--force-python)
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
PYTHON_FORCE_REBUILD=true
|
|
|
|
NUMPY_FORCE_REBUILD=true
|
|
|
|
shift; continue
|
2012-12-01 18:07:45 +00:00
|
|
|
;;
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--force-numpy)
|
|
|
|
NUMPY_FORCE_REBUILD=true; shift; continue
|
|
|
|
;;
|
2012-12-01 18:07:45 +00:00
|
|
|
--force-boost)
|
|
|
|
BOOST_FORCE_REBUILD=true; shift; continue
|
|
|
|
;;
|
|
|
|
--force-ocio)
|
|
|
|
OCIO_FORCE_REBUILD=true; shift; continue
|
|
|
|
;;
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
--force-openexr)
|
|
|
|
OPENEXR_FORCE_REBUILD=true; shift; continue
|
|
|
|
;;
|
2012-12-01 18:07:45 +00:00
|
|
|
--force-oiio)
|
2015-11-23 21:03:22 +01:00
|
|
|
OIIO_FORCE_REBUILD=true; shift; continue
|
2012-12-01 18:07:45 +00:00
|
|
|
;;
|
|
|
|
--force-llvm)
|
2015-11-23 21:03:22 +01:00
|
|
|
LLVM_FORCE_REBUILD=true; shift; continue
|
2012-12-01 18:07:45 +00:00
|
|
|
;;
|
|
|
|
--force-osl)
|
|
|
|
OSL_FORCE_REBUILD=true; shift; continue
|
|
|
|
;;
|
2015-08-08 14:12:02 +02:00
|
|
|
--force-osd)
|
|
|
|
OSD_FORCE_REBUILD=true; shift; continue
|
|
|
|
;;
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--force-opencollada)
|
|
|
|
OPENCOLLADA_FORCE_REBUILD=true; shift; continue
|
|
|
|
;;
|
2012-12-01 18:07:45 +00:00
|
|
|
--force-ffmpeg)
|
|
|
|
FFMPEG_FORCE_REBUILD=true; shift; continue
|
|
|
|
;;
|
2012-12-03 17:53:01 +00:00
|
|
|
--skip-python)
|
|
|
|
PYTHON_SKIP=true; shift; continue
|
|
|
|
;;
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--skip-numpy)
|
|
|
|
NUMPY_SKIP=true; shift; continue
|
|
|
|
;;
|
2012-12-03 17:53:01 +00:00
|
|
|
--skip-boost)
|
|
|
|
BOOST_SKIP=true; shift; continue
|
|
|
|
;;
|
|
|
|
--skip-ocio)
|
|
|
|
OCIO_SKIP=true; shift; continue
|
|
|
|
;;
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
--skip-openexr)
|
|
|
|
OPENEXR_SKIP=true; shift; continue
|
|
|
|
;;
|
2012-12-03 17:53:01 +00:00
|
|
|
--skip-oiio)
|
|
|
|
OIIO_SKIP=true; shift; continue
|
|
|
|
;;
|
|
|
|
--skip-llvm)
|
|
|
|
LLVM_SKIP=true; shift; continue
|
|
|
|
;;
|
|
|
|
--skip-osl)
|
|
|
|
OSL_SKIP=true; shift; continue
|
|
|
|
;;
|
2015-08-08 14:12:02 +02:00
|
|
|
--skip-osd)
|
|
|
|
OSD_SKIP=true; shift; continue
|
|
|
|
;;
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--skip-opencollada)
|
|
|
|
OPENCOLLADA_SKIP=true; shift; continue
|
|
|
|
;;
|
2012-12-03 17:53:01 +00:00
|
|
|
--skip-ffmpeg)
|
|
|
|
FFMPEG_SKIP=true; shift; continue
|
|
|
|
;;
|
2012-12-01 18:07:45 +00:00
|
|
|
--)
|
|
|
|
# no more arguments to parse
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
*)
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
|
|
|
ERROR "Wrong parameter! Usage:"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$COMMON_INFO"`"
|
|
|
|
PRINT ""
|
2012-12-01 18:07:45 +00:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_ALL" = true -a "$OPENCOLLADA_SKIP" = false ]; then
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
WITH_OPENCOLLADA=true
|
2012-12-05 11:58:38 +00:00
|
|
|
fi
|
|
|
|
|
2014-05-01 09:25:29 +02:00
|
|
|
|
2014-10-09 13:32:20 +02:00
|
|
|
|
2014-05-01 09:25:29 +02:00
|
|
|
# This has to be done here, because user might force some versions...
|
2015-11-23 19:54:25 +01:00
|
|
|
PYTHON_SOURCE=( "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz" )
|
2014-06-29 18:38:20 +02:00
|
|
|
NUMPY_SOURCE=( "http://sourceforge.net/projects/numpy/files/NumPy/$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz" )
|
2015-11-23 15:42:46 +01:00
|
|
|
|
2014-05-01 09:25:29 +02:00
|
|
|
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
|
2014-06-29 18:38:20 +02:00
|
|
|
BOOST_SOURCE=( "http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_$_boost_version_nodots.tar.bz2/download" )
|
2015-11-23 15:42:46 +01:00
|
|
|
BOOST_BUILD_MODULES="--with-system --with-filesystem --with-thread --with-regex --with-locale --with-date_time"
|
2014-05-01 09:25:29 +02:00
|
|
|
|
2014-06-29 18:38:20 +02:00
|
|
|
OCIO_SOURCE=( "https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION" )
|
2014-07-25 12:43:05 +02:00
|
|
|
|
2015-02-03 19:56:28 +01:00
|
|
|
OPENEXR_USE_REPO=false
|
|
|
|
OPENEXR_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/openexr-$OPENEXR_VERSION.tar.gz" )
|
|
|
|
OPENEXR_SOURCE_REPO=( "https://github.com/mont29/openexr.git" )
|
|
|
|
OPENEXR_SOURCE_REPO_UID="2787aa1cf652d244ed45ae124eb1553f6cff11ee"
|
2014-06-29 18:38:20 +02:00
|
|
|
ILMBASE_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/ilmbase-$ILMBASE_VERSION.tar.gz" )
|
2014-05-01 09:25:29 +02:00
|
|
|
|
2015-03-07 14:42:03 +01:00
|
|
|
OIIO_USE_REPO=false
|
2015-02-03 19:56:28 +01:00
|
|
|
OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz" )
|
|
|
|
OIIO_SOURCE_REPO=( "https://github.com/OpenImageIO/oiio.git" )
|
|
|
|
OIIO_SOURCE_REPO_UID="c9e67275a0b248ead96152f6d2221cc0c0f278a4"
|
2014-05-01 09:25:29 +02:00
|
|
|
|
2014-06-29 18:38:20 +02:00
|
|
|
LLVM_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz" )
|
|
|
|
LLVM_CLANG_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz" "http://llvm.org/releases/$LLVM_VERSION/cfe-$LLVM_VERSION.src.tar.gz" )
|
2015-11-23 15:42:46 +01:00
|
|
|
|
2015-02-03 19:56:28 +01:00
|
|
|
OSL_USE_REPO=true
|
|
|
|
#~ OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
|
|
|
|
OSL_SOURCE=( "https://github.com/Nazg-Gul/OpenShadingLanguage/archive/Release-1.5.11.tar.gz" )
|
|
|
|
#~ OSL_SOURCE_REPO=( "https://github.com/imageworks/OpenShadingLanguage.git" )
|
|
|
|
#~ OSL_SOURCE_REPO=( "https://github.com/mont29/OpenShadingLanguage.git" )
|
|
|
|
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
|
|
|
|
#~ OSL_SOURCE_REPO_BRANCH="master"
|
|
|
|
OSL_SOURCE_REPO=( "https://github.com/Nazg-Gul/OpenShadingLanguage.git" )
|
2015-11-17 14:05:06 +01:00
|
|
|
OSL_SOURCE_REPO_UID="7d40ff5fe8e47b030042afb92d0e955f5aa96f48"
|
2015-02-03 19:56:28 +01:00
|
|
|
OSL_SOURCE_REPO_BRANCH="blender-fixes"
|
2014-05-01 09:25:29 +02:00
|
|
|
|
2015-08-08 14:12:02 +02:00
|
|
|
OSD_USE_REPO=true
|
|
|
|
# Script foo to make the version string compliant with the archive name:
|
|
|
|
# ${Varname//SearchForThisChar/ReplaceWithThisChar}
|
|
|
|
OSD_SOURCE=( "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${OSD_VERSION//./_}.tar.gz" )
|
|
|
|
OSD_SOURCE_REPO=( "https://github.com/PixarAnimationStudios/OpenSubdiv.git" )
|
|
|
|
OSD_SOURCE_REPO_UID="404659fffa659da075d1c9416e4fc939139a84ee"
|
|
|
|
OSD_SOURCE_REPO_BRANCH="dev"
|
|
|
|
|
2014-06-29 18:38:20 +02:00
|
|
|
OPENCOLLADA_SOURCE=( "https://github.com/KhronosGroup/OpenCOLLADA.git" )
|
2015-05-01 21:18:08 +02:00
|
|
|
OPENCOLLADA_REPO_UID="3335ac164e68b2512a40914b14c74db260e6ff7d"
|
2015-11-23 15:42:46 +01:00
|
|
|
OPENCOLLADA_REPO_BRANCH="master"
|
|
|
|
|
2014-06-29 18:38:20 +02:00
|
|
|
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
|
2014-05-01 09:25:29 +02:00
|
|
|
|
|
|
|
|
2015-11-23 15:42:46 +01:00
|
|
|
|
|
|
|
#### Show Dependencies ####
|
|
|
|
|
|
|
|
# Need those to be after we defined versions...
|
|
|
|
DEPS_COMMON_INFO="\"COMMON DEPENDENCIES:
|
|
|
|
|
|
|
|
Those libraries should be available as packages in all recent distributions (optional ones are [between brackets]):
|
|
|
|
|
|
|
|
* Basics of dev environment (cmake or scons, gcc, svn , git, ...).
|
|
|
|
* libjpeg, libpng, libtiff, [libopenjpeg], [libopenal].
|
|
|
|
* libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed).
|
|
|
|
* libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp.
|
|
|
|
* libsdl1.2, libglew, libglewmx.\""
|
|
|
|
|
|
|
|
DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES:
|
|
|
|
|
|
|
|
The following libraries will probably not all be available as packages in your distribution
|
|
|
|
(install_deps will by default try to install packages, and fall back to building missing ones).
|
2015-11-23 19:54:25 +01:00
|
|
|
You can force install_deps to build those with '--build-all' or relevant 'build-foo' options, see '--help' message.
|
2015-11-23 15:42:46 +01:00
|
|
|
You may also want to build them yourself (optional ones are [between brackets]):
|
|
|
|
|
|
|
|
* Python $PYTHON_VERSION_MIN (from $PYTHON_SOURCE).
|
|
|
|
* [NumPy $NUMPY_VERSION_MIN] (from $NUMPY_SOURCE).
|
|
|
|
* Boost $BOOST_VERSION_MIN (from $BOOST_SOURCE, modules: $BOOST_BUILD_MODULES).
|
|
|
|
* [FFMpeg $FFMPEG_VERSION_MIN (needs libvorbis, libogg, libtheora, libx264, libmp3lame, libxvidcore, libvpx, ...)] (from $FFMPEG_SOURCE).
|
|
|
|
* [OpenColorIO $OCIO_VERSION_MIN] (from $OCIO_SOURCE).
|
|
|
|
* ILMBase $ILMBASE_VERSION_MIN (from $ILMBASE_SOURCE).
|
|
|
|
* OpenEXR $OPENEXR_VERSION_MIN (from $OPENEXR_SOURCE).
|
|
|
|
* OpenImageIO $OIIO_VERSION_MIN (from $OIIO_SOURCE).
|
|
|
|
* [LLVM $LLVM_VERSION_MIN (with clang)] (from $LLVM_SOURCE, and $LLVM_CLANG_SOURCE).
|
|
|
|
* [OpenShadingLanguage $OSL_VERSION_MIN] (from $OSL_SOURCE_REPO, branch $OSL_SOURCE_REPO_BRANCH, commit $OSL_SOURCE_REPO_UID).
|
|
|
|
* [OpenSubDiv $OSD_VERSION_MIN] (from $OSD_SOURCE_REPO, branch $OSD_SOURCE_REPO_BRANCH, commit $OSD_SOURCE_REPO_UID).
|
|
|
|
* [OpenCollada] (from $OPENCOLLADA_SOURCE, branch $OPENCOLLADA_REPO_BRANCH, commit $OPENCOLLADA_REPO_UID).\""
|
|
|
|
|
|
|
|
if [ "$DO_SHOW_DEPS" = true ]; then
|
|
|
|
PRINT ""
|
|
|
|
PRINT "Blender dependencies (libraries needed to build it):"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$DEPS_COMMON_INFO"`"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$DEPS_SPECIFIC_INFO"`"
|
|
|
|
PRINT ""
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
##### Generic Helpers #####
|
|
|
|
|
2014-06-29 18:38:20 +02:00
|
|
|
# Check return code of wget for success...
|
|
|
|
download() {
|
|
|
|
declare -a sources=("${!1}")
|
|
|
|
sources_count=${#sources[@]}
|
|
|
|
error=1
|
|
|
|
|
|
|
|
for (( i=0; $i < $sources_count; i++ ))
|
|
|
|
do
|
|
|
|
wget -c ${sources[$i]} -O $2
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
error=0
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $error -eq 1 ]; then
|
|
|
|
ERROR "wget could not find $1, or could not write it to $2, exiting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-11-19 08:48:21 +00:00
|
|
|
# Return 0 if $1 = $2 (i.e. 1.01.0 = 1.1, but 1.1.1 != 1.1), else 1.
|
|
|
|
# $1 and $2 should be version numbers made of numbers only.
|
|
|
|
version_eq() {
|
|
|
|
backIFS=$IFS
|
|
|
|
IFS='.'
|
|
|
|
|
|
|
|
# Split both version numbers into their numeric elements.
|
|
|
|
arr1=( $1 )
|
|
|
|
arr2=( $2 )
|
|
|
|
|
|
|
|
ret=1
|
|
|
|
|
|
|
|
count1=${#arr1[@]}
|
|
|
|
count2=${#arr2[@]}
|
|
|
|
if [ $count2 -ge $count1 ]; then
|
|
|
|
_t=$count1
|
|
|
|
count1=$count2
|
|
|
|
count2=$_t
|
|
|
|
arr1=( $2 )
|
|
|
|
arr2=( $1 )
|
|
|
|
fi
|
|
|
|
|
|
|
|
ret=0
|
|
|
|
for (( i=0; $i < $count2; i++ ))
|
|
|
|
do
|
|
|
|
if [ $(( 10#${arr1[$i]} )) -ne $(( 10#${arr2[$i]} )) ]; then
|
|
|
|
ret=1
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
for (( i=$count2; $i < $count1; i++ ))
|
|
|
|
do
|
|
|
|
if [ $(( 10#${arr1[$i]} )) -ne 0 ]; then
|
|
|
|
ret=1
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
IFS=$backIFS
|
|
|
|
return $ret
|
|
|
|
}
|
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# Return 0 if $1 >= $2, else 1.
|
2012-11-14 21:57:47 +00:00
|
|
|
# $1 and $2 should be version numbers made of numbers only.
|
|
|
|
version_ge() {
|
2012-11-19 08:48:21 +00:00
|
|
|
version_eq $1 $2
|
2012-12-04 22:03:39 +00:00
|
|
|
if [ $? -eq 1 -a $(_echo "$1" "$2" | sort --version-sort | head --lines=1) = "$1" ]; then
|
2012-11-14 21:57:47 +00:00
|
|
|
return 1
|
2012-11-15 17:31:18 +00:00
|
|
|
else
|
|
|
|
return 0
|
2012-11-14 21:57:47 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2015-11-17 20:38:01 +01:00
|
|
|
# Return 0 if $3 > $1 >= $2, else 1.
|
|
|
|
# $1 and $2 should be version numbers made of numbers only.
|
|
|
|
version_ge_lt() {
|
|
|
|
version_ge $1 $3
|
2015-11-17 21:50:30 +01:00
|
|
|
if [ $? -eq 0 ]; then
|
2015-11-17 20:38:01 +01:00
|
|
|
return 1
|
|
|
|
else
|
|
|
|
version_ge $1 $2
|
|
|
|
return $?
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# Return 0 if $1 is into $2 (e.g. 3.3.2 is into 3.3, but not 3.3.0 or 3.3.5), else 1.
|
2012-11-14 21:57:47 +00:00
|
|
|
# $1 and $2 should be version numbers made of numbers only.
|
|
|
|
# $1 should be at least as long as $2!
|
|
|
|
version_match() {
|
|
|
|
backIFS=$IFS
|
2012-11-14 23:20:16 +00:00
|
|
|
IFS='.'
|
2012-11-14 21:57:47 +00:00
|
|
|
|
|
|
|
# Split both version numbers into their numeric elements.
|
|
|
|
arr1=( $1 )
|
|
|
|
arr2=( $2 )
|
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
ret=1
|
2012-11-14 21:57:47 +00:00
|
|
|
|
|
|
|
count1=${#arr1[@]}
|
|
|
|
count2=${#arr2[@]}
|
|
|
|
if [ $count1 -ge $count2 ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
ret=0
|
2012-11-14 21:57:47 +00:00
|
|
|
for (( i=0; $i < $count2; i++ ))
|
|
|
|
do
|
|
|
|
if [ $(( 10#${arr1[$i]} )) -ne $(( 10#${arr2[$i]} )) ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
ret=1
|
2012-11-14 21:57:47 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2012-11-14 23:20:16 +00:00
|
|
|
IFS=$backIFS
|
2012-11-14 21:57:47 +00:00
|
|
|
return $ret
|
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
##### Generic compile helpers #####
|
2012-11-12 19:39:09 +00:00
|
|
|
prepare_opt() {
|
2012-11-15 17:31:18 +00:00
|
|
|
INFO "Ensuring $INST exists and is writable by us"
|
2014-04-04 22:36:28 +02:00
|
|
|
if [ ! $SUDO ]; then
|
|
|
|
WARNING "--no-sudo enabled, might be impossible to create install dir..."
|
|
|
|
fi
|
2012-11-28 13:34:44 +00:00
|
|
|
if [ ! -d $INST ]; then
|
2014-04-04 22:36:28 +02:00
|
|
|
$SUDO mkdir -p $INST
|
2012-11-28 13:34:44 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -w $INST ]; then
|
2014-04-04 22:36:28 +02:00
|
|
|
$SUDO chown $USER $INST
|
|
|
|
$SUDO chmod 775 $INST
|
2012-11-28 13:34:44 +00:00
|
|
|
fi
|
2012-11-15 17:31:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Check whether the current package needs to be recompiled, based on a dummy file containing a magic number in its name...
|
|
|
|
magic_compile_check() {
|
|
|
|
if [ -f $INST/.$1-magiccheck-$2 ]; then
|
|
|
|
return 0
|
|
|
|
else
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
magic_compile_set() {
|
|
|
|
rm -f $INST/.$1-magiccheck-*
|
|
|
|
touch $INST/.$1-magiccheck-$2
|
2012-11-12 19:39:09 +00:00
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
# Note: should clean nicely in $INST, but not in $SRC, when we switch to a new version of a lib...
|
|
|
|
_clean() {
|
|
|
|
rm -rf `readlink -f $_inst_shortcut`
|
2013-12-11 17:50:26 +01:00
|
|
|
# Only remove $_src dir when not using git repo (avoids to re-clone the whole repo every time!!!).
|
|
|
|
if [ $_git == false ]; then
|
|
|
|
rm -rf $_src
|
|
|
|
fi
|
2013-05-25 14:49:29 +00:00
|
|
|
rm -rf $_inst
|
|
|
|
rm -rf $_inst_shortcut
|
|
|
|
}
|
|
|
|
|
|
|
|
_create_inst_shortcut() {
|
|
|
|
rm -f $_inst_shortcut
|
|
|
|
ln -s $_inst $_inst_shortcut
|
|
|
|
}
|
2012-11-15 17:31:18 +00:00
|
|
|
|
2013-09-19 11:25:47 +00:00
|
|
|
# ldconfig
|
|
|
|
run_ldconfig() {
|
|
|
|
_lib_path="$INST/$1/lib"
|
2013-09-19 20:27:26 +00:00
|
|
|
_ldconf_path="/etc/ld.so.conf.d/$1.conf"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2014-04-04 22:36:28 +02:00
|
|
|
if [ ! $SUDO ]; then
|
|
|
|
WARNING "--no-sudo enabled, impossible to run ldconfig for $1, you'll have to do it yourself..."
|
|
|
|
else
|
|
|
|
INFO "Running ldconfig for $1..."
|
|
|
|
$SUDO sh -c "echo \"$_lib_path\" > $_ldconf_path"
|
|
|
|
$SUDO /sbin/ldconfig # XXX OpenSuse does not include sbin in command path with sudo!!!
|
|
|
|
fi
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-09-19 11:25:47 +00:00
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Build Python ####
|
|
|
|
_init_python() {
|
2012-11-16 17:14:01 +00:00
|
|
|
_src=$SRC/Python-$PYTHON_VERSION
|
2013-12-11 17:50:26 +01:00
|
|
|
_git=false
|
2012-11-16 17:14:01 +00:00
|
|
|
_inst=$INST/python-$PYTHON_VERSION
|
2014-04-30 23:13:25 +10:00
|
|
|
_inst_shortcut=$INST/python-$PYTHON_VERSION_MIN
|
2013-05-25 14:49:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
clean_Python() {
|
|
|
|
clean_Numpy
|
|
|
|
_init_python
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
|
|
|
compile_Python() {
|
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
2013-09-17 11:01:52 +00:00
|
|
|
py_magic=1
|
2013-05-25 14:49:29 +00:00
|
|
|
_init_python
|
2012-11-16 17:14:01 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check python-$PYTHON_VERSION $py_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$PYTHON_FORCE_REBUILD" = true ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_Python
|
2012-11-15 17:31:18 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_inst ]; then
|
2012-11-12 19:39:09 +00:00
|
|
|
INFO "Building Python-$PYTHON_VERSION"
|
|
|
|
|
|
|
|
prepare_opt
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_src ]; then
|
2012-11-12 19:39:09 +00:00
|
|
|
mkdir -p $SRC
|
2014-06-29 18:38:20 +02:00
|
|
|
download PYTHON_SOURCE[@] $_src.tgz
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
INFO "Unpacking Python-$PYTHON_VERSION"
|
2014-04-22 10:08:39 +02:00
|
|
|
tar -C $SRC -xf $_src.tgz
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
cd $_src
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2013-09-17 11:01:52 +00:00
|
|
|
./configure --prefix=$_inst --libdir=$_inst/lib --enable-ipv6 \
|
2012-11-12 19:39:09 +00:00
|
|
|
--enable-loadable-sqlite-extensions --with-dbmliborder=bdb \
|
|
|
|
--with-computed-gotos --with-pymalloc
|
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
make -j$THREADS && make install
|
2012-11-12 19:39:09 +00:00
|
|
|
make clean
|
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
_create_inst_shortcut
|
2012-11-17 12:10:35 +00:00
|
|
|
else
|
|
|
|
ERROR "Python--$PYTHON_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
2012-11-17 11:42:37 +00:00
|
|
|
fi
|
2012-11-15 17:31:18 +00:00
|
|
|
|
|
|
|
magic_compile_set python-$PYTHON_VERSION $py_magic
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
cd $CWD
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "Done compiling Python-$PYTHON_VERSION!"
|
2012-11-15 17:31:18 +00:00
|
|
|
else
|
|
|
|
INFO "Own Python-$PYTHON_VERSION is up to date, nothing to do!"
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-python option."
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
##### Build Numpy #####
|
|
|
|
_init_numpy() {
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
_src=$SRC/numpy-$NUMPY_VERSION
|
2013-12-11 17:50:26 +01:00
|
|
|
_git=false
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
_inst=$INST/numpy-$NUMPY_VERSION
|
|
|
|
_python=$INST/python-$PYTHON_VERSION
|
2014-04-30 23:13:25 +10:00
|
|
|
_site=lib/python$PYTHON_VERSION_MIN/site-packages
|
2013-05-25 14:49:29 +00:00
|
|
|
_inst_shortcut=$_python/$_site/numpy
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_Numpy() {
|
|
|
|
_init_numpy
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
|
|
|
compile_Numpy() {
|
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
2013-09-17 11:01:52 +00:00
|
|
|
numpy_magic=0
|
2013-05-25 14:49:29 +00:00
|
|
|
_init_numpy
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
|
|
|
# Clean install if needed!
|
2013-09-17 11:01:52 +00:00
|
|
|
magic_compile_check numpy-$NUMPY_VERSION $numpy_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$NUMPY_FORCE_REBUILD" = true ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_Numpy
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d $_inst ]; then
|
|
|
|
INFO "Building Numpy-$NUMPY_VERSION"
|
|
|
|
|
|
|
|
prepare_opt
|
|
|
|
|
|
|
|
if [ ! -d $_src ]; then
|
|
|
|
mkdir -p $SRC
|
2014-06-29 18:38:20 +02:00
|
|
|
download NUMPY_SOURCE[@] $_src.tar.gz
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
|
|
|
INFO "Unpacking Numpy-$NUMPY_VERSION"
|
|
|
|
tar -C $SRC -xf $_src.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $_src
|
|
|
|
|
|
|
|
$_python/bin/python3 setup.py install --prefix=$_inst
|
|
|
|
|
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
# Can't use _create_inst_shortcut here...
|
|
|
|
rm -f $_inst_shortcut
|
|
|
|
ln -s $_inst/$_site/numpy $_inst_shortcut
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
else
|
|
|
|
ERROR "Numpy-$NUMPY_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2013-09-17 11:01:52 +00:00
|
|
|
magic_compile_set numpy-$NUMPY_VERSION $numpy_magic
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
|
|
|
cd $CWD
|
|
|
|
INFO "Done compiling Numpy-$NUMPY_VERSION!"
|
|
|
|
else
|
|
|
|
INFO "Own Numpy-$NUMPY_VERSION is up to date, nothing to do!"
|
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-numpy option."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Build Boost ####
|
|
|
|
_init_boost() {
|
|
|
|
_src=$SRC/boost-$BOOST_VERSION
|
2013-12-11 17:50:26 +01:00
|
|
|
_git=false
|
2013-05-25 14:49:29 +00:00
|
|
|
_inst=$INST/boost-$BOOST_VERSION
|
|
|
|
_inst_shortcut=$INST/boost
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_Boost() {
|
|
|
|
_init_boost
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
compile_Boost() {
|
2012-11-15 17:31:18 +00:00
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
|
|
|
boost_magic=7
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
_init_boost
|
2012-11-16 17:14:01 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check boost-$BOOST_VERSION $boost_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$BOOST_FORCE_REBUILD" = true ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_Boost
|
2012-11-15 17:31:18 +00:00
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_inst ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
INFO "Building Boost-$BOOST_VERSION"
|
2012-11-12 19:39:09 +00:00
|
|
|
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
# Rebuild dependecies as well!
|
2015-11-23 21:03:22 +01:00
|
|
|
OIIO_FORCE_BUILD=true
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
OIIO_FORCE_REBUILD=true
|
2015-11-23 21:03:22 +01:00
|
|
|
OSL_FORCE_BUILD=true
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
OSL_FORCE_REBUILD=true
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
prepare_opt
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_src ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
INFO "Downloading Boost-$BOOST_VERSION"
|
2012-11-12 19:39:09 +00:00
|
|
|
mkdir -p $SRC
|
2014-06-29 18:38:20 +02:00
|
|
|
download BOOST_SOURCE[@] $_src.tar.bz2
|
2012-11-16 17:14:01 +00:00
|
|
|
tar -C $SRC --transform "s,(.*/?)boost_1_[^/]+(.*),\1boost-$BOOST_VERSION\2,x" -xf $_src.tar.bz2
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
cd $_src
|
|
|
|
if [ ! -f $_src/b2 ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
./bootstrap.sh
|
|
|
|
fi
|
2015-11-23 15:42:46 +01:00
|
|
|
./b2 -j$THREADS -a $BOOST_BUILD_MODULES \
|
2012-11-16 17:14:01 +00:00
|
|
|
--prefix=$_inst --disable-icu boost.locale.icu=off install
|
2012-11-12 19:39:09 +00:00
|
|
|
./b2 --clean
|
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
_create_inst_shortcut
|
2012-11-17 12:10:35 +00:00
|
|
|
else
|
|
|
|
ERROR "Boost-$BOOST_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
2012-11-17 11:42:37 +00:00
|
|
|
fi
|
2012-11-15 17:31:18 +00:00
|
|
|
|
|
|
|
magic_compile_set boost-$BOOST_VERSION $boost_magic
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
cd $CWD
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "Done compiling Boost-$BOOST_VERSION!"
|
2012-11-15 17:31:18 +00:00
|
|
|
else
|
|
|
|
INFO "Own Boost-$BOOST_VERSION is up to date, nothing to do!"
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-boost option."
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
2013-05-26 15:00:42 +00:00
|
|
|
|
|
|
|
# Just always run it, much simpler this way!
|
2013-09-19 11:25:47 +00:00
|
|
|
run_ldconfig "boost"
|
2012-11-12 19:39:09 +00:00
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Build OCIO ####
|
|
|
|
_init_ocio() {
|
|
|
|
_src=$SRC/OpenColorIO-$OCIO_VERSION
|
2013-12-11 17:50:26 +01:00
|
|
|
_git=false
|
2013-05-25 14:49:29 +00:00
|
|
|
_inst=$INST/ocio-$OCIO_VERSION
|
|
|
|
_inst_shortcut=$INST/ocio
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_OCIO() {
|
|
|
|
_init_ocio
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
compile_OCIO() {
|
2012-11-15 17:31:18 +00:00
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
|
|
|
ocio_magic=1
|
2013-05-25 14:49:29 +00:00
|
|
|
_init_ocio
|
2012-11-16 17:14:01 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check ocio-$OCIO_VERSION $ocio_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$OCIO_FORCE_REBUILD" = true ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_OCIO
|
2012-11-15 17:31:18 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_inst ]; then
|
2012-11-12 19:39:09 +00:00
|
|
|
INFO "Building OpenColorIO-$OCIO_VERSION"
|
|
|
|
|
|
|
|
prepare_opt
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_src ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
INFO "Downloading OpenColorIO-$OCIO_VERSION"
|
|
|
|
mkdir -p $SRC
|
2014-06-29 18:38:20 +02:00
|
|
|
download OCIO_SOURCE[@] $_src.tar.gz
|
2012-11-15 17:31:18 +00:00
|
|
|
|
|
|
|
INFO "Unpacking OpenColorIO-$OCIO_VERSION"
|
|
|
|
tar -C $SRC --transform "s,(.*/?)imageworks-OpenColorIO[^/]*(.*),\1OpenColorIO-$OCIO_VERSION\2,x" \
|
2012-11-16 17:14:01 +00:00
|
|
|
-xf $_src.tar.gz
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
cd $_src
|
2012-11-15 17:31:18 +00:00
|
|
|
# Always refresh the whole build!
|
|
|
|
if [ -d build ]; then
|
|
|
|
rm -rf build
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
2013-12-11 17:50:26 +01:00
|
|
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
|
|
|
cmake_d="$cmake_d -D OCIO_BUILD_APPS=OFF"
|
|
|
|
cmake_d="$cmake_d -D OCIO_BUILD_PYGLUE=OFF"
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
if file /bin/cp | grep -q '32-bit'; then
|
|
|
|
cflags="-fPIC -m32 -march=i686"
|
|
|
|
else
|
|
|
|
cflags="-fPIC"
|
|
|
|
fi
|
|
|
|
|
2013-12-11 17:50:26 +01:00
|
|
|
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" ..
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
make -j$THREADS && make install
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# Force linking against static libs
|
2012-11-16 17:14:01 +00:00
|
|
|
rm -f $_inst/lib/*.so*
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
# Additional depencencies
|
2012-11-16 17:14:01 +00:00
|
|
|
cp ext/dist/lib/libtinyxml.a $_inst/lib
|
|
|
|
cp ext/dist/lib/libyaml-cpp.a $_inst/lib
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
make clean
|
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
_create_inst_shortcut
|
2012-11-17 12:10:35 +00:00
|
|
|
else
|
|
|
|
ERROR "OpenColorIO-$OCIO_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
2012-11-17 11:42:37 +00:00
|
|
|
fi
|
2012-11-15 17:31:18 +00:00
|
|
|
|
|
|
|
magic_compile_set ocio-$OCIO_VERSION $ocio_magic
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
cd $CWD
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "Done compiling OpenColorIO-$OCIO_VERSION!"
|
2012-11-15 17:31:18 +00:00
|
|
|
else
|
|
|
|
INFO "Own OpenColorIO-$OCIO_VERSION is up to date, nothing to do!"
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-ocio option."
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
2013-12-11 17:50:26 +01:00
|
|
|
|
|
|
|
run_ldconfig "ocio"
|
2012-11-12 19:39:09 +00:00
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Build ILMBase ####
|
|
|
|
_init_ilmbase() {
|
|
|
|
_src=$SRC/ILMBase-$ILMBASE_VERSION
|
2013-12-11 17:50:26 +01:00
|
|
|
_git=false
|
2013-05-25 14:49:29 +00:00
|
|
|
_inst=$TMP/ilmbase-$ILMBASE_VERSION
|
|
|
|
_inst_shortcut=$TMP/ilmbase
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_ILMBASE() {
|
|
|
|
_init_ilmbase
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
compile_ILMBASE() {
|
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
2015-02-03 19:56:28 +01:00
|
|
|
ilmbase_magic=10
|
2013-05-25 14:49:29 +00:00
|
|
|
_init_ilmbase
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
|
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check ilmbase-$ILMBASE_VERSION $ilmbase_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$OPENEXR_FORCE_REBUILD" = true ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_ILMBASE
|
2013-05-24 14:31:57 +00:00
|
|
|
rm -rf $_openexr_inst
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
fi
|
|
|
|
|
2013-05-24 14:31:57 +00:00
|
|
|
if [ ! -d $_openexr_inst ]; then
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
INFO "Building ILMBase-$ILMBASE_VERSION"
|
|
|
|
|
2013-05-24 14:31:57 +00:00
|
|
|
# Rebuild dependecies as well!
|
2015-11-23 21:03:22 +01:00
|
|
|
OPENEXR_FORCE_BUILD=true
|
2013-05-24 14:31:57 +00:00
|
|
|
OPENEXR_FORCE_REBUILD=true
|
|
|
|
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
prepare_opt
|
|
|
|
|
|
|
|
if [ ! -d $_src ]; then
|
|
|
|
INFO "Downloading ILMBase-$ILMBASE_VERSION"
|
|
|
|
mkdir -p $SRC
|
2014-06-29 18:38:20 +02:00
|
|
|
download ILMBASE_SOURCE[@] $_src.tar.gz
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
|
|
|
|
INFO "Unpacking ILMBase-$ILMBASE_VERSION"
|
2015-02-03 19:56:28 +01:00
|
|
|
tar -C $SRC --transform "s,(.*/?)ilmbase-[^/]*(.*),\1ILMBase-$ILMBASE_VERSION\2,x" -xf $_src.tar.gz
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $_src
|
|
|
|
# Always refresh the whole build!
|
|
|
|
if [ -d build ]; then
|
|
|
|
rm -rf build
|
|
|
|
fi
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
2014-02-04 16:51:41 +01:00
|
|
|
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
|
2015-02-03 19:56:28 +01:00
|
|
|
cmake_d="$cmake_d -D NAMESPACE_VERSIONING=OFF" # VERY IMPORTANT!!!
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
|
|
|
|
if file /bin/cp | grep -q '32-bit'; then
|
|
|
|
cflags="-fPIC -m32 -march=i686"
|
|
|
|
else
|
|
|
|
cflags="-fPIC"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" ..
|
|
|
|
|
|
|
|
make -j$THREADS && make install
|
|
|
|
|
|
|
|
make clean
|
|
|
|
|
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
_create_inst_shortcut
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
else
|
|
|
|
ERROR "ILMBase-$ILMBASE_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-09-17 11:01:52 +00:00
|
|
|
cd $CWD
|
|
|
|
INFO "Done compiling ILMBase-$ILMBASE_VERSION!"
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
else
|
|
|
|
INFO "Own ILMBase-$ILMBASE_VERSION is up to date, nothing to do!"
|
|
|
|
INFO "If you want to force rebuild of this lib (and openexr), use the --force-openexr option."
|
|
|
|
fi
|
|
|
|
|
|
|
|
magic_compile_set ilmbase-$ILMBASE_VERSION $ilmbase_magic
|
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Build OpenEXR ####
|
|
|
|
_init_openexr() {
|
|
|
|
_src=$SRC/OpenEXR-$OPENEXR_VERSION
|
2013-12-11 17:50:26 +01:00
|
|
|
_git=true
|
2013-05-25 14:49:29 +00:00
|
|
|
_inst=$_openexr_inst
|
|
|
|
_inst_shortcut=$INST/openexr
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_OPENEXR() {
|
|
|
|
clean_ILMBASE
|
|
|
|
_init_openexr
|
|
|
|
_clean
|
|
|
|
}
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
compile_OPENEXR() {
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
2014-07-28 21:09:30 +02:00
|
|
|
openexr_magic=13
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
|
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check openexr-$OPENEXR_VERSION $openexr_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$OPENEXR_FORCE_REBUILD" = true ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_OPENEXR
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
fi
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
_openexr_inst=$INST/openexr-$OPENEXR_VERSION
|
|
|
|
compile_ILMBASE
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-05-25 14:49:29 +00:00
|
|
|
_ilmbase_inst=$_inst_shortcut
|
|
|
|
_init_openexr
|
|
|
|
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
if [ ! -d $_inst ]; then
|
|
|
|
INFO "Building OpenEXR-$OPENEXR_VERSION"
|
|
|
|
|
|
|
|
# Rebuild dependecies as well!
|
2015-11-23 21:03:22 +01:00
|
|
|
OIIO_FORCE_BUILD=true
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
OIIO_FORCE_REBUILD=true
|
|
|
|
|
|
|
|
prepare_opt
|
|
|
|
|
|
|
|
if [ ! -d $_src ]; then
|
|
|
|
INFO "Downloading OpenEXR-$OPENEXR_VERSION"
|
|
|
|
mkdir -p $SRC
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENEXR_USE_REPO" = true ]; then
|
2015-02-03 19:56:28 +01:00
|
|
|
git clone ${OPENEXR_SOURCE_REPO[0]} $_src
|
|
|
|
else
|
|
|
|
download OPENEXR_SOURCE[@] $_src.tar.gz
|
|
|
|
INFO "Unpacking OpenEXR-$OPENEXR_VERSION"
|
|
|
|
tar -C $SRC --transform "s,(.*/?)openexr[^/]*(.*),\1OpenEXR-$OPENEXR_VERSION\2,x" -xf $_src.tar.gz
|
|
|
|
fi
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $_src
|
2013-12-08 18:25:37 +01:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENEXR_USE_REPO" = true ]; then
|
2015-02-03 19:56:28 +01:00
|
|
|
# XXX For now, always update from latest repo...
|
|
|
|
git pull origin master
|
|
|
|
# Stick to same rev as windows' libs...
|
|
|
|
git checkout $OPENEXR_SOURCE_REPO_UID
|
|
|
|
git reset --hard
|
|
|
|
oiio_src_path="../OpenEXR"
|
|
|
|
else
|
|
|
|
oiio_src_path=".."
|
|
|
|
fi
|
2013-12-08 18:25:37 +01:00
|
|
|
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
# Always refresh the whole build!
|
|
|
|
if [ -d build ]; then
|
|
|
|
rm -rf build
|
|
|
|
fi
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
2013-05-25 14:49:29 +00:00
|
|
|
cmake_d="$cmake_d -D ILMBASE_PACKAGE_PREFIX=$_ilmbase_inst"
|
2014-02-04 16:51:41 +01:00
|
|
|
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
|
2015-02-03 19:56:28 +01:00
|
|
|
cmake_d="$cmake_d -D NAMESPACE_VERSIONING=OFF" # VERY IMPORTANT!!!
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
|
|
|
|
if file /bin/cp | grep -q '32-bit'; then
|
|
|
|
cflags="-fPIC -m32 -march=i686"
|
|
|
|
else
|
|
|
|
cflags="-fPIC"
|
|
|
|
fi
|
|
|
|
|
2015-02-03 19:56:28 +01:00
|
|
|
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" $oiio_src_path
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
|
|
|
|
make -j$THREADS && make install
|
|
|
|
|
|
|
|
make clean
|
|
|
|
|
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
_create_inst_shortcut
|
2013-05-24 14:31:57 +00:00
|
|
|
# Copy ilmbase files here (blender expects same dir for ilmbase and openexr :/).
|
2013-05-25 14:49:29 +00:00
|
|
|
cp -Lrn $_ilmbase_inst/* $_inst_shortcut
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
else
|
|
|
|
ERROR "OpenEXR-$OPENEXR_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
magic_compile_set openexr-$OPENEXR_VERSION $openexr_magic
|
|
|
|
|
|
|
|
cd $CWD
|
|
|
|
INFO "Done compiling OpenEXR-$OPENEXR_VERSION!"
|
|
|
|
else
|
|
|
|
INFO "Own OpenEXR-$OPENEXR_VERSION is up to date, nothing to do!"
|
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-openexr option."
|
|
|
|
fi
|
|
|
|
|
|
|
|
_with_built_openexr=true
|
2013-06-30 16:20:59 +00:00
|
|
|
|
|
|
|
# Just always run it, much simpler this way!
|
2013-09-19 11:25:47 +00:00
|
|
|
run_ldconfig "openexr"
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Build OIIO ####
|
|
|
|
_init_oiio() {
|
|
|
|
_src=$SRC/OpenImageIO-$OIIO_VERSION
|
2013-12-11 17:50:26 +01:00
|
|
|
_git=true
|
2013-05-25 14:49:29 +00:00
|
|
|
_inst=$INST/oiio-$OIIO_VERSION
|
|
|
|
_inst_shortcut=$INST/oiio
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_OIIO() {
|
|
|
|
_init_oiio
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
compile_OIIO() {
|
2012-11-15 17:31:18 +00:00
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
2013-12-08 18:25:37 +01:00
|
|
|
oiio_magic=14
|
2013-05-25 14:49:29 +00:00
|
|
|
_init_oiio
|
2012-11-16 17:14:01 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check oiio-$OIIO_VERSION $oiio_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$OIIO_FORCE_REBUILD" = true ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_OIIO
|
2012-11-15 17:31:18 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_inst ]; then
|
2012-11-12 19:39:09 +00:00
|
|
|
INFO "Building OpenImageIO-$OIIO_VERSION"
|
|
|
|
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
# Rebuild dependecies as well!
|
2015-11-23 21:03:22 +01:00
|
|
|
OSL_FORCE_BUILD=true
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
OSL_FORCE_REBUILD=true
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
prepare_opt
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_src ]; then
|
2012-11-28 13:27:12 +00:00
|
|
|
mkdir -p $SRC
|
2012-11-21 09:01:49 +00:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OIIO_USE_REPO" = true ]; then
|
2015-02-03 19:56:28 +01:00
|
|
|
git clone ${OIIO_SOURCE_REPO[0]} $_src
|
|
|
|
else
|
|
|
|
download OIIO_SOURCE[@] "$_src.tar.gz"
|
|
|
|
INFO "Unpacking OpenImageIO-$OIIO_VERSION"
|
|
|
|
tar -C $SRC --transform "s,(.*/?)oiio-Release-[^/]*(.*),\1OpenImageIO-$OIIO_VERSION\2,x" -xf $_src.tar.gz
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
cd $_src
|
2013-12-08 18:25:37 +01:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OIIO_USE_REPO" = true ]; then
|
2015-02-03 19:56:28 +01:00
|
|
|
# XXX For now, always update from latest repo...
|
|
|
|
git pull origin master
|
|
|
|
# Stick to same rev as windows' libs...
|
|
|
|
git checkout $OIIO_SOURCE_REPO_UID
|
|
|
|
git reset --hard
|
|
|
|
fi
|
2013-12-08 18:25:37 +01:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# Always refresh the whole build!
|
|
|
|
if [ -d build ]; then
|
|
|
|
rm -rf build
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
2012-11-21 13:13:50 +00:00
|
|
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
2013-12-11 17:50:26 +01:00
|
|
|
cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
|
2014-02-04 16:51:41 +01:00
|
|
|
cmake_d="$cmake_d -D BUILDSTATIC=OFF"
|
|
|
|
cmake_d="$cmake_d -D LINKSTATIC=OFF"
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
|
2014-05-03 12:44:44 +02:00
|
|
|
cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
|
|
|
|
cmake_d="$cmake_d -D OPENEXR_VERSION=$OPENEXR_VERSION"
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$_with_built_openexr" = true ]; then
|
2013-05-24 14:31:57 +00:00
|
|
|
cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
cmake_d="$cmake_d -D OPENEXR_HOME=$INST/openexr"
|
2015-02-03 19:56:28 +01:00
|
|
|
INFO "ILMBASE_HOME=$INST/openexr"
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
fi
|
|
|
|
|
2013-02-24 11:54:28 +00:00
|
|
|
# Optional tests and cmd tools
|
|
|
|
cmake_d="$cmake_d -D USE_QT=OFF"
|
2013-06-15 08:56:04 +00:00
|
|
|
cmake_d="$cmake_d -D USE_PYTHON=OFF"
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
|
2013-12-11 17:50:26 +01:00
|
|
|
cmake_d="$cmake_d -D OIIO_BUILD_TESTS=OFF"
|
|
|
|
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=OFF"
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
#cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
|
|
|
#cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=ON"
|
2012-11-29 08:22:02 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
if [ -d $INST/boost ]; then
|
2012-11-17 11:28:12 +00:00
|
|
|
cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost -D Boost_NO_SYSTEM_PATHS=ON"
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 12:42:01 +00:00
|
|
|
# Looks like we do not need ocio in oiio for now...
|
|
|
|
# if [ -d $INST/ocio ]; then
|
|
|
|
# cmake_d="$cmake_d -D OCIO_PATH=$INST/ocio"
|
|
|
|
# fi
|
2013-06-15 08:56:04 +00:00
|
|
|
cmake_d="$cmake_d -D USE_OCIO=OFF"
|
2012-11-16 12:42:01 +00:00
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
if file /bin/cp | grep -q '32-bit'; then
|
|
|
|
cflags="-fPIC -m32 -march=i686"
|
|
|
|
else
|
|
|
|
cflags="-fPIC"
|
|
|
|
fi
|
|
|
|
|
2013-12-08 18:25:37 +01:00
|
|
|
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" ..
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
make -j$THREADS && make install
|
2012-11-12 19:39:09 +00:00
|
|
|
make clean
|
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
_create_inst_shortcut
|
2012-11-17 12:10:35 +00:00
|
|
|
else
|
|
|
|
ERROR "OpenImageIO-$OIIO_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
2012-11-17 11:42:37 +00:00
|
|
|
fi
|
2012-11-15 17:31:18 +00:00
|
|
|
|
|
|
|
magic_compile_set oiio-$OIIO_VERSION $oiio_magic
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
cd $CWD
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "Done compiling OpenImageIO-$OIIO_VERSION!"
|
2012-11-15 17:31:18 +00:00
|
|
|
else
|
|
|
|
INFO "Own OpenImageIO-$OIIO_VERSION is up to date, nothing to do!"
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-oiio option."
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
2013-05-26 15:00:42 +00:00
|
|
|
|
|
|
|
# Just always run it, much simpler this way!
|
2013-09-19 11:25:47 +00:00
|
|
|
run_ldconfig "oiio"
|
2012-11-12 19:39:09 +00:00
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Build LLVM ####
|
|
|
|
_init_llvm() {
|
|
|
|
_src=$SRC/LLVM-$LLVM_VERSION
|
|
|
|
_src_clang=$SRC/CLANG-$LLVM_VERSION
|
2013-12-11 17:50:26 +01:00
|
|
|
_git=false
|
2013-05-25 14:49:29 +00:00
|
|
|
_inst=$INST/llvm-$LLVM_VERSION
|
|
|
|
_inst_shortcut=$INST/llvm
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_LLVM() {
|
|
|
|
_init_llvm
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
2012-11-21 09:01:49 +00:00
|
|
|
compile_LLVM() {
|
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
2013-09-16 13:02:49 +00:00
|
|
|
llvm_magic=2
|
2013-05-25 14:49:29 +00:00
|
|
|
_init_llvm
|
2012-11-21 09:01:49 +00:00
|
|
|
|
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check llvm-$LLVM_VERSION $llvm_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$LLVM_FORCE_REBUILD" = true ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_LLVM
|
2012-11-21 09:01:49 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d $_inst ]; then
|
|
|
|
INFO "Building LLVM-$LLVM_VERSION (CLANG included!)"
|
|
|
|
|
2015-11-23 21:03:22 +01:00
|
|
|
# Rebuild dependecies as well!
|
|
|
|
OSL_FORCE_BUILD=true
|
|
|
|
OSL_FORCE_REBUILD=true
|
|
|
|
|
2012-11-21 09:01:49 +00:00
|
|
|
prepare_opt
|
|
|
|
|
|
|
|
if [ ! -d $_src -o true ]; then
|
2012-11-28 13:27:12 +00:00
|
|
|
mkdir -p $SRC
|
2014-06-29 18:38:20 +02:00
|
|
|
download LLVM_SOURCE[@] "$_src.tar.gz"
|
|
|
|
download LLVM_CLANG_SOURCE[@] "$_src_clang.tar.gz"
|
2012-11-21 09:01:49 +00:00
|
|
|
|
|
|
|
INFO "Unpacking LLVM-$LLVM_VERSION"
|
|
|
|
tar -C $SRC --transform "s,([^/]*/?)llvm-[^/]*(.*),\1LLVM-$LLVM_VERSION\2,x" \
|
|
|
|
-xf $_src.tar.gz
|
|
|
|
INFO "Unpacking CLANG-$LLVM_VERSION to $_src/tools/clang"
|
2014-07-04 14:04:51 +02:00
|
|
|
# Stupid clang guys renamed 'clang' to 'cfe' for now handle both cases... :(
|
2012-11-21 09:01:49 +00:00
|
|
|
tar -C $_src/tools \
|
2014-07-04 14:04:51 +02:00
|
|
|
--transform "s,([^/]*/?)(clang|cfe)-[^/]*(.*),\1clang\3,x" \
|
2012-11-21 09:01:49 +00:00
|
|
|
-xf $_src_clang.tar.gz
|
|
|
|
|
|
|
|
cd $_src
|
|
|
|
|
|
|
|
# XXX Ugly patching hack!
|
2015-10-03 16:20:03 +02:00
|
|
|
patch -p1 -i "$SCRIPT_DIR/install_deps_patches/llvm.patch"
|
2012-11-21 09:01:49 +00:00
|
|
|
|
|
|
|
cd $CWD
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $_src
|
|
|
|
|
|
|
|
# Always refresh the whole build!
|
|
|
|
if [ -d build ]; then
|
|
|
|
rm -rf build
|
2013-05-25 14:49:29 +00:00
|
|
|
fi
|
2012-11-21 09:01:49 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
|
|
|
cmake_d="$cmake_d -D LLVM_ENABLE_FFI=ON"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
cmake_d="$cmake_d -D LLVM_TARGETS_TO_BUILD=X86"
|
2015-05-14 13:13:13 +10:00
|
|
|
cmake_d="$cmake_d -D LLVM_ENABLE_TERMINFO=OFF"
|
2012-11-21 09:01:49 +00:00
|
|
|
|
2012-11-21 13:13:50 +00:00
|
|
|
if [ -d $_FFI_INCLUDE_DIR ]; then
|
|
|
|
cmake_d="$cmake_d -D FFI_INCLUDE_DIR=$_FFI_INCLUDE_DIR"
|
|
|
|
fi
|
|
|
|
|
2012-11-21 09:01:49 +00:00
|
|
|
cmake $cmake_d ..
|
|
|
|
|
|
|
|
make -j$THREADS && make install
|
|
|
|
make clean
|
|
|
|
|
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
_create_inst_shortcut
|
2012-11-21 09:01:49 +00:00
|
|
|
else
|
|
|
|
ERROR "LLVM-$LLVM_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
magic_compile_set llvm-$LLVM_VERSION $llvm_magic
|
|
|
|
|
|
|
|
cd $CWD
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "Done compiling LLVM-$LLVM_VERSION (CLANG included)!"
|
2012-11-21 09:01:49 +00:00
|
|
|
else
|
|
|
|
INFO "Own LLVM-$LLVM_VERSION (CLANG included) is up to date, nothing to do!"
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-llvm option."
|
2012-11-21 09:01:49 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Build OSL ####
|
|
|
|
_init_osl() {
|
|
|
|
_src=$SRC/OpenShadingLanguage-$OSL_VERSION
|
2013-12-11 17:50:26 +01:00
|
|
|
_git=true
|
2013-05-25 14:49:29 +00:00
|
|
|
_inst=$INST/osl-$OSL_VERSION
|
|
|
|
_inst_shortcut=$INST/osl
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_OSL() {
|
|
|
|
_init_osl
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
2012-11-16 12:42:01 +00:00
|
|
|
compile_OSL() {
|
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
2015-02-03 19:56:28 +01:00
|
|
|
osl_magic=17
|
2013-05-25 14:49:29 +00:00
|
|
|
_init_osl
|
2012-11-16 12:42:01 +00:00
|
|
|
|
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check osl-$OSL_VERSION $osl_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$OSL_FORCE_REBUILD" = true ]; then
|
2015-02-03 19:56:28 +01:00
|
|
|
#~ rm -Rf $_src # XXX Radical, but not easy to change remote repo fully automatically
|
2015-10-03 16:20:03 +02:00
|
|
|
clean_OSL
|
|
|
|
fi
|
2012-11-16 12:42:01 +00:00
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_inst ]; then
|
2012-11-16 12:42:01 +00:00
|
|
|
INFO "Building OpenShadingLanguage-$OSL_VERSION"
|
|
|
|
|
|
|
|
prepare_opt
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_src ]; then
|
2012-11-28 13:27:12 +00:00
|
|
|
mkdir -p $SRC
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSL_USE_REPO" = true ]; then
|
2015-02-03 19:56:28 +01:00
|
|
|
git clone ${OSL_SOURCE_REPO[0]} $_src
|
|
|
|
else
|
|
|
|
download OSL_SOURCE[@] "$_src.tar.gz"
|
|
|
|
INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
|
|
|
|
tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
|
|
|
|
-xf $_src.tar.gz
|
|
|
|
fi
|
2012-11-16 12:42:01 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
cd $_src
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSL_USE_REPO" = true ]; then
|
2015-02-03 19:56:28 +01:00
|
|
|
git remote set-url origin ${OSL_SOURCE_REPO[0]}
|
|
|
|
# XXX For now, always update from latest repo...
|
|
|
|
git pull --no-edit -X theirs origin $OSL_SOURCE_REPO_BRANCH
|
|
|
|
# Stick to same rev as windows' libs...
|
|
|
|
git checkout $OSL_SOURCE_REPO_UID
|
|
|
|
git reset --hard
|
2015-10-03 16:20:03 +02:00
|
|
|
|
|
|
|
# XXX Ugly patching hack!
|
|
|
|
patch -p1 -i "$SCRIPT_DIR/install_deps_patches/osl.patch"
|
2015-02-03 19:56:28 +01:00
|
|
|
fi
|
2013-12-08 18:25:37 +01:00
|
|
|
|
2012-11-16 12:42:01 +00:00
|
|
|
# Always refresh the whole build!
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ -d build ]; then
|
|
|
|
rm -rf build
|
|
|
|
fi
|
|
|
|
mkdir build
|
2012-11-16 12:42:01 +00:00
|
|
|
cd build
|
|
|
|
|
2012-11-18 17:27:29 +00:00
|
|
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
|
|
|
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
|
2012-12-11 08:13:56 +00:00
|
|
|
cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
|
2014-02-04 16:51:41 +01:00
|
|
|
cmake_d="$cmake_d -D BUILDSTATIC=OFF"
|
2012-11-16 12:42:01 +00:00
|
|
|
|
2015-02-03 19:56:28 +01:00
|
|
|
#~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
|
2014-05-03 12:44:44 +02:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$_with_built_openexr" = true ]; then
|
2014-07-25 12:43:05 +02:00
|
|
|
INFO "ILMBASE_HOME=$INST/openexr"
|
2013-05-24 14:31:57 +00:00
|
|
|
cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
|
2015-02-03 19:56:28 +01:00
|
|
|
# XXX Temp workaround... sigh, ILMBase really messed the things up by defining their custom names ON by default :(
|
|
|
|
cmake_d="$cmake_d -D ILMBASE_CUSTOM=ON"
|
|
|
|
cmake_d="$cmake_d -D ILMBASE_CUSTOM_LIBRARIES='Half;Iex;Imath;IlmThread'"
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 12:42:01 +00:00
|
|
|
if [ -d $INST/boost ]; then
|
2012-11-19 10:45:03 +00:00
|
|
|
cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost -D Boost_NO_SYSTEM_PATHS=ON"
|
2012-11-16 12:42:01 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d $INST/oiio ]; then
|
|
|
|
cmake_d="$cmake_d -D OPENIMAGEIOHOME=$INST/oiio"
|
|
|
|
fi
|
|
|
|
|
2012-11-18 17:27:29 +00:00
|
|
|
if [ ! -z $LLVM_VERSION_FOUND ]; then
|
|
|
|
cmake_d="$cmake_d -D LLVM_VERSION=$LLVM_VERSION_FOUND"
|
2012-11-21 09:01:49 +00:00
|
|
|
if [ -d $INST/llvm ]; then
|
2015-03-05 17:45:21 +11:00
|
|
|
cmake_d="$cmake_d -D LLVM_ROOT_DIR=$INST/llvm"
|
2012-11-21 09:01:49 +00:00
|
|
|
cmake_d="$cmake_d -D LLVM_STATIC=ON"
|
|
|
|
fi
|
2012-11-18 17:27:29 +00:00
|
|
|
fi
|
|
|
|
|
2015-10-03 16:20:03 +02:00
|
|
|
#~ cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
|
|
|
#~ cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=ON"
|
|
|
|
|
2013-12-08 18:25:37 +01:00
|
|
|
cmake $cmake_d ..
|
2012-11-16 12:42:01 +00:00
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
make -j$THREADS && make install
|
2012-11-16 12:42:01 +00:00
|
|
|
make clean
|
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
_create_inst_shortcut
|
2012-11-17 12:10:35 +00:00
|
|
|
else
|
|
|
|
ERROR "OpenShadingLanguage-$OSL_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
2012-11-17 11:42:37 +00:00
|
|
|
fi
|
2012-11-16 12:42:01 +00:00
|
|
|
|
|
|
|
magic_compile_set osl-$OSL_VERSION $osl_magic
|
|
|
|
|
|
|
|
cd $CWD
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "Done compiling OpenShadingLanguage-$OSL_VERSION!"
|
2012-11-16 12:42:01 +00:00
|
|
|
else
|
|
|
|
INFO "Own OpenShadingLanguage-$OSL_VERSION is up to date, nothing to do!"
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-osl option."
|
2012-11-16 12:42:01 +00:00
|
|
|
fi
|
2013-12-11 17:50:26 +01:00
|
|
|
|
|
|
|
run_ldconfig "osl"
|
2012-11-16 12:42:01 +00:00
|
|
|
}
|
|
|
|
|
2015-08-08 14:12:02 +02:00
|
|
|
#### Build OSD ####
|
|
|
|
_init_osd() {
|
|
|
|
_src=$SRC/OpenSubdiv-$OSD_VERSION
|
|
|
|
_git=true
|
|
|
|
_inst=$INST/osd-$OSD_VERSION
|
|
|
|
_inst_shortcut=$INST/osd
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_OSD() {
|
|
|
|
_init_osd
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
|
|
|
compile_OSD() {
|
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
|
|
|
osd_magic=0
|
|
|
|
_init_osd
|
|
|
|
|
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check osd-$OSD_VERSION $osd_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$OSD_FORCE_REBUILD" = true ]; then
|
2015-08-08 14:12:02 +02:00
|
|
|
clean_OSD
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d $_inst ]; then
|
|
|
|
INFO "Building OpenSubdiv-$OSD_VERSION"
|
|
|
|
|
|
|
|
prepare_opt
|
|
|
|
|
|
|
|
if [ ! -d $_src ]; then
|
|
|
|
mkdir -p $SRC
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSD_USE_REPO" = true ]; then
|
2015-08-08 14:12:02 +02:00
|
|
|
git clone ${OSD_SOURCE_REPO[0]} $_src
|
|
|
|
else
|
|
|
|
download OSD_SOURCE[@] "$_src.tar.gz"
|
|
|
|
INFO "Unpacking OpenSubdiv-$OSD_VERSION"
|
|
|
|
tar -C $SRC --transform "s,(.*/?)OpenSubdiv-[^/]*(.*),\1OpenSubdiv-$OSD_VERSION\2,x" \
|
|
|
|
-xf $_src.tar.gz
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $_src
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSD_USE_REPO" = true ]; then
|
2015-08-08 14:12:02 +02:00
|
|
|
git remote set-url origin ${OSD_SOURCE_REPO[0]}
|
|
|
|
# XXX For now, always update from latest repo...
|
|
|
|
git pull --no-edit -X theirs origin $OSD_SOURCE_REPO_BRANCH
|
|
|
|
# Stick to same rev as windows' libs...
|
|
|
|
git checkout $OSD_SOURCE_REPO_UID
|
|
|
|
git reset --hard
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Always refresh the whole build!
|
|
|
|
if [ -d build ]; then
|
|
|
|
rm -rf build
|
|
|
|
fi
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
|
|
|
# ptex is only needed when nicholas bishop is ready
|
|
|
|
cmake_d="$cmake_d -D NO_PTEX=1"
|
|
|
|
cmake_d="$cmake_d -D NO_CLEW=1"
|
|
|
|
# maya plugin, docs, tutorials, regression tests and examples are not needed
|
|
|
|
cmake_d="$cmake_d -D NO_MAYA=1 -D NO_DOC=1 -D NO_TUTORIALS=1 -D NO_REGRESSION=1 -DNO_EXAMPLES=1"
|
|
|
|
|
|
|
|
cmake $cmake_d ..
|
|
|
|
|
|
|
|
make -j$THREADS && make install
|
|
|
|
make clean
|
|
|
|
|
|
|
|
if [ -d $_inst ]; then
|
|
|
|
_create_inst_shortcut
|
|
|
|
else
|
|
|
|
ERROR "OpenSubdiv-$OSD_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
magic_compile_set osd-$OSD_VERSION $osd_magic
|
|
|
|
|
|
|
|
cd $CWD
|
|
|
|
INFO "Done compiling OpenSubdiv-$OSD_VERSION!"
|
|
|
|
else
|
|
|
|
INFO "Own OpenSubdiv-$OSD_VERSION is up to date, nothing to do!"
|
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-osd option."
|
|
|
|
fi
|
|
|
|
|
|
|
|
run_ldconfig "osd"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Build OpenCOLLADA ####
|
|
|
|
_init_opencollada() {
|
|
|
|
_src=$SRC/OpenCOLLADA-$OPENCOLLADA_VERSION
|
2013-12-11 17:50:26 +01:00
|
|
|
_git=true
|
2013-05-25 14:49:29 +00:00
|
|
|
_inst=$INST/opencollada-$OPENCOLLADA_VERSION
|
|
|
|
_inst_shortcut=$INST/opencollada
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_OpenCOLLADA() {
|
|
|
|
_init_opencollada
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
compile_OpenCOLLADA() {
|
|
|
|
# To be changed each time we make edits that would modify the compiled results!
|
2015-05-01 21:18:08 +02:00
|
|
|
opencollada_magic=9
|
2013-05-25 14:49:29 +00:00
|
|
|
_init_opencollada
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check opencollada-$OPENCOLLADA_VERSION $opencollada_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$OPENCOLLADA_FORCE_REBUILD" = true ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_OpenCOLLADA
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d $_inst ]; then
|
|
|
|
INFO "Building OpenCOLLADA-$OPENCOLLADA_VERSION"
|
|
|
|
|
|
|
|
prepare_opt
|
|
|
|
|
|
|
|
if [ ! -d $_src ]; then
|
|
|
|
mkdir -p $SRC
|
|
|
|
git clone $OPENCOLLADA_SOURCE $_src
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $_src
|
|
|
|
|
|
|
|
# XXX For now, always update from latest repo...
|
2015-11-23 15:42:46 +01:00
|
|
|
git pull origin $OPENCOLLADA_REPO_BRANCH
|
2013-03-23 17:28:24 +00:00
|
|
|
|
2013-03-28 20:24:36 +00:00
|
|
|
# Stick to same rev as windows' libs...
|
2013-08-10 11:06:46 +00:00
|
|
|
git checkout $OPENCOLLADA_REPO_UID
|
2013-03-23 17:28:24 +00:00
|
|
|
git reset --hard
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
|
|
|
# Always refresh the whole build!
|
|
|
|
if [ -d build ]; then
|
|
|
|
rm -rf build
|
|
|
|
fi
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
|
|
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
|
|
|
cmake_d="$cmake_d -D USE_EXPAT=OFF"
|
|
|
|
cmake_d="$cmake_d -D USE_LIBXML=ON"
|
2013-12-11 17:50:26 +01:00
|
|
|
# XXX Does not work!
|
2014-02-04 16:51:41 +01:00
|
|
|
# cmake_d="$cmake_d -D USE_STATIC=OFF"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
cmake_d="$cmake_d -D USE_STATIC=ON"
|
|
|
|
|
|
|
|
cmake $cmake_d ../
|
|
|
|
|
|
|
|
make -j$THREADS && make install
|
|
|
|
make clean
|
|
|
|
|
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
_create_inst_shortcut
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
else
|
|
|
|
ERROR "OpenCOLLADA-$OPENCOLLADA_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
magic_compile_set opencollada-$OPENCOLLADA_VERSION $opencollada_magic
|
|
|
|
|
|
|
|
cd $CWD
|
|
|
|
INFO "Done compiling OpenCOLLADA-$OPENCOLLADA_VERSION!"
|
|
|
|
else
|
|
|
|
INFO "Own OpenCOLLADA-$OPENCOLLADA_VERSION is up to date, nothing to do!"
|
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-opencollada option."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Build FFMPEG ####
|
|
|
|
_init_ffmpeg() {
|
|
|
|
_src=$SRC/ffmpeg-$FFMPEG_VERSION
|
|
|
|
_inst=$INST/ffmpeg-$FFMPEG_VERSION
|
|
|
|
_inst_shortcut=$INST/ffmpeg
|
|
|
|
}
|
|
|
|
|
|
|
|
clean_FFmpeg() {
|
|
|
|
_init_ffmpeg
|
|
|
|
_clean
|
|
|
|
}
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
compile_FFmpeg() {
|
2012-11-15 17:31:18 +00:00
|
|
|
# To be changed each time we make edits that would modify the compiled result!
|
2012-11-19 19:11:01 +00:00
|
|
|
ffmpeg_magic=3
|
2013-05-25 14:49:29 +00:00
|
|
|
_init_ffmpeg
|
2012-11-16 17:14:01 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# Clean install if needed!
|
|
|
|
magic_compile_check ffmpeg-$FFMPEG_VERSION $ffmpeg_magic
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 1 -o "$FFMPEG_FORCE_REBUILD" = true ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_FFmpeg
|
2012-11-15 17:31:18 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_inst ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
INFO "Building ffmpeg-$FFMPEG_VERSION"
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
prepare_opt
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ ! -d $_src ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
INFO "Downloading ffmpeg-$FFMPEG_VERSION"
|
2012-11-28 13:27:12 +00:00
|
|
|
mkdir -p $SRC
|
2014-06-29 18:38:20 +02:00
|
|
|
download FFMPEG_SOURCE[@] "$_src.tar.bz2"
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
INFO "Unpacking ffmpeg-$FFMPEG_VERSION"
|
2012-11-16 17:14:01 +00:00
|
|
|
tar -C $SRC -xf $_src.tar.bz2
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
cd $_src
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
extra=""
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$VORBIS_USE" = true ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
extra="$extra --enable-libvorbis"
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$THEORA_USE" = true ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
extra="$extra --enable-libtheora"
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$XVID_USE" = true ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
extra="$extra --enable-libxvid"
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$X264_USE" = true ]; then
|
2012-11-12 19:39:09 +00:00
|
|
|
extra="$extra --enable-libx264"
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$VPX_USE" = true ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
extra="$extra --enable-libvpx"
|
2012-11-13 09:29:22 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$MP3LAME_USE" = true ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
extra="$extra --enable-libmp3lame"
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENJPEG_USE" = true ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
extra="$extra --enable-libopenjpeg"
|
2012-11-13 09:29:22 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-19 19:11:01 +00:00
|
|
|
./configure --cc="gcc -Wl,--as-needed" \
|
|
|
|
--extra-ldflags="-pthread -static-libgcc" \
|
|
|
|
--prefix=$_inst --enable-static \
|
|
|
|
--disable-ffplay --disable-ffserver --disable-doc \
|
|
|
|
--enable-gray \
|
|
|
|
--enable-avfilter --disable-vdpau \
|
2012-11-15 17:31:18 +00:00
|
|
|
--disable-bzlib --disable-libgsm --disable-libspeex \
|
|
|
|
--enable-pthreads --enable-zlib --enable-stripping --enable-runtime-cpudetect \
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--disable-vaapi --disable-libfaac --disable-nonfree --enable-gpl \
|
2014-04-23 11:06:58 +02:00
|
|
|
--disable-postproc --disable-librtmp --disable-libopencore-amrnb \
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
--disable-libopencore-amrwb --disable-libdc1394 --disable-version3 --disable-outdev=sdl \
|
2014-04-23 11:06:58 +02:00
|
|
|
--disable-outdev=xv \
|
2012-11-12 19:39:09 +00:00
|
|
|
--disable-outdev=alsa --disable-indev=sdl --disable-indev=alsa --disable-indev=jack \
|
|
|
|
--disable-indev=lavfi $extra
|
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
make -j$THREADS && make install
|
2012-11-12 19:39:09 +00:00
|
|
|
make clean
|
|
|
|
|
2012-11-17 11:42:37 +00:00
|
|
|
if [ -d $_inst ]; then
|
2013-05-25 14:49:29 +00:00
|
|
|
_create_inst_shortcut
|
2012-11-17 12:10:35 +00:00
|
|
|
else
|
|
|
|
ERROR "FFmpeg-$FFMPEG_VERSION failed to compile, exiting"
|
|
|
|
exit 1
|
2012-11-17 11:42:37 +00:00
|
|
|
fi
|
2012-11-15 17:31:18 +00:00
|
|
|
|
|
|
|
magic_compile_set ffmpeg-$FFMPEG_VERSION $ffmpeg_magic
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
cd $CWD
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "Done compiling ffmpeg-$FFMPEG_VERSION!"
|
2012-11-15 17:31:18 +00:00
|
|
|
else
|
|
|
|
INFO "Own ffmpeg-$FFMPEG_VERSION is up to date, nothing to do!"
|
2012-12-01 18:07:45 +00:00
|
|
|
INFO "If you want to force rebuild of this lib, use the --force-ffmpeg option."
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Install on DEB-like ####
|
2012-11-18 20:31:58 +00:00
|
|
|
get_package_version_DEB() {
|
|
|
|
dpkg-query -W -f '${Version}' $1 | sed -r 's/.*:\s*([0-9]+:)(([0-9]+\.?)+).*/\2/'
|
2012-11-12 19:39:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
check_package_DEB() {
|
2013-04-05 13:34:32 +00:00
|
|
|
r=`apt-cache show $1 | grep -c 'Package:'`
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
if [ $r -ge 1 ]; then
|
|
|
|
return 0
|
|
|
|
else
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2014-02-04 16:40:15 +01:00
|
|
|
check_package_installed_DEB() {
|
2014-08-18 15:06:37 +02:00
|
|
|
r=`dpkg-query -W -f='${Status}' $1 | grep -c "install ok"`
|
2014-02-04 16:40:15 +01:00
|
|
|
|
|
|
|
if [ $r -ge 1 ]; then
|
|
|
|
return 0
|
|
|
|
else
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
check_package_version_match_DEB() {
|
2012-11-17 17:58:15 +00:00
|
|
|
v=`apt-cache policy $1 | grep 'Candidate:' | sed -r 's/.*:\s*([0-9]+:)(([0-9]+\.?)+).*/\2/'`
|
2012-11-15 17:31:18 +00:00
|
|
|
|
|
|
|
if [ -z "$v" ]; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
version_match $v $2
|
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
|
|
|
check_package_version_ge_DEB() {
|
2012-11-17 17:58:15 +00:00
|
|
|
v=`apt-cache policy $1 | grep 'Candidate:' | sed -r 's/.*:\s*([0-9]+:)?(([0-9]+\.?)+).*/\2/'`
|
2012-11-15 17:31:18 +00:00
|
|
|
|
|
|
|
if [ -z "$v" ]; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
version_ge $v $2
|
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
2015-11-17 20:38:01 +01:00
|
|
|
check_package_version_ge_lt_DEB() {
|
|
|
|
v=`apt-cache policy $1 | grep 'Candidate:' | sed -r 's/.*:\s*([0-9]+:)?(([0-9]+\.?)+).*/\2/'`
|
|
|
|
|
|
|
|
if [ -z "$v" ]; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
version_ge_lt $v $2 $3
|
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
2012-12-03 17:22:52 +00:00
|
|
|
install_packages_DEB() {
|
2014-04-04 22:36:28 +02:00
|
|
|
if [ ! $SUDO ]; then
|
|
|
|
WARNING "--no-sudo enabled, impossible to run apt-get install for $@, you'll have to do it yourself..."
|
|
|
|
else
|
|
|
|
$SUDO apt-get install -y --force-yes $@
|
|
|
|
if [ $? -ge 1 ]; then
|
|
|
|
ERROR "apt-get failed to install requested packages, exiting."
|
|
|
|
exit 1
|
|
|
|
fi
|
2012-12-03 17:22:52 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
install_DEB() {
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2012-11-15 17:31:18 +00:00
|
|
|
INFO "Installing dependencies for DEB-based distribution"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$COMMON_INFO"`"
|
|
|
|
PRINT ""
|
2012-11-12 19:39:09 +00:00
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
read -p "Do you want to continue (Y/n)?"
|
|
|
|
[ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit
|
|
|
|
|
2012-11-28 19:37:37 +00:00
|
|
|
if [ ! -z "`cat /etc/debian_version | grep ^6`" ]; then
|
|
|
|
if [ -z "`cat /etc/apt/sources.list | grep backports.debian.org`" ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Looks like you're using Debian Squeeze which does have broken CMake"
|
|
|
|
PRINT "It is highly recommended to install cmake from backports, otherwise"
|
|
|
|
PRINT "compilation of some libraries could fail"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "You could install newer CMake from debian-backports repository"
|
|
|
|
PRINT "Add this this line to your /etc/apt/sources.lixt:"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "deb http://backports.debian.org/debian-backports squeeze-backports main"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "and then run:"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "sudo apt-get update && sudo apt-get install cmake=2.8.7-4~bpo60+1 sudo apt-get install cmake=2.8.7-4~bpo60+1"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "(you could also add this reporisotry using GUI like synaptic)"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "Hit Enter to continue running the script, or hit Ctrl-C to abort the script"
|
2012-11-28 19:37:37 +00:00
|
|
|
|
|
|
|
read
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2012-11-28 19:37:37 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-04-04 22:36:28 +02:00
|
|
|
if [ ! $SUDO ]; then
|
|
|
|
WARNING "--no-sudo enabled, impossible to run apt-get update, you'll have to do it yourself..."
|
|
|
|
else
|
|
|
|
$SUDO apt-get update
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
# These libs should always be available in debian/ubuntu official repository...
|
|
|
|
OPENJPEG_DEV="libopenjpeg-dev"
|
|
|
|
VORBIS_DEV="libvorbis-dev"
|
2013-09-27 13:56:16 +00:00
|
|
|
OGG_DEV="libogg-dev"
|
2012-11-15 17:31:18 +00:00
|
|
|
THEORA_DEV="libtheora-dev"
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
_packages="gawk cmake cmake-curses-gui scons build-essential libjpeg-dev libpng-dev \
|
2015-08-09 15:58:53 +02:00
|
|
|
libfreetype6-dev libx11-dev \
|
|
|
|
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
|
|
|
|
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV \
|
2014-10-07 23:14:43 +02:00
|
|
|
libopenal-dev libglew-dev libglewmx-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
|
2015-08-09 15:58:53 +02:00
|
|
|
libsdl1.2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
OPENJPEG_USE=true
|
|
|
|
VORBIS_USE=true
|
2013-09-27 13:56:16 +00:00
|
|
|
OGG_USE=true
|
2012-11-15 17:31:18 +00:00
|
|
|
THEORA_USE=true
|
|
|
|
|
2014-02-07 15:21:19 +01:00
|
|
|
PRINT "$LIBYAML_CPP_VER"
|
2013-12-14 15:50:13 +01:00
|
|
|
# Some not-so-old distro (ubuntu 12.4) do not have it, do not fail in this case, just warn.
|
|
|
|
YAMLCPP_DEV="libyaml-cpp-dev"
|
|
|
|
check_package_DEB $YAMLCPP_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
2014-02-07 15:21:19 +01:00
|
|
|
# Another Ubuntu hack - in 14.4, ocio uses (old) 0.3, while default is now 0.5... grrrrr.
|
|
|
|
if $LIBYAML_CPP_VER_DEFINED; then
|
|
|
|
YAMLCPP_VER_DEV="libyaml-cpp$LIBYAML_CPP_VER-dev"
|
|
|
|
check_package_DEB $YAMLCPP_VER_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
YAMLCPP_DEV=$YAMLCPP_VER_DEV
|
|
|
|
else
|
|
|
|
PRINT ""
|
|
|
|
WARNING "libyaml-cpp$LIBYAML_CPP_VER-dev not found!"
|
|
|
|
PRINT ""
|
|
|
|
fi
|
|
|
|
fi
|
2013-12-14 15:50:13 +01:00
|
|
|
_packages="$_packages $YAMLCPP_DEV"
|
|
|
|
else
|
|
|
|
PRINT ""
|
|
|
|
WARNING "libyaml-cpp-dev not found, you may have to install it by hand to get Blender compiling..."
|
|
|
|
PRINT ""
|
|
|
|
fi
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
# Install newest libtiff-dev in debian/ubuntu.
|
2013-04-05 13:34:32 +00:00
|
|
|
TIFF="libtiff"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
check_package_DEB $TIFF
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
_packages="$_packages $TIFF-dev"
|
|
|
|
else
|
2013-04-05 13:34:32 +00:00
|
|
|
TIFF="libtiff5"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
check_package_DEB $TIFF
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
_packages="$_packages $TIFF-dev"
|
2013-04-05 12:37:48 +00:00
|
|
|
else
|
2013-04-05 13:34:32 +00:00
|
|
|
TIFF="libtiff4" # Some old distro, like e.g. ubuntu 10.04 :/
|
2013-04-05 12:37:48 +00:00
|
|
|
check_package_DEB $TIFF
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
_packages="$_packages $TIFF-dev"
|
|
|
|
fi
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-04-05 13:34:32 +00:00
|
|
|
GIT="git"
|
|
|
|
check_package_DEB $GIT
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
_packages="$_packages $GIT"
|
|
|
|
else
|
|
|
|
GIT="git-core" # Some old distro, like e.g. ubuntu 10.04 :/
|
|
|
|
check_package_DEB $GIT
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
_packages="$_packages $GIT"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_ALL" = true ]; then
|
2014-02-04 16:40:15 +01:00
|
|
|
_packages="$_packages libspnav-dev"
|
|
|
|
# Only install jack if jack2 is not already installed!
|
|
|
|
JACK="libjack-dev"
|
|
|
|
JACK2="libjack-jackd2-dev"
|
2014-08-18 15:06:37 +02:00
|
|
|
check_package_installed_DEB $JACK2
|
2014-02-04 16:40:15 +01:00
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
_packages="$_packages $JACK2"
|
|
|
|
else
|
|
|
|
_packages="$_packages $JACK"
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2012-12-05 11:58:38 +00:00
|
|
|
install_packages_DEB $_packages
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2015-11-30 14:40:34 +01:00
|
|
|
PRINT""
|
|
|
|
SNDFILE_DEV="libsndfile1-dev"
|
|
|
|
check_package_DEB $SNDFILE_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_DEB $SNDFILE_DEV
|
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2012-11-15 17:31:18 +00:00
|
|
|
X264_DEV="libx264-dev"
|
2012-11-17 17:58:15 +00:00
|
|
|
check_package_version_ge_DEB $X264_DEV $X264_VERSION_MIN
|
2012-11-12 19:39:09 +00:00
|
|
|
if [ $? -eq 0 ]; then
|
2012-12-03 17:22:52 +00:00
|
|
|
install_packages_DEB $X264_DEV
|
2012-11-15 17:31:18 +00:00
|
|
|
X264_USE=true
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_ALL" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2012-12-05 11:58:38 +00:00
|
|
|
# Grmpf, debian is libxvidcore-dev and ubuntu libxvidcore4-dev!
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
# Note: not since ubuntu 10.04
|
2012-12-05 11:58:38 +00:00
|
|
|
XVID_DEV="libxvidcore-dev"
|
|
|
|
check_package_DEB $XVID_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_DEB $XVID_DEV
|
|
|
|
XVID_USE=true
|
|
|
|
else
|
|
|
|
XVID_DEV="libxvidcore4-dev"
|
|
|
|
check_package_DEB $XVID_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_DEB $XVID_DEV
|
|
|
|
XVID_USE=true
|
|
|
|
fi
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2012-12-05 11:58:38 +00:00
|
|
|
MP3LAME_DEV="libmp3lame-dev"
|
|
|
|
check_package_DEB $MP3LAME_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_DEB $MP3LAME_DEV
|
|
|
|
MP3LAME_USE=true
|
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2012-12-05 11:58:38 +00:00
|
|
|
VPX_DEV="libvpx-dev"
|
|
|
|
check_package_version_ge_DEB $VPX_DEV $VPX_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_DEB $VPX_DEV
|
|
|
|
VPX_USE=true
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_python=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$PYTHON_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping Python/NumPy installation, as requested..."
|
|
|
|
elif [ "$PYTHON_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced Python/NumPy building, as requested..."
|
|
|
|
_do_compile_python=true
|
2012-11-12 19:39:09 +00:00
|
|
|
else
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
check_package_DEB python$PYTHON_VERSION_MIN-dev
|
2012-12-03 17:53:01 +00:00
|
|
|
if [ $? -eq 0 ]; then
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
install_packages_DEB python$PYTHON_VERSION_MIN-dev
|
2015-11-23 19:54:25 +01:00
|
|
|
clean_Python
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$NUMPY_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping NumPy installation, as requested..."
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
else
|
2014-04-22 10:08:39 +02:00
|
|
|
check_package_DEB python3-numpy
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
if [ $? -eq 0 ]; then
|
2014-04-22 10:08:39 +02:00
|
|
|
install_packages_DEB python3-numpy
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
else
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Sorry, using python package but no valid numpy package available!" \
|
2015-11-23 19:54:25 +01:00
|
|
|
" Use --build-numpy to force building of both Python and NumPy."
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_python=true
|
2013-09-16 15:22:10 +00:00
|
|
|
fi
|
2015-11-23 19:54:25 +01:00
|
|
|
fi
|
2013-09-16 15:22:10 +00:00
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
if $_do_compile_python; then
|
|
|
|
compile_Python
|
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$NUMPY_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping NumPy installation, as requested..."
|
2013-09-17 11:01:52 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
compile_Numpy
|
2012-12-03 17:53:01 +00:00
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$BOOST_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping Boost installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$BOOST_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced Boost building, as requested..."
|
|
|
|
compile_Boost
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
|
|
|
check_package_version_ge_DEB libboost-dev $BOOST_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_DEB libboost-dev
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-12-03 17:53:01 +00:00
|
|
|
boost_version=$(echo `get_package_version_DEB libboost-dev` | sed -r 's/^([0-9]+\.[0-9]+).*/\1/')
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-12-03 17:53:01 +00:00
|
|
|
check_package_DEB libboost-locale$boost_version-dev
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_DEB libboost-locale$boost_version-dev libboost-filesystem$boost_version-dev \
|
|
|
|
libboost-regex$boost_version-dev libboost-system$boost_version-dev \
|
2015-02-03 19:56:28 +01:00
|
|
|
libboost-thread$boost_version-dev libboost-wave$boost_version-dev
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_Boost
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
|
|
|
compile_Boost
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
else
|
|
|
|
compile_Boost
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OCIO_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenColorIO installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OCIO_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenColorIO building, as requested..."
|
|
|
|
compile_OCIO
|
2012-11-12 19:39:09 +00:00
|
|
|
else
|
2014-07-25 12:52:40 +02:00
|
|
|
# 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_DEB libopencolorio-dev $OCIO_VERSION_MIN
|
|
|
|
#if [ $? -eq 0 ]; then
|
|
|
|
#install_packages_DEB libopencolorio-dev
|
|
|
|
#clean_OCIO
|
|
|
|
#else
|
2012-12-03 17:53:01 +00:00
|
|
|
compile_OCIO
|
2014-07-25 12:52:40 +02:00
|
|
|
#fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENEXR_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping ILMBase/OpenEXR installation, as requested..."
|
|
|
|
elif [ "$OPENEXR_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced ILMBase/OpenEXR building, as requested..."
|
|
|
|
compile_OPENEXR
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
else
|
|
|
|
check_package_version_ge_DEB libopenexr-dev $OPENEXR_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_DEB libopenexr-dev
|
2013-12-08 18:25:37 +01:00
|
|
|
OPENEXR_VERSION=`get_package_version_DEB libopenexr-dev`
|
|
|
|
ILMBASE_VERSION=$OPENEXR_VERSION
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_OPENEXR
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
else
|
|
|
|
compile_OPENEXR
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OIIO_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenImageIO installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OIIO_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenImageIO building, as requested..."
|
|
|
|
compile_OIIO
|
2012-11-12 19:39:09 +00:00
|
|
|
else
|
2015-11-17 20:38:01 +01:00
|
|
|
check_package_version_ge_lt_DEB libopenimageio-dev $OIIO_VERSION_MIN $OIIO_VERSION_MAX
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ $? -eq 0 -a "$_with_built_openexr" = false ]; then
|
2012-12-03 17:53:01 +00:00
|
|
|
install_packages_DEB libopenimageio-dev
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_OIIO
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
|
|
|
compile_OIIO
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-17 11:57:10 +00:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
have_llvm=false
|
|
|
|
_do_compile_llvm=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$LLVM_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$LLVM_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced LLVM building, as requested..."
|
|
|
|
_do_compile_llvm=true
|
2013-09-16 13:02:49 +00:00
|
|
|
else
|
2013-12-12 17:23:31 +01:00
|
|
|
check_package_DEB llvm-$LLVM_VERSION-dev
|
2013-09-16 13:02:49 +00:00
|
|
|
if [ $? -eq 0 ]; then
|
2013-12-12 17:23:31 +01:00
|
|
|
install_packages_DEB llvm-$LLVM_VERSION-dev clang-$LLVM_VERSION
|
2013-09-16 13:02:49 +00:00
|
|
|
have_llvm=true
|
2013-12-12 17:23:31 +01:00
|
|
|
LLVM_VERSION_FOUND=$LLVM_VERSION
|
2013-09-16 13:02:49 +00:00
|
|
|
clean_LLVM
|
2012-11-17 11:57:10 +00:00
|
|
|
else
|
2013-12-12 17:23:31 +01:00
|
|
|
check_package_version_ge_DEB llvm-dev $LLVM_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_DEB llvm-dev clang
|
|
|
|
have_llvm=true
|
|
|
|
LLVM_VERSION_FOUND="" # Using default one, no need to specify it!
|
|
|
|
clean_LLVM
|
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_llvm=true
|
2013-12-12 17:23:31 +01:00
|
|
|
fi
|
2012-11-17 11:23:53 +00:00
|
|
|
fi
|
2013-09-16 13:02:49 +00:00
|
|
|
fi
|
2012-11-17 11:23:53 +00:00
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
if [ "$_do_compile_llvm" = true ]; then
|
|
|
|
install_packages_DEB libffi-dev
|
|
|
|
# LLVM can't find the debian ffi header dir
|
|
|
|
_FFI_INCLUDE_DIR=`dpkg -L libffi-dev | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'`
|
|
|
|
PRINT ""
|
|
|
|
compile_LLVM
|
|
|
|
have_llvm=true
|
|
|
|
LLVM_VERSION_FOUND=$LLVM_VERSION
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_osl=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSL_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenShadingLanguage installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OSL_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenShadingLanguage building, as requested..."
|
|
|
|
_do_compile_osl=true
|
2013-09-16 13:02:49 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
# No package currently!
|
|
|
|
_do_compile_osl=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_osl" = true ]; then
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$have_llvm" = true ]; then
|
2013-09-16 13:02:49 +00:00
|
|
|
install_packages_DEB flex bison libtbb-dev
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-09-16 13:02:49 +00:00
|
|
|
compile_OSL
|
2013-12-14 15:50:13 +01:00
|
|
|
else
|
|
|
|
WARNING "No LLVM available, cannot build OSL!"
|
2012-11-17 11:57:10 +00:00
|
|
|
fi
|
2012-11-17 11:23:53 +00:00
|
|
|
fi
|
2012-11-16 12:42:01 +00:00
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2015-08-08 14:12:02 +02:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_osd=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSD_SKIP" = true ]; then
|
2015-08-08 14:12:02 +02:00
|
|
|
WARNING "Skipping OpenSubdiv installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OSD_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenSubdiv building, as requested..."
|
|
|
|
_do_compile_osd=true
|
2015-08-08 14:12:02 +02:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
# No package currently!
|
|
|
|
_do_compile_osd=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_osd" = true ]; then
|
2015-11-23 21:03:22 +01:00
|
|
|
install_packages_DEB flex bison libtbb-dev
|
|
|
|
PRINT ""
|
|
|
|
compile_OSD
|
2015-08-08 14:12:02 +02:00
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_OPENCOLLADA" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_collada=false
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENCOLLADA_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenCOLLADA installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OPENCOLLADA_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenCollada building, as requested..."
|
|
|
|
_do_compile_collada=true
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
# No package currently!
|
|
|
|
_do_compile_collada=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_collada" = true ]; then
|
2013-12-12 11:07:04 +01:00
|
|
|
install_packages_DEB libpcre3-dev
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
# Find path to libxml shared lib...
|
|
|
|
_XML2_LIB=`dpkg -L libxml2-dev | grep -e ".*/libxml2.so"`
|
|
|
|
# No package
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
compile_OpenCOLLADA
|
|
|
|
fi
|
|
|
|
fi
|
2012-12-03 17:53:01 +00:00
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$FFMPEG_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping FFMpeg installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$FFMPEG_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced FFMpeg building, as requested..."
|
|
|
|
compile_FFmpeg
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
|
|
|
# XXX Debian features libav packages as ffmpeg, those are not really compatible with blender code currently :/
|
|
|
|
# So for now, always build our own ffmpeg.
|
|
|
|
# check_package_DEB ffmpeg
|
|
|
|
# if [ $? -eq 0 ]; then
|
|
|
|
# install_packages_DEB ffmpeg
|
|
|
|
# ffmpeg_version=`get_package_version_DEB ffmpeg`
|
2013-12-14 15:50:13 +01:00
|
|
|
# PRINT "ffmpeg version: $ffmpeg_version"
|
2012-12-03 17:53:01 +00:00
|
|
|
# if [ ! -z "$ffmpeg_version" ]; then
|
|
|
|
# if dpkg --compare-versions $ffmpeg_version gt 0.7.2; then
|
|
|
|
# install_packages_DEB libavfilter-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libswscale-dev
|
2013-05-25 14:49:29 +00:00
|
|
|
# clean_FFmpeg
|
2012-12-03 17:53:01 +00:00
|
|
|
# else
|
|
|
|
# compile_FFmpeg
|
|
|
|
# fi
|
2012-11-13 10:49:55 +00:00
|
|
|
# fi
|
|
|
|
# fi
|
2012-12-03 17:53:01 +00:00
|
|
|
compile_FFmpeg
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
}
|
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Install on RPM-like ####
|
|
|
|
rpm_flavour() {
|
|
|
|
if [ -f /etc/redhat-release ]; then
|
|
|
|
if [ "`grep '6\.' /etc/redhat-release`" ]; then
|
|
|
|
RPM="RHEL"
|
|
|
|
else
|
|
|
|
RPM="FEDORA"
|
|
|
|
fi
|
|
|
|
elif [ -f /etc/SuSE-release ]; then
|
|
|
|
RPM="SUSE"
|
|
|
|
fi
|
|
|
|
}
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2012-11-18 20:31:58 +00:00
|
|
|
get_package_version_RPM() {
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
rpm_flavour
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
yum info $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/'
|
2015-11-23 20:28:34 +01:00
|
|
|
elif [ "$RPM" = "SUSE" ]; then
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
zypper info $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/'
|
|
|
|
fi
|
2012-11-18 20:31:58 +00:00
|
|
|
}
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
check_package_RPM() {
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
rpm_flavour
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
r=`yum info $1 | grep -c 'Summary'`
|
2015-11-23 20:28:34 +01:00
|
|
|
elif [ "$RPM" = "SUSE" ]; then
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
r=`zypper info $1 | grep -c 'Summary'`
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
|
|
|
|
if [ $r -ge 1 ]; then
|
|
|
|
return 0
|
|
|
|
else
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-11-14 21:57:47 +00:00
|
|
|
check_package_version_match_RPM() {
|
2012-11-21 09:01:49 +00:00
|
|
|
v=`get_package_version_RPM $1`
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ -z "$v" ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
return 1
|
|
|
|
fi
|
2012-11-16 17:14:01 +00:00
|
|
|
|
|
|
|
version_match $v $2
|
|
|
|
return $?
|
2012-11-14 21:57:47 +00:00
|
|
|
}
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-11-14 21:57:47 +00:00
|
|
|
check_package_version_ge_RPM() {
|
2012-11-21 09:01:49 +00:00
|
|
|
v=`get_package_version_RPM $1`
|
2012-11-14 21:57:47 +00:00
|
|
|
|
2012-11-16 17:14:01 +00:00
|
|
|
if [ -z "$v" ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
return 1
|
|
|
|
fi
|
2012-11-16 17:14:01 +00:00
|
|
|
|
|
|
|
version_ge $v $2
|
|
|
|
return $?
|
2012-11-12 19:39:09 +00:00
|
|
|
}
|
|
|
|
|
2015-11-17 20:38:01 +01:00
|
|
|
check_package_version_ge_lt_RPM() {
|
|
|
|
v=`get_package_version_RPM $1`
|
|
|
|
|
|
|
|
if [ -z "$v" ]; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
version_ge_lt $v $2 $3
|
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
2012-12-03 17:22:52 +00:00
|
|
|
install_packages_RPM() {
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
rpm_flavour
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then
|
2014-04-04 22:36:28 +02:00
|
|
|
if [ ! $SUDO ]; then
|
|
|
|
WARNING "--no-sudo enabled, impossible to run yum install for $@, you'll have to do it yourself..."
|
|
|
|
else
|
|
|
|
$SUDO yum install -y $@
|
|
|
|
if [ $? -ge 1 ]; then
|
|
|
|
ERROR "yum failed to install requested packages, exiting."
|
|
|
|
exit 1
|
|
|
|
fi
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
elif [ "$RPM" = "SUSE" ]; then
|
2014-04-04 22:36:28 +02:00
|
|
|
if [ ! $SUDO ]; then
|
|
|
|
WARNING "--no-sudo enabled, impossible to run zypper install for $@, you'll have to do it yourself..."
|
|
|
|
else
|
|
|
|
$SUDO zypper --non-interactive install --auto-agree-with-licenses $@
|
|
|
|
if [ $? -ge 1 ]; then
|
|
|
|
ERROR "zypper failed to install requested packages, exiting."
|
|
|
|
exit 1
|
|
|
|
fi
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
fi
|
2012-12-03 17:22:52 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
install_RPM() {
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2012-11-15 17:31:18 +00:00
|
|
|
INFO "Installing dependencies for RPM-based distribution"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$COMMON_INFO"`"
|
|
|
|
PRINT ""
|
2012-11-12 19:39:09 +00:00
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
read -p "Do you want to continue (Y/n)?"
|
|
|
|
[ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit
|
2012-11-12 19:39:09 +00:00
|
|
|
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
# Enable non-free repositories for all flavours
|
2014-04-04 22:36:28 +02:00
|
|
|
if [ ! $SUDO ]; then
|
|
|
|
WARNING "--no-sudo enabled, impossible to install third party repositories, you'll have to do it yourself..."
|
|
|
|
else
|
|
|
|
rpm_flavour
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$RPM" = "FEDORA" ]; then
|
2014-04-04 22:36:28 +02:00
|
|
|
_fedora_rel="`egrep "[0-9]{1,}" /etc/fedora-release -o`"
|
|
|
|
$SUDO yum -y localinstall --nogpgcheck \
|
|
|
|
http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$_fedora_rel.noarch.rpm \
|
|
|
|
http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$_fedora_rel.noarch.rpm
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2014-04-04 22:36:28 +02:00
|
|
|
$SUDO yum -y update
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2014-04-04 22:36:28 +02:00
|
|
|
# Install cmake now because of difference with RHEL
|
|
|
|
$SUDO yum -y install cmake
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
elif [ "$RPM" = "RHEL" ]; then
|
2014-04-04 22:36:28 +02:00
|
|
|
$SUDO yum -y localinstall --nogpgcheck \
|
|
|
|
http://download.fedoraproject.org/pub/epel/6/$(uname -i)/epel-release-6-8.noarch.rpm \
|
|
|
|
http://download1.rpmfusion.org/free/el/updates/6/$(uname -i)/rpmfusion-free-release-6-1.noarch.rpm \
|
|
|
|
http://download1.rpmfusion.org/nonfree/el/updates/6/$(uname -i)/rpmfusion-nonfree-release-6-1.noarch.rpm
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2014-04-04 22:36:28 +02:00
|
|
|
$SUDO yum -y update
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2014-04-04 22:36:28 +02:00
|
|
|
# Install cmake 2.8 from other repo
|
|
|
|
mkdir -p $SRC
|
|
|
|
if [ -f $SRC/cmake-2.8.8-4.el6.$(uname -m).rpm ]; then
|
|
|
|
PRINT ""
|
|
|
|
INFO "Special cmake already installed"
|
|
|
|
else
|
|
|
|
curl -O ftp://ftp.pbone.net/mirror/atrpms.net/el6-$(uname -i)/atrpms/testing/cmake-2.8.8-4.el6.$(uname -m).rpm
|
|
|
|
mv cmake-2.8.8-4.el6.$(uname -m).rpm $SRC/
|
|
|
|
$SUDO rpm -ihv $SRC/cmake-2.8.8-4.el6.$(uname -m).rpm
|
|
|
|
fi
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
elif [ "$RPM" = "SUSE" ]; then
|
2014-04-04 22:36:28 +02:00
|
|
|
# Install this now to avoid using the version from packman repository...
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_ALL" = true ]; then
|
2014-04-04 22:36:28 +02:00
|
|
|
install_packages_RPM libjack-devel
|
|
|
|
fi
|
2013-03-22 16:26:33 +00:00
|
|
|
|
2014-04-04 22:36:28 +02:00
|
|
|
_suse_rel="`grep VERSION /etc/SuSE-release | gawk '{print $3}'`"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2014-04-04 22:36:28 +02:00
|
|
|
PRINT ""
|
|
|
|
INFO "About to add 'packman' repository from http://packman.inode.at/suse/openSUSE_$_suse_rel/"
|
|
|
|
INFO "This is only needed if you do not already have a packman repository enabled..."
|
|
|
|
read -p "Do you want to add this repo (Y/n)?"
|
|
|
|
if [ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" == "y" ]; then
|
|
|
|
INFO " Installing packman..."
|
|
|
|
$SUDO zypper ar --refresh --name 'Packman Repository' http://ftp.gwdg.de/pub/linux/packman/suse/openSUSE_$_suse_rel/ ftp.gwdg.de-suse
|
|
|
|
INFO " Done."
|
|
|
|
else
|
|
|
|
INFO " Skipping packman installation."
|
|
|
|
fi
|
|
|
|
$SUDO zypper --non-interactive --gpg-auto-import-keys update --auto-agree-with-licenses
|
2013-06-20 19:19:11 +00:00
|
|
|
fi
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# These libs should always be available in fedora/suse official repository...
|
2012-11-18 17:47:26 +00:00
|
|
|
OPENJPEG_DEV="openjpeg-devel"
|
|
|
|
VORBIS_DEV="libvorbis-devel"
|
2013-09-27 13:56:16 +00:00
|
|
|
OGG_DEV="libogg-devel"
|
2012-11-18 17:47:26 +00:00
|
|
|
THEORA_DEV="libtheora-devel"
|
|
|
|
|
2015-08-09 15:58:53 +02:00
|
|
|
_packages="gcc gcc-c++ git make cmake scons libtiff-devel libjpeg-devel\
|
|
|
|
libpng-devel libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \
|
|
|
|
wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \
|
2013-12-12 11:07:04 +01:00
|
|
|
glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \
|
|
|
|
libxml2-devel yaml-cpp-devel tinyxml-devel"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
OPENJPEG_USE=true
|
2012-11-18 17:47:26 +00:00
|
|
|
VORBIS_USE=true
|
2013-09-27 13:56:16 +00:00
|
|
|
OGG_USE=true
|
2012-11-18 17:47:26 +00:00
|
|
|
THEORA_USE=true
|
2012-11-13 09:29:22 +00:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then
|
2013-05-25 09:31:45 +00:00
|
|
|
OPENEXR_DEV="openexr-devel"
|
2012-12-05 11:58:38 +00:00
|
|
|
|
2015-05-28 10:38:48 +02:00
|
|
|
_packages="$_packages freetype-devel libsqlite3x-devel fftw-devel SDL-devel"
|
2012-12-05 11:58:38 +00:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_ALL" = true ]; then
|
2013-03-22 16:26:33 +00:00
|
|
|
_packages="$_packages jack-audio-connection-kit-devel"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
fi
|
2012-11-14 21:57:47 +00:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
install_packages_RPM $_packages
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
X264_DEV="x264-devel"
|
|
|
|
check_package_version_ge_RPM $X264_DEV $X264_VERSION_MIN
|
2012-12-05 11:58:38 +00:00
|
|
|
if [ $? -eq 0 ]; then
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
install_packages_RPM $X264_DEV
|
|
|
|
X264_USE=true
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_ALL" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
XVID_DEV="xvidcore-devel"
|
|
|
|
check_package_RPM $XVID_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM $XVID_DEV
|
|
|
|
XVID_USE=true
|
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
MP3LAME_DEV="lame-devel"
|
|
|
|
check_package_RPM $MP3LAME_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM $MP3LAME_DEV
|
|
|
|
MP3LAME_USE=true
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
elif [ "$RPM" = "SUSE" ]; then
|
2013-05-25 09:31:45 +00:00
|
|
|
OPENEXR_DEV="libopenexr-devel"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
2015-05-28 10:38:48 +02:00
|
|
|
_packages="$_packages cmake freetype2-devel sqlite3-devel fftw3-devel libSDL-devel"
|
2012-11-14 21:57:47 +00:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
install_packages_RPM $_packages
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
X264_DEV="libx264-devel"
|
|
|
|
check_package_version_ge_RPM $X264_DEV $X264_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM $X264_DEV
|
|
|
|
X264_USE=true
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_ALL" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
XVID_DEV="libxvidcore-devel"
|
|
|
|
check_package_RPM $XVID_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM $XVID_DEV
|
|
|
|
XVID_USE=true
|
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
MP3LAME_DEV="libmp3lame-devel"
|
|
|
|
check_package_RPM $MP3LAME_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM $MP3LAME_DEV
|
|
|
|
MP3LAME_USE=true
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-30 14:40:34 +01:00
|
|
|
PRINT""
|
|
|
|
SNDFILE_DEV="libsndfile-devel"
|
|
|
|
check_package_RPM $SNDFILE_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RMP $SNDFILE_DEV
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_ALL" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2012-12-05 11:58:38 +00:00
|
|
|
VPX_DEV="libvpx-devel"
|
|
|
|
check_package_version_ge_RPM $VPX_DEV $VPX_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM $VPX_DEV
|
|
|
|
VPX_USE=true
|
|
|
|
fi
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-03-22 16:26:33 +00:00
|
|
|
install_packages_RPM libspnav-devel
|
2012-11-14 21:57:47 +00:00
|
|
|
fi
|
2013-03-22 16:26:33 +00:00
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_python=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$PYTHON_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping Python installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$PYTHON_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced Python/NumPy building, as requested..."
|
|
|
|
_do_compile_python=true
|
2012-11-12 19:39:09 +00:00
|
|
|
else
|
2012-12-03 17:53:01 +00:00
|
|
|
check_package_version_match_RPM python3-devel $PYTHON_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM python3-devel
|
2015-11-23 19:54:25 +01:00
|
|
|
clean_Python
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$NUMPY_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping NumPy installation, as requested..."
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
else
|
2015-09-22 11:00:35 +02:00
|
|
|
check_package_version_ge_RPM python3-numpy $NUMPY_VERSION_MIN
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM python3-numpy
|
|
|
|
else
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Sorry, using python package but no valid numpy package available!" \
|
2015-11-23 19:54:25 +01:00
|
|
|
" Use --build-numpy to force building of both Python and NumPy."
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_python=true
|
2013-09-16 15:22:10 +00:00
|
|
|
fi
|
2015-11-23 19:54:25 +01:00
|
|
|
fi
|
2013-09-16 15:22:10 +00:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$_do_compile_python" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
compile_Python
|
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$NUMPY_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping NumPy installation, as requested..."
|
2013-09-17 11:01:52 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
compile_Numpy
|
2012-12-03 17:53:01 +00:00
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$BOOST_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping Boost installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$BOOST_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced Boost building, as requested..."
|
|
|
|
compile_Boost
|
2012-11-12 19:39:09 +00:00
|
|
|
else
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
check_package_version_ge_RPM boost-devel $BOOST_VERSION
|
2012-12-03 17:53:01 +00:00
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM boost-devel
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_Boost
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
|
|
|
compile_Boost
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OCIO_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenColorIO installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OCIO_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenColorIO building, as requested..."
|
|
|
|
compile_OCIO
|
2012-11-12 19:39:09 +00:00
|
|
|
else
|
2014-07-25 12:52:40 +02:00
|
|
|
# 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_RPM OpenColorIO-devel $OCIO_VERSION_MIN
|
|
|
|
#if [ $? -eq 0 ]; then
|
|
|
|
#install_packages_RPM OpenColorIO-devel
|
|
|
|
#clean_OCIO
|
|
|
|
#else
|
2012-12-03 17:53:01 +00:00
|
|
|
compile_OCIO
|
2014-07-25 12:52:40 +02:00
|
|
|
#fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENEXR_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping ILMBase/OpenEXR installation, as requested..."
|
|
|
|
elif [ "$OPENEXR_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced ILMBase/OpenEXR building, as requested..."
|
|
|
|
compile_OPENEXR
|
2013-05-25 09:31:45 +00:00
|
|
|
else
|
|
|
|
check_package_version_ge_RPM $OPENEXR_DEV $OPENEXR_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM $OPENEXR_DEV
|
2013-12-08 18:25:37 +01:00
|
|
|
OPENEXR_VERSION=`get_package_version_RPM $OPENEXR_DEV`
|
|
|
|
ILMBASE_VERSION=$OPENEXR_VERSION
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_OPENEXR
|
2013-05-25 09:31:45 +00:00
|
|
|
else
|
|
|
|
compile_OPENEXR
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OIIO_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenImageIO installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OIIO_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenImageIO building, as requested..."
|
|
|
|
compile_OIIO
|
2012-11-12 19:39:09 +00:00
|
|
|
else
|
2015-11-17 20:38:01 +01:00
|
|
|
check_package_version_ge_lt_RPM OpenImageIO-devel $OIIO_VERSION_MIN $OIIO_VERSION_MAX
|
2013-05-25 09:31:45 +00:00
|
|
|
if [ $? -eq 0 -a $_with_built_openexr == false ]; then
|
2012-12-03 17:53:01 +00:00
|
|
|
install_packages_RPM OpenImageIO-devel
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_OIIO
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
|
|
|
compile_OIIO
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-18 20:31:58 +00:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
have_llvm=false
|
|
|
|
_do_compile_llvm=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$LLVM_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$LLVM_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced LLVM building, as requested..."
|
|
|
|
_do_compile_llvm=true
|
2013-09-16 13:02:49 +00:00
|
|
|
else
|
|
|
|
# Problem compiling with LLVM 3.2 so match version 3.1 ...
|
|
|
|
check_package_version_match_RPM llvm $LLVM_VERSION
|
|
|
|
if [ $? -eq 0 ]; then
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$RPM" = "SUSE" ]; then
|
2013-09-16 13:02:49 +00:00
|
|
|
install_packages_RPM llvm-devel llvm-clang-devel
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
2013-09-16 13:02:49 +00:00
|
|
|
install_packages_RPM llvm-devel clang-devel
|
2012-12-03 17:53:01 +00:00
|
|
|
fi
|
2013-09-16 13:02:49 +00:00
|
|
|
have_llvm=true
|
|
|
|
LLVM_VERSION_FOUND=$LLVM_VERSION
|
|
|
|
clean_LLVM
|
|
|
|
else
|
|
|
|
#
|
|
|
|
# Better to compile it than use minimum version from repo...
|
|
|
|
#
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_llvm=true
|
2012-11-18 20:31:58 +00:00
|
|
|
fi
|
2013-09-16 13:02:49 +00:00
|
|
|
fi
|
2012-11-18 20:31:58 +00:00
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
if [ "$_do_compile_llvm" = true ]; then
|
|
|
|
install_packages_RPM libffi-devel
|
|
|
|
# LLVM can't find the fedora ffi header dir...
|
|
|
|
_FFI_INCLUDE_DIR=`rpm -ql libffi-devel | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'`
|
|
|
|
PRINT ""
|
|
|
|
compile_LLVM
|
|
|
|
have_llvm=true
|
|
|
|
LLVM_VERSION_FOUND=$LLVM_VERSION
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_osl=true
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSL_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenShadingLanguage installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OSL_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenShadingLanguage building, as requested..."
|
|
|
|
_do_compile_osl=true
|
2013-09-16 13:02:49 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
# No package currently!
|
|
|
|
_do_compile_osl=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_osl" = true ]; then
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$have_llvm" = true ]; then
|
2015-08-09 15:58:53 +02:00
|
|
|
install_packages_RPM flex bison
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then
|
2013-09-16 13:02:49 +00:00
|
|
|
install_packages_RPM tbb-devel
|
2012-12-03 17:53:01 +00:00
|
|
|
fi
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-09-16 13:02:49 +00:00
|
|
|
compile_OSL
|
2013-12-14 15:50:13 +01:00
|
|
|
else
|
|
|
|
WARNING "No LLVM available, cannot build OSL!"
|
2012-11-18 20:31:58 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2015-08-09 15:58:53 +02:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_osd=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSD_SKIP" = true ]; then
|
2015-08-09 15:58:53 +02:00
|
|
|
WARNING "Skipping OpenSubdiv installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OSD_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenSubdiv building, as requested..."
|
|
|
|
_do_compile_osd=true
|
2015-08-09 15:58:53 +02:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
# No package currently!
|
|
|
|
_do_compile_osd=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_osd" = true ]; then
|
2015-11-23 21:03:22 +01:00
|
|
|
install_packages_RPM flex bison
|
|
|
|
if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then
|
|
|
|
install_packages_RPM tbb-devel
|
2015-08-09 15:58:53 +02:00
|
|
|
fi
|
2015-11-23 21:03:22 +01:00
|
|
|
PRINT ""
|
|
|
|
compile_OSD
|
2015-08-09 15:58:53 +02:00
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_OPENCOLLADA" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_collada=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENCOLLADA_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenCOLLADA installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OPENCOLLADA_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenCollada building, as requested..."
|
|
|
|
_do_compile_collada=true
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
# No package...
|
|
|
|
_do_compile_collada=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_collada" = true ]; then
|
2015-08-09 15:58:53 +02:00
|
|
|
install_packages_RPM pcre-devel
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
# Find path to libxml shared lib...
|
|
|
|
_XML2_LIB=`rpm -ql libxml2-devel | grep -e ".*/libxml2.so"`
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
compile_OpenCOLLADA
|
2012-11-21 09:01:49 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$FFMPEG_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping FFMpeg installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$FFMPEG_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced FFMpeg building, as requested..."
|
|
|
|
compile_FFmpeg
|
2012-12-03 17:53:01 +00:00
|
|
|
else
|
2013-03-22 16:26:33 +00:00
|
|
|
check_package_version_ge_RPM ffmpeg $FFMPEG_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_RPM ffmpeg ffmpeg-devel
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_FFmpeg
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
|
|
|
compile_FFmpeg
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Install on ARCH-like ####
|
2013-03-22 16:26:33 +00:00
|
|
|
get_package_version_ARCH() {
|
|
|
|
pacman -Si $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/'
|
|
|
|
}
|
|
|
|
|
|
|
|
check_package_ARCH() {
|
|
|
|
r=`pacman -Si $1 | grep -c 'Description'`
|
|
|
|
|
|
|
|
if [ $r -ge 1 ]; then
|
|
|
|
return 0
|
|
|
|
else
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
check_package_version_match_ARCH() {
|
|
|
|
v=`get_package_version_ARCH $1`
|
|
|
|
|
|
|
|
if [ -z "$v" ]; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
version_match $v $2
|
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
|
|
|
check_package_version_ge_ARCH() {
|
|
|
|
v=`get_package_version_ARCH $1`
|
|
|
|
|
|
|
|
if [ -z "$v" ]; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
version_ge $v $2
|
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
2015-11-17 20:38:01 +01:00
|
|
|
check_package_version_ge_lt_ARCH() {
|
|
|
|
v=`get_package_version_ARCH $1`
|
|
|
|
|
|
|
|
if [ -z "$v" ]; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
version_ge_lt $v $2 $3
|
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
2013-03-22 16:26:33 +00:00
|
|
|
install_packages_ARCH() {
|
2014-04-04 22:36:28 +02:00
|
|
|
if [ ! $SUDO ]; then
|
|
|
|
WARNING "--no-sudo enabled, impossible to run pacman for $@, you'll have to do it yourself..."
|
|
|
|
else
|
|
|
|
$SUDO pacman -S --needed --noconfirm $@
|
|
|
|
if [ $? -ge 1 ]; then
|
|
|
|
ERROR "pacman failed to install requested packages, exiting."
|
|
|
|
exit 1
|
|
|
|
fi
|
2012-12-03 17:53:01 +00:00
|
|
|
fi
|
2012-11-13 09:29:22 +00:00
|
|
|
}
|
|
|
|
|
2013-03-22 16:26:33 +00:00
|
|
|
install_ARCH() {
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-03-22 16:26:33 +00:00
|
|
|
INFO "Installing dependencies for ARCH-based distribution"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$COMMON_INFO"`"
|
|
|
|
PRINT ""
|
2013-03-22 16:26:33 +00:00
|
|
|
|
|
|
|
read -p "Do you want to continue (Y/n)?"
|
|
|
|
[ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit
|
|
|
|
|
|
|
|
# Check for sudo...
|
2014-04-04 22:36:28 +02:00
|
|
|
if [ $SUDO ]; then
|
|
|
|
if [ ! -x "/usr/bin/sudo" ]; then
|
|
|
|
PRINT ""
|
|
|
|
ERROR "This script requires sudo but it is not installed."
|
|
|
|
PRINT "Please setup sudo according to:"
|
|
|
|
PRINT "https://wiki.archlinux.org/index.php/Sudo"
|
|
|
|
PRINT "and try again."
|
|
|
|
PRINT ""
|
|
|
|
exit
|
|
|
|
fi
|
2013-03-22 16:26:33 +00:00
|
|
|
fi
|
|
|
|
|
2014-04-04 22:36:28 +02:00
|
|
|
if [ ! $SUDO ]; then
|
|
|
|
WARNING "--no-sudo enabled, impossible to run pacman -Sy, you'll have to do it yourself..."
|
|
|
|
else
|
|
|
|
$SUDO pacman -Sy
|
|
|
|
fi
|
2013-03-22 16:26:33 +00:00
|
|
|
|
|
|
|
# These libs should always be available in arch official repository...
|
|
|
|
OPENJPEG_DEV="openjpeg"
|
|
|
|
VORBIS_DEV="libvorbis"
|
2013-09-27 13:56:16 +00:00
|
|
|
OGG_DEV="libogg"
|
2013-03-22 16:26:33 +00:00
|
|
|
THEORA_DEV="libtheora"
|
|
|
|
|
2015-08-09 15:58:53 +02:00
|
|
|
_packages="base-devel git scons cmake \
|
|
|
|
libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \
|
2013-12-12 11:07:04 +01:00
|
|
|
$OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl fftw \
|
|
|
|
libxml2 yaml-cpp tinyxml"
|
2013-03-22 16:26:33 +00:00
|
|
|
|
|
|
|
OPENJPEG_USE=true
|
|
|
|
VORBIS_USE=true
|
2013-09-27 13:56:16 +00:00
|
|
|
OGG_USE=true
|
2013-03-22 16:26:33 +00:00
|
|
|
THEORA_USE=true
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_ALL" = true ]; then
|
2013-03-22 16:26:33 +00:00
|
|
|
# No libspacenav in official arch repos...
|
|
|
|
_packages="$_packages jack"
|
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-03-22 16:26:33 +00:00
|
|
|
install_packages_ARCH $_packages
|
|
|
|
|
2015-11-30 14:40:34 +01:00
|
|
|
PRINT""
|
|
|
|
SNDFILE_DEV="libsndfile"
|
|
|
|
check_package_ARCH $SNDFILE_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH $SNDFILE_DEV
|
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-03-22 16:26:33 +00:00
|
|
|
X264_DEV="x264"
|
|
|
|
check_package_version_ge_ARCH $X264_DEV $X264_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH $X264_DEV
|
|
|
|
X264_USE=true
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_ALL" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-03-22 16:26:33 +00:00
|
|
|
XVID_DEV="xvidcore"
|
|
|
|
check_package_ARCH $XVID_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH $XVID_DEV
|
|
|
|
XVID_USE=true
|
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-03-22 16:26:33 +00:00
|
|
|
MP3LAME_DEV="lame"
|
|
|
|
check_package_ARCH $MP3LAME_DEV
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH $MP3LAME_DEV
|
|
|
|
MP3LAME_USE=true
|
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2013-03-22 16:26:33 +00:00
|
|
|
VPX_DEV="libvpx"
|
|
|
|
check_package_version_ge_ARCH $VPX_DEV $VPX_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH $VPX_DEV
|
|
|
|
VPX_USE=true
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_python=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$PYTHON_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping Python installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$PYTHON_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced Python/NumPy building, as requested..."
|
|
|
|
_do_compile_python=true
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
|
|
|
check_package_version_ge_ARCH python $PYTHON_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH python
|
2015-11-23 19:54:25 +01:00
|
|
|
clean_Python
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_NUMPY" = true ]; then
|
|
|
|
if [ "$NUMPY_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping NumPy installation, as requested..."
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
|
|
|
check_package_version_ge_ARCH python-numpy $NUMPY_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH python-numpy
|
2013-09-16 15:22:10 +00:00
|
|
|
else
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Sorry, using python package but no valid numpy package available!" \
|
2015-11-23 19:54:25 +01:00
|
|
|
" Use --build-numpy to force building of both Python and NumPy."
|
2013-03-22 16:26:33 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_python=true
|
2013-09-16 15:22:10 +00:00
|
|
|
fi
|
2015-11-23 19:54:25 +01:00
|
|
|
fi
|
2013-09-16 15:22:10 +00:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$_do_compile_python" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
compile_Python
|
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$NUMPY_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping NumPy installation, as requested..."
|
2013-09-17 11:01:52 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
compile_Numpy
|
2013-03-22 16:26:33 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$BOOST_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping Boost installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$BOOST_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced Boost building, as requested..."
|
|
|
|
compile_Boost
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
|
|
|
check_package_version_ge_ARCH boost $BOOST_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH boost
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_Boost
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
|
|
|
compile_Boost
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_ocio=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OCIO_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenColorIO installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OCIO_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenColorIO building, as requested..."
|
|
|
|
_do_compile_ocio=true
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
2014-07-25 12:52:40 +02:00
|
|
|
# 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
|
|
|
|
#if [ $? -eq 0 ]; then
|
|
|
|
#install_packages_ARCH opencolorio yaml-cpp tinyxml
|
|
|
|
#clean_OCIO
|
|
|
|
#else
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_ocio=true
|
2014-07-25 12:52:40 +02:00
|
|
|
#fi
|
2013-03-22 16:26:33 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
if [ "$_do_compile_ocio" = true ]; then
|
|
|
|
install_packages_ARCH yaml-cpp tinyxml
|
|
|
|
compile_OCIO
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENEXR_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping ILMBase/OpenEXR installation, as requested..."
|
|
|
|
elif [ "$OPENEXR_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced ILMBase/OpenEXR building, as requested..."
|
|
|
|
compile_OPENEXR
|
2013-05-27 13:22:55 +00:00
|
|
|
else
|
|
|
|
check_package_version_ge_ARCH openexr $OPENEXR_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH openexr
|
2013-12-08 18:25:37 +01:00
|
|
|
OPENEXR_VERSION=`get_package_version_ARCH openexr`
|
|
|
|
ILMBASE_VERSION=$OPENEXR_VERSION
|
2013-05-27 13:22:55 +00:00
|
|
|
clean_OPENEXR
|
|
|
|
else
|
|
|
|
compile_OPENEXR
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OIIO_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenImageIO installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OIIO_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenImageIO building, as requested..."
|
|
|
|
compile_OIIO
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
2015-11-17 20:38:01 +01:00
|
|
|
check_package_version_ge_lt_ARCH openimageio $OIIO_VERSION_MIN $OIIO_VERSION_MAX
|
2013-03-22 16:26:33 +00:00
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH openimageio
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_OIIO
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
|
|
|
compile_OIIO
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
have_llvm=false
|
|
|
|
_do_compile_llvm=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$LLVM_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$LLVM_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced LLVM building, as requested..."
|
|
|
|
_do_compile_llvm=true
|
2013-09-16 13:02:49 +00:00
|
|
|
else
|
|
|
|
check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH llvm clang
|
|
|
|
have_llvm=true
|
|
|
|
LLVM_VERSION=`check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN`
|
|
|
|
LLVM_VERSION_FOUND=$LLVM_VERSION
|
|
|
|
clean_LLVM
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_llvm=true
|
2013-09-16 13:02:49 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
if [ "$_do_compile_llvm" = true ]; then
|
|
|
|
install_packages_ARCH libffi
|
|
|
|
# LLVM can't find the arch ffi header dir...
|
|
|
|
_FFI_INCLUDE_DIR=`pacman -Ql libffi | grep -e ".*/ffi.h" | awk '{print $2}' | sed -r 's/(.*)\/ffi.h/\1/'`
|
|
|
|
# LLVM 3.1 needs python2 to build and arch defaults to python3
|
|
|
|
_PYTHON2_BIN="/usr/bin/python2"
|
|
|
|
PRINT ""
|
|
|
|
compile_LLVM
|
|
|
|
have_llvm=true
|
|
|
|
LLVM_VERSION_FOUND=$LLVM_VERSION
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_osl=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSL_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenShadingLanguage installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OSL_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenShadingLanguage building, as requested..."
|
|
|
|
_do_compile_osl=true
|
2013-09-16 13:02:49 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
check_package_version_ge_ARCH openshadinglanguage $OSL_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH openshadinglanguage
|
|
|
|
clean_OSL
|
|
|
|
else
|
|
|
|
_do_compile_osl=true
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_osl" = true ]; then
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$have_llvm" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
#XXX Note: will fail to build with LLVM 3.2!
|
|
|
|
install_packages_ARCH intel-tbb
|
|
|
|
PRINT ""
|
|
|
|
compile_OSL
|
2013-12-14 15:50:13 +01:00
|
|
|
else
|
|
|
|
WARNING "No LLVM available, cannot build OSL!"
|
2013-03-22 16:26:33 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2015-08-09 15:58:53 +02:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_osd=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSD_SKIP" = true ]; then
|
2015-08-09 15:58:53 +02:00
|
|
|
WARNING "Skipping OpenSubdiv installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OSD_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenSubdiv building, as requested..."
|
|
|
|
_do_compile_osd=true
|
2015-08-09 15:58:53 +02:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
# No package currently? Just build for now!
|
|
|
|
_do_compile_osd=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_osd" = true ]; then
|
2015-11-23 21:03:22 +01:00
|
|
|
install_packages_ARCH intel-tbb
|
|
|
|
PRINT ""
|
|
|
|
compile_OSD
|
2015-08-09 15:58:53 +02:00
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_OPENCOLLADA" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_collada=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENCOLLADA_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping OpenCOLLADA installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$OPENCOLLADA_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenCollada building, as requested..."
|
|
|
|
_do_compile_collada=true
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
|
|
|
check_package_ARCH opencollada
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH opencollada
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_OpenCOLLADA
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_collada=true
|
2013-03-22 16:26:33 +00:00
|
|
|
fi
|
2015-11-23 19:54:25 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_collada" = true ]; then
|
|
|
|
install_packages_ARCH pcre
|
|
|
|
# Find path to libxml shared lib...
|
|
|
|
_XML2_LIB=`pacman -Ql libxml2 | grep -e ".*/libxml2.so$" | gawk '{print $2}'`
|
|
|
|
PRINT ""
|
|
|
|
compile_OpenCOLLADA
|
2013-03-22 16:26:33 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$FFMPEG_SKIP" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
WARNING "Skipping FFMpeg installation, as requested..."
|
2015-11-23 19:54:25 +01:00
|
|
|
elif [ "$FFMPEG_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced FFMpeg building, as requested..."
|
|
|
|
compile_FFmpeg
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
|
|
|
check_package_version_ge_ARCH ffmpeg $FFMPEG_VERSION_MIN
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
install_packages_ARCH ffmpeg
|
2013-05-25 14:49:29 +00:00
|
|
|
clean_FFmpeg
|
2013-03-22 16:26:33 +00:00
|
|
|
else
|
|
|
|
compile_FFmpeg
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
|
|
|
|
|
2015-11-23 19:54:25 +01:00
|
|
|
#### Install on other distro (very limited!) ####
|
|
|
|
|
|
|
|
install_OTHER() {
|
|
|
|
PRINT ""
|
|
|
|
WARNING "Attempt to build main dependencies for other linux distributions."
|
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$COMMON_INFO"`"
|
|
|
|
PRINT ""
|
|
|
|
|
|
|
|
ERROR "Failed to detect distribution type."
|
|
|
|
PRINT ""
|
|
|
|
PRINT "Your distribution is not supported by this script, you'll have to install dependencies and"
|
|
|
|
PRINT "dev packages yourself. However, this script can still attempt to build main (complex) libraries for you,"
|
|
|
|
PRINT "if you use '--build-foo' options (you can try '--build-all' one first)."
|
|
|
|
PRINT ""
|
|
|
|
PRINT "Quite obviously, it assumes dependencies from those libraries are already available, otherwise please"
|
|
|
|
PRINT "install them (you can also use error messages printed out by build process to find missing libraries...)."
|
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$DEPS_COMMON_INFO"`"
|
|
|
|
PRINT ""
|
|
|
|
PRINT "`eval _echo "$DEPS_SPECIFIC_INFO"`"
|
|
|
|
PRINT ""
|
|
|
|
|
|
|
|
read -p "Do you want to continue (Y/n)?"
|
|
|
|
[ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit
|
|
|
|
|
|
|
|
PRINT ""
|
|
|
|
_do_compile_python=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$PYTHON_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping Python/NumPy installation, as requested..."
|
|
|
|
elif [ "$PYTHON_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced Python/NumPy building, as requested..."
|
|
|
|
_do_compile_python=true
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$_do_compile_python" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
compile_Python
|
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$NUMPY_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping NumPy installation, as requested..."
|
|
|
|
else
|
|
|
|
compile_Numpy
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$BOOST_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping Boost installation, as requested..."
|
|
|
|
elif [ "$BOOST_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced Boost building, as requested..."
|
|
|
|
compile_Boost
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OCIO_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping OpenColorIO installation, as requested..."
|
|
|
|
elif [ "$OCIO_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenColorIO building, as requested..."
|
|
|
|
compile_OCIO
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENEXR_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping ILMBase/OpenEXR installation, as requested..."
|
|
|
|
elif [ "$OPENEXR_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced ILMBase/OpenEXR building, as requested..."
|
|
|
|
compile_OPENEXR
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OIIO_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping OpenImageIO installation, as requested..."
|
|
|
|
elif [ "$OIIO_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenImageIO building, as requested..."
|
|
|
|
compile_OIIO
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
PRINT ""
|
|
|
|
have_llvm=false
|
|
|
|
_do_compile_llvm=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$LLVM_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
|
|
|
|
elif [ "$LLVM_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced LLVM building, as requested..."
|
|
|
|
_do_compile_llvm=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_llvm" = true ]; then
|
|
|
|
install_packages_DEB libffi-dev
|
|
|
|
# LLVM can't find the debian ffi header dir
|
|
|
|
_FFI_INCLUDE_DIR=`dpkg -L libffi-dev | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'`
|
|
|
|
PRINT ""
|
|
|
|
compile_LLVM
|
|
|
|
have_llvm=true
|
|
|
|
LLVM_VERSION_FOUND=$LLVM_VERSION
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
PRINT ""
|
|
|
|
_do_compile_osl=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSL_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping OpenShadingLanguage installation, as requested..."
|
|
|
|
elif [ "$OSL_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenShadingLanguage building, as requested..."
|
|
|
|
_do_compile_osl=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_osl" = true ]; then
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$have_llvm" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
install_packages_DEB flex bison libtbb-dev
|
|
|
|
PRINT ""
|
|
|
|
compile_OSL
|
|
|
|
else
|
|
|
|
WARNING "No LLVM available, cannot build OSL!"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
PRINT ""
|
|
|
|
_do_compile_osd=false
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OSD_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping OpenSubdiv installation, as requested..."
|
|
|
|
elif [ "$OSD_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenSubdiv building, as requested..."
|
|
|
|
_do_compile_osd=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_osd" = true ]; then
|
2015-11-23 21:03:22 +01:00
|
|
|
install_packages_DEB flex bison libtbb-dev
|
|
|
|
PRINT ""
|
|
|
|
compile_OSD
|
2015-11-23 19:54:25 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_OPENCOLLADA" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
_do_compile_collada=false
|
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENCOLLADA_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping OpenCOLLADA installation, as requested..."
|
|
|
|
elif [ "$OPENCOLLADA_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced OpenCollada building, as requested..."
|
|
|
|
_do_compile_collada=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$_do_compile_collada" = true ]; then
|
|
|
|
install_packages_DEB libpcre3-dev
|
|
|
|
# Find path to libxml shared lib...
|
|
|
|
_XML2_LIB=`dpkg -L libxml2-dev | grep -e ".*/libxml2.so"`
|
|
|
|
# No package
|
|
|
|
PRINT ""
|
|
|
|
compile_OpenCOLLADA
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
PRINT ""
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$FFMPEG_SKIP" = true ]; then
|
2015-11-23 19:54:25 +01:00
|
|
|
WARNING "Skipping FFMpeg installation, as requested..."
|
|
|
|
elif [ "$FFMPEG_FORCE_BUILD" = true ]; then
|
|
|
|
INFO "Forced FFMpeg building, as requested..."
|
|
|
|
compile_FFmpeg
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### Printing User Info ####
|
|
|
|
|
2012-11-13 16:42:36 +00:00
|
|
|
print_info_ffmpeglink_DEB() {
|
2014-02-04 16:51:41 +01:00
|
|
|
dpkg -L $_packages | grep -e ".*\/lib[^\/]\+\.so" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", "g", $0)); nlines++ }'
|
2012-11-18 17:47:26 +00:00
|
|
|
}
|
2012-11-13 16:42:36 +00:00
|
|
|
|
2012-11-18 17:47:26 +00:00
|
|
|
print_info_ffmpeglink_RPM() {
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
rpm -ql $_packages | grep -e ".*\/lib[^\/]\+\.so" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", "g", $0)); nlines++ }'
|
2012-11-21 09:01:49 +00:00
|
|
|
}
|
|
|
|
|
2013-03-22 16:26:33 +00:00
|
|
|
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++ }'
|
|
|
|
}
|
|
|
|
|
2012-11-18 17:47:26 +00:00
|
|
|
print_info_ffmpeglink() {
|
|
|
|
# This func must only print a ';'-separated list of libs...
|
|
|
|
if [ -z "$DISTRO" ]; then
|
|
|
|
ERROR "Failed to detect distribution type"
|
|
|
|
exit 1
|
2012-11-13 16:42:36 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-18 17:47:26 +00:00
|
|
|
# Create list of packages from which to get libs names...
|
|
|
|
_packages=""
|
2012-11-13 16:42:36 +00:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$THEORA_USE" = true ]; then
|
2012-11-18 17:47:26 +00:00
|
|
|
_packages="$_packages $THEORA_DEV"
|
2012-11-13 16:42:36 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$VORBIS_USE" = true ]; then
|
2012-11-18 17:47:26 +00:00
|
|
|
_packages="$_packages $VORBIS_DEV"
|
2012-11-13 16:42:36 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OGG_USE" = true ]; then
|
2013-09-27 13:56:16 +00:00
|
|
|
_packages="$_packages $OGG_DEV"
|
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$XVID_USE" = true ]; then
|
2012-11-15 17:31:18 +00:00
|
|
|
_packages="$_packages $XVID_DEV"
|
2012-11-14 21:57:47 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$VPX_USE" = true ]; then
|
2012-11-18 17:47:26 +00:00
|
|
|
_packages="$_packages $VPX_DEV"
|
2012-11-14 21:57:47 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$MP3LAME_USE" = true ]; then
|
2012-11-18 17:47:26 +00:00
|
|
|
_packages="$_packages $MP3LAME_DEV"
|
2012-11-14 21:57:47 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$X264_USE" = true ]; then
|
2012-11-18 17:47:26 +00:00
|
|
|
_packages="$_packages $X264_DEV"
|
2012-11-14 21:57:47 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$OPENJPEG_USE" = true ]; then
|
2012-11-18 17:47:26 +00:00
|
|
|
_packages="$_packages $OPENJPEG_DEV"
|
2012-11-14 21:57:47 +00:00
|
|
|
fi
|
|
|
|
|
2012-11-18 17:47:26 +00:00
|
|
|
if [ "$DISTRO" = "DEB" ]; then
|
2012-11-13 16:42:36 +00:00
|
|
|
print_info_ffmpeglink_DEB
|
2012-11-14 21:57:47 +00:00
|
|
|
elif [ "$DISTRO" = "RPM" ]; then
|
|
|
|
print_info_ffmpeglink_RPM
|
2013-03-22 16:26:33 +00:00
|
|
|
elif [ "$DISTRO" = "ARCH" ]; then
|
|
|
|
print_info_ffmpeglink_ARCH
|
2012-11-13 16:42:36 +00:00
|
|
|
# XXX TODO!
|
2015-11-23 20:28:34 +01:00
|
|
|
else
|
|
|
|
PRINT "<Could not determine additional link libraries needed for ffmpeg, replace this by valid list of libs...>"
|
2012-11-13 16:42:36 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-11-12 19:39:09 +00:00
|
|
|
print_info() {
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
|
|
|
PRINT ""
|
|
|
|
WARNING "****WARNING****"
|
|
|
|
PRINT "If you are experiencing issues building Blender, _*TRY A FRESH, CLEAN BUILD FIRST*_!"
|
|
|
|
PRINT "The same goes for install_deps itself, if you encounter issues, please first erase everything in $SRC and $INST"
|
|
|
|
PRINT "(provided obviously you did not add anything yourself in those dirs!), and run install_deps.sh again!"
|
|
|
|
PRINT "Often, changes in the libs built by this script, or in your distro package, cannot be handled simply, so..."
|
|
|
|
PRINT ""
|
2015-11-23 19:54:25 +01:00
|
|
|
PRINT "You may also try to use the '--build-foo' options to bypass your distribution's packages"
|
|
|
|
PRINT "for some troublesome/buggy libraries..."
|
|
|
|
PRINT ""
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2015-09-22 09:45:01 +02:00
|
|
|
PRINT "Ran with:"
|
|
|
|
PRINT " install_deps.sh $COMMANDLINE"
|
|
|
|
PRINT ""
|
|
|
|
PRINT ""
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "If you're using CMake add this to your configuration flags:"
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2012-12-19 11:07:10 +00:00
|
|
|
_buildargs=""
|
|
|
|
|
2015-11-30 14:40:34 +01:00
|
|
|
_1="-D WITH_CODEC_SNDFILE=ON"
|
|
|
|
PRINT " $_1"
|
2015-12-09 13:32:13 +01:00
|
|
|
_buildargs="$_buildargs -U *SNDFILE* $_1"
|
2015-11-30 14:40:34 +01:00
|
|
|
|
2015-11-28 19:49:03 +01:00
|
|
|
_1="-D PYTHON_VERSION=$PYTHON_VERSION_MIN"
|
|
|
|
PRINT " $_1"
|
2015-12-09 13:32:13 +01:00
|
|
|
_buildargs="$_buildargs -U *PYTHON* $_1"
|
2013-09-17 11:01:52 +00:00
|
|
|
if [ -d $INST/python-$PYTHON_VERSION_MIN ]; then
|
|
|
|
_1="-D PYTHON_ROOT_DIR=$INST/python-$PYTHON_VERSION_MIN"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT " $_1"
|
2013-09-17 11:01:52 +00:00
|
|
|
_buildargs="$_buildargs $_1"
|
|
|
|
fi
|
|
|
|
|
2012-11-15 17:31:18 +00:00
|
|
|
if [ -d $INST/boost ]; then
|
2012-12-19 11:07:10 +00:00
|
|
|
_1="-D BOOST_ROOT=$INST/boost"
|
|
|
|
_2="-D Boost_NO_SYSTEM_PATHS=ON"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT " $_1"
|
|
|
|
PRINT " $_2"
|
2015-12-09 13:32:13 +01:00
|
|
|
_buildargs="$_buildargs -U *BOOST* -U *Boost* $_1 $_2"
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2014-01-18 16:03:23 +01:00
|
|
|
if [ -d $INST/ocio ]; then
|
|
|
|
_1="-D OPENCOLORIO_ROOT_DIR=$INST/ocio"
|
|
|
|
PRINT " $_1"
|
2015-12-09 13:32:13 +01:00
|
|
|
_buildargs="$_buildargs -U *OPENCOLORIO* $_1"
|
2014-01-18 16:03:23 +01:00
|
|
|
fi
|
|
|
|
|
2013-05-24 14:31:57 +00:00
|
|
|
if [ -d $INST/openexr ]; then
|
|
|
|
_1="-D OPENEXR_ROOT_DIR=$INST/openexr"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT " $_1"
|
2015-12-09 13:32:13 +01:00
|
|
|
_buildargs="$_buildargs -U *OPENEXR* $_1"
|
2013-05-24 14:31:57 +00:00
|
|
|
fi
|
|
|
|
|
2014-01-18 16:03:23 +01:00
|
|
|
if [ -d $INST/oiio ]; then
|
|
|
|
_1="-D OPENIMAGEIO_ROOT_DIR=$INST/oiio"
|
|
|
|
PRINT " $_1"
|
2015-12-09 13:32:13 +01:00
|
|
|
_buildargs="$_buildargs -U *OPENIMAGEIO* $_1"
|
2014-01-18 16:03:23 +01:00
|
|
|
fi
|
|
|
|
|
2014-05-04 21:32:06 +02:00
|
|
|
if [ "$OSL_SKIP" = false ]; then
|
|
|
|
_1="-D WITH_CYCLES_OSL=ON"
|
|
|
|
_2="-D WITH_LLVM=ON"
|
|
|
|
_3="-D LLVM_VERSION=$LLVM_VERSION_FOUND"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT " $_1"
|
|
|
|
PRINT " $_2"
|
2014-05-04 21:32:06 +02:00
|
|
|
PRINT " $_3"
|
2015-12-09 13:32:13 +01:00
|
|
|
_buildargs="$_buildargs -U *LLVM* -U *CYCLES* $_1 $_2 $_3"
|
2014-05-04 21:32:06 +02:00
|
|
|
if [ -d $INST/osl ]; then
|
|
|
|
_1="-D CYCLES_OSL=$INST/osl"
|
|
|
|
PRINT " $_1"
|
|
|
|
_buildargs="$_buildargs $_1"
|
|
|
|
fi
|
|
|
|
if [ -d $INST/llvm ]; then
|
2015-03-05 17:45:21 +11:00
|
|
|
_1="-D LLVM_ROOT_DIR=$INST/llvm"
|
2014-05-04 21:32:06 +02:00
|
|
|
_2="-D LLVM_STATIC=ON"
|
|
|
|
PRINT " $_1"
|
|
|
|
PRINT " $_2"
|
|
|
|
_buildargs="$_buildargs $_1 $_2"
|
|
|
|
fi
|
2014-05-05 20:46:30 +02:00
|
|
|
else
|
|
|
|
_1="-D WITH_CYCLES_OSL=OFF"
|
|
|
|
_2="-D WITH_LLVM=OFF"
|
|
|
|
PRINT " $_1"
|
|
|
|
PRINT " $_2"
|
|
|
|
_buildargs="$_buildargs $_1 $_2"
|
2012-11-16 17:14:01 +00:00
|
|
|
fi
|
|
|
|
|
2015-08-08 14:12:02 +02:00
|
|
|
if [ -d $INST/osd ]; then
|
|
|
|
_1="-D WITH_OPENSUBDIV=ON"
|
|
|
|
_2="-D OPENSUBDIV_ROOT_DIR=$INST/osd"
|
|
|
|
PRINT " $_1"
|
|
|
|
PRINT " $_2"
|
2015-12-09 13:32:13 +01:00
|
|
|
_buildargs="$_buildargs -U *OPENSUBDIV* $_1 $_2"
|
2015-08-08 14:12:02 +02:00
|
|
|
fi
|
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_OPENCOLLADA" = true ]; then
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
_1="-D WITH_OPENCOLLADA=ON"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT " $_1"
|
2015-12-09 13:32:13 +01:00
|
|
|
_buildargs="$_buildargs -U *COLLADA* $_1"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
fi
|
|
|
|
|
2014-05-04 21:32:06 +02:00
|
|
|
if [ "$FFMPEG_SKIP" = false ]; then
|
|
|
|
_1="-D WITH_CODEC_FFMPEG=ON"
|
|
|
|
_2="-D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;rt;`print_info_ffmpeglink`'"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT " $_1"
|
2014-05-04 21:32:06 +02:00
|
|
|
PRINT " $_2"
|
2015-12-09 13:32:13 +01:00
|
|
|
_buildargs="$_buildargs -U *FFMPEG* $_1 $_2"
|
2014-05-04 21:32:06 +02:00
|
|
|
if [ -d $INST/ffmpeg ]; then
|
|
|
|
_1="-D FFMPEG=$INST/ffmpeg"
|
|
|
|
PRINT " $_1"
|
|
|
|
_buildargs="$_buildargs $_1"
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
|
|
|
PRINT "Or even simpler, just run (in your blender-source dir):"
|
|
|
|
PRINT " make -j$THREADS BUILD_CMAKE_ARGS=\"$_buildargs\""
|
2012-12-19 11:07:10 +00:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
|
|
|
PRINT "If you're using SCons add this to your user-config:"
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2015-12-06 12:04:23 +01:00
|
|
|
PRINT "WITH_BF_SNDFILE = True"
|
2015-11-30 14:40:34 +01:00
|
|
|
|
2015-12-06 12:04:23 +01:00
|
|
|
PRINT "BF_PYTHON_VERSION = '$PYTHON_VERSION_MIN'"
|
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
2013-01-03 15:35:46 +00:00
|
|
|
if [ -d $INST/python-$PYTHON_VERSION_MIN ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "BF_PYTHON = '$INST/python-$PYTHON_VERSION_MIN'"
|
|
|
|
PRINT "BF_PYTHON_ABI_FLAGS = 'm'"
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2014-05-04 21:32:06 +02:00
|
|
|
if [ "$OCIO_SKIP" = false ]; then
|
|
|
|
PRINT "WITH_BF_OCIO = True"
|
|
|
|
if [ -d $INST/ocio ]; then
|
|
|
|
PRINT "BF_OCIO = '$INST/ocio'"
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2013-05-24 14:31:57 +00:00
|
|
|
if [ -d $INST/openexr ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "BF_OPENEXR = '$INST/openexr'"
|
2013-12-08 18:25:37 +01:00
|
|
|
|
|
|
|
_ilm_libs_ext=""
|
2015-02-03 19:56:28 +01:00
|
|
|
#~ version_ge $OPENEXR_VERSION "2.1.0"
|
|
|
|
#~ if [ $? -eq 0 ]; then
|
|
|
|
#~ _ilm_libs_ext=`echo $OPENEXR_VERSION | sed -r 's/([0-9]+)\.([0-9]+).*/-\1_\2/'`
|
|
|
|
#~ fi
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "BF_OPENEXR_LIB = 'Half IlmImf$_ilm_libs_ext Iex$_ilm_libs_ext Imath$_ilm_libs_ext '"
|
2014-02-04 16:51:41 +01:00
|
|
|
# BF_OPENEXR_LIB does not work, things like '-lIlmImf-2_1' do not suit ld.
|
|
|
|
# For now, hack around!!!
|
|
|
|
PRINT "BF_OPENEXR_LIB_STATIC = '\${BF_OPENEXR}/lib/libHalf.so \${BF_OPENEXR}/lib/libIlmImf$_ilm_libs_ext.so \${BF_OPENEXR}/lib/libIex$_ilm_libs_ext.so \${BF_OPENEXR}/lib/libImath$_ilm_libs_ext.so \${BF_OPENEXR}/lib/libIlmThread$_ilm_libs_ext.so'"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "WITH_BF_STATICOPENEXR = True"
|
2013-12-11 17:50:26 +01:00
|
|
|
fi
|
2013-05-24 14:31:57 +00:00
|
|
|
|
2014-05-04 21:32:06 +02:00
|
|
|
if [ "$OIIO_SKIP" = false ]; then
|
|
|
|
PRINT "WITH_BF_OIIO = True"
|
|
|
|
if [ -d $INST/oiio ]; then
|
|
|
|
PRINT "BF_OIIO = '$INST/oiio'"
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
2014-02-04 16:51:41 +01:00
|
|
|
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "WITH_BF_CYCLES = True"
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2013-02-23 00:52:59 +00:00
|
|
|
if [ -d $INST/osl ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "BF_OSL = '$INST/osl'"
|
2013-02-23 00:52:59 +00:00
|
|
|
fi
|
|
|
|
|
2015-08-08 14:12:02 +02:00
|
|
|
if [ "$OSD_SKIP" = false ]; then
|
|
|
|
PRINT "WITH_BF_OPENSUBDIV = True"
|
|
|
|
if [ -d $INST/osd ]; then
|
|
|
|
PRINT "BF_OPENSUBDIV = '$INST/osd'"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-05-04 21:32:06 +02:00
|
|
|
if [ "$BOOST_SKIP" = false ]; then
|
|
|
|
PRINT "WITH_BF_BOOST = True"
|
|
|
|
if [ -d $INST/boost ]; then
|
|
|
|
PRINT "BF_BOOST = '$INST/boost'"
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
2013-05-29 18:57:36 +00:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_OPENCOLLADA" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "WITH_BF_COLLADA = True"
|
2013-05-29 18:57:36 +00:00
|
|
|
if [ -d $INST/opencollada ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "BF_OPENCOLLADA = '$INST/opencollada'"
|
2013-05-29 18:57:36 +00:00
|
|
|
fi
|
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
|
2014-05-04 21:32:06 +02:00
|
|
|
if [ "$FFMPEG_SKIP" = false ]; then
|
|
|
|
_ffmpeg_list_sep=" "
|
|
|
|
if [ -d $INST/ffmpeg ]; then
|
|
|
|
PRINT "BF_FFMPEG = '$INST/ffmpeg'"
|
|
|
|
fi
|
|
|
|
PRINT "BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice `print_info_ffmpeglink`'"
|
2013-03-22 16:26:33 +00:00
|
|
|
fi
|
|
|
|
|
2014-05-04 21:32:06 +02:00
|
|
|
if [ "$WITH_ALL" = false ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "WITH_BF_3DMOUSE = False"
|
2013-03-22 16:26:33 +00:00
|
|
|
# No libspacenav in official arch repos...
|
|
|
|
elif [ "$DISTRO" = "ARCH" ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "WITH_BF_3DMOUSE = False"
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
2012-11-18 14:27:19 +00:00
|
|
|
|
2015-11-23 20:28:34 +01:00
|
|
|
if [ "$WITH_OPENCOLLADA" = true ]; then
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT "LLIBS = [\""xml2"\", \""expat"\"] + LLIBS"
|
2013-05-31 17:39:43 +00:00
|
|
|
fi
|
2012-11-12 19:39:09 +00:00
|
|
|
}
|
|
|
|
|
2013-05-25 14:49:29 +00:00
|
|
|
#### "Main" ####
|
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
2013-05-24 10:16:07 +00:00
|
|
|
# Detect distribution type used on this machine
|
2013-05-25 14:49:29 +00:00
|
|
|
if [ -f /etc/debian_version ]; then
|
|
|
|
DISTRO="DEB"
|
2012-11-12 19:39:09 +00:00
|
|
|
install_DEB
|
2013-05-25 14:49:29 +00:00
|
|
|
elif [ -f /etc/arch-release ]; then
|
|
|
|
DISTRO="ARCH"
|
2013-03-22 16:26:33 +00:00
|
|
|
install_ARCH
|
2013-05-25 14:49:29 +00:00
|
|
|
elif [ -f /etc/redhat-release -o /etc/SuSE-release ]; then
|
|
|
|
DISTRO="RPM"
|
|
|
|
install_RPM
|
|
|
|
else
|
2015-11-23 19:54:25 +01:00
|
|
|
DISTRO="OTHER"
|
|
|
|
install_OTHER
|
2012-11-12 19:39:09 +00:00
|
|
|
fi
|
|
|
|
|
2014-09-19 15:12:25 +02:00
|
|
|
print_info | tee $INFO_PATH/BUILD_NOTES.txt
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2014-09-19 15:12:25 +02:00
|
|
|
PRINT "This information has been written to $INFO_PATH/BUILD_NOTES.txt"
|
2013-12-14 15:50:13 +01:00
|
|
|
PRINT ""
|
2012-11-13 10:49:55 +00:00
|
|
|
|
|
|
|
# Switch back to user language.
|
|
|
|
LANG=LANG_BACK
|
|
|
|
export LANG
|