1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00

Fix build with clang 6.0.0.

PR:		226179
This commit is contained in:
Emanuel Haupt 2018-02-28 19:54:29 +00:00
parent dc15d9f81f
commit de570f94ca
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=463260
3 changed files with 33 additions and 8 deletions

View File

@ -4,6 +4,7 @@
PORTNAME= milkytracker
PORTVERSION= 1.02.00
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= audio
MAINTAINER= ehaupt@FreeBSD.org
@ -28,13 +29,6 @@ OPTIONS_DEFINE= DOCS
BROKEN_powerpc= Does not build on powerpc
BROKEN_powerpc64= Does not build on powerpc64
.include <bsd.port.pre.mk>
# does not compile with clang 6.0.0
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200056
USE_GCC= yes
.endif
post-install:
.for f in ${ICONS}
${INSTALL_DATA} ${WRKSRC}/resources/pictures/${f} \
@ -46,4 +40,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/docs/${f} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -0,0 +1,11 @@
--- src/tracker/EQConstants.cpp.orig 2018-02-24 17:43:23 UTC
+++ src/tracker/EQConstants.cpp
@@ -23,7 +23,7 @@
#include "EQConstants.h"
#include "math.h"
-#define p(e) ldexp(0x10558, e-4*4)
+#define p(e) ldexp(66904.0f, e-4*4)
const float EQConstants::EQ3bands[3] =
{

View File

@ -0,0 +1,20 @@
--- src/tracker/sdl/SDL_Main.cpp.orig 2018-02-24 17:43:23 UTC
+++ src/tracker/sdl/SDL_Main.cpp
@@ -609,7 +609,7 @@ void translateKeyDownEvent(const SDL_Eve
printf ("DEBUG: Key pressed: VK: %d, SC: %d, Scancode: %d\n", toVK(keysym), toSC(keysym), keysym.sym);
#endif
- pp_uint16 chr[3] = {toVK(keysym), toSC(keysym), keysym.sym};
+ pp_uint16 chr[3] = {toVK(keysym), toSC(keysym), static_cast<pp_uint16> (keysym.sym)};
PPEvent myEvent(eKeyDown, &chr, sizeof(chr));
RaiseEventSerialized(&myEvent);
@@ -621,7 +621,7 @@ void translateKeyUpEvent(const SDL_Event
preTranslateKey(keysym);
- pp_uint16 chr[3] = {toVK(keysym), toSC(keysym), keysym.sym};
+ pp_uint16 chr[3] = {toVK(keysym), toSC(keysym), static_cast<pp_uint16> (keysym.sym)};
PPEvent myEvent(eKeyUp, &chr, sizeof(chr));
RaiseEventSerialized(&myEvent);