aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--astro/Makefile1
-rw-r--r--astro/pngphoon/Makefile24
-rw-r--r--astro/pngphoon/distinfo3
-rw-r--r--astro/pngphoon/files/patch-tws.c62
-rw-r--r--astro/pngphoon/pkg-descr16
5 files changed, 106 insertions, 0 deletions
diff --git a/astro/Makefile b/astro/Makefile
index 97b3e87b0c88..bfdef38934b6 100644
--- a/astro/Makefile
+++ b/astro/Makefile
@@ -78,6 +78,7 @@
SUBDIR += pal
SUBDIR += phd2
SUBDIR += phoon
+ SUBDIR += pngphoon
SUBDIR += pp3
SUBDIR += py-astlib
SUBDIR += py-astral
diff --git a/astro/pngphoon/Makefile b/astro/pngphoon/Makefile
new file mode 100644
index 000000000000..2a562534ae48
--- /dev/null
+++ b/astro/pngphoon/Makefile
@@ -0,0 +1,24 @@
+PORTNAME= pngphoon
+DISTVERSION= 1.3
+CATEGORIES= astro
+MASTER_SITES= https://svolli.de/software/pngphoon/
+
+COMMENT= PNG Phase of Moon
+MAINTAINER= fuz@FreeBSD.org
+WWW= https://svolli.de/software/pngphoon/
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+LIB_DEPENDS= libpng.so:graphics/png
+
+USES= gmake localbase:ldflags tar:bz2
+
+MAKE_ARGS= CC=${CC} CFLAGS="${CFLAGS}"
+
+PLIST_FILES= bin/pngphoon
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/pngphoon ${STAGEDIR}${PREFIX}/bin/pngphoon
+
+.include <bsd.port.mk>
diff --git a/astro/pngphoon/distinfo b/astro/pngphoon/distinfo
new file mode 100644
index 000000000000..8532d06226f7
--- /dev/null
+++ b/astro/pngphoon/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1703936409
+SHA256 (pngphoon-1.3.tar.bz2) = 86bd37d37d23da12aa38b239fa0b197d7a5052c6b96b82361716b54e152d3b23
+SIZE (pngphoon-1.3.tar.bz2) = 67264
diff --git a/astro/pngphoon/files/patch-tws.c b/astro/pngphoon/files/patch-tws.c
new file mode 100644
index 000000000000..cee02d90da4b
--- /dev/null
+++ b/astro/pngphoon/files/patch-tws.c
@@ -0,0 +1,62 @@
+--- tws.c.orig 2014-09-11 21:54:21 UTC
++++ tws.c
+@@ -30,16 +30,15 @@
+ #include <sys/types.h>
+ #include <time.h>
+ #include <stdlib.h>
+-#ifdef SYS5
++#if !defined(__FreeBSD__)
++# ifdef SYS5
+ extern int daylight;
+ extern long timezone;
+-#else /*SYS5*/
+-#include <sys/timeb.h>
+-#endif /*SYS5*/
++# else /*SYS5*/
++# include <sys/timeb.h>
++# endif /*SYS5*/
++#endif
+
+-extern long time();
+-struct tm* localtime();
+-
+ struct tws *dtwstime()
+ {
+ long clock = 0;
+@@ -59,12 +58,12 @@ struct tws* dlocaltime( long* clock )
+
+ struct tws* dlocaltime( long* clock )
+ {
+-register struct tm* tm;
+-#ifndef SYS5
++ register struct tm* tm;
++#if !defined(SYS5) && !defined(__FreeBSD__)
+ struct timeb tb;
+ #endif /*not SYS5*/
+ static struct tws tw;
+-
++
+ if ( clock == (long*) 0 )
+ return (struct tws*) 0;
+ tw.tw_flags = TW_NULL;
+@@ -80,13 +79,15 @@ register struct tm* tm;
+ tw.tw_yday = tm->tm_yday;
+ if ( tm->tm_isdst )
+ tw.tw_flags |= TW_DST;
+-#ifndef SYS5
+- ftime( &tb );
+- tw.tw_zone = -tb.timezone;
+-#else /*SYS5*/
++#ifdef __FreeBSD__
++ tw.tw_zone = tm->tm_gmtoff / 60;
++#elif defined(SYS5)
+ tzset();
+ tw.tw_zone = -( timezone / 60 );
+-#endif /*SYS5*/
++#else /*!SYS5&&!__FreeBSD__*/
++ ftime( &tb );
++ tw.tw_zone = -tb.timezone;
++#endif
+ tw.tw_flags &= ~TW_SDAY;
+ tw.tw_flags |= TW_SEXP;
+ tw.tw_clock = *clock;
diff --git a/astro/pngphoon/pkg-descr b/astro/pngphoon/pkg-descr
new file mode 100644
index 000000000000..2e0f07f3e4cb
--- /dev/null
+++ b/astro/pngphoon/pkg-descr
@@ -0,0 +1,16 @@
+This program is intended as an alternative to the great xphoon program
+(X PHase of mOON). xphoon is a program that displays the actual phase
+of the moon on the X11 root window. Nowadays all desktop systems like
+KDE hide the X11 rootwindow with an own background image, so xphoon
+could paint as much in the root window as it likes to, but nothing was
+to been seen.
+
+Modern desktops have an advanced interface for programs to dynamically
+provide background images in png format. Alternatively they just track
+when the background image file has been changed. That is what this
+program was originally written for.
+
+The image must have a width of at least 760 pixels to place the moon.
+If the image is smaller just the stars will be drawn. And by the way:
+it is pronounced "pingphoon" (like "typhoon").
+