Blame docker-builder-data/build/script/packet/nsis-2.50.sh

18e95a
DEPS="zlib-1.2.11"
18e95a
DEPS_NATIVE="scons-3.0.1"
18e95a
18e95a
PK_DIRNAME="nsis-2.50-src"
18e95a
PK_ARCHIVE="$PK_DIRNAME.tar.bz2"
18e95a
PK_URL="https://sourceforge.net/projects/nsis/files/NSIS%202/2.50/$PK_ARCHIVE"
18e95a
18e95a
#TODO: hardcoded path to mingw binaries
18e95a
#TODO: untracked dependency for zlib win32
18e95a
18e95a
PK_PATH="/usr/local/i686-w64-mingw32/sys-root/bin:$PATH"
18e95a
PK_ZLIB_W32="$PACKET_BUILD_DIR/win-32/zlib-1.2.11/env"
18e95a
PK_NSIS_MAX_STRLEN=131072
18e95a
18e95a
source $INCLUDE_SCRIPT_DIR/inc-pkall-default.sh
18e95a
18e95a
pkbuild() {
18e95a
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME" || return 1
18e95a
18e95a
    pkhelper_patch Contrib/InstallOptions  InstallerOptions.cpp || return 1
18e95a
    pkhelper_patch Contrib/Makensisw       makensisw.h          || return 1
18e95a
    pkhelper_patch SCons/Config            gnu                  || return 1
18e95a
    pkhelper_patch SCons/Tools             crossmingw.py        || return 1
18e95a
    pkhelper_patch Source                  util.h               || return 1
18e95a
18e95a
    LDFLAGS="-static-libgcc -static-libstdc++ $LDFLAGS" \
18e95a
    PATH="$PK_PATH" scons \
18e95a
        PREFIX="$INSTALL_PACKET_DIR" \
18e95a
        ZLIB_W32="$PK_ZLIB_W32" \
18e95a
        SKIPUTILS="NSIS Menu" \
18e95a
        NSIS_MAX_STRLEN=$PK_NSIS_MAX_STRLEN \
18e95a
     || return 1 
18e95a
}
18e95a
18e95a
pkinstall() {
18e95a
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME"
18e95a
    LDFLAGS="-static-libgcc -static-libstdc++ $LDFLAGS" \
18e95a
    PATH="$PK_PATH" scons \
18e95a
        PREFIX="$INSTALL_PACKET_DIR" \
18e95a
        ZLIB_W32="$PK_ZLIB_W32" \
18e95a
        SKIPUTILS="NSIS Menu" \
18e95a
        NSIS_MAX_STRLEN=$PK_NSIS_MAX_STRLEN \
18e95a
        install \
18e95a
     || return 1 
18e95a
}