View | Details | Raw Unified | Return to bug 133308
Collapse All | Expand All

(-)astro/orsa/Makefile (-18 / +3 lines)
Lines 20-46 Link Here
20
		fftw.2:${PORTSDIR}/math/fftw \
20
		fftw.2:${PORTSDIR}/math/fftw \
21
		ginac-1.4.0:${PORTSDIR}/math/GiNaC
21
		ginac-1.4.0:${PORTSDIR}/math/GiNaC
22
22
23
BROKEN=		does not compile
24
25
USE_AUTOTOOLS=	libtool:15
26
USE_QT_VER=	3
23
USE_QT_VER=	3
27
USE_GL=		gl
24
USE_GL=		gl
28
USE_GNOME=	gnometarget
29
GNU_CONFIGURE=	yes
30
USE_GMAKE=	yes
25
USE_GMAKE=	yes
26
USE_AUTOTOOLS=	aclocal:110 autoheader:262 automake:110 autoconf:262 libtool:15
27
ACLOCAL_ARGS=	-I macros -I ${LOCALBASE}/share/aclocal
28
CONFIGURE_ENV=	ac_cv_c_inline=no
31
USE_LDCONFIG=	yes
29
USE_LDCONFIG=	yes
32
30
33
post-patch:
34
	@${REINPLACE_CMD} -e 's,Body::,,' \
35
		${WRKSRC}/src/liborsa/orsa_body.h
36
	@${REINPLACE_CMD} -E 's,[[:alnum:]]+::(compare\(),\1,' \
37
		${WRKSRC}/src/libxorsa/xorsa_analysis.h \
38
		${WRKSRC}/src/libxorsa/xorsa_import_astorb_objects.h \
39
		${WRKSRC}/src/libxorsa/xorsa_object_selector.cc \
40
		${WRKSRC}/src/orsa/xorsa.h
41
	@${REINPLACE_CMD} -e 's,^extern,& "C",' \
42
		${WRKSRC}/src/libxorsa/xorsa_plot_area.h
43
	@${REINPLACE_CMD} -e '/nprintf/s,std::,,' \
44
		${WRKSRC}/src/libxorsa/xorsa_wrapper.cc
45
46
.include <bsd.port.mk>
31
.include <bsd.port.mk>
(-)astro/orsa/files/patch-configure.in (+46 lines)
Line 0 Link Here
1
--- configure.in.orig	2005-01-12 06:27:38.000000000 +0900
2
+++ configure.in	2009-04-02 14:21:59.000000000 +0900
3
@@ -27,6 +27,7 @@
4
 AC_PROG_INSTALL
5
 AC_PROG_MAKE_SET
6
 AC_PROG_AWK
7
+PKG_PROG_PKG_CONFIG
8
 
9
 dnl select the language for the test programs
10
 AC_LANG(C++)
11
@@ -35,10 +36,24 @@
12
 AM_PATH_GSL([1.5])
13
 
14
 dnl checks for the cln library
15
-AC_PATH_CLN([1.1.6], ac_cv_have_cln=yes, ac_cv_have_cln=no)
16
+PKG_CHECK_MODULES(CLN, cln >= 1.1.6, ac_cv_have_cln=yes, ac_cv_have_cln=no)
17
+
18
+if test "x$ac_cv_have_cln" = "xyes"; then
19
+    CLN_CPPFLAGS=`pkg-config --cflags cln`
20
+    CLN_LIBS=`pkg-config --libs cln`
21
+    AC_SUBST(CLN_CPPFLAGS)
22
+    AC_SUBST(CLN_LIBS)
23
+fi
24
 
25
 dnl checks for the ginac library
26
-AM_PATH_GINAC([1.2.0], ac_cv_have_ginac=yes, ac_cv_have_ginac=no)
27
+PKG_CHECK_MODULES(GiNaC, ginac >= 1.2.0, ac_cv_have_ginac=yes, ac_cv_have_ginac=no)
28
+
29
+if test "x$ac_cv_have_ginac" = "xyes"; then
30
+    GINACLIB_CPPFLAGS=`pkg-config --cflags ginac`
31
+    GINACLIB_LIBS=`pkg-config --libs ginac`
32
+    AC_SUBST(GINACLIB_CPPFLAGS)
33
+    AC_SUBST(GINACLIB_LIBS)
34
+fi
35
 
