summaryrefslogtreecommitdiff
path: root/packages/base
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base')
-rw-r--r--packages/base/hmatrix.cabal30
1 files changed, 20 insertions, 10 deletions
diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal
index f1bc8e6..4d01e57 100644
--- a/packages/base/hmatrix.cabal
+++ b/packages/base/hmatrix.cabal
@@ -31,6 +31,11 @@ flag openblas
31 default: False 31 default: False
32 manual: True 32 manual: True
33 33
34flag disable-default-paths
35 description: When enabled, don't add default hardcoded include/link dirs by default. Needed for hermetic builds like in nix.
36 default: False
37 manual: True
38
34library 39library
35 40
36 Build-Depends: base >= 4.8 && < 5, 41 Build-Depends: base >= 4.8 && < 5,
@@ -95,29 +100,33 @@ library
95 100
96 if os(OSX) 101 if os(OSX)
97 if flag(openblas) 102 if flag(openblas)
98 extra-lib-dirs: /opt/local/lib/openblas/lib 103 if !flag(disable-default-paths)
104 extra-lib-dirs: /opt/local/lib/openblas/lib
99 extra-libraries: openblas 105 extra-libraries: openblas
100 else 106 else
101 extra-libraries: blas lapack 107 extra-libraries: blas lapack
102 108
103 extra-lib-dirs: /opt/local/lib/ 109 if !flag(disable-default-paths)
104 include-dirs: /opt/local/include/ 110 extra-lib-dirs: /opt/local/lib/
105 extra-lib-dirs: /usr/local/lib/ 111 include-dirs: /opt/local/include/
106 include-dirs: /usr/local/include/ 112 extra-lib-dirs: /usr/local/lib/
113 include-dirs: /usr/local/include/
107 if arch(i386) 114 if arch(i386)
108 cc-options: -arch i386 115 cc-options: -arch i386
109 frameworks: Accelerate 116 frameworks: Accelerate
110 117
111 if os(freebsd) 118 if os(freebsd)
112 if flag(openblas) 119 if flag(openblas)
113 extra-lib-dirs: /usr/local/lib/openblas/lib 120 if !flag(disable-default-paths)
121 extra-lib-dirs: /usr/local/lib/openblas/lib
114 extra-libraries: openblas 122 extra-libraries: openblas
115 else 123 else
116 extra-libraries: blas lapack 124 extra-libraries: blas lapack
117 125
118 extra-lib-dirs: /usr/local/lib 126 if !flag(disable-default-paths)
119 include-dirs: /usr/local/include 127 extra-lib-dirs: /usr/local/lib
120 extra-libraries: gfortran 128 include-dirs: /usr/local/include
129 extra-libraries: gfortran
121 130
122 if os(windows) 131 if os(windows)
123 if flag(openblas) 132 if flag(openblas)
@@ -127,7 +136,8 @@ library
127 136
128 if os(linux) 137 if os(linux)
129 if flag(openblas) 138 if flag(openblas)
130 extra-lib-dirs: /usr/lib/openblas/lib 139 if !flag(disable-default-paths)
140 extra-lib-dirs: /usr/lib/openblas/lib
131 extra-libraries: openblas 141 extra-libraries: openblas
132 else 142 else
133 extra-libraries: blas lapack 143 extra-libraries: blas lapack