aboutsummaryrefslogtreecommitdiff
path: root/astro/wmspaceweather
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-04-04 19:57:17 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-04-04 19:57:17 +0000
commit2d18d289ba6422d8513a8a03dc1d0e9a3842cd8a (patch)
tree3ca78c78bb631be7ff7e61d8ff264a1ba7afaef2 /astro/wmspaceweather
parent4fd88cb84d65d53ed2a32af7f54101aab718e4ca (diff)
downloadports-2d18d289ba6422d8513a8a03dc1d0e9a3842cd8a.tar.gz
ports-2d18d289ba6422d8513a8a03dc1d0e9a3842cd8a.zip
Support stage
Regenerate patches with a proper name Fix shebang
Notes
Notes: svn path=/head/; revision=350161
Diffstat (limited to 'astro/wmspaceweather')
-rw-r--r--astro/wmspaceweather/Makefile10
-rw-r--r--astro/wmspaceweather/files/patch-GetKp29
-rw-r--r--astro/wmspaceweather/files/patch-Makefile43
-rw-r--r--astro/wmspaceweather/files/patch-wmSpaceWeather.c20
4 files changed, 87 insertions, 15 deletions
diff --git a/astro/wmspaceweather/Makefile b/astro/wmspaceweather/Makefile
index a81dc9e9f684..483559703a76 100644
--- a/astro/wmspaceweather/Makefile
+++ b/astro/wmspaceweather/Makefile
@@ -3,7 +3,7 @@
PORTNAME= wmspaceweather
PORTVERSION= 1.04
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= astro windowmaker
MASTER_SITES= https://api.opensuse.org/public/source/openSUSE:Factory/WindowMaker-applets/ \
ftp://ftp.canadatux.org/linux/windowmaker/
@@ -18,13 +18,13 @@ RUN_DEPENDS= p5-Time-modules>=0:${PORTSDIR}/devel/p5-Time-modules
WRKSRC= ${WRKDIR}/${DISTNAME}/wmSpaceWeather
-NO_STAGE= yes
+USES= shebangfix
+SHEBANG_FILES= GetKp
USE_XORG= x11 xext xpm
ALL_TARGET= clean all
MAKE_JOBS_UNSAFE= yes
-MAN1= wmSpaceWeather.1
-
-PLIST_FILES= bin/GetKp bin/wmSpaceWeather
+PLIST_FILES= bin/GetKp bin/wmSpaceWeather \
+ man/man1/wmSpaceWeather.1.gz
.include <bsd.port.mk>
diff --git a/astro/wmspaceweather/files/patch-GetKp b/astro/wmspaceweather/files/patch-GetKp
new file mode 100644
index 000000000000..55c2633e1c05
--- /dev/null
+++ b/astro/wmspaceweather/files/patch-GetKp
@@ -0,0 +1,29 @@
+--- ./GetKp.orig 1999-02-12 06:42:01.000000000 +0100
++++ ./GetKp 2014-04-04 21:55:15.059689500 +0200
+@@ -5,7 +5,7 @@
+ #
+
+
+- require "ctime.pl";
++ use Time::CTime;
+
+
+ ($Year, $Month, $Day) = &year_month_day();
+@@ -19,7 +19,7 @@
+ }
+
+
+- $grabcmd = "cd /tmp; wget --passive-ftp --tries 2 -q ftp://www.sec.noaa.gov/pub/indices/DGD.txt";
++ $grabcmd = "cd /tmp; fetch -q ftp://ftp.sec.noaa.gov/pub/indices/DGD.txt";
+ system "$grabcmd";
+
+
+@@ -68,7 +68,7 @@
+ #
+ # Add in very latest stuff
+ #
+- $grabcmd = "cd /tmp; wget --passive-ftp --tries 2 -q ftp://www.sec.noaa.gov/pub/latest/curind.txt";
++ $grabcmd = "cd /tmp; fetch -q ftp://ftp.sec.noaa.gov/pub/latest/curind.txt";
+ system "$grabcmd";
+ %lmonstr = ( "Jan", 1, "Feb", 2, "Mar", 3, "Apr", 4, "May", 5, "Jun", 6, "Jul", 7, "Aug", 8, "Sep", 9, "Oct", 10, "Nov", 11, "Dec", 12);
+
diff --git a/astro/wmspaceweather/files/patch-Makefile b/astro/wmspaceweather/files/patch-Makefile
new file mode 100644
index 000000000000..67dd3990d14d
--- /dev/null
+++ b/astro/wmspaceweather/files/patch-Makefile
@@ -0,0 +1,43 @@
+--- ./Makefile.orig 1999-01-04 22:20:45.000000000 +0100
++++ ./Makefile 2014-04-04 21:55:35.196529518 +0200
+@@ -1,8 +1,7 @@
+-CC = gcc
+-CFLAGS = -O2 -Wall
+-INCDIR = -I/usr/X11R6/include/X11
+-DESTDIR= /usr/X11R6
+-LIBDIR = -L/usr/X11R6/lib
++CC ?= gcc
++CFLAGS ?= -O2
++INCDIR = -I${LOCALBASE}/include
++LIBDIR = -L${LOCALBASE}/lib
+ # for linux
+ LIBS = -lXpm -lX11 -lXext
+ # for Solaris
+@@ -12,14 +11,14 @@
+
+
+ .c.o:
+- $(CC) $(COPTS) -D$(shell echo `uname -s`) -c $< -o $*.o $(INCDIR)
++ $(CC) $(CFLAGS) -D$(OPSYS) -c $< -o $@ $(INCDIR)
+
+
+ all: wmSpaceWeather.o wmSpaceWeather
+
+ wmSpaceWeather.o: wmSpaceWeather_master.xpm wmSpaceWeather_mask.xbm
+ wmSpaceWeather: $(OBJS)
+- $(CC) $(COPTS) $(SYSTEM) -o wmSpaceWeather $^ $(INCDIR) $(LIBDIR) $(LIBS)
++ $(CC) $(CFLAGS) $(SYSTEM) -o wmSpaceWeather $(OBJS) $(LIBDIR) $(LIBS)
+
+ clean:
+ for i in $(OBJS) ; do \
+@@ -28,7 +27,7 @@
+ rm -f wmSpaceWeather
+
+ install:: wmSpaceWeather
+- install -s -m 0755 wmSpaceWeather $(DESTDIR)/bin
+- install -m 0755 GetKp $(DESTDIR)/bin
+- install -m 0644 wmSpaceWeather.1 $(DESTDIR)/man/man1
++ ${BSD_INSTALL_PROGRAM} wmSpaceWeather $(DESTDIR)$(PREFIX)/bin
++ ${BSD_INSTALL_SCRIPT} GetKp $(DESTDIR)$(PREFIX)/bin
++ ${BSD_INSTALL_MAN} wmSpaceWeather.1 $(DESTDIR)$(PREFIX)/man/man1
+
diff --git a/astro/wmspaceweather/files/patch-wmSpaceWeather.c b/astro/wmspaceweather/files/patch-wmSpaceWeather.c
index 4fc2a583b30e..5834dac43ff8 100644
--- a/astro/wmspaceweather/files/patch-wmSpaceWeather.c
+++ b/astro/wmspaceweather/files/patch-wmSpaceWeather.c
@@ -1,6 +1,6 @@
---- wmSpaceWeather.c.orig Thu Feb 18 17:57:45 1999
-+++ wmSpaceWeather.c Tue Apr 13 20:06:41 2004
-@@ -115,7 +115,7 @@ XEvent event;
+--- ./wmSpaceWeather.c.orig 1999-02-18 18:57:45.000000000 +0100
++++ ./wmSpaceWeather.c 2014-04-04 21:55:15.061690087 +0200
+@@ -115,7 +115,7 @@
int i, n, s, k, m, dt1, dt2;
int Year, Month, Day, DayOfMonth, OldDayOfMonth;
int Hours, Mins, Secs, OldSecs, xoff, D[10], xsize;
@@ -9,7 +9,7 @@
int height, UpToDate, LEDOn;
double UT, TU, TU2, TU3, T0, gmst, hour24();
-@@ -126,6 +126,7 @@ int Kp[8] = { -1, -1, -1, -1, -1, -1,
+@@ -126,6 +126,7 @@
double E1, E2, P1, P2, P3;
char Xray[10], digit[2];
FILE *fp;
@@ -17,7 +17,7 @@
-@@ -249,13 +250,13 @@ FILE *fp;
+@@ -249,13 +250,13 @@
/*
@@ -33,7 +33,7 @@
dt2 = 0;
-@@ -272,13 +273,13 @@ FILE *fp;
+@@ -272,13 +273,13 @@
Secs = Time->tm_sec;
UT = (double)Hours + (double)Mins/60.0 + (double)Secs/3600.0;
CurrentJD = jd(Year, Month, Day, UT);
@@ -49,7 +49,7 @@
for (i=0; i<8; ++i){
fscanf(fp, "%ld %d", &TimeTag[i], &Kp[i]);
-@@ -289,7 +290,7 @@ FILE *fp;
+@@ -289,7 +290,7 @@
fscanf(fp, "%lf", &P3);
fscanf(fp, "%lf", &E1);
fscanf(fp, "%lf", &E2);
@@ -58,7 +58,7 @@
fclose(fp);
} else {
-@@ -318,7 +319,7 @@ FILE *fp;
+@@ -318,7 +319,7 @@
LatestAvailJD = jd(Year, Month, Day, UT);
DeltaT = (CurrentJD - LatestAvailJD)*24.0;
@@ -67,7 +67,7 @@
if (!UpToDate){
-@@ -560,7 +561,7 @@ void ParseCMDLine(int argc, char *argv[]
+@@ -560,7 +561,7 @@
} else if ((!strcmp(argv[i], "-url"))||(!strcmp(argv[i], "-u"))){
@@ -76,7 +76,7 @@
} else {
-@@ -651,7 +652,7 @@ void pressEvent(XButtonEvent *xev){
+@@ -651,7 +652,7 @@
if (GotDoubleClick1) {
GotFirstClick1 = 0;
GotDoubleClick1 = 0;