1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

finance/xtrader: Remove expired port

finance/xtrader
This commit is contained in:
Muhammad Moinur Rahman 2024-02-29 12:51:54 +01:00
parent 8063b7792a
commit b9730c529d
No known key found for this signature in database
GPG Key ID: BDB9B5A617C0BC91
14 changed files with 1 additions and 415 deletions

1
MOVED
View File

@ -3008,3 +3008,4 @@ dns/dns_balance||2024-02-29|Has expired: Abandonware, last release in 2005. Cons
dns/dnscheckengine||2024-02-29|Has expired: Deprecated upstream in favour of Zonemaster Project
dns/sheerdns||2024-02-29|Has expired: Abandonware, upstream dead and last update over 10 years ago
finance/cointop||2024-02-29|Has expired: Repo archived upstream Nov 18, 2023
finance/xtrader||2024-02-29|Has expired: Abandoned upstream

View File

@ -150,6 +150,5 @@
SUBDIR += tickrs
SUBDIR += venice
SUBDIR += weberp
SUBDIR += xtrader
.include <bsd.port.subdir.mk>

View File

@ -1,45 +0,0 @@
PORTNAME= xtrader
PORTVERSION= 0.99.9
PORTREVISION= 10
CATEGORIES= finance
MASTER_SITES= SF/${PORTNAME}/OldFiles
MAINTAINER= ports@FreeBSD.org
COMMENT= Technical analysis program for financial instruments
WWW= https://xtrader.sourceforge.net/
DEPRECATED= Abandoned upstream
EXPIRATION_DATE= 2024-02-29
LIB_DEPENDS= libptypes.so:devel/ptypes \
libfltk.so.1:x11-toolkits/fltk
USES= gmake xorg
USE_XORG= x11 xpm
MAKEFILE= Makefile.linux
CFLAGS+= --std=c++14
NO_WRKSUBDIR= yes
BUILD_WRKSRC= ${WRKSRC}/${PORTNAME}
PLIST_FILES= bin/xtrader \
%%DATADIR%%/sample.xt
post-patch:
${REINPLACE_CMD} -e 's|char|const char|' \
${WRKSRC}/xtrader/src/Resource.cpp
${REINPLACE_CMD} -e 's|static char|static const char|' \
${WRKSRC}/xtrader/src/Resource.h
${REINPLACE_CMD} -e 's|int(data)|(unsigned long)data|' \
${WRKSRC}/xtrader/src/gui/XTrader.h
${FIND} ${WRKSRC} -type f -name "*.cpp" -o -name "*.h" | ${XARGS} \
${REINPLACE_CMD} -e '/^#include <FL/s|.h>$$|.H>|; s|fl_file_chooser|Fl_File_Chooser|g'
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}/sample.xt ${STAGEDIR}${DATADIR}
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}/xtrader ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>

View File

@ -1,2 +0,0 @@
SHA256 (xtrader-0.99.9.tar.gz) = 9e423e633d795cb89c9b9485c26a166cf016b87a9543f43e025a638a30b9b87c
SIZE (xtrader-0.99.9.tar.gz) = 644928

View File

@ -1,21 +0,0 @@
--- ./xtrader/Makefile.linux.orig 2004-10-22 00:21:08.000000000 +0200
+++ ./xtrader/Makefile.linux 2011-11-15 13:46:18.000000000 +0100
@@ -1,12 +1,12 @@
-COMP= g++
-IFLAGS= -I../util -Isrc -I/usr/local/include -I/usr/include/ptypes
-CFLAGS= -march=i586 -O3 -Wall -Wno-format-y2k
-LFLAGS= -L/usr/local/lib -lz -lfltk -lptypes -lexpat -L/usr/X11R6/lib -lm -lXpm -lX11 -ldl -lpthread -lXft
-LFLAGS2= -L/usr/local/lib -lfltk_ -lptypes -L/usr/X11R6/lib -lXpm -lX11 -ldl -lpthread
+COMP= $(CXX)
+IFLAGS= -I../util -Isrc -I$(LOCALBASE)/include -I$(LOCALBASE)/include/ptypes
+CFLAGS:= $(CFLAGS) -Wno-format-y2k
+LFLAGS= -L$(LOCALBASE)/lib -lz -lfltk -lptypes -lexpat -lm -lXpm -lX11 -pthread -lXft -lcompat
+LFLAGS2= -L$(LOCALBASE)/lib -lfltk -lptypes -lXpm -lX11 -pthread
XTRADER= xtrader
XTRADER2= xtrader.static
-all: $(XTRADER) $(XTRADER2)
+all: $(XTRADER)
XTRADER_OBJ=../util/MH.o ../util/MHCSVFile.o \
../util/MHDate.o ../util/MHDayChart.o ../util/MHDC.o \

