- Fix build

PR:		133308
Submitted by:	Ports Fury
This commit is contained in:
Martin Wilke 2009-04-03 08:52:57 +00:00
parent ce5f529143
commit e52719ed46
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=231524
18 changed files with 295 additions and 33 deletions

View file

@ -20,27 +20,12 @@ LIB_DEPENDS= gsl.13:${PORTSDIR}/math/gsl \
fftw.2:${PORTSDIR}/math/fftw \
ginac-1.4.0:${PORTSDIR}/math/GiNaC
BROKEN= does not compile
USE_AUTOTOOLS= libtool:15
USE_QT_VER= 3
USE_GL= gl
USE_GNOME= gnometarget
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_AUTOTOOLS= aclocal:110 autoheader:262 automake:110 autoconf:262 libtool:15
ACLOCAL_ARGS= -I macros -I ${LOCALBASE}/share/aclocal
CONFIGURE_ENV= ac_cv_c_inline=no
USE_LDCONFIG= yes
post-patch:
@${REINPLACE_CMD} -e 's,Body::,,' \
${WRKSRC}/src/liborsa/orsa_body.h
@${REINPLACE_CMD} -E 's,[[:alnum:]]+::(compare\(),\1,' \
${WRKSRC}/src/libxorsa/xorsa_analysis.h \
${WRKSRC}/src/libxorsa/xorsa_import_astorb_objects.h \
${WRKSRC}/src/libxorsa/xorsa_object_selector.cc \
${WRKSRC}/src/orsa/xorsa.h
@${REINPLACE_CMD} -e 's,^extern,& "C",' \
${WRKSRC}/src/libxorsa/xorsa_plot_area.h
@${REINPLACE_CMD} -e '/nprintf/s,std::,,' \
${WRKSRC}/src/libxorsa/xorsa_wrapper.cc
.include <bsd.port.mk>

View file

@ -0,0 +1,46 @@
--- configure.in.orig 2005-01-12 06:27:38.000000000 +0900
+++ configure.in 2009-04-02 14:21:59.000000000 +0900
@@ -27,6 +27,7 @@
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_AWK
+PKG_PROG_PKG_CONFIG
dnl select the language for the test programs
AC_LANG(C++)
@@ -35,10 +36,24 @@
AM_PATH_GSL([1.5])
dnl checks for the cln library
-AC_PATH_CLN([1.1.6], ac_cv_have_cln=yes, ac_cv_have_cln=no)
+PKG_CHECK_MODULES(CLN, cln >= 1.1.6, ac_cv_have_cln=yes, ac_cv_have_cln=no)
+
+if test "x$ac_cv_have_cln" = "xyes"; then
+ CLN_CPPFLAGS=`pkg-config --cflags cln`
+ CLN_LIBS=`pkg-config --libs cln`
+ AC_SUBST(CLN_CPPFLAGS)
+ AC_SUBST(CLN_LIBS)
+fi
dnl checks for the ginac library
-AM_PATH_GINAC([1.2.0], ac_cv_have_ginac=yes, ac_cv_have_ginac=no)
+PKG_CHECK_MODULES(GiNaC, ginac >= 1.2.0, ac_cv_have_ginac=yes, ac_cv_have_ginac=no)
+
+if test "x$ac_cv_have_ginac" = "xyes"; then
+ GINACLIB_CPPFLAGS=`pkg-config --cflags ginac`
+ GINACLIB_LIBS=`pkg-config --libs ginac`
+ AC_SUBST(GINACLIB_CPPFLAGS)
+ AC_SUBST(GINACLIB_LIBS)
+fi
dnl QT libs
AC_PATH_QT
@@ -133,7 +148,7 @@
dnl some compiler options
if test "$GXX" = "yes"; then
- CXXFLAGS="-g -Wall -W -pipe -ftemplate-depth-64 -O3 -fno-exceptions -funroll-loops -fstrict-aliasing -fno-gcse $GSL_CFLAGS $CLN_CPPFLAGS $GINACLIB_CPPFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wall -W -pipe -ftemplate-depth-64 -fno-exceptions $GSL_CFLAGS $CLN_CPPFLAGS $GINACLIB_CPPFLAGS"
fi
AC_CONFIG_FILES([Makefile])

