aboutsummaryrefslogtreecommitdiffstats
path: root/main/libffi
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-02-27 16:54:16 +0200
committerTimo Teräs <timo.teras@iki.fi>2017-02-27 16:55:03 +0200
commitee41daa17eddfe32f34d89fb916380ecc5202eeb (patch)
treebeaa409a9aecb5c8f2838f796de928e7b0d3f2bd /main/libffi
parent7bd8e1e3aa6853d20fca591028aad9134f97e7f2 (diff)
downloadaports-ee41daa17eddfe32f34d89fb916380ecc5202eeb.tar.bz2
aports-ee41daa17eddfe32f34d89fb916380ecc5202eeb.tar.xz
main/libffi: put headers to more standard place
Diffstat (limited to 'main/libffi')
-rw-r--r--main/libffi/APKBUILD29
1 files changed, 13 insertions, 16 deletions
diff --git a/main/libffi/APKBUILD b/main/libffi/APKBUILD
index 6064f7cdfd..0aa006fdf3 100644
--- a/main/libffi/APKBUILD
+++ b/main/libffi/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libffi
pkgver=3.2.1
-pkgrel=2
+pkgrel=3
pkgdesc="A portable, high level programming interface to various calling conventions."
url="http://sourceware.org/libffi"
arch="all"
@@ -14,18 +14,10 @@ source="ftp://sourceware.org/pub/$pkgname/$pkgname-$pkgver.tar.gz
gnu-linux-define.patch
"
-_builddir="$srcdir"/$pkgname-$pkgver
-prepare() {
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+builddir="$srcdir"/$pkgname-$pkgver
build () {
- cd "$_builddir"
+ cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -36,14 +28,19 @@ build () {
}
package() {
- cd "$_builddir"
+ cd "$builddir"
make DESTDIR=""$pkgdir"" install || return 1
install -m755 -d ""$pkgdir"/usr/share/licenses/$pkgname"
install -m644 LICENSE ""$pkgdir"/usr/share/licenses/$pkgname/" || return 1
+ # fix location for headers
+ # see also: https://github.com/libffi/libffi/issues/24
+ mkdir -p "$pkgdir"/usr/include/
+ mv "$pkgdir"/usr/lib/libffi-$pkgver/include/*.h \
+ "$pkgdir"/usr/include/ || return 1
+ rmdir "$pkgdir"/usr/lib/libffi-$pkgver/include || true
+ sed -i -e '/^includedir=/{s,=.*,=/usr/include,g}' \
+ "$pkgdir"/usr/lib/pkgconfig/libffi.pc
}
-md5sums="83b89587607e3eb65c70d361f13bab43 libffi-3.2.1.tar.gz
-b0eb843f9e54403066f476f762149be5 gnu-linux-define.patch"
-sha256sums="d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37 libffi-3.2.1.tar.gz
-28cb523fb8d3ece0c34ad161e3c91c1b025fde0c6b62adf4966047f2abf7d670 gnu-linux-define.patch"
+
sha512sums="980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 libffi-3.2.1.tar.gz
264af568ae5388d50f647f891a406945c73cc358692266f65ad341787c0bf5f6bf31203b86c39fa1b338101c1a6d2f4fec60f95a90d379951ff5153f8f9e178f gnu-linux-define.patch"