diff --git a/docker-builder-data/build/script/include/inc-pkall-none.sh b/docker-builder-data/build/script/include/inc-pkall-none.sh index 34e152c..7c77131 100644 --- a/docker-builder-data/build/script/include/inc-pkall-none.sh +++ b/docker-builder-data/build/script/include/inc-pkall-none.sh @@ -29,6 +29,14 @@ PK_CONFIGURE_OPTIONS_DEFAULT=" \ --enable-shared " +pkhelper_patch() { + local FILE_PATH="$1" + local FILE_NAME="$2" + cp --remove-destination "$UNPACK_PACKET_DIR/$PK_DIRNAME/$FILE_PATH/$FILE_NAME" "$FILE_PATH/" || return 1 + patch "$FILE_PATH/$FILE_NAME" "$FILES_PACKET_DIR/$FILE_NAME.patch" || return 1 +} + + pkdownload() { return 0 } diff --git a/docker-builder-data/build/script/packet/nsis-2.50.files/InstallerOptions.cpp.patch b/docker-builder-data/build/script/packet/nsis-2.50.files/InstallerOptions.cpp.patch new file mode 100644 index 0000000..b5bf9eb --- /dev/null +++ b/docker-builder-data/build/script/packet/nsis-2.50.files/InstallerOptions.cpp.patch @@ -0,0 +1,4 @@ +18a19,21 +> #ifndef min +> #define min(a,b) (((a) < (b)) ? (a) : (b)) +> #endif diff --git a/docker-builder-data/build/script/packet/nsis-2.50.files/crossmingw.py.patch b/docker-builder-data/build/script/packet/nsis-2.50.files/crossmingw.py.patch new file mode 100644 index 0000000..d50c4b1 --- /dev/null +++ b/docker-builder-data/build/script/packet/nsis-2.50.files/crossmingw.py.patch @@ -0,0 +1,2 @@ +60a61 +> i686-w64-mingw32- diff --git a/docker-builder-data/build/script/packet/nsis-2.50.files/gnu.patch b/docker-builder-data/build/script/packet/nsis-2.50.files/gnu.patch new file mode 100644 index 0000000..588195f --- /dev/null +++ b/docker-builder-data/build/script/packet/nsis-2.50.files/gnu.patch @@ -0,0 +1,6 @@ +95a96,97 +> makensis_env.Append(LINKFLAGS = ['-static-libgcc']) +> makensis_env.Append(LINKFLAGS = ['-static-libstdc++']) +119a120,121 +> plugin_env.Append(LINKFLAGS = ['-static-libgcc']) +> plugin_env.Append(LINKFLAGS = ['-static-libstdc++']) diff --git a/docker-builder-data/build/script/packet/nsis-2.50.files/makensisw.h.patch b/docker-builder-data/build/script/packet/nsis-2.50.files/makensisw.h.patch new file mode 100644 index 0000000..f5c07c7 --- /dev/null +++ b/docker-builder-data/build/script/packet/nsis-2.50.files/makensisw.h.patch @@ -0,0 +1,2 @@ +25d24 +< #define _WIN32_IE 0x0400 diff --git a/docker-builder-data/build/script/packet/nsis-2.50.files/util.h.patch b/docker-builder-data/build/script/packet/nsis-2.50.files/util.h.patch new file mode 100644 index 0000000..52cb5e3 --- /dev/null +++ b/docker-builder-data/build/script/packet/nsis-2.50.files/util.h.patch @@ -0,0 +1,2 @@ +19a20 +> #include diff --git a/docker-builder-data/build/script/packet/nsis-2.50.sh b/docker-builder-data/build/script/packet/nsis-2.50.sh new file mode 100644 index 0000000..e2181ef --- /dev/null +++ b/docker-builder-data/build/script/packet/nsis-2.50.sh @@ -0,0 +1,45 @@ +DEPS="zlib-1.2.11" +DEPS_NATIVE="scons-3.0.1" + +PK_DIRNAME="nsis-2.50-src" +PK_ARCHIVE="$PK_DIRNAME.tar.bz2" +PK_URL="https://sourceforge.net/projects/nsis/files/NSIS%202/2.50/$PK_ARCHIVE" + +#TODO: hardcoded path to mingw binaries +#TODO: untracked dependency for zlib win32 + +PK_PATH="/usr/local/i686-w64-mingw32/sys-root/bin:$PATH" +PK_ZLIB_W32="$PACKET_BUILD_DIR/win-32/zlib-1.2.11/env" +PK_NSIS_MAX_STRLEN=131072 + +source $INCLUDE_SCRIPT_DIR/inc-pkall-default.sh + +pkbuild() { + cd "$BUILD_PACKET_DIR/$PK_DIRNAME" || return 1 + + pkhelper_patch Contrib/InstallOptions InstallerOptions.cpp || return 1 + pkhelper_patch Contrib/Makensisw makensisw.h || return 1 + pkhelper_patch SCons/Config gnu || return 1 + pkhelper_patch SCons/Tools crossmingw.py || return 1 + pkhelper_patch Source util.h || return 1 + + LDFLAGS="-static-libgcc -static-libstdc++ $LDFLAGS" \ + PATH="$PK_PATH" scons \ + PREFIX="$INSTALL_PACKET_DIR" \ + ZLIB_W32="$PK_ZLIB_W32" \ + SKIPUTILS="NSIS Menu" \ + NSIS_MAX_STRLEN=$PK_NSIS_MAX_STRLEN \ + || return 1 +} + +pkinstall() { + cd "$BUILD_PACKET_DIR/$PK_DIRNAME" + LDFLAGS="-static-libgcc -static-libstdc++ $LDFLAGS" \ + PATH="$PK_PATH" scons \ + PREFIX="$INSTALL_PACKET_DIR" \ + ZLIB_W32="$PK_ZLIB_W32" \ + SKIPUTILS="NSIS Menu" \ + NSIS_MAX_STRLEN=$PK_NSIS_MAX_STRLEN \ + install \ + || return 1 +} diff --git a/docker-builder-data/build/script/packet/opentoonz-nsis.sh b/docker-builder-data/build/script/packet/opentoonz-nsis.sh index ff540d2..9041720 100644 --- a/docker-builder-data/build/script/packet/opentoonz-nsis.sh +++ b/docker-builder-data/build/script/packet/opentoonz-nsis.sh @@ -1,5 +1,5 @@ DEPS="opentoonz-master" -DEPS_NATIVE="nsis-3.02.1" +DEPS_NATIVE="nsis-2.50" pkfunc_register_file() { local FILE=$1 diff --git a/docker-builder-data/build/script/packet/papagayong-master.sh b/docker-builder-data/build/script/packet/papagayong-master.sh index 7f44521..7a49a0d 100644 --- a/docker-builder-data/build/script/packet/papagayong-master.sh +++ b/docker-builder-data/build/script/packet/papagayong-master.sh @@ -1,7 +1,7 @@ DEPS="wxphoenix-master python3pyaudio-master" if [ "$PLATFORM" = "win" ]; then - DEPS_NATIVE="nsis-3.02.1" + DEPS_NATIVE="nsis-2.50" fi PK_DIRNAME="papagayo-ng" diff --git a/docker-builder-data/build/script/packet/synfigstudio-nsis.sh b/docker-builder-data/build/script/packet/synfigstudio-nsis.sh index 47aacc4..daab5df 100644 --- a/docker-builder-data/build/script/packet/synfigstudio-nsis.sh +++ b/docker-builder-data/build/script/packet/synfigstudio-nsis.sh @@ -1,5 +1,5 @@ DEPS="synfigstudio-master" -DEPS_NATIVE="nsis-3.02.1" +DEPS_NATIVE="nsis-2.50" PK_PYTHON_DIRNAME="python" PK_PYTHON_ARCHIVE="portable-python-3.2.5.1.zip"