games/trackballs: Fix build for -current.

Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
B. Watson 2017-06-21 12:08:28 -04:00 committed by Willy Sudiarto Raharjo
parent ea782137f0
commit 6cb552f535
No known key found for this signature in database
GPG key ID: 887B8374D7333381
2 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,22 @@
diff -Naur trackballs-1.1.4/src/glHelp.cc trackballs-1.1.4.patched/src/glHelp.cc
--- trackballs-1.1.4/src/glHelp.cc 2007-04-07 09:15:09.000000000 -0400
+++ trackballs-1.1.4.patched/src/glHelp.cc 2017-06-21 11:58:32.035646783 -0400
@@ -129,7 +129,6 @@
// why is this removed? should it not be done???
glDeleteTextures(1,&texture);
}
-inline Real abs(Real v) {return v>0.0?v:-v;}
double mousePointerPhase=0.0;
void tickMouse(Real td) {
diff -Naur trackballs-1.1.4/src/menuMode.cc trackballs-1.1.4.patched/src/menuMode.cc
--- trackballs-1.1.4/src/menuMode.cc 2007-04-07 09:16:26.000000000 -0400
+++ trackballs-1.1.4.patched/src/menuMode.cc 2017-06-21 11:58:36.201646790 -0400
@@ -163,7 +163,6 @@
case MENU_EDITOR: GameMode::activate(EditMode::editMode); break;
}
}
-inline Real abs(Real v) {return v>0.0?v:-v;}
void MenuMode::idle(Real td) {
int w,h,i,x,y;

View file

@ -6,6 +6,8 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20170621 bkw: fix build on -current
PRGNAM=trackballs
VERSION=${VERSION:-1.1.4}
BUILD=${BUILD:-3}
@ -57,7 +59,8 @@ find -L . \
-exec chmod 644 {} \;
# Apply two patches from redhat: one to fix building and running with guile-2.0.x,
# another to fix "Esc" behaviour
# another to fix "Esc" behaviour. Also abs.diff, which fixes the build for
# gcc 7 from -current.
for i in $CWD/patches/* ; do patch -p1 < $i ; done
# Make icons honor DESTDIR (thanks to Johannes for this fix)