games-strategy/uqm: avoid leaving temp files lying around in /tmp (bug #576098);...
authorMichael Sterrett <mr_bones_@gentoo.org>
Thu, 10 Mar 2016 17:19:42 +0000 (12:19 -0500)
committerMichael Sterrett <mr_bones_@gentoo.org>
Thu, 10 Mar 2016 17:20:42 +0000 (12:20 -0500)
Package-Manager: portage-2.2.26

games-strategy/uqm/files/uqm-0.7.0-tempdir.patch [new file with mode: 0644]
games-strategy/uqm/files/uqm-0.7.0-warning.patch [new file with mode: 0644]
games-strategy/uqm/uqm-0.7.0-r3.ebuild

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 (file)
index 0000000..dbb693c
--- /dev/null
@@ -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 (file)
index 0000000..7f05ee5
--- /dev/null
@@ -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;
+ }
index 41d994abfc07c6cfe42c60f38194a6ab7c6280c6..61167b7496eb451e9493a38609987a3d6d78c253 100644 (file)
@@ -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}'