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

(-)astro/xtide/Makefile (-9 / +30 lines)
Lines 6-16 Link Here
6
#
6
#
7
7
8
PORTNAME=	xtide
8
PORTNAME=	xtide
9
PORTVERSION=	2.8.3
9
PORTVERSION=	2.9.1
10
CATEGORIES=	astro
10
CATEGORIES=	astro
11
MASTER_SITES=	ftp://ftp.flaterco.com/xtide/
11
MASTER_SITES=	ftp://ftp.flaterco.com/xtide/
12
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} harmonics-dwf-20060708.tcd.bz2
12
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
13
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
13
		libtcd-2.2.2.tar.bz2 \
14
		harmonics-dwf-20070318.tcd.bz2
15
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX} \
16
		libtcd-2.2.2.tar.bz2
14
17
15
MAINTAINER=	ports@FreeBSD.org
18
MAINTAINER=	ports@FreeBSD.org
16
COMMENT=	Harmonic tide clock and tide predictor
19
COMMENT=	Harmonic tide clock and tide predictor
Lines 22-49 Link Here
22
USE_GMAKE=	yes
25
USE_GMAKE=	yes
23
GNU_CONFIGURE=	yes
26
GNU_CONFIGURE=	yes
24
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
27
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
28
CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
25
29
26
MAN1=		tide.1 xtide.1
30
MAN1=		tide.1 xtide.1
27
MAN8=		xttpd.8
31
MAN8=		xttpd.8
28
PLIST_FILES=	bin/tide bin/xtide bin/xttpd %%DATADIR%%/harmonics.tcd
32
PLIST_FILES=	bin/tide bin/xtide bin/xttpd %%DATADIR%%/harmonics.tcd
29
PLIST_DIRS=	%%DATADIR%%
33
PLIST_DIRS=	%%DATADIR%%
30
34
35
CPPFLAGS=	-I../libtcd-2.2.2 -I${LOCALBASE}/include/libpng
36
LDFLAGS=	-L../libtcd-2.2.2/.libs -L${LOCALBASE}/lib
37
38
.include <bsd.port.pre.mk>
39
40
.if ${OSVERSION} < 500000
41
IGNORE=		does not compile on 4.x
42
.endif
43
31
post-extract:
44
post-extract:
32
	@${BZCAT} ${DISTDIR}/harmonics-dwf-20060708.tcd.bz2 \
45
	@${BZCAT} ${DISTDIR}/harmonics-dwf-20070318.tcd.bz2 \
33
		> ${WRKSRC}/harmonics.tcd
46
		> ${WRKSRC}/harmonics.tcd
34
47
35
post-patch:
48
post-patch:
49
	@${REINPLACE_CMD} -e 's|== yes|= yes|g' ${WRKDIR}/libtcd-2.2.2/configure
36
	@${REINPLACE_CMD} -e 's|/usr/X11R6|${X11BASE}|g' ${WRKSRC}/configure
50
	@${REINPLACE_CMD} -e 's|/usr/X11R6|${X11BASE}|g' ${WRKSRC}/configure
37
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/TideContext.cc
51
.for file in Global.cc HarmonicsPath.cc wvsrtv.cc
52
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/${file}
53
.endfor
54
55
pre-configure:
56
	@cd ${WRKDIR}/libtcd-2.2.2 \
57
		&& ${SETENV} ${MAKE_ENV} ${SH} ./configure --disable-shared \
58
		&& ${MAKE}
38
59
39
do-install:
60
do-install:
40
	${INSTALL_PROGRAM} ${WRKSRC}/tide ${PREFIX}/bin
61
	${INSTALL_PROGRAM} ${WRKSRC}/tide ${PREFIX}/bin
41
	${INSTALL_PROGRAM} ${WRKSRC}/xtide ${PREFIX}/bin
62
	${INSTALL_PROGRAM} ${WRKSRC}/xtide ${PREFIX}/bin
42
	${INSTALL_PROGRAM} ${WRKSRC}/xttpd ${PREFIX}/bin
63
	${INSTALL_PROGRAM} ${WRKSRC}/xttpd ${PREFIX}/bin
