blob: 129f8fe69ace1eec6cab1dc4d5a037150826ce13 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# shellcheck disable=SC2034,SC2086,SC2128,SC2148,SC2154,SC2164
# Maintainer: Toria <ninetailedtori@uwu.gal>
# Maintainer: Darjan Krijan [https://disc-kuraudo.eu]
pkgname=aocc
_major=5-1
pkgver=5.1.0
pkgrel=1
pkgdesc="AMD Optimizing C/C++ Compiler"
arch=('x86_64')
license=('custom')
DLAGENTS=("https::/usr/bin/curl -A 'Mozilla' -fLC - --retry 3 --retry-delay 3 -o %o %u")
_url="https://download.amd.com/developer/eula/aocc/aocc-${_major}/aocc-compiler-${pkgver}.tar"
url="https://www.amd.com/en/developer/aocc.html"
source=("$_url"
"modulefile")
makedepends=('curl')
options=('staticlibs' '!strip' 'libtool')
optdepends=('env-modules')
install=aocc.install
_sha256sum=$(curl -A 'Mozilla' "$url" | grep --perl-regexp '\w{64}(?=\<\/td\>)' --only-matching | sed -n '1 p')
sha256sums=("${_sha256sum}"
'1740216760f755dc031d54f06c29333bca73f728d89a706f405b41e737bfc56f')
# NB: I should've made my checksum variable lambdas such that they will find all sums,
# even if AMD change their website, but if they remove the </td> tag from the end,
# this may fail. In which case, we can possible YOLO remove the lookahead.
# Default compiler flags
# This by default sets your flags to CFLAGS, but you may replace them.
_default_flags="$CFLAGS"
# path hardcoded in aocc.install. if you change this, change paths there as well
_aocc_prefix=/opt/aocc
package() {
prefix=${pkgdir}${_aocc_prefix}
mkdir -p ${prefix}
cp -rp ${srcdir}/${pkgname}-compiler-${pkgver}/* ${prefix}
ln -s ${_aocc_prefix}/bin/clang ${prefix}/bin/aocc-clang
ln -s ${_aocc_prefix}/bin/clang++ ${prefix}/bin/aocc-clang++
ln -s ${_aocc_prefix}/bin/flang ${prefix}/bin/aocc-flang
# Default flags the compilers should use
# This only works together with calling the "aocc-" prefixed symlinks above
# Verbose output should read "Configuration file: /opt/aocc/bin/aocc.cfg"
echo "${_default_flags}" > ${prefix}/bin/aocc.cfg
# env-modules (optional)
cp ${srcdir}/modulefile ${prefix}
mkdir -p ${pkgdir}/etc/modules/modulefiles
ln -s ${_aocc_prefix}/modulefile ${pkgdir}/etc/modules/modulefiles/${pkgname}
}
|