blob: bddfca85b241b7e7a115ad7deab5c69582b1820f (
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
|
# $Id$
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Judd Vinet <jvinet@zeroflux.org>
_target=aarch64-linux-gnu
_pkgname=expat
pkgname=${_target}-expat
pkgver=2.2.5
pkgrel=1
pkgdesc='An XML parser library'
arch=('any')
url='https://libexpat.github.io/'
license=(custom)
depends=(${_target}-glibc)
source=(https://github.com/libexpat/libexpat/releases/download/R_${pkgver//./_}/$_pkgname-$pkgver.tar.bz2)
sha256sums=('d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6')
build() {
cd $_pkgname-$pkgver
if [ n != "$RUN_PREPARE" ]; then
if [ 1 = "$ccache" ]; then
export CC=${CC:-ccache ${_target}-gcc}
export CXX=${CXX:-ccache ${_target}-g++}
fi
unset CFLAGS CXXFLAGS
./configure --prefix=/usr/${_target} \
--host=${_target} \
--disable-static
make
fi
}
strip() {
${_target}-strip "$@"
}
objcopy() {
${_target}-objcopy "$@"
}
check() {
local s readelfarch
readelfarch='AArch64'
cd $_pkgname-$pkgver
s=$(find . -type f "(" -name "*.so*" -o -name "*.a" ")" -print0 | \
2>/dev/null LC_ALL=C xargs -0 readelf -h | \
sed -n -e '/File:/h;/Machine:/{/'"$readelfarch"'/!{H;x;p}}' | head -10)
if [ -n "$s" ]; then
>&2 echo "some binaries have wrong architecture:"
>&2 echo "$s"
return 1
fi
}
package() {
cd $_pkgname-$pkgver
make DESTDIR="$pkgdir" install
install -Dm644 "-t$pkgdir/usr/${_target}/share/licenses/$_pkgname" COPYING
# delete all executables
rm -rf "$pkgdir/usr/${_target}/bin"
}
|