[Pkg-wmaker-commits] [wmmoonclock] 17/23: Import Debian changes 1.27-28
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 14 22:54:11 UTC 2017
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmmoonclock.
commit 10defe48dd5e88ecb91e5b1d901de1500039d1a9
Author: Denis Briand <denis at narcan.fr>
Date: Sun Jul 26 10:30:00 2009 +0200
Import Debian changes 1.27-28
wmmoonclock (1.27-28) unstable; urgency=low
* Add southern hemisphere support (Closes: #537480).
Thanks to Alvaro Steiger.
* Bump standards version to 3.8.2.0
* Add quilt patch system.
* Add patches:
+ 01_all_previous_diff.diff
+ 02_update_time.diff
+ 03_add_southern_hemisphere_support.diff
+ 04_fix_hyphen_used_as_minus_sign.diff
* Add debhelper 7 build depends.
* Add debian/compat file.
* Remove trailing whitespaces in changelog.upstream.
* Add an empty watch file (no upstream repository).
* Improve rules file by using more debhelper commands.
* Remove Martin A. Godisch from uploaders field
Thanks to him to have sponsored wmmoonclock.
---
Src/CalcEphem.c | 18 +-
Src/CalcEphem.h | 3 -
Src/Makefile | 9 +-
Src/Moon.c | 19 +-
Src/Moon.h | 6 -
Src/MoonRise.c | 21 +-
Src/MoonRise.h | 8 -
Src/wmMoonClock.c | 31 +-
debian/changelog | 21 ++
debian/changelog.upstream | 40 +--
debian/compat | 1 +
debian/control | 5 +-
debian/patches/01_all_previous_diff.diff | 335 +++++++++++++++++++++
debian/patches/02_update_time.diff | 47 +++
.../03_add_southern_hemisphere_support.diff | 14 +
.../patches/04_fix_hyphen_used_as_minus_sign.diff | 55 ++++
debian/patches/series | 4 +
debian/rules | 26 +-
debian/watch | 1 +
19 files changed, 560 insertions(+), 104 deletions(-)
diff --git a/Src/CalcEphem.c b/Src/CalcEphem.c
index 97d9ca9..5d57286 100644
--- a/Src/CalcEphem.c
+++ b/Src/CalcEphem.c
@@ -1,12 +1,13 @@
-#include <string.h>
#include "CalcEphem.h"
-void CalcEphem(date, UT, c)
+CalcEphem(date, UT, c)
long int date; /* integer containing the date (e.g. 960829) */
double UT; /* Universal Time */
CTrans *c; /* structure containing all the relevent coord trans info */
{
+double vv;
+int dd, mm, ss;
int year, month, day;
double TU, TU2, TU3, T0, gmst;
@@ -15,7 +16,12 @@ CTrans *c; /* structure containing all the relevent coord trans info */
double days, M, E, nu, lambnew;
double r0, earth_sun_distance;
double RA, DEC, RA_Moon, DEC_Moon;
- double TDT, AGE, LambdaMoon, BetaMoon, R;
+ double dt, g0_1, g1_1, h1_1, gclat, glon, psi;
+ double TDT, Lmoon_0, P0, N0, Imoon, Lmoon, Mmoon_m, Nmoon, Cmoon;
+ double Emoon_nu, Amoon_e, Amoon_3, Mmoon_mp, Emoon_c, amoon, emoon, AGE;
+ double Amoon_4, Lmoon_p, Vmoon, Lmoon_pp, Nmoon_p, LambdaMoon, BetaMoon, R;
+ Vector S, K, Y, Z, D, Dgei, Dgsm;
+ int i, j;
double jd(), hour24(), angle2pi(), angle360(), kepler(), Moon(), NewMoon();
double Ta, Tb, Tc, frac();
double SinGlat, CosGlat, SinGlon, CosGlon, Tau, lmst, x, y, z;
@@ -231,7 +237,7 @@ int year, month, day;
char dowstr[];
{
double JD, A, Afrac, jd();
- int n, iA;
+ int n, iday, iA;
JD = jd(year, month, day, 0.0);
A = (JD + 1.5)/7.0;
@@ -276,7 +282,7 @@ double jd(ny, nm, nd, UT)
int ny, nm, nd;
double UT;
{
- double A, B, C, D, JD, day;
+ double A, B, C, D, JD, MJD, day;
day = nd + UT/24.0;
@@ -366,7 +372,7 @@ double angle;
}
-void Radec_to_Cart(ra, dec, r)
+Radec_to_Cart(ra, dec, r)
double ra, dec; /* RA and DEC */
Vector *r; /* returns corresponding cartesian unit vector */
{
diff --git a/Src/CalcEphem.h b/Src/CalcEphem.h
index 7ed5bde..4e907bb 100644
--- a/Src/CalcEphem.h
+++ b/Src/CalcEphem.h
@@ -54,7 +54,4 @@ typedef struct CTrans {
int Visible; /* Wether or not moon is above horizon */
} CTrans;
-void CalcEphem(long int, double, CTrans*);
-int DayofWeek(int, int, int, char*);
-int DayofYear(int, int, int);
diff --git a/Src/Makefile b/Src/Makefile
index f7f5a47..f8a8241 100644
--- a/Src/Makefile
+++ b/Src/Makefile
@@ -1,5 +1,5 @@
CC = gcc
-# CFLAGS = -O2
+CFLAGS = -O2
INCDIR = -I/usr/X11R6/include/X11
DESTDIR= /usr/X11R6
LIBDIR = -L/usr/X11R6/lib
@@ -22,7 +22,7 @@ all: wmMoonClock.o wmMoonClock
wmMoonClock.o: wmMoonClock_master.xpm wmMoonClock_mask.xbm CalcEphem.h
wmMoonClock: $(OBJS)
- $(CC) $(CFLAGS) $(SYSTEM) -lm -o wmMoonClock $^ $(INCDIR) $(LIBDIR) $(LIBS)
+ $(CC) $(COPTS) $(SYSTEM) -lm -o wmMoonClock $^ $(INCDIR) $(LIBDIR) $(LIBS)
clean:
for i in $(OBJS) ; do \
@@ -31,7 +31,6 @@ clean:
rm -f wmMoonClock
install:: wmMoonClock
- install -d -m 0755 $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1
- install -m 0755 wmMoonClock $(DESTDIR)/usr/bin
- install -m 0644 wmMoonClock.1 $(DESTDIR)/usr/share/man/man1
+ install -s -m 0755 wmMoonClock $(DESTDIR)/bin
+ install -m 0644 wmMoonClock.1 $(DESTDIR)/man/man1
diff --git a/Src/Moon.c b/Src/Moon.c
index f7e001d..64552a9 100644
--- a/Src/Moon.c
+++ b/Src/Moon.c
@@ -8,10 +8,6 @@
double angle360();
-void addthe(double, double, double, double, double*, double*);
-void addsol(double, double, double, double, int, int, int, int);
-void addn(double, int, int, int, int);
-void term(int, int, int, int, double*, double*);
double TwoPi = 6.283185308;
double ARC = 206264.81;
@@ -29,8 +25,8 @@ double T2;
double S1, S2, S3, S4, S5, S6, S7;
double DL0, DL, DD, DGAM, DLS, DF;
double L0, L, LS, F, D;
-double ARG = 0.0, FAC = 0.0;
-int MAX = 0, i, j;
+double ARG, FAC;
+int MAX, i, j;
double S;
@@ -278,7 +274,7 @@ double frac(double x){
-void addsol(double COEFFL, double COEFFS, double COEFFG, double COEFFP, int P, int Q, int R, int S){
+addsol(double COEFFL, double COEFFS, double COEFFG, double COEFFP, int P, int Q, int R, int S){
double X, Y;
@@ -293,7 +289,7 @@ void addsol(double COEFFL, double COEFFS, double COEFFG, double COEFFP, int P, i
-void term(int P, int Q, int R, int S, double *X, double *Y){
+term(int P, int Q, int R, int S, double *X, double *Y){
double XX, YY;
int k, I[5];
@@ -311,7 +307,7 @@ void term(int P, int Q, int R, int S, double *X, double *Y){
-void addthe(double C1, double S1, double C2, double S2, double *C, double *S){
+addthe(double C1, double S1, double C2, double S2, double *C, double *S){
*C = C1*C2 - S1*S2;
*S = S1*C2 + C1*S2;
@@ -320,7 +316,7 @@ void addthe(double C1, double S1, double C2, double S2, double *C, double *S){
}
-void addn(double COEFFN, int P, int Q, int R, int S){
+addn(double COEFFN, int P, int Q, int R, int S){
double X, Y;
@@ -385,7 +381,7 @@ double NewMoon(double ax, double bx, double cx){
* DEC: declination (in deg; equinox of date)
*
*/
-void MiniMoon(double T, double *RA, double *DEC){
+MiniMoon(double T, double *RA, double *DEC){
double L0,L,LS,F,D,H,S,N,DL,CB,L_MOON,B_MOON,V,W,X,Y,Z,RHO;
double frac(), cosEPS, sinEPS, P2, ARC;
@@ -428,6 +424,7 @@ void MiniMoon(double T, double *RA, double *DEC){
*RA = ( 48.0/P2)*atan2(Y, X+RHO);
if (*RA<0.0) *RA += 24.0;
+ return(0);
}
diff --git a/Src/Moon.h b/Src/Moon.h
deleted file mode 100644
index e8616dc..0000000
--- a/Src/Moon.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef MOON_H
-#define MOON_H
-
-void MiniMoon(double, double*, double*);
-
-#endif
diff --git a/Src/MoonRise.c b/Src/MoonRise.c
index 2869b2d..d079f8d 100644
--- a/Src/MoonRise.c
+++ b/Src/MoonRise.c
@@ -1,7 +1,5 @@
#include <stdio.h>
#include <math.h>
-#include "MoonRise.h"
-#include "Moon.h"
#define DegPerRad 57.29577951308232087680
#define RadPerDeg 0.01745329251994329576
@@ -9,7 +7,7 @@
extern double Glon, SinGlat, CosGlat, TimeZone;
-void MoonRise(int year, int month, int day, double LocalHour, double *UTRise, double *UTSet){
+MoonRise(int year, int month, int day, double LocalHour, double *UTRise, double *UTSet){
double UT, ym, y0, yp, SinH0;
double xe, ye, z1, z2, SinH(), hour24();
@@ -78,7 +76,7 @@ void MoonRise(int year, int month, int day, double LocalHour, double *UTRise, do
}
-void UTTohhmm(double UT, int *h, int *m){
+UTTohhmm(double UT, int *h, int *m){
if (UT < 0.0) {
@@ -87,14 +85,6 @@ void UTTohhmm(double UT, int *h, int *m){
} else {
*h = (int)UT;
*m = (int)((UT-(double)(*h))*60.0+0.5);
- if (*m == 60) {
- /*
- * If it was 23:60 this should become 24:00
- * I prefer this designation to 00:00. So dont reset h to 0 when it goes above 24.
- */
- *h += 1;
- *m = 0;
- }
}
}
@@ -104,7 +94,7 @@ void UTTohhmm(double UT, int *h, int *m){
-void Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1, double *z2, int *nz){
+Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1, double *z2, int *nz){
double a, b, c, d, dx;
@@ -125,6 +115,7 @@ void Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1,
if (*z1 < -1.0) *z1 = *z2;
}
+ return(0);
}
@@ -134,8 +125,8 @@ void Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1,
double SinH(int year, int month, int day, double UT){
- double TU, frac(), jd();
- double RA_Moon, DEC_Moon, gmst, lmst, Tau, Moon();
+ double TU, TU2, TU3, LambdaMoon, BetaMoon, R, AGE, frac(), jd();
+ double RA_Moon, DEC_Moon, T0, gmst, lmst, Tau, epsilon, Moon();
double angle2pi();
TU = (jd(year, month, day, UT) - 2451545.0)/36525.0;
diff --git a/Src/MoonRise.h b/Src/MoonRise.h
deleted file mode 100644
index d263d2e..0000000
--- a/Src/MoonRise.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef MOONRISE_H
-#define MOONRISE_H
-
-void MoonRise(int, int, int, double, double*, double*);
-void UTTohhmm(double, int*, int*);
-void Interp(double, double, double, double*, double*, double*, double*, int*);
-
-#endif
diff --git a/Src/wmMoonClock.c b/Src/wmMoonClock.c
index 73bb12d..7fe749e 100644
--- a/Src/wmMoonClock.c
+++ b/Src/wmMoonClock.c
@@ -112,7 +112,6 @@
#include <X11/X.h>
#include <X11/xpm.h>
#include "CalcEphem.h"
-#include "MoonRise.h"
#include "xutils.h"
#include "wmMoonClock_master.xpm"
#include "wmMoonClock_masterLow.xpm"
@@ -123,7 +122,7 @@
/*
* Delay between refreshes (in microseconds)
*/
-#define DELAY 1000000L
+#define DELAY 10000L
#define WMMOONCLOCK_VERSION "1.27"
@@ -160,13 +159,14 @@ int main(int argc, char *argv[]) {
struct tm *GMTTime, *LocalTime;
XEvent event;
- int i, n, j, ImageNumber, Year, Month, DayOfMonth, digit;
+ int i, n, k, j, ImageNumber;
+ int Year, Month, DayOfWeek, DayOfMonth;
+ int Hours, Mins, Secs, OldSecs, digit, xoff, xsize;
long CurrentLocalTime, CurrentGMTTime, date;
double UT, val, RA, DEC, UTRise, UTSet, LocalHour, hour24();
int D, H, M, S, sgn, A, B, q;
+ char str[10];
CTrans c;
- struct timeval timeout;
- fd_set xfdset;
@@ -251,11 +251,11 @@ int main(int argc, char *argv[]) {
} else if (ToggleWindow == 1){
/*
- * Update Numerical Display
+ * Update Numerical Display
*/
- /* This requires second precision for LT and UT */
- nMAX = 0;
+
+ nMAX = 500;
/*
@@ -371,7 +371,7 @@ int main(int argc, char *argv[]) {
*/
- nMAX = 60;
+ nMAX = 500;
/*
* Clear plotting area
@@ -478,7 +478,7 @@ int main(int argc, char *argv[]) {
- nMAX = 3;
+ nMAX = 500;
/*
* Clear plotting area
@@ -580,7 +580,7 @@ int main(int argc, char *argv[]) {
- nMAX = 3;
+ nMAX = 500;
/*
* Clear plotting area
@@ -705,11 +705,6 @@ int main(int argc, char *argv[]) {
- /*
- * Add X display to file descriptor set for polling.
- */
- FD_ZERO(&xfdset);
- FD_SET(ConnectionNumber(display), &xfdset);
@@ -739,9 +734,7 @@ int main(int argc, char *argv[]) {
* Redraw and wait for next update
*/
RedrawWindow();
- timeout.tv_sec = DELAY / 1000000L;
- timeout.tv_usec = DELAY % 1000000L;
- select(ConnectionNumber(display) + 1, &xfdset, NULL, NULL, &timeout);
+ usleep(DELAY);
}
diff --git a/debian/changelog b/debian/changelog
index 1f5bfd3..ea4cf7f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,24 @@
+wmmoonclock (1.27-28) unstable; urgency=low
+
+ * Add southern hemisphere support (Closes: #537480).
+ Thanks to Alvaro Steiger.
+ * Bump standards version to 3.8.2.0
+ * Add quilt patch system.
+ * Add patches:
+ + 01_all_previous_diff.diff
+ + 02_update_time.diff
+ + 03_add_southern_hemisphere_support.diff
+ + 04_fix_hyphen_used_as_minus_sign.diff
+ * Add debhelper 7 build depends.
+ * Add debian/compat file.
+ * Remove trailing whitespaces in changelog.upstream.
+ * Add an empty watch file (no upstream repository).
+ * Improve rules file by using more debhelper commands.
+ * Remove Martin A. Godisch from uploaders field
+ Thanks to him to have sponsored wmmoonclock.
+
+ -- Denis Briand <denis at narcan.fr> Sun, 26 Jul 2009 10:30:00 +0200
+
wmmoonclock (1.27-27) unstable; urgency=low
* Add co-maintainer Martin A. Godisch.
diff --git a/debian/changelog.upstream b/debian/changelog.upstream
index 68640c8..6eebb7b 100644
--- a/debian/changelog.upstream
+++ b/debian/changelog.upstream
@@ -1,12 +1,12 @@
/*
*
* wmMoonClock-1.26 (C) 1998, 1999 Mike Henderson (mghenderson at lanl.gov)
- *
+ *
* - Shows Moon Phase....
- *
- *
- *
- *
+ *
+ *
+ *
+ *
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,11 +20,11 @@
*
* You should have received a copy of the GNU General Public License
* along with this program (see the file COPYING); if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA
*
* Things TODO:
- * - clean up code!
+ * - clean up code!
* - more detailed documentation.
* - reduce size of pixmap! Dont need it in one pixmap.
* Aslo, does the hi-color pixmap really need all those colors?
@@ -34,8 +34,8 @@
* as costly as the Moon calcs.) Sun posiiton is calculated but not used yet...
* - Next new moons, next full moons, next quarters, etc...
* - Moon names. I.e. Harvest, Blue, etc...
- *
- *
+ *
+ *
*
* Changes:
* Version 1.27 - released June 7, 1999.
@@ -50,41 +50,41 @@
*
* Added 3 command line options + code to change colors of the data
* entries:
- *
- * -bc <Color> to change background color.
- * -lc <Color> to change color of labels and headers.
+ *
+ * -bc <Color> to change background color.
+ * -lc <Color> to change color of labels and headers.
* -dc <Color> to change color of data values.
- *
+ *
* Version 1.24 - released February 9, 1999.
* Added low color support via the -low command line option.
- *
+ *
* Version 1.23 - released February 4, 1999.
* cosmetic for AfterStep users. removed spurious black line at RHS edge an mask.
*
- * Version 1.22 - released January 8, 1999.
+ * Version 1.22 - released January 8, 1999.
*
* + Changed PI2 to TwoPi in Moon.c -- Linux Pyth. had probs because
* PI2 was defined in <math.h>.
*
- * Version 1.21 - released January 7, 1999.
- *
+ * Version 1.21 - released January 7, 1999.
+ *
* + minor bug fixes in Makefile and manpage.
*
- * Version 1.2 - released January 3, 1999.
+ * Version 1.2 - released January 3, 1999.
* Added:
*
* + Local Time/ Universal Time display.
* + Visible: Yes/No to indicate if Moon is up or not.
* + Frac (percent through orbit -- this is NOT a simple
* conversion of AGE....).
- * + Horizon Coords. Altitude is measured up from horizon to
+ * + Horizon Coords. Altitude is measured up from horizon to
* Moon in degrees. Azimuth is in degrees from due south.
*
* Also shuffled things around a bit...
*
*
*
- * Version 1.1 - released December 24, 1998.
+ * Version 1.1 - released December 24, 1998.
* Fixed bug in AGE calculation. It now should be highly accurate.
* Note that AGE is not the same as Phase*29.530589 ...
* I have checked with the Astronomical Almanac and it agrees very
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
index 0884362..bb2fbeb 100644
--- a/debian/control
+++ b/debian/control
@@ -2,9 +2,8 @@ Source: wmmoonclock
Section: x11
Priority: optional
Maintainer: Denis Briand <denis at narcan.fr>
-Uploaders: Martin A. Godisch <godisch at debian.org>
-Build-Depends: libx11-dev, libxext-dev, libxpm-dev
-Standards-Version: 3.8.1
+Build-Depends: debhelper (>= 7), libx11-dev, libxext-dev, libxpm-dev, quilt (>= 0.46-7~)
+Standards-Version: 3.8.2.0
Package: wmmoonclock
Architecture: any
diff --git a/debian/patches/01_all_previous_diff.diff b/debian/patches/01_all_previous_diff.diff
new file mode 100644
index 0000000..e477e23
--- /dev/null
+++ b/debian/patches/01_all_previous_diff.diff
@@ -0,0 +1,335 @@
+All previous diff before I maintain it.
+==================================================================================
+diff -urN wmmoonclock-1.27.orig/Src/CalcEphem.c wmmoonclock-1.27.new/Src/CalcEphem.c
+--- wmmoonclock-1.27.orig/Src/CalcEphem.c 1999-06-07 16:16:04.000000000 +0200
++++ wmmoonclock-1.27.new/Src/CalcEphem.c 2009-07-25 22:56:29.000000000 +0200
+@@ -1,13 +1,12 @@
++#include <string.h>
+ #include "CalcEphem.h"
+
+
+-CalcEphem(date, UT, c)
++void CalcEphem(date, UT, c)
+ long int date; /* integer containing the date (e.g. 960829) */
+ double UT; /* Universal Time */
+ CTrans *c; /* structure containing all the relevent coord trans info */
+ {
+-double vv;
+-int dd, mm, ss;
+
+ int year, month, day;
+ double TU, TU2, TU3, T0, gmst;
+@@ -16,12 +15,7 @@
+ double days, M, E, nu, lambnew;
+ double r0, earth_sun_distance;
+ double RA, DEC, RA_Moon, DEC_Moon;
+- double dt, g0_1, g1_1, h1_1, gclat, glon, psi;
+- double TDT, Lmoon_0, P0, N0, Imoon, Lmoon, Mmoon_m, Nmoon, Cmoon;
+- double Emoon_nu, Amoon_e, Amoon_3, Mmoon_mp, Emoon_c, amoon, emoon, AGE;
+- double Amoon_4, Lmoon_p, Vmoon, Lmoon_pp, Nmoon_p, LambdaMoon, BetaMoon, R;
+- Vector S, K, Y, Z, D, Dgei, Dgsm;
+- int i, j;
++ double TDT, AGE, LambdaMoon, BetaMoon, R;
+ double jd(), hour24(), angle2pi(), angle360(), kepler(), Moon(), NewMoon();
+ double Ta, Tb, Tc, frac();
+ double SinGlat, CosGlat, SinGlon, CosGlon, Tau, lmst, x, y, z;
+@@ -237,7 +231,7 @@
+ char dowstr[];
+ {
+ double JD, A, Afrac, jd();
+- int n, iday, iA;
++ int n, iA;
+
+ JD = jd(year, month, day, 0.0);
+ A = (JD + 1.5)/7.0;
+@@ -282,7 +276,7 @@
+ int ny, nm, nd;
+ double UT;
+ {
+- double A, B, C, D, JD, MJD, day;
++ double A, B, C, D, JD, day;
+
+ day = nd + UT/24.0;
+
+@@ -372,7 +366,7 @@
+ }
+
+
+-Radec_to_Cart(ra, dec, r)
++void Radec_to_Cart(ra, dec, r)
+ double ra, dec; /* RA and DEC */
+ Vector *r; /* returns corresponding cartesian unit vector */
+ {
+diff -urN wmmoonclock-1.27.orig/Src/CalcEphem.h wmmoonclock-1.27.new/Src/CalcEphem.h
+--- wmmoonclock-1.27.orig/Src/CalcEphem.h 1998-12-31 19:25:16.000000000 +0100
++++ wmmoonclock-1.27.new/Src/CalcEphem.h 2009-07-25 22:56:29.000000000 +0200
+@@ -54,4 +54,7 @@
+ int Visible; /* Wether or not moon is above horizon */
+ } CTrans;
+
++void CalcEphem(long int, double, CTrans*);
++int DayofWeek(int, int, int, char*);
++int DayofYear(int, int, int);
+
+diff -urN wmmoonclock-1.27.orig/Src/Makefile wmmoonclock-1.27.new/Src/Makefile
+--- wmmoonclock-1.27.orig/Src/Makefile 1999-03-23 03:20:32.000000000 +0100
++++ wmmoonclock-1.27.new/Src/Makefile 2009-07-25 22:56:29.000000000 +0200
+@@ -1,5 +1,5 @@
+ CC = gcc
+-CFLAGS = -O2
++# CFLAGS = -O2
+ INCDIR = -I/usr/X11R6/include/X11
+ DESTDIR= /usr/X11R6
+ LIBDIR = -L/usr/X11R6/lib
+@@ -22,7 +22,7 @@
+
+ wmMoonClock.o: wmMoonClock_master.xpm wmMoonClock_mask.xbm CalcEphem.h
+ wmMoonClock: $(OBJS)
+- $(CC) $(COPTS) $(SYSTEM) -lm -o wmMoonClock $^ $(INCDIR) $(LIBDIR) $(LIBS)
++ $(CC) $(CFLAGS) $(SYSTEM) -lm -o wmMoonClock $^ $(INCDIR) $(LIBDIR) $(LIBS)
+
+ clean:
+ for i in $(OBJS) ; do \
+@@ -31,6 +31,7 @@
+ rm -f wmMoonClock
+
+ install:: wmMoonClock
+- install -s -m 0755 wmMoonClock $(DESTDIR)/bin
+- install -m 0644 wmMoonClock.1 $(DESTDIR)/man/man1
++ install -d -m 0755 $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1
++ install -m 0755 wmMoonClock $(DESTDIR)/usr/bin
++ install -m 0644 wmMoonClock.1 $(DESTDIR)/usr/share/man/man1
+
+diff -urN wmmoonclock-1.27.orig/Src/Moon.c wmmoonclock-1.27.new/Src/Moon.c
+--- wmmoonclock-1.27.orig/Src/Moon.c 1999-01-09 04:08:26.000000000 +0100
++++ wmmoonclock-1.27.new/Src/Moon.c 2009-07-25 22:56:29.000000000 +0200
+@@ -8,6 +8,10 @@
+
+ double angle360();
+
++void addthe(double, double, double, double, double*, double*);
++void addsol(double, double, double, double, int, int, int, int);
++void addn(double, int, int, int, int);
++void term(int, int, int, int, double*, double*);
+
+ double TwoPi = 6.283185308;
+ double ARC = 206264.81;
+@@ -25,8 +29,8 @@
+ double S1, S2, S3, S4, S5, S6, S7;
+ double DL0, DL, DD, DGAM, DLS, DF;
+ double L0, L, LS, F, D;
+-double ARG, FAC;
+-int MAX, i, j;
++double ARG = 0.0, FAC = 0.0;
++int MAX = 0, i, j;
+ double S;
+
+
+@@ -274,7 +278,7 @@
+
+
+
+-addsol(double COEFFL, double COEFFS, double COEFFG, double COEFFP, int P, int Q, int R, int S){
++void addsol(double COEFFL, double COEFFS, double COEFFG, double COEFFP, int P, int Q, int R, int S){
+
+ double X, Y;
+
+@@ -289,7 +293,7 @@
+
+
+
+-term(int P, int Q, int R, int S, double *X, double *Y){
++void term(int P, int Q, int R, int S, double *X, double *Y){
+
+ double XX, YY;
+ int k, I[5];
+@@ -307,7 +311,7 @@
+
+
+
+-addthe(double C1, double S1, double C2, double S2, double *C, double *S){
++void addthe(double C1, double S1, double C2, double S2, double *C, double *S){
+
+ *C = C1*C2 - S1*S2;
+ *S = S1*C2 + C1*S2;
+@@ -316,7 +320,7 @@
+ }
+
+
+-addn(double COEFFN, int P, int Q, int R, int S){
++void addn(double COEFFN, int P, int Q, int R, int S){
+
+ double X, Y;
+
+@@ -381,7 +385,7 @@
+ * DEC: declination (in deg; equinox of date)
+ *
+ */
+-MiniMoon(double T, double *RA, double *DEC){
++void MiniMoon(double T, double *RA, double *DEC){
+
+ double L0,L,LS,F,D,H,S,N,DL,CB,L_MOON,B_MOON,V,W,X,Y,Z,RHO;
+ double frac(), cosEPS, sinEPS, P2, ARC;
+@@ -424,7 +428,6 @@
+ *RA = ( 48.0/P2)*atan2(Y, X+RHO);
+ if (*RA<0.0) *RA += 24.0;
+
+- return(0);
+
+
+ }
+diff -urN wmmoonclock-1.27.orig/Src/Moon.h wmmoonclock-1.27.new/Src/Moon.h
+--- wmmoonclock-1.27.orig/Src/Moon.h 1970-01-01 01:00:00.000000000 +0100
++++ wmmoonclock-1.27.new/Src/Moon.h 2009-07-25 22:56:29.000000000 +0200
+@@ -0,0 +1,6 @@
++#ifndef MOON_H
++#define MOON_H
++
++void MiniMoon(double, double*, double*);
++
++#endif
+diff -urN wmmoonclock-1.27.orig/Src/MoonRise.c wmmoonclock-1.27.new/Src/MoonRise.c
+--- wmmoonclock-1.27.orig/Src/MoonRise.c 1998-12-31 19:54:48.000000000 +0100
++++ wmmoonclock-1.27.new/Src/MoonRise.c 2009-07-25 22:56:29.000000000 +0200
+@@ -1,5 +1,7 @@
+ #include <stdio.h>
+ #include <math.h>
++#include "MoonRise.h"
++#include "Moon.h"
+
+ #define DegPerRad 57.29577951308232087680
+ #define RadPerDeg 0.01745329251994329576
+@@ -7,7 +9,7 @@
+ extern double Glon, SinGlat, CosGlat, TimeZone;
+
+
+-MoonRise(int year, int month, int day, double LocalHour, double *UTRise, double *UTSet){
++void MoonRise(int year, int month, int day, double LocalHour, double *UTRise, double *UTSet){
+
+ double UT, ym, y0, yp, SinH0;
+ double xe, ye, z1, z2, SinH(), hour24();
+@@ -76,7 +78,7 @@
+ }
+
+
+-UTTohhmm(double UT, int *h, int *m){
++void UTTohhmm(double UT, int *h, int *m){
+
+
+ if (UT < 0.0) {
+@@ -85,6 +87,14 @@
+ } else {
+ *h = (int)UT;
+ *m = (int)((UT-(double)(*h))*60.0+0.5);
++ if (*m == 60) {
++ /*
++ * If it was 23:60 this should become 24:00
++ * I prefer this designation to 00:00. So dont reset h to 0 when it goes above 24.
++ */
++ *h += 1;
++ *m = 0;
++ }
+ }
+
+ }
+@@ -94,7 +104,7 @@
+
+
+
+-Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1, double *z2, int *nz){
++void Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1, double *z2, int *nz){
+
+ double a, b, c, d, dx;
+
+@@ -115,7 +125,6 @@
+ if (*z1 < -1.0) *z1 = *z2;
+ }
+
+- return(0);
+
+
+ }
+@@ -125,8 +134,8 @@
+
+ double SinH(int year, int month, int day, double UT){
+
+- double TU, TU2, TU3, LambdaMoon, BetaMoon, R, AGE, frac(), jd();
+- double RA_Moon, DEC_Moon, T0, gmst, lmst, Tau, epsilon, Moon();
++ double TU, frac(), jd();
++ double RA_Moon, DEC_Moon, gmst, lmst, Tau, Moon();
+ double angle2pi();
+
+ TU = (jd(year, month, day, UT) - 2451545.0)/36525.0;
+diff -urN wmmoonclock-1.27.orig/Src/MoonRise.h wmmoonclock-1.27.new/Src/MoonRise.h
+--- wmmoonclock-1.27.orig/Src/MoonRise.h 1970-01-01 01:00:00.000000000 +0100
++++ wmmoonclock-1.27.new/Src/MoonRise.h 2009-07-25 22:56:29.000000000 +0200
+@@ -0,0 +1,8 @@
++#ifndef MOONRISE_H
++#define MOONRISE_H
++
++void MoonRise(int, int, int, double, double*, double*);
++void UTTohhmm(double, int*, int*);
++void Interp(double, double, double, double*, double*, double*, double*, int*);
++
++#endif
+diff -urN wmmoonclock-1.27.orig/Src/wmMoonClock.c wmmoonclock-1.27.new/Src/wmMoonClock.c
+--- wmmoonclock-1.27.orig/Src/wmMoonClock.c 1999-06-07 16:27:18.000000000 +0200
++++ wmmoonclock-1.27.new/Src/wmMoonClock.c 2009-07-25 23:26:31.000000000 +0200
+@@ -112,6 +112,7 @@
+ #include <X11/X.h>
+ #include <X11/xpm.h>
+ #include "CalcEphem.h"
++#include "MoonRise.h"
+ #include "xutils.h"
+ #include "wmMoonClock_master.xpm"
+ #include "wmMoonClock_masterLow.xpm"
+@@ -122,7 +123,7 @@
+ /*
+ * Delay between refreshes (in microseconds)
+ */
+-#define DELAY 10000L
++#define DELAY 1000000L
+ #define WMMOONCLOCK_VERSION "1.27"
+
+
+@@ -159,14 +160,13 @@
+
+ struct tm *GMTTime, *LocalTime;
+ XEvent event;
+- int i, n, k, j, ImageNumber;
+- int Year, Month, DayOfWeek, DayOfMonth;
+- int Hours, Mins, Secs, OldSecs, digit, xoff, xsize;
++ int i, n, j, ImageNumber, Year, Month, DayOfMonth, digit;
+ long CurrentLocalTime, CurrentGMTTime, date;
+ double UT, val, RA, DEC, UTRise, UTSet, LocalHour, hour24();
+ int D, H, M, S, sgn, A, B, q;
+- char str[10];
+ CTrans c;
++ struct timeval timeout;
++ fd_set xfdset;
+
+
+
+@@ -705,6 +705,11 @@
+
+
+
++ /*
++ * Add X display to file descriptor set for polling.
++ */
++ FD_ZERO(&xfdset);
++ FD_SET(ConnectionNumber(display), &xfdset);
+
+
+
+@@ -734,7 +739,9 @@
+ * Redraw and wait for next update
+ */
+ RedrawWindow();
+- usleep(DELAY);
++ timeout.tv_sec = DELAY / 1000000L;
++ timeout.tv_usec = DELAY % 1000000L;
++ select(ConnectionNumber(display) + 1, &xfdset, NULL, NULL, &timeout);
+
+
+ }
diff --git a/debian/patches/02_update_time.diff b/debian/patches/02_update_time.diff
new file mode 100644
index 0000000..0903e2f
--- /dev/null
+++ b/debian/patches/02_update_time.diff
@@ -0,0 +1,47 @@
+Modify nMax values to sensible values for the new delay timer (Closes: #479229).
+Author: Joerg Dietrich <joerg at dietrich.net>
+==================================================================
+--- wmmoonclock-1.27.orig/Src/wmMoonClock.c 2009-03-20 16:20:17.956636905 +0100
++++ wmmoonclock-1.27/Src/wmMoonClock.c 2009-03-20 16:35:25.361195797 +0100
+@@ -251,11 +251,11 @@
+ } else if (ToggleWindow == 1){
+
+ /*
+- * Update Numerical Display
++ * Update Numerical Display
+ */
+
+-
+- nMAX = 500;
++ /* This requires second precision for LT and UT */
++ nMAX = 0;
+
+
+ /*
+@@ -371,7 +371,7 @@
+ */
+
+
+- nMAX = 500;
++ nMAX = 60;
+
+ /*
+ * Clear plotting area
+@@ -478,7 +478,7 @@
+
+
+
+- nMAX = 500;
++ nMAX = 3;
+
+ /*
+ * Clear plotting area
+@@ -580,7 +580,7 @@
+
+
+
+- nMAX = 500;
++ nMAX = 3;
+
+ /*
+ * Clear plotting area
diff --git a/debian/patches/03_add_southern_hemisphere_support.diff b/debian/patches/03_add_southern_hemisphere_support.diff
new file mode 100644
index 0000000..362155a
--- /dev/null
+++ b/debian/patches/03_add_southern_hemisphere_support.diff
@@ -0,0 +1,14 @@
+add southern hemisphere support (Closes: #537480).
+Author: Alvaro Steiger <alvaro.steiger at gmail.com>
+Index: wmmoonclock-1.27/Src/wmMoonClock.c
+===================================================================
+--- wmmoonclock-1.27.orig/Src/wmMoonClock.c 2009-07-18 23:26:03.000000000 +0200
++++ wmmoonclock-1.27/Src/wmMoonClock.c 2009-07-18 23:30:36.000000000 +0200
+@@ -244,6 +244,7 @@
+ nMAX = 1000;
+ ImageNumber = (int)(c.MoonPhase * 60.0 + 0.5);
+ if (ImageNumber > 59) ImageNumber = 0;
++ if (Glat < 0) ImageNumber = 59 - ImageNumber; /* add southern hemisphere support, closes: #537480 */
+ j = ImageNumber/10;
+ i = ImageNumber%10;
+ copyXPMArea(67+58*i, 2+58*j, 54, 54, 5, 5);
diff --git a/debian/patches/04_fix_hyphen_used_as_minus_sign.diff b/debian/patches/04_fix_hyphen_used_as_minus_sign.diff
new file mode 100644
index 0000000..c93e7d9
--- /dev/null
+++ b/debian/patches/04_fix_hyphen_used_as_minus_sign.diff
@@ -0,0 +1,55 @@
+fix_hyphen_used_as_minus_sign in man file
+Index: wmmoonclock-1.27/Src/wmMoonClock.1
+===================================================================
+--- wmmoonclock-1.27.orig/Src/wmMoonClock.1 2009-07-26 00:22:55.000000000 +0200
++++ wmmoonclock-1.27/Src/wmMoonClock.1 2009-07-26 00:24:24.000000000 +0200
+@@ -3,11 +3,11 @@
+ WMMOONCLOCK \- Dockable Moon Phase Clock
+ .SH SYNOPSIS
+ .B wmMoonClock
+-[-display <Display>] [-bc <Color>] [-lc <Color>] [-dc <Color>] [-low] [-lat <Latitude>] [-lon <Longitude>] [-h]
++[\-display <Display>] [\-bc <Color>] [\-lc <Color>] [\-dc <Color>] [\-low] [\-lat <Latitude>] [\-lon <Longitude>] [\-h]
+ .SH DESCRIPTION
+ .PP
+ wmMoonClock displays the current phase of the moon. Clicking on the icon
+-brings up different displays -- there are 5 in all. The different "pages"
++brings up different displays \-\- there are 5 in all. The different "pages"
+ are;
+
+ .TP
+@@ -25,8 +25,8 @@
+ .B Third Page
+ Shows the Rise and Set times for yesterday (first line), today (middle line), and
+ tommorrow (last line). If the Moon does not rise or set on a given day a `null
+-time' is shown (--:--). Note that these times should still be good for high
+-latitude observers. Also note that there will always be at least one (--:--)
++time' is shown (\-\-:\-\-). Note that these times should still be good for high
++latitude observers. Also note that there will always be at least one (\-\-:\-\-)
+ showing up per month. This is because once per month the Moon will rise (set) on
+ a given day but will set (rise) in the very early portion of the next day.
+ .TP
+@@ -58,19 +58,19 @@
+ Set color of data values.
+ .TP
+ .B \-low
+-Conserve colors. For 8-bit displays, a lower-color pixmap will be used automatically,
+-but you can also force its use on higher-color displays if necessary.
++Conserve colors. For 8\-bit displays, a lower\-color pixmap will be used automatically,
++but you can also force its use on higher\-color displays if necessary.
+ .TP
+-.B -lat <Latitude>
++.B \-lat <Latitude>
+ Observers Latitude in degrees. Positive in northern hemisphere, negative in southern hemisphere.
+ .TP
+-.B -lon <Longitude>
++.B \-lon <Longitude>
+ Observers Longitude in degrees. Greenwich is 0.0, and longitude increases positively
+ toward the west. (Alternatively, negative numbers can also be used to specify
+ longitudes to the east of Greenwich).
+ .TP
+ .B \-h
+-Display list of command-line options.
++Display list of command\-line options.
+ .SH BUGS
+ Who knows? (Let me know if you find any).
+ .SH AUTHOR
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..af40f79
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+01_all_previous_diff.diff
+02_update_time.diff
+03_add_southern_hemisphere_support.diff
+04_fix_hyphen_used_as_minus_sign.diff
diff --git a/debian/rules b/debian/rules
index c3dcac3..202a879 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,10 +1,10 @@
#!/usr/bin/make -f
+#export DH_VERBOSE=1
+
BUILDDIR = debian/wmmoonclock
DEBDIR = $(BUILDDIR)/DEBIAN
DOCDIR = $(BUILDDIR)/usr/share/doc/wmmoonclock
-testdir = test -f Src/wmMoonClock.c && test -f debian/rules
-testroot = test x`whoami` = xroot
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -14,14 +14,24 @@ else
endif
export CFLAGS
-clean:
- $(testdir)
+clean: unpatch
+ dh_testdir
-rm -f build debian/files debian/substvars
[ ! -f Src/Makefile ] || $(MAKE) -C Src clean
-rm -rf debian/wmmoonclock
+ dh_clean
+
+patch: patch-stamp
+
+patch-stamp:
+ dh_quilt_patch
+ touch patch-stamp
+
+unpatch:
+ dh_quilt_unpatch
-build:
- $(testdir)
+build: patch
+ dh_testdir
$(MAKE) -C Src
touch build
@@ -30,8 +40,8 @@ binary: binary-arch
binary-indep:
binary-arch: build
- $(testdir)
- $(testroot)
+ dh_testdir
+ dh_testroot
rm -rf debian/wmmoonclock
$(MAKE) -C Src install DESTDIR=$(CURDIR)/debian/wmmoonclock
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..3fe8e92
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1 @@
+#there is no upstream repository
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmmoonclock.git
More information about the Pkg-wmaker-commits
mailing list