View file

@ -1,15 +0,0 @@
--- ltmain.sh.orig Thu Dec 9 14:11:14 2004
+++ ltmain.sh Thu Dec 9 14:11:27 2004
@@ -4342,10 +4342,12 @@
fi
# Install the pseudo-library for information purposes.
+ if /usr/bin/false ; then
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
instname="$dir/$name"i
$show "$install_prog $instname $destdir/$name"
$run eval "$install_prog $instname $destdir/$name" || exit $?
+ fi
# Maybe install the static library, too.
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"

View file

@ -0,0 +1,11 @@
--- src/liborsa/orsa_body.h.orig 2004-12-30 12:58:03.000000000 +0900
+++ src/liborsa/orsa_body.h 2009-04-02 13:48:37.000000000 +0900
@@ -183,7 +183,7 @@
inline void SetVelocity(const double x, const double y, const double z) { Vector v(x,y,z); SetVelocity(v); }
// b position - this position
- inline Vector Body::distanceVector(const Body & b) const { return b.position()-position(); }
+ inline Vector distanceVector(const Body & b) const { return b.position()-position(); }
inline double distance(const Body & b) const { return distanceVector(b).Length(); }
// alias

View file

@ -0,0 +1,10 @@
--- src/liborsa/orsa_coord.cc.orig 2004-09-22 04:44:20.000000000 +0900
+++ src/liborsa/orsa_coord.cc 2009-04-02 13:48:37.000000000 +0900
@@ -25,6 +25,7 @@
#include "orsa_coord.h"
#include <cmath>
+#include <cstdlib>
#include <iostream>
using namespace std;

View file

@ -0,0 +1,11 @@
--- src/liborsa/orsa_file.cc.orig 2005-01-11 10:01:11.000000000 +0900
+++ src/liborsa/orsa_file.cc 2009-04-02 13:48:37.000000000 +0900
@@ -24,6 +24,8 @@
#include "orsa_file.h"
+#include <algorithm>
+#include <cstring>
#include <iostream>
#include <ctype.h>

View file

@ -0,0 +1,10 @@
--- src/liborsa/orsa_file_jpl.cc.orig 2005-01-05 11:25:06.000000000 +0900
+++ src/liborsa/orsa_file_jpl.cc 2009-04-02 13:48:37.000000000 +0900
@@ -27,6 +27,7 @@
#include "orsa_secure_math.h"
#include <cstdio>
+#include <cstring>
#include "sdncal.h"
#include "jpleph.h"

View file

@ -0,0 +1,10 @@
--- src/liborsa/orsa_interaction_tree.cc.orig 2004-10-02 09:04:30.000000000 +0900
+++ src/liborsa/orsa_interaction_tree.cc 2009-04-02 13:48:37.000000000 +0900
@@ -26,6 +26,7 @@
#include "orsa_secure_math.h"
#include "orsa_universe.h"
+#include <cstring>
#include <iostream>
#include <list>
#include <stack>

View file

@ -0,0 +1,10 @@
--- src/liborsa/orsa_units.h.orig 2005-01-05 12:54:27.000000000 +0900
+++ src/liborsa/orsa_units.h 2009-04-02 13:48:37.000000000 +0900
@@ -28,6 +28,7 @@
#include <cmath>
#include <string>
#include <cstdio>
+#include <cstdlib>
#include "orsa_secure_math.h"
#include "orsa_coord.h"

View file

@ -0,0 +1,11 @@
--- src/libxorsa/xorsa_analysis.h.orig 2004-06-25 09:58:30.000000000 +0900
+++ src/libxorsa/xorsa_analysis.h 2009-04-02 13:48:37.000000000 +0900
@@ -129,7 +129,7 @@
XOrsaPeaksListItem(QListView *parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null);
public:
- int XOrsaPeaksListItem::compare(QListViewItem * i, int col, bool ascending) const;
+ int compare(QListViewItem * i, int col, bool ascending) const;
};

