From 92f9dccdf383c4f522b2dec3ada26885213e57c8 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 28 Jan 2017 15:19:17 +0100 Subject: [PATCH] sawteeth: fix x86_64 build. --- .../sawteeth/patches/sawteeth-1.3.patchset | 52 +++++++++++++++++++ haiku-apps/sawteeth/sawteeth-1.3.recipe | 5 +- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 haiku-apps/sawteeth/patches/sawteeth-1.3.patchset diff --git a/haiku-apps/sawteeth/patches/sawteeth-1.3.patchset b/haiku-apps/sawteeth/patches/sawteeth-1.3.patchset new file mode 100644 index 000000000..cf511d091 --- /dev/null +++ b/haiku-apps/sawteeth/patches/sawteeth-1.3.patchset @@ -0,0 +1,52 @@ +From 6f52bc369f939bfb161e44dd9b18f8b90e73442c Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 28 Jan 2017 15:12:06 +0100 +Subject: x86_64 build fix + + +diff --git a/Source/stApp.cpp b/Source/stApp.cpp +index 7c18c64..dc92513 100644 +--- a/Source/stApp.cpp ++++ b/Source/stApp.cpp +@@ -7,7 +7,7 @@ Distributed under the terms of the MIT Licence. */ + + #include + +-char defsong [] = { ++uchar defsong [] = { + #include "Source/data/defaultsong.h" + }; + +@@ -39,7 +39,7 @@ void stApp::AboutRequested() + void stApp::ReadyToRun() + { + if ( dropped ) return; +- txt t(defsong,(int)sizeof(defsong)); ++ txt t((char*)defsong,(int)sizeof(defsong)); + stMainWindow *win=new stMainWindow(BRect(10,29,450,150),t); + win->Show(); + win->Activate(); +@@ -53,7 +53,7 @@ void stApp::MessageReceived(BMessage *message) + break; + case ST_NEW_SONG: + { +- txt t(defsong,(int)sizeof(defsong)); ++ txt t((char*)defsong,(int)sizeof(defsong)); + stMainWindow *win = new stMainWindow(BRect(10,29,450,150),t); + win->Show(); + win->Activate(); +diff --git a/lib/source/song.cpp b/lib/source/song.cpp +index bc8247f..5d1e853 100644 +--- a/lib/source/song.cpp ++++ b/lib/source/song.cpp +@@ -4,6 +4,7 @@ Distributed under the terms of the MIT Licence. */ + #include + #include + #include ++#define __STDC_FORMAT_MACROS + #include // for PRIu32 + + #include "stSong.h" +-- +2.10.2 + diff --git a/haiku-apps/sawteeth/sawteeth-1.3.recipe b/haiku-apps/sawteeth/sawteeth-1.3.recipe index d9b540e94..4212453c2 100644 --- a/haiku-apps/sawteeth/sawteeth-1.3.recipe +++ b/haiku-apps/sawteeth/sawteeth-1.3.recipe @@ -5,12 +5,13 @@ chip-tunes. It uses no samples but only generated waveforms." HOMEPAGE="https://github.com/pulkomandy/Sawteeth/" COPYRIGHT="2001 Jonas Norberg" LICENSE="MIT" -REVISION="4" +REVISION="5" SOURCE_URI="https://github.com/pulkomandy/Sawteeth/archive/f6fa08f34d.tar.gz" CHECKSUM_SHA256="a28373671c2d7214ad88dbc77d9bb58b9ae27d1b26e5f1049857eadcd0bd03e2" SOURCE_DIR="Sawteeth-f6fa08f34d7e6b8f04df7280bf6f4d4fc761fa04" +PATCHES="sawteeth-$portVersion.patchset" -ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" +ARCHITECTURES="x86_gcc2 ?x86 x86_64" PROVIDES=" sawteeth = $portVersion