* mk/haskell.mk no longer set USE_TOOLS+=pkg-config for all the packages that include it. Instead it does TOOLS_FAIL+=pkg-config unless they explicitly do USE_TOOLS. * Fixed an issue regarding Template Haskell and our wrappers. * Fixed an issue where packages that had things like PLIST.common but lacked PLIST were incorrectly considered to have no PLISTs. * mk/haskell.mk now supports packages that contain more than a single library. The INSTALL and DEINSTALL scripts can now handle such packages properly.
31 lines
1 KiB
Bash
31 lines
1 KiB
Bash
# -*- sh -*-
|
|
# $NetBSD: INSTALL.in,v 1.3 2022/02/11 01:11:57 pho Exp $
|
|
#
|
|
HASKELL_PKG_BIN="@HASKELL_PKG_BIN@"
|
|
HASKELL_PKG_DESCR_FILE_OR_DIR="@HASKELL_PKG_DESCR_FILE_OR_DIR@"
|
|
EXPR="@EXPR@"
|
|
TRUE="@TRUE@"
|
|
|
|
case ${STAGE} in
|
|
POST-INSTALL)
|
|
if [ -f "${HASKELL_PKG_DESCR_FILE_OR_DIR}" ]; then
|
|
# The package contains a single library.
|
|
${HASKELL_PKG_BIN} register "${HASKELL_PKG_DESCR_FILE_OR_DIR}";
|
|
|
|
elif [ -d "${HASKELL_PKG_DESCR_FILE_OR_DIR}" ]; then
|
|
# The package contains two or more libraries. The order of
|
|
# registration is important here; libraries with higher indices
|
|
# may depend on those with lower ones.
|
|
i=1
|
|
while ${TRUE}; do
|
|
if [ -f "${HASKELL_PKG_DESCR_FILE_OR_DIR}/${i}" ]; then
|
|
${HASKELL_PKG_BIN} \
|
|
register "${HASKELL_PKG_DESCR_FILE_OR_DIR}/${i}"
|
|
i=`${EXPR} $i + 1`
|
|
else
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
;;
|
|
esac
|