View file

@ -0,0 +1,42 @@
--- src/libxorsa/xorsa_download.cc.orig 2004-12-30 14:21:29.000000000 +0900
+++ src/libxorsa/xorsa_download.cc 2009-04-02 13:48:37.000000000 +0900
@@ -221,6 +221,21 @@
}
+void XOrsaDownloadEntry::secure_download(const QUrlInfo &urlInfo)
+{
+ QUrl proto_url(le->text());
+ // download file if it appears in the file listing
+ if (proto_url.fileName() == urlInfo.name()) {
+ // abort the current QFtp::List and QFtp::Close commands
+ ftp->abort();
+
+ if (urlInfo.isFile() && urlInfo.isReadable())
+ ftp->get(proto_url.fileName(),file);
+
+ ftp->close();
+ }
+}
+
void XOrsaDownloadEntry::download() {
QUrl proto_url(le->text());
ftp = 0;
@@ -235,7 +250,7 @@
ftp->login("anonymous","orsa_user@orsa.sf.net");
ftp->cd(proto_url.dirPath());
//
- ftp->get(proto_url.fileName(),file);
+ ftp->list();
// WARNING: don't close the file HERE!!
//
ftp->close();
@@ -246,6 +261,8 @@
connect(ftp,SIGNAL(done(bool)),this,SLOT(post_download(bool)));
+ connect(ftp,SIGNAL(listInfo(const QUrlInfo &)),this,SLOT(secure_download(const QUrlInfo &)));
+
} else if (proto_url.protocol() == "http") {
http = new QHttp;

View file

@ -0,0 +1,10 @@
--- src/libxorsa/xorsa_download.h.orig 2004-12-30 14:21:29.000000000 +0900
+++ src/libxorsa/xorsa_download.h 2009-04-02 13:48:37.000000000 +0900
@@ -91,6 +91,7 @@
void pb_clicked();
void post_download(bool);
void download();
+ void secure_download(const QUrlInfo &);
};

View file

@ -0,0 +1,11 @@
--- src/libxorsa/xorsa_import_astorb_objects.h.orig 2005-01-05 12:04:17.000000000 +0900
+++ src/libxorsa/xorsa_import_astorb_objects.h 2009-04-02 13:48:37.000000000 +0900
@@ -600,7 +600,7 @@
inline XOrsaAstorbObjectItem(QListView *parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null) : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) { };
public:
- inline int XOrsaAstorbObjectItem::compare(QListViewItem *i, int col, bool ascending) const {
+ inline int compare(QListViewItem *i, int col, bool ascending) const {
using std::atof;

View file

@ -0,0 +1,11 @@
--- src/libxorsa/xorsa_object_selector.cc.orig 2004-06-25 12:12:57.000000000 +0900
+++ src/libxorsa/xorsa_object_selector.cc 2009-04-02 13:48:37.000000000 +0900
@@ -40,7 +40,7 @@
XOrsaObjectItem(QListView *parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null);
public:
- int XOrsaObjectItem::compare(QListViewItem * i, int col, bool ascending) const;
+ int compare(QListViewItem * i, int col, bool ascending) const;
};

View file

@ -0,0 +1,11 @@
--- src/libxorsa/xorsa_plot_area.h.orig 2005-01-05 11:25:06.000000000 +0900
+++ src/libxorsa/xorsa_plot_area.h 2009-04-02 13:48:37.000000000 +0900
@@ -57,7 +57,7 @@
}
}
-extern char *MonthNameShort[13]; // sdncal.h
+extern "C" char *MonthNameShort[13]; // sdncal.h
void FineDate(QString & label, const orsa::UniverseTypeAwareTime & t, bool=true);
void FineDate_HMS(QString & label, const orsa::UniverseTypeAwareTime & t);

View file

