114 lines
3.8 KiB
Bash
114 lines
3.8 KiB
Bash
# Template file for 'retroarch'
|
|
pkgname=retroarch
|
|
version=1.9.14
|
|
revision=1
|
|
wrksrc="RetroArch-$version"
|
|
build_style=configure
|
|
configure_args="--prefix=/usr --sysconfdir=/etc --enable-networking
|
|
--enable-udev --disable-builtinflac --disable-builtinglslang
|
|
--disable-builtinmbedtls --disable-builtinminiupnpc --disable-builtinzlib
|
|
$(vopt_enable ffmpeg) $(vopt_enable flac) $(vopt_enable glslang) $(vopt_enable jack)
|
|
$(vopt_enable miniupnpc) $(vopt_enable pulseaudio pulse) $(vopt_enable qt5 qt)
|
|
$(vopt_enable sdl2) $(vopt_enable vulkan) $(vopt_enable wayland) $(vopt_enable x11)"
|
|
conf_files="/etc/retroarch.cfg"
|
|
hostmakedepends="pkg-config"
|
|
makedepends="alsa-lib-devel eudev-libudev-devel freetype-devel libusb-devel libxkbcommon-devel
|
|
mbedtls-devel zlib-devel $(vopt_if ffmpeg ffmpeg-devel) $(vopt_if flac libflac-devel)
|
|
$(vopt_if glslang 'glslang-devel SPIRV-Tools-devel') $(vopt_if jack jack-devel)
|
|
$(vopt_if miniupnpc miniupnpc-devel) $(vopt_if pulseaudio pulseaudio-devel)
|
|
$(vopt_if qt5 qt5-devel) $(vopt_if sdl2 SDL2-devel) $(vopt_if vulkan vulkan-loader)
|
|
$(vopt_if x11 'libXext-devel libXinerama-devel libXv-devel libXxf86vm-devel')"
|
|
depends="$(vopt_if vulkan vulkan-loader) $(vopt_if x11 xdg-utils)"
|
|
short_desc="Official reference frontend for the libretro API"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://www.retroarch.com/"
|
|
changelog="https://raw.githubusercontent.com/libretro/RetroArch/master/CHANGES.md"
|
|
distfiles="https://github.com/libretro/RetroArch/archive/v$version.tar.gz"
|
|
checksum=874f3e3aca1d12d2cb9d34687eb052eec0ccfc0f335606f61fa6a03c8b6bb90a
|
|
|
|
build_options="ffmpeg flac glcore gles2 glslang jack miniupnpc neon pulseaudio qt5 sdl2 vulkan wayland x11"
|
|
build_options_default="ffmpeg flac glcore glslang miniupnpc pulseaudio sdl2 vulkan wayland x11"
|
|
|
|
desc_option_glcore="Enable support for OpenGL 3.2 core+ and OpenGL ES 3+"
|
|
desc_option_glslang="Enable support for GLSL shaders"
|
|
desc_option_miniupnpc="Enable support for NAT traversal"
|
|
desc_option_neon="Enable support for ARM Neon SIMD extension"
|
|
|
|
vopt_conflict glcore gles2 # gles2 disables glcore support
|
|
|
|
if [ "$build_option_gles2" ]; then
|
|
configure_args+=" --enable-opengles --enable-opengles3"
|
|
else
|
|
configure_args+=" --disable-opengles --disable-opengles3"
|
|
fi
|
|
|
|
if [ "$build_option_glcore" ]; then
|
|
if [ -z "$build_option_glslang" ]; then
|
|
msg_error "$pkgname: 'glcore' option requires 'glslang'.\n"
|
|
fi
|
|
configure_args+=" --enable-opengl_core"
|
|
else
|
|
configure_args+=" --disable-opengl_core"
|
|
fi
|
|
|
|
if [ "$build_option_gles2" -o "$build_option_glcore" ]; then
|
|
configure_args+=" --enable-egl --enable-kms"
|
|
makedepends+=" MesaLib-devel"
|
|
fi
|
|
|
|
if [ "$build_option_qt5" ]; then
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" qt5-host-tools"
|
|
fi
|
|
fi
|
|
|
|
if [ "$build_option_vulkan" ]; then
|
|
if [ -z "$build_option_glslang" ]; then
|
|
msg_error "$pkgname: 'vulkan' option requires 'glslang'.\n"
|
|
fi
|
|
fi
|
|
|
|
if [ "$build_option_wayland" ]; then
|
|
if [ -z "$build_option_gles2" -a -z "$build_option_glcore" ]; then
|
|
msg_error "$pkgname: 'wayland' option requires 'gles2' or 'glcore'.\n"
|
|
fi
|
|
makedepends+=" wayland-devel wayland-protocols"
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" wayland-devel wayland-protocols"
|
|
fi
|
|
fi
|
|
|
|
if [ "$build_option_x11" ]; then
|
|
if [ -z "$build_option_gles2" -a -z "$build_option_glcore" ]; then
|
|
msg_error "$pkgname: 'x11' option requires 'gles2' or 'glcore'.\n"
|
|
fi
|
|
fi
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*|x86_64*)
|
|
configure_args+=" --enable-sse --enable-threads"
|
|
;;
|
|
ppc*)
|
|
configure_args+=" --enable-threads"
|
|
;;
|
|
aarch64*)
|
|
configure_args+=" --enable-threads"
|
|
;;
|
|
armv7*)
|
|
build_options_default+=" neon"
|
|
|
|
configure_args+=" --enable-threads $(vopt_enable neon)"
|
|
|
|
if [ "$build_option_neon" ]; then
|
|
CFLAGS+=" -mfpu=neon"
|
|
fi
|
|
;;
|
|
arm*)
|
|
configure_args+=" --disable-neon"
|
|
;;
|
|
esac
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
configure_args+=" --host=${XBPS_CROSS_TRIPLET}"
|
|
fi
|