mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-games/ode: Fix building with GCC-7
Bug: https://bugs.gentoo.org/646538 Package-Manager: Portage-2.3.16, Repoman-2.3.6 Closes: https://bugs.gentoo.org/646538 Closes: https://github.com/gentoo/gentoo/pull/7605
This commit is contained in:
committed by
Pacho Ramos
parent
1ffb323968
commit
7e72f270aa
52
dev-games/ode/files/ode-0.14-gcc7.patch
Normal file
52
dev-games/ode/files/ode-0.14-gcc7.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
Bug: https://bugs.gentoo.org/646538
|
||||
Upstream commit: https://bitbucket.org/odedevs/ode/commits/6f44023660dc830147a56314ea0627a23f11ad86
|
||||
|
||||
# HG changeset patch
|
||||
# User oleh_derevenko <>
|
||||
# Date 1521993135 -10800
|
||||
# Node ID 6f44023660dc830147a56314ea0627a23f11ad86
|
||||
# Parent 6a68227619feebf85513331d7320b5a89eadf44f
|
||||
Fixed: Command line parameter validation errors have been fixed in some demos (reported by Peter Levine)
|
||||
|
||||
diff --git a/ode/demo/demo_jointPR.cpp b/ode/demo/demo_jointPR.cpp
|
||||
--- a/ode/demo/demo_jointPR.cpp
|
||||
+++ b/ode/demo/demo_jointPR.cpp
|
||||
@@ -328,8 +328,8 @@
|
||||
if (0 == strcmp("-t", argv[i]) || 0 == strcmp("--texture-path", argv[i]))
|
||||
{
|
||||
int j = i+1;
|
||||
- if ( j+1 > argc || // Check if we have enough arguments
|
||||
- argv[j] == '\0' || // We should have a path here
|
||||
+ if ( j >= argc || // Check if we have enough arguments
|
||||
+ argv[j][0] == '\0' || // We should have a path here
|
||||
argv[j][0] == '-' ) // We should have a path not a command line
|
||||
Help(argv);
|
||||
else
|
||||
diff --git a/ode/demo/demo_jointPU.cpp b/ode/demo/demo_jointPU.cpp
|
||||
--- a/ode/demo/demo_jointPU.cpp
|
||||
+++ b/ode/demo/demo_jointPU.cpp
|
||||
@@ -575,8 +575,8 @@
|
||||
|
||||
if (0 == strcmp ("-t", argv[i]) || 0 == strcmp ("--texture-path", argv[i]) ) {
|
||||
int j = i+1;
|
||||
- if ( j+1 > argc || // Check if we have enough arguments
|
||||
- argv[j] == '\0' || // We should have a path here
|
||||
+ if ( j >= argc || // Check if we have enough arguments
|
||||
+ argv[j][0] == '\0' || // We should have a path here
|
||||
argv[j][0] == '-' ) // We should have a path not a command line
|
||||
Help (argv);
|
||||
else
|
||||
diff --git a/ode/demo/demo_piston.cpp b/ode/demo/demo_piston.cpp
|
||||
--- a/ode/demo/demo_piston.cpp
|
||||
+++ b/ode/demo/demo_piston.cpp
|
||||
@@ -658,8 +658,8 @@
|
||||
if ( 0 == strcmp ("-t", argv[i]) || 0 == strcmp ("--texture-path", argv[i]) )
|
||||
{
|
||||
int j = i+1;
|
||||
- if ( j+1 > argc || // Check if we have enough arguments
|
||||
- argv[j] == '\0' || // We should have a path here
|
||||
+ if ( j >= argc || // Check if we have enough arguments
|
||||
+ argv[j][0] == '\0' || // We should have a path here
|
||||
argv[j][0] == '-' ) // We should have a path not a command line
|
||||
Help (argv);
|
||||
else
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
@@ -22,6 +22,8 @@ DEPEND="${RDEPEND}
|
||||
MY_EXAMPLES_DIR=/usr/share/doc/${PF}/examples
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-0.14-gcc7.patch
|
||||
|
||||
sed -i \
|
||||
-e "s:\$.*/drawstuff/textures:${MY_EXAMPLES_DIR}:" \
|
||||
drawstuff/src/Makefile.am \
|
||||
|
||||
Reference in New Issue
Block a user