@ -0,0 +1,14 @@
--- src/libxorsa/xorsa_wrapper.cc.orig 2005-01-06 07:07:56.000000000 +0900
+++ src/libxorsa/xorsa_wrapper.cc 2009-04-02 13:48:37.000000000 +0900
@@ -148,9 +148,9 @@
{
if (doDefaultOutput) inherited::vtrace(fmt, ap);
char str[1024];
- std::vsnprintf(str, sizeof(str) - 1, fmt, ap);
+ vsnprintf(str, sizeof(str) - 1, fmt, ap);
char msg[1024];
- std::snprintf(msg, sizeof(msg) - 1, "[%s][%s:%i] %s %s\n",
+ snprintf(msg, sizeof(msg) - 1, "[%s][%s:%i] %s %s\n",
QTime::currentTime(Qt::LocalTime).toString("hh:mm:ss").latin1(),d->file,d->line, d->msg.c_str(), str);
QString s = msg;
XOrsaDebugEvent *de = new XOrsaDebugEvent(s);

View file

@ -0,0 +1,63 @@
--- src/orsa/xorsa.cc.orig 2005-01-05 07:31:25.000000000 +0900
+++ src/orsa/xorsa.cc 2009-04-02 13:48:37.000000000 +0900
@@ -580,25 +580,25 @@
MPC_UNUSUALS));
*/
- items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/MPCORB.ZIP",
+ items.push_back(XOrsaDownloadItem("",
MPC_MPCORB));
- items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/NEA.DAT",
+ items.push_back(XOrsaDownloadItem("",
MPC_NEA));
- items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/DAILY.DAT",
+ items.push_back(XOrsaDownloadItem("",
MPC_DAILY));
- items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/DistantObjects.DAT",
+ items.push_back(XOrsaDownloadItem("",
MPC_DISTANT));
- items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/PHA.DAT",
+ items.push_back(XOrsaDownloadItem("",
MPC_PHA));
- items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/Unusuals.DAT",
+ items.push_back(XOrsaDownloadItem("",
MPC_UNUSUALS));
- items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/COMET.DAT",
+ items.push_back(XOrsaDownloadItem("",
MPC_COMET));
/*
@@ -627,22 +627,22 @@
items.push_back(XOrsaDownloadItem("http://www.amsat.org/amsat/ftp/keps/current/nasa.all",
TLE_NASA));
- items.push_back(XOrsaDownloadItem("ftp://alphalma.cnrs-mrs.fr/pub/astro/geo.tle",
+ items.push_back(XOrsaDownloadItem("",
TLE_GEO));
items.push_back(XOrsaDownloadItem("http://www.celestrak.com/NORAD/elements/gps-ops.txt",
TLE_GPS));
- items.push_back(XOrsaDownloadItem("ftp://alphalma.cnrs-mrs.fr/pub/astro/iss.tle",
+ items.push_back(XOrsaDownloadItem("",
TLE_ISS));
- items.push_back(XOrsaDownloadItem("http://www.orbitessera.com/data/orbital/kepele.txt",
+ items.push_back(XOrsaDownloadItem("",
TLE_KEPELE));
- items.push_back(XOrsaDownloadItem("ftp://alphalma.cnrs-mrs.fr/pub/astro/visual.tle",
+ items.push_back(XOrsaDownloadItem("",
TLE_VISUAL));
- items.push_back(XOrsaDownloadItem("ftp://alphalma.cnrs-mrs.fr/pub/astro/weather.tle",
+ items.push_back(XOrsaDownloadItem("",
TLE_WEATHER));
// textures

View file

@ -0,0 +1,11 @@
--- src/orsa/xorsa.h.orig 2004-07-13 11:21:19.000000000 +0900
+++ src/orsa/xorsa.h 2009-04-02 13:48:37.000000000 +0900
@@ -62,7 +62,7 @@
ObjectItem(QListView *parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null);
public:
- int ObjectItem::compare(QListViewItem * i, int col, bool ascending) const;
+ int compare(QListViewItem * i, int col, bool ascending) const;
};