43
	${INSTALL_MAN} ${WRKSRC}/DOCUMENTATION/tide.1 ${MANPREFIX}/man/man1
64
	${INSTALL_MAN} ${WRKSRC}/tide.1 ${MANPREFIX}/man/man1
44
	${INSTALL_MAN} ${WRKSRC}/DOCUMENTATION/xtide.1 ${MANPREFIX}/man/man1
65
	${INSTALL_MAN} ${WRKSRC}/xtide.1 ${MANPREFIX}/man/man1
45
	${INSTALL_MAN} ${WRKSRC}/DOCUMENTATION/xttpd.8 ${MAN8PREFIX}/man/man8
66
	${INSTALL_MAN} ${WRKSRC}/xttpd.8 ${MAN8PREFIX}/man/man8
46
	@${MKDIR} ${DATADIR}
67
	@${MKDIR} ${DATADIR}
47
	${INSTALL_DATA} ${WRKSRC}/harmonics.tcd ${DATADIR}
68
	${INSTALL_DATA} ${WRKSRC}/harmonics.tcd ${DATADIR}
48
69
49
.include <bsd.port.mk>
70
.include <bsd.port.post.mk>
(-)astro/xtide/distinfo (-6 / +9 lines)
Lines 1-6 Link Here
1
MD5 (xtide-2.8.3.tar.bz2) = 653fd807116290ab96bd5aa1bb974315
1
MD5 (xtide-2.9.1.tar.bz2) = 7ccc99dcd77ab76df97124c01ae4a7ca
2
SHA256 (xtide-2.8.3.tar.bz2) = cf99652ec24bf1f19745bd3e482adad5ac76c385d91209d7816e8b65401538cd
2
SHA256 (xtide-2.9.1.tar.bz2) = a7ffdeedaa8905181f8053f7a9ab8598755acf93308d63a2f373eefe2af63732
3
SIZE (xtide-2.8.3.tar.bz2) = 463382
3
SIZE (xtide-2.9.1.tar.bz2) = 384508
4
MD5 (harmonics-dwf-20060708.tcd.bz2) = 7e8acfeb5aa454c1c19fc14bb7263513
4
MD5 (libtcd-2.2.2.tar.bz2) = 4780aa7c88d6816e6b4d2a744859d1e7
5
SHA256 (harmonics-dwf-20060708.tcd.bz2) = f1f9b44df515b7457684a3da5c34f765ef4fd358f429a1510eeb974697d175df
5
SHA256 (libtcd-2.2.2.tar.bz2) = f6647891c9c093302da68cb9b8045cd38064973a25067effa74ff0cde8f44e12
6
SIZE (harmonics-dwf-20060708.tcd.bz2) = 477682
6
SIZE (libtcd-2.2.2.tar.bz2) = 264619
7
MD5 (harmonics-dwf-20070318.tcd.bz2) = cb00b5ba54c388ee4927a1b990f9220d
8
SHA256 (harmonics-dwf-20070318.tcd.bz2) = ae268904c20888c1097f3fc577dffbba15634a1a48b6f7195a4ca33a7ccb914b
9
SIZE (harmonics-dwf-20070318.tcd.bz2) = 487099
(-)astro/xtide/files/patch-Global.cc (+15 lines)
Line 0 Link Here
1
--- Global.cc.orig	Thu Mar 15 09:58:01 2007
2
+++ Global.cc	Fri Mar 23 02:31:17 2007
3
@@ -241,10 +241,10 @@
4
     break;
5
   case Error::NO_HFILE_PATH:
6
     text_out += "NO_HFILE_PATH\n\
7
-If /etc/xtide.conf is not provided, you must set the environment variable\n\
8
+If %%PREFIX%%/etc/xtide.conf is not provided, you must set the environment variable\n\
9
 HFILE_PATH to point to your harmonics files.  Example:\n\
10
   export HFILE_PATH=/usr/local/share/xtide/harmonics.tcd\n\
11
-Please refer to the documentation for usage of /etc/xtide.conf.";
12
+Please refer to the documentation for usage of %%PREFIX%%/etc/xtide.conf.";
13
     break;
14
   case Error::NO_HFILE_IN_PATH:
