From nobody Thu Jan 4 01:16:51 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T57wN1ZBNz559lv; Thu, 4 Jan 2024 01:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T57wN0l8vz40xg; Thu, 4 Jan 2024 01:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704331012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CrnyiQSpk9CUd/EO8jHhvjtr+4+ISnQaDS0dLuuJYAs=; b=L/VC2PXjo6XyNKCEvtbSkvqg98TTJ11h8WmzUGeGhyG4m3l0WCcH2TwtpTEbupJ89oYreG 3u4Tf4XC0Gegf7Z3K1zvLhsvq01OaiiLd11aSY2jMPOvSK+RwcVZG3CWO5kC/ZSAJDIhCf ElqoFuSockPW7t57jSPCs2rWKgZQ5YuVnjJ17cIMwa6NMLIyaVQaoimeceerQRIMHdmY+l +fuNMPqKcki2Ro4ZMVyh90M59VyN6hFlNSoT/9Mk5/P2GSCOrfNOvYdNIHl0XRthuJUvUl KnvIqNXXlJCB1nAUXUEyRYxwNiJlq96XtzUD8aov50s6DMnQ+vQ08+WbeGea5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704331012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CrnyiQSpk9CUd/EO8jHhvjtr+4+ISnQaDS0dLuuJYAs=; b=uQ3f9p9RV/y11NsQog1BnvjpISHnNQO5gnOQygJaNCCd0zkiQQJXvZsLVjwueKNcGYD/uQ 0/zfwoiOv1rmLVjILTjH21V+F4Yw5Ku+YZnb50/15d4kIV4Bs+ZjrmJHpgwnAZDRXve/OC p873hUtN5q7GNVy/HiARNOeEmpZ8Cr01QJA9XmbLhPOnmYR+Y03QFo31zuMBNyvAmaLhSx 3r9UOLEvP8DuuWFB795GMCX6V+LqdMMHVDFZW4zBnAHi6x8DlWFbf+OgClYh/nZTeTEg+W tjIxCVaaiHRMBgguLhN3N68R4Ki3YtkLoDZ8PZIjrITRaQC2kPHFX1f4FKlIqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704331012; a=rsa-sha256; cv=none; b=YzBtyTFI/VNfEhwY5tEkisPHWdVRCNvwXqZpiDvDWN5z0ePAaW3mZ9SeNx9xBZiZQOf/SO H5YAZTSjobUXStBOO7KW+useN1W+mjMgkRlPN+Wz4INPWSqM6zF7xzXFLiK5u2xJVS6++G mXkUFXaUfah3eVV8My8B3LizrT7wk+e2lfolWzO1FULtCM9d5Vwbr0W1fsJCWV0j1bEfdi GL959Qk9/MNwkj/IPw0591Wxc1C8Ed8YsU9VAZanm29nDxJNmF/uq9suWedBj3VVfuT56+ iffjjHF2+NuCQDulzmseIzaT+Jx8+X48SHRwPKB1AJG1zat8e0WRERgpcWzyyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T57wM6wP6z17fP; Thu, 4 Jan 2024 01:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4041Gpxh091275; Thu, 4 Jan 2024 01:16:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4041GpcY091272; Thu, 4 Jan 2024 01:16:51 GMT (envelope-from git) Date: Thu, 4 Jan 2024 01:16:51 GMT Message-Id: <202401040116.4041GpcY091272@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 85b044858d21 - main - astro/pngphoon: PNG Phases of Moon List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85b044858d21a27586494a161c047189e8ff7daa Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=85b044858d21a27586494a161c047189e8ff7daa commit 85b044858d21a27586494a161c047189e8ff7daa Author: Robert Clausecker AuthorDate: 2023-12-30 12:15:54 +0000 Commit: Robert Clausecker CommitDate: 2024-01-04 01:16:34 +0000 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/ --- astro/Makefile | 1 + astro/pngphoon/Makefile | 24 ++++++++++++++++ astro/pngphoon/distinfo | 3 ++ astro/pngphoon/files/patch-tws.c | 62 ++++++++++++++++++++++++++++++++++++++++ astro/pngphoon/pkg-descr | 16 +++++++++++ 5 files changed, 106 insertions(+) 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 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 + #include + #include +-#ifdef SYS5 ++#if !defined(__FreeBSD__) ++# ifdef SYS5 + extern int daylight; + extern long timezone; +-#else /*SYS5*/ +-#include +-#endif /*SYS5*/ ++# else /*SYS5*/ ++# include ++# 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"). +