View | Details | Raw Unified | Return to bug 197414
Collapse All | Expand All

(-)astro/xtide/Makefile (-69 / +67 lines)
Lines 2-16 Link Here
2
# $FreeBSD: head/astro/xtide/Makefile 375598 2014-12-25 20:54:41Z bapt $
2
# $FreeBSD: head/astro/xtide/Makefile 375598 2014-12-25 20:54:41Z bapt $
3
3
4
PORTNAME=	xtide
4
PORTNAME=	xtide
5
PORTVERSION=	2.13.2
5
PORTVERSION=	2.14
6
PORTREVISION=	6
7
CATEGORIES=	astro geography
6
CATEGORIES=	astro geography
8
MASTER_SITES=	http://www.c-s.li/ports/ \
7
MASTER_SITES=	ftp://ftp.flaterco.com/xtide/
9
		ftp://ftp.flaterco.com/xtide/
10
11
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
8
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
12
		${TCD_DISTNAME}-r3${EXTRACT_SUFX} \
9
		${TCD_DISTNAME}${EXTRACT_SUFX} \
13
		${HARM_DISTNAME}-free${EXTRACT_SUFX}
10
		${HARM_DISTNAME}${EXTRACT_SUFX}
14
11
15
MAINTAINER=	ports@FreeBSD.org
12
MAINTAINER=	ports@FreeBSD.org
16
COMMENT=	Harmonic tide clock and tide predictor
13
COMMENT=	Harmonic tide clock and tide predictor
Lines 19-100 Link Here
19
16
20
LIB_DEPENDS=	libpng.so:${PORTSDIR}/graphics/png
17
LIB_DEPENDS=	libpng.so:${PORTSDIR}/graphics/png
21
18
22
USES=		gmake tar:bzip2 compiler:gcc-c++11-lib
19
USES=		compiler:c++0x gmake libtool tar:bzip2
23
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
24
21
CONFIGURE_ENV=	ac_cv_header_tcd_h=yes \
25
CPPFLAGS+=	-I../${TCD_DISTNAME}
22
		ac_cv_lib_tcd_get_tide_db_header=yes
26
LDFLAGS+=	-L../${TCD_DISTNAME}/.libs -L${LOCALBASE}/lib
23
INSTALL_TARGET=	install-strip
27
24
USE_LDCONFIG=	yes
28
TCD_DISTNAME=	libtcd-2.2.5
25
29
HARM_DISTNAME=	harmonics-dwf-20131228
26
CFLAGS+=	-Wno-deprecated-declarations
27
CPPFLAGS+=	-I${TCD_WRKSRC} $$(libpng-config --I_opts) \
28
		-I${LOCALBASE}/include
29
LDFLAGS+=	-L${TCD_WRKSRC}/.libs $$(libpng-config --L_opts) \
30
		-L${LOCALBASE}/lib
