diff options
author | Llewelyn Trahaearn | 2020-01-17 17:13:59 -0800 |
---|---|---|
committer | Llewelyn Trahaearn | 2020-01-17 17:17:53 -0800 |
commit | 015e4f4943fc4090f78f4f81dee911e138874064 (patch) | |
tree | 8081731a8771408a3e2023ba68b102050ee5be71 | |
parent | 61826d8615160f6bd73ca50256f2b430ca094f98 (diff) | |
download | aur-015e4f4943fc4090f78f4f81dee911e138874064.tar.gz |
Patch test suite to support Python 3.8
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | platform_linux_distribution.diff | 32 |
3 files changed, 52 insertions, 8 deletions
@@ -17,11 +17,15 @@ pkgbase = libc++ noextract = libcxx-9.0.1.src.tar.xz noextract = libcxx-9.0.1.src.tar.xz.sig noextract = libcxxabi-9.0.1.src.tar.xz + noextract = libcxxabi-9.0.1.src.tar.xz.sig + noextract = platform_linux_distribution.diff source = https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/llvm-9.0.1.src.tar.xz source = https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/llvm-9.0.1.src.tar.xz.sig source = https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/libcxx-9.0.1.src.tar.xz source = https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/libcxx-9.0.1.src.tar.xz.sig source = https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/libcxxabi-9.0.1.src.tar.xz + source = https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/libcxxabi-9.0.1.src.tar.xz.sig + source = platform_linux_distribution.diff validpgpkeys = 474E22316ABF4785A88C6E8EA2C794A986419D8A validpgpkeys = B6C8F98282B944E3B0D5C2530FC3042E345AD05D sha512sums = bfb6960a4dd1e18f4005f324f478a781c69e8ec7c20569d9b243fcb9372dc7733b254f26c683373537990cc9c109c78eaf0f65449629ee17caca1bce9b9ccccd @@ -29,6 +33,8 @@ pkgbase = libc++ sha512sums = aabbc98c5bd6935d3dabfb309dfc171fbc16441396628d22d8dcdb89a5015f8fdedef4237134b841314d572205f7d5cfe44c1c8900db0f0156810f7810376bb2 sha512sums = SKIP sha512sums = b5dbe4379a13046e7b9003e6913b0435271476feef0acbfd4e8207fca6d4a580182628866bd2032ce84a55d524fee8620841f17214bc79c8f46a3fde2f57627a + sha512sums = SKIP + sha512sums = ec5c442fd710049f7ff90274517e7869d2745ae3a3d80aab79e3669fb4a72de2536887e6b337f514f16cfb2c94be8794abed7249e30ebe0d721b535fc73668af pkgname = libc++ pkgdesc = LLVM C++ standard library. @@ -13,13 +13,16 @@ depends=('gcc-libs') makedepends=('clang' 'cmake' 'llvm' 'libunwind' 'ninja' 'python') source=("https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-$pkgver.src.tar.xz"{,.sig} "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/libcxx-$pkgver.src.tar.xz"{,.sig} - "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/libcxxabi-$pkgver.src.tar.xz") + "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/libcxxabi-$pkgver.src.tar.xz"{,.sig} + "platform_linux_distribution.diff") noextract=("${source[@]##*/}") sha512sums=('bfb6960a4dd1e18f4005f324f478a781c69e8ec7c20569d9b243fcb9372dc7733b254f26c683373537990cc9c109c78eaf0f65449629ee17caca1bce9b9ccccd' 'SKIP' 'aabbc98c5bd6935d3dabfb309dfc171fbc16441396628d22d8dcdb89a5015f8fdedef4237134b841314d572205f7d5cfe44c1c8900db0f0156810f7810376bb2' 'SKIP' - 'b5dbe4379a13046e7b9003e6913b0435271476feef0acbfd4e8207fca6d4a580182628866bd2032ce84a55d524fee8620841f17214bc79c8f46a3fde2f57627a') + 'b5dbe4379a13046e7b9003e6913b0435271476feef0acbfd4e8207fca6d4a580182628866bd2032ce84a55d524fee8620841f17214bc79c8f46a3fde2f57627a' + 'SKIP' + 'ec5c442fd710049f7ff90274517e7869d2745ae3a3d80aab79e3669fb4a72de2536887e6b337f514f16cfb2c94be8794abed7249e30ebe0d721b535fc73668af') validpgpkeys=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com> (.1 releases) validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org> (.0 releases) @@ -29,6 +32,11 @@ prepare() { bsdtar --strip-components 1 -zxf "${source[2]##*/}" -C llvm/projects/libcxx bsdtar --strip-components 1 -zxf "${source[4]##*/}" -C llvm/projects/libcxxabi sed -i 's/CREDITS.TXT/CREDITS/' llvm/projects/libcxx/LICENSE.TXT llvm/projects/libcxxabi/LICENSE.TXT + + # Python 3.8 support for test suite. + # https://github.com/llvm/llvm-project/issues/62 + # https://reviews.llvm.org/D72501 + patch -Np1 -i platform_linux_distribution.diff } build() { @@ -44,12 +52,10 @@ build() { ninja cxx cxx_experimental } -# Deprecated function finally removed in Python 3.8 results in failure. -# https://github.com/llvm/llvm-project/issues/62 -#check() { -# cd build -# ninja check-cxx check-cxxabi -#} +check() { + cd build + ninja check-cxx check-cxxabi +} package_libc++() { pkgdesc='LLVM C++ standard library.' diff --git a/platform_linux_distribution.diff b/platform_linux_distribution.diff new file mode 100644 index 000000000000..2b9bddacf799 --- /dev/null +++ b/platform_linux_distribution.diff @@ -0,0 +1,32 @@ +diff --git a/libcxx/utils/libcxx/test/target_info.py b/libcxx/utils/libcxx/test/target_info.py +--- a/llvm/projects/libcxx/utils/libcxx/test/target_info.py ++++ b/llvm/projects/libcxx/utils/libcxx/test/target_info.py +@@ -207,15 +207,25 @@ + def platform(self): + return 'linux' + ++ def _distribution(self): ++ try: ++ # linux_distribution is not available since Python 3.8 ++ # However, this function is only used to detect SLES 11, ++ # which is quite an old distribution that doesn't have ++ # Python 3.8. ++ return platform.linux_distribution() ++ except AttributeError: ++ return '', '', '' ++ + def platform_name(self): +- name, _, _ = platform.linux_distribution() ++ name, _, _ = self._distribution() + # Some distros have spaces, e.g. 'SUSE Linux Enterprise Server' + # lit features can't have spaces + name = name.lower().strip().replace(' ', '-') + return name # Permitted to be None + + def platform_ver(self): +- _, ver, _ = platform.linux_distribution() ++ _, ver, _ = self._distribution() + ver = ver.lower().strip().replace(' ', '-') + return ver # Permitted to be None. + + |