main/clang16: fix link again for real, and fix dir -> link upgrade too

This commit is contained in:
psykose 2023-03-21 04:39:06 +00:00
parent 7f9deb1155
commit 8a084aed9f
2 changed files with 18 additions and 4 deletions

View File

@ -5,13 +5,14 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=clang16
pkgver=16.0.0
pkgrel=7
pkgrel=8
_llvmver=${pkgver%%.*}
pkgdesc="A C language family front-end for LLVM"
arch="all"
url="https://llvm.org/"
license="Apache-2.0 WITH LLVM-Exception"
license="Apache-2.0 WITH LLVM-exception"
options="!check" # fail to build
install="$pkgname.pre-upgrade"
makedepends="
cmake
help2man
@ -213,8 +214,8 @@ package() {
done
# compat symlink back to fix clang with -no-canonical-prefixes
mkdir -p "$pkgdir"/usr/lib/clang/$_llvmver
ln -sfv ../lib/llvm$_llvmver/lib/clang/$_llvmver "$pkgdir"/usr/lib/clang/$_llvmver
mkdir -p "$pkgdir"/usr/lib/clang/
ln -sfv ../llvm$_llvmver/lib/clang/$_llvmver "$pkgdir"/usr/lib/clang/$_llvmver
}
dev() {

View File

@ -0,0 +1,13 @@
#!/bin/sh
ver_old=$2
if [ "$(apk version -t "$ver_old" '16.0.0-r8')" = '<' ]; then
# in -r7 we changed this directory containing a symlink, to a symlink itself
# in -r8 we added the pre-upgrade, so check for < -r8
if [ -d /usr/lib/clang/16 ]; then
rm -r /usr/lib/clang/16
fi
fi
exit 0