llvm12: remove bumped subpackages

This commit is contained in:
Marcin Puc 2022-12-18 12:20:08 +01:00 committed by Leah Neukirchen
parent 42c9afdc4d
commit fb0098c726

View file

@ -50,55 +50,7 @@ case "$XBPS_TARGET_MACHINE" in
ppc*) configure_args+=" -DCLANG_ENABLE_CLANGD=OFF" ;;
esac
_enabled_projects="clang;clang-tools-extra;compiler-rt;libcxx;libcxxabi;libunwind;lld"
_lldb_enable=yes
_libomp_enable=no
case "$XBPS_TARGET_MACHINE" in
ppc64le*) ;;
ppc*|i686*) _lldb_enable=no ;;
esac
case "$XBPS_TARGET_MACHINE" in
x86_64*|aarch64*|ppc64*) _libomp_enable=yes;;
esac
subpackages="clang-tools-extra"
# must go before clang
if [ "$_libomp_enable" = "yes" ]; then
_enabled_projects+=";openmp"
subpackages+=" libomp libomp-devel"
# because of cmake nonsense referencing libomptarget.so.*
depends+=" libomp>=${version}_${revision}"
fi
subpackages+=" clang clang-analyzer libclang libclang-cpp
llvm-libunwind llvm-libunwind-devel libcxx libcxx-devel
libcxxabi libcxxabi-devel libllvm12"
if [ "$_lldb_enable" = "yes" ]; then
# XXX fails to cross compile due to python
_enabled_projects+=";lldb"
subpackages+=" lldb lldb-devel"
fi
subpackages+=" lld lld-devel"
configure_args+=" -DLLVM_ENABLE_PROJECTS=${_enabled_projects}"
post_patch() {
if [ "$_lldb_enable" = "yes" ]; then
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
vsed -i 's|__ptrace_request|int|g' \
${wrksrc}/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
fi
# disable docs for lldb as they fail to generate
vsed -i '/add_subdirectory(docs)/d' \
${wrksrc}/lldb/CMakeLists.txt
fi
# update config.guess for better platform detection
cp $XBPS_COMMONDIR/environment/configure/automake/config.guess \
${wrksrc}/llvm/cmake
@ -154,14 +106,12 @@ pre_configure() {
cd build/HOST
CC="$BUILD_CC" CXX="$BUILD_CXX" CFLAGS="$BUILD_CFLAGS" \
CXXFLAGS="$BUILD_CXXFLAGS" LDFLAGS="$BUILD_LDFLAGS" \
cmake ../.. -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS=${_enabled_projects}
cmake ../.. -DCMAKE_BUILD_TYPE=Release
make ${makejobs} -C utils/TableGen
make ${makejobs} -C tools/clang/utils/TableGen
[ "$_lldb_enable" = "yes" ] && make ${makejobs} -C tools/lldb/utils/TableGen
configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/llvm-tblgen"
configure_args+=" -DCLANG_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/clang-tblgen"
[ "$_lldb_enable" = "yes" ] && configure_args+=" -DLLDB_TABLEGEN=${wrksrc}/llvm/build/HOST/bin/lldb-tblgen"
cd ../..
fi
@ -201,218 +151,6 @@ do_install() {
if [ "$CROSS_BUILD" ]; then
rm -f ${DESTDIR}/usr/bin/llvm-config-host
fi
# Install libcxxabi headers
vinstall ${wrksrc}/libcxxabi/include/__cxxabi_config.h 644 usr/include
vinstall ${wrksrc}/libcxxabi/include/cxxabi.h 644 usr/include
# Install libunwind headers
vinstall ${wrksrc}/libunwind/include/__libunwind_config.h 644 usr/include
vinstall ${wrksrc}/libunwind/include/libunwind.h 644 usr/include
vinstall ${wrksrc}/libunwind/include/unwind.h 644 usr/include
vinstall ${wrksrc}/libunwind/include/mach-o/compact_unwind_encoding.h \
644 usr/include/mach-o
}
clang-analyzer_package() {
pycompile_dirs="usr/share/scan-view"
depends="clang-${version}_${revision} python3 perl"
short_desc+=" - A source code analysis framework"
homepage="https://clang-analyzer.llvm.org/"
pkg_install() {
vmove usr/share/man/man1/scan-build.1
vmove "/usr/bin/scan-*"
vmove "/usr/share/scan-*"
vmove "/usr/libexec/*analyzer"
}
}
clang-tools-extra_package() {
lib32disabled=yes
depends="clang-${version}_${revision} python3"
short_desc+=" - Extra Clang tools"
homepage="https://clang.llvm.org/extra/"
pkg_install() {
vmove usr/include/clang-tidy
vmove usr/bin/clang-apply-replacements
vmove usr/bin/clang-query
vmove usr/bin/clang-rename
vmove usr/bin/clang-tidy
vmove usr/bin/diagtool
vmove usr/bin/find-all-symbols
vmove usr/bin/hmaptool
vmove usr/bin/modularize
vmove usr/bin/pp-trace
vmove usr/bin/sancov
vmove "usr/lib/libclangApplyReplacements*"
vmove "usr/lib/libclangQuery*"
vmove "usr/lib/libclangTidy*"
vmove "usr/share/clang/*tidy*"
vmove usr/share/doc/clang-tools
vmove usr/share/man/man1/extraclangtools.1
vmove usr/share/man/man1/diagtool.1
}
}
clang_package() {
lib32disabled=yes
depends="libstdc++-devel libgcc-devel binutils ${XBPS_TARGET_LIBC}-devel
libclang-${version}_${revision}"
short_desc+=" - C language family frontend"
homepage="https://clang.llvm.org/"
pkg_install() {
vmove usr/include/clang
vmove usr/include/clang-c
vmove "usr/bin/*clang*"
vmove usr/bin/c-index-test
vmove usr/lib/clang
vmove usr/lib/cmake/clang
vmove "usr/lib/libclang*.a"
vmove "usr/lib/libclang*.so"
vmove usr/share/clang
vmove usr/share/doc/clang
vmove usr/share/man/man1/clang.1
}
}
libclang_package() {
short_desc+=" - C frontend runtime library"
pkg_install() {
vmove "usr/lib/libclang.so.*"
}
}
libclang-cpp_package() {
short_desc+=" - C frontend runtime library (C++ interface)"
pkg_install() {
vmove "usr/lib/libclang-cpp.so.*"
}
}
lld_package() {
lib32disabled=yes
short_desc+=" - linker"
homepage="https://lld.llvm.org"
pkg_install() {
vmove usr/bin/lld*
vmove usr/bin/wasm-ld
vmove usr/bin/ld.lld*
vmove usr/bin/ld64.lld*
vmove usr/share/doc/lld
}
}
lld-devel_package() {
lib32disabled=yes
short_desc+=" - linker - development files"
homepage="https://lld.llvm.org"
depends="lld>=${version}_${revision}"
pkg_install() {
vmove usr/include/lld
vmove usr/lib/cmake/lld
vmove "usr/lib/liblld*a"
}
}
lldb_package() {
lib32disabled=yes
depends+=" python3-six"
short_desc+=" - LLDB debugger"
homepage="https://lldb.llvm.org/"
pkg_install() {
vmove usr/bin/*lldb*
vmove usr/lib/liblldb*so.*
vmove /usr/lib/python*
}
}
lldb-devel_package() {
lib32disabled=yes
depends="lldb>=${version}_${revision}"
short_desc+=" - LLDB debugger - development files"
pkg_install() {
vmove usr/include/lldb
vmove "usr/lib/liblldb*.so"
}
}
llvm-libunwind_package() {
short_desc+=" - libunwind"
pkg_install() {
vmove "usr/lib/libunwind.so.*"
}
}
llvm-libunwind-devel_package() {
short_desc+=" - libunwind - development files"
depends="llvm-libunwind>=${version}_${revision}"
conflicts="libunwind-devel>=0"
pkg_install() {
vmove usr/lib/libunwind.so
vmove usr/lib/libunwind.a
vmove "usr/include/*unwind*"
vmove usr/include/mach-o
vmove usr/share/doc/libunwind
}
}
libcxxabi_package() {
short_desc+=" - low level support for libc++"
pkg_install() {
vmove "usr/lib/libc++abi.so.*"
}
}
libcxxabi-devel_package() {
short_desc+=" - low level support for libc++ - development files"
depends="libcxxabi>=${version}_${revision}"
pkg_install() {
vmove usr/lib/libc++abi.so
vmove usr/lib/libc++abi.a
vmove "usr/include/*cxxabi*"
}
}
libcxx_package() {
short_desc+=" - C++ standard library"
pkg_install() {
vmove "usr/lib/libc++.so.*"
}
}
libcxx-devel_package() {
short_desc+=" - C++ standard library - development files"
depends="libcxx>=${version}_${revision}"
pkg_install() {
vmove usr/lib/libc++.so
vmove usr/lib/libc++.a
vmove usr/lib/libc++experimental.a
vmove usr/include/c++
vmove usr/share/doc/libcxx
}
}
libomp_package() {
short_desc+=" - Clang OpenMP support library"
pkg_install() {
vmove usr/lib/libomp.so
vmove "usr/lib/libomptarget.rtl.*.so"
vmove usr/lib/libarcher.so
vmove "usr/lib/libomp*.so.*"
}
}
libomp-devel_package() {
short_desc+=" - Clang OpenMP support library - development files"
depends="libomp>=${version}_${revision}"
pkg_install() {
vmove "usr/lib/libomp*.so"
vmove "usr/lib/libarcher*"
vmove "usr/include/omp*.h"
vmove "usr/lib/clang/${version}/include/omp*.h"
vmove usr/share/man/man1/llvmopenmp.1
vmove usr/share/doc/openmp
}
}
libllvm12_package() {