61 lines
2.6 KiB
Bash
61 lines
2.6 KiB
Bash
# Template file for 'gcompat'
|
|
pkgname=gcompat
|
|
version=1.0.0
|
|
revision=1
|
|
build_style=gnu-makefile
|
|
hostmakedepends="pkg-config"
|
|
makedepends="musl-obstack-devel"
|
|
short_desc="Compatibility layer to allow running glibc binaries on musl systems"
|
|
maintainer="Érico Nogueira <ericonr@disroot.org>"
|
|
license="ISC"
|
|
homepage="https://code.foxkit.us/adelie/gcompat"
|
|
changelog="https://code.foxkit.us/adelie/gcompat/-/raw/current/CHANGELOG.rst"
|
|
distfiles="https://distfiles.AdelieLinux.org/source/${pkgname}/${pkgname}-${version}.tar.xz"
|
|
checksum=5bcf8bbe4b417bc66b22a7a3675273aa8834480144338172bbd8e81eaf41a7c4
|
|
|
|
build_options="libucontext"
|
|
desc_option_libucontext="Build with ucontext support via libucontext"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
mips*) ;;
|
|
*) build_options_default+=" libucontext" ;;
|
|
esac
|
|
|
|
# https://sourceware.org/glibc/wiki/ABIList
|
|
# https://wiki.linaro.org/RikuVoipio/LdSoTable
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
aarch64-musl) _glibc="ld-linux-aarch64.so.1" _musl="ld-musl-aarch64.so.1";;
|
|
armv5te-musl) _glibc="ld-linux.so.3" _musl="ld-musl-arm.so.1";;
|
|
armv5tel-musl) _glibc="ld-linux.so.3" _musl="ld-musl-arm.so.1";;
|
|
armv6hf-musl) _glibc="ld-linux-armhf.so.3" _musl="ld-musl-armhf.so.1";;
|
|
armv6l-musl) _glibc="ld-linux-armhf.so.3" _musl="ld-musl-armhf.so.1";;
|
|
armv7hf-musl) _glibc="ld-linux-armhf.so.3" _musl="ld-musl-armhf.so.1";;
|
|
armv7l-musl) _glibc="ld-linux-armhf.so.3" _musl="ld-musl-armhf.so.1";;
|
|
i686-musl) _glibc="ld-linux.so.2" _musl="ld-musl-x86.so.1";;
|
|
mips-musl) _glibc="ld.so.1" _musl="ld-musl-mips-sf.so.1";;
|
|
mipshf-musl) _glibc="ld.so.1" _musl="ld-musl-mips.so.1";;
|
|
mipsel-musl) _glibc="ld.so.1" _musl="ld-musl-mipsel-sf.so.1";;
|
|
mipselhf-musl) _glibc="ld.so.1" _musl="ld-musl-mipsel.so.1";;
|
|
x86_64-musl) _glibc="ld-linux-x86-64.so.2" _musl="ld-musl-x86_64.so.1";;
|
|
ppc64le-musl) _glibc="ld64.so.2" _musl="ld-musl-powerpc64le.so.1";;
|
|
ppc64-musl) _glibc="ld64.so.2" _musl="ld-musl-powerpc64.so.1";;
|
|
ppc-musl) _glibc="ld.so.1" _musl="ld-musl-powerpc.so.1";;
|
|
*-musl) broken="Template does not yet recognize this arch, please fix";;
|
|
*) broken="Only for musl libc";;
|
|
esac
|
|
|
|
make_build_args="LINKER_PATH=/usr/lib/${_musl} LOADER_NAME=${_glibc}
|
|
LIBGCOMPAT_PATH=/usr/lib/libgcompat.so.0 LOADER_PATH=/usr/lib/${LOADER_NAME}
|
|
WITH_OBSTACK=musl-obstack"
|
|
make_install_args="LINKER_PATH=/usr/lib/${_musl} LOADER_NAME=${_glibc}
|
|
LIBGCOMPAT_PATH=/usr/lib/libgcompat.so.0 LOADER_PATH=/usr/lib/${LOADER_NAME}
|
|
WITH_OBSTACK=musl-obstack"
|
|
|
|
if [ "$build_option_libucontext" ]; then
|
|
makedepends+=" libucontext-devel"
|
|
make_build_args+=" WITH_LIBUCONTEXT=1"
|
|
fi
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
}
|