View File

@ -1,56 +0,0 @@
--- ./util/fl/Fl_Table.cpp.orig 2004-11-14 11:21:29.000000000 +0100
+++ ./util/fl/Fl_Table.cpp 2011-11-15 13:46:19.000000000 +0100
@@ -10,15 +10,15 @@
#include "Fl_Select.h"
#include "Fl_Find.h"
#include "Fl_Defines.h"
-#include <FL/Fl.h>
-#include <FL/fl_ask.h>
-#include <FL/fl_draw.h>
-#include <FL/Fl_Choice.h>
-#include <FL/Fl_Check_Button.h>
-#include <FL/Fl_File_Chooser.h>
-#include <FL/Fl_Input.h>
-#include <FL/Fl_Scrollbar.h>
-#include <FL/fl_show_colormap.h>
+#include <FL/Fl.H>
+#include <FL/fl_ask.H>
+#include <FL/fl_draw.H>
+#include <FL/Fl_Choice.H>
+#include <FL/Fl_Check_Button.H>
+#include <FL/Fl_File_Chooser.H>
+#include <FL/Fl_Input.H>
+#include <FL/Fl_Scrollbar.H>
+#include <FL/fl_show_colormap.H>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -962,7 +962,14 @@
}
}
-
+/**
+ * Callback for file chooser
+ */
+void tab_fc_callback(Fl_File_Chooser *fc, void *data)
+{
+ Fl_Table *t = static_cast<Fl_Table *>(data);
+ t->aData->value (fc->value(), t->aCurrRow, t->aCurrCol);
+}
/**
* Start to edit a cell
@@ -983,9 +990,10 @@
}
else if (aData->editor_type (aCurrRow, aCurrCol, false) == FL_DLG_FILE_EDITOR) {
- char* file = fl_file_chooser("Select File", "*", aData->value(aCurrRow, aCurrCol));
- aData->value (file, aCurrRow, aCurrCol);
+ Fl_File_Chooser *fc = new Fl_File_Chooser("Select File", "*", Fl_File_Chooser::SINGLE, aData->value(aCurrRow, aCurrCol));
+ fc->callback(tab_fc_callback, this);
+ delete fc;
}
else {
aEditWidget = aData->editor (aCurrRow, aCurrCol, force_custom);

View File

@ -1,26 +0,0 @@
--- ./util/fl/Fl_Table.h.orig 2004-11-14 11:21:34.000000000 +0100
+++ ./util/fl/Fl_Table.h 2011-11-15 13:46:19.000000000 +0100
@@ -12,12 +12,13 @@
#define snprintf _snprintf
#endif
-#include <FL/Fl_Group.h>
+#include <FL/Fl_Group.H>
#include "Fl_Table_Data.h"
class Fl_Input;
class Fl_Scrollbar;
class Fl_Find;
+class Fl_File_Chooser;
enum {
FL_DATA_CHANGE = 1000,
@@ -121,6 +122,8 @@
void get_cell_pos (int& row, int& col, int& xpos, int& ypos, int& width, int& height);
void start_edit_mode (bool force = false);
void set_cursor(int row, int col) {move_cursor (row - aCurrRow, col - aCurrCol);}
+ friend void tab_fc_callback(Fl_File_Chooser *fc, void *data);
+
};
#endif

View File

@ -1,40 +0,0 @@
--- ./xtrader/src/dlg/DownloadDlg.cpp.orig 2004-11-14 11:21:30.000000000 +0100
+++ ./xtrader/src/dlg/DownloadDlg.cpp 2011-11-15 13:46:19.000000000 +0100
@@ -21,8 +21,8 @@
#include "Enums.h"
#include "Progress.h"
#include "Resource.h"
-#include <FL/fl_ask.h>
-#include <FL/Fl_File_Chooser.h>
+#include <FL/fl_ask.H>
+#include <FL/Fl_File_Chooser.H>
#include <MHDate.h>
#include <MHDebug.h>
#include <MHFile.h>
@@ -164,13 +164,24 @@
}
+/**
+ * Callback for file chooser
+ */
+void dlg_fc_callback(Fl_File_Chooser *fc, void *data)
+{
+ DownloadDlg *d = static_cast<DownloadDlg *>(data);
+ const char *file = fc->value();
+ if (file && *file) d->aFile->value(file);
+
+}
/**
* Browse for result file name
*/
void DownloadDlg::cb3 () {
- char* file = fl_file_chooser (STRING(DLG_SELECT_WRITE_FILE), "*.*", "");
- if (file && *file) aFile->value (file);
+ Fl_File_Chooser *fc = new Fl_File_Chooser (STRING(DLG_SELECT_WRITE_FILE), "*.*", Fl_File_Chooser::SINGLE, "");
+ fc->callback(dlg_fc_callback, this);
+ delete fc;
}

