finance: fix build on x86_64.

* use a safe source.
This commit is contained in:
Jerome Duval
2017-01-31 21:46:32 +01:00
parent b8b515f485
commit 10efd663a1
2 changed files with 501 additions and 5 deletions

View File

@@ -7,15 +7,19 @@ spending categorization and net worth trends, all with customizable categories \
and payees.
"
HOMEPAGE="https://github.com/HaikuArchives/Finance"
SOURCE_URI="git://github.com/HaikuArchives/Finance.git#33513a1c44b6f94a46ccae563f19a64440dea46a"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="
2001 Bunru Software
2009 Pier Luigi Fiorini
"
LICENSE="GNU GPL v2"
REVISION="2"
srcGitRev="33513a1c44b6f94a46ccae563f19a64440dea46a"
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="c93934ec9a37724f49dafa58dbd3aa6df53ca8a06d2444dbbd83aa0e18ce22c4"
SOURCE_DIR="Finance-$srcGitRev"
PATCHES="finance-$portVersion.patchset"
ARCHITECTURES="x86_gcc2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PROVIDES="
finance = $portVersion
@@ -41,7 +45,7 @@ USER_SETTINGS_FILES="
BUILD()
{
runConfigure ./configure
jam
jam -q $jobArgs
}
INSTALL()

View File

