I created the following ebuild for games-emulation/ares : https://github.com/ares-emulator/ares
I'm having an issue with the librashader USE flag I added to enable/disable librashader.
Otherwise, it builds fine. clang is enabled by default as it is recommended by ares project.
The ares doc says :
I don't think I want to do that : "run the script build-librashader.sh" ; what's the correct way to do it ?Librashader Support
If you do not want to include librashader support, you can pass the following option to the make command to skip these requirements using: librashader=false
Librashader requires rust in order to build. You can install it with the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
rustup toolchain install nightly
In order to build librashader, change into the ares/thirdparty/librashader directory and run the script build-librashader.sh Note that once the build completes, it will instruct you to run three copy commands to install the library on your system. These paths may be different depending on Linux distribution.
Thanks.
ares-138.ebuild
Code: Select all
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop toolchain-funcs
ARES_COMMIT="57c01b8e17746151a58af822d1db4aa59f21f673"
DESCRIPTION="ares is a cross-platform, open source, multi-system emulator, focusing on accuracy and preservation."
HOMEPAGE="https://ares-emu.net https://github.com/ares-emulator/ares"
SRC_URI="https://github.com/ares-emulator/ares/archive/${ARES_COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${ARES_COMMIT}"
LICENSE="GPL-3+ ISC"
SLOT="0"
KEYWORDS="~amd64"
IUSE="alsa ao +clang +gtk librashader openal +opengl oss +pulseaudio +sdl udev xv"
RDEPEND="
x11-libs/libX11
x11-libs/libXext
x11-libs/libXrandr
alsa? ( media-libs/alsa-lib )
ao? ( media-libs/libao )
openal? ( media-libs/openal )
opengl? ( media-libs/libglvnd[X] )
pulseaudio? ( media-libs/libpulse )
sdl? ( media-libs/libsdl2[joystick] )
udev? ( virtual/libudev:= )
xv? ( x11-libs/libXv )
librashader? ( games-misc/librashader )
gtk? (
dev-libs/glib:2
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:3[X]
x11-libs/gtksourceview:3.0=
x11-libs/pango
)
!gtk? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
"
DEPEND="
${RDEPEND}
x11-base/xorg-proto"
BDEPEND="
virtual/pkgconfig
!clang? (
>sys-devel/gcc-11.4.0
)
clang? (
sys-devel/lld
sys-devel/clang
)
"
src_prepare() {
default
}
src_compile() {
if use clang ; then
compiler="clang++"
else
compiler="$(tc-getCXX)"
fi
# Librashader requires rust in order to build.
if use librashader ; then
librashader=true
else
librashader=false
fi
local makeopts=(
platform=linux
compiler="${compiler}"
hiro=$(usex gtk gtk3 qt5)
librashader="${librashader}"
)
local drivers=(
video.xshm
input.xlib
$(usev alsa audio.alsa)
$(usev ao audio.ao)
$(usev openal audio.openal)
$(usev opengl "video.glx video.glx2")
$(usev oss audio.oss)
$(usev pulseaudio "audio.pulseaudio audio.pulseaudiosimple")
$(usev sdl input.sdl)
$(usev udev input.udev)
$(usev xv video.xvideo)
)
local coreopts=(
cores="a26 fc sfc n64 sg ms md ps1 pce ng msx cv myvision gb gba ws ngp spec"
ruby="${drivers[*]}"
)
emake "${makeopts[@]}" "${coreopts[@]}" -C desktop-ui
}
src_install() {
dobin desktop-ui/out/ares
domenu desktop-ui/resource/ares.desktop
doicon desktop-ui/resource/ares.png
use opengl && insinto /usr/share/ares/Shaders && doins -r thirdparty/slang-shaders/*
insinto /usr/share/ares/Database && doins -r mia/Database/*
}



