48 lines
1.3 KiB
Bash
48 lines
1.3 KiB
Bash
# Template file for 'libucontext'
|
|
pkgname=libucontext
|
|
version=0.10
|
|
revision=1
|
|
archs="*-musl"
|
|
wrksrc="${pkgname}-${pkgname}-${version}"
|
|
short_desc="Compatibility layer providing ucontext functions"
|
|
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
|
license="ISC"
|
|
homepage="https://github.com/kaniini/libucontext"
|
|
distfiles="https://github.com/kaniini/libucontext/archive/${pkgname}-${version}.tar.gz"
|
|
checksum=e77dee222a31d6ad66c7668ceab197ac683349ab943f66cfe8c324324778ac9f
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
arm*) export LIBUCONTEXT_ARCH="arm";;
|
|
i686*) export LIBUCONTEXT_ARCH="x86";;
|
|
ppc64*) export LIBUCONTEXT_ARCH="ppc64";;
|
|
mips*) export LIBUCONTEXT_ARCH="mips";;
|
|
*) export LIBUCONTEXT_ARCH="${XBPS_TARGET_MACHINE%%-musl}";;
|
|
esac
|
|
|
|
do_build() {
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
i686*) vsed -i arch/x86/startcontext.S -e "s;__i686.get_pc_thunk.bx;i686_get_pc_thunk_bx;g" ;;
|
|
esac
|
|
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"
|
|
vmove "usr/lib/*.a"
|
|
}
|
|
}
|