summaryrefslogtreecommitdiff
path: root/packages/glpk/hmatrix-glpk.cabal
blob: b01f704aff1083bd66cdf3c64af9c2ff417e413e (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
Name:               hmatrix-glpk
Version:            0.19.0.0
License:            GPL
License-file:       LICENSE
Author:             Alberto Ruiz
Maintainer:         Alberto Ruiz <aruiz@um.es>
Stability:          experimental
Homepage:           https://github.com/albertoruiz/hmatrix
Synopsis:           Linear Programming based on GLPK
Description:
 Simple interface to linear programming functions provided by GLPK.

Category:           Math
tested-with:        GHC ==7.8

cabal-version:      >=1.6
build-type:         Simple

extra-source-files:     examples/simplex1.hs
                        examples/simplex2.hs
                        examples/simplex3.hs
                        examples/simplex4.hs
                        examples/simplex5.hs

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.17, containers

    hs-source-dirs:     src

    Exposed-modules:    Numeric.LinearProgramming
                        Numeric.LinearProgramming.L1

    c-sources:          src/C/glpk.c

    ghc-options:  -Wall

    extra-libraries:    glpk

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

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