commit: 4a262cede946862078b67fc0595aab5c31437465
Author: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 10 17:19:42 2016 +0000
Commit: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
CommitDate: Thu Mar 10 17:20:42 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a262ced
games-strategy/uqm: avoid leaving temp files lying around in /tmp (bug
#576098); silence compile warning
Package-Manager: portage-2.2.26
games-strategy/uqm/files/uqm-0.7.0-tempdir.patch | 14 ++++++++++++
games-strategy/uqm/files/uqm-0.7.0-warning.patch | 29 ++++++++++++++++++++++++
games-strategy/uqm/uqm-0.7.0-r3.ebuild | 4 ++++
3 files changed, 47 insertions(+)
diff --git a/games-strategy/uqm/files/uqm-0.7.0-tempdir.patch
b/games-strategy/uqm/files/uqm-0.7.0-tempdir.patch
new file mode 100644
index 0000000..dbb693c
--- /dev/null
+++ b/games-strategy/uqm/files/uqm-0.7.0-tempdir.patch
@@ -0,0 +1,14 @@
+# leaves files lying around bug #576098
+
+diff -ru uqm-0.7.0.orig/build/unix/config_functions
uqm-0.7.0/build/unix/config_functions
+--- uqm-0.7.0.orig/build/unix/config_functions 2011-05-20 15:25:22.000000000
-0400
++++ uqm-0.7.0/build/unix/config_functions 2016-03-09 02:46:41.512465876
-0500
+@@ -16,7 +16,7 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ BUILDLOG=/dev/null
+-TEMPFILE="/tmp/build.$$.tmp"
++TEMPFILE="${T:-/tmp}/build.$$.tmp"
+ #KEEPTEMPFILES=keeptempfiles
+
+
diff --git a/games-strategy/uqm/files/uqm-0.7.0-warning.patch
b/games-strategy/uqm/files/uqm-0.7.0-warning.patch
new file mode 100644
index 0000000..7f05ee5
--- /dev/null
+++ b/games-strategy/uqm/files/uqm-0.7.0-warning.patch
@@ -0,0 +1,29 @@
+--- ./src/libs/sound/decoders/aiffaud.c.orig 2011-05-20 15:24:44.000000000
-0400
++++ ./src/libs/sound/decoders/aiffaud.c 2016-03-10 00:53:37.336198208
-0500
+@@ -307,7 +307,7 @@
+ {
+ int bytes;
+
+- memset(fmt, sizeof(*fmt), 0);
++ memset(fmt, 0, sizeof(*fmt));
+ if (size < AIFF_COMM_SIZE)
+ {
+ aifa->last_error = aifae_BadFile;
+@@ -369,7 +369,7 @@
+ aifa->max_pcm = 0;
+ aifa->data_ofs = 0;
+ memset(&aifa->fmtHdr, 0, sizeof(aifa->fmtHdr));
+- memset(aifa->prev_val, sizeof(aifa->prev_val), 0);
++ memset(aifa->prev_val, 0, sizeof(aifa->prev_val));
+
+ // read wave header
+ if (!aifa_readFileHeader (aifa, &fileHdr))
+@@ -635,7 +635,7 @@
+
+ // reset previous values for SDX2 on seek ops
+ // the delta will recover faster with reset
+- memset(aifa->prev_val, sizeof(aifa->prev_val), 0);
++ memset(aifa->prev_val, 0, sizeof(aifa->prev_val));
+
+ return pcm_pos;
+ }
diff --git a/games-strategy/uqm/uqm-0.7.0-r3.ebuild
b/games-strategy/uqm/uqm-0.7.0-r3.ebuild
index 41d994a..61167b7 100644
--- a/games-strategy/uqm/uqm-0.7.0-r3.ebuild
+++ b/games-strategy/uqm/uqm-0.7.0-r3.ebuild
@@ -39,6 +39,10 @@ src_prepare() {
&& myopengl=opengl \
|| myopengl=pure
+ epatch \
+ "${FILESDIR}"/${P}-tempdir.patch \
+ "${FILESDIR}"/${P}-warning.patch
+
cat <<-EOF > config.state
CHOICE_debug_VALUE='nodebug'
CHOICE_graphics_VALUE='${myopengl}'