Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents 50de5b1 + 4f6e7e4 commit c104a41e8073d70167016306a1415a5fe3a14041 @Alexpux Alexpux committed Oct 18, 2013
Showing with 176,022 additions and 709 deletions.
  1. +16 −0 .gitignore
  2. +21 −19 README
  3. +92 −38 build
  4. +3 −2 library/config-nix.sh
  5. +3 −2 library/config-osx.sh
  6. +8 −8 library/config-win.sh
  7. +6 −4 library/default_config.sh
  8. +82 −23 library/functions.sh
  9. +20 −63 library/subtargets.sh
  10. +32 −12 patches/Python/2.7.5/0100-mingw-distutils-MSYS-convert_path-fix-and-root-hack.patch
  11. +23 −10 patches/Python/3.3.0/0075-msys-convert_path-fix-and-root-hack.patch
  12. +0 −44 patches/cloog/cloog-0.18.0-no-undefined.patch
  13. +44 −0 patches/cloog/cloog-0.18.1-no-undefined.patch
  14. +0 −11 patches/make/make-no-output-sync.patch
  15. +173,616 −0 patches/ncurses/ncurses-5.9-dev-20130921.patch
  16. +11 −0 patches/openssl/Makefile.patch
  17. +61 −0 patches/openssl/openssl-0.9.6-x509.patch
  18. +23 −0 patches/openssl/openssl-1.0.0a-ldflags.patch
  19. +76 −0 patches/openssl/openssl-1.0.0d-windres.patch
  20. +32 −0 patches/openssl/openssl-1.0.0h-pkg-config.patch
  21. +678 −0 patches/openssl/openssl-1.0.1-ipv6.patch
  22. +337 −0 patches/openssl/openssl-1.0.1-parallel-build.patch
  23. +79 −0 patches/openssl/openssl-1.0.1-x32.patch
  24. +390 −0 patches/openssl/openssl-1.0.1e-manfix.patch
  25. +29 −0 patches/tk/tk-8.6.1-mingwexcept.patch
  26. +21 −0 patches/tk/tk-8.6.1-prevent-tclStubsPtr-segfault.patch
  27. +23 −4 patches/zlib/01-zlib-1.2.7-1-buildsys.mingw.patch
  28. +22 −5 scripts/3rdparty-post.sh
  29. +2 −1 scripts/binutils.sh
  30. +9 −9 scripts/build-info.sh
  31. +2 −2 scripts/cloog.sh
  32. +0 −53 scripts/fix-path-for-x32-post.sh
  33. +0 −52 scripts/fix-path-for-x32-pre.sh
  34. +0 −53 scripts/fix-path-for-x64-post.sh
  35. +0 −52 scripts/fix-path-for-x64-pre.sh
  36. +1 −1 scripts/gcc-4.6.2.sh
  37. +1 −1 scripts/gcc-4.6.3.sh
  38. +1 −1 scripts/gcc-4.6.4.sh
  39. +1 −1 scripts/gcc-4.7.0.sh
  40. +1 −1 scripts/gcc-4.7.1.sh
  41. +1 −1 scripts/gcc-4.7.2.sh
  42. +1 −1 scripts/gcc-4.7.3.sh
  43. +1 −1 scripts/gcc-4.8.0.sh
  44. +1 −1 scripts/gcc-4.8.1.sh
  45. +65 −11 scripts/{libiconv-x64.sh → gcc-4.8.2.sh}
  46. +1 −1 scripts/gcc-4_6-branch.sh
  47. +1 −1 scripts/gcc-4_7-branch.sh
  48. +2 −1 scripts/gcc-4_8-branch.sh
  49. +46 −34 scripts/gcc-post.sh
  50. +1 −1 scripts/gcc-trunk.sh
  51. +1 −1 scripts/gmp.sh
  52. +1 −1 scripts/{libiconv-x32.sh → libiconv.sh}
  53. +7 −4 scripts/make.sh
  54. +0 −1 scripts/make_git.sh
  55. +0 −1 scripts/make_git_bat.sh
  56. +51 −12 scripts/mingw-w64-runtime-post.sh
  57. +1 −1 scripts/mingw-w64-tools-widl.sh
  58. +11 −3 scripts/ncurses.sh
  59. +31 −24 scripts/{zlib-x64.sh → openssl.sh}
  60. +3 −9 scripts/python-2.7.3.sh
  61. +3 −9 scripts/python-2.7.4.sh
  62. +3 −9 scripts/python-2.7.5.sh
  63. +3 −9 scripts/python-3.3.0.sh
  64. +1 −0 scripts/readline.sh
  65. +4 −2 scripts/tests.sh
  66. +4 −1 scripts/tk.sh
  67. +0 −82 scripts/winpthreads-x32.sh
  68. +1 −1 scripts/{winpthreads-x64.sh → winpthreads.sh}
  69. +7 −12 scripts/{zlib-x32.sh → zlib.sh}
  70. +4 −2 todo.txt
