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

3b09af
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 freeglut-3.0.0 openblas-master boost-1.61.0 qt-5.7"
3b09af
DEPS_NATIVE="cmake-3.6.2"
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() {
e0593e
    if ! check_packet_function $NAME build.libtiff; then
e0593e
        cd "$BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/tiff-4.0.3"
e0593e
        if ! check_packet_function $NAME build.libtiff.configure; then
e0593e
            CFLAGS="$CFLAGS -fPIC" ./configure || return 1
e0593e
            set_done $NAME build.libtiff.configure
e0593e
        fi
e0593e
        make -j${THREADS} || return 1
e0593e
        set_done $NAME build.libtiff
e14835
    fi
cf5576
e0593e
    mkdir -p "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
e0593e
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
e0593e
    if ! check_packet_function $NAME build.configure; then
e0593e
        if ! cmake \
e0593e
              -DCMAKE_PREFIX_PATH="$ENVDEPS_PACKET_DIR" \
e0593e
              -DCMAKE_MODULE_PATH="$ENVDEPS_NATIVE_PACKET_DIR/share/cmake-3.6.2/Modules" \
e0593e
              -DCMAKE_INSTALL_PREFIX="$INSTALL_PACKET_DIR" \
e0593e
              -DPNG_PNG_INCLUDE_DIR="$ENVDEPS_PACKET_DIR/include" \
e0593e
              -DPNG_LIBRARY="$ENVDEPS_PACKET_DIR/lib/libpng.so" \
e0593e
              -DSUPERLU_INCLUDE_DIR="$ENVDEPS_PACKET_DIR/include/superlu-5.2.1/" \
e0593e
              -DSUPERLU_LIBRARY="$ENVDEPS_PACKET_DIR/lib/libsuperlu_5.2.1.a" \
e0593e
              -DLZO_INCLUDE_DIR="/usr/include/lzo" \
e0593e
              ../sources; \
e0593e
        then
e0593e
            return 1
e0593e
        fi
e0593e
        set_done $NAME build.configure
cf5576
    fi
e0593e
87264d
    # making in single thread is too slow, but life is too short...
e0593e
    if ! (make -j${THREADS} || make -j${THREADS} || make); then
e0593e
        return 1
e0593e
    fi
e14835
}
e14835
e14835
pkinstall() {
e14835
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME/toonz/build"
e0593e
    make install || return 1
e0593e
    cp --remove-destination bin/lzo* "$INSTALL_PACKET_DIR/bin" || return 1
e0593e
    cp --remove-destination "$FILES_PACKET_DIR/launch-opentoonz.sh" "$INSTALL_PACKET_DIR/bin" || return 1
e0593e
    cp --remove-destination $BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/.libs/libtiff.so* "$INSTALL_PACKET_DIR/lib" || return 1
e0593e
    cp --remove-destination $BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/.libs/libtiffxx.so* "$INSTALL_PACKET_DIR/lib" || return 1
e14835
}