summarylogtreecommitdiffstats
path: root/PKGBUILD.eac.append
blob: 1efb455224c70955a8ca4d3dcb8a94007fb9f8f0 (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
# enable DT_HASH
export LDFLAGS+=" -Wl,--hash-style=both"

# disable check
unset checkdepends
unset -f check

# disable debug
options=('!debug')

# modify package
_suffix="-eac"
pkgbase="glibc${_suffix:-}"

for i in "${pkgname[@]}"; do
  _old_pkgname+=("$i")
done

unset pkgname

for i in "${_old_pkgname[@]}"; do
  if grep -q 'locale' <<< "${i:?}"; then
    unset -f "package_${i}"
    continue
  fi

  j=$(sed -E "s&glibc&glibc${_suffix:-}&" <<< "${i:?}")
  pkgname+=("${j:?}")

  eval "package_${j} () {
    $(declare -f package_${i} | sed -E 's& \(32-bit\)&&')
    package_${i}

    pkgdesc+=' with DT_HASH enabled'

    [ '${i%%-*}' == 'lib32' ] && pkgdesc+=' (32-bit)'

    provides=(${i}=${pkgver})
    conflicts=(${i})

    rm -f \"\$pkgdir/etc/locale.gen\"
  }"

  unset -f "package_${i}"
done

_bump_pkgrel() {
  local _pkgver_old="${1%-*}"
  local _pkgrel_old="${1##*-}"
  local _bump="${2}"

  if [[ "$pkgver" == "$_pkgver_old" ]] && [[ "$pkgrel" == "$_pkgrel_old" ]]; then
    pkgrel+=".$_bump"
  fi
}

_bump_pkgrel 2.40+r16+gaa533d58ff-2 1