blob: 93e2783efb225a2894e415183317d82362302296 (
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
|
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Sylvain HENRY <hsyl20@yahoo.fr>
# Contributor: Hervé YVIQUEL <elldekaa@gmail.com>
_android_arch=aarch64
pkgname=android-${_android_arch}-hwloc
pkgver=2.11.2
pkgrel=1
arch=('any')
pkgdesc="Portable Hardware Locality is a portable abstraction of hierarchical architectures (Android ${_android_arch})"
url='https://www.open-mpi.org/projects/hwloc/'
license=('BSD')
groups=('android-hwloc')
depends=("android-${_android_arch}-libtool"
"android-${_android_arch}-libpciaccess")
makedepends=("android-${_android_arch}-cairo"
"android-${_android_arch}-libxml2"
"android-${_android_arch}-pciutils"
"android-${_android_arch}-libx11"
'android-configure')
optdepends=("android-${_android_arch}-cairo"
"android-${_android_arch}-libxml2"
"android-${_android_arch}-pciutils"
"android-${_android_arch}-libx11")
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://www.open-mpi.org/software/hwloc/v${pkgver%.*}/downloads/hwloc-${pkgver}.tar.bz2"
'0001-Added-missing-macros.patch')
md5sums=('4bb1d9bdf550a95fea4f588d8911b8e2'
'540c7ecb4997cfcd37d4d9b450b21dcf')
prepare() {
cd "${srcdir}/hwloc-${pkgver}"
export aclocalVersion=$(aclocal --version | head -n 1 | awk '{print $NF}')
sed -i "s|am__api_version='1.[0-9]*'|am__api_version='${aclocalVersion}'|g" aclocal.m4
sed -i "s|am__api_version='1.[0-9]*'|am__api_version='${aclocalVersion}'|g" configure
# Remove all references to -lpthread
sed -i 's|-lpthread||g' hwloc/Makefile.am
sed -i 's|-lpthread||g' hwloc/Makefile.in
sed -i 's|HWLOC_LIBS_PRIVATE -lpthread|HWLOC_LIBS_PRIVATE|g' configure
sed -i 's|LIBS -lpthread|LIBS|g' configure
sed -i 's|HWLOC_LIBS -lpthread|HWLOC_LIBS|g' configure
sed -i 's|LIBS="-lpthread|LIBS="|g' configure
sed -i 's|-lpthread||g' tests/hwloc/Makefile.am
sed -i 's|-lpthread||g' tests/hwloc/Makefile.in
sed -i 's|HWLOC_LIBS_PRIVATE -lpthread|HWLOC_LIBS_PRIVATE|g' config/hwloc.m4
sed -i 's|LIBS -lpthread|LIBS|g' config/hwloc.m4
sed -i 's|HWLOC_LIBS -lpthread|HWLOC_LIBS|g' config/hwloc.m4
patch -Np1 -i ../0001-Added-missing-macros.patch
}
build() {
cd "${srcdir}/hwloc-${pkgver}"
source android-env ${_android_arch}
android-${_android_arch}-configure \
--enable-plugins
make -C "${PWD}/hwloc" $MAKEFLAGS
make -C "${PWD}/include" $MAKEFLAGS
make hwloc.pc $MAKEFLAGS
}
package() {
cd "${srcdir}/hwloc-${pkgver}"
source android-env ${_android_arch}
make -C "${PWD}/hwloc" DESTDIR="${pkgdir}" install
make -C "${PWD}/include" DESTDIR="${pkgdir}" install
make DESTDIR="${pkgdir}" install-hwlocpkgconfigDATA
${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a
}
|