summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakbyte2020-04-04 11:27:57 -0400
committerjakbyte2020-04-04 11:27:57 -0400
commit77c6cfa3e2f42a214b67e0b85532415f323878b1 (patch)
treedb53cd67fe86d1d68c7b72847a338f0a2d0ca848
downloadaur-77c6cfa3e2f42a214b67e0b85532415f323878b1.tar.gz
Initial commit
-rw-r--r--.SRCINFO45
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD145
-rw-r--r--sphinx2.patch13
4 files changed, 207 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c6d1118d5a9a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,45 @@
+pkgbase = lld7
+ pkgdesc = Linker from the LLVM project.
+ pkgver = 7.1.0
+ pkgrel = 1
+ url = https://lld.llvm.org/
+ arch = x86_64
+ license = custom:Apache 2.0 with LLVM Exception
+ makedepends = llvm7
+ makedepends = cmake
+ makedepends = ninja
+ makedepends = python-sphinx
+ conflicts = lld
+ source = https://github.com/llvm/llvm-project/releases/download/llvmorg-7.1.0/lld-7.1.0.src.tar.xz
+ source = https://github.com/llvm/llvm-project/releases/download/llvmorg-7.1.0/lld-7.1.0.src.tar.xz.sig
+ source = https://github.com/llvm/llvm-project/releases/download/llvmorg-7.1.0/llvm-7.1.0.src.tar.xz
+ source = https://github.com/llvm/llvm-project/releases/download/llvmorg-7.1.0/llvm-7.1.0.src.tar.xz.sig
+ source = sphinx2.patch
+ validpgpkeys = 474E22316ABF4785A88C6E8EA2C794A986419D8A
+ sha256sums = a10f274a0a09408eaf9c088dec6fb2254f7d641221437763c94546cbfe595867
+ sha256sums = SKIP
+ sha256sums = 1bcc9b285074ded87b88faaedddb88e6b5d6c331dfcfb57d7f3393dd622b3764
+ sha256sums = SKIP
+ sha256sums = 5c5efddd872ee5615eb7d28b8f7ae0ea12ce904352f11c40362dcb6ed3f65410
+
+pkgname = lld7
+ pkgdesc = Linker from the LLVM project.
+ depends = lld7-headers
+ depends = lld7-libs
+ depends = llvm7-libs
+
+pkgname = lld7-headers
+ pkgdesc = Headers from the linker from the LLVM project.
+ depends = llvm7-libs
+
+pkgname = lld7-libs
+ pkgdesc = Shared libraries from the linker from the LLVM project.
+ depends = llvm7-libs
+
+pkgname = lld7-libs-static
+ pkgdesc = Static libraries from the linker from the LLVM project.
+ depends = llvm7-libs
+
+pkgname = lld7-docs
+ pkgdesc = Documentation from the linker from the LLVM project.
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b799ab7a7174
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg
+src
+*.tar.xz
+*.sig \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5d775a2bbfd4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,145 @@
+# Maintainer: jakbyte <jakbyte@gmail.com>
+# Contributor: jakbyte <jakbyte@gmail.com>
+
+pkgname=("lld7" "lld7-headers" "lld7-libs" "lld7-libs-static" "lld7-docs")
+pkgdesc="Linker from the LLVM project."
+pkgver="7.1.0"
+pkgrel="1"
+arch=("x86_64")
+url="https://lld.llvm.org/"
+license=("custom:Apache 2.0 with LLVM Exception")
+makedepends=("llvm7" "cmake" "ninja" "python-sphinx")
+conflicts=("lld")
+
+_source_prefix=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
+source=($_source_prefix/lld-$pkgver.src.tar.xz{,.sig}
+ $_source_prefix/llvm-$pkgver.src.tar.xz{,.sig}
+ sphinx2.patch)
+sha256sums=("a10f274a0a09408eaf9c088dec6fb2254f7d641221437763c94546cbfe595867"
+ "SKIP"
+ "1bcc9b285074ded87b88faaedddb88e6b5d6c331dfcfb57d7f3393dd622b3764"
+ "SKIP"
+ "5c5efddd872ee5615eb7d28b8f7ae0ea12ce904352f11c40362dcb6ed3f65410")
+validpgpkeys+=("474E22316ABF4785A88C6E8EA2C794A986419D8A") # Tom Stellard <tstellar@redhat.com>
+
+prepare() {
+ cd "$srcdir/lld-$pkgver.src"
+ mkdir build
+ mkdir build/static
+
+ # https://bugs.llvm.org/show_bug.cgi?id=41789
+ patch -Np1 -i ../sphinx2.patch
+}
+
+build() {
+ # Build lld.
+ cd "$srcdir/lld-$pkgver.src/build"
+ cmake .. -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python \
+ -DBUILD_SHARED_LIBS=ON \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_INCLUDE_TESTS=ON \
+ -DLLVM_BUILD_TESTS=ON \
+ -DLLVM_BUILD_DOCS=ON \
+ -DLLVM_ENABLE_SPHINX=ON \
+ -DLLVM_EXTERNAL_LIT=/usr/bin/lit \
+ -DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
+ ninja
+
+ # Build lld with static libraries.
+ cd "$srcdir/lld-$pkgver.src/build/static"
+ cmake ../.. -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_INCLUDE_TESTS=ON \
+ -DLLVM_BUILD_TESTS=ON \
+ -DLLVM_BUILD_DOCS=ON \
+ -DLLVM_ENABLE_SPHINX=ON \
+ -DLLVM_EXTERNAL_LIT=/usr/bin/lit \
+ -DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
+ ninja
+}
+
+check() {
+ # Run the tests.
+ cd "$srcdir/lld-$pkgver.src/build"
+}
+
+package_lld7() {
+ pkgdesc="Linker from the LLVM project."
+ depends=("lld7-headers" "lld7-libs" "llvm7-libs")
+
+ # Install lld.
+ cd "$srcdir/lld-$pkgver.src/build"
+ DESTDIR="$pkgdir" ninja install
+
+ # Remove header, shared library, and documentation files.
+ rm -r "$pkgdir"/usr/{include,lib,share/doc}
+
+ # Install the license.
+ install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lld7-headers() {
+ pkgdesc="Headers from the linker from the LLVM project."
+ depends=("llvm7-libs")
+
+ # Install lld.
+ cd "$srcdir/lld-$pkgver.src/build"
+ DESTDIR="$pkgdir" ninja install
+
+ # Remove binary, shared library, and documentation files.
+ rm -r "$pkgdir"/usr/{bin,lib,share/doc}
+
+ # Install the license.
+ install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lld7-libs() {
+ pkgdesc="Shared libraries from the linker from the LLVM project."
+ depends=("llvm7-libs")
+
+ # Install lld.
+ cd "$srcdir/lld-$pkgver.src/build"
+ DESTDIR="$pkgdir" ninja install
+
+ # Remove binary, header, and documentation files.
+ rm -r "$pkgdir"/usr/{bin,include,share/doc}
+
+ # Install the license.
+ install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lld7-libs-static() {
+ pkgdesc="Static libraries from the linker from the LLVM project."
+ depends=("llvm7-libs")
+
+ # Install lld.
+ cd "$srcdir/lld-$pkgver.src/build/static"
+ DESTDIR="$pkgdir" ninja install
+
+ # Remove binary, header, and documentation files.
+ rm -r "$pkgdir"/usr/{bin,include,share/doc}
+
+ # Install the license.
+ install -Dm644 ../../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lld7-docs() {
+ pkgdesc="Documentation from the linker from the LLVM project."
+
+ # Install lld.
+ cd "$srcdir/lld-$pkgver.src/build"
+ DESTDIR="$pkgdir" ninja install
+
+ # Remove binary, header, shared library, and documentation source files.
+ rm -r "$pkgdir"/usr/{bin,include,lib,share/doc/lld/html/{_sources,.buildinfo}}
+
+ # Install the license.
+ install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/sphinx2.patch b/sphinx2.patch
new file mode 100644
index 000000000000..46d637f579d7
--- /dev/null
+++ b/sphinx2.patch
@@ -0,0 +1,13 @@
+diff --git a/docs/conf.py b/docs/conf.py
+index 62404b275..b5a3cdc68 100644
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -134,7 +134,7 @@ html_last_updated_fmt = '%Y-%m-%d'
+ #html_use_smartypants = True
+
+ # Custom sidebar templates, maps document names to template names.
+-html_sidebars = {'index': 'indexsidebar.html'}
++html_sidebars = {'index': ['localtoc.html', 'relations.html', 'sourcelink.html', 'indexsidebar.html', 'searchbox.html']}
+
+ # Additional templates that should be rendered to pages, maps page names to
+ # template names. \ No newline at end of file