summaryrefslogtreecommitdiff
path: root/lang/fort77/Makefile
blob: b9046b62972b8b5f0a7aec5b4e0b63f2d76e5ac5 (plain)
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
# $NetBSD: Makefile,v 1.6 2000/08/21 21:01:31 hubertf Exp $
#

DISTNAME=		fort77-1.14a
CATEGORIES=		lang
MASTER_SITES=		${MASTER_SITE_SUNSITE:=devel/lang/fortran/}

MAINTAINER=		packages@netbsd.org

DEPENDS+=		f2c-*:../../lang/f2c

# on 1.3.X systems there is not shared libf2c, thus use libf2c.a
# from the f2c package.
.if !exists(/usr/bin/f77)
F2CPKGHASNOSHAREDLIB=	-e 's:-lf2c:'${PREFIX}'/lib/libf2c.a:g'
.else
F2CPKGHASNOSHAREDLIB=
.endif

.if exists(/usr/bin/fort77)
IGNORE=			"${PKGNAME} is part of your NetBSD distribution"
.endif

ALL_TARGET=		test

USE_PERL5=		YES

post-patch:
	for f in `${FIND} ${WRKDIR} -type f -print|xargs ${GREP} -l '/usr'`; \
	do \
	  ${SED} -e 's:/usr:'${PREFIX}':g' <$$f >$$f.pdone && \
	  ${MV} $$f.pdone $$f; \
	done
	${SED} -e 's:/lib/cpp:/usr/bin/cpp:g' ${F2CPKGHASNOSHAREDLIB} \
		< ${WRKSRC}/fort77  > ${WRKSRC}/fort77.new
	${MV} ${WRKSRC}/fort77.new ${WRKSRC}/fort77
	${CHMOD} +x ${WRKSRC}/fort77
	${CHMOD} +x ${WRKSRC}/tests/test.pl

.include "../../mk/bsd.pkg.mk"