1: Upgrade to 2.1.4.

2: use options helper.

PR:		197414
Submitted by:	Ports Fury.
This commit is contained in:
Vanilla I. Shu 2015-02-17 01:11:16 +00:00
parent 741bd6b101
commit 1555a8c5e2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=379129
5 changed files with 134 additions and 101 deletions

View file

@ -2,15 +2,12 @@
# $FreeBSD$
PORTNAME= xtide
PORTVERSION= 2.13.2
PORTREVISION= 6
PORTVERSION= 2.14
CATEGORIES= astro geography
MASTER_SITES= http://www.c-s.li/ports/ \
ftp://ftp.flaterco.com/xtide/
MASTER_SITES= ftp://ftp.flaterco.com/xtide/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
${TCD_DISTNAME}-r3${EXTRACT_SUFX} \
${HARM_DISTNAME}-free${EXTRACT_SUFX}
${TCD_DISTNAME}${EXTRACT_SUFX} \
${HARM_DISTNAME}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= Harmonic tide clock and tide predictor
@ -19,82 +16,83 @@ LICENSE= GPLv3
LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png
USES= gmake tar:bzip2 compiler:gcc-c++11-lib
USES= compiler:c++0x gmake libtool tar:bzip2
GNU_CONFIGURE= yes
CONFIGURE_ENV= ac_cv_header_tcd_h=yes \
ac_cv_lib_tcd_get_tide_db_header=yes
INSTALL_TARGET= install-strip
USE_LDCONFIG= yes
CPPFLAGS+= -I../${TCD_DISTNAME}
LDFLAGS+= -L../${TCD_DISTNAME}/.libs -L${LOCALBASE}/lib
TCD_DISTNAME= libtcd-2.2.5
HARM_DISTNAME= harmonics-dwf-20131228
WVS_DISTNAME= wvs
CFLAGS+= -Wno-deprecated-declarations
CPPFLAGS+= -I${TCD_WRKSRC} $$(libpng-config --I_opts) \
-I${LOCALBASE}/include
LDFLAGS+= -L${TCD_WRKSRC}/.libs $$(libpng-config --L_opts) \
-L${LOCALBASE}/lib
OPTIONS_DEFINE= WVS X11
OPTIONS_DEFAULT= X11
OPTIONS_SUB= yes
WVS_DESC= Use world vector shoreline data (37MB)
WVS_DISTFILES= ${WVS_DISTNAME}${EXTRACT_SUFX}
X11_USE= xorg=xaw,xpm
X11_CONFIGURE_WITH= x
TCD_DISTNAME= libtcd-2.2.6-r2
TCD_WRKSRC= ${WRKDIR}/${TCD_DISTNAME:C/-r[0-9]+//}
HARM_DISTNAME= harmonics-dwf-20141224-free
HARM_WRKSRC= ${WRKDIR}/${HARM_DISTNAME:C/-free//}
WVS_DISTNAME= wvs
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MWVS}
DISTFILES+= ${WVS_DISTNAME}${EXTRACT_SUFX}
PLIST_SUB+= WVS=""
.else
PLIST_SUB+= WVS="@comment "
.if ${PORT_OPTIONS:MX11}
DESKTOP_ENTRIES="XTide" "" "${PREFIX}/share/pixmaps/xtide.png" "xtide" "" ""
.endif
.if ! ${PORT_OPTIONS:MX11}
ALL_TARGET+= tide xttpd
PLIST_SUB+= X11="@comment "
.else
USE_XORG+= xpm xaw
PLIST_SUB+= X11=""
CFLAGS+= -I${LOCALBASE}/include
.endif
post-extract:
@${LN} -sf ../${HARM_DISTNAME}/${HARM_DISTNAME}-free.tcd ${WRKSRC}/harmonics.tcd
post-patch:
@${REINPLACE_CMD} -e '/if test/s|==|=|g' ${WRKDIR}/${TCD_DISTNAME}/configure
@${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/Global.cc
@${REINPLACE_CMD} -e \
'/if test/s|==|=|g' ${TCD_WRKSRC}/configure
@${REINPLACE_CMD} -e \
's|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/configure
@${REINPLACE_CMD} -e \
's|"/etc/|"${PREFIX}/etc/| ; \
s| /etc/| ${PREFIX}/etc/|' ${WRKSRC}/libxtide/Global.cc
pre-configure:
@cd ${WRKDIR}/${TCD_DISTNAME} \
&& ${SETENV} ${CONFIGURE_ENV} \
CC="${CC}" CFLAGS="${CFLAGS}" \
CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
${SH} ./configure --disable-shared \
${CONFIGURE_ARGS} \
&& ${MKDIR} ${WRKDIR}/${TCD_DISTNAME}/.libs \
&& ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
@(cd ${TCD_WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \
CC="${CC}" CFLAGS="${CFLAGS} -fPIC" \
CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -fPIC" \
${SH} ./configure ${CONFIGURE_ARGS})
post-configure:
@${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
< ${FILESDIR}/xtide.conf.example > ${WRKDIR}/xtide.conf.example
pre-build:
@(cd ${TCD_WRKSRC} && ${DO_MAKE_BUILD} ${ALL_TARGET})
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tide ${STAGEDIR}${PREFIX}/bin
.if ${PORT_OPTIONS:MX11}
${INSTALL_PROGRAM} ${WRKSRC}/xtide ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/xtide.1 ${STAGEDIR}${MANPREFIX}/man/man1
.endif
${INSTALL_PROGRAM} ${WRKSRC}/xttpd ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/tide.1 ${STAGEDIR}${MANPREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/xttpd.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/harmonics.tcd ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKDIR}/xtide.conf.example ${STAGEDIR}${PREFIX}/etc
post-build:
@${ECHO_CMD} -n > ${WRKDIR}/xtide.conf.sample
@${ECHO_CMD} "${DATADIR}/harmonics.tcd" >> ${WRKDIR}/xtide.conf.sample
@${ECHO_CMD} "${DATADIR}/wvs" >> ${WRKDIR}/xtide.conf.sample
@${LN} -sf ${HARM_DISTNAME}.tcd ${HARM_WRKSRC}/harmonics.tcd
@${LN} -sf icon_48x48_orig.png ${WRKSRC}/iconsrc/xtide.png
pre-install:
@(cd ${TCD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
post-install:
(cd ${WRKDIR} && ${INSTALL_DATA} xtide.conf.sample \
${STAGEDIR}${PREFIX}/etc)
@${MKDIR} ${STAGEDIR}${DATADIR}
(cd ${HARM_WRKSRC} && ${INSTALL_DATA} harmonics.tcd \
${STAGEDIR}${DATADIR})
.if ${PORT_OPTIONS:MWVS}
@${MKDIR} ${STAGEDIR}${DATADIR}/wvs
${INSTALL_DATA} ${WRKDIR}/wvs1.dat ${STAGEDIR}${DATADIR}/wvs
${INSTALL_DATA} ${WRKDIR}/wvs12.dat ${STAGEDIR}${DATADIR}/wvs
${INSTALL_DATA} ${WRKDIR}/wvs250k.dat ${STAGEDIR}${DATADIR}/wvs
${INSTALL_DATA} ${WRKDIR}/wvs3.dat ${STAGEDIR}${DATADIR}/wvs
${INSTALL_DATA} ${WRKDIR}/wvs43.dat ${STAGEDIR}${DATADIR}/wvs
${INSTALL_DATA} ${WRKDIR}/wvsfull.dat ${STAGEDIR}${DATADIR}/wvs
(cd ${WRKDIR} && ${INSTALL_DATA} wvs*.dat \
${STAGEDIR}${DATADIR}/wvs)
.endif
.if ${PORT_OPTIONS:MX11}
(cd ${WRKSRC}/iconsrc && ${INSTALL_DATA} xtide.png \
${STAGEDIR}${PREFIX}/share/pixmaps)
.endif
.include <bsd.port.mk>

View file

@ -1,8 +1,8 @@
SHA256 (xtide-2.13.2.tar.bz2) = fabf6b3097bb345598649ea55d1f2db269cbb651cddd73c60a9768088173d542
SIZE (xtide-2.13.2.tar.bz2) = 481183
SHA256 (libtcd-2.2.5-r3.tar.bz2) = f837aa45421236732580e6fa73b79f539b9e778bebe22dbd3ca43b2c6a550e9e
SIZE (libtcd-2.2.5-r3.tar.bz2) = 300804
SHA256 (harmonics-dwf-20131228-free.tar.bz2) = 3185a471e51dffab37b7503e02b901858945ff33687345cf290e429346c99250
SIZE (harmonics-dwf-20131228-free.tar.bz2) = 511292
SHA256 (xtide-2.14.tar.bz2) = b69ebd73e3798be5996a22c63b619537780ec8ed1ec5b92decf15fd4bc61320f
SIZE (xtide-2.14.tar.bz2) = 695309
SHA256 (libtcd-2.2.6-r2.tar.bz2) = 4dcc2e2f93a83063f5b77a678bcc585af753d92fe7905ed66ecf7af3c5c389cf
SIZE (libtcd-2.2.6-r2.tar.bz2) = 304256
SHA256 (harmonics-dwf-20141224-free.tar.bz2) = f8319a894429145053b44fd0324278511287293698c1e30b8f90b8e2c886bb18
SIZE (harmonics-dwf-20141224-free.tar.bz2) = 528235
SHA256 (wvs.tar.bz2) = 4e996ce2e608d612ba78e35cdf50c2c73b01fce06bd5b561a7fe957ea75d6d75
SIZE (wvs.tar.bz2) = 37461520

View file

@ -1,24 +0,0 @@
--- Global.cc.orig 2010-09-14 16:49:16.000000000 +0200
+++ Global.cc 2010-09-14 16:50:18.000000000 +0200
@@ -203,7 +203,7 @@
#ifdef UseLocalFiles
static const char confFile[] = "xtide.conf";
#else
- static const char confFile[] = "/etc/xtide.conf";
+ static const char confFile[] = "%%PREFIX%%/etc/xtide.conf";
#endif
static bool firstCall (true);
static SafeVector<Dstr> xtideConfLines (2U);
@@ -390,10 +390,10 @@
break;
case Error::NO_HFILE_PATH:
text_out += "NO_HFILE_PATH\n\
-If /etc/xtide.conf is not provided, you must set the environment variable\n\
+If %%PREFIX%%/etc/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.";
+Please refer to the documentation for usage of %%PREFIX%%/etc/xtide.conf.";
break;
case Error::NO_HFILE_IN_PATH:
text_out += "NO_HFILE_IN_PATH\n\

View file

@ -1,2 +0,0 @@
%%PREFIX%%/share/xtide/harmonics.tcd
%%PREFIX%%/share/xtide/wvs

View file

@ -1,9 +1,73 @@
bin/tide
%%X11%%bin/xtide
bin/xttpd
@sample etc/xtide.conf.sample
include/libxtide/Amplitude.hh
include/libxtide/Angle.hh
include/libxtide/Banner.hh
include/libxtide/BetterMap.hh
include/libxtide/Calendar.hh
include/libxtide/CalendarFormC.hh
include/libxtide/CalendarFormH.hh
include/libxtide/CalendarFormL.hh
include/libxtide/CalendarFormNotC.hh
include/libxtide/CalendarFormT.hh
include/libxtide/ClientSideFont.hh
include/libxtide/Colors.hh
include/libxtide/Configurable.hh
include/libxtide/Constituent.hh
include/libxtide/ConstituentSet.hh
include/libxtide/Coordinates.hh
include/libxtide/CurrentBearing.hh
include/libxtide/Date.hh
include/libxtide/Dstr.hh
include/libxtide/Errors.hh
include/libxtide/Global.hh
include/libxtide/Graph.hh
include/libxtide/HarmonicsFile.hh
include/libxtide/HarmonicsPath.hh
include/libxtide/Interval.hh
include/libxtide/MetaField.hh
include/libxtide/ModeFormat.hh
include/libxtide/Nullable.hh
include/libxtide/NullableInterval.hh
include/libxtide/NullablePredictionValue.hh
include/libxtide/Offsets.hh
include/libxtide/PixelatedGraph.hh
include/libxtide/PredictionValue.hh
include/libxtide/RGBGraph.hh
include/libxtide/SVGGraph.hh
include/libxtide/SafeVector.hh
include/libxtide/Settings.hh
include/libxtide/Skycal.hh
include/libxtide/Speed.hh
include/libxtide/Station.hh
include/libxtide/StationIndex.hh
include/libxtide/StationRef.hh
include/libxtide/SubordinateStation.hh
include/libxtide/TTYGraph.hh
include/libxtide/TideEvent.hh
include/libxtide/TideEventsOrganizer.hh
include/libxtide/Timestamp.hh
include/libxtide/Units.hh
include/libxtide/Year.hh
include/libxtide/autoconf-defines.h
include/libxtide/config.hh
include/libxtide/libxtide.hh
include/libxtide/rgb.hh
include/libxtide/xmlparser.hh
include/tcd.h
lib/libtcd.a
lib/libtcd.so
lib/libtcd.so.1
lib/libxtide.a
lib/libxtide.so
lib/libxtide.so.0
lib/libxtide.so.0.0.0
man/man1/tide.1.gz
%%X11%%man/man1/xtide.1.gz
man/man8/xttpd.8.gz
sbin/xttpd
%%X11%%share/pixmaps/xtide.png
%%DATADIR%%/harmonics.tcd
%%WVS%%%%DATADIR%%/wvs/wvs1.dat
%%WVS%%%%DATADIR%%/wvs/wvs12.dat
@ -11,6 +75,3 @@ man/man8/xttpd.8.gz
%%WVS%%%%DATADIR%%/wvs/wvs3.dat
%%WVS%%%%DATADIR%%/wvs/wvs43.dat
%%WVS%%%%DATADIR%%/wvs/wvsfull.dat
@unexec if cmp -s %D/etc/xtide.conf %D/etc/xtide.conf.example ; 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