aboutsummaryrefslogtreecommitdiffstats
path: root/lang/generic-haskell/pkg-install
blob: e565647bcfa9b534ccaae18f8f623a5274e02ae0 (plain) (blame)
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
#!/bin/sh

# exit on errors, use a sane path and install prefix
# (stolen from x11/xplore)
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin:
PREFIX=${PREFIX:-${PKG_PREFIX:-/usr/local}}

case $2 in
    PRE-INSTALL)
    : nothing to pre-install for this port
    ;;
    POST-INSTALL)
    # inlined copy of WRKSRC/generic-haskell.pkg below:
    libdir=${PREFIX}/gh-1.42/lib
    ${PREFIX}/bin/ghc-pkg -a <<EOF
Package {
   name            = "generic-haskell",
   import_dirs     = ["${libdir}"],
   source_dirs     = [],
   library_dirs    = ["${libdir}"],
   hs_libraries    = ["HSgeneric-haskell"],
   extra_libraries = [],
   include_dirs    = [],
   c_includes      = [],
   package_deps    = ["base","haskell98"],
   extra_ghc_opts  = [],
   extra_cc_opts   = [],
   extra_ld_opts   = []
}
EOF
   ;;
   *)
    echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
    exit 1
    ;;
esac

exit 0