void-packages/srcpkgs/SDL2_image/template

51 lines
1.3 KiB
Bash

# Template file for 'SDL2_image'
pkgname=SDL2_image
version=2.0.4
revision=1
build_style=gnu-configure
configure_args="--disable-static --disable-jpg-shared
--disable-png-shared --disable-webp-shared --disable-tif-shared"
hostmakedepends="pkg-config"
makedepends="libpng-devel tiff-devel SDL2-devel libwebp-devel"
short_desc="Load images as SDL surfaces (SDL 2.x)"
maintainer="Juan RP <xtraeme@voidlinux.org>"
license="Zlib"
homepage="http://www.libsdl.org/projects/SDL_image/"
distfiles="http://www.libsdl.org/projects/SDL_image/release/${pkgname}-${version}.tar.gz"
checksum=e74ec49c2402eb242fbfa16f2f43a19582a74c2eabfbfb873f00d4250038ceac
# Package build options
build_options="gles"
case "$XBPS_TARGET_MACHINE" in
arm*)
# Enable OpenGL/ES on rpi platforms
build_options_default="gles"
;;
esac
if [ "$build_option_gles" ]; then
case "$XBPS_TARGET_MACHINE" in
armv[67]*)
# RaspberryPi, use Videocore IV
makedepends+=" rpi-userland-devel"
LDFLAGS="-L${XBPS_CROSS_BASE}/opt/vc/lib -lbcm_host"
;;
esac
fi
post_install() {
vlicense COPYING.txt COPYING
}
SDL2_image-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}