aboutsummaryrefslogtreecommitdiff
path: root/misc/astrolog/Makefile
blob: b52920227973cdb6f28cc7b38b321c9c74223657 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# New ports collection makefile for:    astrolog
# See some useful stuff at:
# http://rpkalf2.mach.uni-karlsruhe.de/~ferber/astrolog/
#
# Date created:         31 July 1995
# Whom:                 faulkner@cactus.org
#
# $FreeBSD$
#

PORTNAME=	astrolog
PORTVERSION=	5.40
PORTREVISION=	7
CATEGORIES=	misc
MASTER_SITES=	http://www.astrolog.org/ftp/ephem/:ephem \
		http://www.astrolog.org/ftp/:dist
EXTRACT_ONLY=	ast54unx.shr
EPHEM=		ephemall.zip
DISTFILES=	${EXTRACT_ONLY}:dist ${EPHEM}:ephem

MAINTAINER=	ache@FreeBSD.org
COMMENT=	An astrology program for X11 and alpha-numeric terminals

.include <bsd.port.pre.mk>

.if ${OSVERSION} >= 700042
# gcc 4.2.0 loop optimization limits range bug with -O2
CFLAGS+=-fno-tree-vrp
.endif

USE_ZIP=	yes
.if !defined(WITHOUT_X11)
USE_XLIB=	yes
MAKE_ARGS=	-DX11
.endif
EXTRACT_CMD=	${SH}
EXTRACT_BEFORE_ARGS=	# empty
EXTRACT_AFTER_ARGS=	# empty
DIST_SUBDIR=	astrolog
ALL_TARGET=	astrolog
NO_WRKSUBDIR=	yes

post-patch:
	@${REINPLACE_CMD} -e "s@malloc.h@stdlib.h@g" \
		${WRKSRC}/astrolog.h ${WRKSRC}/placalc.h

do-install:
	-@${MKDIR} ${PREFIX}/lib/astrolog
	${UNZIP_CMD} -qao ${_DISTDIR}/${EPHEM} -d ${PREFIX}/lib/astrolog
	cd ${WRKSRC}; \
		${INSTALL_DATA} astrolog.dat ${PREFIX}/lib/astrolog/astrolog.dat-dist; \
		if [ ! -f ${PREFIX}/lib/astrolog/astrolog.dat ] ; then \
			${INSTALL_DATA} astrolog.dat ${PREFIX}/lib/astrolog; \
		fi
	cd ${WRKSRC} && ${INSTALL_PROGRAM} astrolog ${PREFIX}/bin
	-@${MKDIR} ${PREFIX}/share/doc/astrolog
	cd ${WRKSRC} && \
		${INSTALL_DATA} Helpfile.540 ${PREFIX}/share/doc/astrolog
	cd ${WRKSRC} && \
		${INSTALL_DATA} Update.540 ${PREFIX}/share/doc/astrolog
	cd ${WRKSRC} && \
		${INSTALL_DATA} README.540 ${PREFIX}/share/doc/astrolog
	@${ECHO_MSG}
	@${ECHO_MSG} "See the file ${PREFIX}/share/doc/astrolog/Helpfile.540 for help"
	@${ECHO_MSG} "and tune ${PREFIX}/lib/astrolog/astrolog.dat"

.include <bsd.port.post.mk>