36
 dnl QT libs
37
 AC_PATH_QT
38
@@ -133,7 +148,7 @@
39
 
40
 dnl some compiler options
41
 if test "$GXX" = "yes"; then
42
-   CXXFLAGS="-g -Wall -W -pipe -ftemplate-depth-64 -O3 -fno-exceptions -funroll-loops -fstrict-aliasing -fno-gcse $GSL_CFLAGS $CLN_CPPFLAGS $GINACLIB_CPPFLAGS"
43
+   CXXFLAGS="$CXXFLAGS -Wall -W -pipe -ftemplate-depth-64 -fno-exceptions $GSL_CFLAGS $CLN_CPPFLAGS $GINACLIB_CPPFLAGS"
44
 fi
45
 
46
 AC_CONFIG_FILES([Makefile])
(-)astro/orsa/files/patch-ltmain.sh (-15 lines)
Lines 1-15 Link Here
1
--- ltmain.sh.orig	Thu Dec  9 14:11:14 2004
2
+++ ltmain.sh	Thu Dec  9 14:11:27 2004
3
@@ -4342,10 +4342,12 @@
4
 	fi
5
 
6
 	# Install the pseudo-library for information purposes.
7
+	if /usr/bin/false ; then
8
 	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
9
 	instname="$dir/$name"i
10
 	$show "$install_prog $instname $destdir/$name"
11
 	$run eval "$install_prog $instname $destdir/$name" || exit $?
12
+	fi
13
 
14
 	# Maybe install the static library, too.
15
 	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
(-)astro/orsa/files/patch-src__liborsa__orsa_body.h (+11 lines)
Line 0 Link Here
1
--- src/liborsa/orsa_body.h.orig	2004-12-30 12:58:03.000000000 +0900
2
+++ src/liborsa/orsa_body.h	2009-04-02 13:48:37.000000000 +0900
3
@@ -183,7 +183,7 @@
4
     inline void SetVelocity(const double x, const double y, const double z) { Vector v(x,y,z); SetVelocity(v); }
5
     
6
     // b position - this position
7
-    inline Vector Body::distanceVector(const Body & b) const { return b.position()-position(); }
8
+    inline Vector distanceVector(const Body & b) const { return b.position()-position(); }
9
     inline double distance(const Body & b) const { return distanceVector(b).Length(); }
10
     
11
     // alias
(-)astro/orsa/files/patch-src__liborsa__orsa_coord.cc (+10 lines)
Line 0 Link Here
1
--- src/liborsa/orsa_coord.cc.orig	2004-09-22 04:44:20.000000000 +0900
2
+++ src/liborsa/orsa_coord.cc	2009-04-02 13:48:37.000000000 +0900
3
@@ -25,6 +25,7 @@
4
 #include "orsa_coord.h"
5
 
6
 #include <cmath>
7
+#include <cstdlib>
8
 #include <iostream>
9
 
10
 using namespace std;
(-)astro/orsa/files/patch-src__liborsa__orsa_file.cc (+11 lines)
Line 0 Link Here
1
--- src/liborsa/orsa_file.cc.orig	2005-01-11 10:01:11.000000000 +0900
2
+++ src/liborsa/orsa_file.cc	2009-04-02 13:48:37.000000000 +0900
3
@@ -24,6 +24,8 @@
4
 
5
 #include "orsa_file.h"
6
 
7
+#include <algorithm>
8
+#include <cstring>
9
 #include <iostream>
10
 
11
 #include <ctype.h>
