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> |