15
     text_out += "NO_HFILE_IN_PATH\n\
(-)astro/xtide/files/patch-HarmonicsPath.cc (+11 lines)
Line 0 Link Here
1
--- HarmonicsPath.cc.orig	Mon Feb 26 07:51:38 2007
2
+++ HarmonicsPath.cc	Fri Mar 23 02:32:10 2007
3
@@ -30,7 +30,7 @@
4
   Dstr hfile_path (getenv ("HFILE_PATH"));
5
   if (hfile_path.isNull()) {
6
     FILE *configfile;
7
-    if ((configfile = fopen ("/etc/xtide.conf", "r"))) {
8
+    if ((configfile = fopen ("%%PREFIX%%/etc/xtide.conf", "r"))) {
9
       hfile_path.getline (configfile);
10
       fclose (configfile);
11
     }
(-)astro/xtide/files/patch-aa (-31 lines)
Lines 1-31 Link Here
1
*** TideContext.cc.orig	Wed Feb  5 00:53:46 2003
2
--- TideContext.cc	Sun Mar 28 02:09:06 2004
3
***************
4
*** 47,59 ****
5
    Dstr hfile_path (getenv ("HFILE_PATH"));
6
    if (hfile_path.isNull()) {
7
      FILE *configfile;
8
!     if ((configfile = fopen ("/etc/xtide.conf", "r"))) {
9
        hfile_path.getline (configfile);
10
        fclose (configfile);
11
      }
12
    }
13
    if (hfile_path.isNull())
14
!     hfile_path = "harmonics.tcd";
15
    harmonicsPath = new HarmonicsPath (hfile_path);
16
  
17
    homedir = getenv ("HOME");
18
--- 47,59 ----
19
    Dstr hfile_path (getenv ("HFILE_PATH"));
20
    if (hfile_path.isNull()) {
21
      FILE *configfile;
22
!     if ((configfile = fopen ("%%PREFIX%%/etc/xtide.conf", "r"))) {
23
        hfile_path.getline (configfile);
24
        fclose (configfile);
25
      }
26
    }
27
    if (hfile_path.isNull())
28
!     hfile_path = "%%PREFIX%%/share/xtide/harmonics.tcd";
29
    harmonicsPath = new HarmonicsPath (hfile_path);
30
  
31
    homedir = getenv ("HOME");
(-)astro/xtide/files/patch-makefile (-13 lines)
Lines 1-13 Link Here
1
--- Makefile.in.orig	Mon Dec 20 23:15:05 2004
2
+++ Makefile.in	Sat Jul 16 23:47:26 2005
3
@@ -11,8 +11,8 @@
4
 # DEFS should include -Dacceptarg3_t=int (replace with the correct data type)
5
 CXX = @CXX@
6
 CC = @CC@
7
-CXXFLAGS = @extracxxflags@ @DEFS@ -I@includedir@ -Ilibtcd -I@xroot@/include @normalcxxflags@ -c
8
-LDFLAGS = @extraldflags@ -L@libdir@ -L@xlibdir@ @normalldflags@ -o
9
+CXXFLAGS = @CXXFLAGS@ @DEFS@ -I@includedir@ -Ilibtcd -I@xroot@/include @extracxxflags@ -c
10
+LDFLAGS = @LDFLAGS@ -L@libdir@ -L@xlibdir@ @extraldflags@ -o
11
 
12
 # Extra switches and libs determined by configure.in
13
 extraswitches=@extraswitches@
(-)astro/xtide/files/patch-wvsrtv.cc (+11 lines)
Line 0 Link Here
1
--- wvsrtv.cc.orig	Thu Jan  4 11:35:43 2007
2
+++ wvsrtv.cc	Fri Mar 23 02:32:59 2007
3
@@ -651,7 +651,7 @@
4
           }
5
           if (dir[0] == '\0') {
6
             FILE *configfile;
7
-            if ((configfile = fopen ("/etc/xtide.conf", "r"))) {
8
+            if ((configfile = fopen ("%%PREFIX%%/etc/xtide.conf", "r"))) {
9
               if (!fgets (dir, 512, configfile)) {
10
                 fclose (configfile);
11
                 return 0;

Return to bug 110811