(-)astro/orsa/files/patch-src__liborsa__orsa_file_jpl.cc (+10 lines)
Line 0 Link Here
1
--- src/liborsa/orsa_file_jpl.cc.orig	2005-01-05 11:25:06.000000000 +0900
2
+++ src/liborsa/orsa_file_jpl.cc	2009-04-02 13:48:37.000000000 +0900
3
@@ -27,6 +27,7 @@
4
 #include "orsa_secure_math.h"
5
 
6
 #include <cstdio>
7
+#include <cstring>
8
 
9
 #include "sdncal.h"
10
 #include "jpleph.h"
(-)astro/orsa/files/patch-src__liborsa__orsa_interaction_tree.cc (+10 lines)
Line 0 Link Here
1
--- src/liborsa/orsa_interaction_tree.cc.orig	2004-10-02 09:04:30.000000000 +0900
2
+++ src/liborsa/orsa_interaction_tree.cc	2009-04-02 13:48:37.000000000 +0900
3
@@ -26,6 +26,7 @@
4
 #include "orsa_secure_math.h"
5
 #include "orsa_universe.h"
6
 
7
+#include <cstring>
8
 #include <iostream>
9
 #include <list>
10
 #include <stack>
(-)astro/orsa/files/patch-src__liborsa__orsa_units.h (+10 lines)
Line 0 Link Here
1
--- src/liborsa/orsa_units.h.orig	2005-01-05 12:54:27.000000000 +0900
2
+++ src/liborsa/orsa_units.h	2009-04-02 13:48:37.000000000 +0900
3
@@ -28,6 +28,7 @@
4
 #include <cmath>
5
 #include <string>
6
 #include <cstdio>
7
+#include <cstdlib>
8
 
9
 #include "orsa_secure_math.h"
10
 #include "orsa_coord.h"
(-)astro/orsa/files/patch-src__libxorsa__xorsa_aalysis.h (+11 lines)
Line 0 Link Here
1
--- src/libxorsa/xorsa_analysis.h.orig	2004-06-25 09:58:30.000000000 +0900
2
+++ src/libxorsa/xorsa_analysis.h	2009-04-02 13:48:37.000000000 +0900
3
@@ -129,7 +129,7 @@
4
   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);
5
   
6
  public:
7
-  int XOrsaPeaksListItem::compare(QListViewItem * i, int col, bool ascending) const;    
8
+  int compare(QListViewItem * i, int col, bool ascending) const;    
9
   
10
 };
11
 
(-)astro/orsa/files/patch-src__libxorsa__xorsa_download.cc (+42 lines)
Line 0 Link Here
1
--- src/libxorsa/xorsa_download.cc.orig	2004-12-30 14:21:29.000000000 +0900
2
+++ src/libxorsa/xorsa_download.cc	2009-04-02 13:48:37.000000000 +0900
3
@@ -221,6 +221,21 @@
4
   
5
 }
6
 
7
+void XOrsaDownloadEntry::secure_download(const QUrlInfo &urlInfo)
8
+{
9
+  QUrl proto_url(le->text());
10
+  // download file if it appears in the file listing
11
+  if (proto_url.fileName() == urlInfo.name()) {
12
+    // abort the current QFtp::List and QFtp::Close commands
13
+    ftp->abort();
14
+    
15
+    if (urlInfo.isFile() && urlInfo.isReadable())
16
+      ftp->get(proto_url.fileName(),file);
17
+    
18
+    ftp->close();
19
+  }
20
+}
21
+
22
 void XOrsaDownloadEntry::download() {
23
   QUrl proto_url(le->text());
24
   ftp = 0;
25
@@ -235,7 +250,7 @@
26
     ftp->login("anonymous","orsa_user@orsa.sf.net");
27
     ftp->cd(proto_url.dirPath());
28
     //
29
-    ftp->get(proto_url.fileName(),file);
30
+    ftp->list();
31
     // WARNING: don't close the file HERE!!
32
     //
33
     ftp->close();
34
@@ -246,6 +261,8 @@
35
     
36
     connect(ftp,SIGNAL(done(bool)),this,SLOT(post_download(bool)));
37
     
38
+    connect(ftp,SIGNAL(listInfo(const QUrlInfo &)),this,SLOT(secure_download(const QUrlInfo &)));
39
+    
40
   } else if (proto_url.protocol() == "http") {
41
     
42
     http = new QHttp;
(-)astro/orsa/files/patch-src__libxorsa__xorsa_download.h (+10 lines)
Line 0 Link Here
1
--- src/libxorsa/xorsa_download.h.orig	2004-12-30 14:21:29.000000000 +0900
2
+++ src/libxorsa/xorsa_download.h	2009-04-02 13:48:37.000000000 +0900
3
@@ -91,6 +91,7 @@
4
   void pb_clicked();  
5
   void post_download(bool);
6
   void download();
7
+  void secure_download(const QUrlInfo &);
8
 };
