mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 17:46:38 -04:00
astro/pngphoon: PNG Phases of Moon
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"). WWW: https://svolli.de/software/pngphoon/
This commit is contained in:
parent
a8c72eab47
commit
85b044858d
5 changed files with 106 additions and 0 deletions
|
@ -78,6 +78,7 @@
|
||||||
SUBDIR += pal
|
SUBDIR += pal
|
||||||
SUBDIR += phd2
|
SUBDIR += phd2
|
||||||
SUBDIR += phoon
|
SUBDIR += phoon
|
||||||
|
SUBDIR += pngphoon
|
||||||
SUBDIR += pp3
|
SUBDIR += pp3
|
||||||
SUBDIR += py-astlib
|
SUBDIR += py-astlib
|
||||||
SUBDIR += py-astral
|
SUBDIR += py-astral
|
||||||
|
|
24
astro/pngphoon/Makefile
Normal file
24
astro/pngphoon/Makefile
Normal file
|
@ -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>
|
3
astro/pngphoon/distinfo
Normal file
3
astro/pngphoon/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
TIMESTAMP = 1703936409
|
||||||
|
SHA256 (pngphoon-1.3.tar.bz2) = 86bd37d37d23da12aa38b239fa0b197d7a5052c6b96b82361716b54e152d3b23
|
||||||
|
SIZE (pngphoon-1.3.tar.bz2) = 67264
|
62
astro/pngphoon/files/patch-tws.c
Normal file
62
astro/pngphoon/files/patch-tws.c
Normal file
|
@ -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;
|
16
astro/pngphoon/pkg-descr
Normal file
16
astro/pngphoon/pkg-descr
Normal file
|
@ -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").
|
||||||
|
|
Loading…
Add table
Reference in a new issue