31
32
OPTIONS_DEFINE=		WVS X11
33
OPTIONS_DEFAULT=	X11
34
OPTIONS_SUB=		yes
35
36
WVS_DESC=		Use world vector shoreline data (37MB)
37
WVS_DISTFILES=		${WVS_DISTNAME}${EXTRACT_SUFX}
38
X11_USE=		xorg=xaw,xpm
39
X11_CONFIGURE_WITH=	x
40
41
TCD_DISTNAME=	libtcd-2.2.6-r2
42
TCD_WRKSRC=	${WRKDIR}/${TCD_DISTNAME:C/-r[0-9]+//}
43
HARM_DISTNAME=	harmonics-dwf-20131228-free
44
HARM_WRKSRC=	${WRKDIR}/${HARM_DISTNAME:C/-free//}
30
WVS_DISTNAME=	wvs
45
WVS_DISTNAME=	wvs
31
46
32
OPTIONS_DEFINE=	WVS X11
33
OPTIONS_DEFAULT=X11
34
WVS_DESC=	Use world vector shoreline data (37MB)
35
36
.include <bsd.port.options.mk>
47
.include <bsd.port.options.mk>
37
48
38
.if ${PORT_OPTIONS:MWVS}
49
.if ${PORT_OPTIONS:MX11}
39
DISTFILES+=	${WVS_DISTNAME}${EXTRACT_SUFX}
50
DESKTOP_ENTRIES="XTide" "" "${PREFIX}/share/pixmaps/xtide.png" "xtide" "" ""
40
PLIST_SUB+=	WVS=""
41
.else
42
PLIST_SUB+=	WVS="@comment "
43
.endif
44
45
.if ! ${PORT_OPTIONS:MX11}
46
ALL_TARGET+=	tide xttpd
47
PLIST_SUB+=	X11="@comment "
48
.else
49
USE_XORG+=	xpm xaw
50
PLIST_SUB+=	X11=""
51
CFLAGS+=	-I${LOCALBASE}/include
52
.endif
51
.endif
53
52
54
post-extract:
55
	@${LN} -sf ../${HARM_DISTNAME}/${HARM_DISTNAME}-free.tcd ${WRKSRC}/harmonics.tcd
56
57
post-patch:
53
post-patch:
58
	@${REINPLACE_CMD} -e '/if test/s|==|=|g' ${WRKDIR}/${TCD_DISTNAME}/configure
54
	@${REINPLACE_CMD} -e \
59
	@${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/configure
55
		'/if test/s|==|=|g' ${TCD_WRKSRC}/configure
60
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/Global.cc
56
	@${REINPLACE_CMD} -e \
57
		's|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/configure
58
	@${REINPLACE_CMD} -e \
59
		's|"/etc/|"${PREFIX}/etc/| ; \
60
		 s| /etc/| ${PREFIX}/etc/|' ${WRKSRC}/libxtide/Global.cc
61
61
62
pre-configure:
62
pre-configure:
63
	@cd ${WRKDIR}/${TCD_DISTNAME} \
63
	@(cd ${TCD_WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \
64
		&& ${SETENV} ${CONFIGURE_ENV} \
64
		CC="${CC}" CFLAGS="${CFLAGS} -fPIC" \
65
			CC="${CC}" CFLAGS="${CFLAGS}" \
65
		CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -fPIC" \
66
			CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
66
		${SH} ./configure ${CONFIGURE_ARGS})
67
			${SH} ./configure --disable-shared \
67
68
			${CONFIGURE_ARGS} \
68
pre-build:
69
		&& ${MKDIR} ${WRKDIR}/${TCD_DISTNAME}/.libs \
69
	@(cd ${TCD_WRKSRC} && ${DO_MAKE_BUILD} ${ALL_TARGET})
70
		&& ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
70
71
71
post-build:
72
post-configure:
72
	@${ECHO_CMD} -n > ${WRKDIR}/xtide.conf.sample
73
	@${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
73
	@${ECHO_CMD} "${DATADIR}/harmonics.tcd" >> ${WRKDIR}/xtide.conf.sample
74
		< ${FILESDIR}/xtide.conf.example > ${WRKDIR}/xtide.conf.example
74
	@${ECHO_CMD} "${DATADIR}/wvs" >> ${WRKDIR}/xtide.conf.sample
75
75
	@${LN} -sf ${HARM_DISTNAME}.tcd ${HARM_WRKSRC}/harmonics.tcd
76
do-install:
76
	@${LN} -sf icon_48x48_orig.png ${WRKSRC}/iconsrc/xtide.png
77
	${INSTALL_PROGRAM} ${WRKSRC}/tide ${STAGEDIR}${PREFIX}/bin
77
78
.if ${PORT_OPTIONS:MX11}
78
pre-install:
79
	${INSTALL_PROGRAM} ${WRKSRC}/xtide ${STAGEDIR}${PREFIX}/bin
79
	@(cd ${TCD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
80
	${INSTALL_MAN} ${WRKSRC}/xtide.1 ${STAGEDIR}${MANPREFIX}/man/man1
80
		${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
81
.endif
82
	${INSTALL_PROGRAM} ${WRKSRC}/xttpd ${STAGEDIR}${PREFIX}/bin
83
	${INSTALL_MAN} ${WRKSRC}/tide.1 ${STAGEDIR}${MANPREFIX}/man/man1
84
	${INSTALL_MAN} ${WRKSRC}/xttpd.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
85
	@${MKDIR} ${STAGEDIR}${DATADIR}
86
	${INSTALL_DATA} ${WRKSRC}/harmonics.tcd ${STAGEDIR}${DATADIR}
87
	${INSTALL_DATA} ${WRKDIR}/xtide.conf.example ${STAGEDIR}${PREFIX}/etc
88
81
89
post-install:
82
post-install:
83
	(cd ${WRKDIR} && ${INSTALL_DATA} xtide.conf.sample \
84
		${STAGEDIR}${PREFIX}/etc)
85
	@${MKDIR} ${STAGEDIR}${DATADIR}
86
	(cd ${HARM_WRKSRC} && ${INSTALL_DATA} harmonics.tcd \
87
		${STAGEDIR}${DATADIR})
90
.if ${PORT_OPTIONS:MWVS}
88
.if ${PORT_OPTIONS:MWVS}
91
	@${MKDIR} ${STAGEDIR}${DATADIR}/wvs
89
	@${MKDIR} ${STAGEDIR}${DATADIR}/wvs
92
	${INSTALL_DATA} ${WRKDIR}/wvs1.dat ${STAGEDIR}${DATADIR}/wvs
90
	(cd ${WRKDIR} && ${INSTALL_DATA} wvs*.dat \
93
	${INSTALL_DATA} ${WRKDIR}/wvs12.dat ${STAGEDIR}${DATADIR}/wvs
91
		${STAGEDIR}${DATADIR}/wvs)
94
	${INSTALL_DATA} ${WRKDIR}/wvs250k.dat ${STAGEDIR}${DATADIR}/wvs
92
.endif
95
	${INSTALL_DATA} ${WRKDIR}/wvs3.dat ${STAGEDIR}${DATADIR}/wvs
93
.if ${PORT_OPTIONS:MX11}
96
	${INSTALL_DATA} ${WRKDIR}/wvs43.dat ${STAGEDIR}${DATADIR}/wvs
94
	(cd ${WRKSRC}/iconsrc && ${INSTALL_DATA} xtide.png \
97
	${INSTALL_DATA} ${WRKDIR}/wvsfull.dat ${STAGEDIR}${DATADIR}/wvs
95
		${STAGEDIR}${PREFIX}/share/pixmaps)
98
.endif
96
.endif
99
97
100
.include <bsd.port.mk>
98
.include <bsd.port.mk>
(-)astro/xtide/distinfo (-4 / +4 lines)
Lines 1-7 Link Here
1
SHA256 (xtide-2.13.2.tar.bz2) = fabf6b3097bb345598649ea55d1f2db269cbb651cddd73c60a9768088173d542
1
SHA256 (xtide-2.14.tar.bz2) = b69ebd73e3798be5996a22c63b619537780ec8ed1ec5b92decf15fd4bc61320f
2
SIZE (xtide-2.13.2.tar.bz2) = 481183
2
SIZE (xtide-2.14.tar.bz2) = 695309
3
SHA256 (libtcd-2.2.5-r3.tar.bz2) = f837aa45421236732580e6fa73b79f539b9e778bebe22dbd3ca43b2c6a550e9e
3
SHA256 (libtcd-2.2.6-r2.tar.bz2) = 4dcc2e2f93a83063f5b77a678bcc585af753d92fe7905ed66ecf7af3c5c389cf
4
SIZE (libtcd-2.2.5-r3.tar.bz2) = 300804
4
SIZE (libtcd-2.2.6-r2.tar.bz2) = 304256
5
SHA256 (harmonics-dwf-20131228-free.tar.bz2) = 3185a471e51dffab37b7503e02b901858945ff33687345cf290e429346c99250
5
SHA256 (harmonics-dwf-20131228-free.tar.bz2) = 3185a471e51dffab37b7503e02b901858945ff33687345cf290e429346c99250
6
SIZE (harmonics-dwf-20131228-free.tar.bz2) = 511292
6
SIZE (harmonics-dwf-20131228-free.tar.bz2) = 511292
7
SHA256 (wvs.tar.bz2) = 4e996ce2e608d612ba78e35cdf50c2c73b01fce06bd5b561a7fe957ea75d6d75
7
SHA256 (wvs.tar.bz2) = 4e996ce2e608d612ba78e35cdf50c2c73b01fce06bd5b561a7fe957ea75d6d75
(-)astro/xtide/files/patch-Global.cc (-24 lines)
Lines 1-24 Link Here
1
--- Global.cc.orig	2010-09-14 16:49:16.000000000 +0200
2
+++ Global.cc	2010-09-14 16:50:18.000000000 +0200
3
@@ -203,7 +203,7 @@
4
 #ifdef UseLocalFiles
5
   static const char confFile[] = "xtide.conf";
6
 #else
7
-  static const char confFile[] = "/etc/xtide.conf";
8
+  static const char confFile[] = "%%PREFIX%%/etc/xtide.conf";
9
 #endif
10
   static bool firstCall (true);
11
   static SafeVector<Dstr> xtideConfLines (2U);
12
@@ -390,10 +390,10 @@
13
     break;
14
   case Error::NO_HFILE_PATH:
15
     text_out += "NO_HFILE_PATH\n\
16
-If /etc/xtide.conf is not provided, you must set the environment variable\n\
17
+If %%PREFIX%%/etc/xtide.conf is not provided, you must set the environment variable\n\
18
 HFILE_PATH to point to your harmonics files.  Example:\n\
19
   export HFILE_PATH=/usr/local/share/xtide/harmonics.tcd\n\
20
-Please refer to the documentation for usage of /etc/xtide.conf.";
21
+Please refer to the documentation for usage of %%PREFIX%%/etc/xtide.conf.";
22
     break;
23
   case Error::NO_HFILE_IN_PATH:
24
     text_out += "NO_HFILE_IN_PATH\n\
(-)astro/xtide/files/xtide.conf.example (-2 lines)
Lines 1-2 Link Here
1
%%PREFIX%%/share/xtide/harmonics.tcd
2
%%PREFIX%%/share/xtide/wvs
(-)astro/xtide/pkg-plist (-4 / +65 lines)
Lines 1-9 Link Here
1
bin/tide
1
bin/tide
2
%%X11%%bin/xtide
2
%%X11%%bin/xtide
3
bin/xttpd
3
@sample etc/xtide.conf.sample
4
include/libxtide/Amplitude.hh
5
include/libxtide/Angle.hh
6
include/libxtide/Banner.hh
7
include/libxtide/BetterMap.hh
8
include/libxtide/Calendar.hh
9
include/libxtide/CalendarFormC.hh
10
include/libxtide/CalendarFormH.hh
11
include/libxtide/CalendarFormL.hh
12
include/libxtide/CalendarFormNotC.hh
13
include/libxtide/CalendarFormT.hh
14
include/libxtide/ClientSideFont.hh
15
include/libxtide/Colors.hh
16
include/libxtide/Configurable.hh
17
include/libxtide/Constituent.hh
18
include/libxtide/ConstituentSet.hh
19
include/libxtide/Coordinates.hh
20
include/libxtide/CurrentBearing.hh
21
include/libxtide/Date.hh
22
include/libxtide/Dstr.hh
23
include/libxtide/Errors.hh
24
include/libxtide/Global.hh
25
include/libxtide/Graph.hh
26
include/libxtide/HarmonicsFile.hh
27
include/libxtide/HarmonicsPath.hh
28
include/libxtide/Interval.hh
29
include/libxtide/MetaField.hh
30
include/libxtide/ModeFormat.hh
31
include/libxtide/Nullable.hh
32
include/libxtide/NullableInterval.hh
33
include/libxtide/NullablePredictionValue.hh
34
include/libxtide/Offsets.hh
35
include/libxtide/PixelatedGraph.hh
36
include/libxtide/PredictionValue.hh
37
include/libxtide/RGBGraph.hh
38
include/libxtide/SVGGraph.hh
39
include/libxtide/SafeVector.hh
40
include/libxtide/Settings.hh
41
include/libxtide/Skycal.hh
42
include/libxtide/Speed.hh
43
include/libxtide/Station.hh
44
include/libxtide/StationIndex.hh
45
include/libxtide/StationRef.hh
46
include/libxtide/SubordinateStation.hh
47
include/libxtide/TTYGraph.hh
48
include/libxtide/TideEvent.hh
49
include/libxtide/TideEventsOrganizer.hh
50
include/libxtide/Timestamp.hh
51
include/libxtide/Units.hh
52
include/libxtide/Year.hh
53
include/libxtide/autoconf-defines.h
54
include/libxtide/config.hh
55
include/libxtide/libxtide.hh
56
include/libxtide/rgb.hh
57
include/libxtide/xmlparser.hh
58
include/tcd.h
59
lib/libtcd.a
60
lib/libtcd.so
61
lib/libtcd.so.1
62
lib/libxtide.a
63
lib/libxtide.so
64
lib/libxtide.so.0
65
lib/libxtide.so.0.0.0
4
man/man1/tide.1.gz
66
man/man1/tide.1.gz
5
%%X11%%man/man1/xtide.1.gz
67
%%X11%%man/man1/xtide.1.gz
6
man/man8/xttpd.8.gz
68
man/man8/xttpd.8.gz
69
sbin/xttpd
70
%%X11%%share/pixmaps/xtide.png
7
%%DATADIR%%/harmonics.tcd
71
%%DATADIR%%/harmonics.tcd
8
%%WVS%%%%DATADIR%%/wvs/wvs1.dat
72
%%WVS%%%%DATADIR%%/wvs/wvs1.dat
9
%%WVS%%%%DATADIR%%/wvs/wvs12.dat
73
%%WVS%%%%DATADIR%%/wvs/wvs12.dat
Lines 11-16 Link Here
11
%%WVS%%%%DATADIR%%/wvs/wvs3.dat
75
%%WVS%%%%DATADIR%%/wvs/wvs3.dat
12
%%WVS%%%%DATADIR%%/wvs/wvs43.dat
76
%%WVS%%%%DATADIR%%/wvs/wvs43.dat
13
%%WVS%%%%DATADIR%%/wvs/wvsfull.dat
77
%%WVS%%%%DATADIR%%/wvs/wvsfull.dat
14
@unexec if cmp -s %D/etc/xtide.conf %D/etc/xtide.conf.example ; then rm -f %D/etc/xtide.conf ; fi
15
etc/xtide.conf.example
16
@exec if [ ! -f %D/etc/xtide.conf ]; then cp -p %D/%F %B/xtide.conf; fi

Return to bug 197414