summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorOlaf Leidinger2017-07-25 23:12:35 +0200
committerOlaf Leidinger2017-07-25 23:12:35 +0200
commit23755a6927ca8b7b16e38cb31d0c98f8e5731fa7 (patch)
tree98954776ae7571735982f4ae444efeabbcfc5dd6 /PKGBUILD
downloadaur-23755a6927ca8b7b16e38cb31d0c98f8e5731fa7.tar.gz
Initial version
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD55
1 files changed, 55 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7babb0462d3e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Olaf Leidinger <oleid@mescharet.de>
+pkgname=hcc
+pkgver=1.0.17236.r102.g9b43ce89
+pkgrel=1
+pkgdesc="HCC is an Open Source, Optimizing C++ Compiler for Heterogeneous Compute"
+_gitdir=hcc
+arch=('x86_64')
+url="https://github.com/RadeonOpenCompute/hcc"
+license=('NCSAOSL')
+groups=()
+depends=(rocm-utils hsakmt-roct hsa-rocr hsa-ext-rocr)
+makedepends=(git cmake gcc)
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+replaces=()
+backup=()
+options=(!staticlibs strip)
+source=('git+https://github.com/RadeonOpenCompute/hcc.git#branch=clang_tot_upgrade')
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${_gitdir}"
+
+ git describe --long --tags | sed 's/^preview_//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$srcdir/${_gitdir}"
+ git submodule init
+ git submodule update
+}
+
+build() {
+ cd "$srcdir/${_gitdir}"
+ mkdir -p build
+ cd build
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DAMDHSACOD=/usr/bin/amdhsacod \
+ -DHSA_HEADER=/opt/rocm/hsa/include \
+ -DHSA_LIBRARY=/opt/rocm/hsa/lib/libhsa-runtime64.so.1 \
+ ..
+}
+
+package() {
+ cd "$srcdir/${_gitdir}/build"
+ env DESTDIR="$pkgdir/" make install
+
+ # add links
+ mkdir -p "$pkgdir/usr/bin"
+ for fn in hcc hcc-config
+ do
+ ln -s /opt/rocm/hcc*/bin/$fn "$pkgdir/usr/bin/$fn"
+ done
+}