diff options
author | neeshy | 2020-03-03 23:55:45 -0500 |
---|---|---|
committer | neeshy | 2020-03-07 14:29:30 -0500 |
commit | 49026a251423c373bf97c84d56b049d9d29b3611 (patch) | |
tree | e4ef0df450f79e505a1cd717f5fc4872b2686bd2 | |
parent | db0b87d16021540d2fff25e0000b661002b47ff3 (diff) | |
download | aur-49026a251423c373bf97c84d56b049d9d29b3611.tar.gz |
Cleanup
Consistent style across project
Remove extraneous dependencies
Update packages
Update checksums and .SRCINFO
Specify proper license
Fix prefixes
Prefer make to ninja
Much more
TODO: miopen, rocm-cmake{,-git}, rock-dkms{,-git},
Remove duplicates in makedepends and depends
git submodules
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 69 |
2 files changed, 33 insertions, 43 deletions
@@ -4,11 +4,8 @@ pkgbase = hipsparse pkgrel = 1 url = https://github.com/ROCmSoftwarePlatform/hipSPARSE arch = x86_64 - license = NCSAOSL - makedepends = git + license = custom:NCSAOSL makedepends = cmake - makedepends = gcc - makedepends = ninja makedepends = hcc>=3.0.0 makedepends = hip>=3.0.0 makedepends = python2 @@ -21,7 +18,7 @@ pkgbase = hipsparse source = https://github.com/ROCmSoftwarePlatform/hipSPARSE/archive/rocm-3.0.tar.gz source = hipsparse_hsa.patch sha256sums = 389de1d151436acdaa89c33530e7b86f6c4dc4aecbf3466131ec0972d8d1c33e - sha256sums = SKIP + sha256sums = d3a926958b84c660f273d6b3a644e8a775e9ed779a7d81baa8f4c4981cee076b pkgname = hipsparse @@ -1,64 +1,57 @@ # Maintainer: Markus Näther <naetherm@informatik.uni-freiburg.de> pkgname=hipsparse -pkgver=3.0.0 +_pkgver=3.0 +pkgver="$_pkgver.0" pkgrel=1 pkgdesc="ROCm SPARSE marshalling library." arch=('x86_64') url="https://github.com/ROCmSoftwarePlatform/hipSPARSE" -license=('NCSAOSL') -depends=(hcc hip) -makedepends=(git cmake gcc ninja "hcc>=${pkgver}" "hip>=${pkgver}" python2 "rocprim>=${pkgver}" "rocsparse>=${pkgver}" "rocm-comgr>=${pkgver}" rocminfo) -srcver="3.0" -source=( - "https://github.com/ROCmSoftwarePlatform/hipSPARSE/archive/rocm-$srcver.tar.gz" - "hipsparse_hsa.patch" -) -sha256sums=( - "389de1d151436acdaa89c33530e7b86f6c4dc4aecbf3466131ec0972d8d1c33e" - 'SKIP' -) +license=('custom:NCSAOSL') +depends=('hcc' 'hip') +makedepends=('cmake' "hcc>=$pkgver" "hip>=$pkgver" 'python2' "rocprim>=$pkgver" "rocsparse>=$pkgver" "rocm-comgr>=$pkgver" 'rocminfo') +source=("https://github.com/ROCmSoftwarePlatform/hipSPARSE/archive/rocm-$_pkgver.tar.gz" + "hipsparse_hsa.patch") +sha256sums=('389de1d151436acdaa89c33530e7b86f6c4dc4aecbf3466131ec0972d8d1c33e' + 'd3a926958b84c660f273d6b3a644e8a775e9ed779a7d81baa8f4c4981cee076b') prepare() { - cd "${srcdir}/hipSPARSE-rocm-$srcver" - patch --forward --strip=1 --input="${srcdir}/hipsparse_hsa.patch" + cd "$srcdir/hipSPARSE-rocm-$_pkgver" + patch -Np1 -i "$srcdir/hipsparse_hsa.patch" } build() { mkdir -p "$srcdir/build" cd "$srcdir/build" - # Tensile library needs python to be python2 - #export PATH="$srcdir:$PATH" - #[[ -e "$srcdir/python" ]] || ln -s /usr/bin/python2 "$srcdir/python" - # fix broken build with stack protection - export CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-fstack-protector-strong//') - export CFLAGS=$(echo $CFLAGS | sed -e 's/-fstack-protector-strong//') - export CPPFLAGS=$(echo $CPPFLAGS | sed -e 's/-fstack-protector-strong//') + export CFLAGS="$(sed -e 's/-fstack-protector-strong//' <<< "$CFLAGS")" + export CXXFLAGS="$(sed -e 's/-fstack-protector-strong//' <<< "$CXXFLAGS")" + export CPPFLAGS="$(sed -e 's/-fstack-protector-strong//' <<< "$CPPFLAGS")" # compile with HCC - export CXX=/opt/rocm/hcc/bin/hcc - + export CXX="/opt/rocm/hcc/bin/hcc" + # TODO: fix librocsparse.so, it contains references to $srcdir cmake -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX="$pkgdir/opt/rocm/hipsparse" \ - -Dhcc_DIR="/opt/rocm/hcc/lib/cmake/hcc" \ - -Dhip_DIR="/opt/rocm/hip/lib/cmake/hip" \ - -Damd_comgr_DIR="/opt/rocm/lib/cmake/amd_comgr" \ - -Drocsparse_DIR="/opt/rocm/rocsparse/lib/cmake/rocsparse" \ + -DCMAKE_INSTALL_PREFIX=opt/rocm/hipsparse \ + -Dhcc_DIR=/opt/rocm/hcc/lib/cmake/hcc \ + -Dhip_DIR=/opt/rocm/hip/lib/cmake/hip \ + -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr \ + -Drocsparse_DIR=/opt/rocm/rocsparse/lib/cmake/rocsparse \ -DBUILD_CLIENTS_SAMPLES=OFF \ -DBUILD_CLIENTS_TESTS=OFF \ - -DHSA_HEADER="/opt/rocm/hsa/include" \ - -G Ninja \ - "$srcdir/hipSPARSE-rocm-$srcver" - ninja + -DHSA_HEADER=/opt/rocm/hsa/include \ + "$srcdir/hipSPARSE-rocm-$_pkgver" + make } package() { - ninja -C "$srcdir/build" install + cd "$srcdir/build" + + make DESTDIR="$pkgdir" install - mkdir -p $pkgdir/etc/ld.so.conf.d - cat <<-EOF > $pkgdir/etc/ld.so.conf.d/hipsparse.conf - /opt/rocm/hipsparse/lib/ - EOF + install -d "$pkgdir/etc/ld.so.conf.d" + cat << EOF > "$pkgdir/etc/ld.so.conf.d/hipsparse.conf" +/opt/rocm/hipsparse/lib +EOF } |