9
 
10
 
(-)astro/orsa/files/patch-src__libxorsa__xorsa_import_astorb_objects.h (+11 lines)
Line 0 Link Here
1
--- src/libxorsa/xorsa_import_astorb_objects.h.orig	2005-01-05 12:04:17.000000000 +0900
2
+++ src/libxorsa/xorsa_import_astorb_objects.h	2009-04-02 13:48:37.000000000 +0900
3
@@ -600,7 +600,7 @@
4
   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) { };
5
   
6
  public:
7
-  inline int XOrsaAstorbObjectItem::compare(QListViewItem *i, int col, bool ascending) const {
8
+  inline int compare(QListViewItem *i, int col, bool ascending) const {
9
 
10
     using std::atof;
11
         
(-)astro/orsa/files/patch-src__libxorsa__xorsa_object_selector.cc (+11 lines)
Line 0 Link Here
1
--- src/libxorsa/xorsa_object_selector.cc.orig	2004-06-25 12:12:57.000000000 +0900
2
+++ src/libxorsa/xorsa_object_selector.cc	2009-04-02 13:48:37.000000000 +0900
3
@@ -40,7 +40,7 @@
4
   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);
5
   
6
  public:
7
-  int XOrsaObjectItem::compare(QListViewItem * i, int col, bool ascending) const;    
8
+  int compare(QListViewItem * i, int col, bool ascending) const;    
9
   
10
 };
11
 
(-)astro/orsa/files/patch-src__libxorsa__xorsa_plot_area.h (+11 lines)
Line 0 Link Here
1
--- src/libxorsa/xorsa_plot_area.h.orig	2005-01-05 11:25:06.000000000 +0900
2
+++ src/libxorsa/xorsa_plot_area.h	2009-04-02 13:48:37.000000000 +0900
3
@@ -57,7 +57,7 @@
4
   }
5
 }
6
 
7
-extern char *MonthNameShort[13]; // sdncal.h
8
+extern "C" char *MonthNameShort[13]; // sdncal.h
9
 
10
 void FineDate(QString & label, const orsa::UniverseTypeAwareTime & t, bool=true);
11
 void FineDate_HMS(QString & label, const orsa::UniverseTypeAwareTime & t);
(-)astro/orsa/files/patch-src__libxorsa__xorsa_wrapper.cc (+14 lines)
Line 0 Link Here
1
--- src/libxorsa/xorsa_wrapper.cc.orig	2005-01-06 07:07:56.000000000 +0900
2
+++ src/libxorsa/xorsa_wrapper.cc	2009-04-02 13:48:37.000000000 +0900
3
@@ -148,9 +148,9 @@
4
 {
5
   if (doDefaultOutput) inherited::vtrace(fmt, ap);
6
   char str[1024];
7
-  std::vsnprintf(str, sizeof(str) - 1, fmt, ap);
8
+  vsnprintf(str, sizeof(str) - 1, fmt, ap);
9
   char msg[1024];
10
-  std::snprintf(msg, sizeof(msg) - 1, "[%s][%s:%i] %s %s\n", 
11
+  snprintf(msg, sizeof(msg) - 1, "[%s][%s:%i] %s %s\n", 
12
     QTime::currentTime(Qt::LocalTime).toString("hh:mm:ss").latin1(),d->file,d->line, d->msg.c_str(), str);
13
   QString s = msg;
14
   XOrsaDebugEvent *de = new XOrsaDebugEvent(s);
(-)astro/orsa/files/patch-src__orsa__xorsa.cc (+63 lines)
Line 0 Link Here
1
--- src/orsa/xorsa.cc.orig	2005-01-05 07:31:25.000000000 +0900
2
+++ src/orsa/xorsa.cc	2009-04-02 13:48:37.000000000 +0900
3
@@ -580,25 +580,25 @@
4
      MPC_UNUSUALS));