View File

@ -1,19 +0,0 @@
--- ./xtrader/src/dlg/DownloadDlg.h.orig 2004-11-14 11:21:35.000000000 +0100
+++ ./xtrader/src/dlg/DownloadDlg.h 2011-11-15 13:46:19.000000000 +0100
@@ -18,6 +18,7 @@
#include <download/BaseDownload.h>
class Report;
+class Fl_File_Chooser;
@@ -51,6 +52,8 @@
Fl_Button* aClose;
void download (int type, const char* start, const char* stop, int action);
+
+ friend void dlg_fc_callback(Fl_File_Chooser *fc, void *data);
};
#endif

View File

@ -1,41 +0,0 @@
--- ./xtrader/src/dlg/ExportDlg.cpp.orig 2004-11-14 11:21:29.000000000 +0100
+++ ./xtrader/src/dlg/ExportDlg.cpp 2011-11-15 13:46:19.000000000 +0100
@@ -14,9 +14,9 @@
#include <help/Export.h>
#include <MHDate.h>
#include <MHDebug.h>
-#include <FL/fl_draw.h>
-#include <FL/fl_ask.h>
-#include <FL/Fl_File_Chooser.h>
+#include <FL/fl_draw.H>
+#include <FL/fl_ask.H>
+#include <FL/Fl_File_Chooser.H>
@@ -134,13 +134,23 @@
}
+/**
+ * Callback for file chooser
+ */
+void exp_fc_callback(Fl_File_Chooser *fc, void *data)
+{
+ ExportDlg *e = static_cast<ExportDlg *>(data);
+ const char *file = fc->value();
+ if (file && *file) e->aFile->value(file);
+}
/**
* Get filename
*/
void ExportDlg::cb3 () {
- char* file = fl_file_chooser (STRING(DLG_SELECT_WRITE_FILE), "*.*", "");
- if (file && *file) aFile->value (file);
+ Fl_File_Chooser *fc = new Fl_File_Chooser(STRING(DLG_SELECT_WRITE_FILE), "*.*", Fl_File_Chooser::SINGLE, "");
+ fc->callback(exp_fc_callback, this);
+ delete fc;
}

View File

@ -1,19 +0,0 @@
--- ./xtrader/src/dlg/ExportDlg.h.orig 2004-11-14 11:21:35.000000000 +0100
+++ ./xtrader/src/dlg/ExportDlg.h 2011-11-15 13:46:19.000000000 +0100
@@ -16,6 +16,7 @@
#include <FL/Fl_Button.H>
class Report;
+class Fl_File_Chooser;
@@ -45,6 +46,8 @@
Fl_Button* aBrowse;
Fl_Button* aHelp;
Fl_Button* aClose;
+
+ friend void exp_fc_callback(Fl_File_Chooser *fc, void *data);
};
#endif

View File

