Date: Wednesday, November 2, 2022 @ 03:49:56
Author: foutrelis
Revision: 1340966
archrelease: copy trunk to community-staging-x86_64
Added:
mold/repos/community-staging-x86_64/
mold/repos/community-staging-x86_64/PKGBUILD
(from rev 1340965, mold/trunk/PKGBUILD)
----------+
PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
Copied: mold/repos/community-staging-x86_64/PKGBUILD (from rev 1340965,
mold/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2022-11-02 03:49:56 UTC (rev 1340966)
@@ -0,0 +1,47 @@
+# Maintainer: George Rawlinson <[email protected]>
+# Contributor: Adrian Perez de Castro <[email protected]>
+
+pkgname=mold
+pkgver=1.6.0
+pkgrel=2
+pkgdesc='A Modern Linker'
+arch=('x86_64')
+url='https://github.com/rui314/mold'
+license=('AGPL3')
+# xxhash is bundled
+depends=('gcc-libs' 'mimalloc' 'openssl' 'zlib' 'tbb')
+makedepends=('git' 'python' 'cmake' 'mold' 'openssl-1.1')
+checkdepends=('clang' 'libdwarf')
+options=('debug')
+_commit='323ad30e25c2c81efdb07ab76601a119335a40c8'
+source=("$pkgname::git+$url.git#commit=$_commit")
+b2sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+
+ git describe --tags | sed 's/^v//'
+}
+
+build() {
+ cmake \
+ -S "$pkgname" \
+ -B build \
+ -DCMAKE_BUILD_TYPE='None' \
+ -DCMAKE_INSTALL_PREFIX='/usr' \
+ -DCMAKE_INSTALL_LIBEXECDIR='lib' \
+ -DMOLD_USE_SYSTEM_MIMALLOC=ON \
+ -DMOLD_USE_SYSTEM_TBB=ON \
+ -DMOLD_LTO=ON \
+ -DMOLD_USE_MOLD=ON
+
+ cmake --build build
+}
+
+check() {
+ ctest --test-dir build --output-on-failure
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+}