46 lines
1.2 KiB
Bash
46 lines
1.2 KiB
Bash
# Template file for 'libucontext'
|
|
pkgname=libucontext
|
|
version=0.9.0
|
|
revision=1
|
|
archs="*-musl"
|
|
short_desc="Compatibility layer providing ucontext functions"
|
|
maintainer="Peter Bui <pbui@github.bx612.space>"
|
|
license="ISC"
|
|
homepage="https://code.foxkit.us/adelie/libucontext"
|
|
distfiles="https://distfiles.adelielinux.org/source/${pkgname}/${pkgname}-${version}.tar.xz"
|
|
checksum=0d53a415a307ef175153bbe60a572c940a922cb736ce13530b666e7ec2795d68
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
arm*) export LIBUCONTEXT_ARCH="arm";;
|
|
i686*) export LIBUCONTEXT_ARCH="x86";;
|
|
ppc64*) export LIBUCONTEXT_ARCH="ppc64";;
|
|
*) 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"
|
|
}
|
|
}
|