5
   */
6
   
7
-  items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/MPCORB.ZIP",
8
+  items.push_back(XOrsaDownloadItem("",
9
 				    MPC_MPCORB));
10
   
11
-  items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/NEA.DAT",
12
+  items.push_back(XOrsaDownloadItem("",
13
 				    MPC_NEA));
14
   
15
-  items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/DAILY.DAT",
16
+  items.push_back(XOrsaDownloadItem("",
17
 				    MPC_DAILY));
18
   
19
-  items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/DistantObjects.DAT",
20
+  items.push_back(XOrsaDownloadItem("",
21
 				    MPC_DISTANT));
22
     
23
-  items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/PHA.DAT",
24
+  items.push_back(XOrsaDownloadItem("",
25
 				    MPC_PHA));
26
   
27
-  items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/Unusuals.DAT",
28
+  items.push_back(XOrsaDownloadItem("",
29
 				    MPC_UNUSUALS));
30
   
31
-  items.push_back(XOrsaDownloadItem("http://www.astro.cz/mpcorb/COMET.DAT",
32
+  items.push_back(XOrsaDownloadItem("",
33
 				    MPC_COMET));
34
   
35
   /* 
36
@@ -627,22 +627,22 @@
37
   items.push_back(XOrsaDownloadItem("http://www.amsat.org/amsat/ftp/keps/current/nasa.all",
38
 				    TLE_NASA));   
39
   
40
-  items.push_back(XOrsaDownloadItem("ftp://alphalma.cnrs-mrs.fr/pub/astro/geo.tle",
41
+  items.push_back(XOrsaDownloadItem("",
42
 				    TLE_GEO));   
43
   
44
   items.push_back(XOrsaDownloadItem("http://www.celestrak.com/NORAD/elements/gps-ops.txt",
45
 				    TLE_GPS));   
46
   
47
-  items.push_back(XOrsaDownloadItem("ftp://alphalma.cnrs-mrs.fr/pub/astro/iss.tle",
48
+  items.push_back(XOrsaDownloadItem("",
49
 				    TLE_ISS));   
50
   
51
-  items.push_back(XOrsaDownloadItem("http://www.orbitessera.com/data/orbital/kepele.txt",
52
+  items.push_back(XOrsaDownloadItem("",
53
 				    TLE_KEPELE));   
54
   
55
-  items.push_back(XOrsaDownloadItem("ftp://alphalma.cnrs-mrs.fr/pub/astro/visual.tle",
56
+  items.push_back(XOrsaDownloadItem("",
57
 				    TLE_VISUAL));   
58
   
59
-  items.push_back(XOrsaDownloadItem("ftp://alphalma.cnrs-mrs.fr/pub/astro/weather.tle",
60
+  items.push_back(XOrsaDownloadItem("",
61
 				    TLE_WEATHER));   
62
   
63
   // textures
(-)astro/orsa/files/patch-src__orsa__xorsa.h (+11 lines)
Line 0 Link Here
1
--- src/orsa/xorsa.h.orig	2004-07-13 11:21:19.000000000 +0900
2
+++ src/orsa/xorsa.h	2009-04-02 13:48:37.000000000 +0900
3
@@ -62,7 +62,7 @@
4
   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);
5
   
6
  public:
7
-  int ObjectItem::compare(QListViewItem * i, int col, bool ascending) const;    
8
+  int compare(QListViewItem * i, int col, bool ascending) const;    
9
   
10
 };
11

Return to bug 133308