hamclock: wwitch to new backend server at hamclock.com

This commit is contained in:
Dave Allured
2026-03-04 11:31:43 -07:00
committed by GitHub
parent 7f03e91b30
commit 218c941913
+48 -26
View File
@@ -9,21 +9,30 @@ legacysupport.newest_darwin_requires_legacy 15
name hamclock
version 4.22
revision 0
revision 1
checksums rmd160 0851160f6b7b42cc564dd6cfb348df6ec252e57c \
sha256 358c30e5c296d9ce6ff6d9206d958cc2771bdd731590349a6873d501e39c8ad6 \
size 1967130
categories x11
license MIT
maintainers nomaintainer
description Handy clock with features for amateur radio operators
long_description HamClock is a kiosk-style application that provides \
real time space weather, radio propagation models, \
operating events and other information particularly \
useful to the radio amateur.
maintainers {@Dave-Allured noaa.gov:dave.allured} \
openmaintainer
homepage https://www.clearskyinstitute.com/ham/HamClock
master_sites ${homepage}/
description Handy clock with features for amateur radio operators
long_description HamClock is a kiosk-style application that provides\
real time space weather, radio propagation models,\
operating events and other information particularly\
useful to the radio amateur.\
Update, 2026 March: This MacPorts version uses\
Elwood's original code, but has been ported to the\
replacement backend server at hamclock.com.
# 2026 Feb 27: New home page for replacement hamclock website.
# Note: Competing websites exist.
homepage https://hamclock.com
# For now, use Elwood's original website to fetch the original source code.
master_sites https://www.clearskyinstitute.com/ham/HamClock/
distname ESPHamClock-V${version}
extract.suffix .tgz
@@ -34,36 +43,43 @@ post-patch {
reinplace "s|CXXFLAGS =|CXXFLAGS +=|" ${worksrcpath}/Makefile
reinplace "s|LIBS =|LIBS +=|" ${worksrcpath}/Makefile
reinplace "s|CXX =|CXX ?=|" ${worksrcpath}/ArduinoLib/Makefile
# Fix X11 paths:
reinplace "s|/opt/X11|${prefix}|g" ${worksrcpath}/Makefile
# Switch to new backend server:
reinplace "s|clearskyinstitute.com|hamclock.com|" ${worksrcpath}/wifi.cpp
# No port number change this time. Both old and new servers use port 80.
}
depends_run-append port:desktop-file-utils
depends_run-append port:desktop-file-utils
compiler.cxx_standard 2017
configure.cxxflags-append \
-DNO_UPGRADE
default_variants +1600x960
variant 800x480 description {Window 800x480} {build.target hamclock-800x480 }
variant 1600x960 description {Window 1600x960} {build.target hamclock-1600x960 }
variant 2400x1440 description {Window 2400x1440} {build.target hamclock-2400x1440}
variant 3200x1920 description {Window 3200x1920} {build.target hamclock-3200x1920}
variant web800x480 description {Web 800x480} {build.target hamclock-web-800x480 }
variant web1600x960 description {Web 1600x960} {build.target hamclock-web-1600x960 }
variant web2400x1440 description {Web 2400x1440} {build.target hamclock-web-2400x1440}
variant web3200x1920 description {Web 3200x1920} {build.target hamclock-web-3200x1920}
# Default build, is overwritten if any variant is selected explicitly.
build.target hamclock-1600x960
# add xorg-libX11 dependency for x11 variants
variant x800x480 description {X11 window 800x480} {build.target hamclock-800x480 }
variant x1600x960 description {X11 window 1600x960} {build.target hamclock-1600x960 }
variant x2400x1440 description {X11 window 2400x1440} {build.target hamclock-2400x1440}
variant x3200x1920 description {X11 window 3200x1920} {build.target hamclock-3200x1920}
if { [variant_isset 800x480 ] || [variant_isset 1600x960 ]
|| [variant_isset 2400x1440] || [variant_isset 3200x1920] } {
depends_lib-append port:xorg-libX11
variant web800x480 description {Web 800x480} {build.target hamclock-web-800x480 }
variant web1600x960 description {Web 1600x960} {build.target hamclock-web-1600x960 }
variant web2400x1440 description {Web 2400x1440} {build.target hamclock-web-2400x1440}
variant web3200x1920 description {Web 3200x1920} {build.target hamclock-web-3200x1920}
# Add xorg-libX11 dependency for x11 variants.
# Check the first character after "hamclock-" in the build target.
# A digit "0-9" indicates an X11 variant. "w" indicates a web variant.
if {[string is digit [string index ${build.target} 9]]} {
depends_lib-append port:xorg-libX11
}
if {${os.platform} eq "darwin" && ${os.major} < 16} {
build.env-append LIBS=-lMacportsLegacySupport
}
@@ -83,4 +99,10 @@ post-activate {
system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}
livecheck.regex Version \(\[0-9.\]+\):
livecheck.regex version \(\[0-9.\]+\).
notes-append {
To run web versions: Launch in background with "hamclock &".\
Then point your browser to "http://localhost:8081/live.html".\
Alternate backend example: "hamclock -b clearskyinstitute.com:80"
}