-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PLOCALE_BACKUP="en"
WX_GTK_VER="3.0"
-inherit cmake-utils eutils l10n pax-utils toolchain-funcs versionator wxwidgets
+inherit cmake-utils desktop l10n pax-utils toolchain-funcs versionator wxwidgets
SRC_URI="https://github.com/${PN}-emu/${PN}/archive/${PV}.zip -> ${P}.zip"
KEYWORDS="amd64"
LICENSE="GPL-2"
SLOT="0"
-IUSE="alsa ao bluetooth doc egl +evdev ffmpeg llvm log lto openal +pch portaudio profile pulseaudio qt5 sdl upnp +wxwidgets"
+IUSE="alsa ao bluetooth doc egl +evdev ffmpeg libav llvm log lto openal +pch portaudio profile pulseaudio qt5 sdl upnp +wxwidgets"
-RDEPEND=">=media-libs/libsfml-2.1
+RDEPEND="
+ >=media-libs/libsfml-2.1
>net-libs/enet-1.3.7
>=net-libs/mbedtls-2.1.1
dev-libs/lzo
- media-libs/libpng:=
- sys-libs/glibc
- sys-libs/readline:=
+ media-libs/libpng:0=
+ sys-libs/readline:0=
sys-libs/zlib
x11-libs/libXext
x11-libs/libXi
bluetooth? ( net-wireless/bluez )
egl? ( media-libs/mesa[egl] )
evdev? (
- dev-libs/libevdev
- virtual/udev
+ dev-libs/libevdev
+ virtual/udev
+ )
+ ffmpeg? (
+ libav? ( media-video/libav:= )
+ !libav? ( media-video/ffmpeg:= )
)
- ffmpeg? ( virtual/ffmpeg )
llvm? ( sys-devel/llvm )
openal? (
- media-libs/openal
- media-libs/libsoundtouch
+ media-libs/openal
+ media-libs/libsoundtouch
)
portaudio? ( media-libs/portaudio )
profile? ( dev-util/oprofile )
sdl? ( media-libs/libsdl2[haptic,joystick] )
upnp? ( >=net-libs/miniupnpc-1.7 )
wxwidgets? (
- dev-libs/glib:2
- x11-libs/gtk+:2
- x11-libs/wxGTK:${WX_GTK_VER}[opengl,X]
- )
- "
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ x11-libs/wxGTK:${WX_GTK_VER}[opengl,X]
+ )"
DEPEND="${RDEPEND}
- >=dev-util/cmake-2.8.8
- >=sys-devel/gcc-4.9.0
app-arch/zip
media-libs/freetype
sys-devel/gettext
- virtual/pkgconfig
- "
-
-pkg_pretend() {
-
- local ver=4.9.0
- local msg="${PN} needs at least GCC ${ver} set to compile."
-
- if [[ ${MERGE_TYPE} != binary ]]; then
- if ! version_is_at_least ${ver} $(gcc-fullversion); then
- eerror ${msg}
- die ${msg}
- fi
- fi
+ virtual/pkgconfig"
-}
+PATCHES=( "${FILESDIR}"/${P}-CHAR_WIDTH-collision.patch )
src_prepare() {
+ cmake-utils_src_prepare
# Remove automatic dependencies to prevent building without flags enabled.
if use !alsa; then
}
src_configure() {
-
if use wxwidgets; then
need-wxwidgets unicode
fi
local mycmakeargs=(
- "-DUSE_SHARED_ENET=ON"
+ -DUSE_SHARED_ENET=ON
$( cmake-utils_use ffmpeg ENCODE_FRAMEDUMPS )
$( cmake-utils_use log FASTLOG )
$( cmake-utils_use profile OPROFILING )
cmake-utils_src_configure
}
-src_compile() {
-
- cmake-utils_src_compile
-}
src_install() {
-
cmake-utils_src_install
dodoc Readme.md
--- /dev/null
+Avoid clash with TS 18661-1:2014 macros
+https://bugs.gentoo.org/637986
+
+--- a/Source/Core/VideoBackends/OGL/RasterFont.cpp
++++ b/Source/Core/VideoBackends/OGL/RasterFont.cpp
+@@ -15,7 +15,7 @@
+ namespace OGL
+ {
+
+-static const int CHAR_WIDTH = 8;
++static const int DOLPHIN_CHAR_WIDTH = 8;
+ static const int CHAR_HEIGHT = 13;
+ static const int CHAR_OFFSET = 32;
+ static const int CHAR_COUNT = 95;
+@@ -146,20 +146,20 @@
+ glGenTextures(1, &texture);
+ glActiveTexture(GL_TEXTURE8);
+ glBindTexture(GL_TEXTURE_2D, texture);
+- std::vector<u32> texture_data(CHAR_WIDTH * CHAR_COUNT * CHAR_HEIGHT);
++ std::vector<u32> texture_data(DOLPHIN_CHAR_WIDTH * CHAR_COUNT * CHAR_HEIGHT);
+ for (int y = 0; y < CHAR_HEIGHT; y++)
+ {
+ for (int c = 0; c < CHAR_COUNT; c++)
+ {
+- for (int x = 0; x < CHAR_WIDTH; x++)
++ for (int x = 0; x < DOLPHIN_CHAR_WIDTH; x++)
+ {
+- bool pixel = (0 != (rasters[c][y] & (1 << (CHAR_WIDTH - x - 1))));
+- texture_data[CHAR_WIDTH * CHAR_COUNT * y + CHAR_WIDTH * c + x] = pixel ? -1 : 0;
++ bool pixel = (0 != (rasters[c][y] & (1 << (DOLPHIN_CHAR_WIDTH - x - 1))));
++ texture_data[DOLPHIN_CHAR_WIDTH * CHAR_COUNT * y + DOLPHIN_CHAR_WIDTH * c + x] = pixel ? -1 : 0;
+ }
+ }
+ }
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
+- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, CHAR_WIDTH * CHAR_COUNT, CHAR_HEIGHT, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture_data.data());
++ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, DOLPHIN_CHAR_WIDTH * CHAR_COUNT, CHAR_HEIGHT, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture_data.data());
+
+ // generate shader
+ ProgramShaderCache::CompileShader(s_shader, s_vertexShaderSrc, s_fragmentShaderSrc);
+@@ -196,7 +196,7 @@
+ std::vector<GLfloat> vertices(text.length() * 6 * 4);
+
+ int usage = 0;
+- GLfloat delta_x = GLfloat(2 * CHAR_WIDTH) / GLfloat(bbWidth);
++ GLfloat delta_x = GLfloat(2 * DOLPHIN_CHAR_WIDTH) / GLfloat(bbWidth);
+ GLfloat delta_y = GLfloat(2 * CHAR_HEIGHT) / GLfloat(bbHeight);
+ GLfloat border_x = 2.0f / GLfloat(bbWidth);
+ GLfloat border_y = 4.0f / GLfloat(bbHeight);