forked from MrKepzie/Natron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.sh
276 lines (246 loc) · 7.58 KB
/
common.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
#!/bin/sh
# ***** BEGIN LICENSE BLOCK *****
# This file is part of Natron <http://www.natron.fr/>,
# Copyright (C) 2016 INRIA and Alexandre Gauthier
#
# Natron 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.
#
# Natron 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 Natron. If not, see <http://www.gnu.org/licenses/gpl-2.0.html>
# ***** END LICENSE BLOCK *****
#THE FOLLOWING CAN BE MODIFIED TO CONFIGURE RELEASE BUILDS
#----------------------------------------------------------
NATRON_GIT_TAG=tags/2.0.1
IOPLUG_GIT_TAG=tags/Natron-2.0.1
MISCPLUG_GIT_TAG=tags/Natron-2.0.1
ARENAPLUG_GIT_TAG=tags/Natron-2.0.1
CVPLUG_GIT_TAG=tags/Natron-2.0.1
#----------------------------------------------------------
# Name of the packages in the installer
# If you change this, don't forget to change the xml file associated in include/xml
NATRON_PKG=fr.inria.natron
IOPLUG_PKG=fr.inria.openfx.io
MISCPLUG_PKG=fr.inria.openfx.misc
ARENAPLUG_PKG=fr.inria.openfx.extra
CVPLUG_PKG=fr.inria.openfx.opencv
CORELIBS_PKG=fr.inria.natron.libs
PROFILES_PKG=fr.inria.natron.color
PACKAGES=$NATRON_PKG,$CORELIBS_PKG,$PROFILES_PKG,$IOPLUG_PKG,$MISCPLUG_PKG,$ARENAPLUG_PKG #,$CVPLUG_PKG
# bump number when OpenColorIO-Configs changes
GIT_OCIO_CONFIG_TAR=https://github.com/MrKepzie/OpenColorIO-Configs/archive/Natron-v2.0.tar.gz
COLOR_PROFILES_VERSION=2.0.1
# bump timestamp on SDK changes, important!
CORELIBS_VERSION=20160318
# SDK
#
MASTER_BRANCH=master
QT5_VERSION=5.6.0
SWRAST=1
SDK_VERSION=CY2015
SDK_PATH=/opt
PYV=2 # Python 2 or 3
if [ "$DEBUG" = "1" ]; then
SDK_VERSION=${SDK_VERSION}-debug
fi
# Common values
#
if [ -z "$CWD" ]; then
CWD=`pwd`
fi
TMP_DIR=/tmp
TMP_PATH=$CWD/tmp
SRC_PATH=$CWD/src
INSTALL_PATH=$SDK_PATH/Natron-$SDK_VERSION
INC_PATH=$CWD/include
# Keep existing tag, else make a new one
if [ -z "$TAG" ]; then
TAG=`date +%Y%m%d%H%M`
fi
OS=`uname -o`
REPO_DIR_PREFIX=$CWD/build_
# Repo settings
#
if [ -f $CWD/repo.sh ]; then
source $CWD/repo.sh
else
REPO_DEST=localhost
REPO_URL=http://localhost
[email protected] #for internal testing
REPO_SYM_PORT=-P2121
REPO_SYM_PATH=/home/uploads
fi
#Dist repo is expected to be layout as such:
#downloads.xxx.yyy:
# Windows/
# Linux/
# releases/
# snapshots/BRANCH
# 32bit/
# 64bit/
# files/ (where installers should be)
# packages/ (where the updates for the maintenance tool should be)
# Third-party sources
#
THIRD_PARTY_SRC_URL=http://downloads.natron.fr/Third_Party_Sources
GIT_OPENCV=https://github.com/devernay/openfx-opencv.git
GIT_ARENA=https://github.com/olear/openfx-arena.git
#Installer is a fork of qtifw to fix a few bugs (TODO update/move to v2 upstream)
GIT_INSTALLER=https://github.com/olear/qtifw.git
GIT_BREAKPAD=https://github.com/MrKepzie/google-breakpad
GIT_NATRON=https://github.com/MrKepzie/Natron.git
GIT_IO=https://github.com/MrKepzie/openfx-io.git
GIT_MISC=https://github.com/devernay/openfx-misc.git
GIT_UNIT=https://github.com/MrKepzie/Natron-Tests.git
GIT_OPENCL=https://github.com/olear/OpenCL.git
QT4_TAR=qt-everywhere-opensource-src-4.8.7.tar.gz
CV_TAR=opencv-2.4.11.zip
EIGEN_TAR=eigen-eigen-bdd17ee3b1b3.tar.gz
YASM_TAR=yasm-1.3.0.tar.gz
CMAKE_TAR=cmake-3.1.2.tar.gz
PY2_TAR=Python-2.7.11.tar.xz
PY3_TAR=Python-3.5.1.tar.xz
TJPG_TAR=libjpeg-turbo-1.4.2.tar.gz
OJPG_TAR=openjpeg-1.5.2.tar.gz
PNG_TAR=libpng-1.6.21.tar.xz
TIF_TAR=tiff-4.0.6.tar.gz
ILM_TAR=ilmbase-2.2.0.tar.gz
EXR_TAR=openexr-2.2.0.tar.gz.orig
GLEW_TAR=glew-1.12.0.tgz
BOOST_TAR=boost_1_55_0.tar.bz2
CAIRO_TAR=cairo-1.14.6.tar.xz
FFMPEG_TAR=ffmpeg-2.8.6.tar.xz
OCIO_TAR=OpenColorIO-1.0.9.tar.gz
OIIO_TAR=oiio-Release-1.6.11.tar.gz
PYSIDE_TAR=pyside-qt4.8+1.2.2.tar.bz2
PYSIDE2_TAR=pyside2-2.0.0.dev0.tar.gz
SHIBOK_TAR=shiboken-1.2.2.tar.bz2
SHIBOK2_TAR=shiboken2-2.0.0.dev0.tar.gz
LIBXML_TAR=libxml2-2.9.2.tar.gz
LIBXSLT_TAR=libxslt-1.1.28.tar.gz
SEE_TAR=SeExpr-rel-1.0.1.tar.gz
LIBRAW_TAR=LibRaw-0.16.0.tar.gz
PIX_TAR=pixman-0.32.8.tar.gz
LCMS_TAR=lcms2-2.7.tar.gz
MAGICK_TAR=ImageMagick-6.9.3-5.tar.xz
SSL_TAR=openssl-1.0.2f.tar.gz
JASP_TAR=jasper-1.900.1.zip
NATRON_API_DOC=https://media.readthedocs.org/pdf/natron/master/natron.pdf
LAME_TAR=lame-3.99.5.tar.gz
OGG_TAR=libogg-1.3.2.tar.gz
VORBIS_TAR=libvorbis-1.3.5.tar.gz
THEORA_TAR=libtheora-1.1.1.tar.bz2
MODPLUG_TAR=libmodplug-0.8.8.5.tar.gz
VPX_TAR=libvpx-1.4.0.tar.bz2
SPEEX_TAR=speex-1.2rc1.tar.gz
OPUS_TAR=opus-1.1.tar.gz
DIRAC_TAR=schroedinger-1.0.11.tar.gz
ORC_TAR=orc-0.4.23.tar.xz
X264_TAR=x264-snapshot-20150725-2245.tar.bz2
XVID_TAR=xvidcore-1.3.4.tar.gz
ICU_TAR=icu4c-55_1-src.tgz
ZLIB_TAR=zlib-1.2.8.tar.gz
EXPAT_TAR=expat-2.1.0.tar.gz
FCONFIG_TAR=fontconfig-2.10.2.tar.gz
FTYPE_TAR=freetype-2.4.11.tar.gz
FFI_TAR=libffi-3.2.1.tar.gz
GLIB_TAR=glib-2.42.2.tar.xz
if [ "$SDK_VERSION" = "CY2016" ]; then
BUZZ_TAR=harfbuzz-1.2.3.tar.bz2
else
BUZZ_TAR=harfbuzz-0.9.40.tar.bz2
fi
PANGO_TAR=pango-1.37.0.tar.xz
BZIP_TAR=bzip2-1.0.6.tar.gz
CROCO_TAR=libcroco-0.6.8.tar.xz
SVG_TAR=librsvg-2.40.10.tar.xz
GDK_TAR=gdk-pixbuf-2.32.1.tar.xz
ELF_TAR=patchelf-0.8.tar.bz2
ZIP_TAR=libzip-1.0.1.tar.xz
GIF_TAR=giflib-5.1.2.tar.bz2
CPPU_TAR=cppunit-1.13.2.tar.gz
CDR_TAR=libcdr-0.1.2.tar.xz
REVENGE_TAR=librevenge-0.0.4.tar.xz
LLVM_TAR=llvm-3.8.0.src.tar.xz
MESA_TAR=mesa-11.1.2.tar.gz
GLU_TAR=glu-9.0.0.tar.bz2
PYSIDE2_GIT=https://github.com/PySide/pyside2
PYSIDE2_COMMIT=7006f35459fb41db6f5087217c1cdc0354a38568
SHIBOK2_GIT=https://github.com/PySide/shiboken2
SHIBOK2_COMMIT=32d5805b8489db75d20462e76328b7791735073a
QTBASE_TAR=qtbase-opensource-src-${QT5_VERSION}.tar.xz
QTXMLP_TAR=qtxmlpatterns-opensource-src-${QT5_VERSION}.tar.xz
QTDEC_TAR=qtdeclarative-opensource-src-${QT5_VERSION}.tar.xz
#QTSVG_TAR=qtsvg-opensource-src-$QT5_VERSION-rc.tar.xz
TC_GCC=4.8.5
TC_MPC=1.0.1
TC_MPFR=3.1.3
TC_GMP=5.1.3
TC_ISL=0.11.1
TC_CLOOG=0.18.0
GCC_TAR=gcc-$TC_GCC.tar.bz2
MPC_TAR=mpc-$TC_MPC.tar.gz
MPFR_TAR=mpfr-$TC_MPFR.tar.bz2
GMP_TAR=gmp-$TC_GMP.tar.bz2
ISL_TAR=isl-$TC_ISL.tar.bz2
CLOOG_TAR=cloog-$TC_CLOOG.tar.gz
# Linux version
#
# Check distro and version. CentOS/RHEL 6.4 only!
if [ ! -f /etc/redhat-release ]; then
echo "SDK has been designed for CentOS/RHEL, use at OWN risk!"
sleep 5
else
RHEL_MAJOR=`cat /etc/redhat-release | cut -d" " -f3 | cut -d "." -f1`
RHEL_MINOR=`cat /etc/redhat-release | cut -d" " -f3 | cut -d "." -f2`
if [ "$RHEL_MAJOR" != "6" ] || [ "$RHEL_MINOR" != "4" ]; then
echo "Wrong version of CentOS/RHEL, 6.4 is the only tested version!"
sleep 5
fi
fi
# Arch
#
# Default build flags
if [ -z "$ARCH" ]; then
case `uname -m` in
i?86) export ARCH=i686 ;;
*) export ARCH=`uname -m` ;;
esac
fi
if [ "$DEBUG" = "1" ]; then
BFLAGS="-g"
else
BFLAGS="-O2"
fi
if [ "$ARCH" = "i686" ]; then
BF="$BFLAGS -march=i686 -mtune=i686"
BIT=32
elif [ "$ARCH" = "x86_64" ]; then
BF="$BFLAGS -fPIC"
BIT=64
else
BF="$BFLAGS"
fi
# Threads
#
# Set build threads to 4 if not exists
DEFAULT_MKJOBS=4
if [ -z "$MKJOBS" ]; then
MKJOBS=$DEFAULT_MKJOBS
fi
echo "===> MKJOBS set to $MKJOBS"
# License
#
#
if [ "$NATRON_LICENSE" != "GPL" ] && [ "$NATRON_LICENSE" != "COMMERCIAL" ]; then
echo "Please select a License with NATRON_LICENSE=(GPL,COMMERCIAL)"
exit 1
fi
echo "===> NATRON_LICENSE set to $NATRON_LICENSE"