1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 11:15:13 +03:00
aports/community/llvm-libunwind/APKBUILD
2021-06-12 07:28:06 +00:00

51 lines
1.6 KiB
Text

# Contributor: Eric Molitor <eric@molitor.org>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=llvm-libunwind
# Note: Update together with llvm.
pkgver=11.1.0
_pkgname=libunwind
_llvmver=${pkgver%%.*}
pkgrel=0
pkgdesc="LLVM version of libunwind library"
url="https://llvm.org/"
arch="all !s390x"
license="Apache-2.0"
depends_dev="!libunwind-dev"
makedepends="cmake llvm$_llvmver-dev"
subpackages="$pkgname-static $pkgname-dev"
source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/libunwind-$pkgver.src.tar.xz
link-libssp.patch
"
builddir="$srcdir/$_pkgname-$pkgver.src"
options="!check"
build() {
local crossopts=''
[ "$CBUILD" != "$CHOST" ] && crossopts="
-DCMAKE_SYSTEM_NAME=Linux
-DCMAKE_HOST_SYSTEM_NAME=Linux
-DLIBUNWIND_SYSROOT=$CBUILDROOT"
cmake -B build \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
-DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_CONFIG_PATH="/usr/lib/llvm$_llvmver/bin/llvm-config" \
-DLIBUNWIND_HAS_NODEFAULTLIBS_FLAG=OFF \
$crossopts
make -C build
}
package() {
make -C build install DESTDIR="$pkgdir"
mkdir -p "$pkgdir"/usr/include
cp include/*.h "$pkgdir"/usr/include/
}
sha512sums="507f29cf1a318d9761fe6306b2e9b57c02a342f138b47ec5420dce527132a33f7affcd386913792c472ceeb9fb1c1b105bba3234a1575aae0f68024e94c8d596 libunwind-11.1.0.src.tar.xz
28063f237033006666491d8475d57f4c9cc998ac22ad06234fdb6cf54cc434d79ab1778c8dbb3ec02764096d5e65c31a7e3976f079fc56b702f3abd16ac93f0e link-libssp.patch"