2002-09-23 15:41:15 +02:00
|
|
|
# $NetBSD: Makefile,v 1.38 2002/09/23 13:41:15 markd Exp $
|
1998-12-04 12:36:03 +01:00
|
|
|
|
2002-09-09 02:59:00 +02:00
|
|
|
DISTNAME= R-1.5.1
|
2000-04-19 17:30:05 +02:00
|
|
|
CATEGORIES= math
|
2002-04-23 03:14:49 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_R_CRAN:=base/}
|
2000-04-19 17:30:05 +02:00
|
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
|
2002-09-09 02:59:00 +02:00
|
|
|
MAINTAINER= markd@netbsd.org
|
2000-11-03 02:14:51 +01:00
|
|
|
HOMEPAGE= http://www.R-project.org/
|
2001-08-13 12:25:03 +02:00
|
|
|
COMMENT= Statistical language for data analysis and graphics
|
2000-04-19 17:30:05 +02:00
|
|
|
|
2002-06-16 04:56:50 +02:00
|
|
|
#needs FPC code not found in older versions of NetBSD
|
|
|
|
NOT_FOR_PLATFORM= NetBSD-1.[0-4]*-alpha NetBSD-1.5-alpha \
|
|
|
|
NetBSD-1.5.*-alpha NetBSD-1.5[A-U]-alpha
|
|
|
|
|
2002-09-09 02:59:00 +02:00
|
|
|
USE_BUILDLINK2= # defined
|
2000-04-19 17:30:05 +02:00
|
|
|
USE_X11= # defined
|
|
|
|
USE_PERL5= # defined
|
|
|
|
USE_GMAKE= # defined
|
2001-07-23 15:14:44 +02:00
|
|
|
USE_GNU_READLINE= # uses callback interface
|
2000-04-19 17:30:05 +02:00
|
|
|
|
|
|
|
GNU_CONFIGURE= # defined
|
2000-08-12 01:02:37 +02:00
|
|
|
CONFIGURE_ARGS+= --with-x
|
|
|
|
CONFIGURE_ARGS+= --with-readline
|
2001-07-23 15:14:44 +02:00
|
|
|
CONFIGURE_ARGS+= --with-tcltk
|
2002-09-09 02:59:00 +02:00
|
|
|
CONFIGURE_ARGS+= --with-tcl-config=${BUILDLINK_PREFIX.tcl}/lib/tclConfig.sh
|
|
|
|
CONFIGURE_ARGS+= --with-tk-config=${BUILDLINK_PREFIX.tk}/lib/tkConfig.sh
|
2001-07-23 15:14:44 +02:00
|
|
|
CONFIGURE_ARGS+= --without-gnome # not yet stable
|
|
|
|
CONFIGURE_ENV+= XMKMF="${XMKMF}"
|
|
|
|
|
|
|
|
# Use BLAS (math/blas)
|
|
|
|
#
|
2000-08-12 01:02:37 +02:00
|
|
|
CONFIGURE_ARGS+= --without-atlas
|
2002-09-09 02:59:00 +02:00
|
|
|
CONFIGURE_ARGS+= --with-blas=${BUILDLINK_PREFIX.blas}/lib/libblas.a
|
2000-08-12 01:02:37 +02:00
|
|
|
CONFIGURE_ARGS+= --without-blas_risc
|
2000-04-19 17:30:05 +02:00
|
|
|
CONFIGURE_ARGS+= --without-dxml
|
2000-08-12 01:02:37 +02:00
|
|
|
CONFIGURE_ARGS+= --without-libmoto
|
|
|
|
|
2001-07-23 15:14:44 +02:00
|
|
|
# Work around missing MAIN__() definition used in -lF77 by AC_CHECK_LIB.
|
|
|
|
CONFIGURE_ENV+= ac_cv_lib_blas_dgemm=yes
|
|
|
|
CONFIGURE_ENV+= ac_cv_lib_blas_dgemm_=yes
|
2000-08-12 01:02:37 +02:00
|
|
|
|
2001-07-23 15:14:44 +02:00
|
|
|
# Pass the Fortran compiler to the configure script in case it's overridden
|
|
|
|
# by the package builder.
|
|
|
|
#
|
|
|
|
USE_FORTRAN= # defined
|
1998-12-04 12:36:03 +01:00
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
# R_PAPERSIZE can be: A4, Letter, Legal, Executive
|
|
|
|
#
|
|
|
|
.if defined(PAPERSIZE)
|
2000-04-19 17:30:05 +02:00
|
|
|
R_PAPERSIZE?= ${PAPERSIZE}
|
1999-06-09 02:45:08 +02:00
|
|
|
.else
|
2000-04-19 17:30:05 +02:00
|
|
|
R_PAPERSIZE?= A4
|
1999-05-26 01:45:05 +02:00
|
|
|
.endif
|
1998-12-04 12:36:03 +01:00
|
|
|
.if (${R_PAPERSIZE} == "Letterdj")
|
2000-04-19 17:30:05 +02:00
|
|
|
R_PAPERSIZE= Letter
|
1998-12-04 12:36:03 +01:00
|
|
|
.endif
|
2000-04-19 17:30:05 +02:00
|
|
|
CONFIGURE_ENV+= R_PAPERSIZE="${R_PAPERSIZE}"
|
1998-12-04 12:36:03 +01:00
|
|
|
|
2000-08-12 01:02:37 +02:00
|
|
|
# These macros are used during the build, so strip off the -o,-g flags.
|
|
|
|
#
|
|
|
|
INSTALL_DATA= ${INSTALL} ${COPY} -m ${SHAREMODE}
|
|
|
|
INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE}
|
2000-04-19 17:30:05 +02:00
|
|
|
|
2000-08-16 21:04:42 +02:00
|
|
|
PLIST_SRC= ${WRKDIR}/.PLIST_SRC
|
|
|
|
R_LIBDIR= ${PREFIX}/lib/R
|
|
|
|
INSTALL_DIRS= ${R_LIBDIR}
|
|
|
|
|
2002-09-09 02:59:00 +02:00
|
|
|
# R does ugly things in the configure to get the default list of arguments
|
|
|
|
# for linking Fortran, which exposes the buildlink2 tricks so clean up
|
|
|
|
# afterwards
|
|
|
|
#
|
|
|
|
post-configure:
|
|
|
|
( cd ${WRKSRC}; \
|
|
|
|
for file in src/scripts/R.sh src/scripts/f77 etc/Makeconf; do \
|
|
|
|
${SED} -e "s|${BUILDLINK_X11_DIR}/|${X11BASE}/|g" \
|
|
|
|
-e "s|${BUILDLINK_X11PKG_DIR}/|${X11BASE}/|g" \
|
|
|
|
-e "s|${BUILDLINK_DIR}/|${LOCALBASE}/|g" $${file} > $${file}.fix; \
|
|
|
|
${MV} $${file}.fix $${file}; \
|
|
|
|
done; \
|
|
|
|
)
|
2001-07-23 15:14:44 +02:00
|
|
|
|
2000-08-16 21:04:42 +02:00
|
|
|
# Generate the PLIST dynamically as it changes in each version only in a
|
|
|
|
# specific subtree. This will make maintaining this package a little easier
|
|
|
|
# when updating.
|
|
|
|
#
|
1998-12-21 11:29:39 +01:00
|
|
|
post-install:
|
2000-08-16 21:04:42 +02:00
|
|
|
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${R_LIBDIR}
|
|
|
|
${RM} -f ${PLIST_SRC}
|
|
|
|
${CAT} ${PKGDIR}/PLIST > ${PLIST_SRC}
|
2001-07-23 15:14:44 +02:00
|
|
|
( cd ${PREFIX}; \
|
|
|
|
for dir in ${INSTALL_DIRS}; do \
|
2002-09-23 15:41:15 +02:00
|
|
|
${FIND} $${dir#${PREFIX}/} \( -type f -o -type l \) -print; \
|
2001-07-23 15:14:44 +02:00
|
|
|
done; \
|
2002-04-23 03:14:49 +02:00
|
|
|
) | ${GREP} -v "lib/R/doc/html/packages.html" | \
|
|
|
|
${GREP} -v "lib/R/doc/html/search/index.txt" | \
|
|
|
|
${SORT} -u >> ${PLIST_SRC}
|
2002-05-24 15:24:36 +02:00
|
|
|
${ECHO} "@unexec ${RM} -f %D/lib/R/doc/html/packages.html" >> ${PLIST_SRC}
|
|
|
|
${ECHO} "@unexec ${RM} -f %D/lib/R/doc/html/search/index.txt" >> ${PLIST_SRC}
|
2001-07-23 15:14:44 +02:00
|
|
|
( cd ${PREFIX}; \
|
|
|
|
for dir in ${INSTALL_DIRS}; do \
|
|
|
|
${FIND} $${dir#${PREFIX}/} -type d -print; \
|
|
|
|
done; \
|
|
|
|
) | ${SORT} -ur | ${SED} -e "s|^|@dirrm |" >> ${PLIST_SRC}
|
2002-04-23 03:14:49 +02:00
|
|
|
${ECHO} "@exec R CMD ${PERL5} %D/lib/R/share/perl/build-help.pl --htmllists 2>/dev/null" >> ${PLIST_SRC}
|
|
|
|
${ECHO} "@exec ${CAT} %D/lib/R/library/*/CONTENTS > %D/lib/R/doc/html/search/index.txt 2>/dev/null" >> ${PLIST_SRC}
|
1998-12-04 12:36:03 +01:00
|
|
|
|
2002-09-09 02:59:00 +02:00
|
|
|
.include "../../devel/readline/buildlink2.mk"
|
|
|
|
.include "../../devel/zlib/buildlink2.mk"
|
|
|
|
.include "../../graphics/jpeg/buildlink2.mk"
|
|
|
|
.include "../../graphics/png/buildlink2.mk"
|
|
|
|
.include "../../math/blas/buildlink2.mk"
|
|
|
|
.include "../../x11/tk/buildlink2.mk"
|
1998-12-04 12:36:03 +01:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|