aboutsummaryrefslogtreecommitdiff
path: root/astro/pngphoon
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2023-12-30 12:15:54 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2024-01-04 01:16:34 +0000
commit85b044858d21a27586494a161c047189e8ff7daa (patch)
treee5be43a65dcce9b4d80f95237da4bd9d3e2fb5b6 /astro/pngphoon
parenta8c72eab473a6569167b16aa84dd573222a56eb7 (diff)
downloadports-85b044858d21a27586494a161c047189e8ff7daa.tar.gz
ports-85b044858d21a27586494a161c047189e8ff7daa.zip
Diffstat (limited to 'astro/pngphoon')
-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
4 files changed, 105 insertions, 0 deletions
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").
+