summaryrefslogtreecommitdiff
path: root/extra/openal/PKGBUILD
blob: 4318ba27a641405a84351f0d51bb8d2cd820a380 (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
# disable Intel micro-optimizations and intrinsics per platform
# patch done by KitsuWhooa, thanks (see https://github.com/kcat/openal-soft/pull/559)
source+=('openal-i686.patch')
sha512sums+=(
	'41e4134fea907d2f9b95eb496fde5eb7ce4bd8bfa1ad97c8d1a88b4454846195a1725c5bab047981e795d25eb29959e07fa349b212c24bbc86c06a597ac43e78'
)

if [ "$CARCH" = 'pentium4' ]; then
  eval "$(
    declare -f build | \
      sed '/cmake .*openal-soft/ s/;$/ -DALSOFT_CPUEXT_SSE4_1=0 -DALSOFT_CPUEXT_SSE3=0;/'
  )"
fi

if [ "$CARCH" = 'i686' ]; then
  eval "$(
    declare -f prepare | \
      sed '/cd openal-soft/ a patch -p1 -i \"$srcdir/openal-i686.patch\"'
    declare -f build | \
      sed '/cmake .*openal-soft/ s/;$/ -DALSOFT_CPUEXT_SSE4_1=0 -DALSOFT_CPUEXT_SSE3=0 -DALSOFT_CPUEXT_SSE2=0;/'
  )"
fi

if [ "$CARCH" = 'i486' ]; then
  eval "$(
    declare -f build | \
      sed '/cmake .*openal-soft/ s/;$/ -DALSOFT_CPUEXT_SSE4_1=0 -DALSOFT_CPUEXT_SSE3=0 -DALSOFT_CPUEXT_SSE2=0 -DALSOFT_CPUEXT_SSE=0;/'
  )"
fi