[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / lang / f2c

File: [cvs.NetBSD.org] / pkgsrc / lang / f2c / Makefile (download)

Revision 1.65, Thu Sep 12 13:10:19 2013 UTC (6 years, 4 months ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3
Changes since 1.64: +5 -3 lines

Only install catman page if catinstall is set.

# $NetBSD: Makefile,v 1.65 2013/09/12 13:10:19 jperkin Exp $

DISTNAME=	f2c-20100903	# see notes below
PKGREVISION=	1
CATEGORIES=	lang
MASTER_SITES=	${MASTER_SITE_LOCAL}

MAINTAINER=	dmcmahill@NetBSD.org
HOMEPAGE=	http://www.netlib.org/f2c/index.html
COMMENT=	Fortran to C compiler including a script to emulate f77

CONFLICTS=	egcs-current-19980608

WRKSRC=		${WRKDIR}/f2c

BUILD_DIRS=	src
USE_BSD_MAKEFILE=	yes
USE_TOOLS=		nroff
INSTALLATION_DIRS=	bin share/doc/f2c ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1

.include "../../mk/bsd.prefs.mk"

# XXX(jmmv): This is a very ugly workaround.  CPP should probably default to
# /usr/bin/cpp in OS X.
.if ${OPSYS} == "Darwin"
F2C_F77_CPP?=	/usr/bin/cpp
.else
F2C_F77_CPP=	${CPP}
.endif

post-extract:
	@${CP} ${FILESDIR:Q}/f2c.mk ${WRKSRC}/src/Makefile
	@${CP} ${FILESDIR:Q}/gram.c ${WRKSRC}/src/gram.c
	@mv ${WRKSRC}/src/.depend  ${WRKSRC}/src/depend.orig
	@mv ${WRKSRC}/src/f2c.1 ${WRKSRC}/src/f2c.1.orig

# Handle f2c-f77 script:
post-build:
	${SED} -e 's;@PREFIX@;${PREFIX};g' \
	  -e 's;@CC@;${CC};g' -e 's;@CPP@;${F2C_F77_CPP};g' \
	  -e "s;@SHELL@;${TOOLS_PLATFORM.sh:Q};g" \
	 ${FILESDIR}/f2c-f77.in > ${WRKSRC}/f2c-f77

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/src/f2c ${DESTDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/f2c-f77 ${DESTDIR}${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/f2c.1t ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/f2c.1
.if !empty(MANINSTALL:Mcatinstall)
.  if defined(CATMAN_SECTION_SUFFIX) && !empty(CATMAN_SECTION_SUFFIX:M[Yy][Ee][Ss])
	${INSTALL_DATA} ${WRKSRC}/f2c.1  ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1/f2c.1
.  else
	${INSTALL_DATA} ${WRKSRC}/f2c.1  ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1/f2c.0
.  endif
.endif
.for f in changes f2c.ps f2c.pdf
	${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/share/doc/f2c/${f}
.endfor

# Note.  the distfile is kept locally because it is
# created "on the fly" by the real master site with
# no version number included.  This makes it difficult
# at best to use the real master site.  The distfile
# was created by:
#   ftp ftp://ftp.netlib.org/f2c.tar
#   tar -xvf f2c.tar f2c/00lastchange
#   more f2c/00lastchange
#
#read what the last change date was.
#
#   mv f2c.tar f2c-yyyymmdd.tar
#   gzip --best f2c-yyyymmdd.tar

.include "../../mk/compiler.mk"

.if !empty(PKGSRC_COMPILER:Mclang)
BUILDLINK_TRANSFORM+=	rm:-Werror
.endif

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