void-packages/srcpkgs/rpi-userland/template
2018-02-22 01:31:57 +01:00

74 lines
1.8 KiB
Bash

# Template file for 'rpi-firmware'
_githash="c9d823d0c3e54d94cd65990350eb1ae3be7e9915"
_gitshort="${_githash:0:7}"
pkgname=rpi-userland
version=20180103
revision=2
wrksrc="userland-${_githash}"
build_style=cmake
configure_args="-DCMAKE_INSTALL_RPATH=/opt/vc/lib"
short_desc="Raspberry Pi GPU userland libraries and utilities (git ${_gitshort})"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="3-clause-BSD"
homepage="https://github.com/raspberrypi/userland"
distfiles="https://github.com/raspberrypi/userland/archive/${_githash}.tar.gz"
checksum=d65d03d1fcb9a05816c5a894f345d3de703a2aa2f6948291f13908512f64754c
LDFLAGS="-Wl,--no-as-needed"
only_for_archs="armv6l armv6l-musl armv7l armv7l-musl"
shlib_provides="
libvcsm.so
libvcos.so
libvchiq_arm.so
libopenmaxil.so
libmmal_vc_client.so
libmmal_util.so
libmmal_core.so
libmmal_components.so
libmmal.so
libdebug_sym.so
libcontainers.so
libbcm_host.so
libWFC.so
libOpenVG.so
libGLESv2.so
libEGL.so"
pre_configure() {
for f in $(find ${wrksrc} -type f -name CMakeLists.txt); do
sed -i 's,-Werror,,g' $f
done
}
post_install() {
vlicense LICENCE
vmkdir usr/lib/pkgconfig
vcopy ${FILESDIR}/*.pc usr/lib/pkgconfig
rm -rf ${DESTDIR}/etc
rm -rf ${DESTDIR}/opt/vc/share
case "$XBPS_TARGET_MACHINE" in
*-musl)
vmkdir etc
echo /lib:/usr/local/lib:/usr/lib:/opt/vc/lib > ${DESTDIR}/etc/ld-musl-armhf.path
;;
*)
vmkdir etc/ld.so.conf.d
echo /opt/vc/lib > ${DESTDIR}/etc/ld.so.conf.d/rpi-userland.conf
;;
esac
}
rpi-userland-devel_package() {
provides="rpi-firmware-pcfiles-1_1"
replaces="rpi-firmware-pcfiles>=0"
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove opt/vc/include
vmove opt/vc/src
vmove opt/vc/lib/*.a
vmove usr/lib/pkgconfig
}
}