39 lines
887 B
Bash
39 lines
887 B
Bash
#!/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
|