49 lines
1.3 KiB
Bash
49 lines
1.3 KiB
Bash
# Template file for 'libucontext'
|
|
pkgname=libucontext
|
|
version=0.11
|
|
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=ec122a4bca8f75922082c4f4d81b09ff3e950906d7f5504e0bce367ec9a6fceb
|
|
|
|
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"
|
|
}
|
|
}
|