2018-04-07 10:43:16 +00:00
|
|
|
# Template file for 'libucontext'
|
|
|
|
pkgname=libucontext
|
|
|
|
version=0.1.1
|
|
|
|
revision=1
|
|
|
|
short_desc="Compatibility layer providing ucontext functions"
|
|
|
|
maintainer="Peter Bui <pbui@github.bx612.space>"
|
|
|
|
license="ISC"
|
|
|
|
homepage="http://github.com/kaniini/libucontext"
|
|
|
|
distfiles="https://distfiles.dereferenced.org/${pkgname}/${pkgname}-${version}.tar.xz"
|
2018-04-07 12:48:27 +00:00
|
|
|
only_for_archs="aarch64-musl armv5tel-musl armv6l-musl armv7l-musl i686-musl mips-musl mipshf-musl mipsel-musl mipselhf-musl x86_64-musl"
|
2018-04-07 10:43:16 +00:00
|
|
|
checksum=0dfe75b3f2d8e0b0b2901f0217bb4ab1baf319a1374a68c5242d776abb797e98
|
|
|
|
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
|
|
arm*) export LIBUCONTEXT_ARCH="arm";;
|
2018-04-07 11:49:32 +00:00
|
|
|
i686*) export LIBUCONTEXT_ARCH="x86";;
|
2018-04-07 10:43:16 +00:00
|
|
|
*) export LIBUCONTEXT_ARCH="${XBPS_TARGET_MACHINE%%-musl}";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
do_build() {
|
2018-04-07 11:49:32 +00:00
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
|
|
i686*) sed -i arch/x86/startcontext.S -e "s;__i686.get_pc_thunk.bx;i686_get_pc_thunk_bx;g" ;;
|
|
|
|
esac
|
2018-04-07 10:43:16 +00:00
|
|
|
make ARCH="${LIBUCONTEXT_ARCH}"
|
|
|
|
}
|
|
|
|
|
|
|
|
do_check() {
|
|
|
|
make ARCH="${LIBUCONTEXT_ARCH}" check
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
make ARCH="${LIBUCONTEXT_ARCH}" DESTDIR="${DESTDIR}/usr" install
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
vlicense LICENSE
|
|
|
|
}
|
|
|
|
|
|
|
|
libucontext-devel_package() {
|
|
|
|
depends="libucontext>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/*.so"
|
|
|
|
}
|
|
|
|
}
|