SHA256
1
0
forked from pool/zmusic
zmusic/dumb-dumb.patch

70 lines
3.1 KiB
Diff
Raw Normal View History

The code has a wrong #include directive that quickly breaks when not all -I flags
appear as compiler arguments.
The command line if you build with internal GME and whatnot:
/usr/bin/c++ -DHAVE_FLUIDSYNTH -DHAVE_MPG123 -DHAVE_SNDFILE -DHAVE_SYSTEM_MIDI
-Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Dzmusic_EXPORTS
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/../include
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/zmusic
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/dumb/include
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/game-music-emu/gme/..
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/adlmidi
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/oplsynth
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/opnmidi
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/timidity
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/timidityplus
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/wildmidi
-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables
-fstack-clash-protection -DNDEBUG -O2 -g -DNDEBUG -fPIC -ffp-contract=off -MD
-MT source/CMakeFiles/zmusic.dir/streamsources/music_dumb.cpp.o -MF
CMakeFiles/zmusic.dir/streamsources/music_dumb.cpp.o.d -o
CMakeFiles/zmusic.dir/streamsources/music_dumb.cpp.o -c
/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/streamsources/music_dumb.cpp
The command line actually is:
/usr/bin/c++ -DHAVE_FLUIDSYNTH -DHAVE_MPG123 -DHAVE_SNDFILE -DHAVE_SYSTEM_MIDI
-DZMUSIC_LITE=1 -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp
-Dzmusiclite_EXPORTS
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/../include
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/zmusic
-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/dumb/include
-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables
-fstack-clash-protection -g -DNDEBUG -O2 -g -DNDEBUG -fPIC -ffp-contract=off
-o CMakeFiles/zmusiclite.dir/streamsources/music_dumb.cpp.o -c
/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/streamsources/music_dumb.cpp
/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/streamsources/music_dumb.cpp:46:10: fatal error: ../dumb/include/dumb.h: No such file or directory
#include "../dumb/include/dumb.h"
^~~~~~~~~~~~~~~~~~~~~~~~
---
source/streamsources/music_dumb.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: source/streamsources/music_dumb.cpp
===================================================================
--- source/streamsources/music_dumb.cpp.orig
+++ source/streamsources/music_dumb.cpp
@@ -43,8 +43,8 @@
#undef CDECL // w32api's windef.h defines this
-#include "../dumb/include/dumb.h"
-#include "../dumb/include/internal/it.h"
+#include "../thirdparty/dumb/include/dumb.h"
+#include "../thirdparty/dumb/include/internal/it.h"
#include "zmusic/m_swap.h"
#include "zmusic/mididefs.h"
#include "zmusic/midiconfig.h"