avy: move to by-name

jopejoe1 4cba7aaa 54109fef

+116 -4
pkgs/applications/science/logic/avy/default.nix pkgs/by-name/av/avy/package.nix
pkgs/applications/science/logic/avy/glucose-fenv.patch pkgs/by-name/av/avy/glucose-fenv.patch
pkgs/applications/science/logic/avy/minisat-fenv.patch pkgs/applications/science/logic/satallax/minisat-fenv.patch
+1 -1
pkgs/applications/science/logic/satallax/default.nix
··· 35 ]; 36 37 prePatch = '' 38 - patch -p1 -i ${../avy/minisat-fenv.patch} -d minisat 39 ''; 40 41 preConfigure = ''
··· 35 ]; 36 37 prePatch = '' 38 + patch -p1 -i ${./minisat-fenv.patch} -d minisat 39 ''; 40 41 preConfigure = ''
+1 -1
pkgs/applications/science/logic/vampire/default.nix
··· 29 ]; 30 31 postPatch = '' 32 - patch -p1 -i ${../avy/minisat-fenv.patch} -d Minisat || true 33 ''; 34 35 enableParallelBuilding = true;
··· 29 ]; 30 31 postPatch = '' 32 + patch -p1 -i ${./minisat-fenv.patch} -d Minisat || true 33 ''; 34 35 enableParallelBuilding = true;
+57
pkgs/applications/science/logic/vampire/minisat-fenv.patch
···
··· 1 + diff --git a/core/Main.cc b/core/Main.cc 2 + index 2b0d97b..9ba985d 100644 3 + --- a/core/Main.cc 4 + +++ b/core/Main.cc 5 + @@ -77,9 +77,13 @@ int main(int argc, char** argv) 6 + setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n where input may be either in plain or gzipped DIMACS.\n"); 7 + // printf("This is MiniSat 2.0 beta\n"); 8 + 9 + -#if defined(__linux__) 10 + - fpu_control_t oldcw, newcw; 11 + - _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw); 12 + +#if defined(__linux__) && defined(__x86_64__) 13 + + fenv_t fenv; 14 + + 15 + + fegetenv(&fenv); 16 + + fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */ 17 + + fenv.__control_word |= 0x200; /* _FPU_DOUBLE */ 18 + + fesetenv(&fenv); 19 + printf("WARNING: for repeatability, setting FPU to use double precision\n"); 20 + #endif 21 + // Extra options: 22 + diff --git a/simp/Main.cc b/simp/Main.cc 23 + index 2804d7f..7fbdb33 100644 24 + --- a/simp/Main.cc 25 + +++ b/simp/Main.cc 26 + @@ -78,9 +78,13 @@ int main(int argc, char** argv) 27 + setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n where input may be either in plain or gzipped DIMACS.\n"); 28 + // printf("This is MiniSat 2.0 beta\n"); 29 + 30 + -#if defined(__linux__) 31 + - fpu_control_t oldcw, newcw; 32 + - _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw); 33 + +#if defined(__linux__) && defined(__x86_64__) 34 + + fenv_t fenv; 35 + + 36 + + fegetenv(&fenv); 37 + + fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */ 38 + + fenv.__control_word |= 0x200; /* _FPU_DOUBLE */ 39 + + fesetenv(&fenv); 40 + printf("WARNING: for repeatability, setting FPU to use double precision\n"); 41 + #endif 42 + // Extra options: 43 + diff --git a/utils/System.h b/utils/System.h 44 + index 1758192..840bee5 100644 45 + --- a/utils/System.h 46 + +++ b/utils/System.h 47 + @@ -21,8 +21,8 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA 48 + #ifndef Minisat_System_h 49 + #define Minisat_System_h 50 + 51 + -#if defined(__linux__) 52 + -#include <fpu_control.h> 53 + +#if defined(__linux__) && defined(__x86_64__) 54 + +#include <fenv.h> 55 + #endif 56 + 57 + #include "mtl/IntTypes.h"
+57
pkgs/by-name/av/avy/minisat-fenv.patch
···
··· 1 + diff --git a/core/Main.cc b/core/Main.cc 2 + index 2b0d97b..9ba985d 100644 3 + --- a/core/Main.cc 4 + +++ b/core/Main.cc 5 + @@ -77,9 +77,13 @@ int main(int argc, char** argv) 6 + setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n where input may be either in plain or gzipped DIMACS.\n"); 7 + // printf("This is MiniSat 2.0 beta\n"); 8 + 9 + -#if defined(__linux__) 10 + - fpu_control_t oldcw, newcw; 11 + - _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw); 12 + +#if defined(__linux__) && defined(__x86_64__) 13 + + fenv_t fenv; 14 + + 15 + + fegetenv(&fenv); 16 + + fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */ 17 + + fenv.__control_word |= 0x200; /* _FPU_DOUBLE */ 18 + + fesetenv(&fenv); 19 + printf("WARNING: for repeatability, setting FPU to use double precision\n"); 20 + #endif 21 + // Extra options: 22 + diff --git a/simp/Main.cc b/simp/Main.cc 23 + index 2804d7f..7fbdb33 100644 24 + --- a/simp/Main.cc 25 + +++ b/simp/Main.cc 26 + @@ -78,9 +78,13 @@ int main(int argc, char** argv) 27 + setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n where input may be either in plain or gzipped DIMACS.\n"); 28 + // printf("This is MiniSat 2.0 beta\n"); 29 + 30 + -#if defined(__linux__) 31 + - fpu_control_t oldcw, newcw; 32 + - _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw); 33 + +#if defined(__linux__) && defined(__x86_64__) 34 + + fenv_t fenv; 35 + + 36 + + fegetenv(&fenv); 37 + + fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */ 38 + + fenv.__control_word |= 0x200; /* _FPU_DOUBLE */ 39 + + fesetenv(&fenv); 40 + printf("WARNING: for repeatability, setting FPU to use double precision\n"); 41 + #endif 42 + // Extra options: 43 + diff --git a/utils/System.h b/utils/System.h 44 + index 1758192..840bee5 100644 45 + --- a/utils/System.h 46 + +++ b/utils/System.h 47 + @@ -21,8 +21,8 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA 48 + #ifndef Minisat_System_h 49 + #define Minisat_System_h 50 + 51 + -#if defined(__linux__) 52 + -#include <fpu_control.h> 53 + +#if defined(__linux__) && defined(__x86_64__) 54 + +#include <fenv.h> 55 + #endif 56 + 57 + #include "mtl/IntTypes.h"
-2
pkgs/top-level/all-packages.nix
··· 15118 }; 15119 tlaplusToolbox = callPackage ../applications/science/logic/tlaplus/toolbox.nix { }; 15120 15121 - avy = callPackage ../applications/science/logic/avy { }; 15122 - 15123 ### SCIENCE / ENGINEERING 15124 15125 ### SCIENCE / ELECTRONICS
··· 15118 }; 15119 tlaplusToolbox = callPackage ../applications/science/logic/tlaplus/toolbox.nix { }; 15120 15121 ### SCIENCE / ENGINEERING 15122 15123 ### SCIENCE / ELECTRONICS