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

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