@ -1,51 +0,0 @@
--- ./xtrader/src/gui/ReportView.cpp.orig 2004-11-14 11:21:30.000000000 +0100
+++ ./xtrader/src/gui/ReportView.cpp 2011-11-15 13:46:19.000000000 +0100
@@ -21,13 +21,13 @@
#include "Resource.h"
#include <MHDate.h>
#include <MHVector.h>
-#include <FL/Fl.h>
-#include <FL/fl_ask.h>
-#include <FL/fl_draw.h>
-#include <FL/Fl_Button.h>
-#include <FL/Fl_File_Chooser.h>
+#include <FL/Fl.H>
+#include <FL/fl_ask.H>
+#include <FL/fl_draw.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_File_Chooser.H>
#include <fl/Fl_Layout.h>
-#include <FL/Fl_Hold_Browser.h>
+#include <FL/Fl_Hold_Browser.H>
#include <fl/Fl_Table.h>
#include <fl/Fl_Table_Data.h>
@@ -139,7 +139,15 @@
void ReportView::cbBrowser2 () {
}
-
+/**
+ * Callback for file chooser
+ */
+void rep_fc_callback(Fl_File_Chooser *fc, void *data)
+{
+ Report *r = static_cast<Report *>(data);
+ const char *file = fc->value();
+ if (file && *file) r->Save (file);
+}
/**
* Callback for buttons
@@ -173,8 +181,9 @@
Report* r = ((ReportData*)aTable->data())->report();
if (r) {
- char* file = fl_file_chooser (STRING(DLG_SELECT_WRITE_FILE), "*.*", "");
- if (file && *file) r->Save (file);
+ Fl_File_Chooser *fc = new Fl_File_Chooser (STRING(DLG_SELECT_WRITE_FILE), "*.*", Fl_File_Chooser::SINGLE, "");
+ fc->callback(rep_fc_callback, r);
+ delete fc;
}
}
else if (strcmp (button->label(), STRING(SELECT2)) == 0) {

View File

@ -1,87 +0,0 @@
--- ./xtrader/src/gui/XTrader.cpp.orig 2004-11-14 11:21:30.000000000 +0100
+++ ./xtrader/src/gui/XTrader.cpp 2011-11-15 13:46:19.000000000 +0100
@@ -34,11 +34,11 @@
#include "table/SecurityData.h"
#include "table/SetData.h"
#include "table/SetItemData.h"
-#include <FL/Fl.h>
-#include <FL/Fl_Box.h>
-#include <FL/fl_file_chooser.h>
+#include <FL/Fl.H>
+#include <FL/Fl_Box.H>
+#include <FL/Fl_File_Chooser.H>
#include <fl/Fl_Layout.h>
-#include <FL/Fl_Menu_Bar.h>
+#include <FL/Fl_Menu_Bar.H>
#include <fl/Fl_Table_Data.h>
#include <MHDate.h>
#include <MHDebug.h>
@@ -249,6 +249,34 @@
}
+/**
+ * Callback for file chooser
+ */
+void fc_callback(Fl_File_Chooser *fc, void *data)
+{
+ XTrader *xt = static_cast<XTrader *>(data);
+ const char *file = fc->value();
+
+ if (file && *file) {
+ MHDate date;
+ Import* import = 0;
+ double start = MHUtil::Time();
+
+ XTrader::StartWork (STRING(INFO_IMPORTING));
+ try {
+ import = new Import (file);
+ import->Read ();
+ char buffer[100];
+ snprintf (buffer, 99, "%s (%d %s / %.1fs) (%s=%d)", STRING(INFO_IMPORT_FINISHED), import->Rows(), STRING(ROWS), MHUtil::Time() - start, STRING(ERROR_), import->Errors());
+ XTrader::SetMessage (buffer);
+ }
+ catch (const char* message) {
+ XTrader::SetError (message);
+ }
+ XTrader::StopWork ("");
+ delete import;
+ }
+}
/**
* Callback for all menu items
@@ -291,28 +319,11 @@
break;
case Resource::MENU_IMPORT: {
- char* file = fl_file_chooser (STRING(DLG_IMPORT), STRING(DLG_IMPORT_FILTER), "");
- if (file && *file) {
- MHDate date;
- Import* import = 0;
- double start = MHUtil::Time();
-
- XTrader::StartWork (STRING(INFO_IMPORTING));
- try {
- import = new Import (file);
- import->Read ();
- char buffer[100];
- snprintf (buffer, 99, "%s (%d %s / %.1fs) (%s=%d)", STRING(INFO_IMPORT_FINISHED), import->Rows(), STRING(ROWS), MHUtil::Time() - start, STRING(ERROR_), import->Errors());
- XTrader::SetMessage (buffer);
- }
- catch (const char* message) {
- XTrader::SetError (message);
- }
- XTrader::StopWork ("");
- delete import;
- aListeners->Send (0, "Import", "changed", 0, 0);
- Fl::redraw ();
- }
+ Fl_File_Chooser *fc = new Fl_File_Chooser (STRING(DLG_IMPORT), STRING(DLG_IMPORT_FILTER), Fl_File_Chooser::SINGLE, "");
+ fc->callback(fc_callback);
+ delete fc;
+ aListeners->Send (0, "Import", "changed", 0, 0);
+ Fl::redraw ();
break;
}

View File

@ -1,7 +0,0 @@
Technical analysis program for financial instruments
Included is also an simple portfolio module where you can
- edit transactions, create reports and charts.
- create price larms report.
- edit all data.
- export all database files to an import file.