2002-05-12 14:40:55 -04:00
|
|
|
# New ports collection makefile for: gap
|
|
|
|
# Date created: 28 Apr, 2002
|
|
|
|
# Whom: keith@FreeBSD.org
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= gap
|
2006-11-15 13:53:31 -05:00
|
|
|
PORTVERSION= 4.4.9.${GAP_PKGDATE}
|
2002-05-12 14:40:55 -04:00
|
|
|
CATEGORIES= math
|
2005-04-08 15:50:15 -04:00
|
|
|
MASTER_SITES= ftp://ftp.gap-system.org/pub/gap/gap4/tar.bz2/ \
|
2005-09-04 02:06:30 -04:00
|
|
|
ftp://ftp.stack.nl/pub/users/johans/gap/ \
|
2005-04-08 15:50:15 -04:00
|
|
|
ftp://ftp.gap-system.org/pub/gap/gap4/old/
|
|
|
|
DISTFILES= packages-${GAP_PKGTIME}.tar.bz2 \
|
2006-11-15 13:53:31 -05:00
|
|
|
gap4r4p9.tar.bz2 \
|
2005-05-15 05:49:34 -04:00
|
|
|
xtom1r1p2.tar.bz2
|
2002-05-12 14:40:55 -04:00
|
|
|
DIST_SUBDIR= gap
|
|
|
|
|
2004-12-06 03:07:18 -05:00
|
|
|
MAINTAINER= johans@stack.nl
|
2003-03-07 01:14:21 -05:00
|
|
|
COMMENT= GAP is a system for computational discrete algebra
|
2002-05-12 14:40:55 -04:00
|
|
|
|
2006-04-07 10:04:18 -04:00
|
|
|
OPTIONS= COMPRESSED_TOMLIB "Compress tomlib files" On \
|
|
|
|
ACE "Build binaries for ace" Off \
|
|
|
|
COHOMOLO "Build binaries for cohomolo" Off \
|
|
|
|
EDIM "Build binaries for edim" Off \
|
|
|
|
EXAMPLE "Build binaries for example" Off \
|
|
|
|
KBMAG "Build binaries for kbmag" Off \
|
|
|
|
PARGAP "Build binaries for pargap" Off \
|
|
|
|
XGAP "Build binaries for xgap" Off
|
2006-10-08 06:43:19 -04:00
|
|
|
# GRAPE "Build binaries for grape" Off
|
2006-04-07 10:04:18 -04:00
|
|
|
|
|
|
|
#todo anupq fplsa/guava/nq (malloc.h build error) qaos
|
|
|
|
|
2002-05-12 14:40:55 -04:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2004-12-06 03:07:18 -05:00
|
|
|
GAP_VERSION= gap4r4
|
2007-06-17 17:21:51 -04:00
|
|
|
GAP_PKGTIME= 2007_06_11-11_49_UTC
|
2005-04-08 15:50:15 -04:00
|
|
|
GAP_PKGDATE= ${GAP_PKGTIME:C/-.*//:S/_//g}
|
2004-12-06 03:07:18 -05:00
|
|
|
GAP_WRKSRC= ${WRKSRC}/${GAP_VERSION}
|
|
|
|
GAP_LIBDIR= ${PREFIX}/lib/${GAP_VERSION}
|
2005-02-15 03:52:48 -05:00
|
|
|
PLIST_FILES= bin/gap
|
2004-12-06 03:07:18 -05:00
|
|
|
|
2002-05-12 14:40:55 -04:00
|
|
|
do-extract:
|
|
|
|
(${MKDIR} ${WRKSRC}; \
|
|
|
|
cd ${WRKSRC}; \
|
2006-11-15 13:53:31 -05:00
|
|
|
${TAR} xyf ${DISTDIR}/${DIST_SUBDIR}/gap4r4p9.tar.bz2; \
|
2005-05-15 05:49:34 -04:00
|
|
|
${TAR} xyf ${DISTDIR}/${DIST_SUBDIR}/xtom1r1p2.tar.bz2 ; \
|
2004-12-06 03:07:18 -05:00
|
|
|
cd ${GAP_WRKSRC}/pkg; \
|
2005-04-08 15:50:15 -04:00
|
|
|
${TAR} xyf ${DISTDIR}/${DIST_SUBDIR}/packages-${GAP_PKGTIME}.tar.bz2 )
|
2002-05-12 14:40:55 -04:00
|
|
|
|
2005-08-01 09:08:23 -04:00
|
|
|
post-patch:
|
2006-05-26 09:34:12 -04:00
|
|
|
@${REINPLACE_CMD} -e "/^CC=/d" ${GAP_WRKSRC}/Makefile.in
|
2007-02-11 17:53:42 -05:00
|
|
|
@${REINPLACE_CMD} -e "s/@CC@/@BASECC@/" ${GAP_WRKSRC}/sysinfo.in
|
2005-08-01 09:08:23 -04:00
|
|
|
|
2002-05-12 14:40:55 -04:00
|
|
|
do-configure:
|
2004-12-06 03:07:18 -05:00
|
|
|
(cd ${GAP_WRKSRC}; ./configure)
|
2002-05-12 14:40:55 -04:00
|
|
|
|
|
|
|
do-build:
|
2005-05-15 15:08:33 -04:00
|
|
|
(cd ${GAP_WRKSRC}; make COPTS="${CFLAGS}")
|
2002-05-12 14:40:55 -04:00
|
|
|
|
2006-04-07 10:04:18 -04:00
|
|
|
post-build:
|
|
|
|
.if defined(WITH_COMPRESSED_TOMLIB)
|
|
|
|
(cd ${GAP_WRKSRC}/pkg/tomlib/data; ${SH} -c 'for i in *; do ${GZIP_CMD} $${i};done' )
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_ACE)
|
|
|
|
(cd ${GAP_WRKSRC}/pkg/ace; ./configure ../..; make )
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_COHOMOLO)
|
|
|
|
(cd ${GAP_WRKSRC}/pkg/cohomolo; ./configure ../..; make )
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_EDIM)
|
|
|
|
(cd ${GAP_WRKSRC}/pkg/edim; ./configure ../..; make )
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_EXAMPLE)
|
|
|
|
(cd ${GAP_WRKSRC}/pkg/example; ./configure ../..; make )
|
|
|
|
.endif
|
2006-10-08 06:43:19 -04:00
|
|
|
#.if defined(WITH_GRAPE)
|
|
|
|
# (cd ${GAP_WRKSRC}/pkg/grape; ./configure ../..; make linux-gcc )
|
|
|
|
#.endif
|
2006-04-07 10:04:18 -04:00
|
|
|
.if defined(WITH_KBMAG)
|
|
|
|
(cd ${GAP_WRKSRC}/pkg/kbmag; ./configure ../..; make )
|
|
|
|
.endif
|
2006-05-26 09:34:12 -04:00
|
|
|
.if defined(WITH_OPENMATH)
|
|
|
|
(cd ${GAP_WRKSRC}/pkg/openmath/OMCv1.3c/src/; ./configure; make; cd ../..; ./configure ../../; make )
|
|
|
|
.endif
|
2006-04-07 10:04:18 -04:00
|
|
|
.if defined(WITH_PARGAP)
|
|
|
|
(cd ${GAP_WRKSRC}/pkg/pargap; ./configure ../..; make )
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_XGAP)
|
|
|
|
(cd ${GAP_WRKSRC}/pkg/xgap; ./configure ; make )
|
|
|
|
.endif
|
|
|
|
|
2002-05-12 14:40:55 -04:00
|
|
|
do-install:
|
2004-12-06 03:07:18 -05:00
|
|
|
(${SED} -e "s:GAP_DIR=.*:GAP_DIR=${GAP_LIBDIR}:g" -e "s:GAP_PRG=.*:GAP_PRG=gap:g" ${GAP_WRKSRC}/bin/gap.sh > ${PREFIX}/bin/gap; \
|
2002-05-12 14:40:55 -04:00
|
|
|
${CHMOD} 755 ${PREFIX}/bin/gap; )
|
2004-12-06 03:07:18 -05:00
|
|
|
@${MKDIR} ${GAP_LIBDIR} ${GAP_LIBDIR}/bin
|
|
|
|
@${INSTALL_PROGRAM} ${GAP_WRKSRC}/bin/*/gap ${GAP_LIBDIR}/bin
|
|
|
|
@${INSTALL_SCRIPT} ${GAP_WRKSRC}/bin/*/gac ${GAP_LIBDIR}/bin
|
2005-02-15 03:52:48 -05:00
|
|
|
@${INSTALL_DATA} ${GAP_WRKSRC}/sysinfo.gap ${GAP_LIBDIR}
|
2002-05-12 14:40:55 -04:00
|
|
|
.for subdir in doc etc grp lib pkg prim small trans tst
|
2004-12-06 03:07:18 -05:00
|
|
|
@${CP} -R ${GAP_WRKSRC}/${subdir} ${GAP_LIBDIR}/
|
2002-05-12 14:40:55 -04:00
|
|
|
.endfor
|
|
|
|
|
2005-02-15 03:52:48 -05:00
|
|
|
post-install:
|
|
|
|
@${FIND} ${GAP_LIBDIR} -type d -empty -delete
|
|
|
|
@${FIND} ${GAP_LIBDIR} ! -type d | \
|
|
|
|
${SED} 's,${PREFIX}/,,' >> ${TMPPLIST}
|
|
|
|
@${FIND} ${GAP_LIBDIR} -type d -depth | \
|
|
|
|
${SED} 's,${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
|
|
|
|
|
2002-05-12 14:40:55 -04:00
|
|
|
.include <bsd.port.post.mk>
|