summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorpyamsoft2017-03-29 23:36:09 -0700
committerpyamsoft2017-03-29 23:42:43 -0700
commit1ed57ef8b7c18f48024df9f0088338f867246e57 (patch)
treef9ea5c8582e5a0d42f2a3f5387b1468a9f20b9f8
parent3a58cd318101ca595dc621763e3859c99d8fe1b7 (diff)
downloadaur-1ed57ef8b7c18f48024df9f0088338f867246e57.tar.gz
Patch the PKGBUILD to fix a build error
I did not even know this was an issue until I saw all of the comments. The patch is pulled directly from github.com/ccl2of4, many thanks to them. Fixes an issue with RasterFont which was patched from mainstream.
-rw-r--r--.SRCINFO4
-rw-r--r--0001-Fix-RasterFont.cpp-compile-error.patch126
-rw-r--r--PKGBUILD19
3 files changed, 147 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fc74af65a0ae..a4e93346f2e1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dolphin-emu-faster-melee
pkgdesc = The FasterMelee NetPlay build of the Dolphin Emulator
pkgver = 4.4
- pkgrel = 2
+ pkgrel = 3
url = http://fastermelee.net
install = faster-melee.install
arch = x86_64
@@ -23,12 +23,14 @@ pkgbase = dolphin-emu-faster-melee
provides = dolphin-emu
options = !emptydirs
source = dolphin-emu-faster-melee::git+https://github.com/Tinob/Ishiiruka.git#commit=0b00f1f6267190a8bf9a3584497a35d8762eb0a9
+ source = 0001-Fix-RasterFont.cpp-compile-error.patch
source = GALE01r2.ini
source = GALE01.ini
source = MNCE02.ini
source = NMNB01.ini
source = PALE02.ini
sha256sums = SKIP
+ sha256sums = 7a512b04f1d067e7ba59f4b0c7b3720018eccfd6bb63cd5c47ac84ee82b3ccfa
sha256sums = eae12be9d008453d09bf1379315a2299eca9c76cc093727f8f41926193981c50
sha256sums = a930e0490bfa95f66f96919d320e04f99d6988587209700a536bf7549d53466a
sha256sums = 4dd62a40be7a41c92079c9ee23f5fd458c85f275431881c707450f634fdcf24c
diff --git a/0001-Fix-RasterFont.cpp-compile-error.patch b/0001-Fix-RasterFont.cpp-compile-error.patch
new file mode 100644
index 000000000000..46af040d95ea
--- /dev/null
+++ b/0001-Fix-RasterFont.cpp-compile-error.patch
@@ -0,0 +1,126 @@
+From a6dcab66bc44acd052cd03dae21a18b76a07e104 Mon Sep 17 00:00:00 2001
+From: Connor Lirot <ccl2of4@tx.rr.com>
+Date: Sun, 26 Mar 2017 11:59:04 -0500
+Subject: [PATCH] Fix RasterFont.cpp compile error
+
+---
+ Source/Core/VideoBackends/OGL/RasterFont.cpp | 44 ++++++++++++++--------------
+ 1 file changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/Source/Core/VideoBackends/OGL/RasterFont.cpp b/Source/Core/VideoBackends/OGL/RasterFont.cpp
+index 1f5a51feca..fdba875d13 100644
+--- a/Source/Core/VideoBackends/OGL/RasterFont.cpp
++++ b/Source/Core/VideoBackends/OGL/RasterFont.cpp
+@@ -15,12 +15,12 @@
+ namespace OGL
+ {
+
+-static const int CHAR_WIDTH = 8;
+-static const int CHAR_HEIGHT = 13;
+-static const int CHAR_OFFSET = 32;
+-static const int CHAR_COUNT = 95;
++static const int CHARACTER_WIDTH = 8;
++static const int CHARACTER_HEIGHT = 13;
++static const int CHARACTER_OFFSET = 32;
++static const int CHARACTER_COUNT = 95;
+
+-static const u8 rasters[CHAR_COUNT][CHAR_HEIGHT] = {
++static const u8 rasters[CHARACTER_COUNT][CHARACTER_HEIGHT] = {
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18},
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36},
+@@ -146,27 +146,27 @@ RasterFont::RasterFont()
+ glGenTextures(1, &texture);
+ glActiveTexture(GL_TEXTURE8);
+ glBindTexture(GL_TEXTURE_2D, texture);
+- std::vector<u32> texture_data(CHAR_WIDTH * CHAR_COUNT * CHAR_HEIGHT);
+- for (int y = 0; y < CHAR_HEIGHT; y++)
++ std::vector<u32> texture_data(CHARACTER_WIDTH * CHARACTER_COUNT * CHARACTER_HEIGHT);
++ for (int y = 0; y < CHARACTER_HEIGHT; y++)
+ {
+- for (int c = 0; c < CHAR_COUNT; c++)
++ for (int c = 0; c < CHARACTER_COUNT; c++)
+ {
+- for (int x = 0; x < CHAR_WIDTH; x++)
++ for (int x = 0; x < CHARACTER_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 << (CHARACTER_WIDTH - x - 1))));
++ texture_data[CHARACTER_WIDTH * CHARACTER_COUNT * y + CHARACTER_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, CHARACTER_WIDTH * CHARACTER_COUNT, CHARACTER_HEIGHT, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture_data.data());
+
+ // generate shader
+ ProgramShaderCache::CompileShader(s_shader, s_vertexShaderSrc, s_fragmentShaderSrc);
+ s_shader.Bind();
+
+ // bound uniforms
+- glUniform2f(glGetUniformLocation(s_shader.glprogid, "charSize"), 1.0f / GLfloat(CHAR_COUNT), 1.0f);
++ glUniform2f(glGetUniformLocation(s_shader.glprogid, "charSize"), 1.0f / GLfloat(CHARACTER_COUNT), 1.0f);
+ uniform_color_id = glGetUniformLocation(s_shader.glprogid, "color");
+ glUniform4f(uniform_color_id, 1.0f, 1.0f, 1.0f, 1.0f);
+ uniform_offset_id = glGetUniformLocation(s_shader.glprogid, "offset");
+@@ -196,8 +196,8 @@ void RasterFont::printMultilineText(const std::string& text, double start_x, dou
+ std::vector<GLfloat> vertices(text.length() * 6 * 4);
+
+ int usage = 0;
+- GLfloat delta_x = GLfloat(2 * CHAR_WIDTH) / GLfloat(bbWidth);
+- GLfloat delta_y = GLfloat(2 * CHAR_HEIGHT) / GLfloat(bbHeight);
++ GLfloat delta_x = GLfloat(2 * CHARACTER_WIDTH) / GLfloat(bbWidth);
++ GLfloat delta_y = GLfloat(2 * CHARACTER_HEIGHT) / GLfloat(bbHeight);
+ GLfloat border_x = 2.0f / GLfloat(bbWidth);
+ GLfloat border_y = 4.0f / GLfloat(bbHeight);
+
+@@ -220,37 +220,37 @@ void RasterFont::printMultilineText(const std::string& text, double start_x, dou
+ continue;
+ }
+
+- if (c < CHAR_OFFSET || c >= CHAR_COUNT + CHAR_OFFSET)
++ if (c < CHARACTER_OFFSET || c >= CHARACTER_COUNT + CHARACTER_OFFSET)
+ continue;
+
+ vertices[usage++] = x;
+ vertices[usage++] = y;
+- vertices[usage++] = GLfloat(c - CHAR_OFFSET);
++ vertices[usage++] = GLfloat(c - CHARACTER_OFFSET);
+ vertices[usage++] = 0.0f;
+
+ vertices[usage++] = x + delta_x;
+ vertices[usage++] = y;
+- vertices[usage++] = GLfloat(c - CHAR_OFFSET + 1);
++ vertices[usage++] = GLfloat(c - CHARACTER_OFFSET + 1);
+ vertices[usage++] = 0.0f;
+
+ vertices[usage++] = x + delta_x;
+ vertices[usage++] = y + delta_y;
+- vertices[usage++] = GLfloat(c - CHAR_OFFSET + 1);
++ vertices[usage++] = GLfloat(c - CHARACTER_OFFSET + 1);
+ vertices[usage++] = 1.0f;
+
+ vertices[usage++] = x;
+ vertices[usage++] = y;
+- vertices[usage++] = GLfloat(c - CHAR_OFFSET);
++ vertices[usage++] = GLfloat(c - CHARACTER_OFFSET);
+ vertices[usage++] = 0.0f;
+
+ vertices[usage++] = x + delta_x;
+ vertices[usage++] = y + delta_y;
+- vertices[usage++] = GLfloat(c - CHAR_OFFSET + 1);
++ vertices[usage++] = GLfloat(c - CHARACTER_OFFSET + 1);
+ vertices[usage++] = 1.0f;
+
+ vertices[usage++] = x;
+ vertices[usage++] = y + delta_y;
+- vertices[usage++] = GLfloat(c - CHAR_OFFSET);
++ vertices[usage++] = GLfloat(c - CHARACTER_OFFSET);
+ vertices[usage++] = 1.0f;
+
+ x += delta_x + border_x;
+--
+2.12.1
+
diff --git a/PKGBUILD b/PKGBUILD
index a5a6c76f793d..870f2f6d1f96 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ pkgname=dolphin-emu-faster-melee
# shellcheck disable=SC2034
pkgver=4.4
# shellcheck disable=SC2034
-pkgrel=2
+pkgrel=3
# shellcheck disable=SC2034
pkgdesc='The FasterMelee NetPlay build of the Dolphin Emulator'
# shellcheck disable=SC2034
@@ -33,6 +33,7 @@ options=('!emptydirs')
# The commit for FasterMelee 4.3 (unchanged for FasterMelee 4.4)
# shellcheck disable=SC2034
source=("${pkgname}::git+https://github.com/Tinob/Ishiiruka.git#commit=0b00f1f6267190a8bf9a3584497a35d8762eb0a9"
+ "0001-Fix-RasterFont.cpp-compile-error.patch"
"GALE01r2.ini"
"GALE01.ini"
"MNCE02.ini"
@@ -41,6 +42,7 @@ source=("${pkgname}::git+https://github.com/Tinob/Ishiiruka.git#commit=0b00f1f62
)
# shellcheck disable=SC2034
sha256sums=('SKIP'
+ '7a512b04f1d067e7ba59f4b0c7b3720018eccfd6bb63cd5c47ac84ee82b3ccfa'
'eae12be9d008453d09bf1379315a2299eca9c76cc093727f8f41926193981c50'
'a930e0490bfa95f66f96919d320e04f99d6988587209700a536bf7549d53466a'
'4dd62a40be7a41c92079c9ee23f5fd458c85f275431881c707450f634fdcf24c'
@@ -49,6 +51,21 @@ sha256sums=('SKIP'
# shellcheck disable=SC2034
provides=('dolphin-emu')
+# Pulled directly from github.com/ccl2of4
+# Thank you
+prepare() {
+ # shellcheck disable=SC2154
+ cd "${srcdir}/${pkgname}" || {
+ msg "Failed to cd into ${srcdir}/${pkgname}"
+ return 1
+ }
+
+ patch -p1 < ../0001-Fix-RasterFont.cpp-compile-error.patch || {
+ msg "Failed to apply patch file"
+ return 1
+ }
+}
+
build() {
# shellcheck disable=SC2154
cd "${srcdir}/${pkgname}" || {