summaryrefslogtreecommitdiff
path: root/packages/gsl/hmatrix-gsl.cabal
blob: 76db835df3a8ee9d38da62dd4142917629ed23e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Name:               hmatrix-gsl
Version:            0.19.0.0
Synopsis:           Numerical computation
Description:        Purely functional interface to selected numerical computations,
                    internally implemented using GSL.
Homepage:           https://github.com/albertoruiz/hmatrix
license:            GPL-3
license-file:       LICENSE
Author:             Alberto Ruiz
Maintainer:         Alberto Ruiz <aruiz@um.es>
Stability:          provisional
Category:           Math
build-type:         Simple
cabal-version:      >=1.18


extra-source-files: src/Numeric/GSL/gsl-ode.c

flag onlygsl
    description:    don't link gslcblas
    default:        False

flag disable-default-paths
    description:    When enabled, don't add default hardcoded include/link dirs by default. Needed for hermetic builds like in nix.
    default:        False
    manual: True

library

    Build-Depends:      base<5, hmatrix>=0.18, array, vector,
                        process, random

    hs-source-dirs:     src
    Exposed-modules:    Numeric.GSL.Differentiation,
                        Numeric.GSL.Integration,
                        Numeric.GSL.Fourier,
                        Numeric.GSL.Polynomials,
                        Numeric.GSL.Minimization,
                        Numeric.GSL.Root,
                        Numeric.GSL.Fitting,
                        Numeric.GSL.ODE,
                        Numeric.GSL,
                        Numeric.GSL.LinearAlgebra,
                        Numeric.GSL.Interpolation,
                        Numeric.GSL.SimulatedAnnealing,
                        Graphics.Plot
    other-modules:      Numeric.GSL.Internal,
                        Numeric.GSL.Vector,
                        Numeric.GSL.IO,
                        Numeric.GSL.Random


    C-sources:          src/Numeric/GSL/gsl-aux.c

    cc-options:         -O4 -Wall

    if arch(x86_64)
        cc-options:     -msse2
    if arch(i386)
        cc-options:     -msse2

    ghc-options:  -Wall -fno-warn-missing-signatures
                        -fno-warn-orphans
                        -fno-warn-unused-binds

    if os(OSX)
        if !flag(disable-default-paths)
            extra-lib-dirs: /opt/local/lib/
            include-dirs: /opt/local/include/
            extra-lib-dirs: /usr/local/lib/
            include-dirs: /usr/local/include/
        extra-libraries: gsl
        if arch(i386)
            cc-options: -arch i386
        frameworks: Accelerate

    if os(freebsd)
        if !flag(disable-default-paths)
            extra-lib-dirs: /usr/local/lib
            include-dirs: /usr/local/include
        extra-libraries: gsl

    if os(windows)
        extra-libraries: gsl-0

    if os(linux)
        if arch(x86_64)
            cc-options: -fPIC

    if flag(onlygsl)
      extra-libraries: gsl
    else
      pkgconfig-depends: gsl

    default-language:    Haskell2010


source-repository head
    type:     git
    location: https://github.com/albertoruiz/hmatrix