diff --git a/haiku-apps/fontboy/fontboy-0.9.7.recipe b/haiku-apps/fontboy/fontboy-0.9.7.recipe index 38475163d..417d69664 100644 --- a/haiku-apps/fontboy/fontboy-0.9.7.recipe +++ b/haiku-apps/fontboy/fontboy-0.9.7.recipe @@ -5,14 +5,15 @@ get additional information of the selected font and a preview of the complete \ Unicode charset. " HOMEPAGE="https://github.com/HaikuArchives/FontBoy" -SOURCE_URI="https://github.com/HaikuArchives/FontBoy/archive/v0.9.7.tar.gz" +COPYRIGHT="1999-2003 Oliver 'Madison' Kohl" +LICENSE="Artistic" +REVISION="4" +SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz" CHECKSUM_SHA256="984a43f177ceb162ac70b4617c29fb3d7aa00ecd077643bf1dfeb3861aac5500" SOURCE_DIR="FontBoy-0.9.7" -REVISION="3" -LICENSE="Artistic" -COPYRIGHT="1999-2003 Oliver 'Madison' Kohl" +PATCHES="fontboy-$portVersion.patchset" -ARCHITECTURES="x86 x86_gcc2" +ARCHITECTURES="x86_gcc2 x86" PROVIDES=" fontboy = $portVersion @@ -21,6 +22,7 @@ PROVIDES=" REQUIRES=" haiku " + BUILD_PREREQUIRES=" makefile_engine cmd:g++ diff --git a/haiku-apps/fontboy/patches/fontboy-0.9.7.patchset b/haiku-apps/fontboy/patches/fontboy-0.9.7.patchset new file mode 100644 index 000000000..5afa838b6 --- /dev/null +++ b/haiku-apps/fontboy/patches/fontboy-0.9.7.patchset @@ -0,0 +1,222 @@ +From 11beb8d11fd6defc54d13c3485c35178829177e5 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 18 May 2017 22:19:40 +0200 +Subject: gcc5 patch + + +diff --git a/src/CharList.cpp b/src/CharList.cpp +index 30a5f95..b3f2eba 100644 +--- a/src/CharList.cpp ++++ b/src/CharList.cpp +@@ -39,7 +39,7 @@ void CharList::Empty() + while(i >= 0) { + item = RemoveItem(i); + if(item) +- delete item; ++ delete (struct cnode *)item; + i--; + } + } +diff --git a/src/CharView.cpp b/src/CharView.cpp +index af8f336..3698cdf 100644 +--- a/src/CharView.cpp ++++ b/src/CharView.cpp +@@ -1,5 +1,6 @@ + #include "CharView.h" + #include ++#include + + CharView::CharView(BRect frame, font_family fam, font_style sty) + :BView(frame, "CharSetView", B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, B_WILL_DRAW | B_FRAME_EVENTS), +diff --git a/src/FontList.cpp b/src/FontList.cpp +index 9c98289..72edd25 100644 +--- a/src/FontList.cpp ++++ b/src/FontList.cpp +@@ -34,7 +34,7 @@ void FontList::Empty() + while(i >= 0) { + item = RemoveItem(i); + if(item) +- delete item; ++ delete (struct fnode *)item; + i--; + } + } +diff --git a/src/Prefs.cpp b/src/Prefs.cpp +index 25a73ed..fd5bd28 100644 +--- a/src/Prefs.cpp ++++ b/src/Prefs.cpp +@@ -343,7 +343,7 @@ void Prefs::SetDisplayText(const char *text) + active_prefs.displaytext = text; + } + +-rgb_color Prefs::GetMBgColor(bool selected = false) ++rgb_color Prefs::GetMBgColor(bool selected) + { + return selected ? active_prefs.mselectedbg_color : active_prefs.mbg_color; + } +@@ -358,7 +358,7 @@ void Prefs::SetMSelectedBgColor(rgb_color *col) + active_prefs.mselectedbg_color = *col; + } + +-rgb_color Prefs::GetMDisplayColor(bool selected = false) ++rgb_color Prefs::GetMDisplayColor(bool selected) + { + return selected ? active_prefs.mselecteddisplay_color : active_prefs.mdisplay_color; + } +@@ -373,7 +373,7 @@ void Prefs::SetMSelectedDisplayColor(rgb_color *col) + active_prefs.mselecteddisplay_color = *col; + } + +-rgb_color Prefs::GetMInfoColor(bool selected = false) ++rgb_color Prefs::GetMInfoColor(bool selected) + { + return selected ? active_prefs.mselectedinfo_color : active_prefs.minfo_color; + } +@@ -398,7 +398,7 @@ void Prefs::SetMStrokeColor(rgb_color *col) + active_prefs.mstroke_color = *col; + } + +-rgb_color Prefs::GetMHeightsColor(bool selected = false) ++rgb_color Prefs::GetMHeightsColor(bool selected) + { + return selected ? active_prefs.mselectedheights_color : active_prefs.mheights_color; + } +@@ -413,7 +413,7 @@ void Prefs::SetMSelectedHeightsColor(rgb_color *col) + active_prefs.mselectedheights_color = *col; + } + +-rgb_color Prefs::GetPBgColor(bool selected = false) ++rgb_color Prefs::GetPBgColor(bool selected) + { + return selected ? active_prefs.pselectedbg_color : active_prefs.pbg_color; + } +@@ -448,7 +448,7 @@ void Prefs::SetPSelectedBgColor(rgb_color *col) + active_prefs.pselectedbg_color = *col; + } + +-rgb_color Prefs::GetPDisplayColor(bool selected = false) ++rgb_color Prefs::GetPDisplayColor(bool selected) + { + return selected ? active_prefs.pselecteddisplay_color : active_prefs.pdisplay_color; + } +diff --git a/src/PrefsWindow.cpp b/src/PrefsWindow.cpp +index 402314f..b956a23 100644 +--- a/src/PrefsWindow.cpp ++++ b/src/PrefsWindow.cpp +@@ -103,9 +103,9 @@ PrefsWindow::PrefsWindow(BRect rect) + ********************************/ + + BView* displayView = new BView("Display", 0); +- BRect rect(0,0,0,0); ++ BRect zeroRect(0,0,0,0); + +- slider = new StatusSlider(rect, "FontSize", "Font size:", new BMessage(M_FONTSIZE), 6, 360, B_TRIANGLE_THUMB); ++ slider = new StatusSlider(zeroRect, "FontSize", "Font size:", new BMessage(M_FONTSIZE), 6, 360, B_TRIANGLE_THUMB); + slider->UseFillColor(true, &sfillcolor); + slider->SetUpdateText("%upt"); + slider->SetHashMarks(B_HASH_MARKS_BOTH); +@@ -127,12 +127,12 @@ PrefsWindow::PrefsWindow(BRect rect) + + numcols->AddItem(item = new BMenuItem(atext, new BMessage(M_NUMCOLS))); + } +- aafield = new BMenuField(rect, "", "Columns:", numcols); ++ aafield = new BMenuField(zeroRect, "", "Columns:", numcols); + aafield->SetFont(&font); + aafield->SetDivider(font.StringWidth("Example text:") + 12.0); + aafield->SetToolTip("Change number of columns"); + +- text = new BTextControl(rect, "", NULL, "Example text", new BMessage(M_VIEWTEXTINV)); ++ text = new BTextControl(zeroRect, "", NULL, "Example text", new BMessage(M_VIEWTEXTINV)); + text->SetModificationMessage(new BMessage(M_VIEWTEXTMOD)); + text->SetDivider(font.StringWidth("Example text:") + 12.0); + text->SetLabel("Example text:"); +@@ -142,10 +142,10 @@ PrefsWindow::PrefsWindow(BRect rect) + text->TextView()->SetMaxBytes(128); + + +- drawborder = new BCheckBox(rect, "", "Draw borders", new BMessage(M_DRAWBORDER)); ++ drawborder = new BCheckBox(zeroRect, "", "Draw borders", new BMessage(M_DRAWBORDER)); + drawborder->SetToolTip("Draw borders for each font"); + +- drawheights = new BCheckBox(rect, "", "Draw heights", new BMessage(M_DRAWHEIGHTS)); ++ drawheights = new BCheckBox(zeroRect, "", "Draw heights", new BMessage(M_DRAWHEIGHTS)); + drawheights->SetToolTip("Show lines for font heights"); + + displayView->SetLayout(new BGroupLayout(B_VERTICAL)); +@@ -166,11 +166,11 @@ PrefsWindow::PrefsWindow(BRect rect) + + GetPreferences(); + +- fRevertButton = new BButton(rect, "", "Revert", new BMessage(M_REVERT)); ++ fRevertButton = new BButton(zeroRect, "", "Revert", new BMessage(M_REVERT)); + fRevertButton->SetToolTip("Revert to last saved settings"); + fRevertButton->SetEnabled(false); + +- fDefaultsButton = new BButton(rect, "", "Defaults", new BMessage(M_DEFAULT)); ++ fDefaultsButton = new BButton(zeroRect, "", "Defaults", new BMessage(M_DEFAULT)); + fDefaultsButton->SetToolTip("Restore defaults settings"); + fDefaultsButton->SetEnabled(!prefs->IsDefault()); + +diff --git a/src/PropWindow.cpp b/src/PropWindow.cpp +index c52083b..9922933 100644 +--- a/src/PropWindow.cpp ++++ b/src/PropWindow.cpp +@@ -121,8 +121,8 @@ bool PropWindow::IsSplitpaneLocked() + + void PropWindow::GetFamilyAndStyle(font_family *fam, font_style *st) + { +- *fam = family; +- *st = style; ++ strcpy(*fam, this->family); ++ strcpy(*st, this->style); + } + + void PropWindow::SetFamilyAndStyle(const font_family family, const font_style style) +@@ -364,12 +364,12 @@ void SplitView::UpdatePos(float width, float height, int i) + UpdateLimits(width, height); + } + +-void SplitView::UpdateLimits(float movement = 0) ++void SplitView::UpdateLimits(float movement) + { + UpdateLimits(Bounds().Width(), Bounds().Height(), movement); + } + +-void SplitView::UpdateLimits(float width, float height, float movement = 0) ++void SplitView::UpdateLimits(float width, float height, float movement) + { + // prevents <--> control to be moved out of bounds + int fontinfo_height = int(LeftView::FONTINFO_PADDING + (LeftView::FONTINFO_LINE_HEIGHT*4)); +diff --git a/src/toolclasses/MultiBoxView/MultiBoxView.cpp b/src/toolclasses/MultiBoxView/MultiBoxView.cpp +index 6d9e155..ae3d025 100644 +--- a/src/toolclasses/MultiBoxView/MultiBoxView.cpp ++++ b/src/toolclasses/MultiBoxView/MultiBoxView.cpp +@@ -2,7 +2,7 @@ + + #include "MultiBoxView.h" + +-MultiBoxView::MultiBoxView(BRect frame, float ncols = 3, float rheight = 30) ++MultiBoxView::MultiBoxView(BRect frame, float ncols, float rheight) + :BView(frame, "MultiBoxView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW | B_FRAME_EVENTS) + { + numcols = ncols; +diff --git a/src/toolclasses/StatusSlider/StatusSlider.cpp b/src/toolclasses/StatusSlider/StatusSlider.cpp +index 3eed9e2..483f2bf 100644 +--- a/src/toolclasses/StatusSlider/StatusSlider.cpp ++++ b/src/toolclasses/StatusSlider/StatusSlider.cpp +@@ -7,9 +7,9 @@ StatusSlider::StatusSlider(BRect frame, + BMessage *msg, + int32 minValue, + int32 maxValue, +- thumb_style thumbType = B_BLOCK_THUMB, +- uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, +- uint32 flags = B_FRAME_EVENTS | B_WILL_DRAW | B_NAVIGABLE) ++ thumb_style thumbType, ++ uint32 resizingMode, ++ uint32 flags) + :BSlider(frame, name, label, msg, minValue, maxValue, thumbType, resizingMode, flags) + { + tmpUpdTxt = new char[32]; +-- +2.12.2 +