diff --git a/plink-1.07_install b/plink-1.07_install index 1cebeb54..371f9f48 100755 --- a/plink-1.07_install +++ b/plink-1.07_install @@ -33,6 +33,11 @@ then unzip $temp_dir/${APPNAME}-${VERSION}-src.zip cd ${APPNAME}-${VERSION}-src + cp /shared/ucl/apps/build_scripts/plink-patches/*.patch . + for a in `ls *.patch` + do + patch < $a + done make else echo "Hash mismatch." diff --git a/plink-patches/Makefile.patch b/plink-patches/Makefile.patch new file mode 100644 index 00000000..154a7fcd --- /dev/null +++ b/plink-patches/Makefile.patch @@ -0,0 +1,11 @@ +--- Makefile.old 2015-07-21 13:23:55.000000000 +0100 ++++ Makefile 2015-07-21 13:15:01.000000000 +0100 +@@ -27,7 +27,7 @@ + FORCE_32BIT = + WITH_ZLIB = 1 + WITH_LAPACK = +-FORCE_DYNAMIC = ++FORCE_DYNAMIC = 1 + + # Put C++ compiler here; Windows has it's own specific version + CXX_UNIX = g++ diff --git a/plink-patches/elf.cpp.patch b/plink-patches/elf.cpp.patch new file mode 100644 index 00000000..3babb3bb --- /dev/null +++ b/plink-patches/elf.cpp.patch @@ -0,0 +1,25 @@ +--- elf.cpp.old 2015-07-21 13:02:42.000000000 +0100 ++++ elf.cpp 2015-07-21 13:03:24.000000000 +0100 +@@ -1175,10 +1175,10 @@ + << setw(8) << gcnt << " " + << setw(8) << (double)cnt / (double)gcnt << "\n"; + +- map::iterator i = chr_cnt.begin(); +- while ( i != chr_cnt.end() ) ++ map::iterator it3 = chr_cnt.begin(); ++ while ( it3 != chr_cnt.end() ) + { +- int c = i->first; ++ int c = it3->first; + int x = chr_cnt.find( c )->second; + int y = chr_gcnt.find( c )->second; + +@@ -1189,7 +1189,7 @@ + << setw(8) << y << " " + << setw(8) << (double)x / (double)y << "\n"; + +- ++i; ++ ++it3; + } + + } diff --git a/plink-patches/idhelp.cpp.patch b/plink-patches/idhelp.cpp.patch new file mode 100644 index 00000000..6af71ef4 --- /dev/null +++ b/plink-patches/idhelp.cpp.patch @@ -0,0 +1,19 @@ +--- idhelp.cpp.old 2015-07-21 13:04:26.000000000 +0100 ++++ idhelp.cpp 2015-07-21 13:09:25.000000000 +0100 +@@ -772,12 +772,12 @@ + for (int j = 0 ; j < jointField.size(); j++ ) + { + set & jf = jointField[j]; +- set::iterator j = jf.begin(); ++ set::iterator it1 = jf.begin(); + PP->printLOG(" { "); +- while ( j != jf.end() ) ++ while ( it1 != jf.end() ) + { +- PP->printLOG( (*j)->name + " " ); +- ++j; ++ PP->printLOG( (*it1)->name + " " ); ++ ++it1; + } + PP->printLOG(" }"); + } diff --git a/plink-patches/sets.cpp.patch b/plink-patches/sets.cpp.patch new file mode 100644 index 00000000..7405d9e6 --- /dev/null +++ b/plink-patches/sets.cpp.patch @@ -0,0 +1,18 @@ +--- sets.cpp.old 2015-07-21 12:58:06.000000000 +0100 ++++ sets.cpp 2015-07-21 13:01:36.000000000 +0100 +@@ -768,11 +768,11 @@ + ////////////////////////////////////////////// + // Reset original missing status + +- vector::iterator i = PP->sample.begin(); +- while ( i != PP->sample.end() ) ++ vector::iterator it2 = PP->sample.begin(); ++ while ( it2 != PP->sample.end() ) + { +- (*i)->missing = (*i)->flag; +- ++i; ++ (*it2)->missing = (*it2)->flag; ++ ++it2; + } + + ////////////////////////////////////////////////