diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-09-17 03:54:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-09-17 03:54:33 +0400 |
commit | 771bad9c6abaad4b742935e5d55067f281287650 (patch) | |
tree | f5325241d866890ae7a155eb112019090dfbf05a /build_files | |
parent | 3cdfea119d93ea3d1ec5096cb7d218c7ae4991d5 (diff) | |
parent | f0f398dcf3101079f4965185eb82c23c54fc6923 (diff) |
Merge branch 'master' into soc-2014-viewport_context
Diffstat (limited to 'build_files')
-rwxr-xr-x | build_files/scons/tools/Blender.py | 9 | ||||
-rwxr-xr-x | build_files/utils/build_tgz.sh | 58 |
2 files changed, 67 insertions, 0 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index dcbf7e510e5..b5853b22455 100755 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -248,6 +248,11 @@ def setup_staticlibs(lenv): libincs = [e for e in libincs if SCons.Subst.scons_subst(e, lenv, gvars=lenv.Dictionary()) != "/usr/lib"] libincs.append('/usr/lib') + # Hack to pass OSD libraries to linker before extern_{clew,cuew} + # Here we only store library path, actual library name will be added in setup_syslibs() + for syslib in create_blender_liblist(lenv, 'system'): + libincs.append(os.path.dirname(syslib)) + return statlibs, libincs def setup_syslibs(lenv): @@ -339,6 +344,10 @@ def setup_syslibs(lenv): if not lenv['WITH_BF_STATICPNG']: syslibs += Split(lenv['BF_PNG_LIB']) + # Hack to pass OSD libraries to linker before extern_{clew,cuew} + for syslib in create_blender_liblist(lenv, 'system'): + syslibs.append(os.path.basename(syslib)) + syslibs += lenv['LLIBS'] return syslibs diff --git a/build_files/utils/build_tgz.sh b/build_files/utils/build_tgz.sh new file mode 100755 index 00000000000..b0ff8ea2aa8 --- /dev/null +++ b/build_files/utils/build_tgz.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +# This script can run from any location, +# output is created in the $CWD + +BASE_DIR="$PWD" + +blender_srcdir=$(dirname -- $0)/../.. +blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}') +blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}') +blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}') +blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}') + +if [ "$blender_version_cycle" = "release" ] ; then + VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char +else + VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)_$blender_subversion +fi + +MANIFEST="blender-$VERSION-manifest.txt" +TARBALL="blender-$VERSION.tar.gz" + +cd "$blender_srcdir" + +# Build master list +echo -n "Building manifest of files: \"$BASE_DIR/$MANIFEST\" ..." +git ls-files > $BASE_DIR/$MANIFEST + +# Enumerate submodules +for lcv in $(git submodule | cut -f2 -d" "); do + cd "$BASE_DIR" + cd "$blender_srcdir/$lcv" + git ls-files | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST + cd "$BASE_DIR" +done +echo "OK" + + +# Create the tarball +cd "$blender_srcdir" +echo -n "Creating archive: \"$BASE_DIR/$TARBALL\" ..." +GZIP=-9 tar --transform "s,^,blender-$VERSION/,g" -zcf "$BASE_DIR/$TARBALL" -T "$BASE_DIR/$MANIFEST" +echo "OK" + + +# Create checksum file +cd "$BASE_DIR" +echo -n "Createing checksum: \"$BASE_DIR/$TARBALL.md5sum\" ..." +md5sum "$TARBALL" > "$TARBALL.md5sum" +echo "OK" + + +# Cleanup +echo -n "Cleaning up ..." +rm "$BASE_DIR/$MANIFEST" +echo "OK" + +echo "Done!" |