2012-03-20 18:26:19 +01:00
|
|
|
# $NetBSD: Makefile,v 1.9 2012/03/20 17:26:19 hans Exp $
|
2006-11-21 14:44:14 +01:00
|
|
|
|
|
|
|
DISTNAME= g95_source
|
2011-01-23 10:42:10 +01:00
|
|
|
VERSION= 0.92
|
2006-11-21 14:44:14 +01:00
|
|
|
PKGNAME= g95-${VERSION}
|
|
|
|
CATEGORIES= lang
|
|
|
|
EXTRACT_SUFX.g95_source= .tgz
|
2006-12-07 15:49:39 +01:00
|
|
|
DIST_SUBDIR= ${PKGNAME_NOREV}
|
2006-11-21 14:44:14 +01:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX.g95_source}
|
|
|
|
DISTFILES+= gcc-core-4.0.3.tar.gz
|
2011-01-23 10:42:10 +01:00
|
|
|
SITES.g95_source.tgz= http://ftp.g95.org/v0.92/
|
2006-11-21 14:44:14 +01:00
|
|
|
SITES.gcc-core-4.0.3.tar.gz= ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.0.3/
|
|
|
|
|
|
|
|
MAINTAINER= wennmach@NetBSD.org
|
|
|
|
HOMEPAGE= http://www.g95.org/
|
|
|
|
COMMENT= Fortran 95 compiler from g95.org
|
|
|
|
|
2008-09-07 03:33:51 +02:00
|
|
|
PKG_DESTDIR_SUPPORT= user-destdir
|
|
|
|
|
2006-11-21 14:44:14 +01:00
|
|
|
GNU_CONFIGURE= YES
|
2008-04-16 20:47:18 +02:00
|
|
|
USE_TOOLS+= gmake gtar
|
2006-11-21 14:44:14 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
|
|
|
|
PLIST_SUBST+= MACHINE_GNU_PLATFORM=${MACHINE_GNU_PLATFORM:Q}
|
|
|
|
|
|
|
|
GCC_DIR= ${WRKDIR}/gcc-4.0.3
|
|
|
|
GCC_G95_DIR= ${GCC_DIR}/g95
|
|
|
|
GCC_CONFIGURE_SCRIPT= ../configure
|
|
|
|
GCC_CONFIGURE_ARGS= ${CONFIGURE_ARGS}
|
|
|
|
GCC_CONFIGURE_ARGS+= --enable-languages=c
|
|
|
|
|
2012-03-20 18:26:19 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
.if ${OPSYS} == "SunOS"
|
|
|
|
GCC_CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump
|
|
|
|
GCC_CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld
|
|
|
|
. if !exists(/usr/sfw/bin/gas)
|
|
|
|
GCC_CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as
|
|
|
|
. else
|
|
|
|
GCC_CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2006-11-21 14:44:14 +01:00
|
|
|
CONFIGURE_ARGS+= --with-gcc-dir=${GCC_DIR}
|
|
|
|
|
|
|
|
post-extract:
|
|
|
|
${MKDIR} ${GCC_G95_DIR}
|
2008-04-16 20:47:18 +02:00
|
|
|
cd ${WRKSRC} && ${GTAR} -xzf libf95.a-${VERSION}.tar.gz
|
2006-11-21 14:44:14 +01:00
|
|
|
|
|
|
|
pre-configure:
|
2011-01-23 10:42:10 +01:00
|
|
|
rm -f ${GCC_DIR}/config.sub ${GCC_DIR}/config.guess
|
|
|
|
ln -fs ${PKGSRCDIR}/mk/gnu-config/config.sub ${GCC_DIR}/config.sub
|
|
|
|
ln -fs ${PKGSRCDIR}/mk/gnu-config/config.guess ${GCC_DIR}/config.guess
|
2008-04-16 20:47:18 +02:00
|
|
|
cd ${GCC_G95_DIR} && ${GCC_CONFIGURE_SCRIPT} ${GCC_CONFIGURE_ARGS} && ${GMAKE}
|
2006-11-21 14:44:14 +01:00
|
|
|
|
|
|
|
post-build:
|
2008-04-16 20:47:18 +02:00
|
|
|
cd ${WRKSRC}/libf95.a-${VERSION} && ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} && ${GMAKE}
|
2006-11-21 14:44:14 +01:00
|
|
|
|
|
|
|
post-install:
|
2008-09-07 03:33:51 +02:00
|
|
|
cd ${WRKSRC}/libf95.a-${VERSION} && ${GMAKE} install DESTDIR=${DESTDIR:Q}
|
|
|
|
cd ${DESTDIR}${PREFIX}/bin && ${LN} -sf ${MACHINE_GNU_PLATFORM:Q}-g95 g95
|
|
|
|
cd ${DESTDIR}${PREFIX}/bin && ${LN} -sf ${MACHINE_GNU_PLATFORM:Q}-g95 f95
|
2006-11-21 14:44:14 +01:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|