Blame docker-builder-data/build/script/packet/opentoonz-master.sh

e14835
DEPS="jpeg-9b png-1.6.25 lz4-master glew-2.0.0 usb-1.0.20 sdl-2.0.4 superlu-4.3 cmake-3.6.2 openblas-master boost-1.61.0 qt-5.7"
e14835
e14835
PK_DIRNAME="opentoonz"
e14835
PK_URL="https://github.com/opentoonz/$PK_DIRNAME.git"
e14835
e14835
source $INCLUDE_SCRIPT_DIR/inc-pkallunpack-git.sh
e14835
source $INCLUDE_SCRIPT_DIR/inc-pkinstall_release-default.sh
e14835
e14835
pkbuild() {
e14835
    if ! (cp "$FILES_PACKET_DIR/Makefile.in" "$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/" \
e14835
     && cp "$FILES_PACKET_DIR/FindTIFF.cmake" "$PK_DIRNAME/toonz/cmake/"); then
e14835
        return 1
e14835
    fi
e14835
	
e14835
	if ! check_packet_function $NAME build.libtiff; then
e14835
		cd "$BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/tiff-4.0.3"
e14835
		if ! check_packet_function $NAME build.libtiff.configure; then
e14835
			if ! ./configure; then
e14835
	    		return 1
e14835
	    	fi
e14835
			set_done $NAME build.libtiff.configure
e14835
	    fi
e14835
		
e14835
		if ! make -j${THREADS}; then
e14835
    		return 1
e14835
    	fi
e14835
		set_done $NAME build.libtiff
e14835
    fi
e14835
e14835
	if ! cp "$ENVDEPS_PACKET_DIR/lib/libsuperlu_4.3.a" "$BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/superlu/libsuperlu_4.1.a"; then
e14835
		return 1
e14835
	fi
e14835
e14835
	mkdir -p "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
e14835
	cd "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
e14835
	if ! check_packet_function $NAME build.configure; then
e14835
		if ! cmake -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PACKET_DIR ../sources; then
e14835
    		return 1
e14835
    	fi
e14835
		set_done $NAME build.configure
e14835
    fi
e14835
	
dd482a
    # making in single thread is too slow, but life is too short...
dd482a
	if ! (make -j${THREADS} || make -j${THREADS} || make); then
e14835
		return 1
e14835
	fi
e14835
}
e14835
e14835
pkinstall() {
e14835
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
e14835
    if ! make install; then
e14835
        return 1
e14835
    fi
e14835
    if ! cp -f "$FILES_PACKET_DIR/launch-opentoonz.sh" "$INSTALL_PACKET_DIR/bin"; then
e14835
        return 1
e14835
    fi
e14835
}