Blame docker-builder-data/build/script/packet/qt-5.7.sh

cf8c28
DEPS="png-1.6.26 glib-2.50.0"
1b5f3d
1b5f3d
PK_DIRNAME="qt-everywhere-opensource-src-5.7.0"
e14835
PK_ARCHIVE="$PK_DIRNAME.tar.gz"
e14835
PK_URL="http://download.qt.io/official_releases/qt/5.7/5.7.0/single/$PK_ARCHIVE"
1b5f3d
e14835
source $INCLUDE_SCRIPT_DIR/inc-pkallunpack-default.sh
e14835
source $INCLUDE_SCRIPT_DIR/inc-pkinstall_release-default.sh
1b5f3d
cf8c28
if [ "$PLATFORM" = "linux" ]; then
cf8c28
    DEPS="$DEPS xcbfull-1.12"
cf8c28
fi
cf8c28
cf8c28
1b5f3d
pkbuild() {
e14835
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME"
e14835
    
cf8c28
    if ! check_packet_function $NAME build.configure; then
cf8c28
        local LOCAL_OPTIONS=
cf8c28
        if [ "$PLATFORM" = "win" ]; then
cf8c28
            rm -f "qtbase/mkspecs/win32-g++/qmake.conf"
cf8c28
            patch "$UNPACK_PACKET_DIR/$PK_DIRNAME/qtbase/mkspecs/win32-g++/qmake.conf" \
cf8c28
             -i "$FILES_PACKET_DIR/qmake.conf.patch" -o - \
cf8c28
             > "qtbase/mkspecs/win32-g++/qmake.conf"
cf8c28
cf8c28
            rm -f "qtactiveqt/src/tools/idc/idc.pro"
cf8c28
            patch "$UNPACK_PACKET_DIR/$PK_DIRNAME/qtactiveqt/src/tools/idc/idc.pro" \
cf8c28
             -i "$FILES_PACKET_DIR/idc.pro.patch" -o - \
cf8c28
             > "qtactiveqt/src/tools/idc/idc.pro"
cf8c28
cf8c28
            LOCAL_OPTIONS="-xplatform win32-g++ -device-option CROSS_COMPILE=$HOST-"
cf8c28
        fi
cf8c28
                                                                
cf8c28
        native_at_place \
cf8c28
           ./configure \
cf8c28
           -prefix "$INSTALL_PACKET_DIR" \
cf8c28
           $LOCAL_OPTIONS \
cf8c28
           -release \
cf8c28
           -opensource -confirm-license \
cf8c28
           -nomake examples \
cf8c28
         || return 1
cf8c28
cf8c28
        set_done $NAME build.configure
e14835
    fi
e14835
    
cf8c28
    native_at_place make -j${THREADS} || return 1
1b5f3d
}
1b5f3d
1b5f3d
pkinstall() {
e14835
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME"
cf8c28
    make install || return 1
e14835
    
e14835
cat << EOF > "$INSTALL_PACKET_DIR/bin/qt.conf"
e14835
[Paths]
e14835
Prefix=..
e14835
EOF
e14835
e14835
    if [ ! $? -eq 0 ]; then
e14835
        return 1
cf8c28
    fi
1b5f3d
}
192cd8
192cd8
pkhook_postinstall_release() {
192cd8
    cd "$INSTALL_RELEASE_PACKET_DIR" || return 1
192cd8
    rm -rf "examples" || return 1
192cd8
    rm -rf "mkspecs" || return 1
192cd8
    rm -rf "doc" || return 1
192cd8
}