diff options
author | Darjan Krijan | 2021-03-15 23:46:36 +0100 |
---|---|---|
committer | Darjan Krijan | 2021-03-15 23:46:36 +0100 |
commit | 7689e6c567072a57ad7c9d1db634fb11fda45954 (patch) | |
tree | 92b79494ba90246dd536e425f579ae021679692a /PKGBUILD | |
parent | 314ca14cd8be7f4419f044cd46ef0d0ad6647d51 (diff) | |
download | aur-7689e6c567072a57ad7c9d1db634fb11fda45954.tar.gz |
aocc 3.0.0, made env-modules optional.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 25 |
1 files changed, 9 insertions, 16 deletions
@@ -2,17 +2,17 @@ # Manual download of '${pkgname}-compiler-${pkgver}.tar' required from upstream pkgname=aocc -pkgver=2.3.0 -pkgrel=2 +pkgver=3.0.0 +pkgrel=1 pkgdesc="AMD Optimizing C/C++ Compiler" arch=('x86_64') license=('custom') url="https://developer.amd.com/amd-aocc/" source=("local://aocc-compiler-${pkgver}.tar" "local://modulefile") options=('staticlibs' '!strip' 'libtool') -depends=('env-modules') +optdepends=('env-modules') install=aocc.install -md5sums=("acb9a992c9bd6315612c5a9313ecc2fb" "SKIP") +md5sums=("e670c7f8abe5a96b7b1d770f5a8e160a" "SKIP") # default flags for compiler # edit this or /etc/makepkg.conf to your liking for default flags for your architecutre @@ -21,19 +21,10 @@ _default_flags="${CFLAGS}" _aocc_prefix=/opt/aocc -if [ -z ${MODULESHOME} ]; then - echo "Environment variable MODULESHOME from env-modules is unset." - echo "Restart your shell or source the env-modules scripts for your shell." - exit 1 -fi - package() { prefix=${pkgdir}${_aocc_prefix} mkdir -p ${prefix} - # Cleanup - rm ${srcdir}/${pkgname}-compiler-${pkgver}/install.sh - cp -r ${srcdir}/${pkgname}-compiler-${pkgver}/* ${prefix} ln -s ${_aocc_prefix}/bin/clang ${prefix}/bin/aocc-clang @@ -45,8 +36,10 @@ package() { # Verbose output should read "Configuration file: /opt/aocc/bin/aocc.cfg" echo "${_default_flags}" > ${prefix}/bin/aocc.cfg - # modulefile + # env-modules (optional) cp ${srcdir}/modulefile ${prefix} - mkdir -p ${pkgdir}${MODULESHOME}/modulefiles/ - ln -s ${_aocc_prefix}/modulefile ${pkgdir}${MODULESHOME}/modulefiles/${pkgname} + if [ -n ${MODULESHOME} ]; then + mkdir -p ${pkgdir}${MODULESHOME}/modulefiles/ + ln -s ${_aocc_prefix}/modulefile ${pkgdir}${MODULESHOME}/modulefiles/${pkgname} + fi } |