48 lines
1.8 KiB
Bash
48 lines
1.8 KiB
Bash
# Template file for 'retroarch'
|
|
pkgname=retroarch
|
|
version=1.3.4
|
|
revision=1
|
|
wrksrc="RetroArch-$version"
|
|
conf_files="/etc/retroarch.cfg"
|
|
build_style=configure
|
|
build_options="ffmpeg opengl jack pulseaudio sdl2 x11"
|
|
configure_args="--prefix=/usr --global-config-dir=/etc --enable-udev
|
|
--enable-networking --enable-netplay
|
|
$(vopt_enable ffmpeg) $(vopt_enable jack) $(vopt_enable pulseaudio pulse)
|
|
$(vopt_enable sdl2) $(vopt_enable x11)"
|
|
hostmakedepends="pkg-config python unzip"
|
|
makedepends="zlib-devel libxml2-devel freetype-devel libxkbcommon-devel
|
|
alsa-lib-devel eudev-libudev-devel $(vopt_if opengl MesaLib-devel)
|
|
$(vopt_if pulseaudio pulseaudio-devel) $(vopt_if jack jack-devel)
|
|
$(vopt_if ffmpeg ffmpeg-devel) $(vopt_if sdl2 SDL2-devel)
|
|
$(vopt_if x11 'libXext-devel libXinerama-devel libXv-devel libXxf86vm-devel')"
|
|
short_desc="Official reference frontend for the libretro API"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
license="GPL-3"
|
|
homepage="http://www.libretro.com/"
|
|
distfiles="https://github.com/libretro/RetroArch/archive/v$version.tar.gz"
|
|
checksum=a5733a0f4ad828afd00fa2a059deb6538939d46a2aefc4a566c30300a40efb1c
|
|
|
|
build_options_default="ffmpeg"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*|x86_64*) build_options_default+=" opengl pulseaudio sdl2 x11";;
|
|
armv[67]*) makedepends+=" rpi-userland-devel";;
|
|
esac
|
|
|
|
do_configure() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
mkdir -p /opt/vc/lib
|
|
configure_args+=" --host=${XBPS_CROSS_TRIPLET}"
|
|
fi
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*|x86_64*) configure_args+=" --enable-sse --enable-threads";;
|
|
armv6*) configure_args+=" --enable-gles"
|
|
LDFLAGS+=" -L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib";;
|
|
armv7*) configure_args+=" --enable-neon --enable-gles --enable-threads"
|
|
LDFLAGS+=" -L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib";;
|
|
esac
|
|
./configure ${configure_args}
|
|
}
|