aboutsummaryrefslogtreecommitdiff
path: root/astro
diff options
context:
space:
mode:
authorGreg Larkin <glarkin@FreeBSD.org>2010-12-04 03:45:31 +0000
committerGreg Larkin <glarkin@FreeBSD.org>2010-12-04 03:45:31 +0000
commit0a5da6d47d271764daf44b92932e7653955f9d53 (patch)
treeb9efdec6681112ec8558aa7ba80aef5eff10b0f2 /astro
parent242c0dba030ee303874544c2e39eff6d78d02b73 (diff)
downloadports-0a5da6d47d271764daf44b92932e7653955f9d53.tar.gz
ports-0a5da6d47d271764daf44b92932e7653955f9d53.zip
Notes
Diffstat (limited to 'astro')
-rw-r--r--astro/xtide/Makefile44
-rw-r--r--astro/xtide/distinfo5
-rw-r--r--astro/xtide/files/xtide.conf.example2
-rw-r--r--astro/xtide/pkg-plist15
4 files changed, 58 insertions, 8 deletions
diff --git a/astro/xtide/Makefile b/astro/xtide/Makefile
index 4645aee1f2d3..3c66fa38f90a 100644
--- a/astro/xtide/Makefile
+++ b/astro/xtide/Makefile
@@ -7,18 +7,20 @@
PORTNAME= xtide
PORTVERSION= 2.11
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= astro geography
MASTER_SITES= ftp://ftp.flaterco.com/xtide/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
${TCD_DISTNAME}${EXTRACT_SUFX} \
${HARM_DISTNAME}${EXTRACT_SUFX}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= c-s@c-s.li
COMMENT= Harmonic tide clock and tide predictor
LIB_DEPENDS= png.6:${PORTSDIR}/graphics/png
+LICENSE= GPLv3
+
USE_BZIP2= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
@@ -26,24 +28,35 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
MAN1= tide.1
MAN8= xttpd.8
-PLIST_FILES= bin/tide bin/xttpd %%DATADIR%%/harmonics.tcd
-PLIST_DIRS= %%DATADIR%%
CPPFLAGS= -I../${TCD_DISTNAME} -I${LOCALBASE}/include/libpng
LDFLAGS= -L../${TCD_DISTNAME}/.libs -L${LOCALBASE}/lib
+MAKE_JOBS_SAFE= yes
TCD_DISTNAME= libtcd-2.2.5
HARM_DISTNAME= harmonics-dwf-20100529-free
+WVS_DISTNAME= wvs
+
+OPTIONS= WVS "Use world vector shoreline data (big file!)" Off
+.include <bsd.port.options.mk>
.include <bsd.port.pre.mk>
+.if !defined(WITHOUT_WVS)
+DISTFILES+= ${WVS_DISTNAME}${EXTRACT_SUFX}
+PLIST_SUB+= WVS=""
+.else
+PLIST_SUB+= WVS="@comment "
+.endif
+
.if defined(WITHOUT_X11)
PKGNAMESUFFIX= -nox11
ALL_TARGET= tide xttpd
+PLIST_SUB+= X11="@comment "
.else
USE_XORG= xpm xaw
MAN1+= xtide.1
-PLIST_FILES+= bin/xtide
+PLIST_SUB+= X11=""
.endif
post-extract:
@@ -64,6 +77,10 @@ pre-configure:
&& ${MKDIR} ${WRKDIR}/${TCD_DISTNAME}/.libs \
&& ${SETENV} ${MAKE_ENV} ${GMAKE}
+post-configure:
+ @${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
+ < ${FILESDIR}/xtide.conf.example > ${WRKDIR}/xtide.conf.example
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tide ${PREFIX}/bin
.if !defined(WITHOUT_X11)
@@ -75,5 +92,22 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/xttpd.8 ${MAN8PREFIX}/man/man8
@${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/harmonics.tcd ${DATADIR}
+ ${INSTALL_DATA} ${WRKDIR}/xtide.conf.example ${PREFIX}/etc
+
+post-install:
+.if !exists(${PREFIX}/etc/xtide.conf)
+ ${INSTALL_DATA} ${WRKDIR}/xtide.conf.example ${PREFIX}/etc/xtide.conf
+ ${CHMOD} 644 ${PREFIX}/etc/xtide.conf
+.endif
+
+.if !defined(WITHOUT_WVS)
+ @${MKDIR} ${DATADIR}/wvs
+ ${INSTALL_DATA} ${WRKDIR}/wvs1.dat ${DATADIR}/wvs
+ ${INSTALL_DATA} ${WRKDIR}/wvs12.dat ${DATADIR}/wvs
+ ${INSTALL_DATA} ${WRKDIR}/wvs250k.dat ${DATADIR}/wvs
+ ${INSTALL_DATA} ${WRKDIR}/wvs3.dat ${DATADIR}/wvs
+ ${INSTALL_DATA} ${WRKDIR}/wvs43.dat ${DATADIR}/wvs
+ ${INSTALL_DATA} ${WRKDIR}/wvsfull.dat ${DATADIR}/wvs
+.endif
.include <bsd.port.post.mk>
diff --git a/astro/xtide/distinfo b/astro/xtide/distinfo
index 505afe5a50a8..4f88b9211456 100644
--- a/astro/xtide/distinfo
+++ b/astro/xtide/distinfo
@@ -1,9 +1,8 @@
-MD5 (xtide-2.11.tar.bz2) = 1d85890bb13b3345154e0f68831b7ebd
SHA256 (xtide-2.11.tar.bz2) = a7a3f27b5f49b498c497d1e595c772cfb902892fdf87d386cbbea13f4d7924b3
SIZE (xtide-2.11.tar.bz2) = 431228
-MD5 (libtcd-2.2.5.tar.bz2) = 734a01597e5e6da05546b38adb27ae88
SHA256 (libtcd-2.2.5.tar.bz2) = 83d8b5661673eb841417e9aa7b14b3c1d233a6adf836c7d21805ff376165a1d6
SIZE (libtcd-2.2.5.tar.bz2) = 271494
-MD5 (harmonics-dwf-20100529-free.tar.bz2) = ac4be3f3d47565d95863db6f9670a8c1
SHA256 (harmonics-dwf-20100529-free.tar.bz2) = f6fe956b15cf05d24ec8e5accddfe90c7c6749046671e0ce167fb063bc2d9960
SIZE (harmonics-dwf-20100529-free.tar.bz2) = 473148
+SHA256 (wvs.tar.bz2) = 4e996ce2e608d612ba78e35cdf50c2c73b01fce06bd5b561a7fe957ea75d6d75
+SIZE (wvs.tar.bz2) = 37461520
diff --git a/astro/xtide/files/xtide.conf.example b/astro/xtide/files/xtide.conf.example
new file mode 100644
index 000000000000..379684ad1e42
--- /dev/null
+++ b/astro/xtide/files/xtide.conf.example
@@ -0,0 +1,2 @@
+%%PREFIX%%/share/xtide/harmonics.tcd
+%%PREFIX%%/share/xtide/wvs
diff --git a/astro/xtide/pkg-plist b/astro/xtide/pkg-plist
new file mode 100644
index 000000000000..33e78e34e787
--- /dev/null
+++ b/astro/xtide/pkg-plist
@@ -0,0 +1,15 @@
+bin/tide
+%%X11%%bin/xtide
+bin/xttpd
+%%DATADIR%%/harmonics.tcd
+%%WVS%%%%DATADIR%%/wvs/wvs1.dat
+%%WVS%%%%DATADIR%%/wvs/wvs12.dat
+%%WVS%%%%DATADIR%%/wvs/wvs250k.dat
+%%WVS%%%%DATADIR%%/wvs/wvs3.dat
+%%WVS%%%%DATADIR%%/wvs/wvs43.dat
+%%WVS%%%%DATADIR%%/wvs/wvsfull.dat
+%%WVS%%@dirrm %%DATADIR%%/wvs
+@dirrm %%DATADIR%%
+@unexec if cmp -s %D/etc/xtide.conf.example %D/etc/xtide.conf; then rm -f %D/etc/xtide.conf; fi
+etc/xtide.conf.example
+@exec if [ ! -f %D/etc/xtide.conf ] ; then cp -p %D/%F %B/xtide.conf; fi