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

3af8db
DEPS="jpeg-9b png-1.6.26 lz4-master glew-2.0.0 usb-1.0.20 sdl-2.0.5 superlu-4.3 cmake-3.6.2 freeglut-3.0.0 openblas-master boost-1.61.0 qt-5.7"
d5690b
d5690b
PK_VERSION="1.1.1"
d5690b
PK_DIRNAME="opentoonz"
d5690b
PK_URL="https://github.com/opentoonz/$PK_DIRNAME.git"
d5690b
d5690b
source $INCLUDE_SCRIPT_DIR/inc-pkallunpack-git.sh
d5690b
source $INCLUDE_SCRIPT_DIR/inc-pkinstall_release-default.sh
d5690b
d5690b
pkbuild() {
d5690b
    if ! (cp --remove-destination "$FILES_PACKET_DIR/Makefile.in" "$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/" \
d5690b
     && cp --remove-destination "$FILES_PACKET_DIR/FindTIFF.cmake" "$PK_DIRNAME/toonz/cmake/"); then
d5690b
        return 1
d5690b
    fi
d5690b
	
d5690b
	if ! check_packet_function $NAME build.libtiff; then
d5690b
		cd "$BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/tiff-4.0.3"
d5690b
		if ! check_packet_function $NAME build.libtiff.configure; then
d5690b
			if ! ./configure; then
d5690b
	    		return 1
d5690b
	    	fi
d5690b
			set_done $NAME build.libtiff.configure
d5690b
	    fi
d5690b
		
d5690b
		if ! make -j${THREADS}; then
d5690b
    		return 1
d5690b
    	fi
d5690b
		set_done $NAME build.libtiff
d5690b
    fi
d5690b
d5690b
	if ! cp --remove-destination "$ENVDEPS_PACKET_DIR/lib/libsuperlu_4.3.a" "$BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/superlu/libsuperlu_4.1.a"; then
d5690b
		return 1
d5690b
	fi
d5690b
d5690b
	mkdir -p "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
d5690b
	cd "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
d5690b
	if ! check_packet_function $NAME build.configure; then
d5690b
		if ! cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PACKET_DIR ../sources; then
d5690b
    		return 1
d5690b
    	fi
d5690b
		set_done $NAME build.configure
d5690b
    fi
d5690b
	
d5690b
    # making in single thread is too slow, but life is too short...
d5690b
	if ! (make -j${THREADS} || make -j${THREADS} || make); then
d5690b
		return 1
d5690b
	fi
d5690b
}
d5690b
d5690b
pkinstall() {
d5690b
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
35e704
    make install || return 1
35e704
35e704
    cp --remove-destination "$FILES_PACKET_DIR/launch-opentoonz.sh" "$INSTALL_PACKET_DIR/bin" || return 1
35e704
    cp --remove-destination $BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/.libs/libtiff.so* "$INSTALL_PACKET_DIR/lib" || return 1
35e704
    cp --remove-destination $BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/.libs/libtiffxx.so* "$INSTALL_PACKET_DIR/lib" || return  1
35e704
e6c867
    copy_system_lib libudev     "$INSTALL_PACKET_DIR/lib/" || return 1
e6c867
    copy_system_lib libgfortran "$INSTALL_PACKET_DIR/lib/" || return 1
e6c867
    copy_system_lib libpng12    "$INSTALL_PACKET_DIR/lib/" || return 1
d5690b
}