# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka global pkgname := 'lld' global pkgver := '4.0.0' global pkgrel := '0' global _vermajor := $(pkgver%%.*) global pkgdesc := '"The LLVM Linker'" global url := '"http://llvm.org'" global arch := '"all'" global license := '"UOI-NCSA'" global makedepends := "" cmake llvm-dev>=$_vermajor llvm-static>=$_vermajor zlib-dev"" global subpackages := ""$pkgname-dev"" global source := ""http://llvm.org/releases/$pkgver/$pkgname-$pkgver.src.tar.xz cmake-fix-pthread-handling-for-out-of-tree-builds.patch"" global builddir := ""$srcdir/$pkgname-$pkgver.src"" proc build { mkdir -p "$builddir"/build cd "$builddir"/build cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DLLVM_LINK_LLVM_DYLIB=ON make } proc check { cd $builddir ./build/bin/ld.lld --version } proc package { cd "$builddir"/build make install DESTDIR="$pkgdir" } global sha512sums := '"66b2c9cc57f5e94ad7e7da1b1bcc08cbbaee1b55c6efa64b2424b9d8776c70b842c2a31c188a99b447be6a8621ad1b1e70573bbfcf5d6b1aa986b03b3b3350f3 lld-4.0.0.src.tar.xz 2aa44973dd86aaddbd5b21789bb5e2a611d00558c41ebd078c2b7d1a3eb5c303db69084f50517b14e77674c46148ecae6bde1b037d8ba5269a342fba84116a9b cmake-fix-pthread-handling-for-out-of-tree-builds.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(lld)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(4.0.0)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_vermajor) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_DPercent arg_word:{(".*")}) spids: [16 20] ) } spids: [15] ) ] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("The LLVM Linker"))} spids: [22] ) ] spids: [22] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:url) op:Equal rhs:{(DQ ("http://llvm.org"))} spids:[27])] spids: [27] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[32])] spids: [32] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (UOI-NCSA))} spids:[37])] spids: [37] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: { (DQ ("\n") ("\tcmake\n") ("\tllvm-dev>=") ($ VSub_Name "$_vermajor") ("\n") ("\tllvm-static>=") ($ VSub_Name "$_vermajor") ("\n") ("\tzlib-dev") ) } spids: [42] ) ] spids: [42] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (-dev))} spids: [55] ) ] spids: [55] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("http://llvm.org/releases/") ($ VSub_Name "$pkgver") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".src.tar.xz\n") ("\tcmake-fix-pthread-handling-for-out-of-tree-builds.patch") ) } spids: [61] ) ] spids: [61] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:builddir) op: Equal rhs: { (DQ ($ VSub_Name "$srcdir") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (.src)) } spids: [73] ) ] spids: [73] ) (FuncDef name: build body: (BraceGroup children: [ (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$builddir")) (/build)}) (C {(cd)} {(DQ ($ VSub_Name "$builddir")) (/build)}) (C {(cmake)} {(..)} {(-DCMAKE_BUILD_TYPE) (Lit_Other "=") (Release)} {(-DCMAKE_VERBOSE_MAKEFILE) (Lit_Other "=") (OFF)} {(-DCMAKE_INSTALL_PREFIX) (Lit_Other "=") (/usr)} {(-DCMAKE_CXX_FLAGS) (Lit_Other "=") (DQ ($ VSub_Name "$CXXFLAGS"))} {(-DCMAKE_C_FLAGS) (Lit_Other "=") (DQ ($ VSub_Name "$CFLAGS"))} {(-DCMAKE_SKIP_INSTALL_RPATH) (Lit_Other "=") (ON)} {(-DLLVM_LINK_LLVM_DYLIB) (Lit_Other "=") (ON)} ) (C {(make)}) ] spids: [88] ) spids: [84 87] ) (FuncDef name: check body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(./build/bin/ld.lld)} {(--version)}) ] spids: [170] ) spids: [166 169] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir")) (/build)}) (C {(make)} {(install)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))}) ] spids: [192] ) spids: [188 191] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "66b2c9cc57f5e94ad7e7da1b1bcc08cbbaee1b55c6efa64b2424b9d8776c70b842c2a31c188a99b447be6a8621ad1b1e70573bbfcf5d6b1aa986b03b3b3350f3 lld-4.0.0.src.tar.xz\n" ) ( "2aa44973dd86aaddbd5b21789bb5e2a611d00558c41ebd078c2b7d1a3eb5c303db69084f50517b14e77674c46148ecae6bde1b037d8ba5269a342fba84116a9b cmake-fix-pthread-handling-for-out-of-tree-builds.patch" ) ) } spids: [216] ) ] spids: [216] ) ] )