[90987] trunk/dports/python
aronnax at macports.org
aronnax at macports.org
Tue Mar 20 12:12:02 PDT 2012
Revision: 90987
https://trac.macports.org/changeset/90987
Author: aronnax at macports.org
Date: 2012-03-20 12:12:02 -0700 (Tue, 20 Mar 2012)
Log Message:
-----------
New port: py-novas_py
Added Paths:
-----------
trunk/dports/python/py-novas_py/
trunk/dports/python/py-novas_py/Portfile
trunk/dports/python/py-novas_py/files/
trunk/dports/python/py-novas_py/files/patch-compat.py.diff
Added: trunk/dports/python/py-novas_py/Portfile
===================================================================
--- trunk/dports/python/py-novas_py/Portfile (rev 0)
+++ trunk/dports/python/py-novas_py/Portfile 2012-03-20 19:12:02 UTC (rev 90987)
@@ -0,0 +1,50 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+PortGroup python 1.0
+
+name py-novas_py
+version 3.1
+categories-append science
+platforms darwin
+maintainers aronnax
+description Naval Observatory Vector Astrometry Software, \
+ Python Edition
+long_description \
+ Python ctypes wrapper for Naval Observatory Vector Astrometry Software \
+ (NOVAS). Provides extremely accurate astrometric coordinate conversions \
+ and position of solar system objects.
+
+homepage http://aa.usno.navy.mil/software/novas/novas_py/
+master_sites ${homepage}
+distname NOVAS_Py-${version}
+checksums md5 c8e57e9c33d6475a4fb170e9dec46119 \
+ sha1 8366d2a69708d1bd1a989de48d92eb789cb9b3a2 \
+ rmd160 304837953cc1b9917585ba7dacf8c404c3c9a816
+
+python.versions 25 26 27
+python.default_version 27
+
+default_variants +DE405
+
+variant DE405 description \
+{Download and prepare a JPL DE405 solar system ephemeris for use with NOVAS} {
+ post-build {
+ system "cd ${worksrcpath} && ${build.cmd} build_ephemeris"
+ }
+ post-destroot {
+ xinstall -d ${destroot}${prefix}/share/${subport}
+ xinstall ${worksrcpath}/DE405.bin ${destroot}${prefix}/share/${subport}/
+ }
+}
+
+patchfiles patch-compat.py.diff
+
+if {${name} == ${subport}} {
+ livecheck.type regex
+ livecheck.url ${master_sites}
+ livecheck.regex {NOVAS_Py-(\d+(?:\.\d+)*).tar.gz}
+} else {
+ livecheck.type none
+}
Added: trunk/dports/python/py-novas_py/files/patch-compat.py.diff
===================================================================
--- trunk/dports/python/py-novas_py/files/patch-compat.py.diff (rev 0)
+++ trunk/dports/python/py-novas_py/files/patch-compat.py.diff 2012-03-20 19:12:02 UTC (rev 90987)
@@ -0,0 +1,39 @@
+diff -ur NOVAS_Py-3.1.orig/compat/compat.py NOVAS_Py-3.1/compat/compat.py
+--- compat/compat.py.orig 2011-06-30 05:00:54.000000000 -0700
++++ compat/compat.py 2011-08-26 09:31:45.000000000 -0700
+@@ -3057,7 +3057,7 @@
+ limb_ang = c_double()
+ nadir_ang = c_double()
+
+- _limb_angle = ((c_double*3)(*pos_obj), (c_double*3)(*pos_obs),
++ _limb_angle ((c_double*3)(*pos_obj), (c_double*3)(*pos_obs),
+ byref(limb_ang), byref(nadir_ang))
+
+ return limb_ang.value, nadir_ang.value
+@@ -3160,7 +3160,7 @@
+
+ return jd
+
+-def cal_date(day):
++def cal_date(jd):
+ """
+ Return the Gregorian date for a given Julian day.
+
+@@ -3184,7 +3184,7 @@
+
+ """
+
+- if day < 0.0: raise ValueError(_neg_err % {'name': 'day'})
++ if jd < 0.0: raise ValueError(_neg_err % {'name': 'jd'})
+
+ _cal_date = novaslib.cal_date
+ _cal_date.argtypes = (c_double, POINTER(c_short), POINTER(c_short),
+@@ -3196,7 +3196,7 @@
+ day = c_short()
+ hour = c_double()
+
+- _cal_date(day, byref(year), byref(month), byref(day), byref(hour))
++ _cal_date(jd, byref(year), byref(month), byref(day), byref(hour))
+
+ return year.value, month.value, day.value, hour.value
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120320/8c3c36e3/attachment.html>
More information about the macports-changes
mailing list