@@ -0,0 +1,492 @@
From 27b4cd65bb6e0f273a8a46dfdbf5bf5e0e64c9a1 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 31 Jan 2017 21:40:20 +0100
Subject: fix build on x86_64.
diff --git a/build/jam/MainBuildRules b/build/jam/MainBuildRules
index 292a2a5..09daace 100644
--- a/build/jam/MainBuildRules
+++ b/build/jam/MainBuildRules
@@ -217,7 +217,7 @@ rule ResComp
# considered linker scripts, and thus we can use preprocessor features.
actions ResComp1
{
- cat "$(2[2-])" | $(CC) -E $(CCDEFS) $(HDRS) - | egrep -v '^#' | $(2[1]) $(RCHDRS) --auto-names -o "$(1)" -
+ cat "$(2[2-])" | $(CC) -E $(CCDEFS) $(HDRS) - | egrep -va '^#' | $(2[1]) $(RCHDRS) --auto-names -o "$(1)" -
}
actions XRes1
diff --git a/code/Acc.cpp b/code/Acc.cpp
index d3c6c8b..f1adbe4 100644
--- a/code/Acc.cpp
+++ b/code/Acc.cpp
@@ -60,7 +60,7 @@ Acc::~Acc()
}
}
-void Acc::CalcBal(Tra* startTra = 0)
+void Acc::CalcBal(Tra* startTra)
{
trs::iterator titer;
int32 balance;
@@ -88,7 +88,7 @@ void Acc::CalcBal(Tra* startTra = 0)
}
}
-void Acc::CalcReconBal(Tra* startTra = 0)
+void Acc::CalcReconBal(Tra* startTra)
{
trs::iterator titer;
int32 balance;
@@ -117,7 +117,7 @@ void Acc::CalcReconBal(Tra* startTra = 0)
}
}
-void Acc::GrayEveryOther(Tra* startTra = 0)
+void Acc::GrayEveryOther(Tra* startTra)
{
#ifdef DEBUG
printf("GrayEveryOther - %p\n", startTra);
@@ -190,4 +190,4 @@ void Acc::Serialize(BFile* file)
for (trs::iterator iter = traS.begin();
iter != traS.end(); iter++)
(*iter)->Serialize(file);
-}
\ No newline at end of file
+}
diff --git a/code/AccListItem.cpp b/code/AccListItem.cpp
index 50fba1b..f2b9b25 100644
--- a/code/AccListItem.cpp
+++ b/code/AccListItem.cpp
@@ -19,7 +19,7 @@ void AccListItem::Disable()
disabled = true;
}
-void AccListItem::DrawItem(BView *owner, BRect frame, bool complete = false)
+void AccListItem::DrawItem(BView *owner, BRect frame, bool complete)
{
if (disabled)
return;
diff --git a/code/Cat.cpp b/code/Cat.cpp
index be863fc..0f93bd6 100644
--- a/code/Cat.cpp
+++ b/code/Cat.cpp
@@ -2,7 +2,7 @@
#include <File.h>
#include "Cat.h"
-Cat::Cat(string leafname, Cat* par = 0)
+Cat::Cat(string leafname, Cat* par)
{
#ifdef DEBUG
printf("Cat::Cat - %p\n", this);
@@ -16,7 +16,7 @@ Cat::Cat(string leafname, Cat* par = 0)
par->AddChild(this);
}
-Cat::Cat(BFile* file, cas* catS, Cat* par = 0)
+Cat::Cat(BFile* file, cas* catS, Cat* par)
{
this->par = par;
size_t st;
@@ -106,4 +106,4 @@ void Cat::Serialize(BFile* file)
void Cat::SetParent(Cat* parent)
{
par = parent;
-}
\ No newline at end of file
+}
diff --git a/code/CatListItem.cpp b/code/CatListItem.cpp
index 8ed1072..49365e6 100644
--- a/code/CatListItem.cpp
+++ b/code/CatListItem.cpp
@@ -3,7 +3,7 @@
#include "Cat.h"
#include "CatListItem.h"
-CatListItem::CatListItem(Cat* cat, uint8 lvl = 0) : BStringItem(cat->LeafName().c_str(), lvl)
+CatListItem::CatListItem(Cat* cat, uint8 lvl) : BStringItem(cat->LeafName().c_str(), lvl)
{
this->cat = cat;
-}
\ No newline at end of file
+}
diff --git a/code/CatSelectionWindow.cpp b/code/CatSelectionWindow.cpp
index baed2f6..3bb42c3 100644
--- a/code/CatSelectionWindow.cpp
+++ b/code/CatSelectionWindow.cpp
@@ -24,7 +24,7 @@ CatSelectionWindow::CatSelectionWindow(const char* title,
}
}
-BMenuItem* CatSelectionWindow::MakeCatMenu(Cat* cat, bool enabled = true)
+BMenuItem* CatSelectionWindow::MakeCatMenu(Cat* cat, bool enabled)
{
BMenuItem* mi;
BMessage* msgs = new BMessage(CatSelectionWindowPopCatMSG);
@@ -65,4 +65,4 @@ void CatSelectionWindow::MessageReceived(BMessage* message)
StringInputWindow::MessageReceived(message);
break;
}
-}
\ No newline at end of file
+}
diff --git a/code/CheckView_A-L.cpp b/code/CheckView_A-L.cpp
index c3e6ac1..62bfb6b 100644
--- a/code/CheckView_A-L.cpp
+++ b/code/CheckView_A-L.cpp
@@ -126,7 +126,7 @@ CheckView::~CheckView()
}
void CheckView::AddMenuItemToPopUp(uint32 command, BPopUpMenu* pu,
- string textstr, bool enabled = true)
+ string textstr, bool enabled)
{
BMessage* msg = new BMessage(command);
msg->AddString("text", textstr.c_str());
@@ -242,7 +242,7 @@ SplCat* CheckView::GetSplCat()
return theSplCat;
}
-Tra* CheckView::GetTra(Cat* cat, Pye* pye, bool alert = true)
+Tra* CheckView::GetTra(Cat* cat, Pye* pye, bool alert)
{
#if DEBUG
printf("CheckView::GetTra\n");
@@ -271,4 +271,4 @@ Tra* CheckView::GetTra(Cat* cat, Pye* pye, bool alert = true)
bool CheckView::IsTransfer()
{
return tsf;
-}
\ No newline at end of file
+}
diff --git a/code/CheckView_M-R.cpp b/code/CheckView_M-R.cpp
index a6e3df4..215a5e7 100644
--- a/code/CheckView_M-R.cpp
+++ b/code/CheckView_M-R.cpp
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <string.h>
#include <Button.h>
#include <MenuField.h>
@@ -13,7 +14,7 @@
#include "SplCat.h"
#include "Tra.h"
-BMenuItem* CheckView::MakeCatMenu(Cat* cat, bool enabled = true)
+BMenuItem* CheckView::MakeCatMenu(Cat* cat, bool enabled)
{
BMenuItem* mi;
BMessage* msgs = new BMessage(CheckPopCatMSG);
@@ -399,4 +400,4 @@ void CheckView::RedoPamPopUp()
{
AddMenuItemToPopUp(CheckPopPaymentMSG, pamPop, prefs->currencyToString(*pi));
}
-}
\ No newline at end of file
+}
diff --git a/code/CheckView_S-Z.cpp b/code/CheckView_S-Z.cpp
index b0f8438..6b87eff 100644
--- a/code/CheckView_S-Z.cpp
+++ b/code/CheckView_S-Z.cpp
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <string.h>
#include <Button.h>
#include <TextControl.h>
#include "Acc.h"
diff --git a/code/ColorMaker.cpp b/code/ColorMaker.cpp
index a6cedec..318dca3 100644
--- a/code/ColorMaker.cpp
+++ b/code/ColorMaker.cpp
@@ -1,6 +1,8 @@
#include <stdexcept>
#include "ColorMaker.h"
+using namespace std;
+
ColorMaker::ColorMaker()
{
/* cblue = ColorFromNumbers(0, 0, 255);
@@ -94,4 +96,4 @@ rgb_color ColorMaker::ColorNumber(uint8 i)
throw new exception;
}
return rc;
-}
\ No newline at end of file
+}
diff --git a/code/ListChooseWindow.h b/code/ListChooseWindow.h
index 5efbb08..373fdd0 100644
--- a/code/ListChooseWindow.h
+++ b/code/ListChooseWindow.h
@@ -5,6 +5,8 @@
#define ListChooseOKMSG 1301
#define ListChooseCancelMSG 1302
+using namespace std;
+
class ListChooseWindow : public BWindow
{
sem_id clickWait;
@@ -15,4 +17,4 @@ public:
string str);
string GetStr();
void MessageReceived(BMessage* msg);
-};
\ No newline at end of file
+};
diff --git a/code/MainView.cpp b/code/MainView.cpp
index 588e23c..5e95eba 100644
--- a/code/MainView.cpp
+++ b/code/MainView.cpp
@@ -1,5 +1,6 @@
#include <stdexcept>
#include <stdio.h>
+#include <string.h>
#include <Alert.h>
#include <Button.h>
#include <Directory.h>
@@ -232,7 +233,7 @@ void MainView::FrameResized(float w, float h)
}
}
-Tra* MainView::GetNewTra(Acc* acc, bool alert = true)
+Tra* MainView::GetNewTra(Acc* acc, bool alert)
{
#if DEBUG
printf("MainView::GetNewTra\n");
diff --git a/code/MainView.h b/code/MainView.h
index 3b0b0fe..37b8c26 100644
--- a/code/MainView.h
+++ b/code/MainView.h
@@ -5,6 +5,8 @@
#include <map>
#include <View.h>
+using namespace std;
+
class AccListView;
class Proxy;
class Acc;
diff --git a/code/NameSorted.h b/code/NameSorted.h
index 1dee847..a6393ab 100644
--- a/code/NameSorted.h
+++ b/code/NameSorted.h
@@ -3,6 +3,8 @@
#include <string>
+using namespace std;
+
class NameSorted
{
public:
@@ -10,4 +12,4 @@ public:
int operator()(const NameSorted* n1, const NameSorted* n2) const;
};
-#endif
\ No newline at end of file
+#endif
diff --git a/code/Prefs.cpp b/code/Prefs.cpp
index f178c34..e085a22 100644
--- a/code/Prefs.cpp
+++ b/code/Prefs.cpp
@@ -1,6 +1,7 @@
#include <math.h>
#include <stdexcept>
#include <stdio.h>
+#include <stdlib.h>
#include "Prefs.h"
#include "Version.h"
@@ -192,4 +193,4 @@ time_t Prefs::stringToDate(string datetext)
throw invalid_argument(error.c_str());
}
return datetime;
-}
\ No newline at end of file
+}
diff --git a/code/Prefs.h b/code/Prefs.h
index d1d4b5c..f15a8bc 100644
--- a/code/Prefs.h
+++ b/code/Prefs.h
@@ -5,6 +5,8 @@
#include <string>
#include <time.h>
+using namespace std;
+
class Prefs
{
public:
@@ -27,4 +29,4 @@ public:
time_t stringToDate(string date);
};
-#endif
\ No newline at end of file
+#endif
diff --git a/code/PrefsWindow.cpp b/code/PrefsWindow.cpp
index 2570f98..ef89074 100644
--- a/code/PrefsWindow.cpp
+++ b/code/PrefsWindow.cpp
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
#include <Alert.h>
#include <Button.h>
#include <PopUpMenu.h>
@@ -183,4 +184,4 @@ void PrefsWindow::MessageReceived(BMessage* msg)
default:
BWindow::MessageReceived(msg);
}
-}
\ No newline at end of file
+}
diff --git a/code/Proxy.cpp b/code/Proxy.cpp
index 7b52396..18a52b5 100644
--- a/code/Proxy.cpp
+++ b/code/Proxy.cpp
@@ -1,6 +1,7 @@
#include <algorithm>
#include <stdexcept>
#include <stdio.h>
+#include <string.h>
#include <Path.h>
#include "Acc.h"
#include "Cat.h"
@@ -19,7 +20,7 @@ void Proxy::AccUpdated(Acc* acc)
mv->AccUpdated(acc);
}
-Cat* Proxy::AddCat(string name, bool update = true)
+Cat* Proxy::AddCat(string name, bool update)
{
Cat* cat = tm->AddCat(name);
if (update)
@@ -27,7 +28,7 @@ Cat* Proxy::AddCat(string name, bool update = true)
return cat;
}
-void Proxy::AddPye(Pye* pye, bool update = true)
+void Proxy::AddPye(Pye* pye, bool update)
{
tm->AddPye(pye);
if (update)
diff --git a/code/Proxy.h b/code/Proxy.h
index 5037063..7cd7488 100644
--- a/code/Proxy.h
+++ b/code/Proxy.h
@@ -1,7 +1,7 @@
#ifndef ProxyH
#define ProxyH
-#include <fstream.h>
+#include <fstream>
#include <list>
#include <map>
#include <set>
diff --git a/code/RegisterItem.cpp b/code/RegisterItem.cpp
index 1e6c75f..d303c0a 100644
--- a/code/RegisterItem.cpp
+++ b/code/RegisterItem.cpp
@@ -1,5 +1,6 @@
#include <ctime>
#include <stdio.h>
+#include <string.h>
#include <Region.h>
#include <View.h>
#include "Acc.h"
@@ -37,7 +38,7 @@ void RegisterItem::Disable()
}
void RegisterItem::DrawItem(BView *owner, BRect frame,
- bool complete = false)
+ bool complete)
{
if (disabled)
return;
diff --git a/code/StringInputWindow.cpp b/code/StringInputWindow.cpp
index 0204fc9..1c75340 100644
--- a/code/StringInputWindow.cpp
+++ b/code/StringInputWindow.cpp
@@ -4,8 +4,8 @@
#include "SyncUtil.h"
StringInputWindow::StringInputWindow(const char* title, BMessage*
- returnMessage, BHandler* returnHandler, string text = "",
- bool modal = false) : BWindow(BRect(200, 200, 500, 300), title,
+ returnMessage, BHandler* returnHandler, string text,
+ bool modal) : BWindow(BRect(200, 200, 500, 300), title,
B_FLOATING_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
B_ASYNCHRONOUS_CONTROLS | B_NOT_RESIZABLE)
{
@@ -59,4 +59,4 @@ void StringInputWindow::MessageReceived(BMessage* message)
default:
BWindow::MessageReceived(message);
}
-}
\ No newline at end of file
+}
diff --git a/code/StringInputWindow.h b/code/StringInputWindow.h
index cbdbf12..bd6c2fb 100644
--- a/code/StringInputWindow.h
+++ b/code/StringInputWindow.h
@@ -3,6 +3,8 @@
#define OKButtonMSG 601
+using namespace std;
+
class BTextControl;
class StringInputWindow : public BWindow
diff --git a/code/Tra.cpp b/code/Tra.cpp
index ccd84a5..1349682 100644
--- a/code/Tra.cpp
+++ b/code/Tra.cpp
@@ -1,5 +1,6 @@
#include <stdexcept>
#include <stdio.h>
+#include <stdlib.h>
#include <File.h>
#include "Cat.h"
@@ -277,4 +278,4 @@ void Tra::Serialize(BFile* file)
file->Write(mem.c_str(), st);
file->Write(&gry, sizeof(bool));
file->Write(&rec, sizeof(uint8));
-}
\ No newline at end of file
+}
diff --git a/code/Tra.h b/code/Tra.h
index 5b56708..3cbc693 100644
--- a/code/Tra.h
+++ b/code/Tra.h
@@ -12,6 +12,8 @@ class Acc;
class BFile;
+using namespace std;
+
class Tra
{
public:
diff --git a/code/TraMan.h b/code/TraMan.h
index c731908..8b18a11 100644
--- a/code/TraMan.h
+++ b/code/TraMan.h
@@ -3,7 +3,6 @@
#include <list>
#include <map>
-#include <pair.h>
#include <set>
#include <string>
--
2.10.2