From 23d32a8302c824362da38276551998b0b558f1c1 Mon Sep 17 00:00:00 2001 From: wiz Date: Sun, 14 Mar 2010 16:39:24 +0000 Subject: Reimport misc/xtide to time/ --- time/xtide/DESCR | 24 +++++++++++++++++++++++ time/xtide/Makefile | 48 +++++++++++++++++++++++++++++++++++++++++++++ time/xtide/PLIST | 9 +++++++++ time/xtide/distinfo | 12 ++++++++++++ time/xtide/patches/patch-aa | 18 +++++++++++++++++ time/xtide/patches/patch-ab | 19 ++++++++++++++++++ time/xtide/patches/patch-ac | 15 ++++++++++++++ time/xtide/patches/patch-ad | 29 +++++++++++++++++++++++++++ 8 files changed, 174 insertions(+) create mode 100644 time/xtide/DESCR create mode 100644 time/xtide/Makefile create mode 100644 time/xtide/PLIST create mode 100644 time/xtide/distinfo create mode 100644 time/xtide/patches/patch-aa create mode 100644 time/xtide/patches/patch-ab create mode 100644 time/xtide/patches/patch-ac create mode 100644 time/xtide/patches/patch-ad diff --git a/time/xtide/DESCR b/time/xtide/DESCR new file mode 100644 index 00000000000..3f557381fa3 --- /dev/null +++ b/time/xtide/DESCR @@ -0,0 +1,24 @@ +XTide is a package that provides tide and current predictions in a +wide variety of formats. Graphs, text listings, and calendars can be +generated, or a tide clock can be provided on your desktop. XTide can +work with X-windows, plain text terminals, or the web. This is +accomplished with three separate programs: the interactive interface +(xtide), the non-interactive or command line interface (tide), and the +web interface (xttpd). + +The algorithm that XTide uses to predict tides is the one used by the +National Ocean Service in the U.S. It is significantly more accurate +than the simple tide clocks that can be bought in novelty stores. +However, it takes more to predict tides accurately than just a spiffy +algorithm -- you also need some special data for each and every +location for which you want to predict tides. XTide reads this data +from harmonics files. Ultimately, XTide's predictions can only be as +good as the available harmonics data. Due to issues of data +availability and of compatibility with non-U.S. tide systems, the +predictions for U.S. locations tend to be a lot better on average +than those for locations outside of the U.S. +* Deviations of 1 minute from official predictions are typical for U.S. + locations having the latest data. +* Deviations of 20 minutes are typical for non-U.S. locations or U.S. + locations that are using obsolete data. +* Much longer deviations indicate a problem. diff --git a/time/xtide/Makefile b/time/xtide/Makefile new file mode 100644 index 00000000000..92aac222f88 --- /dev/null +++ b/time/xtide/Makefile @@ -0,0 +1,48 @@ +# $NetBSD: Makefile,v 1.1.1.1 2010/03/14 16:39:24 wiz Exp $ + +DISTNAME= xtide-2.8.3 +PKGREVISION= 2 +CATEGORIES= misc x11 +MASTER_SITES= ftp://ftp.flaterco.com/xtide/ +DISTFILES= ${DISTNAME}.tar.bz2 ${HARMONICS_FILE}.bz2 + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.flaterco.com/ +COMMENT= X11 tide predictor + +PKG_DESTDIR_SUPPORT= user-destdir + +GNU_CONFIGURE= yes +USE_LANGUAGES= c c++ + +PREV_PKGPATH= misc/xtide + +HARMONICS_FILE= harmonics-dwf-20060708.tcd + +CONFIGURE_ARGS+=--sysconfdir=${PKG_SYSCONFDIR:Q} X11BASE=${X11BASE:Q} +EGDIR= ${PREFIX}/share/examples/xtide +CONF_FILES= ${EGDIR}/xtide.conf ${PKG_SYSCONFDIR}/xtide.conf + +SUBST_CLASSES+= xt +SUBST_STAGE.xt= pre-configure +SUBST_FILES.xt= DOCUMENTATION/* +SUBST_SED.xt= -e 's|/usr/local|${PREFIX}|g' + +PLIST_SUBST+= HARMONICS_FILE=${HARMONICS_FILE:Q} + +INSTALLATION_DIRS= share/xtide ${EGDIR} +INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX} \ + mandir=${DESTDIR}${PREFIX}/${PKGMANDIR} + +post-extract: + ${ECHO} "${PREFIX}/share/xtide/${HARMONICS_FILE}" > ${WRKDIR}/xtide.conf + +post-install: + ${INSTALL_DATA} ${WRKDIR}/xtide.conf ${DESTDIR}${EGDIR}/xtide.conf + ${INSTALL_DATA} ${WRKDIR}/${HARMONICS_FILE} ${DESTDIR}${PREFIX}/share/xtide + +.include "../../graphics/png/buildlink3.mk" +.include "../../x11/libXaw/buildlink3.mk" +.include "../../x11/libXi/buildlink3.mk" +.include "../../x11/libXpm/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/time/xtide/PLIST b/time/xtide/PLIST new file mode 100644 index 00000000000..4d05a888ff8 --- /dev/null +++ b/time/xtide/PLIST @@ -0,0 +1,9 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2010/03/14 16:39:24 wiz Exp $ +bin/tide +bin/xtide +man/man1/tide.1 +man/man1/xtide.1 +man/man8/xttpd.8 +sbin/xttpd +share/examples/xtide/xtide.conf +share/xtide/${HARMONICS_FILE} diff --git a/time/xtide/distinfo b/time/xtide/distinfo new file mode 100644 index 00000000000..8b6b9792883 --- /dev/null +++ b/time/xtide/distinfo @@ -0,0 +1,12 @@ +$NetBSD: distinfo,v 1.1.1.1 2010/03/14 16:39:24 wiz Exp $ + +SHA1 (harmonics-dwf-20060708.tcd.bz2) = 1f54ed856b064e485f7e386eb4a71965e83abfa4 +RMD160 (harmonics-dwf-20060708.tcd.bz2) = 754255ac5f2e36cf2dce587e7f9f7bd0561226d9 +Size (harmonics-dwf-20060708.tcd.bz2) = 477682 bytes +SHA1 (xtide-2.8.3.tar.bz2) = 0abfdf8a695facfeb239af0018e7b3c392592cb4 +RMD160 (xtide-2.8.3.tar.bz2) = 926d116d6d36b3e4ff5e4630e0df394a4f9a0a8b +Size (xtide-2.8.3.tar.bz2) = 463382 bytes +SHA1 (patch-aa) = 8b9059e2870f6b8149e72ca33c452e75650f8230 +SHA1 (patch-ab) = 889c68bce0bd78cfc1b5f7410364e8c39182cfec +SHA1 (patch-ac) = 07a0099f0d58b8774ae456470142314dabe38c1b +SHA1 (patch-ad) = cf18fb73096b3cef07fbf501fa1205fe126d1155 diff --git a/time/xtide/patches/patch-aa b/time/xtide/patches/patch-aa new file mode 100644 index 00000000000..4a38fb54b0b --- /dev/null +++ b/time/xtide/patches/patch-aa @@ -0,0 +1,18 @@ +$NetBSD: patch-aa,v 1.1.1.1 2010/03/14 16:39:24 wiz Exp $ + +--- errors.cc.orig 2004-11-17 17:27:18.000000000 +0100 ++++ errors.cc 2006-11-05 21:59:29.000000000 +0100 +@@ -121,10 +121,10 @@ If the harmonics file has been updated, + break; + case NO_HFILE_PATH: + errout += "NO_HFILE_PATH\n\ +-If /etc/xtide.conf is not provided, you must set the environment variable\n\ ++If "PKG_SYSCONFDIR"/xtide.conf is not provided, you must set the environment variable\n\ + HFILE_PATH to point to your harmonics files. Example:\n\ +- export HFILE_PATH=/usr/local/share/xtide/harmonics.tcd\n\ +-Please refer to the documentation for usage of /etc/xtide.conf."; ++ export HFILE_PATH="PREFIX"/share/xtide/harmonics.tcd\n\ ++Please refer to the documentation for usage of "PKG_SYSCONFDIR"/xtide.conf."; + break; + case IMPOSSIBLE_CONVERSION: + errout += "IMPOSSIBLE_CONVERSION\n\ diff --git a/time/xtide/patches/patch-ab b/time/xtide/patches/patch-ab new file mode 100644 index 00000000000..455eb4117f3 --- /dev/null +++ b/time/xtide/patches/patch-ab @@ -0,0 +1,19 @@ +$NetBSD: patch-ab,v 1.1.1.1 2010/03/14 16:39:24 wiz Exp $ + +--- TideContext.cc.orig Fri Mar 23 21:52:40 2001 ++++ TideContext.cc Thu May 31 13:48:53 2001 +@@ -42,12 +42,12 @@ + colors = in_colors; + settings = in_settings; + +- // Get HFILE_PATH from environment or /etc/xtide.conf and create ++ // Get HFILE_PATH from environment or ${PKG_SYSCONFDIR}/xtide.conf and create + // persistent HarmonicsPath + Dstr hfile_path (getenv ("HFILE_PATH")); + if (hfile_path.isNull()) { + FILE *configfile; +- if ((configfile = fopen ("/etc/xtide.conf", "r"))) { ++ if ((configfile = fopen (PKG_SYSCONFDIR "/xtide.conf", "r"))) { + hfile_path.getline (configfile); + fclose (configfile); + } diff --git a/time/xtide/patches/patch-ac b/time/xtide/patches/patch-ac new file mode 100644 index 00000000000..0237dc64470 --- /dev/null +++ b/time/xtide/patches/patch-ac @@ -0,0 +1,15 @@ +$NetBSD: patch-ac,v 1.1.1.1 2010/03/14 16:39:24 wiz Exp $ + +--- Makefile.in.orig 2004-12-20 15:15:05.000000000 +0100 ++++ Makefile.in 2006-11-05 22:03:06.000000000 +0100 +@@ -11,8 +11,8 @@ mandir=@mandir@ + # DEFS should include -Dacceptarg3_t=int (replace with the correct data type) + CXX = @CXX@ + CC = @CC@ +-CXXFLAGS = @extracxxflags@ @DEFS@ -I@includedir@ -Ilibtcd -I@xroot@/include @normalcxxflags@ -c +-LDFLAGS = @extraldflags@ -L@libdir@ -L@xlibdir@ @normalldflags@ -o ++CXXFLAGS = @extracxxflags@ @DEFS@ -I@includedir@ -Ilibtcd -I@xroot@/include @normalcxxflags@ -DPREFIX='"${prefix}"' -DPKG_SYSCONFDIR='"@sysconfdir@"' -c ++LDFLAGS = @extraldflags@ -L@libdir@ -Wl,-R@libdir@ -L@xlibdir@ -Wl,-R@xlibdir@ @normalldflags@ -o + + # Extra switches and libs determined by configure.in + extraswitches=@extraswitches@ diff --git a/time/xtide/patches/patch-ad b/time/xtide/patches/patch-ad new file mode 100644 index 00000000000..360b9c0162f --- /dev/null +++ b/time/xtide/patches/patch-ad @@ -0,0 +1,29 @@ +$NetBSD: patch-ad,v 1.1.1.1 2010/03/14 16:39:24 wiz Exp $ + +Kill broken X11 check. + +--- configure.orig 2006-03-14 01:54:31.000000000 +0100 ++++ configure +@@ -2596,20 +2596,8 @@ fi + + echo "$as_me:$LINENO: checking location of X11" >&5 + echo $ECHO_N "checking location of X11... $ECHO_C" >&6 +-xroot="NOT FOUND" +-for dir in "/usr/X11R6" "/usr/openwin" "/usr/contrib/X11R6" "/usr"; do +- if test -r "$dir/lib/libXaw.so" -o -r "$dir/lib/libXaw.a" -o -r "$dir/lib/libXaw.dll.a"; then +- xroot="$dir" +- xlibdir="$dir/lib" +- break +- else +- if test -r "$dir/lib64/libXaw.so" -o -r "$dir/lib64/libXaw.a" -o -r "$dir/lib64/libXaw.dll.a"; then +- xroot="$dir" +- xlibdir="$dir/lib64" +- break +- fi +- fi +-done ++xroot="$X11BASE" ++xlibdir="$xroot/lib" + echo "$as_me:$LINENO: result: $xroot" >&5 + echo "${ECHO_T}$xroot" >&6 + if test "$xroot" = "NOT FOUND"; then -- cgit v1.2.3