dev-lang/GHC: fix manpage alternatives

This commit is contained in:
Julian Ospald 2018-09-22 16:02:26 +08:00
parent b8752b6986
commit a8aeaf6e85
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
3 changed files with 34 additions and 17 deletions

View File

@ -160,6 +160,20 @@ src_install() {
/usr/$(exhost --target)/bin/hsc2hs{,-${SLOT}} \
/usr/$(exhost --target)/bin/runghc{,-${SLOT}} \
/usr/$(exhost --target)/bin/runhaskell /usr/$(exhost --target)/bin/runghc-${SLOT}
if [[ -d ${IMAGE}/usr/share/man ]]; then
local file alternatives=()
for file in "${IMAGE}"/usr/share/man/*/*; do
alternatives+=(
${file#${IMAGE}}
${file#${IMAGE}}-${SLOT}
)
done
alternatives_for \
ghc ${SLOT} ${SLOT} \
"${alternatives[@]}"
fi
}
src_test_expensive() {

View File

@ -158,7 +158,7 @@ src_install() {
/usr/$(exhost --target)/bin/runghc{,-${SLOT}} \
/usr/$(exhost --target)/bin/runhaskell /usr/$(exhost --target)/bin/runghc-${SLOT}
# alternatives for manpages
if [[ -d ${IMAGE}/usr/share/man ]]; then
local file alternatives=()
for file in "${IMAGE}"/usr/share/man/*/*; do
alternatives+=(
@ -170,6 +170,7 @@ src_install() {
alternatives_for \
ghc ${SLOT} ${SLOT} \
"${alternatives[@]}"
fi
}
src_test_expensive() {

View File

@ -159,6 +159,7 @@ src_install() {
/usr/$(exhost --target)/bin/runhaskell /usr/$(exhost --target)/bin/runghc-${SLOT}
# alternatives for manpages
if [[ -d ${IMAGE}/usr/share/man ]]; then
local file alternatives=()
for file in "${IMAGE}"/usr/share/man/*/*; do
alternatives+=(
@ -170,6 +171,7 @@ src_install() {
alternatives_for \
ghc ${SLOT} ${SLOT} \
"${alternatives[@]}"
fi
}
src_test_expensive() {