View
16 .gitignore
@@ -0,0 +1,16 @@
+/toolchains
+*.exe
+*.bat
+*.7z
+*.zip
+*.bz2
+*.gz
+*.xz
+*.lzma
+*.tmp
+*.bak
+*.orig
+*.rej
+*.old
+*.log
+*.marker
View
40 README
@@ -23,24 +23,25 @@ MSYS2:
"cd && cd mingw-w64-builds"
7. Options:
- '--mode=[gcc|python|clang]-version' option specifies building software with version.
- '--arch=<i686|x86_64>' option specifies the architecture.
- '--buildroot=<path>' option specifies to the script to use '<path>' as build directory.
- By default used MSYS user home directory.
- '--fetch-only' option specifies to the script only to download all the sources
- without start building.
- '--update-sources' - try to update sources from repositories before build.
- '--exceptions=model' option specifies to the script using exceptions handling
- model. Available models are: dwarf, seh(for gcc>=4.8.0 only), sjlj.
- '--use-lto' option specifies to the script to build with using LTO.
- '--no-strip' option specifies to the script to install without striping.
- '--no-multilib' option specifies to the script to build without multilib support.
- '--dyn-deps' option specifies to the script to build GCC with dynamically dependencies.
- '--rt-version' option specifies what version of mingw-w64 runtime to build.
- '--rev=N' option specifies to the script the number of the build revision.
- '--threads=model' option specifies to the script the used threads model.
- '--enable-languages=<langs>' option specifies a comma separated list(without spaces)
- of gcc supported languages. available languages: ada,c,c++,fortran,obj-c,obj-c++
+ '--mode=[gcc|python|clang]-version' - what package to build with version.
+ '--arch=<i686|x86_64>' - build architecture.
+ '--buildroot=<path>' - using '<path>' as build directory.
+ By default used MSYS user home directory.
+ '--fetch-only' - only download all the sources without start building.
+ '--update-sources' - try to update sources from repositories before build.
+ '--exceptions=<model>' - exceptions handling model.
+ Available: dwarf, seh(gcc>=4.8.0 only), sjlj.
+ '--use-lto' - building with using LTO.
+ '--no-strip' - don't strip executables during install.
+ '--no-multilib' - build GCC without multilib support (default for DWARF and SEH exception models).
+ '--static-gcc' - build static GCC.
+ '--dyn-deps' - build GCC with dynamically dependencies.
+ '--rt-version=<v3|v4>' - version of mingw-w64 runtime to build.
+ '--rev=N' - number of the build revision.
+ '--with-testsuite' - run testsuite for packages that contain flags for it.
+ '--threads=<posix|win32>' - used threads model.
+ '--enable-languages=<langs>' - comma separated list(without spaces) of gcc supported languages.
+ available languages: ada,c,c++,fortran,objc,obj-c++
For more options run: "./build --help"
8. Run:
@@ -78,9 +79,10 @@ At the moment, successfully building the following versions:
gcc-4.7.3
gcc-4.8.0
gcc-4.8.1
+ gcc-4.8.2
gcc-4_6-branch (currently 4.6.5 prerelease)
gcc-4_7-branch (currently 4.7.4 prerelease)
- gcc-4_8-branch (currently 4.8.2 prerelease)
+ gcc-4_8-branch (currently 4.8.3 prerelease)
gcc-trunk (currently 4.9.0 snapshot)
Builds also contains patches for building Python 2.7.3, 2.7.4, 2.7.5 and 3.3.0 versions for support gdb pretty printers.
View
130 build
@@ -48,9 +48,9 @@ source library/default_config.sh
# **************************************************************************
readonly RUN_ARGS="$@"
-[[ $# == 1 && $1 == --help || $[ $# == 0 ] == 1 ]] && {
+[[ $# == 1 && $1 == --help || $[ $# == 0 ] == 1 ]] && {
echo "usage:"
- echo " ./${0##*/} --mode=[clang|gcc|python]-version --arch=<x32|x64> [OPTIONS]"
+ echo " ./${0##*/} --mode=[clang|gcc|python]-version --arch=<i686|x86_64> [OPTIONS]"
echo " help:"
echo " --buildroot=<path> - specifies the build root directory"
echo " --fetch-only - download sources without building"
@@ -61,14 +61,16 @@ readonly RUN_ARGS="$@"
echo " --bootstrap - bootstraping GCC"
echo " --no-multilib - build GCC without multilib support"
echo " --no-strip - don't strip dll's & executables on install"
+ echo " --static-gcc - build static GCC"
echo " --dyn-deps - build GCC with dynamically dependencies"
echo " --jobs=N - specifies number of parallel make threads"
- echo " --rt-version=<v3|v4|trunk> - specifies mingw-w64 runtime version to build"
+ echo " --rt-version=<v3|v4|trunk> - specifies mingw-w64 runtime version to build"
echo " --rev=N - specifies number of the build revision"
echo " --threads=<model> - specifies the threads model for GCC/libstdc++"
echo " available: win32, posix"
- echo " --arch=<i686|x86_64> - specifies the architecture"
+ echo " --arch=<i686|x86_64> - specifies the architecture"
echo " --mode=<[clang|gcc|python]-version> - specify building software with version"
+ echo " --with-testsuite - run testsuite for packages if possible"
echo " --version - print the version of the MinGW-W64 builds scripts"
echo " --mingw-compress - compressing MinGW"
echo " --src-compress - compressing sources"
@@ -102,10 +104,10 @@ readonly RUN_ARGS="$@"
#echo " gcc-4.7.4 (4.7.4 release)"
echo " gcc-4.8.0 (4.8.0 release)"
echo " gcc-4.8.1 (4.8.1 release)"
- #echo " gcc-4.8.2 (4.8.2 release)"
+ echo " gcc-4.8.2 (4.8.2 release)"
echo " gcc-4_6-branch (currently 4.6.5-prerelease)"
echo " gcc-4_7-branch (currently 4.7.4-prerelease)"
- echo " gcc-4_8-branch (currently 4.8.2-prerelease)"
+ echo " gcc-4_8-branch (currently 4.8.3-prerelease)"
echo " gcc-trunk (currently 4.9.0-snapshot)"
exit 0
@@ -165,9 +167,17 @@ while [[ $# > 0 ]]; do
;;
--no-multilib) USE_MULTILIB=no ;;
--no-strip) STRIP_ON_INSTALL=no ;;
+ --static-gcc)
+ LINK_TYPE_GCC=$LINK_TYPE_STATIC
+ GCC_DEPS_LINK_TYPE=$LINK_TYPE_STATIC
+ BUILD_SHARED_GCC=no
+ LINK_TYPE_SUFFIX=static
+ ;;
--dyn-deps)
- GCC_DEPS_LINK_TYPE=$LINK_TYPE_SHARED
- LINK_TYPE_SUFFIX=shared
+ [[ $BUILD_SHARED_GCC == yes ]] && {
+ GCC_DEPS_LINK_TYPE=$LINK_TYPE_SHARED
+ LINK_TYPE_SUFFIX=shared
+ }
;;
--jobs=*)
[[ ${1/--jobs=/} == 0 ]] && {
@@ -225,6 +235,9 @@ while [[ $# > 0 ]]; do
REV_NUM=${1/--rev=/}
MINGW_W64_PKG_STRING="rev$REV_NUM, $MINGW_W64_PKG_STRING"
;;
+ --with-testsuite)
+ PKG_RUN_TESTSUITE=yes
+ ;;
--version) echo $MINGW_W64_BUILDS_VERSION; exit 0 ;;
--mingw-compress) COMPRESSING_MINGW=yes ;;
--src-compress) COMPRESSING_SRCS=yes ;;
@@ -333,13 +346,19 @@ readonly PREREQ_LOGS_DIR=$ROOT_DIR/prerequisites-logs
GCC_PART_NAME=${GCC_NAME/gcc-/}
GCC_PART_NAME=${GCC_PART_NAME/-branch/b}
readonly GCC_PART_NAME=${GCC_PART_NAME//./}
- readonly BASE_BUILD_DIR=$ROOT_DIR/${BUILD_ARCHITECTURE}-$GCC_PART_NAME-$THREADS_MODEL-$EXCEPTIONS_MODEL-rt_${RUNTIME_VERSION}${REV_STRING}
- readonly PREFIX=$BASE_BUILD_DIR/mingw$(func_get_arch_bit ${BUILD_ARCHITECTURE})
- readonly MINGWPREFIX=/mingw$(func_get_arch_bit ${BUILD_ARCHITECTURE})
+ BASE_BUILD_DIR=$ROOT_DIR/${BUILD_ARCHITECTURE}-$GCC_PART_NAME-$THREADS_MODEL-$EXCEPTIONS_MODEL-rt_${RUNTIME_VERSION}${REV_STRING}
MINGW_BUILD_NAME=${BUILD_ARCHITECTURE}-${GCC_NAME/gcc-/}
+ [[ $BUILD_SHARED_GCC == no ]] && {
+ BASE_BUILD_DIR=$BASE_BUILD_DIR-s
+ MINGW_BUILD_NAME=$MINGW_BUILD_NAME-static
+ }
MINGW_BUILD_NAME=$MINGW_BUILD_NAME$([[ $USE_MULTILIB == yes ]] && echo -n -multilib)-$THREADS_MODEL-$EXCEPTIONS_MODEL
readonly MINGW_BUILD_NAME=$MINGW_BUILD_NAME-rt_${RUNTIME_VERSION}$([[ -n $REV_NUM ]] && echo -n -rev$REV_NUM)
+ readonly MINGWPREFIX=/mingw$(func_get_arch_bit ${BUILD_ARCHITECTURE})
+ readonly PREFIX=${BASE_BUILD_DIR}${MINGWPREFIX}
+ readonly LIBS_DIR=$PREFIX/opt
+
[[ $USE_MULTILIB == yes ]] && {
readonly PROCESSOR_OPTIMIZATION="--with-arch-32=$PROCESSOR_OPTIMIZATION_ARCH_32 --with-arch-64=$PROCESSOR_OPTIMIZATION_ARCH_64"
readonly PROCESSOR_TUNE="--with-tune-32=$PROCESSOR_OPTIMIZATION_TUNE_32 --with-tune-64=$PROCESSOR_OPTIMIZATION_TUNE_64"
@@ -355,10 +374,10 @@ readonly PREREQ_LOGS_DIR=$ROOT_DIR/prerequisites-logs
} || {
readonly BASE_BUILD_DIR=$ROOT_DIR/$BUILD_MODE-${BUILD_ARCHITECTURE}$REV_STRING
readonly PREFIX=$BASE_BUILD_DIR/${BUILD_MODE_VERSION}-${BUILD_ARCHITECTURE}
+ readonly LIBS_DIR=$PREFIX
}
readonly BUILDS_DIR=$BASE_BUILD_DIR/build
-readonly LIBS_DIR=$BASE_BUILD_DIR/libs
readonly LOGS_DIR=$BASE_BUILD_DIR/logs
mkdir -p \
@@ -379,48 +398,44 @@ mkdir -p \
# **************************************************************************
-[[ $LINK_TYPE_SUFFIX == shared ]] && {
- readonly x32_PATH=$PREREQ_DIR/$x32_HOST-$LINK_TYPE_SUFFIX/bin:$LIBS_DIR/bin:$x32_HOST_MINGW_PATH/bin:$ORIGINAL_PATH
- readonly x64_PATH=$PREREQ_DIR/$x64_HOST-$LINK_TYPE_SUFFIX/bin:$LIBS_DIR/bin:$x64_HOST_MINGW_PATH/bin:$ORIGINAL_PATH
-} || {
- readonly x32_PATH=$x32_HOST_MINGW_PATH/bin:$LIBS_DIR/bin:$ORIGINAL_PATH
- readonly x64_PATH=$x64_HOST_MINGW_PATH/bin:$LIBS_DIR/bin:$ORIGINAL_PATH
-}
-
-# **************************************************************************
-
case $BUILD_ARCHITECTURE in
i686)
- [[ ! -f $x32_HOST_MINGW_PATH/bin/gcc ]] && {
- die "gcc is not exists in the \"$x32_HOST_MINGW_PATH/bin\" directory. terminate."
+ [[ ! -f $i686_HOST_MINGW_PATH/bin/gcc ]] && {
+ die "gcc is not exists in the \"$i686_HOST_MINGW_PATH/bin\" directory. terminate."
}
- export PATH="$x32_PATH"
+ export PATH=$LIBS_DIR/bin:$i686_HOST_MINGW_PATH/bin:$ORIGINAL_PATH
;;
x86_64)
- [[ ! -f $x64_HOST_MINGW_PATH/bin/gcc ]] && {
- die "gcc is not exists in the \"$x64_HOST_MINGW_PATH/bin\" directory. terminate."
+ [[ ! -f $x86_64_HOST_MINGW_PATH/bin/gcc ]] && {
+ die "gcc is not exists in the \"$x86_64_HOST_MINGW_PATH/bin\" directory. terminate."
}
- export PATH="$x64_PATH"
+ export PATH=$LIBS_DIR/bin:$x86_64_HOST_MINGW_PATH/bin:$ORIGINAL_PATH
;;
esac
+[[ $LINK_TYPE_SUFFIX == shared ]] && {
+ export PATH=$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/bin:$PREREQ_DIR/$BUILD_ARCHITECTURE-libiconv-$LINK_TYPE_SUFFIX/bin:$PREREQ_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/bin:$PATH
+}
+
# **************************************************************************
+readonly REVERSE_HOST=$(func_get_reverse_triplet $HOST)
+readonly REVERSE_BUILD=$(func_get_reverse_triplet $BUILD)
+readonly REVERSE_TARGET=$(func_get_reverse_triplet $TARGET)
+readonly REVERSE_ARCHITECTURE=$(func_get_reverse_arch $BUILD_ARCHITECTURE)
+
[[ $USE_MULTILIB == yes ]] && {
- readonly REVERSE_HOST=$(func_get_reverse_triplet $HOST)
- readonly REVERSE_BUILD=$(func_get_reverse_triplet $BUILD)
- readonly REVERSE_TARGET=$(func_get_reverse_triplet $TARGET)
readonly ENABLE_TARGETS=${TARGET},${REVERSE_TARGET}
} || {
readonly ENABLE_TARGETS=$TARGET
}
# **************************************************************************
-readonly COMMON_CFLAGS="$BASE_CFLAGS -I$LIBS_DIR/include -I$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib/include -I$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/include"
+readonly COMMON_CFLAGS="$BASE_CFLAGS -I$LIBS_DIR/include -I$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib-$LINK_TYPE_SUFFIX/include -I$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/include"
readonly COMMON_CXXFLAGS="$COMMON_CFLAGS"
readonly COMMON_CPPFLAGS="$BASE_CPPFLAGS"
-readonly COMMON_LDFLAGS="$BASE_LDFLAGS -L$LIBS_DIR/lib -L$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib/lib -L$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/lib -L$PREFIX/opt/lib"
+readonly COMMON_LDFLAGS="$BASE_LDFLAGS -L$LIBS_DIR/lib -L$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib-$LINK_TYPE_SUFFIX/lib -L$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/lib"
# **************************************************************************
@@ -452,15 +467,28 @@ readonly SUBTARGETS=( \
) \
)
-for sub in ${SUBTARGETS[@]}; do
+for rule in ${SUBTARGETS[@]}; do
func_clear_env
+ rule_arr=( ${rule//|/ } )
+ sub=${rule_arr[0]}
+ PKG_ARCHITECTURE=${rule_arr[1]}
+ [[ -z $PKG_ARCHITECTURE ]] && {
+ PKG_ARCHITECTURE=$BUILD_ARCHITECTURE
+ echo -e "-> \E[32;40m$sub\E[37;40m"
+ } || {
+ echo -e "-> \E[32;40m$sub-$PKG_ARCHITECTURE\E[37;40m"
+ }
+
[[ ! -f $TOP_DIR/scripts/$sub.sh ]] && {
die "script for subtarget \"$sub\" is not exists. terminate."
}
[[ $FETCH_MODE == yes ]] && {
[[ -z $( grep 'PKG_URLS=' $TOP_DIR/scripts/${sub}.sh ) ]] && continue
}
- echo -e "-> \E[32;40m$sub\E[37;40m"
+
+ [[ "$PKG_ARCHITECTURE" == "$REVERSE_ARCHITECTURE" ]] && {
+ switch_to_reverse_arch $PKG_ARCHITECTURE
+ }
source $TOP_DIR/scripts/$sub.sh
@@ -480,10 +508,11 @@ for sub in ${SUBTARGETS[@]}; do
CURR_BUILD_DIR=$BUILDS_DIR
;;
esac
-
+
CONFIGURE_LOG=$CURR_LOGS_DIR/$PKG_NAME/configure.log
MAKE_LOG=$CURR_LOGS_DIR/$PKG_NAME/make.log
INSTALL_LOG=$CURR_LOGS_DIR/$PKG_NAME/install.log
+ TESTSUITE_LOG=$CURR_LOGS_DIR/$PKG_NAME/testsuite.log
mkdir -p $SRCS_DIR/$PKG_DIR_NAME
mkdir -p {$CURR_LOGS_DIR/,$CURR_BUILD_DIR/}$PKG_NAME
@@ -524,6 +553,11 @@ for sub in ${SUBTARGETS[@]}; do
PKG_EXECUTE_AFTER_PATCH[@]
}
+ [[ -z $PKG_LNDIR ]] && { PKG_LNDIR=no; }
+ [[ -z $PKG_CONFIGURE_SCRIPT ]] && { PKG_CONFIGURE_SCRIPT=configure; }
+ [[ -z $PKG_MAKE_PROG ]] && { PKG_MAKE_PROG=/bin/make; }
+ [[ -z $PKG_CONFIGURE_PROG ]] && { PKG_CONFIGURE_PROG=/bin/sh; }
+
[[ ${#PKG_CONFIGURE_FLAGS[@]} >0 ]] && {
configure_flags="${PKG_CONFIGURE_FLAGS[@]}"
func_configure \
@@ -532,6 +566,7 @@ for sub in ${SUBTARGETS[@]}; do
"$configure_flags" \
$CONFIGURE_LOG \
$CURR_BUILD_DIR \
+ $PKG_LNDIR \
$PKG_SUBDIR_NAME
}
@@ -546,7 +581,7 @@ for sub in ${SUBTARGETS[@]}; do
}
[[ ${#PKG_MAKE_FLAGS[@]} >0 ]] && {
- make_flags="/bin/make ${PKG_MAKE_FLAGS[@]}"
+ make_flags="$PKG_MAKE_PROG ${PKG_MAKE_FLAGS[@]}"
func_make \
$PKG_NAME \
$PKG_DIR_NAME \
@@ -559,7 +594,7 @@ for sub in ${SUBTARGETS[@]}; do
}
[[ ${#PKG_INSTALL_FLAGS[@]} >0 ]] && {
- install_flags="/bin/make ${PKG_INSTALL_FLAGS[@]}"
+ install_flags="$PKG_MAKE_PROG ${PKG_INSTALL_FLAGS[@]}"
func_make \
$PKG_NAME \
$PKG_DIR_NAME \
@@ -580,6 +615,25 @@ for sub in ${SUBTARGETS[@]}; do
$CURR_LOGS_DIR \
PKG_EXECUTE_AFTER_INSTALL[@]
}
+
+ [[ $PKG_RUN_TESTSUITE == yes ]] && {
+ [[ ${#PKG_TESTSUITE_FLAGS[@]} >0 ]] && {
+ testsuite_flags="$PKG_MAKE_PROG ${PKG_TESTSUITE_FLAGS[@]}"
+ func_make \
+ $PKG_NAME \
+ $PKG_DIR_NAME \
+ "$testsuite_flags" \
+ $TESTSUITE_LOG \
+ "run testsuite..." \
+ "tested" \
+ $CURR_BUILD_DIR \
+ $PKG_SUBDIR_NAME
+ }
+ }
+ }
+
+ [[ "$PKG_ARCHITECTURE" == "$REVERSE_ARCHITECTURE" ]] && {
+ switch_back_to_arch
}
done
View
5 library/config-nix.sh
@@ -34,8 +34,8 @@
# **************************************************************************
-readonly x32_HOST_MINGW_PATH_URL=
-readonly x64_HOST_MINGW_PATH_URL=
+readonly i686_HOST_MINGW_PATH_URL=
+readonly x86_64_HOST_MINGW_PATH_URL=
# **************************************************************************
@@ -45,6 +45,7 @@ TARGET=$BUILD_ARCHITECTURE-w64-mingw32
readonly HOST_TOOLS="gcc ld"
readonly CROSS_BUILDS=yes
+readonly PKG_RUN_TESTSUITE=no
# **************************************************************************
View
5 library/config-osx.sh
@@ -34,8 +34,8 @@
# **************************************************************************
-readonly x32_HOST_MINGW_PATH_URL=
-readonly x64_HOST_MINGW_PATH_URL=
+readonly i686_HOST_MINGW_PATH_URL=
+readonly x86_64_HOST_MINGW_PATH_URL=
# **************************************************************************
@@ -45,6 +45,7 @@ TARGET=$BUILD_ARCHITECTURE-w64-mingw32
readonly HOST_TOOLS="gcc ld"
readonly CROSS_BUILDS=yes
+readonly PKG_RUN_TESTSUITE=no
# **************************************************************************
View
16 library/config-win.sh
@@ -34,8 +34,8 @@
# **************************************************************************
-readonly x32_HOST_MINGW_PATH_URL=http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/32-bit/threads-posix/sjlj/x32-4.8.1-release-posix-sjlj-rev5.7z
-readonly x64_HOST_MINGW_PATH_URL=http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/64-bit/threads-posix/sjlj/x64-4.8.1-release-posix-sjlj-rev5.7z
+readonly i686_HOST_MINGW_PATH_URL="http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.1/threads-posix/sjlj/i686-4.8.1-release-posix-sjlj-rt_v3-rev2.7z"
+readonly x86_64_HOST_MINGW_PATH_URL="http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.8.1/threads-posix/sjlj/x86_64-4.8.1-release-posix-sjlj-rt_v3-rev2.7z"
# **************************************************************************
@@ -60,8 +60,8 @@ readonly LOGVIEWERS=(
# **************************************************************************
-[[ -z $x32_HOST_MINGW_PATH_URL || -z $x64_HOST_MINGW_PATH_URL ]] && {
- die "x32_HOST_MINGW_PATH_URL or x64_HOST_MINGW_PATH_URL is empty. terminate."
+[[ -z $i686_HOST_MINGW_PATH_URL || -z $x86_64_HOST_MINGW_PATH_URL ]] && {
+ die "i686_HOST_MINGW_PATH_URL or x86_64_HOST_MINGW_PATH_URL is empty. terminate."
}
[[ -d /mingw ]] && {
@@ -87,9 +87,9 @@ mkdir -p $TOOLCHAINS_DIR
func_install_toolchain \
$TOOLCHAINS_DIR \
- $x32_HOST_MINGW_PATH \
- $x64_HOST_MINGW_PATH \
- $x32_HOST_MINGW_PATH_URL \
- $x64_HOST_MINGW_PATH_URL
+ $i686_HOST_MINGW_PATH \
+ $x86_64_HOST_MINGW_PATH \
+ $i686_HOST_MINGW_PATH_URL \
+ $x86_64_HOST_MINGW_PATH_URL
# **************************************************************************
View
10 library/default_config.sh
@@ -34,7 +34,7 @@
# **************************************************************************
-MINGW_W64_BUILDS_VERSION="MinGW-W64-builds-4.0.0"
+MINGW_W64_BUILDS_VERSION="MinGW-W64-builds-4.1.0"
MINGW_W64_PKG_STRING="Built by MinGW-W64 project"
# **************************************************************************
@@ -56,8 +56,8 @@ readonly SOURCES_DIR=$TOP_DIR/sources
readonly TESTS_DIR=$TOP_DIR/tests
readonly TOOLCHAINS_DIR=$TOP_DIR/toolchains
-readonly x32_HOST_MINGW_PATH=$TOOLCHAINS_DIR/mingw32
-readonly x64_HOST_MINGW_PATH=$TOOLCHAINS_DIR/mingw64
+readonly i686_HOST_MINGW_PATH=$TOOLCHAINS_DIR/mingw32
+readonly x86_64_HOST_MINGW_PATH=$TOOLCHAINS_DIR/mingw64
ROOT_DIR=$(func_simplify_path "$HOME")
@@ -78,6 +78,7 @@ PROCESSOR_OPTIMIZATION_ARCH_64='nocona'
LINK_TYPE_BOTH="--enable-shared --enable-static"
LINK_TYPE_SHARED="--enable-shared --disable-static"
LINK_TYPE_STATIC="--enable-static --disable-shared"
+LINK_TYPE_GCC=$LINK_TYPE_BOTH
GCC_DEPS_LINK_TYPE=$LINK_TYPE_STATIC
ENABLE_LANGUAGES='ada,c,c++,fortran,objc,obj-c++'
@@ -108,7 +109,8 @@ SF_USER=
SF_PASSWORD=
DEBUG_UPLOAD=no
LINK_TYPE_SUFFIX=static
-
+BUILD_SHARED_GCC=yes
+PKG_RUN_TESTSUITE=no
BUILD_MODE=
BUILD_MODE_VERSION=
BUILD_VERSION=
View
105 library/functions.sh
@@ -35,6 +35,7 @@
# **************************************************************************
function func_clear_env {
+ unset PKG_ARCHITECTURE
unset PKG_NAME
unset PKG_VERSION
unset PKG_DIR_NAME
@@ -43,6 +44,7 @@ function func_clear_env {
unset PKG_TYPE
unset PKG_REVISION
unset PKG_URLS
+ unset PKG_LNDIR
unset PKG_EXECUTE_AFTER_DOWNLOAD
unset PKG_EXECUTE_AFTER_UNCOMPRESS
unset PKG_PATCHES
@@ -52,6 +54,37 @@ function func_clear_env {
unset PKG_MAKE_FLAGS
unset PKG_INSTALL_FLAGS
unset PKG_EXECUTE_AFTER_INSTALL
+ unset PKG_TESTSUITE_FLAGS
+ unset PKG_CONFIGURE_SCRIPT
+ unset PKG_MAKE_PROG
+ unset PKG_CONFIGURE_PROG
+}
+
+function switch_to_reverse_arch {
+ # $1 - architecture to switch
+ ORIG_ARCH_PATH=$PATH
+ local _arch_gcc_path=$(eval "echo \${${1}_HOST_MINGW_PATH}")
+ export PATH=$_arch_gcc_path/bin:$ORIGINAL_PATH
+
+ OLD_HOST=$HOST
+ OLD_BUILD=$BUILD
+ OLD_TARGET=$TARGET
+ HOST=$REVERSE_HOST
+ BUILD=$REVERSE_BUILD
+ TARGET=$REVERSE_TARGET
+}
+
+function switch_back_to_arch {
+ export PATH=$ORIG_ARCH_PATH
+
+ HOST=$OLD_HOST
+ BUILD=$OLD_BUILD
+ TARGET=$OLD_TARGET
+
+ unset ORIG_ARCH_PATH
+ unset OLD_HOST
+ unset OLD_BUILD
+ unset OLD_TARGET
}
# **************************************************************************
@@ -320,7 +353,7 @@ function func_download {
}
[[ ! -f $_marker_name || $_repo_update == yes ]] && {
[[ $_is_repo == yes ]] && {
- echo -n "--> download $_filename..."
+ echo -n "--> checkout $_filename..."
[[ -n $_dir ]] && {
_lib_name=$_root/$_filename
@@ -342,10 +375,12 @@ function func_download {
svn)
[[ -d $_lib_name/.svn ]] && {
pushd $_lib_name > /dev/null
+ svn-clean -f > $_log_name 2>&1
+ svn revert -R ./ >> $_log_name 2>&1
[[ -n $_rev ]] && {
- svn up -r $_rev > $_log_name 2>&1
+ svn up -r $_rev >> $_log_name 2>&1
} || {
- svn up > $_log_name 2>&1
+ svn up >> $_log_name 2>&1
}
popd > /dev/null
} || {
@@ -364,7 +399,9 @@ function func_download {
git)
[[ -d $_lib_name/.git ]] && {
pushd $_lib_name > /dev/null
- git pull > $_log_name 2>&1
+ git clean -f > $_log_name 2>&1
+ git reset --hard >> $_log_name 2>&1
+ git pull >> $_log_name 2>&1
popd > /dev/null
} || {
[[ -n $_branch ]] && {
@@ -445,9 +482,13 @@ function func_uncompress {
done
_lib_name=${_root}/${_dir}
- _filename=$(basename ${_params[0]})
- _log_name=$MARKERS_DIR/${_filename}-unpack.log
- _marker_name=$MARKERS_DIR/${_filename}-unpack.marker
+ _filename=$(basename ${_params[0]})
+ local _log_dir=$SRCS_DIR/$PKG_DIR_NAME
+ [[ -n $2 ]] && {
+ _log_dir=$2
+ }
+ _log_name=$_log_dir/${_filename}-unpack.log
+ _marker_name=$_log_dir/${_filename}-unpack.marker
_ext=$(func_get_filename_extension $_filename)
[[ $_ext == .tar.gz || $_ext == .tar.bz2 || $_ext == .tar.lzma || $_ext == .tar.xz \
|| $_ext == .tar.7z || $_ext == .7z || $_ext == .tgz || $_ext == .zip ]] && {
@@ -608,21 +649,34 @@ function func_configure {
# $3 - flags
# $4 - log file name
# $5 - build dir
- # $6 - build subdir
-
+ # $6 - lndir
+ # $7 - build subdir
+
+ [[ $6 == yes ]] && {
+ mkdir -p $5/$1
+ [[ ! -f $5/$1/lndir.marker ]] && {
+ lndir $SRCS_DIR/$2 $5/$1 > /dev/null
+ touch $5/$1/lndir.marker
+ }
+ }
local _marker=$5/$1/_configure.marker
local _result=0
- local _subbuilddir=$2
- local _subsrcdir=$1
- [[ -n $6 ]] && {
- _subbuilddir=$_subbuilddir/$6
- _subsrcdir=$_subsrcdir/$6
+ local _subsrcdir=$2
+ local _subbuilddir=$1
+ [[ -n $7 ]] && {
+ _subbuilddir=$_subbuilddir/$7
+ _subsrcdir=$_subsrcdir/$7
}
[[ ! -f $_marker ]] && {
echo -n "--> configure..."
- pushd $5/$_subsrcdir > /dev/null
- eval $( func_absolute_to_relative $5/$_subsrcdir $SRCS_DIR/$_subbuilddir )/configure "${3}" > $4 2>&1
+ pushd $5/$_subbuilddir > /dev/null
+ [[ $6 == yes ]] && {
+ local _rel_dir="."
+ } || {
+ local _rel_dir=$( func_absolute_to_relative $5/$_subbuilddir $SRCS_DIR/$_subsrcdir )
+ }
+ eval $PKG_CONFIGURE_PROG $_rel_dir/$PKG_CONFIGURE_SCRIPT "${3}" > $4 2>&1
_result=$?
popd > /dev/null
[[ $_result == 0 ]] && {
@@ -771,7 +825,7 @@ function func_abstract_toolchain {
local _do_install=no
echo -e "-> \E[32;40m$4 toolchain\E[37;40m"
- [[ ! -f $MARKERS_DIR/${_filename}-unpack.marker ]] && {
+ [[ ! -f $1/${_filename}-unpack.marker ]] && {
[[ -d $3 ]] && {
echo "--> Found previously installed $4 toolchain."
echo -n "---> Remove previous $4 toolchain..."
@@ -781,7 +835,7 @@ function func_abstract_toolchain {
echo -n "--> $4 toolchain is not installed."
}
func_download _url[@]
- func_uncompress _url[@]
+ func_uncompress _url[@] $1
} || {
echo "--> Toolchain installed."
}
@@ -835,7 +889,7 @@ function func_map_gcc_name_to_gcc_version {
gcc-?.?.?) echo "${1/gcc-/}" ;;
gcc-4_6-branch) echo "4.6.5" ;;
gcc-4_7-branch) echo "4.7.4" ;;
- gcc-4_8-branch) echo "4.8.2" ;;
+ gcc-4_8-branch) echo "4.8.3" ;;
gcc-4_9-branch) echo "4.9.1" ;;
gcc-trunk) echo "4.9.0" ;;
*) die "gcc name error: $1. terminate." ;;
@@ -850,7 +904,11 @@ function func_map_gcc_name_to_gcc_build_name {
local _gcc_type=$(func_map_gcc_name_to_gcc_type $2)
local _gcc_version=$(func_map_gcc_name_to_gcc_version $2)
- local _build_name=$_gcc_version-$_gcc_type
+ local _build_name=$_gcc_version
+ [[ $BUILD_SHARED_GCC == no ]] && {
+ _build_name=$_build_name-static
+ }
+ _build_name=$_build_name-$_gcc_type
[[ $_gcc_type != release ]] && {
case $2 in
@@ -882,8 +940,9 @@ function func_create_mingw_archive_name {
$3 \
)-$6-$5
+ _archive=$_archive-rt_${RUNTIME_VERSION}
[[ -n $7 ]] && {
- _archive=$_archive-rt_${RUNTIME_VERSION}-rev$7
+ _archive=$_archive-rev$7
}
echo "$_archive.7z"
@@ -932,7 +991,7 @@ function func_create_mingw_upload_cmd {
_upload_cmd="$_upload_cmd/testing/$_gcc_version"
}
- _upload_cmd="$_upload_cmd/$( [[ $6 == x32 ]] && echo 32-bit || echo 64-bit )/threads-$7/$8"
+ _upload_cmd="$_upload_cmd/$( [[ $6 == i686 ]] && echo 32-bit || echo 64-bit )/threads-$7/$8"
echo "$_upload_cmd"
}
@@ -968,7 +1027,7 @@ function func_create_url_for_archive {
_upload_url="$_upload_url/testing/$_gcc_version"
}
- echo "$_upload_url/$( [[ $3 == x32 ]] && echo 32-bit || echo 64-bit )/threads-$4/$5"
+ echo "$_upload_url/$( [[ $3 == i686 ]] && echo 32-bit || echo 64-bit )/threads-$4/$5"
}
function func_update_repository_file {
View
83 library/subtargets.sh
@@ -35,45 +35,9 @@
# **************************************************************************
function fun_get_subtargets {
- # $1 - mode (gcc, clang, python)
+ # $1 - mode (gcc, clang, python)
# $2 - version
- local readonly LIBICONV_X32_SUBTARGETS=(
- fix-path-for-x32-pre
- libiconv-x32
- fix-path-for-x32-post
- )
-
- local readonly LIBICONV_X64_SUBTARGETS=(
- fix-path-for-x64-pre
- libiconv-x64
- fix-path-for-x64-post
- )
-
- local readonly WINPTHREADS_X32_SUBTARGETS=(
- fix-path-for-x32-pre
- winpthreads-x32
- fix-path-for-x32-post
- )
-
- local readonly WINPTHREADS_X64_SUBTARGETS=(
- fix-path-for-x64-pre
- winpthreads-x64
- fix-path-for-x64-post
- )
-
- local readonly ZLIB_X32_SUBTARGETS=(
- fix-path-for-x32-pre
- zlib-x32
- fix-path-for-x32-post
- )
-
- local readonly ZLIB_X64_SUBTARGETS=(
- fix-path-for-x64-pre
- zlib-x64
- fix-path-for-x64-post
- )
-
local readonly SUBTARGETS_PART1=(
gmp
mpfr
@@ -96,8 +60,9 @@ function fun_get_subtargets {
bzip2
libffi
expat
- #tcl
- #tk
+ tcl
+ tk
+ openssl
$([[ $python_version == 3.3.0 ]] && echo xz-utils)
sqlite
ncurses
@@ -122,11 +87,11 @@ function fun_get_subtargets {
mingw-w64-tools-genpeimg
mingw-w64-tools-widl
${PYTHON_SUBTARGETS[@]}
- 3rdparty-post
gdbinit
gdb
gdb-wrapper
make_git_bat
+ 3rdparty-post
cleanup
licenses
build-info
@@ -147,38 +112,30 @@ function fun_get_subtargets {
gcc)
[[ $USE_MULTILIB == yes ]] && {
local readonly SUBTARGETS=(
- ${LIBICONV_X32_SUBTARGETS[@]}
- ${LIBICONV_X64_SUBTARGETS[@]}
- ${ZLIB_X32_SUBTARGETS[@]}
- ${ZLIB_X64_SUBTARGETS[@]}
+ "libiconv|$BUILD_ARCHITECTURE"
+ "libiconv|$REVERSE_ARCHITECTURE"
+ "zlib|$BUILD_ARCHITECTURE"
+ "zlib|$REVERSE_ARCHITECTURE"
${SUBTARGETS_PART1[@]}
- ${WINPTHREADS_X32_SUBTARGETS[@]}
- ${WINPTHREADS_X64_SUBTARGETS[@]}
+ "winpthreads|$BUILD_ARCHITECTURE"
+ "winpthreads|$REVERSE_ARCHITECTURE"
${SUBTARGETS_PART2[@]}
)
} || {
- [[ $BUILD_ARCHITECTURE == i686 ]] && {
- local readonly SUBTARGETS=(
- ${LIBICONV_X32_SUBTARGETS[@]}
- ${ZLIB_X32_SUBTARGETS[@]}
- ${SUBTARGETS_PART1[@]}
- ${WINPTHREADS_X32_SUBTARGETS[@]}
- ${SUBTARGETS_PART2[@]}
- )
- } || {
- local readonly SUBTARGETS=(
- ${LIBICONV_X64_SUBTARGETS[@]}
- ${ZLIB_X64_SUBTARGETS[@]}
- ${SUBTARGETS_PART1[@]}
- ${WINPTHREADS_X64_SUBTARGETS[@]}
- ${SUBTARGETS_PART2[@]}
- )
- }
+ local readonly SUBTARGETS=(
+ libiconv
+ zlib
+ ${SUBTARGETS_PART1[@]}
+ winpthreads
+ ${SUBTARGETS_PART2[@]}
+ )
}
;;
python)
local readonly SUBTARGETS=(
+ zlib
${PYTHON_SUBTARGETS[@]}
+ 3rdparty-post
cleanup
licenses
build-info
View
44 patches/Python/2.7.5/0100-mingw-distutils-MSYS-convert_path-fix-and-root-hack.patch
@@ -1,6 +1,6 @@
diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
---- a/Lib/distutils/command/install.py 2013-06-26 22:19:35.487603398 +0100
-+++ b/Lib/distutils/command/install.py 2013-06-26 22:24:15.000000000 +0100
+--- a/Lib/distutils/command/install.py 2013-09-12 20:04:41.300823583 +0100
++++ b/Lib/distutils/command/install.py 2013-09-12 20:04:41.604161589 +0100
@@ -348,7 +348,8 @@
# Convert directories from Unix /-separated syntax to the local
@@ -12,8 +12,8 @@ diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
'userbase', 'usersite')
diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py
---- a/Lib/distutils/util.py 2013-06-26 22:19:35.484270065 +0100
-+++ b/Lib/distutils/util.py 2013-06-26 22:25:38.000000000 +0100
+--- a/Lib/distutils/util.py 2013-09-12 20:04:41.300823583 +0100
++++ b/Lib/distutils/util.py 2013-09-12 20:04:41.604161589 +0100
@@ -130,6 +130,13 @@
paths.remove('.')
if not paths:
@@ -52,11 +52,9 @@ diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py
- elif os.name == 'os2':
+ elif os.name == 'nt' or os.name == 'os2':
(drive, path) = os.path.splitdrive(pathname)
-- if path[0] == os.sep:
-- path = path[1:]
+ if path[0] == os.sep:
+ path = path[1:]
- return os.path.join(new_root, path)
-+ if path[0] == os.sep:
-+ path = path[1:]
+ (drive_r, path_r) = os.path.splitdrive(new_root)
+ drive_used = ''
+ if len(drive) == 2 and len(drive_r) == 2 and drive != drive_r:
@@ -71,14 +69,36 @@ diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py
else:
raise DistutilsPlatformError, \
diff -urN a/Makefile.pre.in b/Makefile.pre.in
---- a/Makefile.pre.in 2013-06-26 22:19:35.517603398 +0100
-+++ b/Makefile.pre.in 2013-06-26 22:20:01.047603789 +0100
-@@ -1147,7 +1147,7 @@
+--- a/Makefile.pre.in 2013-09-12 20:04:41.334157391 +0100
++++ b/Makefile.pre.in 2013-09-12 20:40:58.000000000 +0100
+@@ -1140,6 +1140,12 @@
+ ;; \
+ esac
+
++ifeq ($(shell uname -o),Msys)
++DESTDIRFINAL=$(DESTDIR)
++else
++DESTDIRFINAL=$(DESTDIR)/
++endif
++
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall: sharedmods
+@@ -1147,7 +1153,7 @@
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
- --root=$(DESTDIR)/
-+ --root=$(DESTDIR)
++ --root=$(DESTDIRFINAL)
-rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py*
# Here are a couple of targets for MacOSX again, to install a full
+@@ -1220,7 +1226,7 @@
+ $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+- --root=$(DESTDIR)/
++ --root=$(DESTDIRFINAL)
+
+ # Build the toplevel Makefile
+ Makefile.pre: Makefile.pre.in config.status
View
33 patches/Python/3.3.0/0075-msys-convert_path-fix-and-root-hack.patch
@@ -1,6 +1,6 @@
diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
---- a/Lib/distutils/command/install.py 2013-06-27 23:29:39.235654844 +0100
-+++ b/Lib/distutils/command/install.py 2013-06-27 23:29:40.362321528 +0100
+--- a/Lib/distutils/command/install.py 2013-10-02 15:16:13.865639900 +0100
++++ b/Lib/distutils/command/install.py 2013-10-02 15:17:54.856416300 +0100
@@ -370,7 +370,8 @@
# Convert directories from Unix /-separated syntax to the local
@@ -12,8 +12,8 @@ diff -urN a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
'userbase', 'usersite')
diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py
---- a/Lib/distutils/util.py 2013-06-27 23:29:39.225654843 +0100
-+++ b/Lib/distutils/util.py 2013-06-28 01:07:32.000000000 +0100
+--- a/Lib/distutils/util.py 2013-10-02 15:16:14.143655800 +0100
++++ b/Lib/distutils/util.py 2013-10-02 15:17:54.861416600 +0100
@@ -131,6 +131,13 @@
paths.remove('.')
if not paths:
@@ -69,23 +69,36 @@ diff -urN a/Lib/distutils/util.py b/Lib/distutils/util.py
else:
raise DistutilsPlatformError("nothing known about platform '%s'" % os.name)
diff -urN a/Makefile.pre.in b/Makefile.pre.in
---- a/Makefile.pre.in 2013-06-27 23:29:39.362321513 +0100
-+++ b/Makefile.pre.in 2013-06-27 23:30:17.755655432 +0100
-@@ -1214,7 +1214,7 @@
+--- a/Makefile.pre.in 2013-10-02 15:16:16.765805800 +0100
++++ b/Makefile.pre.in 2013-10-02 15:18:48.402478900 +0100
+@@ -1207,6 +1207,12 @@
+ else true; \
+ fi
+
++ifeq ($(shell uname -o),Msys)
++DESTDIRFINAL=$(DESTDIR)
++else
++DESTDIRFINAL=$(DESTDIR)/
++endif
++
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall: sharedmods
+@@ -1214,7 +1220,7 @@
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
- --root=$(DESTDIR)/
-+ --root=$(DESTDIR)
++ --root=$(DESTDIRFINAL)
# Here are a couple of targets for MacOSX again, to install a full
# framework-based Python. frameworkinstall installs everything, the
-@@ -1288,7 +1288,7 @@
+@@ -1288,7 +1294,7 @@
$(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
- --root=$(DESTDIR)/
-+ --root=$(DESTDIR)
++ --root=$(DESTDIRFINAL)
# Build the toplevel Makefile
Makefile.pre: $(srcdir)/Makefile.pre.in config.status
View
44 patches/cloog/cloog-0.18.0-no-undefined.patch
@@ -1,44 +0,0 @@
---- cloog-0.18.0/Makefile.am.orig 2012-12-20 21:22:01.000000000 +0400
-+++ cloog-0.18.0/Makefile.am 2013-07-26 15:27:11.498046900 +0400
-@@ -91,7 +91,7 @@
- INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
- AM_CFLAGS = $(CFLAGS_WARN)
- libcloog_isl_la_CPPFLAGS = @ISL_CPPFLAGS@ @OSL_CPPFLAGS@
--libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ \
-+libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ -no-undefined \
- -rpath $(libdir) @ISL_LDFLAGS@ @OSL_LDFLAGS@
- libcloog_isl_la_LIBADD = @ISL_LIBS@ @OSL_LIBS@ $(ISL_LA) $(OSL_LA)
- libcloog_isl_la_SOURCES = \
---- cloog-0.18.0/Makefile.in.orig 2013-04-16 23:34:37.274414100 +0400
-+++ cloog-0.18.0/Makefile.in 2013-07-26 15:27:21.794921900 +0400
-@@ -444,7 +444,7 @@
- INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
- AM_CFLAGS = $(CFLAGS_WARN)
- libcloog_isl_la_CPPFLAGS = @ISL_CPPFLAGS@ @OSL_CPPFLAGS@
--libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ \
-+libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ -no-undefined \
- -rpath $(libdir) @ISL_LDFLAGS@ @OSL_LDFLAGS@
-
- libcloog_isl_la_LIBADD = @ISL_LIBS@ @OSL_LIBS@ $(ISL_LA) $(OSL_LA)
---- cloog-0.18.0/isl/Makefile.in.orig 2013-04-16 23:39:24.536132800 +0400
-+++ cloog-0.18.0/isl/Makefile.in 2013-07-25 13:25:41.633789000 +0400
-@@ -641,7 +641,7 @@
-
- libisl_la_LIBADD = @PIPLIB_LIBS@ @GMP_LIBS@
- libisl_la_LDFLAGS = -version-info @versioninfo@ \
-- @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@
-+ @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@ -no-undefined
-
- libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@
- isl_test_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
---- cloog-0.18.0/isl/Makefile.am.orig 2012-12-20 21:22:23.000000000 +0400
-+++ cloog-0.18.0/isl/Makefile.am 2013-07-25 13:25:13.321289000 +0400
-@@ -152,7 +152,7 @@
- isl_piplib.c
- libisl_la_LIBADD = @PIPLIB_LIBS@ @GMP_LIBS@
- libisl_la_LDFLAGS = -version-info @versioninfo@ \
-- @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@
-+ @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@ -no-undefined
- libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@
-
- isl_test_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
View
44 patches/cloog/cloog-0.18.1-no-undefined.patch
@@ -0,0 +1,44 @@
+--- cloog-0.18.1/Makefile.am.orig 2013-10-16 21:08:32.616800000 +0400
++++ cloog-0.18.1/Makefile.am 2013-10-11 11:27:03.000000000 +0400
+@@ -90,7 +90,7 @@
+ AM_CPPFLAGS = -I. -I$(top_builddir)/include -I$(top_srcdir)/include
+ AM_CFLAGS = $(CFLAGS_WARN)
+ libcloog_isl_la_CPPFLAGS = -I. -I$(top_builddir)/include -I$(top_srcdir)/include @ISL_CPPFLAGS@ @OSL_CPPFLAGS@
+-libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ \
++libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ -no-undefined \
+ -rpath $(libdir) @ISL_LDFLAGS@ @OSL_LDFLAGS@
+ libcloog_isl_la_LIBADD = @ISL_LIBS@ @OSL_LIBS@ $(ISL_LA) $(OSL_LA)
+ libcloog_isl_la_SOURCES = \
+--- cloog-0.18.1/Makefile.in.orig 2013-10-16 21:09:19.058000000 +0400
++++ cloog-0.18.1/Makefile.in 2013-10-11 11:27:50.000000000 +0400
+@@ -444,7 +444,7 @@
+ AM_CPPFLAGS = -I. -I$(top_builddir)/include -I$(top_srcdir)/include
+ AM_CFLAGS = $(CFLAGS_WARN)
+ libcloog_isl_la_CPPFLAGS = -I. -I$(top_builddir)/include -I$(top_srcdir)/include @ISL_CPPFLAGS@ @OSL_CPPFLAGS@
+-libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ \
++libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ -no-undefined \
+ -rpath $(libdir) @ISL_LDFLAGS@ @OSL_LDFLAGS@
+
+ libcloog_isl_la_LIBADD = @ISL_LIBS@ @OSL_LIBS@ $(ISL_LA) $(OSL_LA)
+--- cloog-0.18.1/isl/Makefile.am.orig 2013-10-16 21:09:33.160400000 +0400
++++ cloog-0.18.1/isl/Makefile.am 2013-10-11 11:27:21.000000000 +0400
+@@ -154,7 +154,7 @@
+ isl_sample_piplib.h \
+ isl_piplib.c
+ libisl_la_LIBADD = @PIPLIB_LIBS@ @GMP_LIBS@
+-libisl_la_LDFLAGS = -version-info @versioninfo@ \
++libisl_la_LDFLAGS = -version-info @versioninfo@ -no-undefined \
+ @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@
+ libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@
+
+--- cloog-0.18.1/isl/Makefile.in.orig 2013-10-16 21:09:54.282800000 +0400
++++ cloog-0.18.1/isl/Makefile.in 2013-10-11 11:27:40.000000000 +0400
+@@ -645,7 +645,7 @@
+ isl_piplib.c
+
+ libisl_la_LIBADD = @PIPLIB_LIBS@ @GMP_LIBS@
+-libisl_la_LDFLAGS = -version-info @versioninfo@ \
++libisl_la_LDFLAGS = -version-info @versioninfo@ -no-undefined \
+ @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@
+
+ libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@
View
11 patches/make/make-no-output-sync.patch
@@ -1,11 +0,0 @@
---- a/w32/compat/posixfcn.c 2013-09-23 21:25:20.368800000 +0400
-+++ b/w32/compat/posixfcn.c 2013-09-23 22:28:15.607000000 +0400
-@@ -26,7 +26,7 @@
- #include "makeint.h"
- #include "job.h"
-
--#ifdef NO_OUTPUT_SYNC
-+#ifndef NO_OUTPUT_SYNC
- /* Support for OUTPUT_SYNC and related functionality. */
-
- /* Emulation of fcntl that supports only F_GETFD and F_SETLKW. */
View
173,616 patches/ncurses/ncurses-5.9-dev-20130921.patch
173,616 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
11 patches/openssl/Makefile.patch
@@ -0,0 +1,11 @@
+--- a/Makefile 2012-03-01 15:32:36 +0400
++++ b/Makefile 2012-03-01 15:32:54 +0400
+@@ -239,7 +239,7 @@ reflect:
+ @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
+
+ sub_all: build_all
+-build_all: build_libs build_apps build_tests build_tools
++build_all: build_libs build_apps build_tools
+
+ build_libs: build_crypto build_ssl build_engines
+
View
61 patches/openssl/openssl-0.9.6-x509.patch
@@ -0,0 +1,61 @@
+Do not treat duplicate certs as an error.
+
+--- openssl-0.9.6/crypto/x509/by_file.c Wed Sep 27 15:09:05 2000
++++ openssl-0.9.6/crypto/x509/by_file.c Wed Sep 27 14:21:20 2000
+@@ -163,8 +163,12 @@
+ }
+ }
+ i=X509_STORE_add_cert(ctx->store_ctx,x);
+- if (!i) goto err;
+- count++;
++ /* ignore any problems with current certificate
++ and continue with the next one */
++ if (i)
++ count++;
++ else
++ ERR_clear_error();
+ X509_free(x);
+ x=NULL;
+ }
+@@ -179,7 +183,8 @@
+ goto err;
+ }
+ i=X509_STORE_add_cert(ctx->store_ctx,x);
+- if (!i) goto err;
++ if (!i)
++ ERR_clear_error();
+ ret=i;
+ }
+ else
+--- openssl-0.9.6/crypto/store/store.h 2009-08-12 00:57:20.000000000 +0200
++++ openssl-0.9.6/crypto/store/store.h 2009-08-12 01:00:27.000000000 +0200
+@@ -70,6 +70,13 @@
+ extern "C" {
+ #endif
+
++#ifdef OPENSSL_SYS_WIN32
++/* Under Win32 these are defined in wincrypt.h */
++#undef X509_NAME
++#undef X509_CERT_PAIR
++#undef X509_EXTENSIONS
++#endif
++
+ /* Already defined in ossl_typ.h */
+ /* typedef struct store_st STORE; */
+ /* typedef struct store_method_st STORE_METHOD; */
+--- openssl-0.9.6/crypto/pem/pem.h 2009-08-12 01:14:59.000000000 +0200
++++ openssl-0.9.6/crypto/pem/pem.h 2009-08-12 01:15:01.000000000 +0200
+@@ -74,6 +74,13 @@
+ extern "C" {
+ #endif
+
++#ifdef OPENSSL_SYS_WIN32
++/* Under Win32 these are defined in wincrypt.h */
++#undef X509_NAME
++#undef X509_CERT_PAIR
++#undef X509_EXTENSIONS
++#endif
++
+ #define PEM_BUFSIZE 1024
+
+ #define PEM_OBJ_UNDEF 0
View
23 patches/openssl/openssl-1.0.0a-ldflags.patch
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/327421
+
+--- a/Makefile.org
++++ b/Makefile.org
+@@ -189,6 +189,7 @@
+ MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
+ DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)' \
+ MAKEDEPPROG='$(MAKEDEPPROG)' \
++ LDFLAGS='${LDFLAGS}' \
+ SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
+ KRB5_INCLUDES='$(KRB5_INCLUDES)' LIBKRB5='$(LIBKRB5)' \
+ ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
+--- a/Makefile.shared
++++ b/Makefile.shared
+@@ -153,7 +153,7 @@
+ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
+
+-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
++DO_GNU_APP=LDFLAGS="$(LDFLAGS) $(CFLAGS)"
+
+ #This is rather special. It's a special target with which one can link
+ #applications without bothering with any features that have anything to
View
76 patches/openssl/openssl-1.0.0d-windres.patch
@@ -0,0 +1,76 @@
+URL: http://rt.openssl.org/Ticket/Display.html?id=2558
+Subject: make windres controllable via build env var settings
+
+atm, the windres code in openssl is only usable via the cross-compile prefix
+option unlike all the other build tools. so add support for the standard $RC
+/ $WINDRES env vars as well.
+
+Index: Configure
+===================================================================
+RCS file: /usr/local/src/openssl/CVSROOT/openssl/Configure,v
+retrieving revision 1.621.2.40
+diff -u -p -r1.621.2.40 Configure
+--- a/Configure 30 Nov 2010 22:19:26 -0000 1.621.2.40
++++ b/Configure 4 Jul 2011 23:12:32 -0000
+@@ -1094,6 +1094,7 @@ my $shared_extension = $fields[$idx_shar
+ my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib];
+ my $ar = $ENV{'AR'} || "ar";
+ my $arflags = $fields[$idx_arflags];
++my $windres = $ENV{'RC'} || $ENV{'WINDRES'} || "windres";
+ my $multilib = $fields[$idx_multilib];
+
+ # if $prefix/lib$multilib is not an existing directory, then
+@@ -1511,12 +1512,14 @@ while (<IN>)
+ s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/;
+ s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/;
+ s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/;
++ s/^WINDRES=\s*/WINDRES= \$\(CROSS_COMPILE\)/;
+ s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc eq "gcc";
+ }
+ else {
+ s/^CC=.*$/CC= $cc/;
+ s/^AR=\s*ar/AR= $ar/;
+ s/^RANLIB=.*/RANLIB= $ranlib/;
++ s/^WINDRES=.*/WINDRES= $windres/;
+ s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
+ }
+ s/^CFLAG=.*$/CFLAG= $cflags/;
+Index: Makefile.org
+===================================================================
+RCS file: /usr/local/src/openssl/CVSROOT/openssl/Makefile.org,v
+retrieving revision 1.295.2.10
+diff -u -p -r1.295.2.10 Makefile.org
+--- a/Makefile.org 27 Jan 2010 16:06:58 -0000 1.295.2.10
++++ b/Makefile.org 4 Jul 2011 23:13:08 -0000
+@@ -66,6 +66,7 @@ EXE_EXT=
+ ARFLAGS=
+ AR=ar $(ARFLAGS) r
+ RANLIB= ranlib
++WINDRES= windres
+ NM= nm
+ PERL= perl
+ TAR= tar
+@@ -180,6 +181,7 @@ BUILDENV= PLATFORM='$(PLATFORM)' PROCESS
+ CC='$(CC)' CFLAG='$(CFLAG)' \
+ AS='$(CC)' ASFLAG='$(CFLAG) -c' \
+ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
++ WINDRES='$(WINDRES)' \
+ CROSS_COMPILE='$(CROSS_COMPILE)' \
+ PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \
+ SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
+Index: Makefile.shared
+===================================================================
+RCS file: /usr/local/src/openssl/CVSROOT/openssl/Makefile.shared,v
+retrieving revision 1.72.2.4
+diff -u -p -r1.72.2.4 Makefile.shared
+--- a/Makefile.shared 21 Aug 2010 11:36:49 -0000 1.72.2.4
++++ b/Makefile.shared 4 Jul 2011 23:13:52 -0000
+@@ -293,7 +293,7 @@ link_a.cygwin:
+ fi; \
+ dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
+ $(PERL) util/mkrc.pl $$dll_name | \
+- $(CROSS_COMPILE)windres -o rc.o; \
++ $(WINDRES) -o rc.o; \
+ extras="$$extras rc.o"; \
+ ALLSYMSFLAGS='-Wl,--whole-archive'; \
+ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
View
32 patches/openssl/openssl-1.0.0h-pkg-config.patch
@@ -0,0 +1,32 @@
+depend on other pc files rather than encoding library info directly in
+every pkg-config file
+
+--- a/Makefile.org
++++ b/Makefile.org
+@@ -335,11 +335,11 @@ libssl.pc: Makefile
+ echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
+ echo 'includedir=$${prefix}/include'; \
+ echo ''; \
+- echo 'Name: OpenSSL'; \
++ echo 'Name: OpenSSL-libssl'; \
+ echo 'Description: Secure Sockets Layer and cryptography libraries'; \
+ echo 'Version: '$(VERSION); \
+- echo 'Requires: '; \
+- echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
++ echo 'Requires.private: libcrypto'; \
++ echo 'Libs: -L$${libdir} -lssl'; \
+ echo 'Libs.private: $(EX_LIBS)'; \
+ echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
+
+@@ -352,10 +353,7 @@ openssl.pc: Makefile
+ echo 'Name: OpenSSL'; \
+ echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
+ echo 'Version: '$(VERSION); \
+- echo 'Requires: '; \
+- echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
+- echo 'Libs.private: $(EX_LIBS)'; \
+- echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
++ echo 'Requires: libssl libcrypto' ) > openssl.pc
+
+ Makefile: Makefile.org Configure config
+ @echo "Makefile is older than Makefile.org, Configure or config."
View
678 patches/openssl/openssl-1.0.1-ipv6.patch
@@ -0,0 +1,678 @@
+http://rt.openssl.org/Ticket/Display.html?id=2051
+user/pass: guest/guest
+
+Index: apps/s_apps.h
+===================================================================
+RCS file: /v/openssl/cvs/openssl/apps/s_apps.h,v
+retrieving revision 1.21.2.1
+diff -u -r1.21.2.1 s_apps.h
+--- apps/s_apps.h 4 Sep 2009 17:42:04 -0000 1.21.2.1
++++ apps/s_apps.h 28 Dec 2011 00:28:14 -0000
+@@ -148,7 +148,7 @@
+ #define PORT_STR "4433"
+ #define PROTOCOL "tcp"
+
+-int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context);
++int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context, int use_ipv4, int use_ipv6);
+ #ifdef HEADER_X509_H
+ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx);
+ #endif
+@@ -156,7 +156,7 @@
+ int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file);
+ int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key);
+ #endif
+-int init_client(int *sock, char *server, int port, int type);
++int init_client(int *sock, char *server, int port, int type, int use_ipv4, int use_ipv6);
+ int should_retry(int i);
+ int extract_port(char *str, short *port_ptr);
+ int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p);
+Index: apps/s_cb.c
+===================================================================
+RCS file: /v/openssl/cvs/openssl/apps/s_cb.c,v
+retrieving revision 1.27.2.8.2.2
+diff -u -r1.27.2.8.2.2 s_cb.c
+--- apps/s_cb.c 13 Nov 2011 13:13:13 -0000 1.27.2.8.2.2
++++ apps/s_cb.c 28 Dec 2011 00:28:14 -0000
+Index: apps/s_client.c
+===================================================================
+RCS file: /v/openssl/cvs/openssl/apps/s_client.c,v
+retrieving revision 1.123.2.6.2.10
+diff -u -r1.123.2.6.2.10 s_client.c
+--- apps/s_client.c 14 Dec 2011 22:18:02 -0000 1.123.2.6.2.10
++++ apps/s_client.c 28 Dec 2011 00:28:14 -0000
+@@ -285,6 +285,9 @@
+ {
+ BIO_printf(bio_err,"usage: s_client args\n");
+ BIO_printf(bio_err,"\n");
++#if OPENSSL_USE_IPV6
++ BIO_printf(bio_err," -6 - use IPv6\n");
++#endif
+ BIO_printf(bio_err," -host host - use -connect instead\n");
+ BIO_printf(bio_err," -port port - use -connect instead\n");
+ BIO_printf(bio_err," -connect host:port - who to connect to (default is %s:%s)\n",SSL_HOST_NAME,PORT_STR);
+@@ -564,6 +567,7 @@
+ int sbuf_len,sbuf_off;
+ fd_set readfds,writefds;
+ short port=PORT;
++ int use_ipv4, use_ipv6;
+ int full_log=1;
+ char *host=SSL_HOST_NAME;
+ char *cert_file=NULL,*key_file=NULL;
+@@ -609,7 +613,11 @@
+ #endif
+ char *sess_in = NULL;
+ char *sess_out = NULL;
+- struct sockaddr peer;
++#if OPENSSL_USE_IPV6
++ struct sockaddr_storage peer;
++#else
++ struct sockaddr_in peer;
++#endif
+ int peerlen = sizeof(peer);
+ int enable_timeouts = 0 ;
+ long socket_mtu = 0;
+@@ -630,6 +638,8 @@
+ meth=SSLv2_client_method();
+ #endif
+
++ use_ipv4 = 1;
++ use_ipv6 = 0;
+ apps_startup();
+ c_Pause=0;
+ c_quiet=0;
+@@ -951,6 +961,13 @@
+ jpake_secret = *++argv;
+ }
+ #endif
++#if OPENSSL_USE_IPV6
++ else if (strcmp(*argv,"-6") == 0)
++ {
++ use_ipv4 = 0;
++ use_ipv6 = 1;
++ }
++#endif
+ else if (strcmp(*argv,"-use_srtp") == 0)
+ {
+ if (--argc < 1) goto bad;
+@@ -967,7 +984,7 @@
+ keymatexportlen=atoi(*(++argv));
+ if (keymatexportlen == 0) goto bad;
+ }
+- else
++ else
+ {
+ BIO_printf(bio_err,"unknown option %s\n",*argv);
+ badop=1;
+@@ -1259,7 +1276,7 @@
+
+ re_start:
+
+- if (init_client(&s,host,port,socket_type) == 0)
++ if (init_client(&s,host,port,socket_type,use_ipv4,use_ipv6) == 0)
+ {
+ BIO_printf(bio_err,"connect:errno=%d\n",get_last_socket_error());
+ SHUTDOWN(s);
+@@ -1285,7 +1302,7 @@
+ {
+
+ sbio=BIO_new_dgram(s,BIO_NOCLOSE);
+- if (getsockname(s, &peer, (void *)&peerlen) < 0)
++ if (getsockname(s, (struct sockaddr *)&peer, (void *)&peerlen) < 0)
+ {
+ BIO_printf(bio_err, "getsockname:errno=%d\n",
+ get_last_socket_error());
+@@ -2036,7 +2061,7 @@
+ BIO_printf(bio,"Expansion: %s\n",
+ expansion ? SSL_COMP_get_name(expansion) : "NONE");
+ #endif
+-
++
+ #ifdef SSL_DEBUG
+ {
+ /* Print out local port of connection: useful for debugging */
+===================================================================
+RCS file: /v/openssl/cvs/openssl/apps/s_server.c,v
+retrieving revision 1.136.2.15.2.13
+diff -u -r1.136.2.15.2.13 s_server.c
+--- apps/s_server.c 27 Dec 2011 14:23:22 -0000 1.136.2.15.2.13
++++ apps/s_server.c 28 Dec 2011 00:28:14 -0000
+@@ -558,6 +558,10 @@
+ # endif
+ BIO_printf(bio_err," -use_srtp profiles - Offer SRTP key management with a colon-separated profile list");
+ #endif
++ BIO_printf(bio_err," -4 - use IPv4 only\n");
++#if OPENSSL_USE_IPV6
++ BIO_printf(bio_err," -6 - use IPv6 only\n");
++#endif
+ BIO_printf(bio_err," -keymatexport label - Export keying material using label\n");
+ BIO_printf(bio_err," -keymatexportlen len - Export len bytes of keying material (default 20)\n");
+ }
+@@ -943,6 +947,7 @@
+ int state=0;
+ const SSL_METHOD *meth=NULL;
+ int socket_type=SOCK_STREAM;
++ int use_ipv4, use_ipv6;
+ ENGINE *e=NULL;
+ char *inrand=NULL;
+ int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM;
+@@ -981,6 +986,12 @@
+ /* #error no SSL version enabled */
+ #endif
+
++ use_ipv4 = 1;
++#if OPENSSL_USE_IPV6
++ use_ipv6 = 1;
++#else
++ use_ipv6 = 0;
++#endif
+ local_argc=argc;
+ local_argv=argv;
+
+@@ -1329,6 +1340,18 @@
+ jpake_secret = *(++argv);
+ }
+ #endif
++ else if (strcmp(*argv,"-4") == 0)
++ {
++ use_ipv4 = 1;
++ use_ipv6 = 0;
++ }
++#if OPENSSL_USE_IPV6
++ else if (strcmp(*argv,"-6") == 0)
++ {
++ use_ipv4 = 0;
++ use_ipv6 = 1;
++ }
++#endif
+ else if (strcmp(*argv,"-use_srtp") == 0)
+ {
+ if (--argc < 1) goto bad;
+@@ -1884,9 +1907,9 @@
+ BIO_printf(bio_s_out,"ACCEPT\n");
+ (void)BIO_flush(bio_s_out);
+ if (www)
+- do_server(port,socket_type,&accept_socket,www_body, context);
++ do_server(port,socket_type,&accept_socket,www_body, context, use_ipv4, use_ipv6);
+ else
+- do_server(port,socket_type,&accept_socket,sv_body, context);
++ do_server(port,socket_type,&accept_socket,sv_body, context, use_ipv4, use_ipv6);
+ print_stats(bio_s_out,ctx);
+ ret=0;
+ end:
+Index: apps/s_socket.c
+===================================================================
+RCS file: /v/openssl/cvs/openssl/apps/s_socket.c,v
+retrieving revision 1.43.2.3.2.2
+diff -u -r1.43.2.3.2.2 s_socket.c
+--- apps/s_socket.c 2 Dec 2011 14:39:40 -0000 1.43.2.3.2.2
++++ apps/s_socket.c 28 Dec 2011 00:28:14 -0000
+@@ -97,16 +97,16 @@
+ #include "netdb.h"
+ #endif
+
+-static struct hostent *GetHostByName(char *name);
++static struct hostent *GetHostByName(char *name, int domain);
+ #if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
+ static void ssl_sock_cleanup(void);
+ #endif
+ static int ssl_sock_init(void);
+-static int init_client_ip(int *sock,unsigned char ip[4], int port, int type);
+-static int init_server(int *sock, int port, int type);
+-static int init_server_long(int *sock, int port,char *ip, int type);
++static int init_client_ip(int *sock,unsigned char *ip, int port, int type, int domain);
++static int init_server(int *sock, int port, int type, int use_ipv4, int use_ipv6);
++static int init_server_long(int *sock, int port,char *ip, int type, int use_ipv4, int use_ipv6);
+ static int do_accept(int acc_sock, int *sock, char **host);
+-static int host_ip(char *str, unsigned char ip[4]);
++static int host_ip(char *str, unsigned char *ip, int domain);
+
+ #ifdef OPENSSL_SYS_WIN16
+ #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
+@@ -234,38 +234,76 @@
+ return(1);
+ }
+
+-int init_client(int *sock, char *host, int port, int type)
++int init_client(int *sock, char *host, int port, int type, int use_ipv4, int use_ipv6)
+ {
++#if OPENSSL_USE_IPV6
++ unsigned char ip[16];
++#else
+ unsigned char ip[4];
++#endif
+
+- memset(ip, '\0', sizeof ip);
+- if (!host_ip(host,&(ip[0])))
++ if (!use_ipv4 && !use_ipv6)
+ return 0;
+- return init_client_ip(sock,ip,port,type);
+- }
+-
+-static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
+- {
+- unsigned long addr;
++#if OPENSSL_USE_IPV6
++ /* we are fine here */
++#else
++ if (use_ipv6)
++ return 0;
++#endif
++ if (use_ipv4)
++ if (host_ip(host,ip,AF_INET))
++ return(init_client_ip(sock,ip,port,type,AF_INET));
++#if OPENSSL_USE_IPV6
++ if (use_ipv6)
++ if (host_ip(host,ip,AF_INET6))
++ return(init_client_ip(sock,ip,port,type,AF_INET6));
++#endif
++ return 0;
++ }
++
++static int init_client_ip(int *sock, unsigned char ip[4], int port, int type, int domain)
++ {
++#if OPENSSL_USE_IPV6
++ struct sockaddr_storage them;
++ struct sockaddr_in *them_in = (struct sockaddr_in *)&them;
++ struct sockaddr_in6 *them_in6 = (struct sockaddr_in6 *)&them;
++#else
+ struct sockaddr_in them;
++ struct sockaddr_in *them_in = &them;
++#endif
++ socklen_t addr_len;
+ int s,i;
+
+ if (!ssl_sock_init()) return(0);
+
+ memset((char *)&them,0,sizeof(them));
+- them.sin_family=AF_INET;
+- them.sin_port=htons((unsigned short)port);
+- addr=(unsigned long)
+- ((unsigned long)ip[0]<<24L)|
+- ((unsigned long)ip[1]<<16L)|
+- ((unsigned long)ip[2]<< 8L)|
+- ((unsigned long)ip[3]);
+- them.sin_addr.s_addr=htonl(addr);
++ if (domain == AF_INET)
++ {
++ addr_len = (socklen_t)sizeof(struct sockaddr_in);
++ them_in->sin_family=AF_INET;
++ them_in->sin_port=htons((unsigned short)port);
++#ifndef BIT_FIELD_LIMITS
++ memcpy(&them_in->sin_addr.s_addr, ip, 4);
++#else
++ memcpy(&them_in->sin_addr, ip, 4);
++#endif
++ }
++ else
++#if OPENSSL_USE_IPV6
++ {
++ addr_len = (socklen_t)sizeof(struct sockaddr_in6);
++ them_in6->sin6_family=AF_INET6;
++ them_in6->sin6_port=htons((unsigned short)port);
++ memcpy(&(them_in6->sin6_addr), ip, sizeof(struct in6_addr));
++ }
++#else
++ return(0);
++#endif
+
+ if (type == SOCK_STREAM)
+- s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
++ s=socket(domain,SOCK_STREAM,SOCKET_PROTOCOL);
+ else /* ( type == SOCK_DGRAM) */
+- s=socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
++ s=socket(domain,SOCK_DGRAM,IPPROTO_UDP);
+
+ if (s == INVALID_SOCKET) { perror("socket"); return(0); }
+
+@@ -277,29 +315,27 @@
+ if (i < 0) { perror("keepalive"); return(0); }
+ }
+ #endif
+-
+- if (connect(s,(struct sockaddr *)&them,sizeof(them)) == -1)
++ if (connect(s,(struct sockaddr *)&them,addr_len) == -1)
+ { closesocket(s); perror("connect"); return(0); }
+ *sock=s;
+ return(1);
+ }
+
+-int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), unsigned char *context)
++int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), unsigned char *context, int use_ipv4, int use_ipv6)
+ {
+ int sock;
+ char *name = NULL;
+ int accept_socket = 0;
+ int i;
+
+- if (!init_server(&accept_socket,port,type)) return(0);
+-
++ if (!init_server(&accept_socket,port,type, use_ipv4, use_ipv6)) return(0);
+ if (ret != NULL)
+ {
+ *ret=accept_socket;
+ /* return(1);*/
+ }
+- for (;;)
+- {
++ for (;;)
++ {
+ if (type==SOCK_STREAM)
+ {
+ if (do_accept(accept_socket,&sock,&name) == 0)
+@@ -322,41 +358,88 @@
+ }
+ }
+
+-static int init_server_long(int *sock, int port, char *ip, int type)
++static int init_server_long(int *sock, int port, char *ip, int type, int use_ipv4, int use_ipv6)
+ {
+ int ret=0;
++ int domain;
++#if OPENSSL_USE_IPV6
++ struct sockaddr_storage server;
++ struct sockaddr_in *server_in = (struct sockaddr_in *)&server;
++ struct sockaddr_in6 *server_in6 = (struct sockaddr_in6 *)&server;
++#else
+ struct sockaddr_in server;
++ struct sockaddr_in *server_in = &server;
++#endif
++ socklen_t addr_len;
+ int s= -1;
+
++ if (!use_ipv4 && !use_ipv6)
++ goto err;
++#if OPENSSL_USE_IPV6
++ /* we are fine here */
++#else
++ if (use_ipv6)
++ goto err;
++#endif
+ if (!ssl_sock_init()) return(0);
+
+- memset((char *)&server,0,sizeof(server));
+- server.sin_family=AF_INET;
+- server.sin_port=htons((unsigned short)port);
+- if (ip == NULL)
+- server.sin_addr.s_addr=INADDR_ANY;
+- else
+-/* Added for T3E, address-of fails on bit field (beckman@acl.lanl.gov) */
+-#ifndef BIT_FIELD_LIMITS
+- memcpy(&server.sin_addr.s_addr,ip,4);
++#if OPENSSL_USE_IPV6
++ domain = use_ipv6 ? AF_INET6 : AF_INET;
+ #else
+- memcpy(&server.sin_addr,ip,4);
++ domain = AF_INET;
+ #endif
+-
+- if (type == SOCK_STREAM)
+- s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
+- else /* type == SOCK_DGRAM */
+- s=socket(AF_INET, SOCK_DGRAM,IPPROTO_UDP);
++ if (type == SOCK_STREAM)
++ s=socket(domain,SOCK_STREAM,SOCKET_PROTOCOL);
++ else /* type == SOCK_DGRAM */
++ s=socket(domain, SOCK_DGRAM,IPPROTO_UDP);
+
+ if (s == INVALID_SOCKET) goto err;
+ #if defined SOL_SOCKET && defined SO_REUSEADDR
++ {
++ int j = 1;
++ setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
++ (void *) &j, sizeof j);
++ }
++#endif
++#if OPENSSL_USE_IPV6
++ if ((use_ipv4 == 0) && (use_ipv6 == 1))
+ {
+- int j = 1;
+- setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
+- (void *) &j, sizeof j);
++ const int on = 1;
++
++ setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
++ (const void *) &on, sizeof(int));
+ }
+ #endif
+- if (bind(s,(struct sockaddr *)&server,sizeof(server)) == -1)
++ if (domain == AF_INET)
++ {
++ addr_len = (socklen_t)sizeof(struct sockaddr_in);
++ memset(server_in, 0, sizeof(struct sockaddr_in));
++ server_in->sin_family=AF_INET;
++ server_in->sin_port = htons((unsigned short)port);
++ if (ip == NULL)
++ server_in->sin_addr.s_addr = htonl(INADDR_ANY);
++ else
++/* Added for T3E, address-of fails on bit field (beckman@acl.lanl.gov) */
++#ifndef BIT_FIELD_LIMITS
++ memcpy(&server_in->sin_addr.s_addr, ip, 4);
++#else
++ memcpy(&server_in->sin_addr, ip, 4);
++#endif
++ }
++#if OPENSSL_USE_IPV6
++ else
++ {
++ addr_len = (socklen_t)sizeof(struct sockaddr_in6);
++ memset(server_in6, 0, sizeof(struct sockaddr_in6));
++ server_in6->sin6_family = AF_INET6;
++ server_in6->sin6_port = htons((unsigned short)port);
++ if (ip == NULL)
++ server_in6->sin6_addr = in6addr_any;
++ else
++ memcpy(&server_in6->sin6_addr, ip, sizeof(struct in6_addr));
++ }
++#endif
++ if (bind(s, (struct sockaddr *)&server, addr_len) == -1)
+ {
+ #ifndef OPENSSL_SYS_WINDOWS
+ perror("bind");
+@@ -375,16 +458,23 @@
+ return(ret);
+ }
+
+-static int init_server(int *sock, int port, int type)
++static int init_server(int *sock, int port, int type, int use_ipv4, int use_ipv6)
+ {
+- return(init_server_long(sock, port, NULL, type));
++ return(init_server_long(sock, port, NULL, type, use_ipv4, use_ipv6));
+ }
+
+ static int do_accept(int acc_sock, int *sock, char **host)
+ {
+ int ret;
+ struct hostent *h1,*h2;
+- static struct sockaddr_in from;
++#if OPENSSL_USE_IPV6
++ struct sockaddr_storage from;
++ struct sockaddr_in *from_in = (struct sockaddr_in *)&from;
++ struct sockaddr_in6 *from_in6 = (struct sockaddr_in6 *)&from;
++#else
++ struct sockaddr_in from;
++ struct sockaddr_in *from_in = &from;
++#endif
+ int len;
+ /* struct linger ling; */
+
+@@ -431,13 +521,23 @@
+ */
+
+ if (host == NULL) goto end;
++#if OPENSSL_USE_IPV6
++ if (from.ss_family == AF_INET)
++#else
++ if (from.sin_family == AF_INET)
++#endif
+ #ifndef BIT_FIELD_LIMITS
+- /* I should use WSAAsyncGetHostByName() under windows */
+- h1=gethostbyaddr((char *)&from.sin_addr.s_addr,
+- sizeof(from.sin_addr.s_addr),AF_INET);
++ /* I should use WSAAsyncGetHostByName() under windows */
++ h1=gethostbyaddr((char *)&from_in->sin_addr.s_addr,
++ sizeof(from_in->sin_addr.s_addr), AF_INET);
+ #else
+- h1=gethostbyaddr((char *)&from.sin_addr,
+- sizeof(struct in_addr),AF_INET);
++ h1=gethostbyaddr((char *)&from_in->sin_addr,
++ sizeof(struct in_addr), AF_INET);
++#endif
++#if OPENSSL_USE_IPV6
++ else
++ h1=gethostbyaddr((char *)&from_in6->sin6_addr,
++ sizeof(struct in6_addr), AF_INET6);
+ #endif
+ if (h1 == NULL)
+ {
+@@ -454,15 +554,23 @@
+ }
+ BUF_strlcpy(*host,h1->h_name,strlen(h1->h_name)+1);
+
+- h2=GetHostByName(*host);
++#if OPENSSL_USE_IPV6
++ h2=GetHostByName(*host, from.ss_family);
++#else
++ h2=GetHostByName(*host, from.sin_family);
++#endif
+ if (h2 == NULL)
+ {
+ BIO_printf(bio_err,"gethostbyname failure\n");
+ return(0);
+ }
+- if (h2->h_addrtype != AF_INET)
++#if OPENSSL_USE_IPV6
++ if (h2->h_addrtype != from.ss_family)
++#else
++ if (h2->h_addrtype != from.sin_family)
++#endif
+ {
+- BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n");
++ BIO_printf(bio_err,"gethostbyname addr address is not correct\n");
+ return(0);
+ }
+ }
+@@ -477,7 +585,7 @@
+ char *h,*p;
+
+ h=str;
+- p=strchr(str,':');
++ p=strrchr(str,':');
+ if (p == NULL)
+ {
+ BIO_printf(bio_err,"no port defined\n");
+@@ -485,7 +593,7 @@
+ }
+ *(p++)='\0';
+
+- if ((ip != NULL) && !host_ip(str,ip))
++ if ((ip != NULL) && !host_ip(str,ip,AF_INET))
+ goto err;
+ if (host_ptr != NULL) *host_ptr=h;
+
+@@ -496,48 +604,58 @@
+ return(0);
+ }
+
+-static int host_ip(char *str, unsigned char ip[4])
++static int host_ip(char *str, unsigned char *ip, int domain)
+ {
+- unsigned int in[4];
++ unsigned int in[4];
++ unsigned long l;
+ int i;
+
+- if (sscanf(str,"%u.%u.%u.%u",&(in[0]),&(in[1]),&(in[2]),&(in[3])) == 4)
++ if ((domain == AF_INET) &&
++ (sscanf(str,"%u.%u.%u.%u",&(in[0]),&(in[1]),&(in[2]),&(in[3])) == 4))
+ {
++
+ for (i=0; i<4; i++)
+ if (in[i] > 255)
+ {
+ BIO_printf(bio_err,"invalid IP address\n");
+ goto err;
+ }
+- ip[0]=in[0];
+- ip[1]=in[1];
+- ip[2]=in[2];
+- ip[3]=in[3];
+- }
++ l=htonl((in[0]<<24L)|(in[1]<<16L)|(in[2]<<8L)|in[3]);
++ memcpy(ip, &l, 4);
++ return 1;
++ }
++#if OPENSSL_USE_IPV6
++ else if ((domain == AF_INET6) &&
++ (inet_pton(AF_INET6, str, ip) == 1))
++ return 1;
++#endif
+ else
+ { /* do a gethostbyname */
+ struct hostent *he;
+
+ if (!ssl_sock_init()) return(0);
+
+- he=GetHostByName(str);
++ he=GetHostByName(str,domain);
+ if (he == NULL)
+ {
+ BIO_printf(bio_err,"gethostbyname failure\n");
+ goto err;
+ }
+ /* cast to short because of win16 winsock definition */
+- if ((short)he->h_addrtype != AF_INET)
++ if ((short)he->h_addrtype != domain)
+ {
+- BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n");
++ BIO_printf(bio_err,"gethostbyname addr family is not correct\n");
+ return(0);
+ }
+- ip[0]=he->h_addr_list[0][0];
+- ip[1]=he->h_addr_list[0][1];
+- ip[2]=he->h_addr_list[0][2];
+- ip[3]=he->h_addr_list[0][3];
++ if (domain == AF_INET)
++ memset(ip, 0, 4);
++#if OPENSSL_USE_IPV6
++ else
++ memset(ip, 0, 16);
++#endif
++ memcpy(ip, he->h_addr_list[0], he->h_length);
++ return 1;
+ }
+- return(1);
+ err:
+ return(0);
+ }
+@@ -574,7 +692,7 @@
+ static unsigned long ghbn_hits=0L;
+ static unsigned long ghbn_miss=0L;
+
+-static struct hostent *GetHostByName(char *name)
++static struct hostent *GetHostByName(char *name, int domain)
+ {
+ struct hostent *ret;
+ int i,lowi=0;
+@@ -589,14 +707,20 @@
+ }
+ if (ghbn_cache[i].order > 0)
+ {
+- if (strncmp(name,ghbn_cache[i].name,128) == 0)
++ if ((strncmp(name,ghbn_cache[i].name,128) == 0) &&
++ (ghbn_cache[i].ent.h_addrtype == domain))
+ break;
+ }
+ }
+ if (i == GHBN_NUM) /* no hit*/
+ {
+ ghbn_miss++;
+- ret=gethostbyname(name);
++ if (domain == AF_INET)
++ ret=gethostbyname(name);
++#if OPENSSL_USE_IPV6
++ else
++ ret=gethostbyname2(name, AF_INET6);
++#endif
+ if (ret == NULL) return(NULL);
+ /* else add to cache */
+ if(strlen(name) < sizeof ghbn_cache[0].name)
View
337 patches/openssl/openssl-1.0.1-parallel-build.patch
@@ -0,0 +1,337 @@
+http://rt.openssl.org/Ticket/Display.html?id=2084
+
+--- a/Makefile.org
++++ b/Makefile.org
+@@ -247,17 +247,17 @@
+ build_libs: build_crypto build_ssl build_engines
+
+ build_crypto:
+- @dir=crypto; target=all; $(BUILD_ONE_CMD)
++ +@dir=crypto; target=all; $(BUILD_ONE_CMD)
+-build_ssl:
++build_ssl: build_crypto
+- @dir=ssl; target=all; $(BUILD_ONE_CMD)
++ +@dir=ssl; target=all; $(BUILD_ONE_CMD)
+-build_engines:
++build_engines: build_crypto
+- @dir=engines; target=all; $(BUILD_ONE_CMD)
++ +@dir=engines; target=all; $(BUILD_ONE_CMD)
+-build_apps:
++build_apps: build_libs
+- @dir=apps; target=all; $(BUILD_ONE_CMD)
++ +@dir=apps; target=all; $(BUILD_ONE_CMD)
+-build_tests:
++build_tests: build_libs
+- @dir=test; target=all; $(BUILD_ONE_CMD)
++ +@dir=test; target=all; $(BUILD_ONE_CMD)
+-build_tools:
++build_tools: build_libs
+- @dir=tools; target=all; $(BUILD_ONE_CMD)
++ +@dir=tools; target=all; $(BUILD_ONE_CMD)
+
+ all_testapps: build_libs build_testapps
+ build_testapps:
+@@ -497,9 +497,9 @@
+ dist_pem_h:
+ (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
+
+-install: all install_docs install_sw
++install: install_docs install_sw
+
+-install_sw:
++install_dirs:
+ @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
+@@ -508,6 +508,13 @@
+ $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
+ $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
+ $(INSTALL_PREFIX)$(OPENSSLDIR)/private
++ @$(PERL) $(TOP)/util/mkdir-p.pl \
++ $(INSTALL_PREFIX)$(MANDIR)/man1 \
++ $(INSTALL_PREFIX)$(MANDIR)/man3 \
++ $(INSTALL_PREFIX)$(MANDIR)/man5 \
++ $(INSTALL_PREFIX)$(MANDIR)/man7
++
++install_sw: install_dirs
+ @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
+ do \
+ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+@@ -511,7 +511,7 @@
+ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+ done;
+- @set -e; target=install; $(RECURSIVE_BUILD_CMD)
++ +@set -e; target=install; $(RECURSIVE_BUILD_CMD)
+ @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
+ do \
+ if [ -f "$$i" ]; then \
+@@ -593,12 +600,7 @@
+ done; \
+ done
+
+-install_docs:
+- @$(PERL) $(TOP)/util/mkdir-p.pl \
+- $(INSTALL_PREFIX)$(MANDIR)/man1 \
+- $(INSTALL_PREFIX)$(MANDIR)/man3 \
+- $(INSTALL_PREFIX)$(MANDIR)/man5 \
+- $(INSTALL_PREFIX)$(MANDIR)/man7
++install_docs: install_dirs
+ @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
+ here="`pwd`"; \
+ filecase=; \
+--- a/Makefile.shared
++++ b/Makefile.shared
+@@ -105,6 +105,7 @@ LINK_SO= \
+ SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
+ LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
+ LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
++ [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \
+ LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
+ $${SHAREDCMD} $${SHAREDFLAGS} \
+ -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
+@@ -122,6 +124,7 @@ SYMLINK_SO= \
+ done; \
+ fi; \
+ if [ -n "$$SHLIB_SOVER" ]; then \
++ [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
+ ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
+ ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
+ fi; \
+--- a/crypto/Makefile
++++ b/crypto/Makefile
+@@ -85,11 +85,11 @@
+ @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
+
+ subdirs:
+- @target=all; $(RECURSIVE_MAKE)
++ +@target=all; $(RECURSIVE_MAKE)
+
+ files:
+ $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
+- @target=files; $(RECURSIVE_MAKE)
++ +@target=files; $(RECURSIVE_MAKE)
+
+ links:
+ @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
+@@ -100,7 +100,7 @@
+ # lib: $(LIB): are splitted to avoid end-less loop
+ lib: $(LIB)
+ @touch lib
+-$(LIB): $(LIBOBJ)
++$(LIB): $(LIBOBJ) | subdirs
+ $(AR) $(LIB) $(LIBOBJ)
+ $(RANLIB) $(LIB) || echo Never mind.
+
+@@ -110,7 +110,7 @@
+ fi
+
+ libs:
+- @target=lib; $(RECURSIVE_MAKE)
++ +@target=lib; $(RECURSIVE_MAKE)
+
+ install:
+ @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
+@@ -119,7 +119,7 @@
+ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+ done;
+- @target=install; $(RECURSIVE_MAKE)
++ +@target=install; $(RECURSIVE_MAKE)
+
+ lint:
+ @target=lint; $(RECURSIVE_MAKE)
+--- a/engines/Makefile
++++ b/engines/Makefile
+@@ -72,7 +72,7 @@
+
+ all: lib subdirs
+
+-lib: $(LIBOBJ)
++lib: $(LIBOBJ) | subdirs
+ @if [ -n "$(SHARED_LIBS)" ]; then \
+ set -e; \
+ for l in $(LIBNAMES); do \
+@@ -89,7 +89,7 @@
+
+ subdirs:
+ echo $(EDIRS)
+- @target=all; $(RECURSIVE_MAKE)
++ +@target=all; $(RECURSIVE_MAKE)
+
+ files:
+ $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
+@@ -128,7 +128,7 @@
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
+ done; \
+ fi
+- @target=install; $(RECURSIVE_MAKE)
++ +@target=install; $(RECURSIVE_MAKE)
+
+ tags:
+ ctags $(SRC)
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -123,7 +123,7 @@
+ tags:
+ ctags $(SRC)
+
+-tests: exe apps $(TESTS)
++tests: exe $(TESTS)
+
+ apps:
+ @(cd ..; $(MAKE) DIRS=apps all)
+@@ -365,109 +365,109 @@
+ link_app.$${shlib_target}
+
+ $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
+- @target=$(RSATEST); $(BUILD_CMD)
++ +@target=$(RSATEST); $(BUILD_CMD)
+
+ $(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO)
+- @target=$(BNTEST); $(BUILD_CMD)
++ +@target=$(BNTEST); $(BUILD_CMD)
+
+ $(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO)
+- @target=$(ECTEST); $(BUILD_CMD)
++ +@target=$(ECTEST); $(BUILD_CMD)
+
+ $(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO)
+- @target=$(EXPTEST); $(BUILD_CMD)
++ +@target=$(EXPTEST); $(BUILD_CMD)
+
+ $(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO)
+- @target=$(IDEATEST); $(BUILD_CMD)
++ +@target=$(IDEATEST); $(BUILD_CMD)
+
+ $(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO)
+- @target=$(MD2TEST); $(BUILD_CMD)
++ +@target=$(MD2TEST); $(BUILD_CMD)
+
+ $(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO)
+- @target=$(SHATEST); $(BUILD_CMD)
++ +@target=$(SHATEST); $(BUILD_CMD)
+
+ $(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO)
+- @target=$(SHA1TEST); $(BUILD_CMD)
++ +@target=$(SHA1TEST); $(BUILD_CMD)
+
+ $(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO)
+- @target=$(SHA256TEST); $(BUILD_CMD)
++ +@target=$(SHA256TEST); $(BUILD_CMD)