blob: 7ec8f37ad13b102971fd9410f34fac45bddaad21 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# Maintainer: Darjan Krijan [https://disc-kuraudo.eu]
# Contributor: Jesse R Codling <codling@umich.edu>
# Manual download of 'aocl-linux-aocc-${pkgver}.tar.gz' required from upstream
# Manual download of 'aocl-linux-gcc-${pkgver}.tar.gz' required from upstream
pkgbase=aocl
pkgname=(aocl-aocc aocl-gcc)
pkgver=5.0.0
pkgrel=6
pkgdesc="AMD Optimizing CPU Libraries"
arch=('x86_64')
license=('custom')
url="https://developer.amd.com/amd-aocl/"
source=(
"local://${pkgbase}-linux-aocc-${pkgver}.tar.gz"
"local://${pkgbase}-linux-gcc-${pkgver}.tar.gz"
"${pkgbase}-aocc.install"
"${pkgbase}-gcc.install"
"modulefile"
)
options=('staticlibs' '!strip')
makedepends=('patchelf')
optdepends=('env-modules')
sha256sums=('604ae6c34ef2648504ba08d2f33e42b5a9cf4032eaefaa9253560747ebaeb1ca'
'e7e1e1fec01ad2e184d06d27dbe977883c3d93a3ffda72997fb23335975dd595'
'4f58524e1948b2cb470b856546b87656b2fbce0b98b0d43d345fcedb101f1295'
'fe5245a7b34253a67105ee5e6bb868bbb69ebf318af32dc81e1cdd7d7277b639'
'5fa50773bb1076ee9ac1010844c86d749757a4da0c703d33b163863f75242670')
package_aocl-aocc() {
install=${pkgname}.install
aocl_prefix=/opt/aocl
prefix=${pkgdir}/${aocl_prefix}
mkdir -p ${prefix}
cd ${srcdir}/${pkgbase}-linux-aocc-${pkgver}
#cp AOCL_User_Guide_${pkgver}.pdf ${prefix}
# Option: set '-i ilp64' for ILP64 libraries as default
./install.sh -t ${prefix} -i lp64
# strip unneeded directories
mv ${prefix}/${pkgver}/* ${prefix}
rm -r ${prefix}/${pkgver}
# add missing libFLAME dependency on BLIS and AOCL-Utils
patchelf --add-needed ${aocl_prefix}/aocc/lib_ILP64/libblis-mt.so ${prefix}/aocc/lib_ILP64/libflame.so
patchelf --add-needed ${aocl_prefix}/aocc/lib_ILP64/libaoclutils.so ${prefix}/aocc/lib_ILP64/libflame.so
patchelf --add-needed ${aocl_prefix}/aocc/lib_LP64/libblis-mt.so ${prefix}/aocc/lib_LP64/libflame.so
patchelf --add-needed ${aocl_prefix}/aocc/lib_LP64/libaoclutils.so ${prefix}/aocc/lib_LP64/libflame.so
# fix amd-libs.cfg, pkgconfig, and cmake files containing ${pkgdir}
find ${prefix}/aocc \( -name 'amd-libs.cfg' -o -name '*.pc' -o -name '*.cmake' -o -name '*_module' \) -exec sed -e "s:/.*/opt:/opt:g" -s -i {} \;
# fix provided shell and module files to match ${aocl_prefix}
sed -e "s:aocl/${pkgver}:aocl:g" -s -i ${prefix}/aocc/*_module ${prefix}/aocc/amd-libs.cfg
# env-modules (optional)
cp ${srcdir}/modulefile ${prefix}/aocc
mkdir -p ${pkgdir}/etc/modules/modulefiles
ln -s ${aocl_prefix}/aocc/modulefile ${pkgdir}/etc/modules/modulefiles/${pkgname}
}
package_aocl-gcc() {
install=${pkgname}.install
aocl_prefix=/opt/aocl
prefix=${pkgdir}/${aocl_prefix}
mkdir -p ${prefix}
cd ${srcdir}/${pkgbase}-linux-gcc-${pkgver}
#cp AOCL_User_Guide_${pkgver}.pdf ${prefix}
# Option: set '-i ilp64' for ILP64 libraries as default
./install.sh -t ${prefix} -i lp64
# strip unneeded directories
mv ${prefix}/${pkgver}/* ${prefix}
rm -r ${prefix}/${pkgver}
# add missing libFLAME dependency on BLIS and AOCL-Utils
patchelf --add-needed ${aocl_prefix}/gcc/lib_ILP64/libblis-mt.so ${prefix}/gcc/lib_ILP64/libflame.so
patchelf --add-needed ${aocl_prefix}/gcc/lib_ILP64/libaoclutils.so ${prefix}/gcc/lib_ILP64/libflame.so
patchelf --add-needed ${aocl_prefix}/gcc/lib_LP64/libblis-mt.so ${prefix}/gcc/lib_LP64/libflame.so
patchelf --add-needed ${aocl_prefix}/gcc/lib_LP64/libaoclutils.so ${prefix}/gcc/lib_LP64/libflame.so
# fix amd-libs.cfg, pkconfig, and cmake files containing ${pkgdir} and ${pkgver}
find ${prefix}/gcc \( -name 'amd-libs.cfg' -o -name '*.pc' -o -name '*.cmake' -o -name '*_module' \) -exec sed -e "s:/.*/opt:/opt:g" -s -i {} \;
# fix provided shell and module files to match ${aocl_prefix}
sed -e "s:aocl/${pkgver}:aocl:g" -s -i ${prefix}/gcc/*_module ${prefix}/gcc/amd-libs.cfg
# env-modules (optional)
cp ${srcdir}/modulefile ${prefix}/gcc
sed -e "s/aocc/gcc/g" \
-e "s/conflict aocl-gcc/conflict aocl-aocc/g" \
-i ${prefix}/gcc/modulefile
mkdir -p ${pkgdir}/etc/modules/modulefiles
ln -s ${aocl_prefix}/gcc/modulefile ${pkgdir}/etc/modules/modulefiles/${pkgname}
}
# vim:set ts=4
|