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

6675b2
DEPS="jpeg-9b png-1.6.26 lz4-master glew-2.0.0 usb-1.0.20 sdl-2.0.5 superlu-5.2.1 cmake-3.6.2 freeglut-3.0.0 openblas-master boost-1.61.0 qt-5.7"
e14835
bf448b
PK_VERSION="1.1.2"
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() {
87264d
    if ! (cp --remove-destination "$FILES_PACKET_DIR/Makefile.in" "$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/" \
87264d
     && cp --remove-destination "$FILES_PACKET_DIR/FindTIFF.cmake" "$PK_DIRNAME/toonz/cmake/"); then
87264d
        return 1
e14835
    fi
87264d
	
87264d
	if ! check_packet_function $NAME build.libtiff; then
87264d
		cd "$BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/tiff-4.0.3"
87264d
		if ! check_packet_function $NAME build.libtiff.configure; then
87264d
			if ! ./configure; then
87264d
	    		return 1
87264d
	    	fi
87264d
			set_done $NAME build.libtiff.configure
87264d
	    fi
87264d
		
87264d
		if ! make -j${THREADS}; then
87264d
    		return 1
87264d
    	fi
87264d
		set_done $NAME build.libtiff
e14835
    fi
cf5576
87264d
	cp --remove-destination "$ENVDEPS_PACKET_DIR/lib/libsuperlu_5.2.1.a" "$BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/superlu/libsuperlu_4.1.a" || return 1
87264d
	rm -rf $BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/superlu/SuperLU_4.1/include/*
87264d
	cp --remove-destination $ENVDEPS_PACKET_DIR/include/superlu-5.2.1/* "$BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/superlu/SuperLU_4.1/include/" || return 1
87264d
87264d
	mkdir -p "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
87264d
	cd "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
87264d
	if ! check_packet_function $NAME build.configure; then
87264d
		if ! cmake -DPNG_PNG_INCLUDE_DIR=$ENVDEPS_PACKET_DIR/include -DPNG_LIBRARY=$ENVDEPS_PACKET_DIR/lib/libpng.so -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PACKET_DIR ../sources; then
87264d
    		return 1
87264d
    	fi
87264d
		set_done $NAME build.configure
cf5576
    fi
87264d
	
87264d
    # making in single thread is too slow, but life is too short...
87264d
	if ! (make -j${THREADS} || make -j${THREADS} || make); then
87264d
		return 1
87264d
	fi
e14835
}
e14835
e14835
pkinstall() {
e14835
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
87264d
    if ! make install; then
87264d
        return 1
87264d
    fi
87264d
    if ! cp --remove-destination "$FILES_PACKET_DIR/launch-opentoonz.sh" "$INSTALL_PACKET_DIR/bin"; then
87264d
        return 1
87264d
    fi
87264d
    if ! cp --remove-destination $BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/.libs/libtiff.so* "$INSTALL_PACKET_DIR/lib"; then
87264d
        return 1
87264d
    fi
87264d
    if ! cp --remove-destination $BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/.libs/libtiffxx.so* "$INSTALL_PACKET_DIR/lib"; then
87264d
        return 1
87264d
    fi
e14835
}